@softure-ai/marketing-kit 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +90 -11
- package/dist/cli/footage.d.ts.map +1 -1
- package/dist/cli/footage.js +5 -2
- package/dist/cli/footage.js.map +1 -1
- package/dist/compose/compose.d.ts.map +1 -1
- package/dist/compose/compose.js +3 -3
- package/dist/compose/compose.js.map +1 -1
- package/dist/compose/timeline.d.ts +16 -0
- package/dist/compose/timeline.d.ts.map +1 -1
- package/dist/compose/timeline.js +17 -1
- package/dist/compose/timeline.js.map +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +18 -2
- package/dist/config/config.js.map +1 -1
- package/dist/config/schema.d.ts +16 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +50 -3
- package/dist/config/schema.js.map +1 -1
- package/dist/footage/captions.d.ts +5 -1
- package/dist/footage/captions.d.ts.map +1 -1
- package/dist/footage/captions.js +6 -2
- package/dist/footage/captions.js.map +1 -1
- package/dist/footage/compose.d.ts +13 -2
- package/dist/footage/compose.d.ts.map +1 -1
- package/dist/footage/compose.js +75 -23
- package/dist/footage/compose.js.map +1 -1
- package/dist/footage/cuts.d.ts +44 -0
- package/dist/footage/cuts.d.ts.map +1 -0
- package/dist/footage/cuts.js +83 -0
- package/dist/footage/cuts.js.map +1 -0
- package/dist/footage/draft.d.ts +17 -3
- package/dist/footage/draft.d.ts.map +1 -1
- package/dist/footage/draft.js +28 -14
- package/dist/footage/draft.js.map +1 -1
- package/dist/footage/edl.d.ts +2 -1
- package/dist/footage/edl.d.ts.map +1 -1
- package/dist/footage/edl.js +5 -2
- package/dist/footage/edl.js.map +1 -1
- package/dist/footage/film.d.ts +42 -3
- package/dist/footage/film.d.ts.map +1 -1
- package/dist/footage/film.js +7 -1
- package/dist/footage/film.js.map +1 -1
- package/dist/footage/loudness.d.ts +20 -3
- package/dist/footage/loudness.d.ts.map +1 -1
- package/dist/footage/loudness.js +36 -18
- package/dist/footage/loudness.js.map +1 -1
- package/dist/footage/music.d.ts +3 -0
- package/dist/footage/music.d.ts.map +1 -1
- package/dist/footage/music.js +5 -0
- package/dist/footage/music.js.map +1 -1
- package/dist/footage/normalize.d.ts +27 -7
- package/dist/footage/normalize.d.ts.map +1 -1
- package/dist/footage/normalize.js +39 -19
- package/dist/footage/normalize.js.map +1 -1
- package/dist/footage/picture.d.ts +42 -0
- package/dist/footage/picture.d.ts.map +1 -0
- package/dist/footage/picture.js +141 -0
- package/dist/footage/picture.js.map +1 -0
- package/dist/footage/pipeline.d.ts +55 -1
- package/dist/footage/pipeline.d.ts.map +1 -1
- package/dist/footage/pipeline.js +136 -19
- package/dist/footage/pipeline.js.map +1 -1
- package/dist/footage/publish.d.ts +4 -2
- package/dist/footage/publish.d.ts.map +1 -1
- package/dist/footage/publish.js +8 -5
- package/dist/footage/publish.js.map +1 -1
- package/dist/footage/render.d.ts +17 -2
- package/dist/footage/render.d.ts.map +1 -1
- package/dist/footage/render.js +62 -13
- package/dist/footage/render.js.map +1 -1
- package/dist/footage/tonemap-lut.d.ts +45 -0
- package/dist/footage/tonemap-lut.d.ts.map +1 -0
- package/dist/footage/tonemap-lut.js +100 -0
- package/dist/footage/tonemap-lut.js.map +1 -0
- package/dist/footage/tools.d.ts +4 -4
- package/dist/footage/tools.d.ts.map +1 -1
- package/dist/footage/tools.js +4 -4
- package/dist/footage/tools.js.map +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/docker/footage-worker.Dockerfile +1 -0
- package/package.json +1 -1
- package/schema/marketing.schema.json +105 -4
- package/src/cli/footage.ts +4 -2
- package/src/compose/compose.ts +13 -3
- package/src/compose/timeline.ts +27 -1
- package/src/config/config.ts +18 -2
- package/src/config/schema.ts +52 -3
- package/src/footage/captions.ts +6 -2
- package/src/footage/compose.ts +86 -23
- package/src/footage/cuts.ts +104 -0
- package/src/footage/draft.ts +43 -14
- package/src/footage/edl.ts +5 -2
- package/src/footage/film.ts +47 -4
- package/src/footage/loudness.ts +38 -16
- package/src/footage/music.ts +7 -0
- package/src/footage/normalize.ts +47 -22
- package/src/footage/picture.ts +179 -0
- package/src/footage/pipeline.ts +179 -22
- package/src/footage/publish.ts +8 -5
- package/src/footage/render.ts +72 -13
- package/src/footage/tonemap-lut.ts +109 -0
- package/src/footage/tools.ts +4 -4
- package/src/index.ts +37 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captions.js","sourceRoot":"","sources":["../../src/footage/captions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,aAAa,EAA2C,MAAM,wBAAwB,CAAC;AAEhG,OAAO,EAAE,gBAAgB,EAAqB,MAAM,wBAAwB,CAAC;AAgB7E,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,iEAAiE;AACjE,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAkB;IAC7C,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,IAAI,OAAO,GAAgB,EAAE,CAAC;IAC9B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAClC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,GAAG,kBAAkB,EAAE,CAAC;YACnG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACrB,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,OAAO,C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M,KAAK,IAAI,OAAO;QAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACvH,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -4,14 +4,20 @@ import type { ComposeFont } from "../compose/compose.js";
|
|
|
4
4
|
import { type CaptionLayout } from "../compose/timeline.js";
|
|
5
5
|
import type { TimedWord } from "../voice/voiceover.js";
|
|
6
6
|
import { type Edl } from "./edl.js";
|
|
7
|
-
import { type FootageFilm } from "./film.js";
|
|
7
|
+
import { type FootageEdit, type FootageFilm } from "./film.js";
|
|
8
8
|
/** The default cross-fade's length (`DEFAULT_EDIT.fadeFrames` at 30 fps); the outgoing segment plays on under the incoming one for this long. */
|
|
9
9
|
export declare const FADE_SECONDS: number;
|
|
10
10
|
/** The end card's length after the cut. */
|
|
11
11
|
export declare const END_CARD_SECONDS = 3;
|
|
12
12
|
export interface FootageComposeAssets {
|
|
13
|
-
/** The normalized clips by id. */
|
|
13
|
+
/** The normalized clips by id (read when there is no `picture`). */
|
|
14
14
|
clips: Record<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* The cut's picture in film time (`planFootagePicture`, cross-fades drawn in): the composition then plays it as one
|
|
17
|
+
* `<video>` and zooms that one element, instead of one `<video>` per segment. One video keeps hyperframes' frame
|
|
18
|
+
* extraction to one ffmpeg and its Chrome renderer lean (issue #1030). Absent: one `<video>` per segment.
|
|
19
|
+
*/
|
|
20
|
+
picture?: string;
|
|
15
21
|
/** The cut speech track (as long as the cut). */
|
|
16
22
|
speech: string;
|
|
17
23
|
/** The ducked music track, or null for none. */
|
|
@@ -46,5 +52,10 @@ export interface FootageComposeInput {
|
|
|
46
52
|
export declare function getFootageFilmSeconds(film: Pick<FootageFilm, "endCard">, edl: Edl): number;
|
|
47
53
|
/** The picture scale each segment starts at: `zoom` cuts alternate between punched in (`zoomPercent`) and back out. */
|
|
48
54
|
export declare function getSegmentScales(edl: Edl, zoomPercent?: number): number[];
|
|
55
|
+
/**
|
|
56
|
+
* The frames each segment's zoom eases over (`zoomEaseFrames`, at most the segment's own frames): a `zoom` cut after
|
|
57
|
+
* the first segment that changes the scale and is not `kenburns` (its slow zoom owns the scale); 0 for every other.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getSegmentZoomEases(edl: Edl, edit: Pick<FootageEdit, "zoomPercent" | "zoomEaseFrames">): number[];
|
|
49
60
|
export declare function composeFootage(input: FootageComposeInput): string;
|
|
50
61
|
//# sourceMappingURL=compose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAgF,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1I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AAM,EAAE,MAAM,CAAC;CAChB;AAED,oDAAoD;AACpD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,CAE1F;AAED,uHAAuH;AACvH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,SAA2B,GAAG,MAAM,EAAE,CAO3F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,gBAAgB,CAAC,GAAG,MAAM,EAAE,CAMjH;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAmKjE"}
|
package/dist/footage/compose.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { escapeHtml, fontFaces, fontStack } from "../compose/html.js";
|
|
2
|
-
import { captionChunks } from "../compose/timeline.js";
|
|
2
|
+
import { CAPTION_LINE_HEIGHT, captionChunks, getCaptionPillCss, getCaptionPositionCss } from "../compose/timeline.js";
|
|
3
3
|
import { getCaptionSpans, phraseChunks } from "./captions.js";
|
|
4
4
|
import { getEdlDuration, getSegmentStarts } from "./edl.js";
|
|
5
|
-
import { DEFAULT_EDIT, getFootageEdit } from "./film.js";
|
|
5
|
+
import { CAPTION_MIN_FONT_SCALE, DEFAULT_EDIT, getFootageEdit } from "./film.js";
|
|
6
6
|
import { FOOTAGE_FPS } from "./normalize.js";
|
|
7
7
|
const r3 = (value) => Math.round(value * 1000) / 1000 || 0;
|
|
8
8
|
/**
|
|
9
9
|
* The HyperFrames composition of a footage film (the same 0.8.85 contract as `composeFilm`): one `<video>` clip per
|
|
10
10
|
* EDL segment over the normalized clip with its media start, the transitions (`fade` cross-fades from the segment
|
|
11
|
-
* before over `fadeFrames`, `zoom` punches in by `zoomPercent` on alternate jump cuts, `whoosh` plays the whoosh
|
|
11
|
+
* before over `fadeFrames`, `zoom` punches in by `zoomPercent` on alternate jump cuts, eased over `zoomEaseFrames`, `whoosh` plays the whoosh
|
|
12
12
|
* sound), a slow zoom on `kenburns` segments, the captions (plain phrases, or the word-highlight pill), the end card
|
|
13
13
|
* over the cut's last frame (its whoosh only with `isEndCardWhoosh`), the cut speech track and the ducked music.
|
|
14
14
|
*/
|
|
@@ -32,6 +32,17 @@ export function getSegmentScales(edl, zoomPercent = DEFAULT_EDIT.zoomPercent) {
|
|
|
32
32
|
});
|
|
33
33
|
return scales;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The frames each segment's zoom eases over (`zoomEaseFrames`, at most the segment's own frames): a `zoom` cut after
|
|
37
|
+
* the first segment that changes the scale and is not `kenburns` (its slow zoom owns the scale); 0 for every other.
|
|
38
|
+
*/
|
|
39
|
+
export function getSegmentZoomEases(edl, edit) {
|
|
40
|
+
const scales = getSegmentScales(edl, edit.zoomPercent);
|
|
41
|
+
return edl.segments.map((segment, index) => {
|
|
42
|
+
const isEased = edit.zoomEaseFrames > 0 && index > 0 && segment.transition === "zoom" && segment.motion !== "kenburns" && scales[index - 1] !== scales[index];
|
|
43
|
+
return isEased ? Math.max(1, Math.min(edit.zoomEaseFrames, Math.floor((segment.end - segment.start) * FOOTAGE_FPS))) : 0;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
35
46
|
export function composeFootage(input) {
|
|
36
47
|
const { film, edl, words, frame, colors: c, fonts, assets, caption: captionBox } = input;
|
|
37
48
|
const starts = getSegmentStarts(edl);
|
|
@@ -39,29 +50,42 @@ export function composeFootage(input) {
|
|
|
39
50
|
const end = getFootageFilmSeconds(film, edl);
|
|
40
51
|
const edit = getFootageEdit(film);
|
|
41
52
|
const scales = getSegmentScales(edl, edit.zoomPercent);
|
|
53
|
+
const eases = getSegmentZoomEases(edl, edit);
|
|
42
54
|
const fadeSeconds = r3(edit.fadeFrames / FOOTAGE_FPS);
|
|
43
55
|
const kenBurnsScale = 1 + (edit.kenBurnsPercent > 0 ? edit.kenBurnsPercent : HAND_KEN_BURNS_PERCENT) / 100;
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
const picture = assets.picture;
|
|
57
|
+
const segments = picture === undefined
|
|
58
|
+
? edl.segments.map((segment, index) => {
|
|
59
|
+
const src = assets.clips[segment.clip];
|
|
60
|
+
if (src === undefined)
|
|
61
|
+
throw new Error(`The EDL names clip "${segment.clip}", which the film has no file for.`);
|
|
62
|
+
const next = edl.segments[index + 1];
|
|
63
|
+
const tail = next?.transition === "fade" ? fadeSeconds : 0;
|
|
64
|
+
const start = starts[index];
|
|
65
|
+
const duration = r3(segment.end - segment.start + tail);
|
|
66
|
+
const scale = scales[index];
|
|
67
|
+
const style = scale === 1 ? "" : ` style="transform:scale(${scale})"`;
|
|
68
|
+
return `<video id="seg${index}" class="clip shot" src="${escapeHtml(src)}" data-start="${start}" data-media-start="${segment.start}" data-duration="${duration}"${style} muted playsinline></video>`;
|
|
69
|
+
})
|
|
70
|
+
: [`<video id="picture" class="clip shot" src="${escapeHtml(picture)}" data-start="0" data-media-start="0" data-duration="${cutEnd}" muted playsinline></video>`];
|
|
56
71
|
const tweens = [];
|
|
57
72
|
edl.segments.forEach((segment, index) => {
|
|
58
73
|
const start = starts[index];
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
const scale = scales[index];
|
|
75
|
+
const target = picture === undefined ? `#seg${index}` : "#picture";
|
|
76
|
+
// One video carries every segment: each one sets the zoom it starts at (a fade is already in the picture).
|
|
77
|
+
if (picture !== undefined)
|
|
78
|
+
tweens.push(`tl.set("#picture", { scale: ${scale} }, ${start});`);
|
|
79
|
+
if (picture === undefined && segment.transition === "fade" && index > 0) {
|
|
80
|
+
tweens.push(`tl.fromTo("${target}", { opacity: 0 }, { opacity: 1, duration: ${fadeSeconds}, ease: "none", immediateRender: false }, ${start});`);
|
|
81
|
+
}
|
|
82
|
+
const ease = eases[index];
|
|
83
|
+
if (ease > 0) {
|
|
84
|
+
// Eases from the scale on screen before the cut, so the punch-in (or back out) reads as one move of the camera.
|
|
85
|
+
tweens.push(`tl.fromTo("${target}", { scale: ${scales[index - 1]} }, { scale: ${scales[index]}, duration: ${r3(ease / FOOTAGE_FPS)}, ease: "power1.out", immediateRender: false }, ${start});`);
|
|
61
86
|
}
|
|
62
87
|
if (segment.motion === "kenburns") {
|
|
63
|
-
|
|
64
|
-
tweens.push(`tl.fromTo("#seg${index}", { scale: ${from} }, { scale: ${r3(from * kenBurnsScale)}, duration: ${r3(segment.end - segment.start)}, ease: "none", immediateRender: false }, ${start});`);
|
|
88
|
+
tweens.push(`tl.fromTo("${target}", { scale: ${scale} }, { scale: ${r3(scale * kenBurnsScale)}, duration: ${r3(segment.end - segment.start)}, ease: "none", immediateRender: false }, ${start});`);
|
|
65
89
|
}
|
|
66
90
|
});
|
|
67
91
|
// --- Captions: plain phrases, or the pill that lights each word ---
|
|
@@ -77,6 +101,7 @@ export function composeFootage(input) {
|
|
|
77
101
|
return `<div id="cap${i}" class="clip caption" data-start="${start}" data-duration="${r3(stop - start)}">${box}</div>`;
|
|
78
102
|
})
|
|
79
103
|
.join("\n ");
|
|
104
|
+
const captionFit = film.captions && film.captionMaxLines !== undefined ? getCaptionFitScript(film.captionMaxLines, Math.round(captionBox.fontSize * CAPTION_MIN_FONT_SCALE)) : "";
|
|
80
105
|
// --- Sound ---
|
|
81
106
|
const sfx = [];
|
|
82
107
|
const play = (event, t, volume, dur) => {
|
|
@@ -135,10 +160,10 @@ html,body{width:${frame.width}px;height:${frame.height}px;overflow:hidden;backgr
|
|
|
135
160
|
#root{position:relative;width:${frame.width}px;height:${frame.height}px;overflow:hidden;background:#000;font-family:${bodyFont};color:${c.foreground}}
|
|
136
161
|
.shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform-origin:50% 42%}
|
|
137
162
|
.shade{position:absolute;inset:0;background:${c.background};opacity:0}
|
|
138
|
-
.caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px
|
|
139
|
-
.pill{
|
|
163
|
+
.caption{position:absolute;left:${captionBox.left}px;right:${captionBox.right}px;${getCaptionPositionCss(captionBox)};display:flex;justify-content:center}
|
|
164
|
+
.pill{${getCaptionPillCss(captionBox.fontSize)};border-radius:22px;background:${c.captionBackground};box-shadow:0 14px 44px rgba(0,0,0,.5);color:${c.captionText}}
|
|
140
165
|
.pill span{display:inline-block}
|
|
141
|
-
.phrase{font-weight:650;font-size:${captionBox.fontSize}px;line-height
|
|
166
|
+
.phrase{font-weight:650;font-size:${captionBox.fontSize}px;line-height:${CAPTION_LINE_HEIGHT};letter-spacing:-.01em;text-align:center;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.55),0 0 18px rgba(0,0,0,.35)}
|
|
142
167
|
.endcard{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 80px;text-align:center}
|
|
143
168
|
.brand{display:flex;justify-content:center;align-items:center;gap:18px;font-family:${headingFont};font-size:46px}
|
|
144
169
|
.logo{height:60px;width:auto}
|
|
@@ -154,7 +179,7 @@ html,body{width:${frame.width}px;height:${frame.height}px;overflow:hidden;backgr
|
|
|
154
179
|
${captionHtml}
|
|
155
180
|
${audio}
|
|
156
181
|
</div>
|
|
157
|
-
<script>
|
|
182
|
+
${captionFit}<script>
|
|
158
183
|
const tl = gsap.timeline({ paused: true });
|
|
159
184
|
${tweens.join("\n")}
|
|
160
185
|
const captions = ${JSON.stringify(isHighlight ? caption.map((chunk) => chunk.words.map((w) => w.start)) : [])};
|
|
@@ -171,4 +196,31 @@ window.__timelines["${COMPOSITION_ID}"] = tl;
|
|
|
171
196
|
</html>
|
|
172
197
|
`;
|
|
173
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* A page script that shrinks each caption's font in 1 px steps until its text takes at most `maxLines` lines, or the
|
|
201
|
+
* font reaches `minFontSize`. Only the browser knows how the font wraps, so it measures there: once at load and again
|
|
202
|
+
* when the fonts are ready (hyperframes waits for them before the first frame). Hidden clips keep their layout.
|
|
203
|
+
*/
|
|
204
|
+
function getCaptionFitScript(maxLines, minFontSize) {
|
|
205
|
+
return `<script>
|
|
206
|
+
(() => {
|
|
207
|
+
const captionMaxLines = ${maxLines}, captionMinFontSize = ${minFontSize};
|
|
208
|
+
const countLines = (el) => {
|
|
209
|
+
const style = getComputedStyle(el);
|
|
210
|
+
return Math.round((el.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom)) / parseFloat(style.lineHeight));
|
|
211
|
+
};
|
|
212
|
+
const fit = () => document.querySelectorAll(".caption > p").forEach((el) => {
|
|
213
|
+
el.style.fontSize = "";
|
|
214
|
+
let size = parseFloat(getComputedStyle(el).fontSize);
|
|
215
|
+
while (countLines(el) > captionMaxLines && size > captionMinFontSize) {
|
|
216
|
+
size -= 1;
|
|
217
|
+
el.style.fontSize = size + "px";
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
fit();
|
|
221
|
+
if (document.fonts) document.fonts.ready.then(fit);
|
|
222
|
+
})();
|
|
223
|
+
</script>
|
|
224
|
+
`;
|
|
225
|
+
}
|
|
174
226
|
//# sourceMappingURL=compose.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAsB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/footage/compose.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,aAAa,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,CAAC,CAAC,WAAW;;EAEtN,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;iBACT,GAAG;;sBAEE,cAAc;;;;CAInC,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,QAAgB,EAAE,WAAmB;IAChE,OAAO;;4BAEmB,QAAQ,0BAA0B,WAAW;;;;;;;;;;;;;;;;;CAiBxE,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Edl } from "./edl.js";
|
|
2
|
+
/**
|
|
3
|
+
* Transitions chosen from the frames around each jump cut (`transitions.jump: "auto"`): the last frame before a cut
|
|
4
|
+
* and the first after it, both from the normalized clips, are shrunk to a small gray thumbnail and compared. A small
|
|
5
|
+
* difference (the same framing, a removed filler) gets an eased punch-in (`zoom`), a large one (the camera moved) a
|
|
6
|
+
* short dissolve (`fade`). Deterministic and local: ffmpeg only, no provider.
|
|
7
|
+
*/
|
|
8
|
+
/** The thumbnail both frames are compared at: small enough that handheld shake and noise average out. */
|
|
9
|
+
export declare const CUT_THUMBNAIL: {
|
|
10
|
+
readonly width: 48;
|
|
11
|
+
readonly height: 48;
|
|
12
|
+
};
|
|
13
|
+
/** What the frames around one cut measured and the transition it got. */
|
|
14
|
+
export interface CutMeasure {
|
|
15
|
+
/** The id of the segment the cut starts. */
|
|
16
|
+
segment: string;
|
|
17
|
+
/** The mean absolute difference of the two thumbnails' gray levels, 0 (the same) to 1 (black against white). */
|
|
18
|
+
difference: number;
|
|
19
|
+
transition: "zoom" | "fade";
|
|
20
|
+
}
|
|
21
|
+
/** The mean absolute difference of two gray frames of the same size, 0-1. */
|
|
22
|
+
export declare function measureFrameDifference(before: Uint8Array, after: Uint8Array): number;
|
|
23
|
+
/** `fade` from `threshold` up (the picture moved), `zoom` below it (the same shot). */
|
|
24
|
+
export declare function chooseCutTransition(difference: number, threshold?: number): "zoom" | "fade";
|
|
25
|
+
/** One frame of a clip at `seconds` as a raw gray thumbnail (`CUT_THUMBNAIL`). */
|
|
26
|
+
export declare function buildCutFrameArgs(file: string, seconds: number, output: string): string[];
|
|
27
|
+
/** The indexes of the jump cuts the auto choice sets: a plain cut inside one clip, after the first segment. */
|
|
28
|
+
export declare function findAutoCuts(edl: Edl): number[];
|
|
29
|
+
export interface ChooseCutTransitionsOptions {
|
|
30
|
+
/** The difference from which a cut fades; default `DEFAULT_AUTO_THRESHOLD`. */
|
|
31
|
+
threshold?: number;
|
|
32
|
+
/** A folder for the thumbnails; created, and removed when done. */
|
|
33
|
+
workDir: string;
|
|
34
|
+
signal?: AbortSignal;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Measures every plain jump cut of `edl` (`findAutoCuts`) on the normalized clips and gives it `zoom` or `fade`. Cuts
|
|
38
|
+
* between clips and every other transition stay as they are. Answers the new EDL and what each cut measured.
|
|
39
|
+
*/
|
|
40
|
+
export declare function chooseCutTransitions(edl: Edl, clips: Record<string, string>, options: ChooseCutTransitionsOptions): Promise<{
|
|
41
|
+
edl: Edl;
|
|
42
|
+
cuts: CutMeasure[];
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=cuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cuts.d.ts","sourceRoot":"","sources":["../../src/footage/cuts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAKpC;;;;;GAKG;AAEH,yGAAyG;AACzG,eAAO,MAAM,aAAa;;;CAAqC,CAAC;AAEhE,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,gHAAgH;IAChH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAID,6EAA6E;AAC7E,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAOpF;AAED,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,GAAE,MAA+B,GAAG,MAAM,GAAG,MAAM,CAEnH;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAGzF;AAED,+GAA+G;AAC/G,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,CAK/C;AAED,MAAM,WAAW,2BAA2B;IAC1C,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CAiCnK"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { DEFAULT_AUTO_THRESHOLD } from "./film.js";
|
|
4
|
+
import { FOOTAGE_FPS } from "./normalize.js";
|
|
5
|
+
import { runFfmpeg } from "./process.js";
|
|
6
|
+
/**
|
|
7
|
+
* Transitions chosen from the frames around each jump cut (`transitions.jump: "auto"`): the last frame before a cut
|
|
8
|
+
* and the first after it, both from the normalized clips, are shrunk to a small gray thumbnail and compared. A small
|
|
9
|
+
* difference (the same framing, a removed filler) gets an eased punch-in (`zoom`), a large one (the camera moved) a
|
|
10
|
+
* short dissolve (`fade`). Deterministic and local: ffmpeg only, no provider.
|
|
11
|
+
*/
|
|
12
|
+
/** The thumbnail both frames are compared at: small enough that handheld shake and noise average out. */
|
|
13
|
+
export const CUT_THUMBNAIL = { width: 48, height: 48 };
|
|
14
|
+
const r4 = (value) => Math.round(value * 10000) / 10000 || 0;
|
|
15
|
+
/** The mean absolute difference of two gray frames of the same size, 0-1. */
|
|
16
|
+
export function measureFrameDifference(before, after) {
|
|
17
|
+
if (before.length === 0 || before.length !== after.length) {
|
|
18
|
+
throw new Error(`Comparing the frames around a cut needs two frames of one size, got ${before.length} and ${after.length} bytes.`);
|
|
19
|
+
}
|
|
20
|
+
let sum = 0;
|
|
21
|
+
for (let index = 0; index < before.length; index++)
|
|
22
|
+
sum += Math.abs(before[index] - after[index]);
|
|
23
|
+
return r4(sum / before.length / 255);
|
|
24
|
+
}
|
|
25
|
+
/** `fade` from `threshold` up (the picture moved), `zoom` below it (the same shot). */
|
|
26
|
+
export function chooseCutTransition(difference, threshold = DEFAULT_AUTO_THRESHOLD) {
|
|
27
|
+
return difference >= threshold ? "fade" : "zoom";
|
|
28
|
+
}
|
|
29
|
+
/** One frame of a clip at `seconds` as a raw gray thumbnail (`CUT_THUMBNAIL`). */
|
|
30
|
+
export function buildCutFrameArgs(file, seconds, output) {
|
|
31
|
+
const { width, height } = CUT_THUMBNAIL;
|
|
32
|
+
return ["-v", "error", "-y", "-ss", String(seconds), "-i", file, "-frames:v", "1", "-vf", `scale=${width}:${height}:flags=area,format=gray`, "-f", "rawvideo", output];
|
|
33
|
+
}
|
|
34
|
+
/** The indexes of the jump cuts the auto choice sets: a plain cut inside one clip, after the first segment. */
|
|
35
|
+
export function findAutoCuts(edl) {
|
|
36
|
+
return edl.segments.flatMap((segment, index) => {
|
|
37
|
+
const previous = edl.segments[index - 1];
|
|
38
|
+
return previous !== undefined && previous.clip === segment.clip && segment.transition === "cut" ? [index] : [];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Measures every plain jump cut of `edl` (`findAutoCuts`) on the normalized clips and gives it `zoom` or `fade`. Cuts
|
|
43
|
+
* between clips and every other transition stay as they are. Answers the new EDL and what each cut measured.
|
|
44
|
+
*/
|
|
45
|
+
export async function chooseCutTransitions(edl, clips, options) {
|
|
46
|
+
const threshold = options.threshold ?? DEFAULT_AUTO_THRESHOLD;
|
|
47
|
+
if (!(threshold >= 0 && threshold <= 1))
|
|
48
|
+
throw new Error(`transitions.autoThreshold must be between 0 and 1, got ${String(threshold)}.`);
|
|
49
|
+
const indexes = findAutoCuts(edl);
|
|
50
|
+
if (indexes.length === 0)
|
|
51
|
+
return { edl, cuts: [] };
|
|
52
|
+
const signal = options.signal === undefined ? {} : { signal: options.signal };
|
|
53
|
+
const getClip = (id) => {
|
|
54
|
+
const file = clips[id];
|
|
55
|
+
if (file === undefined)
|
|
56
|
+
throw new Error(`No file for clip "${id}" of the EDL.`);
|
|
57
|
+
return file;
|
|
58
|
+
};
|
|
59
|
+
mkdirSync(options.workDir, { recursive: true });
|
|
60
|
+
const segments = [...edl.segments];
|
|
61
|
+
const cuts = [];
|
|
62
|
+
try {
|
|
63
|
+
for (const index of indexes) {
|
|
64
|
+
const segment = segments[index];
|
|
65
|
+
const previous = segments[index - 1];
|
|
66
|
+
const beforeFile = join(options.workDir, `${segment.id}-before.gray`);
|
|
67
|
+
const afterFile = join(options.workDir, `${segment.id}-after.gray`);
|
|
68
|
+
// The last frame the cut shows before it, and the first after it.
|
|
69
|
+
const beforeAt = Math.round(Math.max(previous.start, previous.end - 1 / FOOTAGE_FPS) * 1000) / 1000;
|
|
70
|
+
await runFfmpeg(`The frame before cut ${segment.id}`, buildCutFrameArgs(getClip(previous.clip), beforeAt, beforeFile), { ...signal, output: beforeFile });
|
|
71
|
+
await runFfmpeg(`The frame after cut ${segment.id}`, buildCutFrameArgs(getClip(segment.clip), segment.start, afterFile), { ...signal, output: afterFile });
|
|
72
|
+
const difference = measureFrameDifference(readFileSync(beforeFile), readFileSync(afterFile));
|
|
73
|
+
const transition = chooseCutTransition(difference, threshold);
|
|
74
|
+
segments[index] = { ...segment, transition };
|
|
75
|
+
cuts.push({ segment: segment.id, difference, transition });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
finally {
|
|
79
|
+
rmSync(options.workDir, { recursive: true, force: true });
|
|
80
|
+
}
|
|
81
|
+
return { edl: { ...edl, segments }, cuts };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=cuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cuts.js","sourceRoot":"","sources":["../../src/footage/cuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;GAKG;AAEH,yGAAyG;AACzG,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAW,CAAC;AAWhE,MAAM,EAAE,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;AAE7E,6EAA6E;AAC7E,MAAM,UAAU,sBAAsB,CAAC,MAAkB,EAAE,KAAiB;IAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,uEAAuE,MAAM,CAAC,MAAM,QAAQ,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC;IACrI,CAAC;IACD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ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AAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC;AAC7C,CAAC"}
|
package/dist/footage/draft.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Frame } from "./normalize.js";
|
|
|
6
6
|
import { type FootageResult, type FootageRunOptions, type PreparedClip, type TranscribeOutcome } from "./pipeline.js";
|
|
7
7
|
/**
|
|
8
8
|
* A fast draft of a footage film, ffmpeg only (no hyperframes, no browser): the cut at a small width with the film's
|
|
9
|
-
* phrase captions burned in, its zoom cuts, cross-fades and Ken Burns b-roll drawn as the full render draws them, and
|
|
9
|
+
* phrase captions burned in, its zoom cuts (eased as in the render), cross-fades and Ken Burns b-roll drawn as the full render draws them, and
|
|
10
10
|
* the speech track. No loudness pass, music, end card or cover. What an app shows the owner before the paid render.
|
|
11
11
|
*/
|
|
12
12
|
/** The draft's default width: 540 makes a 540×960 draft of a 9:16 film. */
|
|
@@ -32,8 +32,8 @@ export interface FootageDraftCaptionsInput {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* The draft's captions as an ASS subtitle file: the film's phrases (`phraseChunks`) shown for the render's spans
|
|
35
|
-
* (`getCaptionSpans`), white bold text with a dark outline and shadow, centred in the caption box from its top
|
|
36
|
-
* when the film has no captions or nothing is said.
|
|
35
|
+
* (`getCaptionSpans`), white bold text with a dark outline and shadow, centred in the caption box from its top (or
|
|
36
|
+
* from its foot, with `bottom`). Null when the film has no captions or nothing is said.
|
|
37
37
|
*/
|
|
38
38
|
export declare function buildFootageDraftCaptions(input: FootageDraftCaptionsInput): string | null;
|
|
39
39
|
export interface FootageDraftArgsInput {
|
|
@@ -52,6 +52,11 @@ export interface FootageDraftArgsInput {
|
|
|
52
52
|
/** The folder libass loads the captions' font from, or null for the system's fonts. */
|
|
53
53
|
fontsDir: string | null;
|
|
54
54
|
output: string;
|
|
55
|
+
/**
|
|
56
|
+
* ffmpeg's threads for every segment's decoder, the filter graph and the encoder; by default ffmpeg's own choice,
|
|
57
|
+
* which follows the host's cores, not a container's CPU quota. A positive whole number.
|
|
58
|
+
*/
|
|
59
|
+
threads?: number;
|
|
55
60
|
}
|
|
56
61
|
/** A segment's picture as the draft plays it: how long its stream runs and the fade it starts with. */
|
|
57
62
|
export interface DraftSegmentPlan {
|
|
@@ -67,6 +72,10 @@ export interface DraftSegmentPlan {
|
|
|
67
72
|
scale: number;
|
|
68
73
|
/** The zoom it ends at: above `scale` for a `kenburns` segment, `scale` otherwise. */
|
|
69
74
|
endScale: number;
|
|
75
|
+
/** The zoom on screen before an eased `zoom` cut, which the segment eases from to `scale`; `scale` otherwise. */
|
|
76
|
+
startScale: number;
|
|
77
|
+
/** The frames the zoom eases over (`getSegmentZoomEases`); 0: the segment starts at `scale`. */
|
|
78
|
+
easeFrames: number;
|
|
70
79
|
}
|
|
71
80
|
/**
|
|
72
81
|
* How each segment plays in the draft. A `fade` cut lasts the film's `fadeFrames` (clamped to the incoming segment, so
|
|
@@ -86,6 +95,11 @@ export interface RenderFootageDraftOptions extends Pick<FootageRunOptions, "buil
|
|
|
86
95
|
width?: number;
|
|
87
96
|
/** A project's override of the format's caption box (`marketing.json` `layout`), as the render takes it. */
|
|
88
97
|
layout?: LayoutOverride;
|
|
98
|
+
/**
|
|
99
|
+
* ffmpeg's threads for the draft's decoders, filter graph and encoder (`buildFootageDraftArgs`); by default ffmpeg's
|
|
100
|
+
* own choice, which follows the host's cores. Set it from a CPU-limited container's quota.
|
|
101
|
+
*/
|
|
102
|
+
threads?: number;
|
|
89
103
|
}
|
|
90
104
|
export interface FootageDraft {
|
|
91
105
|
output: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/footage/draft.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAgD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/footage/draft.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAgD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAA8B,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIhI;;;;GAIG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,qIAAqI;AACrI,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAYX,8GAA8G;AAC9G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAE,MAA4B,GAAG,KAAK,CAG7F;AAiBD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACpC,GAAG,EAAE,GAAG,CAAC;IACT,oDAAoD;IACpD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uEAAuE;IACvE,OA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