@ignix-social/editor 0.1.0
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/LICENSE +190 -0
- package/NOTICE +54 -0
- package/README.md +23 -0
- package/bin/ignix-editor.mjs +8 -0
- package/package.json +53 -0
- package/patches/index.mjs +53 -0
- package/scripts/build-ffmpeg-macos.sh +35 -0
- package/scripts/build-whisper-macos.sh +21 -0
- package/scripts/vendor.mjs +41 -0
- package/skills/ignix-editor/SKILL.md +132 -0
- package/src/audio.mjs +31 -0
- package/src/binaries.json +46 -0
- package/src/binaries.mjs +83 -0
- package/src/cli.mjs +254 -0
- package/src/prepare.mjs +74 -0
- package/src/runtime/ignix-frame.js +92 -0
- package/src/transcribe.mjs +71 -0
- package/src/validate.mjs +71 -0
- package/templates/blank/index.html +41 -0
- package/vendor/hyperframes/README.md +181 -0
- package/vendor/hyperframes/UPSTREAM.json +12 -0
- package/vendor/hyperframes/bin/hyperframes-localize-fonts.mjs +12 -0
- package/vendor/hyperframes/bin/hyperframes.mjs +11 -0
- package/vendor/hyperframes/dist/add-LR3ZR2A5.js +79 -0
- package/vendor/hyperframes/dist/agentPromptGenerator-VIIPZCJ3.js +143 -0
- package/vendor/hyperframes/dist/animatedGifPrep-P2T6YM7Z.js +34 -0
- package/vendor/hyperframes/dist/asset-BE2DOV72.js +26 -0
- package/vendor/hyperframes/dist/assetCataloger-VBLPHX24.js +340 -0
- package/vendor/hyperframes/dist/auth-RCQB2ZT7.js +60 -0
- package/vendor/hyperframes/dist/autoUpdate-RJAX3DAZ.js +268 -0
- package/vendor/hyperframes/dist/backgroundChecks-H2LCUIMJ.js +61 -0
- package/vendor/hyperframes/dist/backgroundChecksWorker.js +26 -0
- package/vendor/hyperframes/dist/batchRender-FT7AP7XH.js +355 -0
- package/vendor/hyperframes/dist/beat-analyzer.global.js +338 -0
- package/vendor/hyperframes/dist/beats-Y2EOP72P.js +309 -0
- package/vendor/hyperframes/dist/benchmark-MZ7GY3JW.js +231 -0
- package/vendor/hyperframes/dist/browser-HUTAMRQE.js +237 -0
- package/vendor/hyperframes/dist/bundleWithLocalizedFonts-5QOPOB5D.js +52 -0
- package/vendor/hyperframes/dist/capture-RLZA6EMR.js +4079 -0
- package/vendor/hyperframes/dist/capture-SZZ4IYJK.js +290 -0
- package/vendor/hyperframes/dist/captureFile-LYOJOUIE.js +15 -0
- package/vendor/hyperframes/dist/captureTimeout-PA4FYWT5.js +27 -0
- package/vendor/hyperframes/dist/catalog-KYU55EWR.js +1001 -0
- package/vendor/hyperframes/dist/check-TCG4PXLR.js +1697 -0
- package/vendor/hyperframes/dist/checkBrowser-RPMO4OW5.js +1032 -0
- package/vendor/hyperframes/dist/chunk-2EAXUCCE.js +88 -0
- package/vendor/hyperframes/dist/chunk-2EGFTPWD.js +1077 -0
- package/vendor/hyperframes/dist/chunk-2PSPARWP.js +6058 -0
- package/vendor/hyperframes/dist/chunk-2YN64IN5.js +5747 -0
- package/vendor/hyperframes/dist/chunk-3GXQPCJC.js +682 -0
- package/vendor/hyperframes/dist/chunk-3ZP5DXE7.js +15 -0
- package/vendor/hyperframes/dist/chunk-4NWOGZZS.js +1990 -0
- package/vendor/hyperframes/dist/chunk-4PFZPP2N.js +587 -0
- package/vendor/hyperframes/dist/chunk-4THIAPBL.js +128 -0
- package/vendor/hyperframes/dist/chunk-4YYJOFKS.js +28 -0
- package/vendor/hyperframes/dist/chunk-54HJ63Q2.js +29 -0
- package/vendor/hyperframes/dist/chunk-5ETJX6WM.js +89 -0
- package/vendor/hyperframes/dist/chunk-5IAKAQA7.js +389 -0
- package/vendor/hyperframes/dist/chunk-5Z63TBTX.js +37 -0
- package/vendor/hyperframes/dist/chunk-6BEFEWFB.js +25 -0
- package/vendor/hyperframes/dist/chunk-6CSYCFQV.js +68 -0
- package/vendor/hyperframes/dist/chunk-6CTIGJY7.js +154 -0
- package/vendor/hyperframes/dist/chunk-7HG4BFIN.js +93 -0
- package/vendor/hyperframes/dist/chunk-7JZ4FXP2.js +118 -0
- package/vendor/hyperframes/dist/chunk-A2Z4Z4VL.js +2961 -0
- package/vendor/hyperframes/dist/chunk-AMKC3AXA.js +25 -0
- package/vendor/hyperframes/dist/chunk-AVUUN2XD.js +4847 -0
- package/vendor/hyperframes/dist/chunk-AWDFDFI3.js +46 -0
- package/vendor/hyperframes/dist/chunk-AWNBM3MZ.js +94 -0
- package/vendor/hyperframes/dist/chunk-BXCMXMJQ.js +73 -0
- package/vendor/hyperframes/dist/chunk-BZ56MTDX.js +6 -0
- package/vendor/hyperframes/dist/chunk-CFKU7HTK.js +171 -0
- package/vendor/hyperframes/dist/chunk-CWPVM2QV.js +308 -0
- package/vendor/hyperframes/dist/chunk-DPVXBVLL.js +31292 -0
- package/vendor/hyperframes/dist/chunk-DQBY7FRR.js +397 -0
- package/vendor/hyperframes/dist/chunk-E6RPWJVC.js +213 -0
- package/vendor/hyperframes/dist/chunk-EISRN4E6.js +294 -0
- package/vendor/hyperframes/dist/chunk-EOVYQ3IG.js +143 -0
- package/vendor/hyperframes/dist/chunk-F3WZGU7C.js +479 -0
- package/vendor/hyperframes/dist/chunk-FCSIGXXP.js +366 -0
- package/vendor/hyperframes/dist/chunk-FI4I7CME.js +56 -0
- package/vendor/hyperframes/dist/chunk-FLWXXDNS.js +15 -0
- package/vendor/hyperframes/dist/chunk-GK4AIFIH.js +11171 -0
- package/vendor/hyperframes/dist/chunk-GMECXFAN.js +57 -0
- package/vendor/hyperframes/dist/chunk-GULOKZLI.js +155 -0
- package/vendor/hyperframes/dist/chunk-H4YZZ2VQ.js +68 -0
- package/vendor/hyperframes/dist/chunk-H6QMKUYA.js +477 -0
- package/vendor/hyperframes/dist/chunk-HBBJFK6I.js +273 -0
- package/vendor/hyperframes/dist/chunk-HRUGC23L.js +212 -0
- package/vendor/hyperframes/dist/chunk-HVW7ABXD.js +19 -0
- package/vendor/hyperframes/dist/chunk-HW6OYASV.js +344 -0
- package/vendor/hyperframes/dist/chunk-HWKCIWQT.js +3578 -0
- package/vendor/hyperframes/dist/chunk-I465DBM6.js +1214 -0
- package/vendor/hyperframes/dist/chunk-IGLEPPTN.js +24 -0
- package/vendor/hyperframes/dist/chunk-IGNAAHS3.js +433 -0
- package/vendor/hyperframes/dist/chunk-IHFUKJOR.js +85 -0
- package/vendor/hyperframes/dist/chunk-IQ3OUQ5Z.js +213 -0
- package/vendor/hyperframes/dist/chunk-ISN5GRYI.js +20 -0
- package/vendor/hyperframes/dist/chunk-IUZFXWSV.js +446 -0
- package/vendor/hyperframes/dist/chunk-JH556Q42.js +647 -0
- package/vendor/hyperframes/dist/chunk-JTHMTOMQ.js +601 -0
- package/vendor/hyperframes/dist/chunk-K2EQN4VU.js +405 -0
- package/vendor/hyperframes/dist/chunk-K2FTXJYH.js +16044 -0
- package/vendor/hyperframes/dist/chunk-K4WIOZFP.js +32 -0
- package/vendor/hyperframes/dist/chunk-K4WKGXRC.js +18 -0
- package/vendor/hyperframes/dist/chunk-KBJUXVOJ.js +172 -0
- package/vendor/hyperframes/dist/chunk-KC5XXX3X.js +590 -0
- package/vendor/hyperframes/dist/chunk-KNU5COPB.js +29 -0
- package/vendor/hyperframes/dist/chunk-KZI44OPA.js +185 -0
- package/vendor/hyperframes/dist/chunk-L3YOGIPG.js +48 -0
- package/vendor/hyperframes/dist/chunk-LAOCA3MQ.js +189 -0
- package/vendor/hyperframes/dist/chunk-LCSMOLGX.js +312 -0
- package/vendor/hyperframes/dist/chunk-LFGJWOVA.js +61 -0
- package/vendor/hyperframes/dist/chunk-LHSR3M4M.js +498 -0
- package/vendor/hyperframes/dist/chunk-LYNI3FOL.js +123 -0
- package/vendor/hyperframes/dist/chunk-M2WBOQ2Q.js +54 -0
- package/vendor/hyperframes/dist/chunk-MRF4AMKD.js +104 -0
- package/vendor/hyperframes/dist/chunk-MWB3ZIFM.js +852 -0
- package/vendor/hyperframes/dist/chunk-NGKM64BP.js +39 -0
- package/vendor/hyperframes/dist/chunk-NXMYHJAL.js +43 -0
- package/vendor/hyperframes/dist/chunk-OAF4XJOW.js +192 -0
- package/vendor/hyperframes/dist/chunk-OFQWTKPW.js +117 -0
- package/vendor/hyperframes/dist/chunk-P6LJ4Y32.js +4662 -0
- package/vendor/hyperframes/dist/chunk-PBN6GBJE.js +108 -0
- package/vendor/hyperframes/dist/chunk-PDAMK4Q5.js +28 -0
- package/vendor/hyperframes/dist/chunk-PFCFR3KZ.js +20 -0
- package/vendor/hyperframes/dist/chunk-PJ3HDUCY.js +108 -0
- package/vendor/hyperframes/dist/chunk-PMRBLBUP.js +152 -0
- package/vendor/hyperframes/dist/chunk-PPQUYWTW.js +240 -0
- package/vendor/hyperframes/dist/chunk-Q5X2B5WT.js +29 -0
- package/vendor/hyperframes/dist/chunk-Q7IU7MOR.js +351 -0
- package/vendor/hyperframes/dist/chunk-QC4FJVLM.js +371 -0
- package/vendor/hyperframes/dist/chunk-QNYYOUU3.js +1318 -0
- package/vendor/hyperframes/dist/chunk-RDNNAKEP.js +161 -0
- package/vendor/hyperframes/dist/chunk-RMHUQGRK.js +657 -0
- package/vendor/hyperframes/dist/chunk-RQVDTPGD.js +6 -0
- package/vendor/hyperframes/dist/chunk-RVCWIIZ7.js +68 -0
- package/vendor/hyperframes/dist/chunk-S3D6GE5W.js +72 -0
- package/vendor/hyperframes/dist/chunk-S3S4TGEH.js +424 -0
- package/vendor/hyperframes/dist/chunk-S7NPLFWV.js +11395 -0
- package/vendor/hyperframes/dist/chunk-SHB5VDMH.js +51 -0
- package/vendor/hyperframes/dist/chunk-TCLGPL65.js +860 -0
- package/vendor/hyperframes/dist/chunk-THXFSPLV.js +40 -0
- package/vendor/hyperframes/dist/chunk-TJSTGSAW.js +354 -0
- package/vendor/hyperframes/dist/chunk-TQFG7HTI.js +1024 -0
- package/vendor/hyperframes/dist/chunk-TVCRUG2S.js +265 -0
- package/vendor/hyperframes/dist/chunk-TWWSYAKJ.js +24 -0
- package/vendor/hyperframes/dist/chunk-U7CZBDMV.js +27 -0
- package/vendor/hyperframes/dist/chunk-UEZXMWG3.js +139 -0
- package/vendor/hyperframes/dist/chunk-UYEZTK4U.js +61 -0
- package/vendor/hyperframes/dist/chunk-VC76R6W2.js +27 -0
- package/vendor/hyperframes/dist/chunk-VFCKXTBB.js +159 -0
- package/vendor/hyperframes/dist/chunk-VWG7OQKU.js +22 -0
- package/vendor/hyperframes/dist/chunk-VXVRPIJA.js +105 -0
- package/vendor/hyperframes/dist/chunk-WBLXWOYK.js +15 -0
- package/vendor/hyperframes/dist/chunk-WERLJGIC.js +20 -0
- package/vendor/hyperframes/dist/chunk-WMQNIQDJ.js +2057 -0
- package/vendor/hyperframes/dist/chunk-WPHMNO44.js +4528 -0
- package/vendor/hyperframes/dist/chunk-X5HWXQPU.js +113 -0
- package/vendor/hyperframes/dist/chunk-X7MTZ4T2.js +6 -0
- package/vendor/hyperframes/dist/chunk-XH4DSOS5.js +59 -0
- package/vendor/hyperframes/dist/chunk-XS4EJSKU.js +23 -0
- package/vendor/hyperframes/dist/chunk-XT5P4QMO.js +181 -0
- package/vendor/hyperframes/dist/chunk-XT7X6QCP.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUHOIDKG.js +6 -0
- package/vendor/hyperframes/dist/chunk-XUXGIA7H.js +485 -0
- package/vendor/hyperframes/dist/chunk-XZABUQTX.js +113 -0
- package/vendor/hyperframes/dist/chunk-Y6W4DVPS.js +356 -0
- package/vendor/hyperframes/dist/chunk-YEIFI443.js +44 -0
- package/vendor/hyperframes/dist/chunk-YQZNILVH.js +375 -0
- package/vendor/hyperframes/dist/chunk-Z27A7NUB.js +65 -0
- package/vendor/hyperframes/dist/chunk-Z6B37SNM.js +3081 -0
- package/vendor/hyperframes/dist/chunk-ZJUKFZ2P.js +10954 -0
- package/vendor/hyperframes/dist/chunk-ZKDMAOFU.js +32 -0
- package/vendor/hyperframes/dist/chunk-ZMXUQLI2.js +17219 -0
- package/vendor/hyperframes/dist/chunk-ZTZ7NCJT.js +58 -0
- package/vendor/hyperframes/dist/chunk-ZTZA4UWZ.js +108 -0
- package/vendor/hyperframes/dist/clean-W57E5YQ3.js +293 -0
- package/vendor/hyperframes/dist/cli.js +495 -0
- package/vendor/hyperframes/dist/cloud-FFTJGZ24.js +70 -0
- package/vendor/hyperframes/dist/cloudrun-AJUTHUEA.js +763 -0
- package/vendor/hyperframes/dist/colors-HKWSZCGK.js +15 -0
- package/vendor/hyperframes/dist/commands/contrast-audit.browser.js +459 -0
- package/vendor/hyperframes/dist/commands/layout-audit.browser.js +2102 -0
- package/vendor/hyperframes/dist/commands/motion-sample.browser.js +74 -0
- package/vendor/hyperframes/dist/commands/motion-signature.browser.js +374 -0
- package/vendor/hyperframes/dist/compare-AYCTT55F.js +421 -0
- package/vendor/hyperframes/dist/compiler-QO36EXLS.js +121 -0
- package/vendor/hyperframes/dist/component-VFFR2O7T.js +176 -0
- package/vendor/hyperframes/dist/compositions-QTVN3U2A.js +228 -0
- package/vendor/hyperframes/dist/contactSheet-27SRU7A4.js +22 -0
- package/vendor/hyperframes/dist/delete-ZAKYCB7I.js +114 -0
- package/vendor/hyperframes/dist/deploy-MX76RZ36.js +101 -0
- package/vendor/hyperframes/dist/destroy-H2TZBYHH.js +42 -0
- package/vendor/hyperframes/dist/deterministicFonts-HAEMV4TM.js +50 -0
- package/vendor/hyperframes/dist/dist-EWXJGN63.js +129 -0
- package/vendor/hyperframes/dist/dist-FNNGCKFS.js +29 -0
- package/vendor/hyperframes/dist/dist-S3PJNPXQ.js +392 -0
- package/vendor/hyperframes/dist/docker/Dockerfile.render +65 -0
- package/vendor/hyperframes/dist/docs/compositions.md +67 -0
- package/vendor/hyperframes/dist/docs/data-attributes.md +27 -0
- package/vendor/hyperframes/dist/docs/examples.md +19 -0
- package/vendor/hyperframes/dist/docs/gsap.md +26 -0
- package/vendor/hyperframes/dist/docs/rendering.md +35 -0
- package/vendor/hyperframes/dist/docs/troubleshooting.md +29 -0
- package/vendor/hyperframes/dist/docs-QAPJEGLS.js +131 -0
- package/vendor/hyperframes/dist/doctor-AI7C3FON.js +67 -0
- package/vendor/hyperframes/dist/dom-IROKGVJI.js +14 -0
- package/vendor/hyperframes/dist/dotEnv-AECLXQSO.js +14 -0
- package/vendor/hyperframes/dist/events-7LALYNKZ.js +92 -0
- package/vendor/hyperframes/dist/events-FQY3HGKZ.js +88 -0
- package/vendor/hyperframes/dist/feedback-WCMDMSTK.js +472 -0
- package/vendor/hyperframes/dist/ffmpeg-QIUFEFTY.js +35 -0
- package/vendor/hyperframes/dist/figma-64WY462P.js +63 -0
- package/vendor/hyperframes/dist/fontData.generated-NXAOI4GH.js +13 -0
- package/vendor/hyperframes/dist/fontLocalizeCli.js +132 -0
- package/vendor/hyperframes/dist/get-FPOMJMZB.js +103 -0
- package/vendor/hyperframes/dist/gpuPolicy-2ZUZE5D6.js +38 -0
- package/vendor/hyperframes/dist/grade-compare-E2CKPST4.js +647 -0
- package/vendor/hyperframes/dist/gsapParser-DIYYX6JT.js +2846 -0
- package/vendor/hyperframes/dist/gsapParserAcorn-E3GEIRZB.js +28 -0
- package/vendor/hyperframes/dist/help-YRQIDDML.js +197 -0
- package/vendor/hyperframes/dist/history-PP5NDRV3.js +571 -0
- package/vendor/hyperframes/dist/hyperframe-runtime.js +1081 -0
- package/vendor/hyperframes/dist/hyperframe.manifest.json +22 -0
- package/vendor/hyperframes/dist/hyperframe.runtime.iife.js +1081 -0
- package/vendor/hyperframes/dist/hyperframes-player.global.js +474 -0
- package/vendor/hyperframes/dist/hyperframes-slideshow.global.js +149 -0
- package/vendor/hyperframes/dist/info-SEX3B7JL.js +153 -0
- package/vendor/hyperframes/dist/init-U3AKHO5B.js +1147 -0
- package/vendor/hyperframes/dist/inspect-Q3K6EDEK.js +97 -0
- package/vendor/hyperframes/dist/installer-K6O5WF44.js +37 -0
- package/vendor/hyperframes/dist/keyframes-DC64JCI3.js +2602 -0
- package/vendor/hyperframes/dist/lambda-D7UMN4DJ.js +451 -0
- package/vendor/hyperframes/dist/layout-XSPPDHOO.js +86 -0
- package/vendor/hyperframes/dist/lib-TPG2ZMAX.js +128 -0
- package/vendor/hyperframes/dist/lint-7DQZE7L3.js +164 -0
- package/vendor/hyperframes/dist/lintProject-OHBBM3DJ.js +27 -0
- package/vendor/hyperframes/dist/list-4K5MVDQX.js +162 -0
- package/vendor/hyperframes/dist/login-NTX4OWXL.js +377 -0
- package/vendor/hyperframes/dist/logout-Q654A3SI.js +100 -0
- package/vendor/hyperframes/dist/manager-67P2XFXQ.js +34 -0
- package/vendor/hyperframes/dist/manager-CT3D67CG.js +38 -0
- package/vendor/hyperframes/dist/manager-GFN75DM4.js +30 -0
- package/vendor/hyperframes/dist/media-treatment-5FYAOPNL.js +972 -0
- package/vendor/hyperframes/dist/media-use-4XXGABIL.js +113 -0
- package/vendor/hyperframes/dist/models-C4E4IWJD.js +137 -0
- package/vendor/hyperframes/dist/motionShot-S4MIGMT5.js +614 -0
- package/vendor/hyperframes/dist/normalize-O76AC4HE.js +333 -0
- package/vendor/hyperframes/dist/normalize-audio-CSFTXLXD.js +276 -0
- package/vendor/hyperframes/dist/open-2ZD6BHZG.js +115 -0
- package/vendor/hyperframes/dist/pipeline-TNGWUZQC.js +54 -0
- package/vendor/hyperframes/dist/play-CTMUXX6E.js +349 -0
- package/vendor/hyperframes/dist/policies-FSDZVS2E.js +292 -0
- package/vendor/hyperframes/dist/preflight-SMNV6RW2.js +45 -0
- package/vendor/hyperframes/dist/present-WQVHV5CR.js +350 -0
- package/vendor/hyperframes/dist/preview-JOJXTH75.js +1820 -0
- package/vendor/hyperframes/dist/producer-ECLEN5RP.js +13 -0
- package/vendor/hyperframes/dist/progress-FBIEEB7Y.js +73 -0
- package/vendor/hyperframes/dist/projectConfig-HYJMJ5BY.js +56 -0
- package/vendor/hyperframes/dist/publication-HQ5Y3KBM.js +29 -0
- package/vendor/hyperframes/dist/publish-VHDYQASC.js +430 -0
- package/vendor/hyperframes/dist/refresh-K24ETHMA.js +53 -0
- package/vendor/hyperframes/dist/remove-background-W2YX2NVH.js +253 -0
- package/vendor/hyperframes/dist/render-AO5VX3YI.js +177 -0
- package/vendor/hyperframes/dist/render-LNO62LEL.js +2367 -0
- package/vendor/hyperframes/dist/render-TTQI7TGN.js +796 -0
- package/vendor/hyperframes/dist/render-batch-YH7CTWNY.js +284 -0
- package/vendor/hyperframes/dist/renderCancellation-JPIHE47X.js +35 -0
- package/vendor/hyperframes/dist/renderSetupWorker.js +79 -0
- package/vendor/hyperframes/dist/resolver-IZ647GBZ.js +38 -0
- package/vendor/hyperframes/dist/runtimeVersion.js +18 -0
- package/vendor/hyperframes/dist/screenshotCapture-ECBTLCU6.js +179 -0
- package/vendor/hyperframes/dist/shaderTransitionWorker.js +44 -0
- package/vendor/hyperframes/dist/sherpa-KKLNW6U2.js +314 -0
- package/vendor/hyperframes/dist/sherpaWorker.js +77 -0
- package/vendor/hyperframes/dist/sites-TNVKZS73.js +52 -0
- package/vendor/hyperframes/dist/skill-ZHVLH7KX.js +15 -0
- package/vendor/hyperframes/dist/skills/hyperframes/SKILL.md +152 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-contract.md +108 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/brief-format.md +72 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/capability-menu.md +47 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/frame-worker-core.md +80 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/intent-interview.md +73 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/pitch-round.md +40 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/plugin-installation.md +43 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/production-loop.md +26 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/review-loop.md +37 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/route-briefs.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/embedded-captions.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/faceless-explainer.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/general-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/motion-graphics.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/music-to-video.md +12 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/pr-to-video.md +28 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/product-launch-video.md +13 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/remotion-to-hyperframes.md +9 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/slideshow.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/routes/talking-head-recut.md +11 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/script-format.md +52 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/skill-lifecycle.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/storyboard-format.md +99 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/subagent-dispatch.md +35 -0
- package/vendor/hyperframes/dist/skills/hyperframes/references/workflow-catalog.md +10 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/lib/frame-packets-core.mjs +194 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.mjs +88 -0
- package/vendor/hyperframes/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/SKILL.md +189 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/beats.md +19 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloud.md +163 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/cloudrun.md +62 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/compare-and-batch.md +105 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/doctor-browser.md +57 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/init-and-scaffold.md +74 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lambda.md +185 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +132 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/preview-render.md +193 -0
- package/vendor/hyperframes/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +134 -0
- package/vendor/hyperframes/dist/skills/media-use/SKILL.md +100 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/CREDITS.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/chime.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/click.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/error.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/key-press.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/manifest.json +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/notification.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/ping.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/pop.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/riser.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/typing.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/bgm.md +76 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/authoring.md +163 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/motion.md +87 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/captions/transcript-handling.md +97 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/remove-background.md +143 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/requirements.md +29 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/sfx.md +42 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/transcribe.md +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts-to-captions.md +35 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/references/tts.md +260 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.mjs +311 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/audio.test.mjs +159 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +131 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +38 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.mjs +98 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +233 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm-volume.mjs +4 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.mjs +257 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +74 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.mjs +14 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.mjs +43 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.py +52 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +86 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-auth_test.py +90 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.mjs +122 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +243 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +185 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.mjs +114 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +205 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.mjs +77 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/python.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.mjs +389 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/lyria-recipe.py +136 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.mjs +175 -0
- package/vendor/hyperframes/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +108 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/README.md +28 -0
- package/vendor/hyperframes/dist/skills/media-use/luts/index.json +57 -0
- package/vendor/hyperframes/dist/skills/media-use/references/audio.md +20 -0
- package/vendor/hyperframes/dist/skills/media-use/references/grading.md +160 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatment-recipes.md +929 -0
- package/vendor/hyperframes/dist/skills/media-use/references/media-treatments.md +202 -0
- package/vendor/hyperframes/dist/skills/media-use/references/memory.md +37 -0
- package/vendor/hyperframes/dist/skills/media-use/references/meta.md +61 -0
- package/vendor/hyperframes/dist/skills/media-use/references/operations.md +327 -0
- package/vendor/hyperframes/dist/skills/media-use/references/resolve.md +150 -0
- package/vendor/hyperframes/dist/skills/media-use/references/setup-providers.md +80 -0
- package/vendor/hyperframes/dist/skills/media-use/references/telemetry-dashboard.md +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/audio-duck.mjs +113 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/compatibility.test.mjs +96 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.mjs +328 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/dither.test.mjs +176 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/eval.mjs +369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/adopt.test.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bgm-provider.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/brand-provider.mjs +59 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +119 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +139 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cache.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.mjs +91 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/candidates.test.mjs +155 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.mjs +161 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +34 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.d.mts +3 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/config-lock.test.mjs +79 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/coverage.test.mjs +136 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.mjs +181 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-build.test.mjs +80 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.mjs +198 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +125 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.mjs +184 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/cutlist.test.mjs +162 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.mjs +95 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/duck.test.mjs +153 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.mjs +230 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +102 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ff-binaries.mjs +37 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/freeze.test.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +265 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +285 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.mjs +191 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +301 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.mjs +45 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +138 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +435 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/image-provider.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/index-gen.mjs +63 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-media-search.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.mjs +318 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-models.test.mjs +220 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.mjs +78 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/local-run.test.mjs +121 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.mjs +244 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +298 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +316 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.mjs +271 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +199 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.d.mts +19 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.mjs +279 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/manifest.test.mjs +397 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/match.mjs +47 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.mjs +85 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +197 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.mjs +20 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-home.test.mjs +61 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.d.mts +9 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/media-search.mjs +107 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.mjs +128 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +174 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.mjs +49 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/misses.test.mjs +89 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.mjs +31 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +50 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.mjs +27 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +44 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.mjs +180 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +189 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.mjs +41 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/probe.test.mjs +148 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/providers.mjs +5 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +367 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.mjs +212 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/registry.test.mjs +262 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.mjs +24 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/search.test.mjs +32 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.mjs +132 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/specs.test.mjs +157 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.mjs +117 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/stats.test.mjs +165 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/svg-sanitize.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.mjs +210 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/telemetry.test.mjs +437 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/test-home.test.mjs +10 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.mjs +21 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +33 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +94 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +72 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/usage.test.mjs +54 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.mjs +57 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +46 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/lib/words.mjs +18 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/prefs.mjs +70 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/recipe.mjs +103 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve-plugin.test.mjs +62 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/resolve.mjs +1369 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.mjs +194 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcribe.test.mjs +112 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.mjs +270 -0
- package/vendor/hyperframes/dist/skills/media-use/scripts/transcript-cut.test.mjs +117 -0
- package/vendor/hyperframes/dist/skills-MJ2J4GEM.js +808 -0
- package/vendor/hyperframes/dist/skillsUpdateCheck-TKTYQN5R.js +26 -0
- package/vendor/hyperframes/dist/slideshow-EJ4IMY6P.js +24 -0
- package/vendor/hyperframes/dist/snapshot-KIVDUUMN.js +875 -0
- package/vendor/hyperframes/dist/src-6YQBJGWR.js +202 -0
- package/vendor/hyperframes/dist/src-PVYUYV3M.js +471 -0
- package/vendor/hyperframes/dist/state-KAXGHF77.js +26 -0
- package/vendor/hyperframes/dist/staticProjectServer-7EU666GS.js +49 -0
- package/vendor/hyperframes/dist/status-YM52BQ6S.js +311 -0
- package/vendor/hyperframes/dist/studio/assets/hyperframes-player-Cp8e_Zst.js +473 -0
- package/vendor/hyperframes/dist/studio/assets/index-BX3KHhGX.js +71 -0
- package/vendor/hyperframes/dist/studio/assets/index-CASEBNy2.js +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-D11atkBt.css +1 -0
- package/vendor/hyperframes/dist/studio/assets/index-DMTt9nTf.js +531 -0
- package/vendor/hyperframes/dist/studio/assets/index-oE1pOdAy.js +399 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js +948 -0
- package/vendor/hyperframes/dist/studio/chunk-5VSXRGIX.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js +938 -0
- package/vendor/hyperframes/dist/studio/chunk-7UQWVN52.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js +190 -0
- package/vendor/hyperframes/dist/studio/chunk-EEXSYY5F.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js +1441 -0
- package/vendor/hyperframes/dist/studio/chunk-FOEID72M.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js +10 -0
- package/vendor/hyperframes/dist/studio/chunk-PZ5AY32C.js.map +1 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js +1103 -0
- package/vendor/hyperframes/dist/studio/chunk-TDWGXBUT.js.map +1 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js +47 -0
- package/vendor/hyperframes/dist/studio/domEditingLayers-IEVLO54Z.js.map +1 -0
- package/vendor/hyperframes/dist/studio/favicon.svg +14 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/audio.svg +7 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/captions.svg +5 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/composition.svg +12 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/image.svg +18 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/music.svg +10 -0
- package/vendor/hyperframes/dist/studio/icons/timeline/text.svg +3 -0
- package/vendor/hyperframes/dist/studio/index.css +165 -0
- package/vendor/hyperframes/dist/studio/index.css.map +1 -0
- package/vendor/hyperframes/dist/studio/index.d.ts +4296 -0
- package/vendor/hyperframes/dist/studio/index.html +23 -0
- package/vendor/hyperframes/dist/studio/index.js +99693 -0
- package/vendor/hyperframes/dist/studio/index.js.map +1 -0
- package/vendor/hyperframes/dist/studio/player.d.ts +30 -0
- package/vendor/hyperframes/dist/studio/player.js +10 -0
- package/vendor/hyperframes/dist/studio/player.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.d.ts +39 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js +50 -0
- package/vendor/hyperframes/dist/studio/styles/tailwind-preset.js.map +1 -0
- package/vendor/hyperframes/dist/studio/styles.css +1 -0
- package/vendor/hyperframes/dist/studio/ui.d.ts +296 -0
- package/vendor/hyperframes/dist/studio/ui.js +66 -0
- package/vendor/hyperframes/dist/studio/ui.js.map +1 -0
- package/vendor/hyperframes/dist/studio-api-PNQZRPX5.js +136 -0
- package/vendor/hyperframes/dist/studioSelectionClient-IUUPKUHZ.js +25 -0
- package/vendor/hyperframes/dist/studioServer-UWRBPIOJ.js +1457 -0
- package/vendor/hyperframes/dist/synthesize-K62TIZWI.js +182 -0
- package/vendor/hyperframes/dist/system-EZYZNUFD.js +44 -0
- package/vendor/hyperframes/dist/telemetry-2YC4SGQU.js +144 -0
- package/vendor/hyperframes/dist/telemetry-QMYM4WME.js +95 -0
- package/vendor/hyperframes/dist/templates/_shared/AGENTS.md +107 -0
- package/vendor/hyperframes/dist/templates/_shared/CLAUDE.md +107 -0
- package/vendor/hyperframes/dist/templates/blank/index.html +55 -0
- package/vendor/hyperframes/dist/templates/from-file/index.html +75 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/captions.html +154 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/graphics.html +162 -0
- package/vendor/hyperframes/dist/templates/warm-grain/compositions/intro.html +87 -0
- package/vendor/hyperframes/dist/templates/warm-grain/index.html +264 -0
- package/vendor/hyperframes/dist/templates/warm-grain/registry-item.json +34 -0
- package/vendor/hyperframes/dist/timeline-77Z3BBQM.js +1377 -0
- package/vendor/hyperframes/dist/tokens-OBGTYE4Z.js +92 -0
- package/vendor/hyperframes/dist/transcribe-7NVFHCGA.js +387 -0
- package/vendor/hyperframes/dist/transcribe-BNSJRR4M.js +62 -0
- package/vendor/hyperframes/dist/tts-P3LIPIL5.js +234 -0
- package/vendor/hyperframes/dist/updateCheck-UDWIJ4ZQ.js +39 -0
- package/vendor/hyperframes/dist/upgrade-CT3CPO3E.js +231 -0
- package/vendor/hyperframes/dist/urlDownloader-H6WRI2UE.js +39 -0
- package/vendor/hyperframes/dist/usage-EC3KFUIJ.js +2139 -0
- package/vendor/hyperframes/dist/validate-65QDZJWZ.js +70 -0
- package/vendor/hyperframes/dist/video-FGSGKRSV.js +261 -0
- package/vendor/hyperframes/dist/workspaceBuildCheck-TOLGAI4T.js +133 -0
- package/vendor/hyperframes/package.json +80 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
+
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
+
var require = __hf_createRequire(import.meta.url);
|
|
5
|
+
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __hf_dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
firstFrameColourArgs,
|
|
9
|
+
hdrToSdrToneMapFilter,
|
|
10
|
+
parseFirstFrameColour
|
|
11
|
+
} from "./chunk-2YN64IN5.js";
|
|
12
|
+
import {
|
|
13
|
+
mkdirWithinProject,
|
|
14
|
+
realProjectRoot,
|
|
15
|
+
realpath,
|
|
16
|
+
resolveWithinProject
|
|
17
|
+
} from "./chunk-OFQWTKPW.js";
|
|
18
|
+
import {
|
|
19
|
+
cleanAssetUrl,
|
|
20
|
+
isRemoteOrInlineUrl,
|
|
21
|
+
isUnresolvedAssetPlaceholder,
|
|
22
|
+
maskNonScannableRanges,
|
|
23
|
+
resolveLocalAssetCandidates
|
|
24
|
+
} from "./chunk-ZJUKFZ2P.js";
|
|
25
|
+
import {
|
|
26
|
+
findFfBinary
|
|
27
|
+
} from "./chunk-PJ3HDUCY.js";
|
|
28
|
+
import {
|
|
29
|
+
rewriteAssetPath
|
|
30
|
+
} from "./chunk-TQFG7HTI.js";
|
|
31
|
+
|
|
32
|
+
// ../studio-server/dist/chunk-TTWLTYSQ.js
|
|
33
|
+
import { basename, dirname, isAbsolute, join, relative, sep } from "path";
|
|
34
|
+
import { readdirSync } from "fs";
|
|
35
|
+
function realFilePath(filePath) {
|
|
36
|
+
try {
|
|
37
|
+
return realpath(filePath);
|
|
38
|
+
} catch {
|
|
39
|
+
const dir = dirname(filePath);
|
|
40
|
+
return dir === filePath ? filePath : join(realFilePath(dir), basename(filePath));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function pinWithinProject(base, relativePath) {
|
|
44
|
+
const checked = resolveWithinProject(base, relativePath);
|
|
45
|
+
if (!checked) return null;
|
|
46
|
+
const inside = relative(realFilePath(base), realFilePath(checked));
|
|
47
|
+
const escapes = inside === ".." || inside.startsWith(`..${sep}`) || isAbsolute(inside);
|
|
48
|
+
return escapes ? null : join(base, inside);
|
|
49
|
+
}
|
|
50
|
+
var IGNORE_DIRS = /* @__PURE__ */ new Set([
|
|
51
|
+
".thumbnails",
|
|
52
|
+
".transcode-cache",
|
|
53
|
+
".waveform-cache",
|
|
54
|
+
"node_modules",
|
|
55
|
+
".git"
|
|
56
|
+
]);
|
|
57
|
+
function shouldIgnoreDir(rel) {
|
|
58
|
+
return rel === ".hyperframes/backup";
|
|
59
|
+
}
|
|
60
|
+
function isInHiddenOrVendorDir(relPath) {
|
|
61
|
+
const segments = relPath.split("/");
|
|
62
|
+
return segments.slice(0, -1).some((seg) => seg.startsWith(".") || seg === "node_modules");
|
|
63
|
+
}
|
|
64
|
+
var UNREADABLE_DIR_CODES = /* @__PURE__ */ new Set(["EACCES", "EPERM", "ENOENT", "ENOTDIR"]);
|
|
65
|
+
function walkDir(dir, prefix = "") {
|
|
66
|
+
let entries;
|
|
67
|
+
try {
|
|
68
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
69
|
+
} catch (err) {
|
|
70
|
+
const code = err.code;
|
|
71
|
+
if (!prefix || !code || !UNREADABLE_DIR_CODES.has(code)) throw err;
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
const files = [];
|
|
75
|
+
for (const entry of entries) {
|
|
76
|
+
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
77
|
+
if (IGNORE_DIRS.has(entry.name) || shouldIgnoreDir(rel)) continue;
|
|
78
|
+
if (entry.isDirectory()) {
|
|
79
|
+
files.push(...walkDir(join(dir, entry.name), rel));
|
|
80
|
+
} else {
|
|
81
|
+
files.push(rel);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return files;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ../studio-server/dist/chunk-I3DRHG52.js
|
|
88
|
+
import { existsSync, statSync } from "fs";
|
|
89
|
+
import { relative as relative2, resolve, sep as sep2 } from "path";
|
|
90
|
+
import { execFile } from "child_process";
|
|
91
|
+
import { extname } from "path";
|
|
92
|
+
var execFileRunner = (command, args, options) => new Promise((resolvePromise) => {
|
|
93
|
+
execFile(
|
|
94
|
+
command,
|
|
95
|
+
args,
|
|
96
|
+
{ timeout: options?.timeout, maxBuffer: options?.maxBuffer, windowsHide: true },
|
|
97
|
+
(error, stdout, stderr) => {
|
|
98
|
+
if (error && error.code === "ENOENT") {
|
|
99
|
+
resolvePromise({ status: null, stdout: "", stderr: "", error });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (error) {
|
|
103
|
+
const status = typeof error.code === "number" ? error.code : 1;
|
|
104
|
+
resolvePromise({ status, stdout: stdout ?? "", stderr: stderr ?? "" });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
resolvePromise({ status: 0, stdout: stdout ?? "", stderr: stderr ?? "" });
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
var VIDEO_EXT = /* @__PURE__ */ new Set([
|
|
112
|
+
".mp4",
|
|
113
|
+
".mov",
|
|
114
|
+
".webm",
|
|
115
|
+
".mkv",
|
|
116
|
+
".avi",
|
|
117
|
+
".m4v",
|
|
118
|
+
".mxf",
|
|
119
|
+
".mts",
|
|
120
|
+
".m2ts",
|
|
121
|
+
".ts"
|
|
122
|
+
]);
|
|
123
|
+
var IMAGE_EXT = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".avif"]);
|
|
124
|
+
var AUDIO_EXT = /* @__PURE__ */ new Set([".mp3", ".wav", ".ogg", ".m4a", ".aac", ".flac"]);
|
|
125
|
+
function lower(value) {
|
|
126
|
+
return value?.toLowerCase() ?? "";
|
|
127
|
+
}
|
|
128
|
+
function inferKindFromPath(path) {
|
|
129
|
+
const ext = extname(path).toLowerCase();
|
|
130
|
+
if (VIDEO_EXT.has(ext)) return "video";
|
|
131
|
+
if (IMAGE_EXT.has(ext)) return "image";
|
|
132
|
+
if (AUDIO_EXT.has(ext)) return "audio";
|
|
133
|
+
return "unknown";
|
|
134
|
+
}
|
|
135
|
+
function colorLabel(input) {
|
|
136
|
+
if (input.isHdr) {
|
|
137
|
+
if (input.hdrTransfer === "pq") return "HDR PQ";
|
|
138
|
+
if (input.hdrTransfer === "hlg") return "HDR HLG";
|
|
139
|
+
return "HDR";
|
|
140
|
+
}
|
|
141
|
+
if (input.colorPrimaries.includes("bt709") || input.colorSpace.includes("bt709") || input.colorTransfer.includes("bt709")) {
|
|
142
|
+
return "SDR Rec.709";
|
|
143
|
+
}
|
|
144
|
+
return "SDR/unknown";
|
|
145
|
+
}
|
|
146
|
+
var ALPHA_PIX_FMT_RE = /^(?:yuva|rgba|argb|bgra|abgr|gbrap|ya)/;
|
|
147
|
+
function pixelFormatHasAlpha(pixFmt) {
|
|
148
|
+
return pixFmt !== void 0 && ALPHA_PIX_FMT_RE.test(pixFmt.toLowerCase());
|
|
149
|
+
}
|
|
150
|
+
function classifyMediaColor(stream) {
|
|
151
|
+
const colorPrimaries = lower(stream?.color_primaries);
|
|
152
|
+
const colorSpace = lower(stream?.color_space);
|
|
153
|
+
const colorTransfer = lower(stream?.color_transfer);
|
|
154
|
+
const isHdr = colorPrimaries.includes("bt2020") || colorSpace.includes("bt2020") || colorTransfer === "smpte2084" || colorTransfer === "arib-std-b67";
|
|
155
|
+
const hdrTransfer = isHdr ? colorTransfer === "smpte2084" ? "pq" : colorTransfer === "arib-std-b67" ? "hlg" : "unknown" : null;
|
|
156
|
+
return {
|
|
157
|
+
dynamicRange: stream ? isHdr ? "hdr" : "sdr" : "unknown",
|
|
158
|
+
hdrTransfer,
|
|
159
|
+
label: stream ? colorLabel({ isHdr, hdrTransfer, colorPrimaries, colorSpace, colorTransfer }) : "Unknown",
|
|
160
|
+
isHdr,
|
|
161
|
+
codecName: stream?.codec_name,
|
|
162
|
+
profile: stream?.profile,
|
|
163
|
+
pixelFormat: stream?.pix_fmt,
|
|
164
|
+
colorSpace: stream?.color_space,
|
|
165
|
+
colorTransfer: stream?.color_transfer,
|
|
166
|
+
colorPrimaries: stream?.color_primaries,
|
|
167
|
+
bitsPerRawSample: stream?.bits_per_raw_sample
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
async function probeFirstFrameColour(filePath, runner = execFileRunner) {
|
|
171
|
+
const ffmpegPath = findFfBinary("ffmpeg", { configuredMustExist: true }) ?? (runner === execFileRunner ? void 0 : "ffmpeg");
|
|
172
|
+
if (!ffmpegPath) return {};
|
|
173
|
+
const result = await runner(ffmpegPath, firstFrameColourArgs(filePath), {
|
|
174
|
+
timeout: 15e3,
|
|
175
|
+
maxBuffer: 1024 * 1024
|
|
176
|
+
});
|
|
177
|
+
return result.status === 0 ? parseFirstFrameColour(String(result.stderr)) : {};
|
|
178
|
+
}
|
|
179
|
+
async function probeMediaMetadata(filePath, runner = execFileRunner) {
|
|
180
|
+
const kind = inferKindFromPath(filePath);
|
|
181
|
+
if (kind === "audio" || kind === "unknown") {
|
|
182
|
+
return { kind, color: classifyMediaColor(null) };
|
|
183
|
+
}
|
|
184
|
+
const ffprobePath = findFfBinary("ffprobe", { configuredMustExist: true }) ?? (runner === execFileRunner ? void 0 : "ffprobe");
|
|
185
|
+
if (!ffprobePath) {
|
|
186
|
+
return { kind, color: classifyMediaColor(null), probeError: "ffprobe unavailable" };
|
|
187
|
+
}
|
|
188
|
+
const result = await runner(
|
|
189
|
+
ffprobePath,
|
|
190
|
+
[
|
|
191
|
+
"-v",
|
|
192
|
+
"error",
|
|
193
|
+
"-show_entries",
|
|
194
|
+
"stream=codec_type,codec_name,profile,pix_fmt,color_space,color_transfer,color_primaries,bits_per_raw_sample:stream_disposition=attached_pic",
|
|
195
|
+
"-of",
|
|
196
|
+
"json",
|
|
197
|
+
"--",
|
|
198
|
+
filePath
|
|
199
|
+
],
|
|
200
|
+
{ timeout: 15e3, maxBuffer: 1024 * 1024 }
|
|
201
|
+
);
|
|
202
|
+
if (result.error?.code === "ENOENT") {
|
|
203
|
+
return { kind, color: classifyMediaColor(null), probeError: "ffprobe unavailable" };
|
|
204
|
+
}
|
|
205
|
+
if (result.status !== 0) {
|
|
206
|
+
return { kind, color: classifyMediaColor(null), probeError: "ffprobe failed" };
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
const parsed = JSON.parse(String(result.stdout || "{}"));
|
|
210
|
+
const stream = parsed.streams?.find((item) => {
|
|
211
|
+
if (kind === "image") return item.codec_type === "video";
|
|
212
|
+
return item.codec_type === kind && item.disposition?.attached_pic !== 1;
|
|
213
|
+
});
|
|
214
|
+
const metadata = { kind, color: classifyMediaColor(stream) };
|
|
215
|
+
if (kind === "video") {
|
|
216
|
+
metadata.hasAudio = (parsed.streams ?? []).some((item) => item.codec_type === "audio");
|
|
217
|
+
}
|
|
218
|
+
return metadata;
|
|
219
|
+
} catch {
|
|
220
|
+
return { kind, color: classifyMediaColor(null), probeError: "ffprobe returned invalid json" };
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
var BROWSER_HOSTILE_CODECS = {
|
|
224
|
+
// HEVC decode is platform-bound, not absent: macOS Chrome answers
|
|
225
|
+
// canPlayType with "probably" and keeps the source, while Chrome on
|
|
226
|
+
// Windows/Linux and Firefox everywhere need the substitute.
|
|
227
|
+
hevc: { representativeMime: 'video/mp4; codecs="hvc1.1.6.L120.B0"', prewarm: true },
|
|
228
|
+
prores: { representativeMime: null, prewarm: true },
|
|
229
|
+
// Every mainstream engine decodes AV1 and VP9, so canPlayType keeps the
|
|
230
|
+
// original and only the rare browser that cannot pays for a transcode.
|
|
231
|
+
av1: { representativeMime: 'video/mp4; codecs="av01.0.08M.08"', prewarm: false },
|
|
232
|
+
vp9: { representativeMime: 'video/webm; codecs="vp09.00.10.08"', prewarm: false }
|
|
233
|
+
};
|
|
234
|
+
function hostileCodecEntry(codecName) {
|
|
235
|
+
return Object.hasOwn(BROWSER_HOSTILE_CODECS, codecName) ? BROWSER_HOSTILE_CODECS[codecName] : void 0;
|
|
236
|
+
}
|
|
237
|
+
function shouldPrewarmProxy(facts) {
|
|
238
|
+
return hostileCodecEntry(facts.codecName)?.prewarm === true;
|
|
239
|
+
}
|
|
240
|
+
var proxyDemand = { prewarmsRequested: 0, proxyRequests: 0 };
|
|
241
|
+
function writeDemandLine(event) {
|
|
242
|
+
try {
|
|
243
|
+
process.stderr.write(
|
|
244
|
+
`[hyperframes:media-proxy] ${JSON.stringify({ event, ...proxyDemand })}
|
|
245
|
+
`
|
|
246
|
+
);
|
|
247
|
+
} catch {
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function isMediaProxyDebugEnabled() {
|
|
251
|
+
const value = process.env.HYPERFRAMES_DEBUG_MEDIA_PROXY;
|
|
252
|
+
return value === "1" || value === "true";
|
|
253
|
+
}
|
|
254
|
+
var summaryHookInstalled = false;
|
|
255
|
+
function recordProxyPrewarm() {
|
|
256
|
+
proxyDemand.prewarmsRequested++;
|
|
257
|
+
if (!summaryHookInstalled) {
|
|
258
|
+
summaryHookInstalled = true;
|
|
259
|
+
process.once("exit", () => writeDemandLine("summary"));
|
|
260
|
+
}
|
|
261
|
+
if (isMediaProxyDebugEnabled()) writeDemandLine("prewarm_requested");
|
|
262
|
+
}
|
|
263
|
+
function recordProxyRequest() {
|
|
264
|
+
proxyDemand.proxyRequests++;
|
|
265
|
+
}
|
|
266
|
+
var PROXY_VARIANT_CONFIG = {
|
|
267
|
+
h264: { extension: ".mp4", contentType: "video/mp4" },
|
|
268
|
+
vp8: { extension: ".webm", contentType: "video/webm" }
|
|
269
|
+
};
|
|
270
|
+
function isProxyVariant(value) {
|
|
271
|
+
return Object.hasOwn(PROXY_VARIANT_CONFIG, value);
|
|
272
|
+
}
|
|
273
|
+
function isProxyVariantRequest(value) {
|
|
274
|
+
return value === "auto" || isProxyVariant(value);
|
|
275
|
+
}
|
|
276
|
+
function proxyVariantFor(facts) {
|
|
277
|
+
return facts.hasAlpha ? "vp8" : "h264";
|
|
278
|
+
}
|
|
279
|
+
function resolveProxyVariantRequest(request, facts) {
|
|
280
|
+
const expected = proxyVariantFor(facts);
|
|
281
|
+
return request === "auto" || request === expected ? expected : null;
|
|
282
|
+
}
|
|
283
|
+
function decideMediaProxyEligibility(facts) {
|
|
284
|
+
if (!facts) return { eligible: false, reason: "unknown_codec" };
|
|
285
|
+
if (!facts.browserHostile) return { eligible: false, reason: "browser_safe_codec" };
|
|
286
|
+
return { eligible: true };
|
|
287
|
+
}
|
|
288
|
+
function codecFactsFor(codecName, hasAlpha) {
|
|
289
|
+
const hostile = hostileCodecEntry(codecName);
|
|
290
|
+
return {
|
|
291
|
+
codecName,
|
|
292
|
+
browserHostile: hostile !== void 0,
|
|
293
|
+
representativeMime: hostile?.representativeMime ?? null,
|
|
294
|
+
hasAlpha
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
async function probeCodecFacts(filePath, runner) {
|
|
298
|
+
const metadata = runner ? await probeMediaMetadata(filePath, runner) : await probeMediaMetadata(filePath);
|
|
299
|
+
if (metadata.probeError) return void 0;
|
|
300
|
+
if (metadata.kind !== "video") return null;
|
|
301
|
+
const codecName = metadata.color.codecName;
|
|
302
|
+
if (!codecName) return null;
|
|
303
|
+
return codecFactsFor(codecName, pixelFormatHasAlpha(metadata.color.pixelFormat));
|
|
304
|
+
}
|
|
305
|
+
function createMediaCodecProbeCache() {
|
|
306
|
+
return /* @__PURE__ */ new Map();
|
|
307
|
+
}
|
|
308
|
+
var defaultProbeCache = /* @__PURE__ */ new Map();
|
|
309
|
+
var MAX_PROBE_CACHE_ENTRIES = 512;
|
|
310
|
+
function rememberProbeResult(cache, filePath, result) {
|
|
311
|
+
if (!cache.has(filePath) && cache.size >= MAX_PROBE_CACHE_ENTRIES) {
|
|
312
|
+
const oldest = cache.keys().next().value;
|
|
313
|
+
if (oldest) cache.delete(oldest);
|
|
314
|
+
}
|
|
315
|
+
cache.delete(filePath);
|
|
316
|
+
cache.set(filePath, result);
|
|
317
|
+
}
|
|
318
|
+
async function probeAssetCodec(filePath, runner, cache = defaultProbeCache) {
|
|
319
|
+
let stat;
|
|
320
|
+
let target;
|
|
321
|
+
try {
|
|
322
|
+
stat = statSync(filePath);
|
|
323
|
+
target = realpath(filePath);
|
|
324
|
+
} catch {
|
|
325
|
+
return null;
|
|
326
|
+
}
|
|
327
|
+
const cached = cache.get(filePath);
|
|
328
|
+
if (cached && cached.target === target && cached.mtimeMs === stat.mtimeMs && cached.size === stat.size) {
|
|
329
|
+
rememberProbeResult(cache, filePath, cached);
|
|
330
|
+
return cached.facts;
|
|
331
|
+
}
|
|
332
|
+
const facts = await probeCodecFacts(filePath, runner);
|
|
333
|
+
if (facts === void 0) return null;
|
|
334
|
+
rememberProbeResult(cache, filePath, { target, mtimeMs: stat.mtimeMs, size: stat.size, facts });
|
|
335
|
+
return facts;
|
|
336
|
+
}
|
|
337
|
+
var VIDEO_SRC_RE = /<video\b[^>]*\bsrc\s*=\s*["']([^"']+)["'][^>]*>/gi;
|
|
338
|
+
function resolveExistingLocalAsset(projectDir, url) {
|
|
339
|
+
const projectRoot = resolve(projectDir);
|
|
340
|
+
const resolvedPath = resolveLocalAssetCandidates(projectRoot, url).find(
|
|
341
|
+
(candidate) => existsSync(candidate)
|
|
342
|
+
);
|
|
343
|
+
if (!resolvedPath) return null;
|
|
344
|
+
const rootRelative = relative2(projectRoot, resolvedPath).split(sep2).join("/");
|
|
345
|
+
return { resolvedPath, rootRelativePathname: `/${rootRelative}` };
|
|
346
|
+
}
|
|
347
|
+
function collectLocalVideoAssets(projectDir, htmlSources) {
|
|
348
|
+
const candidates = /* @__PURE__ */ new Map();
|
|
349
|
+
for (const { html, compSrcPath } of htmlSources) {
|
|
350
|
+
const scannable = maskNonScannableRanges(html);
|
|
351
|
+
const re = new RegExp(VIDEO_SRC_RE.source, VIDEO_SRC_RE.flags);
|
|
352
|
+
let match;
|
|
353
|
+
while ((match = re.exec(scannable)) !== null) {
|
|
354
|
+
const rawSrc = match[1] ?? "";
|
|
355
|
+
if (isUnresolvedAssetPlaceholder(rawSrc)) continue;
|
|
356
|
+
const src = cleanAssetUrl(rawSrc);
|
|
357
|
+
if (!src || isRemoteOrInlineUrl(src)) continue;
|
|
358
|
+
const rootRelativeSrc = compSrcPath ? rewriteAssetPath(compSrcPath, src) : src;
|
|
359
|
+
const resolved = resolveExistingLocalAsset(projectDir, rootRelativeSrc);
|
|
360
|
+
if (!resolved) continue;
|
|
361
|
+
candidates.set(resolved.resolvedPath, resolved.rootRelativePathname);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return candidates;
|
|
365
|
+
}
|
|
366
|
+
var PROBE_CONCURRENCY = 8;
|
|
367
|
+
async function scanProjectMediaCodecMap(projectDir, htmlSources, options = {}) {
|
|
368
|
+
const candidates = collectLocalVideoAssets(projectDir, htmlSources);
|
|
369
|
+
if (candidates.size === 0) return {};
|
|
370
|
+
const cache = options.cache ?? defaultProbeCache;
|
|
371
|
+
const entries = [...candidates.entries()];
|
|
372
|
+
const facts = new Array(entries.length).fill(null);
|
|
373
|
+
let nextIndex = 0;
|
|
374
|
+
const workerCount = Math.min(PROBE_CONCURRENCY, entries.length);
|
|
375
|
+
await Promise.all(
|
|
376
|
+
Array.from({ length: workerCount }, async () => {
|
|
377
|
+
while (nextIndex < entries.length) {
|
|
378
|
+
const index = nextIndex++;
|
|
379
|
+
const entry = entries[index];
|
|
380
|
+
if (!entry) break;
|
|
381
|
+
facts[index] = await probeAssetCodec(entry[0], options.runner, cache);
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
);
|
|
385
|
+
const map = {};
|
|
386
|
+
entries.forEach(([, pathname], index) => {
|
|
387
|
+
const entryFacts = facts[index];
|
|
388
|
+
if (entryFacts?.browserHostile) map[pathname] = entryFacts;
|
|
389
|
+
});
|
|
390
|
+
return map;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// ../studio-server/dist/chunk-YOBWV2CY.js
|
|
394
|
+
import { spawn } from "child_process";
|
|
395
|
+
import { createHash, randomUUID } from "crypto";
|
|
396
|
+
import { existsSync as existsSync2, renameSync, statSync as statSync2, unlinkSync as unlinkSync2, utimesSync } from "fs";
|
|
397
|
+
import { basename as basename2, dirname as dirname2, isAbsolute as isAbsolute2, join as join2, relative as relative3, resolve as resolve2, sep as sep3 } from "path";
|
|
398
|
+
import { existsSync as existsSync3, readdirSync as readdirSync2, statSync as statSync3, unlinkSync } from "fs";
|
|
399
|
+
import { extname as extname2, join as join3 } from "path";
|
|
400
|
+
var DEFAULT_MAX_BYTES = 10 * 1024 * 1024 * 1024;
|
|
401
|
+
var DEFAULT_STALE_TEMP_MS = 60 * 60 * 1e3;
|
|
402
|
+
var DEFAULT_MIN_SWEEP_INTERVAL_MS = 5 * 60 * 1e3;
|
|
403
|
+
var PROXY_EXTENSIONS = new Set(
|
|
404
|
+
Object.values(PROXY_VARIANT_CONFIG).map(({ extension }) => extension)
|
|
405
|
+
);
|
|
406
|
+
var TRANSCODER_PROXY_NAME = /^[0-9a-f]{64}\.\w+$/;
|
|
407
|
+
var TRANSCODER_TEMP_NAME = /^\.tmp-[0-9a-f-]{36}-[0-9a-f]{64}\.\w+$/;
|
|
408
|
+
var lastSweepAt = /* @__PURE__ */ new Map();
|
|
409
|
+
function positiveEnvNumber(name, fallback) {
|
|
410
|
+
const parsed = Number(process.env[name]);
|
|
411
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
412
|
+
}
|
|
413
|
+
function proxyCacheCleanupDefaults() {
|
|
414
|
+
return {
|
|
415
|
+
maxBytes: positiveEnvNumber("HYPERFRAMES_PROXY_CACHE_MAX_BYTES", DEFAULT_MAX_BYTES),
|
|
416
|
+
maxIdleMs: positiveEnvNumber("HYPERFRAMES_PROXY_CACHE_MAX_IDLE_DAYS", 30) * 24 * 60 * 60 * 1e3,
|
|
417
|
+
staleTempMs: positiveEnvNumber("HYPERFRAMES_PROXY_CACHE_STALE_TEMP_MS", DEFAULT_STALE_TEMP_MS),
|
|
418
|
+
minSweepIntervalMs: positiveEnvNumber(
|
|
419
|
+
"HYPERFRAMES_PROXY_CACHE_SWEEP_INTERVAL_MS",
|
|
420
|
+
DEFAULT_MIN_SWEEP_INTERVAL_MS
|
|
421
|
+
)
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
function shouldSkipSweep(cacheDir, now, minSweepIntervalMs) {
|
|
425
|
+
const previousSweep = lastSweepAt.get(cacheDir);
|
|
426
|
+
if (previousSweep !== void 0 && now - previousSweep < minSweepIntervalMs) return true;
|
|
427
|
+
lastSweepAt.set(cacheDir, now);
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
function readCacheInventory(cacheDir, protectedPaths, now, staleTempMs) {
|
|
431
|
+
const entries = [];
|
|
432
|
+
const staleTemps = [];
|
|
433
|
+
for (const dirent of readdirSync2(cacheDir, { withFileTypes: true })) {
|
|
434
|
+
if (!dirent.isFile()) continue;
|
|
435
|
+
const path = join3(cacheDir, dirent.name);
|
|
436
|
+
const stat = statSync3(path);
|
|
437
|
+
const entry = {
|
|
438
|
+
path,
|
|
439
|
+
size: stat.size,
|
|
440
|
+
modifiedAt: stat.mtimeMs,
|
|
441
|
+
protected: protectedPaths.has(path)
|
|
442
|
+
};
|
|
443
|
+
if (TRANSCODER_TEMP_NAME.test(dirent.name)) {
|
|
444
|
+
if (now - stat.mtimeMs >= staleTempMs) staleTemps.push(entry);
|
|
445
|
+
} else if (TRANSCODER_PROXY_NAME.test(dirent.name) && PROXY_EXTENSIONS.has(extname2(dirent.name))) {
|
|
446
|
+
entries.push(entry);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
const oldestFirst = (a, b) => a.modifiedAt - b.modifiedAt || a.path.localeCompare(b.path);
|
|
450
|
+
entries.sort(oldestFirst);
|
|
451
|
+
staleTemps.sort(oldestFirst);
|
|
452
|
+
return { entries, staleTemps };
|
|
453
|
+
}
|
|
454
|
+
function evictCacheEntries(entries, staleTemps, now, maxIdleMs, maxBytes, dryRun) {
|
|
455
|
+
const bytesBefore = entries.reduce((total, entry) => total + entry.size, 0);
|
|
456
|
+
let bytesAfter = bytesBefore;
|
|
457
|
+
const removed = [];
|
|
458
|
+
const remove = (entry, countsTowardBudget) => {
|
|
459
|
+
if (!dryRun) unlinkSync(entry.path);
|
|
460
|
+
removed.push(entry.path);
|
|
461
|
+
if (countsTowardBudget) bytesAfter -= entry.size;
|
|
462
|
+
};
|
|
463
|
+
for (const entry of staleTemps) remove(entry, false);
|
|
464
|
+
const kept = [];
|
|
465
|
+
for (const entry of entries) {
|
|
466
|
+
if (!entry.protected && now - entry.modifiedAt >= maxIdleMs) remove(entry, true);
|
|
467
|
+
else kept.push(entry);
|
|
468
|
+
}
|
|
469
|
+
for (const entry of kept) {
|
|
470
|
+
if (bytesAfter <= maxBytes) break;
|
|
471
|
+
if (!entry.protected && existsSync3(entry.path)) remove(entry, true);
|
|
472
|
+
}
|
|
473
|
+
return { removed, bytesBefore, bytesAfter };
|
|
474
|
+
}
|
|
475
|
+
function cleanupProxyCache(cacheDir, options = {}) {
|
|
476
|
+
const defaults = proxyCacheCleanupDefaults();
|
|
477
|
+
const now = options.now ?? Date.now();
|
|
478
|
+
const minSweepIntervalMs = options.minSweepIntervalMs ?? defaults.minSweepIntervalMs;
|
|
479
|
+
if (shouldSkipSweep(cacheDir, now, minSweepIntervalMs)) {
|
|
480
|
+
return { removed: [], bytesBefore: 0, bytesAfter: 0, skipped: true };
|
|
481
|
+
}
|
|
482
|
+
if (!existsSync3(cacheDir)) {
|
|
483
|
+
return { removed: [], bytesBefore: 0, bytesAfter: 0, skipped: false };
|
|
484
|
+
}
|
|
485
|
+
const maxBytes = options.maxBytes ?? defaults.maxBytes;
|
|
486
|
+
const maxIdleMs = options.maxIdleMs ?? defaults.maxIdleMs;
|
|
487
|
+
const staleTempMs = options.staleTempMs ?? defaults.staleTempMs;
|
|
488
|
+
const protectedPaths = options.protectedPaths ?? /* @__PURE__ */ new Set();
|
|
489
|
+
const { entries, staleTemps } = readCacheInventory(cacheDir, protectedPaths, now, staleTempMs);
|
|
490
|
+
return {
|
|
491
|
+
...evictCacheEntries(entries, staleTemps, now, maxIdleMs, maxBytes, options.dryRun ?? false),
|
|
492
|
+
skipped: false
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
var PROXY_PARAMS_VERSION = "v5";
|
|
496
|
+
var CACHE_DIR_NAME = ".transcode-cache";
|
|
497
|
+
function boundedEnvInteger(name, fallback, min, max) {
|
|
498
|
+
const raw = process.env[name]?.trim();
|
|
499
|
+
if (!raw) return fallback;
|
|
500
|
+
const parsed = Number(raw);
|
|
501
|
+
return Number.isSafeInteger(parsed) && parsed >= min && parsed <= max ? parsed : fallback;
|
|
502
|
+
}
|
|
503
|
+
var MAX_CONCURRENT_TRANSCODES = boundedEnvInteger("HYPERFRAMES_PROXY_MAX_CONCURRENCY", 2, 1, 16);
|
|
504
|
+
var MAX_QUEUED_TRANSCODES = boundedEnvInteger("HYPERFRAMES_PROXY_MAX_QUEUE", 8, 0, 256);
|
|
505
|
+
var STDERR_TAIL_MAX_CHARS = 4e3;
|
|
506
|
+
var TRANSCODE_TIMEOUT_MS = 15 * 60 * 1e3;
|
|
507
|
+
var FAILURE_CACHE_TTL_MS = 60 * 1e3;
|
|
508
|
+
var PROXY_PENDING_RETRY_AFTER_SECONDS = 2;
|
|
509
|
+
var ENVIRONMENT_FAILURE_TTL_MS = 5 * PROXY_PENDING_RETRY_AFTER_SECONDS * 1e3;
|
|
510
|
+
var MAX_FAILURE_CACHE_ENTRIES = 128;
|
|
511
|
+
var DEFAULT_PROXY_WAIT_TIMEOUT_MS = 2 * 60 * 1e3;
|
|
512
|
+
var ProxyTranscodeError = class extends Error {
|
|
513
|
+
exitCode;
|
|
514
|
+
stderrTail;
|
|
515
|
+
constructor(message, exitCode, stderrTail) {
|
|
516
|
+
super(message);
|
|
517
|
+
this.name = "ProxyTranscodeError";
|
|
518
|
+
this.exitCode = exitCode;
|
|
519
|
+
this.stderrTail = stderrTail;
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
var FfmpegUnavailableError = class extends ProxyTranscodeError {
|
|
523
|
+
constructor() {
|
|
524
|
+
super("ffmpeg binary not found", null, "");
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
var FfmpegMissingFilterError = class extends ProxyTranscodeError {
|
|
528
|
+
constructor() {
|
|
529
|
+
super(
|
|
530
|
+
"HDR proxying requires ffmpeg zscale/tonemap filters (libzimg); install an ffmpeg build with libzimg support",
|
|
531
|
+
null,
|
|
532
|
+
""
|
|
533
|
+
);
|
|
534
|
+
this.name = "FfmpegMissingFilterError";
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
var ProxyCapacityError = class extends ProxyTranscodeError {
|
|
538
|
+
constructor() {
|
|
539
|
+
super("media proxy queue is full; retry shortly", null, "");
|
|
540
|
+
this.name = "ProxyCapacityError";
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
var ProxySourceOutsideProjectError = class extends ProxyTranscodeError {
|
|
544
|
+
constructor() {
|
|
545
|
+
super("media proxy source must be addressed through the project", null, "");
|
|
546
|
+
this.name = "ProxySourceOutsideProjectError";
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var ProxyWaitTimeoutError = class extends ProxyTranscodeError {
|
|
550
|
+
constructor(timeoutMs) {
|
|
551
|
+
super(`media proxy did not become ready within ${timeoutMs}ms`, null, "");
|
|
552
|
+
this.name = "ProxyWaitTimeoutError";
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
async function waitForProxy(promise, timeoutMs = DEFAULT_PROXY_WAIT_TIMEOUT_MS) {
|
|
556
|
+
let timer;
|
|
557
|
+
try {
|
|
558
|
+
return await Promise.race([
|
|
559
|
+
promise,
|
|
560
|
+
new Promise((_resolve, reject) => {
|
|
561
|
+
timer = setTimeout(() => reject(new ProxyWaitTimeoutError(timeoutMs)), timeoutMs);
|
|
562
|
+
timer.unref();
|
|
563
|
+
})
|
|
564
|
+
]);
|
|
565
|
+
} finally {
|
|
566
|
+
if (timer) clearTimeout(timer);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function canonicalizeProxySource(projectDir, absoluteSourcePath) {
|
|
570
|
+
const requestedProjectDir = resolve2(projectDir);
|
|
571
|
+
const requestedSourcePath = resolve2(absoluteSourcePath);
|
|
572
|
+
const requestedRelativePath = relative3(requestedProjectDir, requestedSourcePath);
|
|
573
|
+
if (requestedRelativePath === ".." || requestedRelativePath.startsWith(`..${sep3}`) || isAbsolute2(requestedRelativePath)) {
|
|
574
|
+
throw new ProxySourceOutsideProjectError();
|
|
575
|
+
}
|
|
576
|
+
const canonicalProjectDir = realProjectRoot(projectDir);
|
|
577
|
+
const canonicalSourcePath = realpath(absoluteSourcePath);
|
|
578
|
+
const canonicalRelativePath = relative3(canonicalProjectDir, canonicalSourcePath);
|
|
579
|
+
const sourceIsInsideCanonicalProject = canonicalRelativePath !== ".." && !canonicalRelativePath.startsWith(`..${sep3}`) && !isAbsolute2(canonicalRelativePath);
|
|
580
|
+
return {
|
|
581
|
+
projectDir: canonicalProjectDir,
|
|
582
|
+
sourcePath: canonicalSourcePath,
|
|
583
|
+
relativePath: requestedRelativePath.normalize("NFC"),
|
|
584
|
+
// An external target needs a stable identity in addition to its project-local
|
|
585
|
+
// symlink path, otherwise retargeting the link can reuse an unrelated proxy.
|
|
586
|
+
cacheIdentity: (sourceIsInsideCanonicalProject ? canonicalRelativePath : canonicalSourcePath).normalize("NFC")
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function buildProxyCacheKey(source, variant) {
|
|
590
|
+
const stat = statSync2(source.sourcePath);
|
|
591
|
+
return createHash("sha256").update(
|
|
592
|
+
`${source.relativePath}\0${source.cacheIdentity}\0${stat.mtimeMs}\0${stat.size}\0${PROXY_PARAMS_VERSION}\0${variant}`
|
|
593
|
+
).digest("hex");
|
|
594
|
+
}
|
|
595
|
+
function getCanonicalProxyCachePath(source, variant) {
|
|
596
|
+
const key = buildProxyCacheKey(source, variant);
|
|
597
|
+
return join2(
|
|
598
|
+
source.projectDir,
|
|
599
|
+
CACHE_DIR_NAME,
|
|
600
|
+
`${key}${PROXY_VARIANT_CONFIG[variant].extension}`
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
var activeTranscodes = 0;
|
|
604
|
+
var waitQueue = [];
|
|
605
|
+
function acquireSlot() {
|
|
606
|
+
return new Promise((resolveSlot, reject) => {
|
|
607
|
+
const tryAcquire = () => {
|
|
608
|
+
if (activeTranscodes < MAX_CONCURRENT_TRANSCODES) {
|
|
609
|
+
activeTranscodes++;
|
|
610
|
+
resolveSlot();
|
|
611
|
+
} else {
|
|
612
|
+
if (waitQueue.length >= MAX_QUEUED_TRANSCODES) {
|
|
613
|
+
reject(new ProxyCapacityError());
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
waitQueue.push(tryAcquire);
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
tryAcquire();
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
function releaseSlot() {
|
|
623
|
+
activeTranscodes--;
|
|
624
|
+
const next = waitQueue.shift();
|
|
625
|
+
if (next) next();
|
|
626
|
+
}
|
|
627
|
+
var inFlight = /* @__PURE__ */ new Map();
|
|
628
|
+
function maintainProxyCache(cacheDir) {
|
|
629
|
+
try {
|
|
630
|
+
cleanupProxyCache(cacheDir, { protectedPaths: new Set(inFlight.keys()) });
|
|
631
|
+
} catch (error) {
|
|
632
|
+
console.warn(
|
|
633
|
+
`[media-proxy] cache cleanup failed: ${error instanceof Error ? error.message : String(error)}`
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
function markCacheEntryUsed(cachePath) {
|
|
638
|
+
try {
|
|
639
|
+
const now = /* @__PURE__ */ new Date();
|
|
640
|
+
utimesSync(cachePath, now, now);
|
|
641
|
+
} catch {
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
var failedTranscodes = /* @__PURE__ */ new Map();
|
|
645
|
+
var hdrFilterCheck;
|
|
646
|
+
function ensureHdrFilters(ffmpegPath) {
|
|
647
|
+
if (hdrFilterCheck?.ffmpegPath === ffmpegPath) return hdrFilterCheck.promise;
|
|
648
|
+
const promise = new Promise((resolveCheck, rejectCheck) => {
|
|
649
|
+
const proc = spawn(ffmpegPath, ["-hide_banner", "-filters"], {
|
|
650
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
651
|
+
windowsHide: true
|
|
652
|
+
});
|
|
653
|
+
let stdout = "";
|
|
654
|
+
proc.stdout?.on("data", (chunk) => {
|
|
655
|
+
stdout += chunk.toString();
|
|
656
|
+
});
|
|
657
|
+
proc.on("error", () => rejectCheck(new FfmpegMissingFilterError()));
|
|
658
|
+
proc.on("close", (code) => {
|
|
659
|
+
if (code !== 0 || !/\bzscale\b/.test(stdout) || !/\btonemap\b/.test(stdout)) {
|
|
660
|
+
rejectCheck(new FfmpegMissingFilterError());
|
|
661
|
+
} else {
|
|
662
|
+
resolveCheck();
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
hdrFilterCheck = { ffmpegPath, promise };
|
|
667
|
+
return promise;
|
|
668
|
+
}
|
|
669
|
+
function rememberFailure(cachePath, error) {
|
|
670
|
+
const ttlMs = error instanceof FfmpegUnavailableError || error instanceof FfmpegMissingFilterError ? ENVIRONMENT_FAILURE_TTL_MS : FAILURE_CACHE_TTL_MS;
|
|
671
|
+
failedTranscodes.delete(cachePath);
|
|
672
|
+
failedTranscodes.set(cachePath, { error, expiresAt: Date.now() + ttlMs });
|
|
673
|
+
while (failedTranscodes.size > MAX_FAILURE_CACHE_ENTRIES) {
|
|
674
|
+
const oldest = failedTranscodes.keys().next().value;
|
|
675
|
+
if (oldest === void 0) break;
|
|
676
|
+
failedTranscodes.delete(oldest);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
async function runFfmpeg(sourcePath, outputPath, variant) {
|
|
680
|
+
const metadata = await probeMediaMetadata(sourcePath);
|
|
681
|
+
const ffmpegPath = findFfBinary("ffmpeg", { configuredMustExist: true });
|
|
682
|
+
if (!ffmpegPath) {
|
|
683
|
+
throw new FfmpegUnavailableError();
|
|
684
|
+
}
|
|
685
|
+
const keepsAlpha = variant === "vp8";
|
|
686
|
+
const { hdrTransfer } = metadata.color;
|
|
687
|
+
const toneMap = (hdrTransfer === "pq" || hdrTransfer === "hlg") && !keepsAlpha;
|
|
688
|
+
if (toneMap) await ensureHdrFilters(ffmpegPath);
|
|
689
|
+
const firstFrame = toneMap ? await probeFirstFrameColour(sourcePath) : {};
|
|
690
|
+
const evenScale = "scale=trunc(iw/2)*2:trunc(ih/2)*2";
|
|
691
|
+
const pixelFormat = keepsAlpha ? "yuva420p" : "yuv420p";
|
|
692
|
+
const videoFilter = toneMap ? [
|
|
693
|
+
hdrToSdrToneMapFilter(metadata.color, firstFrame),
|
|
694
|
+
`${evenScale}:out_color_matrix=bt709:out_range=tv`,
|
|
695
|
+
`format=${pixelFormat}`
|
|
696
|
+
].join(",") : [evenScale, `format=${pixelFormat}`].join(",");
|
|
697
|
+
return new Promise((resolvePromise, reject) => {
|
|
698
|
+
const commonArgs = ["-y", "-i", sourcePath, "-vf", videoFilter];
|
|
699
|
+
const h264Args = [
|
|
700
|
+
"-c:v",
|
|
701
|
+
"libx264",
|
|
702
|
+
"-profile:v",
|
|
703
|
+
"high",
|
|
704
|
+
"-pix_fmt",
|
|
705
|
+
"yuv420p",
|
|
706
|
+
"-colorspace",
|
|
707
|
+
"bt709",
|
|
708
|
+
"-color_primaries",
|
|
709
|
+
"bt709",
|
|
710
|
+
"-color_trc",
|
|
711
|
+
"bt709",
|
|
712
|
+
"-crf",
|
|
713
|
+
"18",
|
|
714
|
+
"-preset",
|
|
715
|
+
"veryfast",
|
|
716
|
+
"-c:a",
|
|
717
|
+
"aac",
|
|
718
|
+
"-movflags",
|
|
719
|
+
"+faststart"
|
|
720
|
+
];
|
|
721
|
+
const vp8Args = [
|
|
722
|
+
"-c:v",
|
|
723
|
+
"libvpx",
|
|
724
|
+
"-b:v",
|
|
725
|
+
"0",
|
|
726
|
+
"-crf",
|
|
727
|
+
"23",
|
|
728
|
+
"-deadline",
|
|
729
|
+
"good",
|
|
730
|
+
"-pix_fmt",
|
|
731
|
+
"yuva420p",
|
|
732
|
+
"-colorspace",
|
|
733
|
+
"bt709",
|
|
734
|
+
"-color_primaries",
|
|
735
|
+
"bt709",
|
|
736
|
+
"-color_trc",
|
|
737
|
+
"bt709",
|
|
738
|
+
"-cpu-used",
|
|
739
|
+
"4",
|
|
740
|
+
"-auto-alt-ref",
|
|
741
|
+
"0",
|
|
742
|
+
"-metadata:s:v:0",
|
|
743
|
+
"alpha_mode=1",
|
|
744
|
+
"-ac",
|
|
745
|
+
"2",
|
|
746
|
+
"-c:a",
|
|
747
|
+
"libopus"
|
|
748
|
+
];
|
|
749
|
+
const args = [...commonArgs, ...variant === "vp8" ? vp8Args : h264Args, outputPath];
|
|
750
|
+
const proc = spawn(ffmpegPath, args, {
|
|
751
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
752
|
+
timeout: TRANSCODE_TIMEOUT_MS,
|
|
753
|
+
killSignal: "SIGKILL",
|
|
754
|
+
windowsHide: true
|
|
755
|
+
});
|
|
756
|
+
let stderrTail = "";
|
|
757
|
+
proc.stderr?.on("data", (chunk) => {
|
|
758
|
+
stderrTail = (stderrTail + chunk.toString()).slice(-STDERR_TAIL_MAX_CHARS);
|
|
759
|
+
});
|
|
760
|
+
proc.on("error", (err) => {
|
|
761
|
+
reject(new ProxyTranscodeError(`failed to spawn ffmpeg: ${err.message}`, null, stderrTail));
|
|
762
|
+
});
|
|
763
|
+
proc.on("close", (code, signal) => {
|
|
764
|
+
if (code === 0) {
|
|
765
|
+
resolvePromise();
|
|
766
|
+
} else if (signal) {
|
|
767
|
+
reject(
|
|
768
|
+
new ProxyTranscodeError(
|
|
769
|
+
`ffmpeg killed by ${signal} (timeout ${TRANSCODE_TIMEOUT_MS}ms or external kill)`,
|
|
770
|
+
null,
|
|
771
|
+
stderrTail
|
|
772
|
+
)
|
|
773
|
+
);
|
|
774
|
+
} else {
|
|
775
|
+
reject(new ProxyTranscodeError(`ffmpeg exited with code ${code}`, code, stderrTail));
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
async function transcodeToCache(projectDir, absoluteSourcePath, cachePath, variant) {
|
|
781
|
+
await acquireSlot();
|
|
782
|
+
try {
|
|
783
|
+
if (existsSync2(cachePath)) return cachePath;
|
|
784
|
+
const cacheDir = dirname2(cachePath);
|
|
785
|
+
mkdirWithinProject(projectDir, cacheDir);
|
|
786
|
+
const tempPath = join2(cacheDir, `.tmp-${randomUUID()}-${basename2(cachePath)}`);
|
|
787
|
+
try {
|
|
788
|
+
await runFfmpeg(absoluteSourcePath, tempPath, variant);
|
|
789
|
+
renameSync(tempPath, cachePath);
|
|
790
|
+
maintainProxyCache(cacheDir);
|
|
791
|
+
return cachePath;
|
|
792
|
+
} finally {
|
|
793
|
+
if (existsSync2(tempPath)) unlinkSync2(tempPath);
|
|
794
|
+
}
|
|
795
|
+
} finally {
|
|
796
|
+
releaseSlot();
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
var settledProxyCount = 0;
|
|
800
|
+
function proxyActivityMark(projectDir) {
|
|
801
|
+
if (!existsSync2(projectDir)) return String(settledProxyCount);
|
|
802
|
+
const cacheDir = join2(realpath(projectDir), CACHE_DIR_NAME) + sep3;
|
|
803
|
+
for (const cachePath of inFlight.keys()) if (cachePath.startsWith(cacheDir)) return null;
|
|
804
|
+
return String(settledProxyCount);
|
|
805
|
+
}
|
|
806
|
+
async function resolveProxy(projectDir, absoluteSourcePath, variant = "h264") {
|
|
807
|
+
const source = canonicalizeProxySource(projectDir, absoluteSourcePath);
|
|
808
|
+
const cachePath = getCanonicalProxyCachePath(source, variant);
|
|
809
|
+
if (existsSync2(cachePath)) {
|
|
810
|
+
markCacheEntryUsed(cachePath);
|
|
811
|
+
maintainProxyCache(dirname2(cachePath));
|
|
812
|
+
return cachePath;
|
|
813
|
+
}
|
|
814
|
+
const rememberedFailure = failedTranscodes.get(cachePath);
|
|
815
|
+
if (rememberedFailure) {
|
|
816
|
+
if (rememberedFailure.expiresAt > Date.now()) throw rememberedFailure.error;
|
|
817
|
+
failedTranscodes.delete(cachePath);
|
|
818
|
+
}
|
|
819
|
+
const existing = inFlight.get(cachePath);
|
|
820
|
+
if (existing) return existing;
|
|
821
|
+
const promise = transcodeToCache(source.projectDir, source.sourcePath, cachePath, variant).catch((err) => {
|
|
822
|
+
if (!(err instanceof ProxyCapacityError)) rememberFailure(cachePath, err);
|
|
823
|
+
throw err;
|
|
824
|
+
}).finally(() => {
|
|
825
|
+
inFlight.delete(cachePath);
|
|
826
|
+
settledProxyCount += 1;
|
|
827
|
+
});
|
|
828
|
+
inFlight.set(cachePath, promise);
|
|
829
|
+
return promise;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export {
|
|
833
|
+
realFilePath,
|
|
834
|
+
pinWithinProject,
|
|
835
|
+
isInHiddenOrVendorDir,
|
|
836
|
+
walkDir,
|
|
837
|
+
probeMediaMetadata,
|
|
838
|
+
shouldPrewarmProxy,
|
|
839
|
+
recordProxyPrewarm,
|
|
840
|
+
recordProxyRequest,
|
|
841
|
+
PROXY_VARIANT_CONFIG,
|
|
842
|
+
isProxyVariantRequest,
|
|
843
|
+
proxyVariantFor,
|
|
844
|
+
resolveProxyVariantRequest,
|
|
845
|
+
decideMediaProxyEligibility,
|
|
846
|
+
createMediaCodecProbeCache,
|
|
847
|
+
probeAssetCodec,
|
|
848
|
+
scanProjectMediaCodecMap,
|
|
849
|
+
cleanupProxyCache,
|
|
850
|
+
PROXY_PARAMS_VERSION,
|
|
851
|
+
CACHE_DIR_NAME,
|
|
852
|
+
TRANSCODE_TIMEOUT_MS,
|
|
853
|
+
PROXY_PENDING_RETRY_AFTER_SECONDS,
|
|
854
|
+
ProxyTranscodeError,
|
|
855
|
+
ProxyCapacityError,
|
|
856
|
+
ProxyWaitTimeoutError,
|
|
857
|
+
waitForProxy,
|
|
858
|
+
proxyActivityMark,
|
|
859
|
+
resolveProxy
|
|
860
|
+
};
|