hyperframes 0.8.199 → 0.8.201
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-7LA5CGDM.js → add-33XNCMY4.js} +15 -18
- package/dist/{animatedGifPrep-NB2MZTMQ.js → animatedGifPrep-MI7Z4OYQ.js} +9 -12
- package/dist/api.js +17 -20
- package/dist/{asset-4BIOI6GN.js → asset-RMRQN24O.js} +2 -2
- package/dist/{assetCataloger-TX5KL5VV.js → assetCataloger-KWTQNFUU.js} +9 -12
- package/dist/{audio-ZGMIIDNU.js → audio-SQDZZS6X.js} +34 -32
- package/dist/{auth-OQ5PWEUG.js → auth-PNC6K5ZD.js} +2 -2
- package/dist/{autoUpdate-QREPD6I4.js → autoUpdate-MBZFLUF2.js} +2 -2
- package/dist/{backgroundChecks-5CJPJX2O.js → backgroundChecks-ZMSPA6TK.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-BW2ZK4MA.js → batchRender-2MMOZRMW.js} +5 -7
- package/dist/{beats-I5XARMDB.js → beats-GDLNPR4A.js} +33 -24
- package/dist/{benchmark-S2WWY4U7.js → benchmark-AUKB3XDF.js} +12 -14
- package/dist/{browser-PAXVQYQZ.js → browser-C3AU5TST.js} +6 -6
- package/dist/{bundleWithLocalizedFonts-3ED26VCR.js → bundleWithLocalizedFonts-G3UT65XI.js} +2 -2
- package/dist/{capture-23574YLP.js → capture-EKNPCFPF.js} +16 -18
- package/dist/{capture-OVITDMKK.js → capture-XGBPNGC5.js} +2 -2
- package/dist/{captureCompositionFrame-KAUUHCOL.js → captureCompositionFrame-4HHLPTDH.js} +14 -17
- package/dist/{catalog-CM3VXSQE.js → catalog-HLDNEJX3.js} +15 -18
- package/dist/{catch-up-HMFREOC2.js → catch-up-LRFV4LJO.js} +6 -6
- package/dist/{check-CYJZ6CGT.js → check-XWHWGNYE.js} +40 -43
- package/dist/{checkBrowser-GZJ3W2OP.js → checkBrowser-KSOBXPJ3.js} +35 -38
- package/dist/{chunk-MMQ52NIZ.js → chunk-2BGOB2QK.js} +500 -17
- package/dist/{chunk-D5CZCYYT.js → chunk-2FA53V5S.js} +2 -2
- package/dist/{chunk-FV5GKRAO.js → chunk-3J5KO4EJ.js} +8 -10
- package/dist/{chunk-UMBCYIFE.js → chunk-47NZWTJL.js} +2 -2
- package/dist/{chunk-JFIEV2J4.js → chunk-53E45AKI.js} +60 -34
- package/dist/{chunk-BFYDVTD3.js → chunk-6UFEOVR5.js} +2 -2
- package/dist/{chunk-M6IMQBK6.js → chunk-6XGO7ZKS.js} +1 -1
- package/dist/{chunk-UVQLSMAR.js → chunk-74UH2KGI.js} +30 -6
- package/dist/{chunk-TVR744AS.js → chunk-7EJ7OZGC.js} +16 -3
- package/dist/{chunk-7QB46WTF.js → chunk-7WEGIXI3.js} +2 -2
- package/dist/{chunk-TTWFTEUG.js → chunk-A7YO6YSD.js} +6 -6
- package/dist/{chunk-HK45GJMI.js → chunk-AK2MOAJY.js} +192 -65
- package/dist/{chunk-TF7LCULS.js → chunk-B67P2WP3.js} +2 -2
- package/dist/chunk-B7CYKBXQ.js +36 -0
- package/dist/{chunk-DMRDGGNM.js → chunk-CD5ZU6PN.js} +9 -7
- package/dist/{chunk-IC6BO4GU.js → chunk-CV32PRH3.js} +65 -21
- package/dist/{chunk-UBSAHYWA.js → chunk-DS3XITZ5.js} +2 -2
- package/dist/{chunk-ILFDFMYJ.js → chunk-DWULQYOQ.js} +3 -3
- package/dist/{chunk-VHBBV5DH.js → chunk-ERUINDRT.js} +62 -25
- package/dist/{chunk-FMTJ4I6I.js → chunk-FDWN4XAD.js} +1 -1
- package/dist/{chunk-K5O6JTJQ.js → chunk-GC6N2LH5.js} +10 -12
- package/dist/{chunk-5CTORVUM.js → chunk-GHROWWUN.js} +32 -1
- package/dist/{chunk-T4IJMVCB.js → chunk-GKXH4C2B.js} +1 -1
- package/dist/{chunk-QYOUK3UO.js → chunk-GNX3BCQP.js} +2 -2
- package/dist/{chunk-IELYOY6S.js → chunk-I4DHHX7E.js} +3 -3
- package/dist/{chunk-FZ2VPLXL.js → chunk-IDRUJFT4.js} +2 -2
- package/dist/{chunk-KFZPWUPN.js → chunk-IFOZZYHK.js} +7 -7
- package/dist/{chunk-3CFTCM7X.js → chunk-IHQBTZHE.js} +3 -3
- package/dist/{chunk-OZVRCLEN.js → chunk-IIH24PKY.js} +2 -2
- package/dist/{chunk-K65XUUJX.js → chunk-ITJAHKYO.js} +1 -1
- package/dist/{chunk-6JR2XUEE.js → chunk-IXXVS2Z4.js} +1 -1
- package/dist/{chunk-IMVTN367.js → chunk-JOI7TNCX.js} +2 -2
- package/dist/{chunk-KG3BVLA4.js → chunk-JXLHLR26.js} +1 -1
- package/dist/{chunk-DY53XJ3P.js → chunk-K2AUGELJ.js} +1 -1
- package/dist/{chunk-VWPU6URV.js → chunk-L33EDCSR.js} +5 -5
- package/dist/{chunk-BYLC52GJ.js → chunk-LVEXHBSH.js} +1 -1
- package/dist/{chunk-XOTUPVIF.js → chunk-MSGWR7WP.js} +9 -1
- package/dist/{chunk-DWUOGV3M.js → chunk-ORMTNJBS.js} +3 -3
- package/dist/{chunk-Z6Q4ASCD.js → chunk-Q537KXWA.js} +153 -44
- package/dist/{chunk-YAMRODVV.js → chunk-Q6SHXSZX.js} +3 -2
- package/dist/{chunk-GQVTTWZF.js → chunk-QB4K2EWI.js} +1 -1
- package/dist/{chunk-T6AGUTZJ.js → chunk-QSFWGZG6.js} +7 -38
- package/dist/{chunk-XP55QWOB.js → chunk-QTWSMJ22.js} +15 -15
- package/dist/{chunk-M2GO2AAS.js → chunk-QXBZ6VBL.js} +1 -1
- package/dist/{chunk-65HUC64P.js → chunk-QYTGUWNF.js} +1 -1
- package/dist/{chunk-CMHVLASW.js → chunk-RVKJDAYE.js} +1 -1
- package/dist/{chunk-HRZ6ZBKO.js → chunk-SEAHCCQ4.js} +70 -51
- package/dist/{chunk-7SKOZHIY.js → chunk-SGKG7DNX.js} +3 -3
- package/dist/{chunk-6RRO4GE3.js → chunk-SIZYTGG4.js} +1 -1
- package/dist/{chunk-4QG64APO.js → chunk-SZNCAINN.js} +1 -1
- package/dist/{chunk-S5WSJVHP.js → chunk-T33GLS6C.js} +3 -3
- package/dist/{chunk-SQQZUUK6.js → chunk-TAXGZAXM.js} +10 -10
- package/dist/{chunk-GQACWAOC.js → chunk-TOT3CLUK.js} +1 -1
- package/dist/{chunk-2KZSKIYY.js → chunk-TYRDDIIH.js} +1 -1
- package/dist/{chunk-HOAXHVRR.js → chunk-U2EK5MFR.js} +10 -10
- package/dist/{chunk-QXPZGDTI.js → chunk-UIIGEPYY.js} +3 -3
- package/dist/{chunk-W2LGJSEN.js → chunk-UIOZIIB7.js} +33 -3
- package/dist/{chunk-L6FG62QM.js → chunk-UKB62QOT.js} +446 -151
- package/dist/{chunk-JN63IPHT.js → chunk-UOSTDTBF.js} +1 -1
- package/dist/{chunk-LPDNR3R4.js → chunk-VCVUEK65.js} +3 -3
- package/dist/{chunk-PO5PAROC.js → chunk-VF2VMKNI.js} +3 -3
- package/dist/{chunk-XVZZQVT4.js → chunk-VKTUZP7U.js} +1 -1
- package/dist/{chunk-NY2OH5XD.js → chunk-WO3XZ6HC.js} +1 -1
- package/dist/{chunk-7YZME6DE.js → chunk-X72DJZCM.js} +1 -1
- package/dist/{chunk-PGDWNIOK.js → chunk-XDMZY3H7.js} +57 -5
- package/dist/{chunk-QH4425AL.js → chunk-XG365L6T.js} +1 -1
- package/dist/{chunk-NUZMP7SV.js → chunk-XHVQIOOF.js} +19 -19
- package/dist/{chunk-FHDKRWQN.js → chunk-XONIZ5CH.js} +13 -13
- package/dist/{chunk-RYCANWOM.js → chunk-YBJECXQJ.js} +5 -5
- package/dist/{chunk-AHZLNYZY.js → chunk-YTBE4JCX.js} +1 -1
- package/dist/{chunk-VLVQQJOX.js → chunk-ZDVJXWEG.js} +22 -3
- package/dist/chunk-ZKHXN2BV.js +3983 -0
- package/dist/{clean-QX6LKOWJ.js → clean-EUKURSX2.js} +22 -25
- package/dist/cli.js +54 -54
- package/dist/{cloud-ASA7Y3HA.js → cloud-LJDRNQ2N.js} +4 -4
- package/dist/{cloudrun-LK4GJWUZ.js → cloudrun-AXVFD6KV.js} +7 -9
- package/dist/{compare-426Z2ND6.js → compare-T3LMATAF.js} +32 -35
- package/dist/{compiler-WER7FC5O.js → compiler-KH6DMHIJ.js} +6 -10
- package/dist/{component-HTDWZMEG.js → component-2FOHCMP2.js} +3 -3
- package/dist/{compositions-EKRLQ5TU.js → compositions-REQ6ARAO.js} +14 -17
- package/dist/{delete-KHXM6R7A.js → delete-KEPP2QAZ.js} +2 -2
- package/dist/{deploy-WJ5JQJBD.js → deploy-N756FEME.js} +1 -1
- package/dist/{deterministicFonts-RMA7GDJC.js → deterministicFonts-4FULD3AS.js} +2 -2
- package/dist/{dist-EYJATCTF.js → dist-5ULOGA6A.js} +30 -16
- package/dist/{dist-ONHJ6ZDA.js → dist-TFHABY7N.js} +2 -4
- package/dist/{doctor-NB3G2GDG.js → doctor-2SJPC4WZ.js} +15 -18
- package/dist/{dotEnv-64S3VKGH.js → dotEnv-RPHCAUBZ.js} +1 -1
- package/dist/{events-LH6W5ZCV.js → events-24ZE2PKB.js} +5 -5
- package/dist/{events-6EL5NIJV.js → events-U53QH4XZ.js} +4 -4
- package/dist/{feedback-2GNY725M.js → feedback-QFMLDLUN.js} +11 -13
- package/dist/{ffmpeg-XX3O53B3.js → ffmpeg-7XNWNO7M.js} +9 -12
- package/dist/{figma-X7KKOOXB.js → figma-B4JO44CV.js} +3 -3
- package/dist/fontLocalizeCli.js +12 -15
- package/dist/{get-M57U7QCX.js → get-7CFVCINR.js} +2 -2
- package/dist/{gpuPolicy-GIBBYBI5.js → gpuPolicy-MU7CFSAF.js} +9 -12
- package/dist/{grade-compare-XNY37UYQ.js → grade-compare-Q23U2HGS.js} +33 -36
- package/dist/{help-ZXSPZBUG.js → help-M67MEDV3.js} +1 -1
- package/dist/{history-G5B4IPBH.js → history-I2PZXOFL.js} +9 -9
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +66 -62
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/{info-ZWZDG54W.js → info-Z2MX54IE.js} +11 -13
- package/dist/{init-F4XMU6SV.js → init-SWH5KZO2.js} +30 -33
- package/dist/{inspect-6VXFMQRR.js → inspect-WBBDB3YS.js} +33 -36
- package/dist/{installer-4M3Y5T5F.js → installer-DQIHGUBJ.js} +6 -9
- package/dist/{keyframes-3U466AWX.js → keyframes-PSNEUS6P.js} +8 -8
- package/dist/{lambda-OPSTAEF6.js → lambda-KSZFMQ3L.js} +9 -11
- package/dist/{layout-B3MXD3F3.js → layout-AAOI7W2M.js} +33 -36
- package/dist/{lint-TVOEGW63.js → lint-GGNVITIK.js} +10 -12
- package/dist/{lintProject-FKPKSU6M.js → lintProject-Q36Y3AHA.js} +2 -4
- package/dist/{list-M5GQSFVT.js → list-OFPDL2AM.js} +2 -2
- package/dist/{login-HBHGZIDN.js → login-MZAHGGP4.js} +4 -4
- package/dist/{manager-COSJVRAE.js → manager-F34TSFV6.js} +3 -3
- package/dist/{manager-VLIJARMF.js → manager-ZOFTZTRY.js} +10 -13
- package/dist/{media-treatment-RQZ437VS.js → media-treatment-PF67GSUD.js} +67 -43
- package/dist/{models-2CCKVBTR.js → models-WR7CL54R.js} +13 -16
- package/dist/{motionShot-3IFRSICA.js → motionShot-ISLDWLIU.js} +18 -21
- package/dist/{normalize-audio-23H2MBDP.js → normalize-audio-D7AH5GFZ.js} +45 -27
- package/dist/{open-J33KT3G7.js → open-HPVBB2CX.js} +15 -18
- package/dist/{parakeetRunner-QTXNEMVY.js → parakeetRunner-P6PE4WXG.js} +14 -17
- package/dist/{pipeline-2ECWWEBD.js → pipeline-XKBZG2CM.js} +10 -13
- package/dist/{play-G5777L7A.js → play-QXHO47ZH.js} +24 -27
- package/dist/{preflight-NVFB4HXQ.js → preflight-KZCU66ES.js} +12 -15
- package/dist/{present-4EI2BE4Z.js → present-ERGC5PR4.js} +20 -23
- package/dist/{preview-HYCIDZ52.js → preview-AGTOQIE7.js} +21 -24
- package/dist/{producer-6JAATJVD.js → producer-4ONVM5A2.js} +1 -1
- package/dist/{projectConfig-XPGN76VV.js → projectConfig-7T4VY6RJ.js} +8 -11
- package/dist/{publication-YRZ7EBUV.js → publication-J5TS5VR3.js} +4 -6
- package/dist/{publish-UIDHN7KD.js → publish-BSOVXRF4.js} +11 -14
- package/dist/{remove-background-LPQP4WBN.js → remove-background-645NVCGL.js} +11 -14
- package/dist/{render-LFJQNVCK.js → render-55TYPJ5U.js} +7 -9
- package/dist/{render-NZSNQFYW.js → render-IAVH33YG.js} +38 -34
- package/dist/{render-DT3OCUCV.js → render-R3L44QAP.js} +36 -38
- package/dist/{render-batch-QI2A45WH.js → render-batch-JWWLQ7ZC.js} +7 -9
- package/dist/renderSetupWorker.js +5 -7
- package/dist/{resolver-4YDXG4PP.js → resolver-DBAFWC4F.js} +6 -8
- package/dist/{sherpa-XLKWFYFO.js → sherpa-UPWG6TKY.js} +13 -16
- package/dist/skills/hyperframes/references/runtimes.md +26 -0
- package/dist/skills/media-use/references/mixing.md +1 -1
- package/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +38 -26
- package/dist/{skills-OVVLZHF5.js → skills-ILH52UL4.js} +7 -7
- package/dist/{skillsUpdateCheck-Y2UQA7I5.js → skillsUpdateCheck-ZHFDGMEL.js} +3 -3
- package/dist/{snapshot-7NVB5WSO.js → snapshot-WMVHIQVQ.js} +94 -61
- package/dist/{src-ACAFJXAJ.js → src-46QTOHZE.js} +11 -14
- package/dist/{src-QQPHMIJ7.js → src-HPLELQRK.js} +12 -11
- package/dist/{staticProjectServer-JUN6BRTW.js → staticProjectServer-FHP2YQFV.js} +19 -22
- package/dist/{status-H5WLKQDS.js → status-LR7VXITS.js} +2 -2
- package/dist/studio/assets/{hyperframes-player-BDtBfwof.js → hyperframes-player-BNeO6YSP.js} +1 -1
- package/dist/studio/assets/{index-BFfBBQMu.js → index-CZWE0FI8.js} +162 -162
- package/dist/studio/assets/{index--W_0fuR8.js → index-DiNYtcMK.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-D76Q4Q2N.js → studio-api-5YHQ4Y2D.js} +12 -15
- package/dist/{studioServer-HG3RFAOY.js → studioServer-P6IC76SV.js} +54 -57
- package/dist/{system-7F3UEHQT.js → system-YD4AW5ZX.js} +4 -3
- package/dist/{telemetry-Q2EHWVO4.js → telemetry-WZ7OGFWQ.js} +5 -5
- package/dist/{timeline-WDQCCETQ.js → timeline-U6S7BGMI.js} +24 -26
- package/dist/{tokens-2GJWP2HY.js → tokens-FPUYNZSV.js} +2 -2
- package/dist/{transcribe-Z63Y53GQ.js → transcribe-DJX4E2PE.js} +19 -22
- package/dist/{transcribe-SRLAY6RG.js → transcribe-DZHTKXI5.js} +12 -15
- package/dist/{updateCheck-MJ6NDE3T.js → updateCheck-2LHWRDE7.js} +2 -2
- package/dist/{upgrade-D5XEX3XE.js → upgrade-WAQHCAUS.js} +2 -2
- package/dist/{urlDownloader-R7BZ47TY.js → urlDownloader-HZQPXQET.js} +8 -11
- package/dist/{validate-F5BIDZLN.js → validate-D6XJ7OSS.js} +27 -30
- package/dist/{video-QUG5OG5Q.js → video-A4CQ4WDL.js} +9 -12
- package/dist/warmCheck.js +40 -43
- package/package.json +1 -1
- package/dist/chunk-2ONVJ7NT.js +0 -3901
- package/dist/chunk-BSQ7XANM.js +0 -210
- package/dist/chunk-PKZ7RK5N.js +0 -281
- package/dist/chunk-X7HBSTCZ.js +0 -53
package/dist/chunk-BSQ7XANM.js
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
-
var require = __hf_createRequire(import.meta.url);
|
|
5
|
-
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
|
|
8
|
-
// ../parsers/dist/mediaDuration.js
|
|
9
|
-
var COMPOSITION_ATTRIBUTES = Object.freeze({
|
|
10
|
-
start: "data-start",
|
|
11
|
-
duration: "data-duration",
|
|
12
|
-
trackIndex: "data-track-index",
|
|
13
|
-
derivedEnd: "data-end",
|
|
14
|
-
legacyTrack: "data-layer"
|
|
15
|
-
});
|
|
16
|
-
var CANONICAL_AUTHORED_TIMING_ATTRIBUTES = Object.freeze([
|
|
17
|
-
COMPOSITION_ATTRIBUTES.start,
|
|
18
|
-
COMPOSITION_ATTRIBUTES.duration,
|
|
19
|
-
COMPOSITION_ATTRIBUTES.trackIndex
|
|
20
|
-
]);
|
|
21
|
-
var DERIVED_TIMING_ATTRIBUTES = Object.freeze([
|
|
22
|
-
COMPOSITION_ATTRIBUTES.derivedEnd
|
|
23
|
-
]);
|
|
24
|
-
var LEGACY_TIMING_ATTRIBUTES = Object.freeze([
|
|
25
|
-
COMPOSITION_ATTRIBUTES.derivedEnd,
|
|
26
|
-
COMPOSITION_ATTRIBUTES.legacyTrack
|
|
27
|
-
]);
|
|
28
|
-
function parseNumeric(value) {
|
|
29
|
-
if (value == null || value.trim() === "") return null;
|
|
30
|
-
const parsed = Number(value);
|
|
31
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
32
|
-
}
|
|
33
|
-
var nonNegative = (raw) => {
|
|
34
|
-
const value = parseNumeric(raw);
|
|
35
|
-
return value !== null && value >= 0 ? value : null;
|
|
36
|
-
};
|
|
37
|
-
function readMediaOffsetSeconds(getAttr) {
|
|
38
|
-
return nonNegative(getAttr("data-playback-start")) ?? nonNegative(getAttr("data-media-start")) ?? 0;
|
|
39
|
-
}
|
|
40
|
-
var MIN_PLAYBACK_RATE = 0.1;
|
|
41
|
-
var MAX_PLAYBACK_RATE = 10;
|
|
42
|
-
function clampPlaybackRate(raw) {
|
|
43
|
-
return Number.isFinite(raw) && raw > 0 ? Math.max(MIN_PLAYBACK_RATE, Math.min(MAX_PLAYBACK_RATE, raw)) : 1;
|
|
44
|
-
}
|
|
45
|
-
function readPlaybackRate(getAttr, fallback = 1) {
|
|
46
|
-
const authored = Number.parseFloat(getAttr("data-playback-rate") ?? "");
|
|
47
|
-
return clampPlaybackRate(Number.isFinite(authored) && authored > 0 ? authored : fallback);
|
|
48
|
-
}
|
|
49
|
-
function readDataDurationSeconds(getAttr) {
|
|
50
|
-
const duration = parseNumeric(getAttr("data-duration"));
|
|
51
|
-
return duration !== null && duration > 0 ? duration : null;
|
|
52
|
-
}
|
|
53
|
-
function readAuthoredDurationSeconds(getAttr, startSeconds) {
|
|
54
|
-
const duration = readDataDurationSeconds(getAttr);
|
|
55
|
-
if (duration !== null) return duration;
|
|
56
|
-
const end = parseNumeric(getAttr("data-end"));
|
|
57
|
-
return end !== null ? end - startSeconds : null;
|
|
58
|
-
}
|
|
59
|
-
var DEFAULT_IMAGE_TIMELINE_DURATION_SECONDS = 3;
|
|
60
|
-
function resolveNaturalDurationSeconds(sourceDurationSeconds, mediaStartSeconds, playbackRate) {
|
|
61
|
-
if (!Number.isFinite(sourceDurationSeconds)) return null;
|
|
62
|
-
const remaining = Math.max(0, sourceDurationSeconds - mediaStartSeconds);
|
|
63
|
-
return remaining / clampPlaybackRate(playbackRate);
|
|
64
|
-
}
|
|
65
|
-
function resolveMediaDuration(input) {
|
|
66
|
-
const { tag, authoredDurationSeconds, sourceDurationSeconds, mediaStartSeconds, playbackRate } = input;
|
|
67
|
-
if (authoredDurationSeconds !== null && authoredDurationSeconds > 0) {
|
|
68
|
-
return { seconds: authoredDurationSeconds, source: "authored" };
|
|
69
|
-
}
|
|
70
|
-
if (tag === "img") {
|
|
71
|
-
return { seconds: DEFAULT_IMAGE_TIMELINE_DURATION_SECONDS, source: "default" };
|
|
72
|
-
}
|
|
73
|
-
if (sourceDurationSeconds === null) {
|
|
74
|
-
return { seconds: null, source: "pending", reason: "source duration not yet probed" };
|
|
75
|
-
}
|
|
76
|
-
const seconds = resolveNaturalDurationSeconds(
|
|
77
|
-
sourceDurationSeconds,
|
|
78
|
-
mediaStartSeconds,
|
|
79
|
-
playbackRate
|
|
80
|
-
);
|
|
81
|
-
if (seconds === null) {
|
|
82
|
-
return { seconds: null, source: "pending", reason: "source reported a non-finite duration" };
|
|
83
|
-
}
|
|
84
|
-
return { seconds, source: "media" };
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// ../parsers/dist/assets.js
|
|
88
|
-
import { isAbsolute, relative, resolve } from "path";
|
|
89
|
-
import { posix } from "path";
|
|
90
|
-
function decodeWellFormedEscapes(path) {
|
|
91
|
-
return path.replace(/(?:%[0-9A-Fa-f]{2})+/g, (run) => {
|
|
92
|
-
try {
|
|
93
|
-
return decodeURIComponent(run);
|
|
94
|
-
} catch {
|
|
95
|
-
return run;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function splitUrlSuffix(urlValue) {
|
|
100
|
-
const queryIdx = urlValue.indexOf("?");
|
|
101
|
-
const hashIdx = urlValue.indexOf("#");
|
|
102
|
-
if (queryIdx < 0 && hashIdx < 0) return { basePath: urlValue, suffix: "" };
|
|
103
|
-
let cutIdx = urlValue.length;
|
|
104
|
-
if (queryIdx >= 0) cutIdx = Math.min(cutIdx, queryIdx);
|
|
105
|
-
if (hashIdx >= 0) cutIdx = Math.min(cutIdx, hashIdx);
|
|
106
|
-
return { basePath: urlValue.slice(0, cutIdx), suffix: urlValue.slice(cutIdx) };
|
|
107
|
-
}
|
|
108
|
-
function decodedUrlPath(url) {
|
|
109
|
-
return decodeWellFormedEscapes(splitUrlSuffix(url).basePath);
|
|
110
|
-
}
|
|
111
|
-
function encodeUrlPath(path) {
|
|
112
|
-
return encodeURIComponent(path).replace(/%2F/g, "/").replace(/['()]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
113
|
-
}
|
|
114
|
-
function decodeCssEscapes(text) {
|
|
115
|
-
return text.replaceAll("\0", "\uFFFD").replace(
|
|
116
|
-
/\\(?:([0-9a-f]{1,6})(?:\r\n|[ \t\r\n\f])?|(\r\n|[\n\r\f])|([\s\S]))/gi,
|
|
117
|
-
(_escaped, hex, lineBreak, char) => {
|
|
118
|
-
if (hex === void 0) return lineBreak === void 0 ? char : "";
|
|
119
|
-
const code = Number.parseInt(hex, 16);
|
|
120
|
-
if (code === 0 || code > 1114111 || code >= 55296 && code <= 57343) return "\uFFFD";
|
|
121
|
-
return String.fromCodePoint(code);
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
var CSS_URL_RE = /\burl\(\s*(["']?)([^)"'\s](?:[^)"']*[^)"'\s])?)\1\s*\)/g;
|
|
126
|
-
var PATH_ATTRS = ["src", "href"];
|
|
127
|
-
function isNonRelativeUrl(val) {
|
|
128
|
-
return !val || val.startsWith("http://") || val.startsWith("https://") || val.startsWith("//") || val.startsWith("data:") || val.startsWith("#") || val.startsWith("/");
|
|
129
|
-
}
|
|
130
|
-
function isPathInside(childPath, parentPath) {
|
|
131
|
-
const absChild = resolve(childPath);
|
|
132
|
-
const absParent = resolve(parentPath);
|
|
133
|
-
if (absChild === absParent) return true;
|
|
134
|
-
const rel = relative(absParent, absChild);
|
|
135
|
-
return rel !== "" && !rel.startsWith("..") && !isAbsolute(rel);
|
|
136
|
-
}
|
|
137
|
-
var { join, resolve: resolve2, dirname } = posix;
|
|
138
|
-
var isAbsoluteOrSpecial = isNonRelativeUrl;
|
|
139
|
-
function needsRewrite(val) {
|
|
140
|
-
return val.startsWith("../") || val === "..";
|
|
141
|
-
}
|
|
142
|
-
function rewriteAssetPath(compSrcPath, relativePath, assetExists) {
|
|
143
|
-
if (isAbsoluteOrSpecial(relativePath)) return relativePath;
|
|
144
|
-
const compDir = dirname(compSrcPath);
|
|
145
|
-
if (!compDir || compDir === ".") return relativePath;
|
|
146
|
-
const { basePath, suffix } = splitUrlSuffix(relativePath);
|
|
147
|
-
const slashed = basePath.replace(/\\/g, "/");
|
|
148
|
-
if (!slashed || slashed.startsWith("/")) return relativePath;
|
|
149
|
-
const filePath = decodeWellFormedEscapes(slashed);
|
|
150
|
-
const sibling = resolve2("/", join(compDir, filePath)).slice(1);
|
|
151
|
-
if (!needsRewrite(filePath) && (!assetExists || !assetExists(sibling))) return relativePath;
|
|
152
|
-
return encodeUrlPath(sibling) + suffix;
|
|
153
|
-
}
|
|
154
|
-
function rewriteAssetPaths(elements, compSrcPath, getAttr, setAttr, assetExists) {
|
|
155
|
-
for (const el of elements) {
|
|
156
|
-
for (const attr of PATH_ATTRS) {
|
|
157
|
-
const val = (getAttr(el, attr) || "").trim();
|
|
158
|
-
const rewritten = rewriteAssetPath(compSrcPath, val, assetExists);
|
|
159
|
-
if (rewritten !== val) {
|
|
160
|
-
setAttr(el, attr, rewritten);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function rewriteInlineStyleAssetUrls(elements, compSrcPath, getStyle, setStyle, assetExists) {
|
|
166
|
-
const compDir = dirname(compSrcPath);
|
|
167
|
-
if (!compDir || compDir === ".") return;
|
|
168
|
-
for (const el of elements) {
|
|
169
|
-
const style = getStyle(el);
|
|
170
|
-
if (!style) continue;
|
|
171
|
-
const rewritten = rewriteCssAssetUrls(style, compSrcPath, assetExists);
|
|
172
|
-
if (rewritten !== style) {
|
|
173
|
-
setStyle(el, rewritten);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function rewriteCssAssetUrls(cssText, compSrcPath, assetExists) {
|
|
178
|
-
if (!cssText) return cssText;
|
|
179
|
-
return cssText.replace(CSS_URL_RE, (full, quote, rawUrl) => {
|
|
180
|
-
const urlValue = (rawUrl || "").trim();
|
|
181
|
-
const rewritten = rewriteAssetPath(compSrcPath, urlValue, assetExists);
|
|
182
|
-
if (rewritten === urlValue) return full;
|
|
183
|
-
return `url(${quote || ""}${rewritten}${quote || ""})`;
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export {
|
|
188
|
-
readMediaOffsetSeconds,
|
|
189
|
-
MIN_PLAYBACK_RATE,
|
|
190
|
-
MAX_PLAYBACK_RATE,
|
|
191
|
-
clampPlaybackRate,
|
|
192
|
-
readPlaybackRate,
|
|
193
|
-
readDataDurationSeconds,
|
|
194
|
-
readAuthoredDurationSeconds,
|
|
195
|
-
resolveNaturalDurationSeconds,
|
|
196
|
-
resolveMediaDuration,
|
|
197
|
-
decodeWellFormedEscapes,
|
|
198
|
-
splitUrlSuffix,
|
|
199
|
-
decodedUrlPath,
|
|
200
|
-
encodeUrlPath,
|
|
201
|
-
decodeCssEscapes,
|
|
202
|
-
CSS_URL_RE,
|
|
203
|
-
PATH_ATTRS,
|
|
204
|
-
isNonRelativeUrl,
|
|
205
|
-
isPathInside,
|
|
206
|
-
rewriteAssetPath,
|
|
207
|
-
rewriteAssetPaths,
|
|
208
|
-
rewriteInlineStyleAssetUrls,
|
|
209
|
-
rewriteCssAssetUrls
|
|
210
|
-
};
|
package/dist/chunk-PKZ7RK5N.js
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
-
var require = __hf_createRequire(import.meta.url);
|
|
5
|
-
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
simple
|
|
9
|
-
} from "./chunk-RXATE6FZ.js";
|
|
10
|
-
|
|
11
|
-
// ../parsers/dist/composition.js
|
|
12
|
-
import * as acorn from "acorn";
|
|
13
|
-
import * as acorn2 from "acorn";
|
|
14
|
-
var CANVAS_DIMENSIONS = {
|
|
15
|
-
landscape: { width: 1920, height: 1080 },
|
|
16
|
-
portrait: { width: 1080, height: 1920 },
|
|
17
|
-
"landscape-4k": { width: 3840, height: 2160 },
|
|
18
|
-
"portrait-4k": { width: 2160, height: 3840 },
|
|
19
|
-
square: { width: 1080, height: 1080 },
|
|
20
|
-
"square-4k": { width: 2160, height: 2160 },
|
|
21
|
-
"landscape-720p": { width: 1280, height: 720 },
|
|
22
|
-
"portrait-720p": { width: 720, height: 1280 },
|
|
23
|
-
"square-720p": { width: 720, height: 720 },
|
|
24
|
-
// 480 tall at 16:9 is 853.33 wide: 854 keeps both sides even for 4:2:0 encoders.
|
|
25
|
-
"landscape-480p": { width: 854, height: 480 },
|
|
26
|
-
"portrait-480p": { width: 480, height: 854 },
|
|
27
|
-
"square-480p": { width: 480, height: 480 }
|
|
28
|
-
};
|
|
29
|
-
var VALID_CANVAS_RESOLUTIONS = Object.keys(
|
|
30
|
-
CANVAS_DIMENSIONS
|
|
31
|
-
);
|
|
32
|
-
var COMPOSITION_VARIABLE_TYPES = [
|
|
33
|
-
"string",
|
|
34
|
-
"number",
|
|
35
|
-
"color",
|
|
36
|
-
"boolean",
|
|
37
|
-
"enum",
|
|
38
|
-
"font",
|
|
39
|
-
"image"
|
|
40
|
-
];
|
|
41
|
-
var FONT_ALIAS_MAP = {
|
|
42
|
-
// ── Canonical bundled fonts (self-referencing) ────────────────────────
|
|
43
|
-
inter: "inter",
|
|
44
|
-
montserrat: "montserrat",
|
|
45
|
-
outfit: "outfit",
|
|
46
|
-
nunito: "nunito",
|
|
47
|
-
oswald: "oswald",
|
|
48
|
-
"league gothic": "league-gothic",
|
|
49
|
-
"archivo black": "archivo-black",
|
|
50
|
-
"space mono": "space-mono",
|
|
51
|
-
"ibm plex mono": "ibm-plex-mono",
|
|
52
|
-
"jetbrains mono": "jetbrains-mono",
|
|
53
|
-
"eb garamond": "eb-garamond",
|
|
54
|
-
"playfair display": "playfair-display",
|
|
55
|
-
"source code pro": "source-code-pro",
|
|
56
|
-
"noto sans jp": "noto-sans-jp",
|
|
57
|
-
roboto: "roboto",
|
|
58
|
-
"open sans": "open-sans",
|
|
59
|
-
lato: "lato",
|
|
60
|
-
poppins: "poppins",
|
|
61
|
-
// ── Common aliases → nearest canonical ────────────────────────────────
|
|
62
|
-
"helvetica neue": "inter",
|
|
63
|
-
helvetica: "inter",
|
|
64
|
-
arial: "inter",
|
|
65
|
-
"helvetica bold": "inter",
|
|
66
|
-
futura: "montserrat",
|
|
67
|
-
"din alternate": "montserrat",
|
|
68
|
-
"arial black": "montserrat",
|
|
69
|
-
"bebas neue": "league-gothic",
|
|
70
|
-
"courier new": "jetbrains-mono",
|
|
71
|
-
courier: "jetbrains-mono",
|
|
72
|
-
garamond: "eb-garamond",
|
|
73
|
-
"noto sans japanese": "noto-sans-jp",
|
|
74
|
-
"segoe ui": "roboto",
|
|
75
|
-
// ── macOS sans-serif system fonts → inter ─────────────────────────────
|
|
76
|
-
"sf pro": "inter",
|
|
77
|
-
"sf pro display": "inter",
|
|
78
|
-
"sf pro text": "inter",
|
|
79
|
-
"sf pro rounded": "inter",
|
|
80
|
-
avenir: "inter",
|
|
81
|
-
"avenir next": "inter",
|
|
82
|
-
"lucida grande": "inter",
|
|
83
|
-
geneva: "inter",
|
|
84
|
-
optima: "inter",
|
|
85
|
-
// ── Windows sans-serif system fonts → inter ───────────────────────────
|
|
86
|
-
verdana: "inter",
|
|
87
|
-
tahoma: "inter",
|
|
88
|
-
"trebuchet ms": "inter",
|
|
89
|
-
calibri: "inter",
|
|
90
|
-
candara: "inter",
|
|
91
|
-
corbel: "inter",
|
|
92
|
-
"lucida sans": "inter",
|
|
93
|
-
"lucida sans unicode": "inter",
|
|
94
|
-
// ── Linux sans-serif system fonts → inter ─────────────────────────────
|
|
95
|
-
"noto sans": "inter",
|
|
96
|
-
"dejavu sans": "inter",
|
|
97
|
-
"liberation sans": "inter",
|
|
98
|
-
// ── Monospace system fonts → jetbrains-mono ───────────────────────────
|
|
99
|
-
"sf mono": "jetbrains-mono",
|
|
100
|
-
menlo: "jetbrains-mono",
|
|
101
|
-
monaco: "jetbrains-mono",
|
|
102
|
-
consolas: "jetbrains-mono",
|
|
103
|
-
"lucida console": "jetbrains-mono",
|
|
104
|
-
"lucida sans typewriter": "jetbrains-mono",
|
|
105
|
-
"andale mono": "jetbrains-mono",
|
|
106
|
-
"dejavu sans mono": "jetbrains-mono",
|
|
107
|
-
"liberation mono": "jetbrains-mono",
|
|
108
|
-
// ── Serif system fonts → eb-garamond ──────────────────────────────────
|
|
109
|
-
georgia: "eb-garamond",
|
|
110
|
-
palatino: "eb-garamond",
|
|
111
|
-
"palatino linotype": "eb-garamond",
|
|
112
|
-
"book antiqua": "eb-garamond",
|
|
113
|
-
cambria: "eb-garamond",
|
|
114
|
-
times: "eb-garamond",
|
|
115
|
-
"times new roman": "eb-garamond",
|
|
116
|
-
"dejavu serif": "eb-garamond",
|
|
117
|
-
"liberation serif": "eb-garamond"
|
|
118
|
-
};
|
|
119
|
-
var FONT_ALIAS_KEYS = new Set(Object.keys(FONT_ALIAS_MAP));
|
|
120
|
-
var CANONICAL_FONT_DISPLAY_NAMES = {
|
|
121
|
-
inter: "Inter",
|
|
122
|
-
montserrat: "Montserrat",
|
|
123
|
-
outfit: "Outfit",
|
|
124
|
-
nunito: "Nunito",
|
|
125
|
-
oswald: "Oswald",
|
|
126
|
-
"league-gothic": "League Gothic",
|
|
127
|
-
"archivo-black": "Archivo Black",
|
|
128
|
-
"space-mono": "Space Mono",
|
|
129
|
-
"ibm-plex-mono": "IBM Plex Mono",
|
|
130
|
-
"jetbrains-mono": "JetBrains Mono",
|
|
131
|
-
"eb-garamond": "EB Garamond",
|
|
132
|
-
"playfair-display": "Playfair Display",
|
|
133
|
-
"source-code-pro": "Source Code Pro",
|
|
134
|
-
"noto-sans-jp": "Noto Sans JP",
|
|
135
|
-
roboto: "Roboto",
|
|
136
|
-
"open-sans": "Open Sans",
|
|
137
|
-
lato: "Lato",
|
|
138
|
-
poppins: "Poppins"
|
|
139
|
-
};
|
|
140
|
-
function resolveAliasDisplayName(alias) {
|
|
141
|
-
const slug = FONT_ALIAS_MAP[alias.toLowerCase()];
|
|
142
|
-
if (!slug) return void 0;
|
|
143
|
-
return CANONICAL_FONT_DISPLAY_NAMES[slug];
|
|
144
|
-
}
|
|
145
|
-
var DEFAULT_TYPEOF = {
|
|
146
|
-
string: "string",
|
|
147
|
-
number: "number",
|
|
148
|
-
color: "string",
|
|
149
|
-
boolean: "boolean",
|
|
150
|
-
enum: "string",
|
|
151
|
-
font: "string",
|
|
152
|
-
image: "string"
|
|
153
|
-
};
|
|
154
|
-
function isRecord(v) {
|
|
155
|
-
return typeof v === "object" && v !== null;
|
|
156
|
-
}
|
|
157
|
-
function isVariableType(t) {
|
|
158
|
-
return typeof t === "string" && t in DEFAULT_TYPEOF;
|
|
159
|
-
}
|
|
160
|
-
function isCompositionVariable(v) {
|
|
161
|
-
if (!isRecord(v)) return false;
|
|
162
|
-
if (typeof v.id !== "string" || typeof v.label !== "string") return false;
|
|
163
|
-
if (!isVariableType(v.type)) return false;
|
|
164
|
-
if (typeof v.default !== DEFAULT_TYPEOF[v.type]) return false;
|
|
165
|
-
if (v.type === "enum" && !Array.isArray(v.options)) return false;
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
function isSafeMediaUrl(url) {
|
|
169
|
-
const normalized = url.replace(/[\u0000-\u0020]/g, "");
|
|
170
|
-
const scheme = /^([a-z][a-z0-9+.-]*):/i.exec(normalized);
|
|
171
|
-
if (!scheme) return true;
|
|
172
|
-
const proto = scheme[1]?.toLowerCase();
|
|
173
|
-
if (!proto) return false;
|
|
174
|
-
if (proto === "https" || proto === "http" || proto === "blob") return true;
|
|
175
|
-
if (proto === "data") return /^data:image\//i.test(normalized);
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
var COMPOSITION_ATTRIBUTES = Object.freeze({
|
|
179
|
-
start: "data-start",
|
|
180
|
-
duration: "data-duration",
|
|
181
|
-
trackIndex: "data-track-index",
|
|
182
|
-
derivedEnd: "data-end",
|
|
183
|
-
legacyTrack: "data-layer"
|
|
184
|
-
});
|
|
185
|
-
var CANONICAL_AUTHORED_TIMING_ATTRIBUTES = Object.freeze([
|
|
186
|
-
COMPOSITION_ATTRIBUTES.start,
|
|
187
|
-
COMPOSITION_ATTRIBUTES.duration,
|
|
188
|
-
COMPOSITION_ATTRIBUTES.trackIndex
|
|
189
|
-
]);
|
|
190
|
-
var DERIVED_TIMING_ATTRIBUTES = Object.freeze([
|
|
191
|
-
COMPOSITION_ATTRIBUTES.derivedEnd
|
|
192
|
-
]);
|
|
193
|
-
var LEGACY_TIMING_ATTRIBUTES = Object.freeze([
|
|
194
|
-
COMPOSITION_ATTRIBUTES.derivedEnd,
|
|
195
|
-
COMPOSITION_ATTRIBUTES.legacyTrack
|
|
196
|
-
]);
|
|
197
|
-
var HTML_BODY_CSS_WIDTH_FIRST_RE = /(html\s*,\s*body\s*\{[^}]*?width:\s*)(\d+)px([^}]*?height:\s*)(\d+)px/i;
|
|
198
|
-
var HTML_BODY_CSS_HEIGHT_FIRST_RE = /(html\s*,\s*body\s*\{[^}]*?height:\s*)(\d+)px([^}]*?width:\s*)(\d+)px/i;
|
|
199
|
-
var VIEWPORT_META_SIZE_RE = /(<meta[^>]*name=["']viewport["'][^>]*content=["']width=)(\d+)(,\s*height=)(\d+)/i;
|
|
200
|
-
function parseProgram(script) {
|
|
201
|
-
try {
|
|
202
|
-
return acorn2.parse(script, { ecmaVersion: "latest", sourceType: "script" });
|
|
203
|
-
} catch {
|
|
204
|
-
return acorn2.parse(script, { ecmaVersion: "latest", sourceType: "module" });
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
function literalString(node) {
|
|
208
|
-
if (node?.type === "Literal" && typeof node.value === "string") return node.value;
|
|
209
|
-
if (node?.type === "TemplateLiteral" && node.expressions?.length === 0) {
|
|
210
|
-
return node.quasis?.[0]?.value?.cooked;
|
|
211
|
-
}
|
|
212
|
-
return void 0;
|
|
213
|
-
}
|
|
214
|
-
function memberName(node) {
|
|
215
|
-
if (node?.type !== "MemberExpression") return void 0;
|
|
216
|
-
if (!node.computed && node.property?.type === "Identifier") return node.property.name;
|
|
217
|
-
return literalString(node.property);
|
|
218
|
-
}
|
|
219
|
-
function lookupSelector(node, bindings) {
|
|
220
|
-
if (node?.type === "Identifier") return bindings.get(node.name);
|
|
221
|
-
if (node?.type !== "CallExpression" || node.callee?.type !== "MemberExpression") {
|
|
222
|
-
return void 0;
|
|
223
|
-
}
|
|
224
|
-
const method = memberName(node.callee);
|
|
225
|
-
if (method !== "getElementById" && method !== "querySelector") return void 0;
|
|
226
|
-
const value = literalString(node.arguments?.[0]);
|
|
227
|
-
if (!value) return void 0;
|
|
228
|
-
return method === "getElementById" ? `#${value}` : value;
|
|
229
|
-
}
|
|
230
|
-
function extractMediaSrcMutations(script) {
|
|
231
|
-
try {
|
|
232
|
-
const ast = parseProgram(script);
|
|
233
|
-
const bindings = /* @__PURE__ */ new Map();
|
|
234
|
-
simple(ast, {
|
|
235
|
-
VariableDeclarator(node) {
|
|
236
|
-
if (node.id?.type !== "Identifier") return;
|
|
237
|
-
const selector = lookupSelector(node.init, bindings);
|
|
238
|
-
if (selector) bindings.set(node.id.name, selector);
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
const mutations = [];
|
|
242
|
-
simple(ast, {
|
|
243
|
-
AssignmentExpression(node) {
|
|
244
|
-
if (node.operator !== "=" || memberName(node.left) !== "src") return;
|
|
245
|
-
const selector = lookupSelector(node.left.object, bindings);
|
|
246
|
-
if (!selector) return;
|
|
247
|
-
mutations.push({
|
|
248
|
-
selector,
|
|
249
|
-
operation: "src_assignment",
|
|
250
|
-
raw: script.slice(node.start, node.end)
|
|
251
|
-
});
|
|
252
|
-
},
|
|
253
|
-
CallExpression(node) {
|
|
254
|
-
if (memberName(node.callee) !== "setAttribute") return;
|
|
255
|
-
if (literalString(node.arguments?.[0])?.toLowerCase() !== "src") return;
|
|
256
|
-
const selector = lookupSelector(node.callee.object, bindings);
|
|
257
|
-
if (!selector) return;
|
|
258
|
-
mutations.push({
|
|
259
|
-
selector,
|
|
260
|
-
operation: "set_attribute",
|
|
261
|
-
raw: script.slice(node.start, node.end)
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
return mutations;
|
|
266
|
-
} catch {
|
|
267
|
-
return [];
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export {
|
|
272
|
-
COMPOSITION_VARIABLE_TYPES,
|
|
273
|
-
FONT_ALIAS_KEYS,
|
|
274
|
-
resolveAliasDisplayName,
|
|
275
|
-
isCompositionVariable,
|
|
276
|
-
isSafeMediaUrl,
|
|
277
|
-
HTML_BODY_CSS_WIDTH_FIRST_RE,
|
|
278
|
-
HTML_BODY_CSS_HEIGHT_FIRST_RE,
|
|
279
|
-
VIEWPORT_META_SIZE_RE,
|
|
280
|
-
extractMediaSrcMutations
|
|
281
|
-
};
|
package/dist/chunk-X7HBSTCZ.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createRequire as __hf_createRequire } from "node:module";
|
|
2
|
-
import { fileURLToPath as __hf_fileURLToPath } from "node:url";
|
|
3
|
-
import { dirname as __hf_dirname } from "node:path";
|
|
4
|
-
var require = __hf_createRequire(import.meta.url);
|
|
5
|
-
var __filename = __hf_fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = __hf_dirname(__filename);
|
|
7
|
-
|
|
8
|
-
// ../core/dist/audibleVideo.js
|
|
9
|
-
var AUDIBLE_VIDEO_QUALIFIER = ':not([muted]):is(:not([data-has-audio]),[data-has-audio="true"])';
|
|
10
|
-
var AUDIBLE_MEDIA_SELECTOR = `audio[data-start], video[data-start]${AUDIBLE_VIDEO_QUALIFIER}`;
|
|
11
|
-
function isAudibleVideoElement(el) {
|
|
12
|
-
if (el.tagName.toLowerCase() !== "video" || el.hasAttribute("muted"))
|
|
13
|
-
return false;
|
|
14
|
-
const declared = el.getAttribute("data-has-audio");
|
|
15
|
-
return declared === null || declared === "true";
|
|
16
|
-
}
|
|
17
|
-
function audibleVideoNeedsWebAudio(fields) {
|
|
18
|
-
return (fields.volume ?? 1) > 1 || Boolean(fields.fxChain || fields.automation || fields.audioGroup || fields.masterChain);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// ../core/dist/audioGain.js
|
|
22
|
-
var MAX_AUDIO_GAIN_DB = 12;
|
|
23
|
-
function audioDbToGain(db) {
|
|
24
|
-
return 10 ** (db / 20);
|
|
25
|
-
}
|
|
26
|
-
var MAX_AUDIO_GAIN = audioDbToGain(MAX_AUDIO_GAIN_DB);
|
|
27
|
-
function clampAudioGain(value) {
|
|
28
|
-
if (!Number.isFinite(value))
|
|
29
|
-
return 1;
|
|
30
|
-
return Math.max(0, Math.min(MAX_AUDIO_GAIN, value));
|
|
31
|
-
}
|
|
32
|
-
function gainTimesLane(gain, lane) {
|
|
33
|
-
return clampAudioGain(gain * lane);
|
|
34
|
-
}
|
|
35
|
-
function clipGain(volume, tweened) {
|
|
36
|
-
return tweened ? 1 : clampAudioGain(volume);
|
|
37
|
-
}
|
|
38
|
-
function formatAudioGain(gain) {
|
|
39
|
-
return clampAudioGain(gain).toFixed(6).replace(/\.?0+$/, "");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
MAX_AUDIO_GAIN_DB,
|
|
44
|
-
MAX_AUDIO_GAIN,
|
|
45
|
-
clampAudioGain,
|
|
46
|
-
gainTimesLane,
|
|
47
|
-
clipGain,
|
|
48
|
-
formatAudioGain,
|
|
49
|
-
AUDIBLE_VIDEO_QUALIFIER,
|
|
50
|
-
AUDIBLE_MEDIA_SELECTOR,
|
|
51
|
-
isAudibleVideoElement,
|
|
52
|
-
audibleVideoNeedsWebAudio
|
|
53
|
-
};
|