hyperframes 0.8.185 → 0.8.186
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-ODTNPRGG.js → add-UGK7AZI6.js} +11 -11
- package/dist/{animatedGifPrep-PEP5GWOJ.js → animatedGifPrep-HPZPSB43.js} +5 -5
- package/dist/api.js +14 -14
- package/dist/{asset-EZG42XPA.js → asset-X2GTFWOY.js} +2 -2
- package/dist/{assetCataloger-OHAJFCA7.js → assetCataloger-5NWEG4IU.js} +5 -5
- package/dist/audio-7PBM5F3H.js +2317 -0
- package/dist/{auth-VP2SIZFN.js → auth-WABSMO46.js} +1 -1
- package/dist/{autoUpdate-RVSUX4SS.js → autoUpdate-6SCMLTSC.js} +2 -2
- package/dist/{backgroundChecks-LEHK74NS.js → backgroundChecks-XOGPAAR3.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-3X6CL7PK.js → batchRender-VR6IA77K.js} +3 -3
- package/dist/{beats-66VPQLSC.js → beats-3IWXLMSC.js} +5 -5
- package/dist/{benchmark-PBJVTOJP.js → benchmark-2SSYATCX.js} +8 -8
- package/dist/{browser-TPL5MWGC.js → browser-PMRN345D.js} +3 -3
- package/dist/{bundleWithLocalizedFonts-67MLTHKM.js → bundleWithLocalizedFonts-TT32MZBO.js} +2 -2
- package/dist/{capture-F3GNMRZM.js → capture-4VD6AKUJ.js} +8 -8
- package/dist/{capture-YYRE7EV3.js → capture-BDGYTE57.js} +2 -2
- package/dist/{captureCompositionFrame-PXV2ISHD.js → captureCompositionFrame-5FVLAETA.js} +13 -9
- package/dist/{catalog-6SDD3OHF.js → catalog-HUYZO5D7.js} +11 -11
- package/dist/{catch-up-CWIVA5VG.js → catch-up-SSGTR2ZT.js} +4 -4
- package/dist/{check-YQ6REK2S.js → check-JWUWHGM2.js} +29 -29
- package/dist/{checkBrowser-5XZCBRXM.js → checkBrowser-X7G6YNR7.js} +26 -26
- package/dist/{chunk-RUEGYANA.js → chunk-22QKQDEE.js} +10 -10
- package/dist/{chunk-IPDKZ5IN.js → chunk-27H2363S.js} +1 -1
- package/dist/{chunk-2TAS5O4P.js → chunk-2II34JPM.js} +108 -20
- package/dist/{chunk-KQ4JEJLF.js → chunk-2PZZMAME.js} +8 -7
- package/dist/{chunk-7RAY4WZP.js → chunk-3YHGQJI6.js} +3 -3
- package/dist/{chunk-BRAPBUPQ.js → chunk-4AFNEKU7.js} +1 -1
- package/dist/{chunk-CX3USX23.js → chunk-4NTW45W5.js} +3 -3
- package/dist/{chunk-K2ZKXTVL.js → chunk-4XFFJAWS.js} +1 -1
- package/dist/{chunk-6GPR3G3C.js → chunk-5ZMIVTHN.js} +1 -1
- package/dist/{chunk-TAX2ZJAP.js → chunk-5ZMXGNGC.js} +9 -9
- package/dist/{chunk-H5SM5PJI.js → chunk-6IOBAOU7.js} +1 -1
- package/dist/{chunk-WQLKDL35.js → chunk-77QM6YRQ.js} +1 -1
- package/dist/{chunk-SQVRXHOW.js → chunk-7AUMTARQ.js} +3 -3
- package/dist/{chunk-I3IH5MV5.js → chunk-7M7TMM4S.js} +77 -2
- package/dist/{chunk-37CNYTQQ.js → chunk-7MLFYMFB.js} +1 -1
- package/dist/{chunk-55YELV7B.js → chunk-7MVODWQF.js} +1 -1
- package/dist/{chunk-X6L6MD5B.js → chunk-ACLABKEF.js} +6 -6
- package/dist/{chunk-Q47FAYYK.js → chunk-BRTDLVK3.js} +1 -1
- package/dist/{chunk-OAG47RE6.js → chunk-DQZMJS2P.js} +1 -1
- package/dist/{chunk-G2UANIDX.js → chunk-DTXDQ6OP.js} +1 -1
- package/dist/{chunk-I45HL3VP.js → chunk-EZINX6HH.js} +2 -2
- package/dist/{chunk-IVEFOUZI.js → chunk-FCWFV4P7.js} +36 -12
- package/dist/{chunk-ISTRDGIX.js → chunk-FRLTKTOR.js} +1 -1
- package/dist/{chunk-6RIZY7OP.js → chunk-GTMBII7X.js} +1 -1
- package/dist/{chunk-FX6RUJUY.js → chunk-HOFX63F2.js} +3 -3
- package/dist/{chunk-5GUKZRQN.js → chunk-HZ7M2MZA.js} +1 -1
- package/dist/{chunk-HXUTX5GR.js → chunk-ID5AJ4L3.js} +2 -2
- package/dist/{chunk-PHMBMOXF.js → chunk-K6KBOORN.js} +48 -4
- package/dist/{chunk-F3OPUWQX.js → chunk-KNLSYCI5.js} +7 -7
- package/dist/{chunk-I7QMXZSB.js → chunk-LDW3KVGK.js} +2 -2
- package/dist/{chunk-5UDRPPN2.js → chunk-MY6CVBDD.js} +7 -4
- package/dist/{chunk-XWC7CNPY.js → chunk-NPDPDEPP.js} +1 -1
- package/dist/{chunk-7PS6RVWD.js → chunk-PEIV2SOG.js} +1 -1
- package/dist/{chunk-H6UY725W.js → chunk-R6IGQ5NO.js} +2 -2
- package/dist/{chunk-A6QCO474.js → chunk-RFJ6SX4U.js} +5 -5
- package/dist/{chunk-KROXPHXX.js → chunk-RNZEQTWZ.js} +2 -8
- package/dist/{chunk-6ASIXMFP.js → chunk-ROWEDRVX.js} +1 -1
- package/dist/{chunk-HDIRZGK4.js → chunk-RPUIMFHF.js} +1 -1
- package/dist/{chunk-EMSDWBG3.js → chunk-RVZNSKRH.js} +2 -2
- package/dist/{chunk-IDGLGXPA.js → chunk-T4RP55P2.js} +1 -1
- package/dist/{chunk-EMAWIZ54.js → chunk-TH7J3JZ5.js} +57 -20
- package/dist/{chunk-VHZ6DL3M.js → chunk-TMK4Q7JA.js} +10 -7
- package/dist/{chunk-UPR3MU6Z.js → chunk-TQ2RRB5V.js} +1 -1
- package/dist/{chunk-IDFNKFPL.js → chunk-U4BMRIE6.js} +16 -7
- package/dist/{chunk-HHSJJFVM.js → chunk-U7QTMRLW.js} +2 -2
- package/dist/{chunk-TOI35GN2.js → chunk-UAJCTEK2.js} +1 -1
- package/dist/{chunk-ESBMUZXZ.js → chunk-UJZT6HNN.js} +1 -1
- package/dist/chunk-UOZX5W5T.js +3852 -0
- package/dist/{chunk-FFJ5TDRD.js → chunk-VHBBV5DH.js} +10 -3
- package/dist/{chunk-SKYPMHQC.js → chunk-WHMFW5ET.js} +2 -2
- package/dist/{chunk-LYKSTRAY.js → chunk-WLHNIIXU.js} +3 -3
- package/dist/{chunk-RTBSA3EA.js → chunk-Y2M6XSNK.js} +1 -1
- package/dist/{chunk-4CTNDBE3.js → chunk-YNH6ERDL.js} +2 -2
- package/dist/{chunk-D42NU3DZ.js → chunk-YQICCAVA.js} +1 -1
- package/dist/{chunk-PMMQRJDE.js → chunk-YRAJDFIN.js} +1 -1
- package/dist/{chunk-BH7TTIPN.js → chunk-Z5233OAN.js} +4 -4
- package/dist/{chunk-K73RJB23.js → chunk-ZKBW7NU2.js} +2 -2
- package/dist/{chunk-J5XEZ24I.js → chunk-ZVBEGBII.js} +3 -3
- package/dist/{clean-7J6ZCCGV.js → clean-IM2JIAUT.js} +13 -13
- package/dist/cli.js +53 -53
- package/dist/{cloud-7IJCJCDD.js → cloud-6IPBCJSX.js} +4 -4
- package/dist/{cloudrun-UNZRIIDB.js → cloudrun-MWZ6S2I2.js} +4 -4
- package/dist/{compare-Q7VW5JZT.js → compare-WD7A2TV5.js} +23 -23
- package/dist/{compiler-KPHYGFXL.js → compiler-2EKSMC3I.js} +2 -2
- package/dist/{component-UUBREJKN.js → component-JKALWH36.js} +3 -3
- package/dist/{compositions-T4FTKIDP.js → compositions-643NAG4A.js} +9 -9
- package/dist/{delete-WZQF2IIA.js → delete-EASPXKHQ.js} +2 -2
- package/dist/{deploy-JU7A3XNC.js → deploy-CDKCQ5MX.js} +1 -1
- package/dist/{dist-ULGTPSU4.js → dist-F6FOKRSU.js} +6 -4
- package/dist/{doctor-VSNGRKXJ.js → doctor-7XUVYDJQ.js} +9 -9
- package/dist/{events-CRW2DYUT.js → events-5TTPYBKG.js} +2 -2
- package/dist/{events-E63YBUL2.js → events-TULV6D3G.js} +3 -3
- package/dist/{feedback-OSZWVR6N.js → feedback-4FTPWM6P.js} +6 -6
- package/dist/{ffmpeg-JLH3Z7G7.js → ffmpeg-MP7ZVYLZ.js} +5 -5
- package/dist/{figma-2BQNNR53.js → figma-B7LFWYKO.js} +3 -3
- package/dist/fontLocalizeCli.js +7 -7
- package/dist/{get-P2XI53QW.js → get-F7W4AQ2V.js} +2 -2
- package/dist/{gpuPolicy-NTKQJY75.js → gpuPolicy-NSNVDFXC.js} +5 -5
- package/dist/{grade-compare-OYASIHIB.js → grade-compare-6QXDTLS2.js} +24 -24
- package/dist/{help-HK6K2N4G.js → help-RJAA4O74.js} +1 -1
- package/dist/{history-JMTYKLXW.js → history-OOQBDVV5.js} +6 -6
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +65 -65
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-AW7CIVRE.js → info-5OGGYYLO.js} +7 -7
- package/dist/{init-6KIDG4LB.js → init-DM3TJKW2.js} +63 -45
- package/dist/{inspect-B7BLYMRZ.js → inspect-FECQCLS5.js} +24 -24
- package/dist/{installer-ZP2LQZUQ.js → installer-WOG4VORV.js} +4 -4
- package/dist/{keyframes-EQ36A5JE.js → keyframes-SZHWUF5Y.js} +6 -6
- package/dist/{lambda-E6VURLIS.js → lambda-JG2ZRGMC.js} +6 -6
- package/dist/{layout-XYC64QQQ.js → layout-7ACF7ZKC.js} +24 -24
- package/dist/{lint-V5DJYWBX.js → lint-ZCQGMILV.js} +6 -6
- package/dist/{list-RUGVRTVD.js → list-MH2X3Y2T.js} +2 -2
- package/dist/{login-ZTKGKXGS.js → login-CK46WX5U.js} +4 -4
- package/dist/{manager-JUP7PM6N.js → manager-GXTPNJVW.js} +6 -6
- package/dist/{media-treatment-VIUPK4OR.js → media-treatment-EH2AT34Z.js} +11 -11
- package/dist/{models-LJS2HBOZ.js → models-D5XP2UK6.js} +9 -9
- package/dist/{motionShot-3UAXZ7SN.js → motionShot-UR7D3SRQ.js} +12 -12
- package/dist/{normalize-4UDISLPL.js → normalize-3AYFSN2F.js} +1 -1
- package/dist/{normalize-audio-SBYI4YIH.js → normalize-audio-635JOR5W.js} +4 -4
- package/dist/{open-S27TUD3A.js → open-6WE5WFVM.js} +11 -11
- package/dist/{parakeetRunner-ETLMLJ4L.js → parakeetRunner-STHZPG32.js} +10 -10
- package/dist/{pipeline-I2M22M24.js → pipeline-LVEKRETU.js} +6 -6
- package/dist/{play-COJU6VJK.js → play-W6TDW4FE.js} +16 -16
- package/dist/{preflight-FZ24NCHH.js → preflight-LIMQXLR7.js} +6 -6
- package/dist/{present-YAHKLC5D.js → present-RX5QX6UR.js} +12 -12
- package/dist/{preview-KQOEU5YE.js → preview-KIWTWK63.js} +16 -16
- package/dist/{producer-DTNNG4T6.js → producer-TSNKSCUM.js} +1 -1
- package/dist/{projectConfig-4A76VYUP.js → projectConfig-NCP7JRH4.js} +6 -6
- package/dist/{publication-SQPMC2W3.js → publication-5W5UZWGC.js} +2 -2
- package/dist/{publish-QUEJBGGT.js → publish-7WR4XJ6I.js} +7 -7
- package/dist/{remove-background-FP2ETAQH.js → remove-background-43JGBRWQ.js} +7 -7
- package/dist/{render-BIFIL4U6.js → render-456HCO6O.js} +26 -26
- package/dist/{render-P664SMC7.js → render-7T44HIM6.js} +3 -3
- package/dist/{render-GQFXJWLV.js → render-WHMLYIOI.js} +13 -13
- package/dist/{render-batch-ZCPMYH6Z.js → render-batch-LURBJTBV.js} +3 -3
- package/dist/{resolver-BUC2GFZQ.js → resolver-MBIW4VC4.js} +4 -4
- package/dist/{sherpa-HFT6XEP6.js → sherpa-5J2AALED.js} +9 -9
- package/dist/{skills-3WEVO3NU.js → skills-UHOXOGGF.js} +5 -5
- package/dist/{skillsUpdateCheck-BFPWFOK5.js → skillsUpdateCheck-PDZIFUJE.js} +3 -3
- package/dist/{snapshot-WDQ6S7CJ.js → snapshot-PFV7ALLH.js} +33 -30
- package/dist/{src-RZ574OKP.js → src-DCVSEODX.js} +4 -4
- package/dist/{src-NPR2JZOJ.js → src-XK5YIR6L.js} +6 -6
- package/dist/{staticProjectServer-FTGTEZI4.js → staticProjectServer-4IE4G4JO.js} +12 -12
- package/dist/studio/assets/{hyperframes-player-CoOdf435.js → hyperframes-player-B_skzvYC.js} +1 -1
- package/dist/studio/assets/{index-CR85xg2x.js → index-CgLbvCUo.js} +1 -1
- package/dist/studio/assets/{index-C_6rTpaB.js → index-Dn5FAk2e.js} +99 -99
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-TAWB7B23.js → studio-api-JMWYU7KF.js} +6 -6
- package/dist/{studioServer-HRQGJTBU.js → studioServer-BWLSTGIG.js} +43 -42
- package/dist/{telemetry-QZ6HJF4W.js → telemetry-JCU3AV7W.js} +3 -3
- package/dist/{timeline-IKUEW42T.js → timeline-BCIFQYOM.js} +14 -14
- package/dist/{tokens-AUGUEWHS.js → tokens-7IXKALMQ.js} +2 -2
- package/dist/{transcribe-7734CG3N.js → transcribe-HW7HGJ4V.js} +15 -15
- package/dist/{transcribe-FWU6EMEO.js → transcribe-ZUQD3B32.js} +8 -8
- package/dist/{updateCheck-VIPQ3FPW.js → updateCheck-Z6LNEK7B.js} +2 -2
- package/dist/{upgrade-4VNDQTVO.js → upgrade-JYH72JGL.js} +2 -2
- package/dist/{urlDownloader-6CXL4CL7.js → urlDownloader-WKLFHSUH.js} +4 -4
- package/dist/{validate-QWCMVWID.js → validate-QCC27YYI.js} +18 -18
- package/dist/{video-245Q5WN4.js → video-EZ7ONY6L.js} +5 -5
- package/dist/warmCheck.js +31 -31
- package/package.json +1 -1
- package/dist/audio-65R4T74I.js +0 -1154
- package/dist/chunk-3NPOFC43.js +0 -3805
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var HyperframesPlayer=(()=>{var We=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ni=Object.prototype.hasOwnProperty;var ii=(t,e)=>{for(var n in e)We(t,n,{get:e[n],enumerable:!0})},ri=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ti(e))!ni.call(t,r)&&r!==n&&We(t,r,{get:()=>e[r],enumerable:!(i=ei(e,r))||i.enumerable});return t};var oi=t=>ri(We({},"__esModule",{value:!0}),t);var Jr={};ii(Jr,{HyperframesPlayer:()=>He,SPEED_PRESETS:()=>ut,formatSpeed:()=>se,formatTime:()=>Ce});var Ct=t=>t!==null&&Number.isFinite(t)&&t>0;function ve(t){let e=t.clipEndsSeconds.filter(i=>i===null).length;if(Ct(t.authoredDurationSeconds))return{seconds:t.authoredDurationSeconds,source:"authored",pendingClips:e};let n=t.clipEndsSeconds.filter(Ct);return n.length>0?{seconds:Math.max(...n),source:"derived",pendingClips:e}:{seconds:null,source:"unresolved",pendingClips:e,reason:e>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var ai="http://www.w3.org/1999/xhtml";function Dt(t){return t!=null&&t.nodeType===1}function Ge(t){return Dt(t)&&t.namespaceURI===ai}function Be(t,e){return Ge(t)&&t.localName===e}function si(t){return Be(t,"video")}function ui(t){return Be(t,"audio")}function M(t){return si(t)||ui(t)}function $e(t){return Be(t,"img")}function Ae(t){if(t==null||t.trim()==="")return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function Se(t=document){let e=t.querySelector('[data-composition-id][data-root="true"]');return Ge(e)?e:t.querySelector("[data-composition-id]")}var V=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),io=Object.freeze([V.start,V.duration,V.trackIndex]),ro=Object.freeze([V.derivedEnd]),oo=Object.freeze([V.derivedEnd,V.legacyTrack]);function ze(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Nt=t=>{let e=ze(t);return e!==null&&e>=0?e:null};function Pt(t){return Nt(t("data-playback-start"))??Nt(t("data-media-start"))??0}var K=.1,J=10;function je(t){return Number.isFinite(t)&&t>0?Math.max(K,Math.min(J,t)):1}function Lt(t,e=1){let n=Number.parseFloat(t("data-playback-rate")??"");return je(Number.isFinite(n)&&n>0?n:e)}function qe(t){let e=ze(t("data-duration"));return e!==null&&e>0?e:null}function Ot(t,e){let n=qe(t);if(n!==null)return n;let i=ze(t("data-end"));return i!==null?i-e:null}var li=3;function Ye(t,e,n){return Number.isFinite(t)?Math.max(0,t-e)/je(n):null}function Xe(t){let{tag:e,authoredDurationSeconds:n,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=t;if(n!==null&&n>0)return{seconds:n,source:"authored"};if(e==="img")return{seconds:li,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Ye(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var Vt="data-fx-chain",so=Vt.slice(5);var Z=(t="frequency",e="Frequency",n=1e3,i=20,r=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:i,max:r,step:1,default:n,scale:"log",automatable:!0}),Ke=(t=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),Ee=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Ft={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},Ut=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Ee(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[Z("frequency","Frequency",1e3),Ee(-40,40,0),Ke(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[Z("frequency","Frequency",200,20,2e3),Ee(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[Z("frequency","Frequency",4e3,500,2e4),Ee(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies: the usual fix for rumble on a voice.",params:[Z("frequency","Cutoff",300,20,2e4),Ke(.707),Ft],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[Z("frequency","Cutoff",8e3,100,2e4),Ke(.707),Ft],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Peak limiter that follows the signal's level. It has no lookahead, so a fast peak or an inter-sample peak can pass the ceiling; use the true-peak limiter for a delivery limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"truepeak",label:"True-peak limiter",group:"dynamics",description:"Lookahead limiter that holds a 4x estimate of the inter-sample peak at a dBTP ceiling; full-band noise can land up to about 1.7 dB above it. Adds lookahead plus about 0.3 ms of latency.",params:[{kind:"number",key:"ceiling",label:"Ceiling",unit:"dBTP",min:-24,max:0,step:.1,default:-1,hint:"Target true peak, measured on a 4x oversampled signal. Dense full-band sound can end up to about 1.7 dB above it."},{kind:"number",key:"lookahead",label:"Lookahead",unit:"ms",min:.5,max:10,step:.1,default:3,hint:"How far ahead the gain starts falling. Longer is smoother and adds the same latency."},{kind:"number",key:"release",label:"Release",unit:"ms",min:10,max:2e3,step:1,default:80,scale:"log"}],web:"worklet-truepeak"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times, a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],uo=new Map(Ut.map(t=>[t.id,t]));var lo=Ut.map(t=>t.id);function di(t){return 10**(t/20)}var Ht=di(12);var Ze="data-automation",yo=Ze.slice(5),Je=1,ci=512,I=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Te="volume",Re="rate";function Wt(t){if(t===Te)return{kind:"volume"};if(t===Re)return{kind:"rate"};let e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===mi){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,n,i]=e;return!n||!i?null:{kind:"fx",nodeId:n,param:i}}var mi="preset";var pi={min:0,max:Ht,step:.01,unit:"",label:"Volume",scale:"linear",default:1},fi={min:K,max:J,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function Q(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function hi(t){let e=Q(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Gt(t,e){let n=Q(t),i=Q(e);if(n===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(n),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function bi(t){let e=hi(t?.curve),n=Gt(t?.viaX,t?.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function gi(t,e){let n=Q(t?.t),i=Q(t?.v);if(n===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,n),v:r,...bi(t)}}function _i(t,e){let n=t.map(r=>gi(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of n)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,ci)}function yi(t){let e=[];for(let n of t.lanes){if(!Wt(n.target))continue;let i=n.target===Te?pi:n.target===Re?fi:null,r=_i(n.points??[],i);r.length>0&&e.push({target:n.target,points:r})}return{version:Je,lanes:e}}function Bt(t){let e;try{e=JSON.parse(t)}catch(r){throw new I(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new I("Automation must be a JSON object.");let n=e;if(n.version!==Je)throw new I(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new I("Automation is missing a `lanes` array.");let i=n.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new I(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!Wt(a.target))throw new I(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new I(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return yi({version:Je,lanes:i})}function vi(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Ai(t,e){let n=t-.5,i=e-.5,r=.999,o=1e6,a=n>0?n/(r-t):n<0?-n/(t-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,u=Math.min(o,Math.max(1,a,s));return{cx:t+n/u,cy:e+i/u,w:u}}function Si(t,e,n){let{cx:i,cy:r,w:o}=Ai(e,n),a=2-2*o,s=t*a-1+2*o*i,u=-t*a-2*o*i,d=Ei(s,u,t),m=1-d,g=m*m+2*o*d*m+d*d;return g>0?(2*o*r*d*m+d*d)/g:t}function Ei(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;let i=Math.sqrt(Math.max(0,e*e-4*t*n)),r=(-e+i)/(2*t),o=(-e-i)/(2*t),a=s=>s>=-1e-9&&s<=1+1e-9;return a(r)?Math.min(1,Math.max(0,r)):a(o)?Math.min(1,Math.max(0,o)):n}function Ti(t,e){let n=Gt(e.viaX,e.viaY);return n?Si(Math.min(1,Math.max(0,t)),n.x,n.y):vi(t,e.curve)}function Ri(t,e,n,i){return i==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function we(t,e,n="linear"){let i=t.points;if(i.length===0)return 0;let r=i[0];if(e<=r.t)return r.v;let o=i[i.length-1];if(e>=o.t)return o.v;let a=0,s=i.length-1;for(;s-a>1;){let g=a+s>>1;i[g].t<=e?a=g:s=g}let u=i[a],d=i[s],m=d.t-u.t;return m<=0?d.v:Ri(u.v,d.v,Ti((e-u.t)/m,u),n)}var xe=new Map,wi=64;function $t(t,e=Te){let n=`${e}\0${t}`,i=xe.get(n);if(i!==void 0)return i;let r=null;try{r=Bt(t).lanes.find(o=>o.target===e)??null}catch{r=null}return xe.size>wi&&xe.clear(),xe.set(n,r),r}var zt=48,jt=new WeakMap;function xi(t){let e=t.points,n=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=u=>{let d=r[r.length-1];if(u<=d)return;let m=we(t,d,"log");r.push(u),o.push(o[o.length-1]+(m+we(t,u,"log"))/2*(u-d))},s=Math.max(0,e[0].t);a(s);for(let u=1;u<e.length;u+=1){let d=e[u-1].t,m=e[u].t;if(!(m<=0))for(let g=1;g<=zt;g+=1)a(Math.max(d,0)+(m-d)*g/zt)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:n,lastRate:i}}function ki(t){let e=jt.get(t);return e||(e=xi(t),jt.set(t,e)),e}function Mi(t){return typeof t!="number"&&t.points.length>0}function Ii(t,e,n){let i=0,r=t.length-1;for(;r-i>1;){let o=i+r>>1;t[o]<=n?i=o:r=o}return e[i]+(e[r]-e[i])*(n-t[i])/(t[r]-t[i])}function Qe(t,e){if(typeof t=="number")return e/t;if(!Mi(t))return e;let{ts:n,ss:i,firstRate:r,lastRate:o}=ki(t),a=n.length-1;return e<=0?e/r:e>=i[a]?n[a]+(e-i[a])/o:Ii(i,n,e)}function Ci(t){return t?$t(t,Re):null}function qt(t,e){return Ci(t)??e}var wo=[{id:"montage",label:"Montage",points:[[0,.9],[.15,.3],[.5,2.5],[.85,.3],[1,.9]]},{id:"hero",label:"Hero",points:[[0,1],[.25,1.6],[.5,.25],[.75,1.6],[1,1]]},{id:"bullet",label:"Bullet",points:[[0,3],[.4,3],[.5,.15],[.6,3],[1,3]]},{id:"jump-cut",label:"Jump cut",points:[[0,.5],[.24,.5],[.26,3],[.5,3],[.52,.5],[.74,.5],[.76,3],[1,3]]},{id:"flash-in",label:"Flash in",points:[[0,.3],[.6,.6],[1,5]]},{id:"flash-out",label:"Flash out",points:[[0,5],[.4,.6],[1,.3]]},{id:"ramp-in",label:"Ramp in",points:[[0,.5],[1,1]]},{id:"ramp-out",label:"Ramp out",points:[[0,1],[1,.5]]},{id:"slowmo-middle",label:"Slow-mo middle",points:[[0,1],[1/3,.35],[2/3,.35],[1,1]]}];var v=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),ko=Object.freeze([v.start,v.duration,v.trackIndex]),Mo=Object.freeze([v.derivedEnd]),Io=Object.freeze([v.derivedEnd,v.legacyTrack]);function C(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Kt=/^[A-Za-z0-9_.:-]+$/;function Jt(t,e){let n=t.charCodeAt(e);return n>=48&&n<=57}function Yt(t,e){let n=e;for(;n>=0&&Jt(t,n);)n--;return n}function Di(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function Ni(t){let e=t.length-1;if(!Jt(t,e))return null;let n=Yt(t,e);return t[n]==="."&&(n=Yt(t,n-1)),n+1}function Pi(t){let e=Ni(t);if(e==null)return null;let n=Di(t,e-1),i=t[n];if(i!=="+"&&i!=="-")return null;let r=t.slice(0,n).trim();if(!Kt.test(r))return null;let o=Number(t.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function ee(t){let e=(t??"").trim();if(!e)return null;let n=C(e);if(n!=null)return{kind:"absolute",value:n};if(Kt.test(e))return{kind:"reference",refId:e,offset:0};let i=Pi(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function T(t,e,n,i){t.push({code:e,attribute:n,value:i})}function Li(t,e,n,i){if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return T(i,"invalid-start",v.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);let r=n.resolveReferenceEnd?.(t.refId);return r==null||!Number.isFinite(r)?(T(i,"unresolved-start-reference",v.start,e),null):Math.max(0,r+t.offset)}var Oi=1e-9;function Fi(t,e){return Math.abs(t-e)<=Oi}function Vi(t,e,n){let i=C(t);if(i==null){T(n,"deprecated-end",v.derivedEnd,t),T(n,"invalid-end",v.derivedEnd,t);return}if(e==null){T(n,"deprecated-end",v.derivedEnd,t);return}Fi(i,e)||(T(n,"deprecated-end",v.derivedEnd,t),T(n,"conflicting-end",v.derivedEnd,t))}function Ui(t,e,n){let i=C(t);return i==null||i<0?(T(n,"invalid-duration",v.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Hi(t,e,n){T(n,"deprecated-end",v.derivedEnd,t);let i=C(t);return i==null?(T(n,"invalid-end",v.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(T(n,"end-before-start",v.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Wi(t,e,n){let i=t.getAttribute(v.duration),r=t.getAttribute(v.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Hi(r,e,n);let o=Ui(i,e,n);return r!=null&&Vi(r,o.end,n),o}function Xt(t,e,n,i){let r=C(t);return r==null||!Number.isInteger(r)?(T(i,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:n}}function Gi(t,e){let n=t.getAttribute(v.trackIndex),i=t.getAttribute(v.legacyTrack);if(n==null&&i==null)return{trackIndex:0,trackSource:"default"};if(n==null&&i!=null)return T(e,"deprecated-layer",v.legacyTrack,i),Xt(i,v.legacyTrack,"legacy-layer",e);let r=Xt(n??"",v.trackIndex,"track-index",e);if(i==null)return r;T(e,"deprecated-layer",v.legacyTrack,i);let o=C(i);return o!=null&&o!==r.trackIndex&&T(e,"conflicting-layer",v.legacyTrack,i),r}function et(t,e={}){let n=[],i=t.getAttribute(v.start),r=ee(i),o=Li(r,i,e,n),a=Wi(t,o,n),s=Gi(t,n);return{startExpression:r,start:o,...a,...s,diagnostics:n}}function P(t){return C(t)}function te(t){return Lt(e=>t.getAttribute(e),M(t)?t.defaultPlaybackRate:1)}function tt(t){return qt(t.getAttribute("data-automation"),te(t))}function nt(t){return Pt(e=>t.getAttribute(e))}function U(t,e){return Bi(e,nt(t),tt(t))}function it(t){let e=Xe({tag:"video",authoredDurationSeconds:qe(n=>t.getAttribute(n)),sourceDurationSeconds:Number.isFinite(t.duration)?t.duration:null,mediaStartSeconds:nt(t),playbackRate:te(t)});return e.source==="media"?U(t,t.duration):e.seconds}function ke(t,e=0){return!$e(t)||!t.hasAttribute("data-start")&&!t.hasAttribute("data-track-index")?null:Xe({tag:"img",authoredDurationSeconds:Ot(n=>t.getAttribute(n),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function Bi(t,e,n){return typeof n=="number"?Ye(t,e,n):Number.isFinite(t)?Qe(n,Math.max(0,t-e)):null}function Zt(){return globalThis}function ne(t,e){if(typeof window>"u")return;let n=Zt(),i=n.__hf?.onSwallowed;if(i)try{i({label:t,error:e})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${t} swallowed:`,e)}var $i=t=>t.paused?.()===!0?(t.startTime?.()??0)+(t.totalDuration?.()??0)/Math.abs(t.timeScale?.()||1):0;function ie(t){try{if(typeof t?.duration!="function")return null;let e=t.getChildren?.(!1,!1,!0),n=Array.isArray(e)?e:[],i=Math.max(Number(t.duration()),...n.map($i));return Number.isFinite(i)?i:null}catch(e){return ne("runtime.timelineDuration",e),null}}var Qt="data-hf-authored-duration",en="data-hf-authored-end";function re(t){if(t==null||typeof t=="string"&&t.trim()==="")return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}function Me(t){let e=re(t.start);if(e==null)return null;let n=Math.max(0,e),i=re(t.duration),r=re(t.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=re(t.end),s=re(t.authoredEnd),u=a!=null&&a>n?a:s!=null&&s>n?s:null;return{start:n,duration:u==null?null:u-n,end:u}}var H=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),zo=Object.freeze([H.start,H.duration,H.trackIndex]),jo=Object.freeze([H.derivedEnd]),qo=Object.freeze([H.derivedEnd,H.legacyTrack]);function zi(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var tn=t=>{let e=zi(t);return e!==null&&e>=0?e:null};function ji(t){return tn(t("data-playback-start"))??tn(t("data-media-start"))??0}var nn="data-hf-media-start-basis";function rn(t){return t?.trim().toLowerCase()==="global"?"global":"local"}function qi(t){return rn(t.basis)==="global"?t.authoredStart:t.hostStart+t.authoredStart}function on(t){return sn(t)?qi({authoredStart:t.authoredStart,hostStart:t.hostStart,basis:t.basis}):t.ordinaryStart()}function an(t){return sn(t)&&rn(t.basis)==="global"}function sn(t){return!t.hasAutoStart&&t.authoredStart!=null&&t.hostStart!==0}function rt(t){return ji(e=>t.getAttribute(e))}function un(t,e){return t-rt(e)}function W(t){let e=t.timelineRegistry??{},n=t.includeAuthoredTimingAttrs??!1,i=t.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=l=>{let f=i.getElementById(l);return f||(Array.from(i.querySelectorAll("[data-composition-id]")).find(_=>_.getAttribute("data-composition-id")===l)??null)},u=(l,f)=>n?l.getAttribute(f):null,d=l=>Me({start:0,duration:l.getAttribute("data-duration"),authoredDuration:u(l,"data-hf-authored-duration")})?.duration??Me({start:R(l,0),end:l.getAttribute("data-end"),authoredEnd:u(l,"data-hf-authored-end")})?.duration??null,m=l=>l!=null&&Number.isFinite(l)&&l>0?l:null,g=l=>{let f=l.getAttribute("data-composition-id");return f?m(ie(e[f])):null},y=l=>{let f=o.get(l);if(f!==void 0)return f;let _=d(l)??m(M(l)?U(l,l.duration):null)??m(ke(l))??g(l);return o.set(l,_),_},h=l=>l.hasAttribute("data-composition-src")||l.hasAttribute("data-composition-id")||l.hasAttribute("data-composition-file"),A=l=>{let f=l.parentElement;return!f||!l.hasAttribute("data-composition-id")||ee(l.getAttribute("data-start"))?null:h(f)?f:null},b=(l,f)=>un(R(l,f),A(l)??l),S=(l,f)=>{let _=l.hasAttribute("data-composition-id")?l.parentElement?.closest("[data-composition-id]"):l.closest("[data-composition-id]");return _?b(_,f):0},D=(l,f)=>{let _=ee(l.getAttribute("data-start"));if(!_){let X=A(l);return X?R(X,f):f}if(_.kind==="absolute")return S(l,f)+Math.max(0,_.value);let x=s(_.refId);if(!x)return f;let L=R(x,0),be=y(x)??0,ge=Math.min(0,S(l,0));return Math.max(ge,L+be+_.offset)},R=(l,f)=>{let _=r.get(l);if(_!==void 0)return _??f;if(a.has(l))return f;a.add(l);try{let x=D(l,f);return r.set(l,x),x}finally{a.delete(l)}},k=l=>{let f=l.closest("[data-composition-id]");return{authoredStart:P(l.getAttribute("data-start")),hostStart:f?b(f,0):0,hasAutoStart:l.hasAttribute("data-hf-auto-start"),basis:l.getAttribute(nn)}};return{resolveStartForElement:(l,f=0)=>R(l,Math.max(0,f)),resolveDurationForElement:l=>y(l),resolveMediaStartForElement:l=>{let f=k(l);return on({...f,ordinaryStart:()=>R(l,f.hostStart)})},resolveHostStartForElement:l=>S(l,0),resolveHostSlotsForElement:l=>{let f=[];for(let _=l.parentElement;_;_=_.parentElement){if(!h(_)||A(_)||rt(_)<=0)continue;let x=R(_,0),L=d(_);f.push({start:x,end:L?x+L:1/0})}return f},isRootGlobalMediaStartForElement:l=>M(l)&&an(k(l))}}function ln(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var dn=7200,ot=1/60,oe=t=>t!==null&&t>ot?t:null;function Yi(t){return{width:Ae(t.getAttribute("data-width")),height:Ae(t.getAttribute("data-height"))}}function Xi(t,e){let n=[];for(let i of t.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);o==null||o<=ot||n.push(Math.max(0,r)+o)}return oe(ve({authoredDurationSeconds:null,clipEndsSeconds:n}).seconds)}function Ki(t,e){let n=[];for(let r of t.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==t)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let i=P(t.getAttribute("data-duration"));return oe(ve({authoredDurationSeconds:null,clipEndsSeconds:[i,...n]}).seconds)}var Ji=t=>t.hasAttribute("data-composition-id")||t.hasAttribute("data-composition-src");function Zi(t,e,{unregisteredLottie:n}){let i=[];for(let o of t.querySelectorAll("[data-start]")){let a=e.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=e.resolveDurationForElement(o);s!=null?i.push(Math.max(0,a)+s):(M(o)||Ji(o))&&i.push(null)}(n||t.querySelector("[data-lottie-src]"))&&i.push(null);let r=ve({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function Qi(t){if(t.declared!==null&&Number.isFinite(t.declared)&&t.declared>0)return t.declared;let e=oe(t.timeline()),n=Math.max(0,...t.floors().map(u=>u??0)),i=Number.isFinite(t.fallback)&&t.fallback>ot?t.fallback:0,r=Math.max(n,i),a=e!==null&&e>=dn&&oe(r)!==null?null:e,s;return a!==null?s=Math.max(a,r):oe(n)!==null?s=r:i>0?s=i:s=t.derived(),s>0?s:0}function cn(t){let e=Se(t);if(!e)return null;let n=W({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:t}),i=Qi({declared:P(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[Xi(t,{mediaStart:n.resolveMediaStartForElement,mediaDuration:it}),Ki(e,n)],fallback:0,derived:()=>Zi(e,n,{unregisteredLottie:!1}).seconds??0});return{...Yi(e),fps:ln().canonicalFps,durationSeconds:i}}var mn="hyperframes-studio-preview";var pn="__hfPreviewErrors";function fn(t){return t.hasRuntime||t.runtimeInjected?!1:!!(t.hasNestedCompositions||t.hasTimelines&&t.attempts>=5)}function G(t){return typeof t=="object"&&t!==null}function hn(t){return G(t)&&typeof t.getDuration=="function"}function bn(t){return G(t)&&typeof t.duration=="function"&&typeof t.time=="function"&&typeof t.seek=="function"&&typeof t.play=="function"&&typeof t.pause=="function"}var B="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.185/dist/hyperframe.runtime.iife.js";function ae(t){if(t===null)return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function er(t){let e=t?.querySelector("[data-composition-id][data-width][data-height]")??t?.querySelector("[data-width][data-height]");if(!e)return null;let n=ae(e.getAttribute("data-width")),i=ae(e.getAttribute("data-height"));return n!==null&&i!==null?{width:n,height:i}:null}function tr(t){return Array.isArray(t)?t.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Ie=class{constructor(e,n){this._iframe=e;this._callbacks=n}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;_runtimeScript=null;_failure=null;get failed(){return this._failure!==null&&this._failure.document===this._iframe.contentDocument}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._failure=null,this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;let n=null;try{n=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(n={kind:"error",message:i instanceof Error?i.message:String(i)})}n??=this._deadlineOutcome(e),n&&(this.stop(),n.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(n.message)):this._callbacks.onReady(n.result))},200)}_deadlineOutcome(e){return e<40||this._callbacks.hostOwnsDeadline?.()?null:{kind:"error",message:"Composition timeline not found after 8s"}}_poll(e){let n=this._iframe.contentWindow;if(!n)return null;let i=tr(Reflect.get(n,pn));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(n,"__timelines"),a=this.hasRuntimeBridge(n);if(fn({hasRuntime:a,hasTimelines:G(o)&&Object.keys(o).length>0,hasNestedCompositions:!!r?.querySelector("[data-composition-src]"),runtimeInjected:this._runtimeInjected,attempts:e}))return this._injectRuntime(),null;if(this._runtimeInjected&&!a)return null;let s=this._resolveReadyResult(n,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,n){let i=this._resolvePlaybackDurationAdapter(e)??{kind:"document",getDuration:()=>0},r=i.getDuration();if(!Number.isFinite(r)||r<=0){if(i.kind==="direct-timeline")return null;r=n?cn(n)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:er(n)}}stop(){this._runtimeScript&&(this._runtimeScript.onerror=null,this._runtimeScript=null),this.failed||(this._failure=null),this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return G(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let n=e.createElement("script");n.src=this._callbacks.resolveRuntimeUrl?.()??B,this._runtimeScript=n,n.onerror=()=>{this._runtimeScript!==n||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+n.src))},(e.head||e.documentElement).appendChild(n),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let n=Reflect.get(e,"__timelines");if(!G(n))return null;let i=Object.keys(n);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in n?r:i[i.length-1],a=n[o];return bn(a)?a:null}_resolvePlaybackDurationAdapter(e){let n=Reflect.get(e,"__player");if(hn(n))return{kind:"runtime",getDuration:()=>n.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var gn=`
|
|
1
|
+
"use strict";var HyperframesPlayer=(()=>{var We=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var ni=Object.prototype.hasOwnProperty;var ii=(t,e)=>{for(var n in e)We(t,n,{get:e[n],enumerable:!0})},ri=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ti(e))!ni.call(t,r)&&r!==n&&We(t,r,{get:()=>e[r],enumerable:!(i=ei(e,r))||i.enumerable});return t};var oi=t=>ri(We({},"__esModule",{value:!0}),t);var Jr={};ii(Jr,{HyperframesPlayer:()=>He,SPEED_PRESETS:()=>ut,formatSpeed:()=>se,formatTime:()=>Ce});var Ct=t=>t!==null&&Number.isFinite(t)&&t>0;function ve(t){let e=t.clipEndsSeconds.filter(i=>i===null).length;if(Ct(t.authoredDurationSeconds))return{seconds:t.authoredDurationSeconds,source:"authored",pendingClips:e};let n=t.clipEndsSeconds.filter(Ct);return n.length>0?{seconds:Math.max(...n),source:"derived",pendingClips:e}:{seconds:null,source:"unresolved",pendingClips:e,reason:e>0?"every clip's length is still pending":"no authored duration and no clip with a length"}}var ai="http://www.w3.org/1999/xhtml";function Dt(t){return t!=null&&t.nodeType===1}function Ge(t){return Dt(t)&&t.namespaceURI===ai}function Be(t,e){return Ge(t)&&t.localName===e}function si(t){return Be(t,"video")}function ui(t){return Be(t,"audio")}function M(t){return si(t)||ui(t)}function $e(t){return Be(t,"img")}function Ae(t){if(t==null||t.trim()==="")return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function Se(t=document){let e=t.querySelector('[data-composition-id][data-root="true"]');return Ge(e)?e:t.querySelector("[data-composition-id]")}var V=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),io=Object.freeze([V.start,V.duration,V.trackIndex]),ro=Object.freeze([V.derivedEnd]),oo=Object.freeze([V.derivedEnd,V.legacyTrack]);function ze(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Nt=t=>{let e=ze(t);return e!==null&&e>=0?e:null};function Pt(t){return Nt(t("data-playback-start"))??Nt(t("data-media-start"))??0}var K=.1,J=10;function je(t){return Number.isFinite(t)&&t>0?Math.max(K,Math.min(J,t)):1}function Lt(t,e=1){let n=Number.parseFloat(t("data-playback-rate")??"");return je(Number.isFinite(n)&&n>0?n:e)}function qe(t){let e=ze(t("data-duration"));return e!==null&&e>0?e:null}function Ot(t,e){let n=qe(t);if(n!==null)return n;let i=ze(t("data-end"));return i!==null?i-e:null}var li=3;function Ye(t,e,n){return Number.isFinite(t)?Math.max(0,t-e)/je(n):null}function Xe(t){let{tag:e,authoredDurationSeconds:n,sourceDurationSeconds:i,mediaStartSeconds:r,playbackRate:o}=t;if(n!==null&&n>0)return{seconds:n,source:"authored"};if(e==="img")return{seconds:li,source:"default"};if(i===null)return{seconds:null,source:"pending",reason:"source duration not yet probed"};let a=Ye(i,r,o);return a===null?{seconds:null,source:"pending",reason:"source reported a non-finite duration"}:{seconds:a,source:"media"}}var Vt="data-fx-chain",so=Vt.slice(5);var Z=(t="frequency",e="Frequency",n=1e3,i=20,r=2e4)=>({kind:"number",key:t,label:e,unit:"Hz",min:i,max:r,step:1,default:n,scale:"log",automatable:!0}),Ke=(t=.707,e="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:t,scale:"log",automatable:!0,hint:e}),Ee=(t=-40,e=40,n=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:t,max:e,step:.1,default:n,automatable:!0}),Ft={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},Ut=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[Ee(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[Z("frequency","Frequency",1e3),Ee(-40,40,0),Ke(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[Z("frequency","Frequency",200,20,2e3),Ee(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[Z("frequency","Frequency",4e3,500,2e4),Ee(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies: the usual fix for rumble on a voice.",params:[Z("frequency","Cutoff",300,20,2e4),Ke(.707),Ft],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[Z("frequency","Cutoff",8e3,100,2e4),Ke(.707),Ft],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Peak limiter that follows the signal's level. It has no lookahead, so a fast peak or an inter-sample peak can pass the ceiling; use the true-peak limiter for a delivery limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"truepeak",label:"True-peak limiter",group:"dynamics",description:"Lookahead limiter that holds a 4x estimate of the inter-sample peak at a dBTP ceiling; full-band noise can land up to about 1.7 dB above it. Adds lookahead plus about 0.3 ms of latency.",params:[{kind:"number",key:"ceiling",label:"Ceiling",unit:"dBTP",min:-24,max:0,step:.1,default:-1,hint:"Target true peak, measured on a 4x oversampled signal. Dense full-band sound can end up to about 1.7 dB above it."},{kind:"number",key:"lookahead",label:"Lookahead",unit:"ms",min:.5,max:10,step:.1,default:3,hint:"How far ahead the gain starts falling. Longer is smoother and adds the same latency."},{kind:"number",key:"release",label:"Release",unit:"ms",min:10,max:2e3,step:1,default:80,scale:"log"}],web:"worklet-truepeak"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times, a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],uo=new Map(Ut.map(t=>[t.id,t]));var lo=Ut.map(t=>t.id);function di(t){return 10**(t/20)}var Ht=di(12);var Ze="data-automation",yo=Ze.slice(5),Je=1,ci=512,I=class extends Error{constructor(e){super(e),this.name="AudioAutomationError"}},Te="volume",Re="rate";function Wt(t){if(t===Te)return{kind:"volume"};if(t===Re)return{kind:"rate"};let e=t.split(".");if(e.length===3&&e[0]==="fx"&&e[1]===mi){let r=e[2];return r?{kind:"preset",presetId:r}:null}if(e.length!==3||e[0]!=="fx")return null;let[,n,i]=e;return!n||!i?null:{kind:"fx",nodeId:n,param:i}}var mi="preset";var pi={min:0,max:Ht,step:.01,unit:"",label:"Volume",scale:"linear",default:1},fi={min:K,max:J,step:.05,unit:"x",label:"Speed",scale:"log",default:1};function Q(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function hi(t){let e=Q(t);return e===null||e===0?0:Math.min(1,Math.max(-1,e))}function Gt(t,e){let n=Q(t),i=Q(e);if(n===null||i===null)return null;let r=s=>Math.min(.999,Math.max(.001,s)),o=r(n),a=r(i);return Math.abs(o-a)<1e-6?null:{x:o,y:a}}function bi(t){let e=hi(t?.curve),n=Gt(t?.viaX,t?.viaY);return{...e?{curve:e}:{},...n?{viaX:n.x,viaY:n.y}:{}}}function gi(t,e){let n=Q(t?.t),i=Q(t?.v);if(n===null||i===null)return null;let r=e?Math.min(e.max,Math.max(e.min,i)):i;return{t:Math.max(0,n),v:r,...bi(t)}}function _i(t,e){let n=t.map(r=>gi(r,e)).filter(r=>r!==null).sort((r,o)=>r.t-o.t),i=[];for(let r of n)i.length>0&&i[i.length-1].t===r.t?i[i.length-1]=r:i.push(r);return i.slice(0,ci)}function yi(t){let e=[];for(let n of t.lanes){if(!Wt(n.target))continue;let i=n.target===Te?pi:n.target===Re?fi:null,r=_i(n.points??[],i);r.length>0&&e.push({target:n.target,points:r})}return{version:Je,lanes:e}}function Bt(t){let e;try{e=JSON.parse(t)}catch(r){throw new I(`Automation is not valid JSON: ${r.message}`)}if(typeof e!="object"||e===null)throw new I("Automation must be a JSON object.");let n=e;if(n.version!==Je)throw new I(`Unsupported automation version: ${String(n.version)}`);if(!Array.isArray(n.lanes))throw new I("Automation is missing a `lanes` array.");let i=n.lanes.map((r,o)=>{if(typeof r!="object"||r===null)throw new I(`Lane ${o} is not an object.`);let a=r;if(typeof a.target!="string"||!Wt(a.target))throw new I(`Lane ${o} has an unreadable target: ${String(a.target)}`);if(!Array.isArray(a.points))throw new I(`Lane ${o} is missing a \`points\` array.`);return{target:a.target,points:a.points}});return yi({version:Je,lanes:i})}function vi(t,e){return e?Math.pow(t,Math.pow(2,2*e)):t}function Ai(t,e){let n=t-.5,i=e-.5,r=.999,o=1e6,a=n>0?n/(r-t):n<0?-n/(t-(1-r)):0,s=i>0?i/(r-e):i<0?-i/(e-(1-r)):0,u=Math.min(o,Math.max(1,a,s));return{cx:t+n/u,cy:e+i/u,w:u}}function Si(t,e,n){let{cx:i,cy:r,w:o}=Ai(e,n),a=2-2*o,s=t*a-1+2*o*i,u=-t*a-2*o*i,d=Ei(s,u,t),m=1-d,g=m*m+2*o*d*m+d*d;return g>0?(2*o*r*d*m+d*d)/g:t}function Ei(t,e,n){if(Math.abs(t)<1e-12)return Math.abs(e)<1e-12?n:-n/e;let i=Math.sqrt(Math.max(0,e*e-4*t*n)),r=(-e+i)/(2*t),o=(-e-i)/(2*t),a=s=>s>=-1e-9&&s<=1+1e-9;return a(r)?Math.min(1,Math.max(0,r)):a(o)?Math.min(1,Math.max(0,o)):n}function Ti(t,e){let n=Gt(e.viaX,e.viaY);return n?Si(Math.min(1,Math.max(0,t)),n.x,n.y):vi(t,e.curve)}function Ri(t,e,n,i){return i==="log"&&t>0&&e>0?Math.exp(Math.log(t)+(Math.log(e)-Math.log(t))*n):t+(e-t)*n}function we(t,e,n="linear"){let i=t.points;if(i.length===0)return 0;let r=i[0];if(e<=r.t)return r.v;let o=i[i.length-1];if(e>=o.t)return o.v;let a=0,s=i.length-1;for(;s-a>1;){let g=a+s>>1;i[g].t<=e?a=g:s=g}let u=i[a],d=i[s],m=d.t-u.t;return m<=0?d.v:Ri(u.v,d.v,Ti((e-u.t)/m,u),n)}var xe=new Map,wi=64;function $t(t,e=Te){let n=`${e}\0${t}`,i=xe.get(n);if(i!==void 0)return i;let r=null;try{r=Bt(t).lanes.find(o=>o.target===e)??null}catch{r=null}return xe.size>wi&&xe.clear(),xe.set(n,r),r}var zt=48,jt=new WeakMap;function xi(t){let e=t.points,n=e[0].v,i=e[e.length-1].v,r=[0],o=[0],a=u=>{let d=r[r.length-1];if(u<=d)return;let m=we(t,d,"log");r.push(u),o.push(o[o.length-1]+(m+we(t,u,"log"))/2*(u-d))},s=Math.max(0,e[0].t);a(s);for(let u=1;u<e.length;u+=1){let d=e[u-1].t,m=e[u].t;if(!(m<=0))for(let g=1;g<=zt;g+=1)a(Math.max(d,0)+(m-d)*g/zt)}return{ts:Float64Array.from(r),ss:Float64Array.from(o),firstRate:n,lastRate:i}}function ki(t){let e=jt.get(t);return e||(e=xi(t),jt.set(t,e)),e}function Mi(t){return typeof t!="number"&&t.points.length>0}function Ii(t,e,n){let i=0,r=t.length-1;for(;r-i>1;){let o=i+r>>1;t[o]<=n?i=o:r=o}return e[i]+(e[r]-e[i])*(n-t[i])/(t[r]-t[i])}function Qe(t,e){if(typeof t=="number")return e/t;if(!Mi(t))return e;let{ts:n,ss:i,firstRate:r,lastRate:o}=ki(t),a=n.length-1;return e<=0?e/r:e>=i[a]?n[a]+(e-i[a])/o:Ii(i,n,e)}function Ci(t){return t?$t(t,Re):null}function qt(t,e){return Ci(t)??e}var wo=[{id:"montage",label:"Montage",points:[[0,.9],[.15,.3],[.5,2.5],[.85,.3],[1,.9]]},{id:"hero",label:"Hero",points:[[0,1],[.25,1.6],[.5,.25],[.75,1.6],[1,1]]},{id:"bullet",label:"Bullet",points:[[0,3],[.4,3],[.5,.15],[.6,3],[1,3]]},{id:"jump-cut",label:"Jump cut",points:[[0,.5],[.24,.5],[.26,3],[.5,3],[.52,.5],[.74,.5],[.76,3],[1,3]]},{id:"flash-in",label:"Flash in",points:[[0,.3],[.6,.6],[1,5]]},{id:"flash-out",label:"Flash out",points:[[0,5],[.4,.6],[1,.3]]},{id:"ramp-in",label:"Ramp in",points:[[0,.5],[1,1]]},{id:"ramp-out",label:"Ramp out",points:[[0,1],[1,.5]]},{id:"slowmo-middle",label:"Slow-mo middle",points:[[0,1],[1/3,.35],[2/3,.35],[1,1]]}];var v=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),ko=Object.freeze([v.start,v.duration,v.trackIndex]),Mo=Object.freeze([v.derivedEnd]),Io=Object.freeze([v.derivedEnd,v.legacyTrack]);function C(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var Kt=/^[A-Za-z0-9_.:-]+$/;function Jt(t,e){let n=t.charCodeAt(e);return n>=48&&n<=57}function Yt(t,e){let n=e;for(;n>=0&&Jt(t,n);)n--;return n}function Di(t,e){let n=e;for(;n>=0&&(t[n]??"").trim()==="";)n--;return n}function Ni(t){let e=t.length-1;if(!Jt(t,e))return null;let n=Yt(t,e);return t[n]==="."&&(n=Yt(t,n-1)),n+1}function Pi(t){let e=Ni(t);if(e==null)return null;let n=Di(t,e-1),i=t[n];if(i!=="+"&&i!=="-")return null;let r=t.slice(0,n).trim();if(!Kt.test(r))return null;let o=Number(t.slice(e));return Number.isFinite(o)?{refId:r,operator:i,magnitude:o}:null}function ee(t){let e=(t??"").trim();if(!e)return null;let n=C(e);if(n!=null)return{kind:"absolute",value:n};if(Kt.test(e))return{kind:"reference",refId:e,offset:0};let i=Pi(e);return i?{kind:"reference",refId:i.refId,offset:i.operator==="-"?-i.magnitude:i.magnitude}:null}function T(t,e,n,i){t.push({code:e,attribute:n,value:i})}function Li(t,e,n,i){if(e==null||e.trim()==="")return n.defaultStart===void 0?0:n.defaultStart;if(!t)return T(i,"invalid-start",v.start,e),null;if(t.kind==="absolute")return Math.max(0,t.value);let r=n.resolveReferenceEnd?.(t.refId);return r==null||!Number.isFinite(r)?(T(i,"unresolved-start-reference",v.start,e),null):Math.max(0,r+t.offset)}var Oi=1e-9;function Fi(t,e){return Math.abs(t-e)<=Oi}function Vi(t,e,n){let i=C(t);if(i==null){T(n,"deprecated-end",v.derivedEnd,t),T(n,"invalid-end",v.derivedEnd,t);return}if(e==null){T(n,"deprecated-end",v.derivedEnd,t);return}Fi(i,e)||(T(n,"deprecated-end",v.derivedEnd,t),T(n,"conflicting-end",v.derivedEnd,t))}function Ui(t,e,n){let i=C(t);return i==null||i<0?(T(n,"invalid-duration",v.duration,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i,end:e==null?null:e+i,durationSource:"duration"}}function Hi(t,e,n){T(n,"deprecated-end",v.derivedEnd,t);let i=C(t);return i==null?(T(n,"invalid-end",v.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):e==null?{duration:null,end:i,durationSource:"legacy-end"}:i<e?(T(n,"end-before-start",v.derivedEnd,t),{duration:null,end:null,durationSource:"invalid"}):{duration:i-e,end:i,durationSource:"legacy-end"}}function Wi(t,e,n){let i=t.getAttribute(v.duration),r=t.getAttribute(v.derivedEnd);if(i==null)return r==null?{duration:null,end:null,durationSource:"missing"}:Hi(r,e,n);let o=Ui(i,e,n);return r!=null&&Vi(r,o.end,n),o}function Xt(t,e,n,i){let r=C(t);return r==null||!Number.isInteger(r)?(T(i,"invalid-track-index",e,t),{trackIndex:0,trackSource:"invalid"}):{trackIndex:r,trackSource:n}}function Gi(t,e){let n=t.getAttribute(v.trackIndex),i=t.getAttribute(v.legacyTrack);if(n==null&&i==null)return{trackIndex:0,trackSource:"default"};if(n==null&&i!=null)return T(e,"deprecated-layer",v.legacyTrack,i),Xt(i,v.legacyTrack,"legacy-layer",e);let r=Xt(n??"",v.trackIndex,"track-index",e);if(i==null)return r;T(e,"deprecated-layer",v.legacyTrack,i);let o=C(i);return o!=null&&o!==r.trackIndex&&T(e,"conflicting-layer",v.legacyTrack,i),r}function et(t,e={}){let n=[],i=t.getAttribute(v.start),r=ee(i),o=Li(r,i,e,n),a=Wi(t,o,n),s=Gi(t,n);return{startExpression:r,start:o,...a,...s,diagnostics:n}}function P(t){return C(t)}function te(t){return Lt(e=>t.getAttribute(e),M(t)?t.defaultPlaybackRate:1)}function tt(t){return qt(t.getAttribute("data-automation"),te(t))}function nt(t){return Pt(e=>t.getAttribute(e))}function U(t,e){return Bi(e,nt(t),tt(t))}function it(t){let e=Xe({tag:"video",authoredDurationSeconds:qe(n=>t.getAttribute(n)),sourceDurationSeconds:Number.isFinite(t.duration)?t.duration:null,mediaStartSeconds:nt(t),playbackRate:te(t)});return e.source==="media"?U(t,t.duration):e.seconds}function ke(t,e=0){return!$e(t)||!t.hasAttribute("data-start")&&!t.hasAttribute("data-track-index")?null:Xe({tag:"img",authoredDurationSeconds:Ot(n=>t.getAttribute(n),e),sourceDurationSeconds:null,mediaStartSeconds:0,playbackRate:1}).seconds}function Bi(t,e,n){return typeof n=="number"?Ye(t,e,n):Number.isFinite(t)?Qe(n,Math.max(0,t-e)):null}function Zt(){return globalThis}function ne(t,e){if(typeof window>"u")return;let n=Zt(),i=n.__hf?.onSwallowed;if(i)try{i({label:t,error:e})}catch(r){}(n.__hfDebug||n.__HYPERFRAMES_DEBUG)&&console.debug(`[hyperframes] ${t} swallowed:`,e)}var $i=t=>t.paused?.()===!0?(t.startTime?.()??0)+(t.totalDuration?.()??0)/Math.abs(t.timeScale?.()||1):0;function ie(t){try{if(typeof t?.duration!="function")return null;let e=t.getChildren?.(!1,!1,!0),n=Array.isArray(e)?e:[],i=Math.max(Number(t.duration()),...n.map($i));return Number.isFinite(i)?i:null}catch(e){return ne("runtime.timelineDuration",e),null}}var Qt="data-hf-authored-duration",en="data-hf-authored-end";function re(t){if(t==null||typeof t=="string"&&t.trim()==="")return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}function Me(t){let e=re(t.start);if(e==null)return null;let n=Math.max(0,e),i=re(t.duration),r=re(t.authoredDuration),o=i!=null&&i>0?i:r!=null&&r>0?r:null;if(o!=null)return{start:n,duration:o,end:n+o};let a=re(t.end),s=re(t.authoredEnd),u=a!=null&&a>n?a:s!=null&&s>n?s:null;return{start:n,duration:u==null?null:u-n,end:u}}var H=Object.freeze({start:"data-start",duration:"data-duration",trackIndex:"data-track-index",derivedEnd:"data-end",legacyTrack:"data-layer"}),zo=Object.freeze([H.start,H.duration,H.trackIndex]),jo=Object.freeze([H.derivedEnd]),qo=Object.freeze([H.derivedEnd,H.legacyTrack]);function zi(t){if(t==null||t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}var tn=t=>{let e=zi(t);return e!==null&&e>=0?e:null};function ji(t){return tn(t("data-playback-start"))??tn(t("data-media-start"))??0}var nn="data-hf-media-start-basis";function rn(t){return t?.trim().toLowerCase()==="global"?"global":"local"}function qi(t){return rn(t.basis)==="global"?t.authoredStart:t.hostStart+t.authoredStart}function on(t){return sn(t)?qi({authoredStart:t.authoredStart,hostStart:t.hostStart,basis:t.basis}):t.ordinaryStart()}function an(t){return sn(t)&&rn(t.basis)==="global"}function sn(t){return!t.hasAutoStart&&t.authoredStart!=null&&t.hostStart!==0}function rt(t){return ji(e=>t.getAttribute(e))}function un(t,e){return t-rt(e)}function W(t){let e=t.timelineRegistry??{},n=t.includeAuthoredTimingAttrs??!1,i=t.documentRef??document,r=new WeakMap,o=new WeakMap,a=new Set,s=l=>{let f=i.getElementById(l);return f||(Array.from(i.querySelectorAll("[data-composition-id]")).find(_=>_.getAttribute("data-composition-id")===l)??null)},u=(l,f)=>n?l.getAttribute(f):null,d=l=>Me({start:0,duration:l.getAttribute("data-duration"),authoredDuration:u(l,"data-hf-authored-duration")})?.duration??Me({start:R(l,0),end:l.getAttribute("data-end"),authoredEnd:u(l,"data-hf-authored-end")})?.duration??null,m=l=>l!=null&&Number.isFinite(l)&&l>0?l:null,g=l=>{let f=l.getAttribute("data-composition-id");return f?m(ie(e[f])):null},y=l=>{let f=o.get(l);if(f!==void 0)return f;let _=d(l)??m(M(l)?U(l,l.duration):null)??m(ke(l))??g(l);return o.set(l,_),_},h=l=>l.hasAttribute("data-composition-src")||l.hasAttribute("data-composition-id")||l.hasAttribute("data-composition-file"),A=l=>{let f=l.parentElement;return!f||!l.hasAttribute("data-composition-id")||ee(l.getAttribute("data-start"))?null:h(f)?f:null},b=(l,f)=>un(R(l,f),A(l)??l),S=(l,f)=>{let _=l.hasAttribute("data-composition-id")?l.parentElement?.closest("[data-composition-id]"):l.closest("[data-composition-id]");return _?b(_,f):0},D=(l,f)=>{let _=ee(l.getAttribute("data-start"));if(!_){let X=A(l);return X?R(X,f):f}if(_.kind==="absolute")return S(l,f)+Math.max(0,_.value);let x=s(_.refId);if(!x)return f;let L=R(x,0),be=y(x)??0,ge=Math.min(0,S(l,0));return Math.max(ge,L+be+_.offset)},R=(l,f)=>{let _=r.get(l);if(_!==void 0)return _??f;if(a.has(l))return f;a.add(l);try{let x=D(l,f);return r.set(l,x),x}finally{a.delete(l)}},k=l=>{let f=l.closest("[data-composition-id]");return{authoredStart:P(l.getAttribute("data-start")),hostStart:f?b(f,0):0,hasAutoStart:l.hasAttribute("data-hf-auto-start"),basis:l.getAttribute(nn)}};return{resolveStartForElement:(l,f=0)=>R(l,Math.max(0,f)),resolveDurationForElement:l=>y(l),resolveMediaStartForElement:l=>{let f=k(l);return on({...f,ordinaryStart:()=>R(l,f.hostStart)})},resolveHostStartForElement:l=>S(l,0),resolveHostSlotsForElement:l=>{let f=[];for(let _=l.parentElement;_;_=_.parentElement){if(!h(_)||A(_)||rt(_)<=0)continue;let x=R(_,0),L=d(_);f.push({start:x,end:L?x+L:1/0})}return f},isRootGlobalMediaStartForElement:l=>M(l)&&an(k(l))}}function ln(){return{capturedTimeline:null,isPlaying:!1,currentTime:0,deterministicAdapters:[],canonicalFps:30,bridgeMuted:!1,bridgeVolume:1,mediaOutputMuted:!1,nativeMediaSyncDisabled:!1,webAudioMediaDisabled:!1,mediaAutoplayBlockedPosted:!1,mediaForceSyncNextTick:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,controlBridgeHandler:null,beforeUnloadHandler:null,injectedCompStyles:[],injectedCompScripts:[],injectedCompLinks:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,transportClock:null,transportRafId:null}}var dn=7200,ot=1/60,oe=t=>t!==null&&t>ot?t:null;function Yi(t){return{width:Ae(t.getAttribute("data-width")),height:Ae(t.getAttribute("data-height"))}}function Xi(t,e){let n=[];for(let i of t.querySelectorAll("video[data-start], audio[data-start]")){let r=e.mediaStart(i);if(!Number.isFinite(r))continue;let o=e.mediaDuration(i);o==null||o<=ot||n.push(Math.max(0,r)+o)}return oe(ve({authoredDurationSeconds:null,clipEndsSeconds:n}).seconds)}function Ki(t,e){let n=[];for(let r of t.querySelectorAll("[data-composition-id][data-start]")){if(r.parentElement?.closest("[data-composition-id]")!==t)continue;let o=e.resolveStartForElement(r,0),a=e.resolveDurationForElement(r);!Number.isFinite(o)||a==null||a<=0||n.push(Math.max(0,o)+a)}let i=P(t.getAttribute("data-duration"));return oe(ve({authoredDurationSeconds:null,clipEndsSeconds:[i,...n]}).seconds)}var Ji=t=>t.hasAttribute("data-composition-id")||t.hasAttribute("data-composition-src");function Zi(t,e,{unregisteredLottie:n}){let i=[];for(let o of t.querySelectorAll("[data-start]")){let a=e.resolveStartForElement(o,0);if(!Number.isFinite(a))continue;let s=e.resolveDurationForElement(o);s!=null?i.push(Math.max(0,a)+s):(M(o)||Ji(o))&&i.push(null)}(n||t.querySelector("[data-lottie-src]"))&&i.push(null);let r=ve({authoredDurationSeconds:null,clipEndsSeconds:i});return r.pendingClips>0?{...r,seconds:null,source:"unresolved",reason:"a clip's length is pending"}:r}function Qi(t){if(t.declared!==null&&Number.isFinite(t.declared)&&t.declared>0)return t.declared;let e=oe(t.timeline()),n=Math.max(0,...t.floors().map(u=>u??0)),i=Number.isFinite(t.fallback)&&t.fallback>ot?t.fallback:0,r=Math.max(n,i),a=e!==null&&e>=dn&&oe(r)!==null?null:e,s;return a!==null?s=Math.max(a,r):oe(n)!==null?s=r:i>0?s=i:s=t.derived(),s>0?s:0}function cn(t){let e=Se(t);if(!e)return null;let n=W({timelineRegistry:{},includeAuthoredTimingAttrs:!0,documentRef:t}),i=Qi({declared:P(e.getAttribute("data-duration")),timeline:()=>null,floors:()=>[Xi(t,{mediaStart:n.resolveMediaStartForElement,mediaDuration:it}),Ki(e,n)],fallback:0,derived:()=>Zi(e,n,{unregisteredLottie:!1}).seconds??0});return{...Yi(e),fps:ln().canonicalFps,durationSeconds:i}}var mn="hyperframes-studio-preview";var pn="__hfPreviewErrors";function fn(t){return t.hasRuntime||t.runtimeInjected?!1:!!(t.hasNestedCompositions||t.hasTimelines&&t.attempts>=5)}function G(t){return typeof t=="object"&&t!==null}function hn(t){return G(t)&&typeof t.getDuration=="function"}function bn(t){return G(t)&&typeof t.duration=="function"&&typeof t.time=="function"&&typeof t.seek=="function"&&typeof t.play=="function"&&typeof t.pause=="function"}var B="https://cdn.jsdelivr.net/npm/@hyperframes/core@0.8.186/dist/hyperframe.runtime.iife.js";function ae(t){if(t===null)return null;let e=Number.parseInt(t,10);return Number.isFinite(e)&&e>0?e:null}function er(t){let e=t?.querySelector("[data-composition-id][data-width][data-height]")??t?.querySelector("[data-width][data-height]");if(!e)return null;let n=ae(e.getAttribute("data-width")),i=ae(e.getAttribute("data-height"));return n!==null&&i!==null?{width:n,height:i}:null}function tr(t){return Array.isArray(t)?t.find(e=>typeof e=="string"&&e.trim()!==""&&e!=="[object Event]")??null:null}var Ie=class{constructor(e,n){this._iframe=e;this._callbacks=n}_iframe;_callbacks;_interval=null;_runtimeInjected=!1;_runtimeScript=null;_failure=null;get failed(){return this._failure!==null&&this._failure.document===this._iframe.contentDocument}get runtimeInjected(){return this._runtimeInjected}start(){this.stop(),this._failure=null,this._runtimeInjected=!1;let e=0;this._interval=setInterval(()=>{e++;let n=null;try{n=this._poll(e)}catch(i){i instanceof DOMException&&i.name==="SecurityError"||(n={kind:"error",message:i instanceof Error?i.message:String(i)})}n??=this._deadlineOutcome(e),n&&(this.stop(),n.kind==="error"?(this._failure={document:this._iframe.contentDocument},this._callbacks.onError(n.message)):this._callbacks.onReady(n.result))},200)}_deadlineOutcome(e){return e<40||this._callbacks.hostOwnsDeadline?.()?null:{kind:"error",message:"Composition timeline not found after 8s"}}_poll(e){let n=this._iframe.contentWindow;if(!n)return null;let i=tr(Reflect.get(n,pn));if(i!==null)return{kind:"error",message:i};let r=this._iframe.contentDocument,o=Reflect.get(n,"__timelines"),a=this.hasRuntimeBridge(n);if(fn({hasRuntime:a,hasTimelines:G(o)&&Object.keys(o).length>0,hasNestedCompositions:!!r?.querySelector("[data-composition-src]"),runtimeInjected:this._runtimeInjected,attempts:e}))return this._injectRuntime(),null;if(this._runtimeInjected&&!a)return null;let s=this._resolveReadyResult(n,r);return s?{kind:"ready",result:s}:null}_resolveReadyResult(e,n){let i=this._resolvePlaybackDurationAdapter(e)??{kind:"document",getDuration:()=>0},r=i.getDuration();if(!Number.isFinite(r)||r<=0){if(i.kind==="direct-timeline")return null;r=n?cn(n)?.durationSeconds??0:0}return r<=0?null:{duration:r,adapter:{...i,getDuration:()=>r},compositionSize:er(n)}}stop(){this._runtimeScript&&(this._runtimeScript.onerror=null,this._runtimeScript=null),this.failed||(this._failure=null),this._interval!==null&&(clearInterval(this._interval),this._interval=null)}resolveDirectTimelineAdapter(){try{let e=this._iframe.contentWindow;return e?this._resolveDirectTimelineAdapterFromWindow(e):null}catch{return null}}resolveDirectTimelineAdapterFromWindow(e){return this._resolveDirectTimelineAdapterFromWindow(e)}hasRuntimeBridge(e){return G(Reflect.get(e,"__player"))}_injectRuntime(){this._runtimeInjected=!0;try{let e=this._iframe.contentDocument;if(!e)return;let n=e.createElement("script");n.src=this._callbacks.resolveRuntimeUrl?.()??B,this._runtimeScript=n,n.onerror=()=>{this._runtimeScript!==n||this._iframe.contentDocument!==e||(this.stop(),this._failure={document:e},this._callbacks.onError("HyperFrames runtime failed to load from "+n.src))},(e.head||e.documentElement).appendChild(n),this._callbacks.onRuntimeInjected?.()}catch{}}_resolveDirectTimelineAdapterFromWindow(e){if(this.hasRuntimeBridge(e))return null;let n=Reflect.get(e,"__timelines");if(!G(n))return null;let i=Object.keys(n);if(i.length===0)return null;let r=this._iframe.contentDocument?.querySelector("[data-composition-id]")?.getAttribute("data-composition-id"),o=r&&r in n?r:i[i.length-1],a=n[o];return bn(a)?a:null}_resolvePlaybackDurationAdapter(e){let n=Reflect.get(e,"__player");if(hn(n))return{kind:"runtime",getDuration:()=>n.getDuration()};let i=this._resolveDirectTimelineAdapterFromWindow(e);return i?{kind:"direct-timeline",timeline:i,getDuration:()=>i.duration()}:null}};var gn=`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
position: relative;
|
|
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HZ7M2MZA.js";
|
|
10
10
|
import {
|
|
11
11
|
formatBytes,
|
|
12
12
|
label
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ensureDOMParser
|
|
16
16
|
} from "./chunk-442JNXRM.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-77QM6YRQ.js";
|
|
18
|
+
import "./chunk-6IOBAOU7.js";
|
|
19
19
|
import "./chunk-VWG7OQKU.js";
|
|
20
20
|
import {
|
|
21
21
|
defineCommand
|
|
@@ -25,9 +25,9 @@ import "./chunk-JVBRJMOP.js";
|
|
|
25
25
|
import {
|
|
26
26
|
c
|
|
27
27
|
} from "./chunk-ZTZA4UWZ.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-RNZEQTWZ.js";
|
|
29
29
|
import "./chunk-RQVDTPGD.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-UOZX5W5T.js";
|
|
31
31
|
import "./chunk-VC76R6W2.js";
|
|
32
32
|
import "./chunk-UJKQWGFF.js";
|
|
33
33
|
import {
|
|
@@ -48,12 +48,12 @@ import "./chunk-I5JRXMCV.js";
|
|
|
48
48
|
import "./chunk-W2LGJSEN.js";
|
|
49
49
|
import {
|
|
50
50
|
withMeta
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-FRLTKTOR.js";
|
|
52
52
|
import "./chunk-K4WIOZFP.js";
|
|
53
53
|
import "./chunk-XUXGIA7H.js";
|
|
54
54
|
import "./chunk-WERLJGIC.js";
|
|
55
55
|
import "./chunk-ISN5GRYI.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-LDW3KVGK.js";
|
|
57
57
|
import "./chunk-KNU5COPB.js";
|
|
58
58
|
import "./chunk-M2WBOQ2Q.js";
|
|
59
59
|
|
|
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __hf_dirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
gateRegistryItemsCompatibility
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4AFNEKU7.js";
|
|
10
10
|
import {
|
|
11
11
|
copyDirSync
|
|
12
12
|
} from "./chunk-CIWX5UKC.js";
|
|
13
13
|
import {
|
|
14
14
|
initialModelForLanguage
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-3YHGQJI6.js";
|
|
16
|
+
import "./chunk-T4RP55P2.js";
|
|
17
17
|
import {
|
|
18
18
|
DEFAULT_MODEL,
|
|
19
19
|
hasFFmpeg
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ROWEDRVX.js";
|
|
21
21
|
import "./chunk-WQ6ZXHFQ.js";
|
|
22
22
|
import {
|
|
23
23
|
findFFmpeg,
|
|
24
24
|
findFFprobe,
|
|
25
25
|
getFFmpegInstallHint
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4XFFJAWS.js";
|
|
27
27
|
import {
|
|
28
28
|
Ee,
|
|
29
29
|
R,
|
|
@@ -43,19 +43,19 @@ import {
|
|
|
43
43
|
listRegistryItems,
|
|
44
44
|
loadAllItems,
|
|
45
45
|
resolveItemWithDependencies
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-Y2M6XSNK.js";
|
|
47
47
|
import "./chunk-JHOCK3DG.js";
|
|
48
48
|
import {
|
|
49
49
|
installItem
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-ID5AJ4L3.js";
|
|
51
|
+
import "./chunk-YRAJDFIN.js";
|
|
52
52
|
import "./chunk-AWDFDFI3.js";
|
|
53
53
|
import "./chunk-P6LJ4Y32.js";
|
|
54
54
|
import "./chunk-GMECXFAN.js";
|
|
55
55
|
import {
|
|
56
56
|
trackInitTemplate
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-77QM6YRQ.js";
|
|
58
|
+
import "./chunk-6IOBAOU7.js";
|
|
59
59
|
import "./chunk-VWG7OQKU.js";
|
|
60
60
|
import {
|
|
61
61
|
defineCommand,
|
|
@@ -70,12 +70,12 @@ import {
|
|
|
70
70
|
c,
|
|
71
71
|
isColorSupported
|
|
72
72
|
} from "./chunk-ZTZA4UWZ.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-7M7TMM4S.js";
|
|
74
74
|
import "./chunk-IZCW2NKT.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-RNZEQTWZ.js";
|
|
76
76
|
import "./chunk-RQVDTPGD.js";
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-
|
|
77
|
+
import "./chunk-BRTDLVK3.js";
|
|
78
|
+
import "./chunk-UOZX5W5T.js";
|
|
79
79
|
import "./chunk-VC76R6W2.js";
|
|
80
80
|
import "./chunk-UJKQWGFF.js";
|
|
81
81
|
import {
|
|
@@ -111,7 +111,7 @@ import "./chunk-WERLJGIC.js";
|
|
|
111
111
|
import "./chunk-ISN5GRYI.js";
|
|
112
112
|
import {
|
|
113
113
|
VERSION
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-LDW3KVGK.js";
|
|
115
115
|
import "./chunk-KNU5COPB.js";
|
|
116
116
|
import "./chunk-UOFAE5RF.js";
|
|
117
117
|
import {
|
|
@@ -356,10 +356,18 @@ function probeVideo(filePath) {
|
|
|
356
356
|
frameDuration,
|
|
357
357
|
formatDuration
|
|
358
358
|
});
|
|
359
|
+
const [sarW, sarH] = (videoStream.sample_aspect_ratio ?? "").split(":").map(Number);
|
|
360
|
+
const sar = sarW && sarH ? sarW / sarH : 1;
|
|
361
|
+
const width = Math.round((videoStream.width ?? 1920) * sar);
|
|
362
|
+
const height = videoStream.height ?? 1080;
|
|
363
|
+
const turn = Number(
|
|
364
|
+
videoStream.side_data_list?.find((d) => d.rotation !== void 0)?.rotation ?? videoStream.tags?.rotate ?? 0
|
|
365
|
+
);
|
|
366
|
+
const turned = Math.abs(turn) % 180 === 90;
|
|
359
367
|
return {
|
|
360
368
|
durationSeconds,
|
|
361
|
-
width:
|
|
362
|
-
height:
|
|
369
|
+
width: turned ? height : width,
|
|
370
|
+
height: turned ? width : height,
|
|
363
371
|
fps,
|
|
364
372
|
hasAudio,
|
|
365
373
|
videoCodec: videoStream.codec_name ?? "unknown"
|
|
@@ -368,6 +376,12 @@ function probeVideo(filePath) {
|
|
|
368
376
|
return void 0;
|
|
369
377
|
}
|
|
370
378
|
}
|
|
379
|
+
function clipFrame(templateId, clip) {
|
|
380
|
+
if (templateId !== "from-file" || !clip || !(clip.width > 0 && clip.height > 0)) return void 0;
|
|
381
|
+
const even = (n) => 2 * Math.round(n / 2);
|
|
382
|
+
const frame = clip.width >= clip.height ? { width: even(1080 * clip.width / clip.height), height: 1080 } : { width: 1080, height: even(1080 * clip.height / clip.width) };
|
|
383
|
+
return frame.width === 1920 && frame.height === 1080 ? void 0 : frame;
|
|
384
|
+
}
|
|
371
385
|
function isWebCompatible(codec) {
|
|
372
386
|
return WEB_CODECS.has(codec.toLowerCase());
|
|
373
387
|
}
|
|
@@ -521,8 +535,13 @@ function patchVideoSrc(dir, media) {
|
|
|
521
535
|
writeFileSync(file, patchMediaPlaceholders(readFileSync(file, "utf-8"), media), "utf-8");
|
|
522
536
|
}
|
|
523
537
|
}
|
|
538
|
+
async function finishScaffold(destDir, templateId, tailwind) {
|
|
539
|
+
trackInitTemplate(templateId, { tailwind });
|
|
540
|
+
const transcriptFile = resolve(destDir, TRANSCRIPT_FILE);
|
|
541
|
+
if (existsSync2(transcriptFile)) await patchTranscript(destDir, transcriptFile);
|
|
542
|
+
}
|
|
524
543
|
async function patchTranscript(dir, transcriptPath) {
|
|
525
|
-
const { loadTranscript, patchCaptionHtml } = await import("./normalize-
|
|
544
|
+
const { loadTranscript, patchCaptionHtml } = await import("./normalize-3AYFSN2F.js");
|
|
526
545
|
const { words } = loadTranscript(transcriptPath);
|
|
527
546
|
if (words.length === 0) return;
|
|
528
547
|
patchCaptionHtml(dir, words);
|
|
@@ -610,7 +629,9 @@ async function handleVideoFile(videoPath, destDir, interactive, keepOriginal) {
|
|
|
610
629
|
return { meta, localVideoName };
|
|
611
630
|
}
|
|
612
631
|
function applyResolutionPreset(destDir, resolution) {
|
|
613
|
-
|
|
632
|
+
applyCanvasSize(destDir, CANVAS_DIMENSIONS[resolution], resolution);
|
|
633
|
+
}
|
|
634
|
+
function applyCanvasSize(destDir, { width, height }, resolution) {
|
|
614
635
|
for (const file of listHtmlFiles(destDir)) {
|
|
615
636
|
let html = readFileSync(file, "utf-8");
|
|
616
637
|
let changed = false;
|
|
@@ -626,7 +647,7 @@ function applyResolutionPreset(destDir, resolution) {
|
|
|
626
647
|
}
|
|
627
648
|
const htmlOpenRe = /<html\b([^>]*)>/i;
|
|
628
649
|
const htmlOpen = html.match(htmlOpenRe);
|
|
629
|
-
if (htmlOpen) {
|
|
650
|
+
if (htmlOpen && resolution) {
|
|
630
651
|
const attrs = htmlOpen[1] ?? "";
|
|
631
652
|
let next;
|
|
632
653
|
if (/data-resolution=/.test(attrs)) {
|
|
@@ -654,7 +675,7 @@ function applyResolutionPreset(destDir, resolution) {
|
|
|
654
675
|
if (changed) writeFileSync(file, html, "utf-8");
|
|
655
676
|
}
|
|
656
677
|
}
|
|
657
|
-
async function scaffoldProject(destDir, name, templateId, media, tailwind = false,
|
|
678
|
+
async function scaffoldProject(destDir, name, templateId, media, tailwind = false, canvas, authoringSkill) {
|
|
658
679
|
mkdirSync(destDir, { recursive: true });
|
|
659
680
|
const templateDir = getStaticTemplateDir(templateId);
|
|
660
681
|
if (existsSync2(join2(templateDir, "index.html"))) {
|
|
@@ -664,7 +685,8 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
664
685
|
}
|
|
665
686
|
patchVideoSrc(destDir, media);
|
|
666
687
|
if (tailwind) writeTailwindSupport(destDir);
|
|
667
|
-
if (
|
|
688
|
+
if (typeof canvas === "string") applyResolutionPreset(destDir, canvas);
|
|
689
|
+
else if (canvas) applyCanvasSize(destDir, canvas);
|
|
668
690
|
writeFileSync(
|
|
669
691
|
resolve(destDir, "meta.json"),
|
|
670
692
|
JSON.stringify(
|
|
@@ -679,7 +701,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
679
701
|
"utf-8"
|
|
680
702
|
);
|
|
681
703
|
if (!existsSync2(resolve(destDir, "hyperframes.json"))) {
|
|
682
|
-
const { createProjectConfig, DEFAULT_PROJECT_CONFIG } = await import("./projectConfig-
|
|
704
|
+
const { createProjectConfig, DEFAULT_PROJECT_CONFIG } = await import("./projectConfig-NCP7JRH4.js");
|
|
683
705
|
const { normalizeSkillSlug } = await import("./skill-ZHVLH7KX.js");
|
|
684
706
|
const skill = normalizeSkillSlug(authoringSkill);
|
|
685
707
|
createProjectConfig(
|
|
@@ -700,7 +722,7 @@ async function scaffoldProject(destDir, name, templateId, media, tailwind = fals
|
|
|
700
722
|
}
|
|
701
723
|
}
|
|
702
724
|
async function keepSkillsCurrent(destDir) {
|
|
703
|
-
const { updateSkills } = await import("./skills-
|
|
725
|
+
const { updateSkills } = await import("./skills-UHOXOGGF.js");
|
|
704
726
|
console.log();
|
|
705
727
|
console.log(c.bold("Checking AI coding skills against GitHub..."));
|
|
706
728
|
try {
|
|
@@ -796,7 +818,7 @@ var init_default = defineCommand({
|
|
|
796
818
|
},
|
|
797
819
|
resolution: {
|
|
798
820
|
type: "string",
|
|
799
|
-
description: "Canvas resolution preset: landscape (1920x1080), portrait (1080x1920), landscape-4k (3840x2160), portrait-4k (2160x3840), square (1080x1080), square-4k (2160x2160). Aliases: 1080p, 4k, uhd, 1080p-square, square-1080p, 4k-square. Default:
|
|
821
|
+
description: "Canvas resolution preset: landscape (1920x1080), portrait (1080x1920), landscape-4k (3840x2160), portrait-4k (2160x3840), square (1080x1080), square-4k (2160x2160). Aliases: 1080p, 4k, uhd, 1080p-square, square-1080p, 4k-square. Default: a --video clip's own shape as it plays, 1080 on the short side (4:3 -> 1440x1080), else the template's dimensions (typically 1920x1080)."
|
|
800
822
|
},
|
|
801
823
|
skill: {
|
|
802
824
|
type: "string",
|
|
@@ -888,6 +910,7 @@ var init_default = defineCommand({
|
|
|
888
910
|
let localVideoName2;
|
|
889
911
|
let videoHasAudio2 = true;
|
|
890
912
|
let videoDuration2;
|
|
913
|
+
let videoSize2;
|
|
891
914
|
let sourceFilePath2;
|
|
892
915
|
if (videoPath) {
|
|
893
916
|
sourceFilePath2 = videoPath;
|
|
@@ -895,6 +918,7 @@ var init_default = defineCommand({
|
|
|
895
918
|
localVideoName2 = result.localVideoName;
|
|
896
919
|
videoHasAudio2 = result.meta.hasAudio;
|
|
897
920
|
videoDuration2 = result.meta.durationSeconds;
|
|
921
|
+
videoSize2 = result.meta;
|
|
898
922
|
console.log(
|
|
899
923
|
`Video: ${result.meta.width}x${result.meta.height}, ${result.meta.durationSeconds.toFixed(1)}s`
|
|
900
924
|
);
|
|
@@ -902,17 +926,17 @@ var init_default = defineCommand({
|
|
|
902
926
|
if (audioPath) {
|
|
903
927
|
sourceFilePath2 = audioPath;
|
|
904
928
|
copyFileSync(audioPath, resolve(destDir2, basename(audioPath)));
|
|
905
|
-
const { getMediaDurationSeconds } = await import("./transcribe-
|
|
929
|
+
const { getMediaDurationSeconds } = await import("./transcribe-ZUQD3B32.js");
|
|
906
930
|
videoDuration2 = getMediaDurationSeconds(audioPath) ?? void 0;
|
|
907
931
|
console.log(`Audio: ${basename(audioPath)}`);
|
|
908
932
|
}
|
|
909
933
|
if (sourceFilePath2 && !skipTranscribe) {
|
|
910
934
|
try {
|
|
911
|
-
const { ensureWhisper, ensureModel } = await import("./manager-
|
|
935
|
+
const { ensureWhisper, ensureModel } = await import("./manager-GXTPNJVW.js");
|
|
912
936
|
await ensureWhisper();
|
|
913
937
|
await ensureModel(initialTranscriptionModel);
|
|
914
938
|
console.log("Transcribing...");
|
|
915
|
-
const { transcribe: runTranscribe } = await import("./transcribe-
|
|
939
|
+
const { transcribe: runTranscribe } = await import("./transcribe-ZUQD3B32.js");
|
|
916
940
|
const result = await runTranscribe(sourceFilePath2, destDir2, {
|
|
917
941
|
model: modelFlag,
|
|
918
942
|
language: languageFlag
|
|
@@ -937,7 +961,7 @@ var init_default = defineCommand({
|
|
|
937
961
|
templateId2,
|
|
938
962
|
media,
|
|
939
963
|
tailwind,
|
|
940
|
-
resolutionPreset,
|
|
964
|
+
resolutionPreset ?? clipFrame(templateId2, videoSize2),
|
|
941
965
|
args.skill
|
|
942
966
|
);
|
|
943
967
|
} catch (err) {
|
|
@@ -949,11 +973,7 @@ var init_default = defineCommand({
|
|
|
949
973
|
console.error(c.dim("Use --example blank for offline use."));
|
|
950
974
|
failCommand();
|
|
951
975
|
}
|
|
952
|
-
|
|
953
|
-
const transcriptFile2 = resolve(destDir2, TRANSCRIPT_FILE);
|
|
954
|
-
if (existsSync2(transcriptFile2)) {
|
|
955
|
-
await patchTranscript(destDir2, transcriptFile2);
|
|
956
|
-
}
|
|
976
|
+
await finishScaffold(destDir2, templateId2, tailwind);
|
|
957
977
|
console.log(c.success(`Created ${c.accent(name2 + "/")}`));
|
|
958
978
|
for (const f of readdirSync(destDir2).filter((f2) => !f2.startsWith("."))) {
|
|
959
979
|
console.log(` ${c.accent(f)}`);
|
|
@@ -1037,6 +1057,7 @@ var init_default = defineCommand({
|
|
|
1037
1057
|
let videoHasAudio = true;
|
|
1038
1058
|
let sourceFilePath;
|
|
1039
1059
|
let videoDuration;
|
|
1060
|
+
let videoSize;
|
|
1040
1061
|
if (videoFlag) {
|
|
1041
1062
|
const videoPath = resolve(videoFlag);
|
|
1042
1063
|
if (!existsSync2(videoPath)) {
|
|
@@ -1050,6 +1071,7 @@ var init_default = defineCommand({
|
|
|
1050
1071
|
localVideoName = result.localVideoName;
|
|
1051
1072
|
videoHasAudio = result.meta.hasAudio;
|
|
1052
1073
|
videoDuration = result.meta.durationSeconds;
|
|
1074
|
+
videoSize = result.meta;
|
|
1053
1075
|
} else if (audioFlag) {
|
|
1054
1076
|
const audioPath = resolve(audioFlag);
|
|
1055
1077
|
if (!existsSync2(audioPath)) {
|
|
@@ -1060,7 +1082,7 @@ var init_default = defineCommand({
|
|
|
1060
1082
|
mkdirSync(destDir, { recursive: true });
|
|
1061
1083
|
sourceFilePath = audioPath;
|
|
1062
1084
|
copyFileSync(audioPath, resolve(destDir, basename(audioPath)));
|
|
1063
|
-
const { getMediaDurationSeconds } = await import("./transcribe-
|
|
1085
|
+
const { getMediaDurationSeconds } = await import("./transcribe-ZUQD3B32.js");
|
|
1064
1086
|
videoDuration = getMediaDurationSeconds(audioPath) ?? void 0;
|
|
1065
1087
|
R.info(`Audio copied to ${c.accent(basename(audioPath))}`);
|
|
1066
1088
|
}
|
|
@@ -1070,7 +1092,7 @@ var init_default = defineCommand({
|
|
|
1070
1092
|
initialValue: true
|
|
1071
1093
|
});
|
|
1072
1094
|
if (!q(transcribeChoice) && transcribeChoice) {
|
|
1073
|
-
const { findWhisper } = await import("./manager-
|
|
1095
|
+
const { findWhisper } = await import("./manager-GXTPNJVW.js");
|
|
1074
1096
|
const needsInstall = findWhisper() === void 0;
|
|
1075
1097
|
if (needsInstall) {
|
|
1076
1098
|
R.info(c.dim("whisper-cpp not found \u2014 installing automatically..."));
|
|
@@ -1080,7 +1102,7 @@ var init_default = defineCommand({
|
|
|
1080
1102
|
needsInstall ? "Installing whisper-cpp (this may take a moment)..." : "Preparing transcription..."
|
|
1081
1103
|
);
|
|
1082
1104
|
try {
|
|
1083
|
-
const { ensureWhisper, ensureModel } = await import("./manager-
|
|
1105
|
+
const { ensureWhisper, ensureModel } = await import("./manager-GXTPNJVW.js");
|
|
1084
1106
|
await ensureWhisper({
|
|
1085
1107
|
onProgress: (msg) => spin2.message(msg)
|
|
1086
1108
|
});
|
|
@@ -1088,7 +1110,7 @@ var init_default = defineCommand({
|
|
|
1088
1110
|
onProgress: (msg) => spin2.message(msg)
|
|
1089
1111
|
});
|
|
1090
1112
|
spin2.message("Transcribing audio...");
|
|
1091
|
-
const { transcribe: runTranscribe } = await import("./transcribe-
|
|
1113
|
+
const { transcribe: runTranscribe } = await import("./transcribe-ZUQD3B32.js");
|
|
1092
1114
|
const transcribeResult = await runTranscribe(sourceFilePath, destDir, {
|
|
1093
1115
|
model: modelFlag,
|
|
1094
1116
|
language: languageFlag,
|
|
@@ -1142,7 +1164,7 @@ var init_default = defineCommand({
|
|
|
1142
1164
|
templateId,
|
|
1143
1165
|
media,
|
|
1144
1166
|
tailwind,
|
|
1145
|
-
resolutionPreset,
|
|
1167
|
+
resolutionPreset ?? clipFrame(templateId, videoSize),
|
|
1146
1168
|
args.skill
|
|
1147
1169
|
);
|
|
1148
1170
|
if (!isBundled) {
|
|
@@ -1158,11 +1180,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
1158
1180
|
);
|
|
1159
1181
|
failCommand();
|
|
1160
1182
|
}
|
|
1161
|
-
|
|
1162
|
-
const transcriptFile = resolve(destDir, TRANSCRIPT_FILE);
|
|
1163
|
-
if (existsSync2(transcriptFile)) {
|
|
1164
|
-
await patchTranscript(destDir, transcriptFile);
|
|
1165
|
-
}
|
|
1183
|
+
await finishScaffold(destDir, templateId, tailwind);
|
|
1166
1184
|
const files = readdirSync(destDir);
|
|
1167
1185
|
Se(files.map((f) => c.accent(f)).join("\n"), c.success(`Created ${name}/`));
|
|
1168
1186
|
if (!skipSkills) {
|
|
@@ -1170,7 +1188,7 @@ ${c.dim("Use --example blank for offline use.")}`
|
|
|
1170
1188
|
}
|
|
1171
1189
|
R.info("Opening studio preview...");
|
|
1172
1190
|
try {
|
|
1173
|
-
const previewCmd = await import("./preview-
|
|
1191
|
+
const previewCmd = await import("./preview-KIWTWK63.js").then((m) => m.default);
|
|
1174
1192
|
await runCommand(previewCmd, { rawArgs: [destDir] });
|
|
1175
1193
|
} catch {
|
|
1176
1194
|
}
|