@pixerate/editor 0.252.0 → 0.254.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.
Files changed (73) hide show
  1. package/dist/animation-editor/index.cjs +53 -53
  2. package/dist/animation-editor/index.js +2 -2
  3. package/dist/brushes/index.cjs +229 -2014
  4. package/dist/brushes/index.d.cts +5 -1
  5. package/dist/brushes/index.d.ts +5 -1
  6. package/dist/brushes/index.js +236 -2021
  7. package/dist/brushes/patch.d.cts +23 -0
  8. package/dist/brushes/patch.d.ts +23 -0
  9. package/dist/brushes/ui.d.cts +105 -0
  10. package/dist/brushes/ui.d.ts +105 -0
  11. package/dist/canvas/index.cjs +7 -7
  12. package/dist/canvas/index.js +1 -1
  13. package/dist/{chunk-QKXO6JPP.cjs → chunk-2OQGPEHH.cjs} +14 -14
  14. package/dist/chunk-34KLWUH4.cjs +2284 -0
  15. package/dist/{chunk-Z3BRH4JK.cjs → chunk-557BDWKO.cjs} +6 -6
  16. package/dist/{chunk-ZBCT5MEA.cjs → chunk-CBVNCWJM.cjs} +7 -7
  17. package/dist/{chunk-226QDRO3.js → chunk-DHQPRKXF.js} +1 -1
  18. package/dist/{chunk-ABL7IWFZ.js → chunk-GBEF2D4P.js} +1 -1
  19. package/dist/{chunk-ISIO63Q5.cjs → chunk-L2JTLW6B.cjs} +150 -25
  20. package/dist/{chunk-JA57JIT5.js → chunk-MV7CYFMJ.js} +133 -8
  21. package/dist/{chunk-5E2Q7ZHI.js → chunk-MWUZCEFT.js} +1 -1
  22. package/dist/chunk-QPHNVZHO.js +2284 -0
  23. package/dist/effects/conformance.d.cts +1 -0
  24. package/dist/effects/conformance.d.ts +1 -0
  25. package/dist/effects/fake.d.cts +7 -1
  26. package/dist/effects/fake.d.ts +7 -1
  27. package/dist/effects/helpers.d.cts +36 -4
  28. package/dist/effects/helpers.d.ts +36 -4
  29. package/dist/effects/index.cjs +331 -102
  30. package/dist/effects/index.js +238 -9
  31. package/dist/effects/types.d.cts +84 -5
  32. package/dist/effects/types.d.ts +84 -5
  33. package/dist/image-editor/index.cjs +15 -15
  34. package/dist/image-editor/index.js +1 -1
  35. package/dist/paint-editor/brush-controls.d.cts +57 -0
  36. package/dist/paint-editor/brush-controls.d.ts +57 -0
  37. package/dist/paint-editor/brush-library-tools.d.cts +15 -0
  38. package/dist/paint-editor/brush-library-tools.d.ts +15 -0
  39. package/dist/paint-editor/brush-library.d.cts +29 -0
  40. package/dist/paint-editor/brush-library.d.ts +29 -0
  41. package/dist/paint-editor/controller.d.cts +76 -17
  42. package/dist/paint-editor/controller.d.ts +76 -17
  43. package/dist/paint-editor/index.cjs +543 -858
  44. package/dist/paint-editor/index.d.cts +1 -0
  45. package/dist/paint-editor/index.d.ts +1 -0
  46. package/dist/paint-editor/index.js +329 -644
  47. package/dist/paint-editor/serialize.d.cts +7 -4
  48. package/dist/paint-editor/serialize.d.ts +7 -4
  49. package/dist/paint-editor/sticker-tools.d.cts +1 -1
  50. package/dist/paint-editor/sticker-tools.d.ts +1 -1
  51. package/dist/paint-editor/strokes.d.cts +10 -1
  52. package/dist/paint-editor/strokes.d.ts +10 -1
  53. package/dist/paint-editor/tools.d.cts +1 -1
  54. package/dist/paint-editor/tools.d.ts +1 -1
  55. package/dist/paint-editor/ui.d.cts +3 -51
  56. package/dist/paint-editor/ui.d.ts +3 -51
  57. package/dist/paint-editor/wet-tools.d.cts +1 -1
  58. package/dist/paint-editor/wet-tools.d.ts +1 -1
  59. package/dist/vector/index.cjs +6 -6
  60. package/dist/vector/index.js +1 -1
  61. package/dist/video-editor/index.cjs +344 -344
  62. package/dist/video-editor/index.js +4 -4
  63. package/package.json +1 -1
  64. package/skills/pixerate-brushes/SKILL.md +5 -3
  65. package/skills/pixerate-paint-editor/SKILL.md +26 -24
  66. package/skills/pixerate-paint-editor/references/brush-facets.md +30 -0
  67. package/skills/pixerate-paint-editor/references/gradient-paint.md +1 -1
  68. package/skills/pixerate-paint-editor/references/light-paint.md +2 -2
  69. package/skills/pixerate-paint-editor/references/oils.md +1 -1
  70. package/skills/pixerate-paint-editor/references/particle-brushes.md +8 -5
  71. package/skills/pixerate-paint-oil-impasto/SKILL.md +1 -1
  72. package/skills/pixerate-stickers/SKILL.md +1 -1
  73. package/skills/pixerate-video-editor/SKILL.md +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8;
2
2
 
3
- var _chunkQKXO6JPPcjs = require('../chunk-QKXO6JPP.cjs');
3
+ var _chunk2OQGPEHHcjs = require('../chunk-2OQGPEHH.cjs');
4
4
 
5
5
 
6
6
 
@@ -149,7 +149,7 @@ var _chunkQKXO6JPPcjs = require('../chunk-QKXO6JPP.cjs');
149
149
 
150
150
 
151
151
 
152
- var _chunkZBCT5MEAcjs = require('../chunk-ZBCT5MEA.cjs');
152
+ var _chunkCBVNCWJMcjs = require('../chunk-CBVNCWJM.cjs');
153
153
 
154
154
 
155
155
  var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
@@ -159,7 +159,7 @@ var _chunkDGWOGQJ5cjs = require('../chunk-DGWOGQJ5.cjs');
159
159
 
160
160
 
161
161
 
162
- var _chunkZ3BRH4JKcjs = require('../chunk-Z3BRH4JK.cjs');
162
+ var _chunk557BDWKOcjs = require('../chunk-557BDWKO.cjs');
163
163
  require('../chunk-PY4GWSE2.cjs');
164
164
 
165
165
 
@@ -171,7 +171,7 @@ require('../chunk-PY4GWSE2.cjs');
171
171
 
172
172
 
173
173
 
174
- var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
174
+ var _chunkL2JTLW6Bcjs = require('../chunk-L2JTLW6B.cjs');
175
175
  require('../chunk-WOFXZ3XU.cjs');
176
176
 
177
177
 
@@ -230,7 +230,7 @@ function parseVideoEase(v, path) {
230
230
  if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
231
231
  return [v[0], v[1], v[2], v[3]];
232
232
  }
233
- return oneOf(v, _chunkZBCT5MEAcjs.VIDEO_EASE_NAMES, path);
233
+ return oneOf(v, _chunkCBVNCWJMcjs.VIDEO_EASE_NAMES, path);
234
234
  }
235
235
  function parseVideoKeyframes(v, path, { min, max } = {}) {
236
236
  if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
@@ -272,7 +272,7 @@ function parseVideoTimeRemap(v, speed, path) {
272
272
  if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
273
273
  for (let i = 1; i < remap.keys.length; i++) if (remap.keys[i].t === remap.keys[i - 1].t) fail(`${path}.keys[${i}].t`, `must be later than the key before (${remap.keys[i - 1].t} ms); a speed ramp has one key per time`);
274
274
  try {
275
- _chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, path);
275
+ _chunkCBVNCWJMcjs.checkVideoTimeRemap.call(void 0, remap, path);
276
276
  } catch (e) {
277
277
  throw new Error(e.message.replace(/\.?$/, "."));
278
278
  }
@@ -282,17 +282,17 @@ function parseVideoClipAnimation(v, path) {
282
282
  if (v === void 0) return void 0;
283
283
  if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
284
284
  return compact({
285
- effect: oneOf(v.effect, _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
285
+ effect: oneOf(v.effect, _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
286
286
  duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
287
287
  });
288
288
  }
289
289
  function parseVideoGrade(v, path) {
290
290
  if (v === void 0) return void 0;
291
291
  if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
292
- const known = /* @__PURE__ */ new Set([..._chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
292
+ const known = /* @__PURE__ */ new Set([..._chunkCBVNCWJMcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
293
293
  const unknown = Object.keys(v).find((k) => !known.has(k));
294
294
  if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
295
- return compact({ ...Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, num(v[c.key], `${path}.${c.key}`, { optional: true, min: c.min, max: c.max })])), lut: parseVideoGradeLut(v.lut, `${path}.lut`) });
295
+ return compact({ ...Object.fromEntries(_chunkCBVNCWJMcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, num(v[c.key], `${path}.${c.key}`, { optional: true, min: c.min, max: c.max })])), lut: parseVideoGradeLut(v.lut, `${path}.lut`) });
296
296
  }
297
297
  function parseVideoGradeLut(v, path) {
298
298
  if (v === void 0) return void 0;
@@ -307,7 +307,7 @@ function parseVideoClipMask(v, path) {
307
307
  if (!isObject(v)) return fail(path, 'must be an object such as { shape: "ellipse", x: 0.5, y: 0.5, width: 0.4, height: 0.6, feather: 20 }');
308
308
  const unknown = Object.keys(v).find((k) => !MASK_KEYS.includes(k));
309
309
  if (unknown) fail(`${path}.${unknown}`, `is not a mask setting; use ${MASK_KEYS.join(", ")}`);
310
- const shape = oneOf(v.shape, _chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
310
+ const shape = oneOf(v.shape, _chunkCBVNCWJMcjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
311
311
  let points;
312
312
  if (v.points !== void 0) {
313
313
  if (shape !== "polygon") fail(`${path}.points`, "is only for polygon masks");
@@ -333,15 +333,15 @@ function parseVideoClipMask(v, path) {
333
333
  function parseVideoTransition(v, path) {
334
334
  if (v === void 0) return void 0;
335
335
  if (!isObject(v)) return fail(path, "must be an object { type, duration }");
336
- const type = oneOf(v.type, _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
336
+ const type = oneOf(v.type, _chunkCBVNCWJMcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
337
337
  if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
338
338
  if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
339
339
  return compact({
340
340
  type,
341
341
  duration: num(v.duration, `${path}.duration`, { positive: true }),
342
342
  color: str(v.color, `${path}.color`, true),
343
- direction: oneOf(v.direction, _chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
344
- audioCurve: oneOf(v.audioCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
343
+ direction: oneOf(v.direction, _chunkCBVNCWJMcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
344
+ audioCurve: oneOf(v.audioCurve, _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
345
345
  effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
346
346
  });
347
347
  }
@@ -470,7 +470,7 @@ function parseVideoClipCamera(v, path) {
470
470
  }
471
471
  function parseVideoClip(v, path = "clip") {
472
472
  if (!isObject(v)) return fail(path, "must be an object");
473
- const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkZBCT5MEAcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
473
+ const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkCBVNCWJMcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
474
474
  const base = {
475
475
  id: str(v.id, `${path}.id`),
476
476
  name: str(v.name, `${path}.name`, true),
@@ -478,8 +478,8 @@ function parseVideoClip(v, path = "clip") {
478
478
  duration: num(v.duration, `${path}.duration`, { positive: true }),
479
479
  opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
480
480
  transform: parseVideoTransform(v.transform, `${path}.transform`),
481
- fit: oneOf(v.fit, _chunkZBCT5MEAcjs.VIDEO_FITS, `${path}.fit`),
482
- blend: oneOf(v.blend, _chunkZBCT5MEAcjs.VIDEO_BLEND_MODES, `${path}.blend`),
481
+ fit: oneOf(v.fit, _chunkCBVNCWJMcjs.VIDEO_FITS, `${path}.fit`),
482
+ blend: oneOf(v.blend, _chunkCBVNCWJMcjs.VIDEO_BLEND_MODES, `${path}.blend`),
483
483
  grade: parseVideoGrade(v.grade, `${path}.grade`),
484
484
  animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
485
485
  animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
@@ -500,8 +500,8 @@ function parseVideoClip(v, path = "clip") {
500
500
  volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
501
501
  muted: bool(v.muted, `${path}.muted`),
502
502
  timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
503
- fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
504
- fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
503
+ fadeInCurve: oneOf(v.fadeInCurve, _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
504
+ fadeOutCurve: oneOf(v.fadeOutCurve, _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
505
505
  });
506
506
  if (type === "sequence") {
507
507
  for (const key of ["speed", "timeRemap"])
@@ -513,8 +513,8 @@ function parseVideoClip(v, path = "clip") {
513
513
  in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
514
514
  volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
515
515
  muted: bool(v.muted, `${path}.muted`),
516
- fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
517
- fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
516
+ fadeInCurve: oneOf(v.fadeInCurve, _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
517
+ fadeOutCurve: oneOf(v.fadeOutCurve, _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
518
518
  });
519
519
  }
520
520
  if (type === "text")
@@ -529,7 +529,7 @@ function parseVideoClip(v, path = "clip") {
529
529
  background: str(v.background, `${path}.background`, true)
530
530
  });
531
531
  if (type === "adjustment") {
532
- const scope = oneOf(v.scope, _chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
532
+ const scope = oneOf(v.scope, _chunkCBVNCWJMcjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
533
533
  const targetTrack = str(v.targetTrack, `${path}.targetTrack`, true);
534
534
  if (scope === "track" && !targetTrack) fail(`${path}.targetTrack`, 'is required when scope is "track": the id of the track whose pictures the adjustment changes');
535
535
  if (targetTrack !== void 0 && scope !== "track") fail(`${path}.targetTrack`, 'is only for scope "track"');
@@ -632,9 +632,9 @@ function createVideoProject(options = {}) {
632
632
  // src/video-editor/check.ts
633
633
  function videoClipKeyframes(clip) {
634
634
  const out = [
635
- { property: "opacity", keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.opacity) },
636
- { property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.volume) : [] },
637
- ..._chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
635
+ { property: "opacity", keys: _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, clip.opacity) },
636
+ { property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, clip.volume) : [] },
637
+ ..._chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
638
638
  ];
639
639
  return out.filter((o) => o.keys.length);
640
640
  }
@@ -663,8 +663,8 @@ var VIDEO_ISSUE_CODES = [
663
663
  var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
664
664
  function checkVideoProject(project) {
665
665
  const issues = [];
666
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
667
- const sequences = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, project);
666
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, project);
667
+ const sequences = _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, project);
668
668
  const used = /* @__PURE__ */ new Set();
669
669
  const usedSequences = /* @__PURE__ */ new Set();
670
670
  const cycles = /* @__PURE__ */ new Map();
@@ -672,7 +672,7 @@ function checkVideoProject(project) {
672
672
  if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
673
673
  issues.push({ code: "unknown-duration", severity: "warning", asset: asset.id, message: `Asset "${asset.id}" has no duration, so clips of it cannot be checked against its length; set "duration" in ms.` });
674
674
  const checkTrack = (track, sequence) => {
675
- const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
675
+ const clips = _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track);
676
676
  const where = sequence ? ` in sequence "${sequence}"` : "";
677
677
  for (let i = 0; i < clips.length; i++) {
678
678
  const clip = clips[i];
@@ -682,13 +682,13 @@ function checkVideoProject(project) {
682
682
  const seq = sequences.get(clip.sequence);
683
683
  if (!seq) issues.push({ code: "missing-sequence", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${clip.sequence}", which is not in the project; add the sequence or delete the clip.` });
684
684
  else {
685
- if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
685
+ if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkCBVNCWJMcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
686
686
  const cycle = cycles.get(seq.id);
687
687
  if (cycle) issues.push({ code: "sequence-cycle", severity: "error", ...at, message: `Compound clip "${clip.id}" plays sequence "${seq.id}", which contains itself (${cycle.join(" \u2192 ")}), so it is left out of the picture and sound; remove the compound clip that closes the loop.` });
688
- const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq);
689
- const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
690
- if (range.out > length + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
691
- issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
688
+ const length = _chunkCBVNCWJMcjs.videoSequenceDuration.call(void 0, seq);
689
+ const range = _chunkCBVNCWJMcjs.videoClipSourceRange.call(void 0, clip);
690
+ if (range.out > length + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
691
+ issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
692
692
  }
693
693
  } else if (clip.type === "media") {
694
694
  used.add(clip.asset);
@@ -697,32 +697,32 @@ function checkVideoProject(project) {
697
697
  else {
698
698
  if (track.kind === "audio" && asset.kind === "image") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is an image on audio track "${track.id}"; move it to a video track.` });
699
699
  if (track.kind === "video" && asset.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is audio on video track "${track.id}"; move it to an audio track.` });
700
- const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
701
- if (asset.duration !== void 0 && range.out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
702
- issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
700
+ const range = _chunkCBVNCWJMcjs.videoClipSourceRange.call(void 0, clip);
701
+ if (asset.duration !== void 0 && range.out > asset.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
702
+ issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
703
703
  }
704
704
  } else if (track.kind === "audio") issues.push({ code: "wrong-track", severity: "error", ...at, message: `Clip "${clip.id}" is a ${clip.type} clip on audio track "${track.id}"; move it to a video track.` });
705
705
  if (clip.type === "adjustment" && (_nullishCoalesce(clip.scope, () => ( "underneath"))) === "track" && !(sequence ? _nullishCoalesce(_optionalChain([sequences, 'access', _4 => _4.get, 'call', _5 => _5(sequence), 'optionalAccess', _6 => _6.tracks]), () => ( [])) : project.tracks).some((t) => t.id === clip.targetTrack))
706
706
  issues.push({ code: "missing-target-track", severity: "warning", ...at, message: `Adjustment clip "${clip.id}" changes track "${clip.targetTrack}", which is not ${sequence ? `in sequence "${sequence}"` : "in the project"}, so it changes nothing; set its targetTrack to a track beside it or change its scope.` });
707
707
  const next = clips[i + 1];
708
- if (next && next.start < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
709
- issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
710
- if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
708
+ if (next && next.start < _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip) - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
709
+ issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
710
+ if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
711
711
  issues.push({ code: "fades-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s fades (${_nullishCoalesce(clip.fadeIn, () => ( 0))} + ${_nullishCoalesce(clip.fadeOut, () => ( 0))} ms) are longer than the clip (${clip.duration} ms); shorten them.` });
712
- const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
713
- if (anim > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
712
+ const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
713
+ if (anim > clip.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
714
714
  issues.push({ code: "animations-too-long", severity: "warning", ...at, message: `Clip "${clip.id}"'s entrance and exit (${anim} ms together) are longer than the clip (${clip.duration} ms), so both are shortened; give them shorter durations.` });
715
715
  for (const which of ["animateIn", "animateOut"]) {
716
716
  const a = clip[which];
717
717
  if (!a) continue;
718
- const keyed = _chunkZBCT5MEAcjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
718
+ const keyed = _chunkCBVNCWJMcjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
719
719
  if (keyed.length)
720
720
  issues.push({ code: "animation-keyed", severity: "note", ...at, message: `Clip "${clip.id}"'s ${a.effect} ${which === "animateIn" ? "entrance" : "exit"} leaves ${keyed.join(", ")} alone, because the clip keys ${keyed.length > 1 ? "them" : "it"} itself; remove those keyframes or the animation.` });
721
721
  }
722
722
  if (clip.camera) {
723
- const last = Math.max(0, ..._chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
723
+ const last = Math.max(0, ..._chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
724
724
  const frame = 1e3 / (project.fps || 30);
725
- if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
725
+ if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
726
726
  issues.push({
727
727
  code: "camera-stale",
728
728
  severity: "warning",
@@ -731,7 +731,7 @@ function checkVideoProject(project) {
731
731
  });
732
732
  }
733
733
  for (const { property, keys } of videoClipKeyframes(clip)) {
734
- const outside = keys.filter((k) => k.t < -_chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
734
+ const outside = keys.filter((k) => k.t < -_chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON);
735
735
  if (outside.length)
736
736
  issues.push({
737
737
  code: "keyframes-outside-clip",
@@ -742,20 +742,20 @@ function checkVideoProject(project) {
742
742
  }
743
743
  if (clip.transition) {
744
744
  const d = clip.transition.duration;
745
- const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
745
+ const before = _chunkCBVNCWJMcjs.videoClipBefore.call(void 0, track, clip);
746
746
  if (!before) {
747
747
  issues.push({ code: "transition-without-cut", severity: "warning", ...at, message: `Clip "${clip.id}" has a transition but no clip ends where it starts on track "${track.id}", so it plays as nothing; butt a clip up against it or remove the transition.` });
748
748
  continue;
749
749
  }
750
- if (d > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
750
+ if (d > clip.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) {
751
751
  issues.push({ code: "transition-too-long", severity: "error", ...at, message: `The ${d} ms transition into "${clip.id}" is longer than "${clip.id}" (${clip.duration} ms) or "${before.id}" (${before.duration} ms); make it at most ${Math.min(clip.duration, before.duration)} ms.` });
752
752
  continue;
753
753
  }
754
754
  if (clip.transition.type === "dip") continue;
755
- const outgoing = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
756
- const incoming = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
755
+ const outgoing = _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
756
+ const incoming = _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
757
757
  const half = d / 2;
758
- if (outgoing < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
758
+ if (outgoing < half - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) {
759
759
  const fits = 2 * Math.min(outgoing, incoming);
760
760
  issues.push({
761
761
  code: "transition-handles",
@@ -772,9 +772,9 @@ function checkVideoProject(project) {
772
772
  for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
773
773
  if (!usedSequences.has(sequence.id)) issues.push({ code: "unused-sequence", severity: "note", sequence: sequence.id, message: `Sequence "${sequence.id}" is not played by any compound clip.` });
774
774
  for (const asset of project.assets) if (!used.has(asset.id)) issues.push({ code: "unused-asset", severity: "note", asset: asset.id, message: `Asset "${asset.id}" is not used by any clip.` });
775
- const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project);
775
+ const end = _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, project);
776
776
  for (const marker of _nullishCoalesce(project.markers, () => ( [])))
777
- if (marker.time > end + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}).` });
777
+ if (marker.time > end + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, end)}).` });
778
778
  if (!project.tracks.some((t) => t.clips.length)) issues.push({ code: "empty", severity: "note", message: "The project has no clips yet; add assets and then clips." });
779
779
  const rank = { error: 0, warning: 1, note: 2 };
780
780
  return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
@@ -828,7 +828,7 @@ function mergeSpans(spans) {
828
828
  const out = [];
829
829
  for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
830
830
  const last = out[out.length - 1];
831
- if (last && from <= last[1] + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
831
+ if (last && from <= last[1] + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
832
832
  else out.push([from, to]);
833
833
  }
834
834
  return out;
@@ -842,13 +842,13 @@ function clipAnimatables(clip) {
842
842
  // A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
843
843
  { get: () => c.timeRemap, set: (v) => c.timeRemap = v }
844
844
  ];
845
- for (const p of _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _11 => _11.transform, 'optionalAccess', _12 => _12[p]]), set: (v) => c.transform && (c.transform[p] = v) });
845
+ for (const p of _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES) out.push({ get: () => _optionalChain([c, 'access', _11 => _11.transform, 'optionalAccess', _12 => _12[p]]), set: (v) => c.transform && (c.transform[p] = v) });
846
846
  return out;
847
847
  }
848
848
  function retimeClipKeys(clip, fn) {
849
849
  for (const a of clipAnimatables(clip)) {
850
850
  const v = a.get();
851
- if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
851
+ if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
852
852
  }
853
853
  }
854
854
  var OPTIONAL_CLIP_FIELDS = ["name", "effects", "mask", "camera", "scope", "targetTrack", "values", "provider", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "transition", "in", "speed", "timeRemap", "volume", "muted", "color", "fontSize", "fontFamily", "fontWeight", "background"];
@@ -865,8 +865,8 @@ var Editor = (_class = class {
865
865
  return t;
866
866
  }
867
867
  clip(id) {
868
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.p, id);
869
- const nested = at ? null : _chunkZBCT5MEAcjs.findVideoSequenceClip.call(void 0, this.p, id);
868
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.p, id);
869
+ const nested = at ? null : _chunkCBVNCWJMcjs.findVideoSequenceClip.call(void 0, this.p, id);
870
870
  if (nested) refuse(`Clip "${id}" is inside sequence "${nested.sequence.id}", and clips inside sequences cannot be edited yet; edit the compound clip that plays the sequence instead (list_video_sequences shows which).`);
871
871
  if (!at) {
872
872
  const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
@@ -883,16 +883,16 @@ var Editor = (_class = class {
883
883
  return a;
884
884
  }
885
885
  fits(track, start, duration, ignore, what) {
886
- const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
886
+ const hit = _chunkCBVNCWJMcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
887
887
  if (hit) {
888
- const free = _chunkZBCT5MEAcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
889
- refuse(`${what} at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
888
+ const free = _chunkCBVNCWJMcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
889
+ refuse(`${what} at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
890
890
  }
891
891
  }
892
892
  /** An adjustment clip's target track must exist. */
893
893
  adjustmentTarget(clip) {
894
894
  if (clip.type !== "adjustment" || clip.targetTrack === void 0) return;
895
- const ids = _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
895
+ const ids = _chunkCBVNCWJMcjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
896
896
  if (!ids.includes(clip.targetTrack)) refuse(`Adjustment clip "${clip.id}" targets track ${_chunkDGWOGQJ5cjs.namedWithSuggestion.call(void 0, clip.targetTrack, ids)}, which does not exist; the tracks are ${ids.map((t) => `"${t}"`).join(", ")}.`);
897
897
  }
898
898
  kindFits(track, clip) {
@@ -908,14 +908,14 @@ var Editor = (_class = class {
908
908
  /** Moves every clip on `track` starting at or after `from` by `delta`. */
909
909
  shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
910
910
  if (!delta) return;
911
- for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
911
+ for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
912
912
  track.clips.sort((a, b) => a.start - b.start);
913
913
  }
914
914
  get frame() {
915
915
  return 1e3 / this.p.fps;
916
916
  }
917
917
  ids() {
918
- return _chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, this.p);
918
+ return _chunkCBVNCWJMcjs.allVideoClipIds.call(void 0, this.p);
919
919
  }
920
920
  /**
921
921
  * The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
@@ -923,8 +923,8 @@ var Editor = (_class = class {
923
923
  */
924
924
  rippleTracks(sources) {
925
925
  const set = new Set(sources);
926
- if ([...set].some(_chunkZBCT5MEAcjs.videoTrackSyncLocked)) {
927
- for (const t of this.p.tracks) if (_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
926
+ if ([...set].some(_chunkCBVNCWJMcjs.videoTrackSyncLocked)) {
927
+ for (const t of this.p.tracks) if (_chunkCBVNCWJMcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
928
928
  }
929
929
  return this.p.tracks.filter((t) => set.has(t));
930
930
  }
@@ -941,7 +941,7 @@ var Editor = (_class = class {
941
941
  return open;
942
942
  }
943
943
  range(from, to) {
944
- if (!(to - from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, from)}).`);
944
+ if (!(to - from > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, from)}).`);
945
945
  }
946
946
  /** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
947
947
  moveIn(clip, delta) {
@@ -950,18 +950,18 @@ var Editor = (_class = class {
950
950
  if (clip.in < 1e-9) delete clip.in;
951
951
  return;
952
952
  }
953
- if (clip.type !== "media" || _optionalChain([_chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
954
- clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip));
953
+ if (clip.type !== "media" || _optionalChain([_chunkCBVNCWJMcjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
954
+ clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkCBVNCWJMcjs.videoClipSpeed.call(void 0, clip));
955
955
  if (clip.in < 1e-9) delete clip.in;
956
956
  }
957
957
  /** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
958
958
  trimHead(clip, delta) {
959
959
  if (!isRamped(clip)) this.moveIn(clip, delta);
960
- retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
960
+ retimeClipKeys(clip, (v) => _chunkCBVNCWJMcjs.retimeVideoAnimatable.call(void 0, v, -delta));
961
961
  }
962
962
  /** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
963
963
  cut(track, clip, at, id) {
964
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
964
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip);
965
965
  const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
966
966
  delete right.transition;
967
967
  delete right.fadeIn;
@@ -969,9 +969,9 @@ var Editor = (_class = class {
969
969
  delete right.animateIn;
970
970
  const leftValues = clipAnimatables(clip);
971
971
  clipAnimatables(right).forEach((r, i) => {
972
- const [l, rr] = _chunkZBCT5MEAcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
973
- if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
974
- if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
972
+ const [l, rr] = _chunkCBVNCWJMcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
973
+ if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
974
+ if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
975
975
  });
976
976
  if (!isRamped(right)) this.moveIn(right, at - clip.start);
977
977
  clip.duration = at - clip.start;
@@ -985,7 +985,7 @@ var Editor = (_class = class {
985
985
  /** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
986
986
  cutAcross(tracks, at) {
987
987
  const made = [];
988
- for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
988
+ for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON && _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) > at + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
989
989
  return made;
990
990
  }
991
991
  /**
@@ -1003,10 +1003,10 @@ var Editor = (_class = class {
1003
1003
  */
1004
1004
  close(tracks, from, to) {
1005
1005
  for (const t of tracks) {
1006
- const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, t, from, to);
1006
+ const hit = _chunkCBVNCWJMcjs.videoOverlap.call(void 0, t, from, to);
1007
1007
  if (hit)
1008
1008
  refuse(
1009
- `Rippling out ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, hit))}) is in that stretch. Extract the range across "${t.id}" too (extract_range with its id in "tracks"), turn its sync lock off (update_track with syncLocked false) or lock it, or lift instead of rippling.`
1009
+ `Rippling out ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, hit))}) is in that stretch. Extract the range across "${t.id}" too (extract_range with its id in "tracks"), turn its sync lock off (update_track with syncLocked false) or lock it, or lift instead of rippling.`
1010
1010
  );
1011
1011
  }
1012
1012
  for (const t of tracks) this.shift(t, to, from - to);
@@ -1018,10 +1018,10 @@ var Editor = (_class = class {
1018
1018
  clear(track, from, to, report) {
1019
1019
  for (const c of [...track.clips]) {
1020
1020
  const start = c.start;
1021
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c);
1022
- if (end <= from + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || start >= to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
1023
- const coversHead = start >= from - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
1024
- const coversTail = end <= to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
1021
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c);
1022
+ if (end <= from + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON || start >= to - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) continue;
1023
+ const coversHead = start >= from - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON;
1024
+ const coversTail = end <= to + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON;
1025
1025
  if (coversHead && coversTail) {
1026
1026
  track.clips = track.clips.filter((x) => x !== c);
1027
1027
  report.removed.push(c.id);
@@ -1044,8 +1044,8 @@ var Editor = (_class = class {
1044
1044
  /** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
1045
1045
  clamp(delta, lo, hi, why) {
1046
1046
  const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
1047
- if (Math.abs(delta) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(why());
1048
- return Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON ? 0 : applied;
1047
+ if (Math.abs(delta) > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(why());
1048
+ return Math.abs(applied) <= _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON ? 0 : applied;
1049
1049
  }
1050
1050
  /** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
1051
1051
  place(track, clip, mode, outcome) {
@@ -1055,14 +1055,14 @@ var Editor = (_class = class {
1055
1055
  outcome.rippled = tracks.map((t) => t.id);
1056
1056
  } else if (mode === "overwrite") {
1057
1057
  const report = { removed: [], trimmed: [], created: [] };
1058
- this.clear(track, clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), report);
1058
+ this.clear(track, clip.start, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip), report);
1059
1059
  Object.assign(outcome, report);
1060
1060
  } else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
1061
1061
  track.clips.push(clip);
1062
1062
  track.clips.sort((a, b) => a.start - b.start);
1063
1063
  }
1064
1064
  placement(mode, ripple) {
1065
- if (mode !== void 0 && !_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
1065
+ if (mode !== void 0 && !_chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
1066
1066
  if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
1067
1067
  return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
1068
1068
  }
@@ -1099,7 +1099,7 @@ var Editor = (_class = class {
1099
1099
  }
1100
1100
  case "remove_asset": {
1101
1101
  const asset = this.asset(e.asset);
1102
- const users = _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
1102
+ const users = _chunkCBVNCWJMcjs.allVideoTracks.call(void 0, this.p).flatMap(({ track: t }) => t.clips.filter((c) => c.type === "media" && c.asset === asset.id).map((c) => c.id));
1103
1103
  if (users.length) refuse(`Asset "${asset.id}" is used by clip${users.length > 1 ? "s" : ""} ${users.map((u) => `"${u}"`).join(", ")}; delete ${users.length > 1 ? "them" : "it"} first.`);
1104
1104
  this.p.assets = this.p.assets.filter((a) => a !== asset);
1105
1105
  return this.outcomes.push({ op: e.op, asset: asset.id });
@@ -1152,12 +1152,12 @@ var Editor = (_class = class {
1152
1152
  else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
1153
1153
  if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
1154
1154
  } else if (draft.type === "sequence") {
1155
- const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
1155
+ const length = _chunkCBVNCWJMcjs.videoSequenceDuration.call(void 0, _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
1156
1156
  if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
1157
1157
  draft.duration = length;
1158
1158
  } else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
1159
1159
  }
1160
- const end = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c)), 0);
1160
+ const end = _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c)), 0);
1161
1161
  draft.start ??= end;
1162
1162
  const clip = parseVideoClip(draft, "clip");
1163
1163
  this.adjustmentTarget(clip);
@@ -1183,20 +1183,20 @@ var Editor = (_class = class {
1183
1183
  case "trim_clip": {
1184
1184
  const { track, clip } = this.clip(e.clip);
1185
1185
  this.unlocked(track);
1186
- const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
1187
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1186
+ const speed = _chunkCBVNCWJMcjs.videoClipSpeed.call(void 0, clip);
1187
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip);
1188
1188
  const minimum = 1e3 / this.p.fps;
1189
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1189
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, this.p);
1190
1190
  if (e.edge === "start") {
1191
1191
  const delta = e.to - clip.start;
1192
- if (clip.duration - delta < minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}.`);
1192
+ if (clip.duration - delta < minimum - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, end)}.`);
1193
1193
  if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
1194
1194
  const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
1195
- if (sourceIn < -_chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" starts ${Math.round((_nullishCoalesce(clip.in, () => ( 0))) / speed)} ms into its source, so its start can move at most that far earlier (to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
1195
+ if (sourceIn < -_chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" starts ${Math.round((_nullishCoalesce(clip.in, () => ( 0))) / speed)} ms into its source, so its start can move at most that far earlier (to ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
1196
1196
  clip.in = Math.max(0, sourceIn);
1197
1197
  if (clip.in === 0) delete clip.in;
1198
1198
  }
1199
- retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
1199
+ retimeClipKeys(clip, (v) => _chunkCBVNCWJMcjs.retimeVideoAnimatable.call(void 0, v, -delta));
1200
1200
  if (e.ripple) {
1201
1201
  const tracks = this.rippleTracks([track]);
1202
1202
  if (delta > 0) {
@@ -1217,17 +1217,17 @@ var Editor = (_class = class {
1217
1217
  }
1218
1218
  } else {
1219
1219
  const duration = e.to - clip.start;
1220
- if (duration < minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start)}.`);
1220
+ if (duration < minimum - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, clip.start)}.`);
1221
1221
  if (clip.type === "media" && !isRamped(clip)) {
1222
1222
  const asset = assets.get(clip.asset);
1223
1223
  const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
1224
- if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1225
- refuse(`"${clip.id}" can end at most at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
1224
+ if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
1225
+ refuse(`"${clip.id}" can end at most at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
1226
1226
  }
1227
1227
  if (clip.type === "sequence") {
1228
- const seq = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
1229
- const length = seq ? _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
1230
- if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
1228
+ const seq = _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
1229
+ const length = seq ? _chunkCBVNCWJMcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
1230
+ if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
1231
1231
  }
1232
1232
  if (e.ripple) {
1233
1233
  const tracks = this.rippleTracks([track]);
@@ -1249,9 +1249,9 @@ var Editor = (_class = class {
1249
1249
  case "split_clip": {
1250
1250
  const { track, clip } = this.clip(e.clip);
1251
1251
  this.unlocked(track);
1252
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1252
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip);
1253
1253
  const minimum = 1e3 / this.p.fps;
1254
- if (e.at < clip.start + minimum - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
1254
+ if (e.at < clip.start + minimum - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
1255
1255
  if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
1256
1256
  const right = this.cut(track, clip, e.at, e.id);
1257
1257
  return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
@@ -1262,12 +1262,12 @@ var Editor = (_class = class {
1262
1262
  for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
1263
1263
  if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
1264
1264
  const rippled = /* @__PURE__ */ new Set();
1265
- const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
1266
- if (found.some((f) => _chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
1265
+ const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkCBVNCWJMcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
1266
+ if (found.some((f) => _chunkCBVNCWJMcjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkCBVNCWJMcjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
1267
1267
  for (const sources of groups) {
1268
1268
  const tracks = this.rippleTracks(sources);
1269
1269
  tracks.forEach((t) => rippled.add(t));
1270
- const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, f.clip)]));
1270
+ const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, f.clip)]));
1271
1271
  for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
1272
1272
  }
1273
1273
  return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id), rippled: this.p.tracks.filter((t) => rippled.has(t)).map((t) => t.id) });
@@ -1283,7 +1283,7 @@ var Editor = (_class = class {
1283
1283
  if ("timeRemap" in set) refuse("Set a speed ramp with set_time_remap, which checks it against the media and moves later clips if asked.");
1284
1284
  let stretch = 1;
1285
1285
  if (at.clip.type === "media" && !("duration" in set)) {
1286
- const was = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, at.clip);
1286
+ const was = _chunkCBVNCWJMcjs.videoClipSpeed.call(void 0, at.clip);
1287
1287
  const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _18 => _18.remove, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20("speed")]) ? 1 : was;
1288
1288
  if (now !== was) {
1289
1289
  set.duration = at.clip.duration * was / now;
@@ -1291,7 +1291,7 @@ var Editor = (_class = class {
1291
1291
  }
1292
1292
  }
1293
1293
  const next = { ...structuredClone(at.clip), ...set };
1294
- if (stretch !== 1) retimeClipKeys(next, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
1294
+ if (stretch !== 1) retimeClipKeys(next, (v) => _chunkCBVNCWJMcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
1295
1295
  for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
1296
1296
  const clip = parseVideoClip(next, "set");
1297
1297
  this.adjustmentTarget(clip);
@@ -1305,17 +1305,17 @@ var Editor = (_class = class {
1305
1305
  const { track, clip } = this.clip(e.clip);
1306
1306
  this.unlocked(track);
1307
1307
  if (clip.type === "sequence") refuse(`Clip "${clip.id}" is a compound clip, which plays its sequence at normal speed; ramp the clips inside the sequence instead.`);
1308
- if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
1308
+ if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkCBVNCWJMcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
1309
1309
  const asset = this.asset(clip.asset);
1310
1310
  if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
1311
1311
  const media = clip;
1312
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, media);
1312
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, media);
1313
1313
  const duration = _nullishCoalesce(e.duration, () => ( media.duration));
1314
- if (!(duration >= 1e3 / this.p.fps - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
1314
+ if (!(duration >= 1e3 / this.p.fps - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
1315
1315
  if (e.keys === null) {
1316
1316
  if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
1317
1317
  const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
1318
- if (asset.duration !== void 0 && from + duration > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1318
+ if (asset.duration !== void 0 && from + duration > asset.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
1319
1319
  refuse(`At normal speed from ${Math.round(from)} ms, "${clip.id}" would run past the end of "${asset.id}" (${asset.duration} ms); give a duration of at most ${Math.floor(asset.duration - from)} ms.`);
1320
1320
  delete media.timeRemap;
1321
1321
  media.in = from;
@@ -1323,17 +1323,17 @@ var Editor = (_class = class {
1323
1323
  } else {
1324
1324
  if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must be a list of at least one { t, v, ease } (or null to remove the ramp).');
1325
1325
  const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
1326
- remap.keys = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
1327
- _chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
1328
- const span = _chunkZBCT5MEAcjs.videoTimeRemapSpan.call(void 0, remap);
1329
- if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1326
+ remap.keys = _chunkCBVNCWJMcjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
1327
+ _chunkCBVNCWJMcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
1328
+ const span = _chunkCBVNCWJMcjs.videoTimeRemapSpan.call(void 0, remap);
1329
+ if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON)
1330
1330
  refuse(`The ramp plays ${Math.round(span.to)} ms of source from the in point (${_nullishCoalesce(media.in, () => ( 0))} ms), past the end of "${asset.id}" (${asset.duration} ms); it can use at most ${Math.floor(asset.duration - (_nullishCoalesce(media.in, () => ( 0))))} ms.`);
1331
1331
  media.timeRemap = remap;
1332
1332
  delete media.speed;
1333
1333
  }
1334
1334
  const newEnd = media.start + duration;
1335
1335
  const outcome = { op: e.op, clip: clip.id, track: track.id };
1336
- if (Math.abs(newEnd - end) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1336
+ if (Math.abs(newEnd - end) > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) {
1337
1337
  if (e.ripple) {
1338
1338
  const tracks = this.rippleTracks([track]);
1339
1339
  if (newEnd < end) {
@@ -1362,11 +1362,11 @@ var Editor = (_class = class {
1362
1362
  case "slip_clip": {
1363
1363
  const { track, clip } = this.clip(e.clip);
1364
1364
  this.unlocked(track);
1365
- if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
1365
+ if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkCBVNCWJMcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
1366
1366
  const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
1367
1367
  if (clip.type === "media" && this.asset(clip.asset).kind === "image") refuse(`Clip "${clip.id}" is a still ("${clip.asset}"), so it has no source to slip; only video and audio clips slip.`);
1368
- const handles = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p), _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p));
1369
- const { lead, tail } = _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, clip);
1368
+ const handles = _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, clip, _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, this.p), _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p));
1369
+ const { lead, tail } = _chunkCBVNCWJMcjs.videoClipOverhang.call(void 0, track, clip);
1370
1370
  const delta = this.clamp(
1371
1371
  e.delta,
1372
1372
  lead - handles.before,
@@ -1384,13 +1384,13 @@ var Editor = (_class = class {
1384
1384
  this.unlocked(track);
1385
1385
  const L = left.clip;
1386
1386
  const R = right.clip;
1387
- if (Math.abs(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1388
- if (Math.abs(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
1389
- refuse(`"${L.id}" ends at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
1387
+ if (Math.abs(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) {
1388
+ if (Math.abs(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
1389
+ refuse(`"${L.id}" ends at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
1390
1390
  }
1391
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1392
- const lo = Math.max(-(L.duration - this.frame), -(_chunkZBCT5MEAcjs.videoClipHandles.call(void 0, R, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, R).lead));
1393
- const hi = Math.min(R.duration - this.frame, _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, L, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, L).tail);
1391
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, this.p);
1392
+ const lo = Math.max(-(L.duration - this.frame), -(_chunkCBVNCWJMcjs.videoClipHandles.call(void 0, R, assets, _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkCBVNCWJMcjs.videoClipOverhang.call(void 0, track, R).lead));
1393
+ const hi = Math.min(R.duration - this.frame, _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, L, assets, _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkCBVNCWJMcjs.videoClipOverhang.call(void 0, track, L).tail);
1394
1394
  const delta = this.clamp(
1395
1395
  e.delta,
1396
1396
  lo,
@@ -1406,18 +1406,18 @@ var Editor = (_class = class {
1406
1406
  case "slide_clip": {
1407
1407
  const { track, clip } = this.clip(e.clip);
1408
1408
  this.unlocked(track);
1409
- const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
1410
- const after = _chunkZBCT5MEAcjs.videoClipAfter.call(void 0, track, clip);
1409
+ const before = _chunkCBVNCWJMcjs.videoClipBefore.call(void 0, track, clip);
1410
+ const after = _chunkCBVNCWJMcjs.videoClipAfter.call(void 0, track, clip);
1411
1411
  if (!before && !after) refuse(`"${clip.id}" has no clip right before or after it on track "${track.id}", so there is nothing to slide against; use move_clip.`);
1412
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1413
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1412
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, this.p);
1413
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip);
1414
1414
  const others = track.clips.filter((c) => c !== clip);
1415
1415
  const room = {
1416
- earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c)), 0),
1417
- later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
1416
+ earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c)), 0),
1417
+ later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
1418
1418
  };
1419
- const lo = -Math.min(room.earlier, after ? _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, after, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
1420
- const hi = Math.min(room.later, before ? _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, before, assets, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
1419
+ const lo = -Math.min(room.earlier, after ? _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, after, assets, _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p)).before - _chunkCBVNCWJMcjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
1420
+ const hi = Math.min(room.later, before ? _chunkCBVNCWJMcjs.videoClipHandles.call(void 0, before, assets, _chunkCBVNCWJMcjs.videoSequenceMap.call(void 0, this.p)).after - _chunkCBVNCWJMcjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
1421
1421
  const delta = this.clamp(
1422
1422
  e.delta,
1423
1423
  lo,
@@ -1450,29 +1450,29 @@ var Editor = (_class = class {
1450
1450
  }
1451
1451
  case "split_at": {
1452
1452
  const tracks = this.rangeTracks(e.tracks);
1453
- const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > e.at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).map((c) => c.id));
1454
- if (!lefts.length) refuse(`No clip runs across ${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, e.at)} on ${e.tracks ? `track${tracks.length > 1 ? "s" : ""} ${tracks.map((t) => `"${t.id}"`).join(", ")}` : "the unlocked tracks"}, so there is nothing to split there.`);
1453
+ const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON && _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) > e.at + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON).map((c) => c.id));
1454
+ if (!lefts.length) refuse(`No clip runs across ${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, e.at)} on ${e.tracks ? `track${tracks.length > 1 ? "s" : ""} ${tracks.map((t) => `"${t.id}"`).join(", ")}` : "the unlocked tracks"}, so there is nothing to split there.`);
1455
1455
  const created = this.cutAcross(tracks, e.at).map((c) => c.id);
1456
1456
  return this.outcomes.push({ op: e.op, clips: lefts, created });
1457
1457
  }
1458
1458
  case "set_keyframes": {
1459
1459
  const { track, clip } = this.clip(e.clip);
1460
1460
  this.unlocked(track);
1461
- if (!_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
1461
+ if (!_chunkCBVNCWJMcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkCBVNCWJMcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
1462
1462
  if (e.property === "volume" && clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${clip.type} clip and has no volume; volume keys go on media and compound clips.`);
1463
- const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[e.property];
1464
- const transform = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
1463
+ const limits = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS[e.property];
1464
+ const transform = _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
1465
1465
  const c = clip;
1466
1466
  const current = transform ? _optionalChain([c, 'access', _23 => _23.transform, 'optionalAccess', _24 => _24[e.property]]) : c[e.property];
1467
1467
  let value;
1468
1468
  if (e.keys === null) {
1469
- const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, current, 0, limits.default);
1470
- value = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
1469
+ const v = _chunkCBVNCWJMcjs.videoValueAt.call(void 0, current, 0, limits.default);
1470
+ value = _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
1471
1471
  } else {
1472
1472
  if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
1473
1473
  let sorted = [];
1474
1474
  try {
1475
- sorted = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, e.keys);
1475
+ sorted = _chunkCBVNCWJMcjs.sortVideoKeys.call(void 0, e.keys);
1476
1476
  } catch (error) {
1477
1477
  refuse(error.message);
1478
1478
  }
@@ -1491,12 +1491,12 @@ var Editor = (_class = class {
1491
1491
  this.unlocked(track);
1492
1492
  let at = 0;
1493
1493
  const moved = [];
1494
- for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
1495
- if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1494
+ for (const clip of _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track)) {
1495
+ if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) {
1496
1496
  clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
1497
1497
  moved.push(clip.id);
1498
1498
  }
1499
- at = Math.max(at, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
1499
+ at = Math.max(at, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip));
1500
1500
  }
1501
1501
  return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
1502
1502
  }
@@ -1626,7 +1626,7 @@ function videoTranscriptTrack(project, track) {
1626
1626
  if (!project.tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project.tracks.map((t) => `"${t.id}"`).join(", ")}.`);
1627
1627
  return track;
1628
1628
  }
1629
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
1629
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, project);
1630
1630
  const transcribed = (t) => t.clips.some((c) => c.type === "media" && _optionalChain([assets, 'access', _26 => _26.get, 'call', _27 => _27(c.asset), 'optionalAccess', _28 => _28.transcript, 'optionalAccess', _29 => _29.length]));
1631
1631
  return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _30 => _30.id]), () => ( null));
1632
1632
  }
@@ -1634,16 +1634,16 @@ function videoTimelineTranscript(project, options = {}) {
1634
1634
  const id = videoTranscriptTrack(project, options.track);
1635
1635
  if (!id) return [];
1636
1636
  const track = project.tracks.find((t) => t.id === id);
1637
- const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
1637
+ const assets = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, project);
1638
1638
  const out = [];
1639
- for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
1639
+ for (const clip of _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track)) {
1640
1640
  if (clip.type !== "media") continue;
1641
1641
  const words = _optionalChain([assets, 'access', _31 => _31.get, 'call', _32 => _32(clip.asset), 'optionalAccess', _33 => _33.transcript]);
1642
1642
  if (!_optionalChain([words, 'optionalAccess', _34 => _34.length])) continue;
1643
- const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
1643
+ const speed = _chunkCBVNCWJMcjs.videoClipSpeed.call(void 0, clip);
1644
1644
  const from = _nullishCoalesce(clip.in, () => ( 0));
1645
1645
  const to = from + clip.duration * speed;
1646
- const toTimeline = (s) => Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
1646
+ const toTimeline = (s) => Math.min(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
1647
1647
  words.forEach((w, index) => {
1648
1648
  const mid = (w.start + w.end) / 2;
1649
1649
  if (mid < from || mid >= to) return;
@@ -1688,19 +1688,19 @@ function findVideoTranscriptPauses(words, options = {}) {
1688
1688
  let to = b.start - keep;
1689
1689
  if (options.fps) {
1690
1690
  const f = 1e3 / options.fps;
1691
- from = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
1692
- to = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
1691
+ from = _chunkCBVNCWJMcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
1692
+ to = _chunkCBVNCWJMcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
1693
1693
  }
1694
- if (to - from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
1694
+ if (to - from > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
1695
1695
  }
1696
1696
  return out;
1697
1697
  }
1698
1698
  function mergeVideoRanges(ranges) {
1699
- const sorted = ranges.filter((r) => r.to - r.from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
1699
+ const sorted = ranges.filter((r) => r.to - r.from > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
1700
1700
  const out = [];
1701
1701
  for (const r of sorted) {
1702
1702
  const last = out[out.length - 1];
1703
- if (last && r.from <= last.to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
1703
+ if (last && r.from <= last.to + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
1704
1704
  else out.push(r);
1705
1705
  }
1706
1706
  return out;
@@ -1746,7 +1746,7 @@ function findVideoRepetitions(words, options = {}) {
1746
1746
  var VIDEO_DISFLUENCY_KINDS = ["filler", "pause", "repetition"];
1747
1747
  function detectVideoDisfluencies(words, options = {}) {
1748
1748
  const kinds = new Set(_nullishCoalesce(options.kinds, () => ( VIDEO_DISFLUENCY_KINDS)));
1749
- const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON));
1749
+ const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON));
1750
1750
  const out = [];
1751
1751
  if (kinds.has("filler"))
1752
1752
  for (const r of findVideoFillers(words, options.fillers)) {
@@ -1760,13 +1760,13 @@ function detectVideoDisfluencies(words, options = {}) {
1760
1760
  }
1761
1761
  if (kinds.has("pause"))
1762
1762
  for (const r of findVideoTranscriptPauses(words, options.pauses)) {
1763
- const after = words.findIndex((w) => w.start >= r.to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
1763
+ const after = words.findIndex((w) => w.start >= r.to - _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON);
1764
1764
  out.push({ ...r, kind: "pause", words: [Math.max(0, after - 1), Math.max(0, after)] });
1765
1765
  }
1766
1766
  return out.sort((a, b) => a.from - b.from || a.to - b.to);
1767
1767
  }
1768
1768
  function videoCutsWithMargin(ranges, keep) {
1769
- return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
1769
+ return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON);
1770
1770
  }
1771
1771
 
1772
1772
  // src/video-editor/mix.ts
@@ -1872,7 +1872,7 @@ function videoDuckingKeys(clip, speech, options = {}) {
1872
1872
  const gap = Math.max(_nullishCoalesce(options.mergeGap, () => ( 600)), attack + release);
1873
1873
  const base = _nullishCoalesce(options.base, () => ( 1));
1874
1874
  const low = Math.round(base * 10 ** (duckDb / 20) * 1e4) / 1e4;
1875
- const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1875
+ const end = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip);
1876
1876
  const ranges = [];
1877
1877
  for (const r of mergeVideoRanges(speech)) {
1878
1878
  if (r.to <= clip.start - release || r.from >= end + attack) continue;
@@ -2077,7 +2077,7 @@ function videoClipWaveform(clip, peaks, columns) {
2077
2077
  const step = clip.duration / Math.max(1, n);
2078
2078
  for (let c = 0; c < n; c++) {
2079
2079
  const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
2080
- const gain = _chunkZBCT5MEAcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
2080
+ const gain = _chunkCBVNCWJMcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
2081
2081
  out[2 * c] = min * gain;
2082
2082
  out[2 * c + 1] = max * gain;
2083
2083
  }
@@ -2210,8 +2210,8 @@ function videoClipPicture(project, clip) {
2210
2210
  const asset = clip.type === "media" ? project.assets.find((a) => a.id === clip.asset) : void 0;
2211
2211
  const size = asset ? { width: _nullishCoalesce(asset.width, () => ( project.width)), height: _nullishCoalesce(asset.height, () => ( project.height)) } : { width: project.width, height: project.height };
2212
2212
  const fit = _nullishCoalesce(clip.fit, () => ( (clip.type === "media" || clip.type === "sequence" ? "contain" : "fill")));
2213
- const rect = _chunkZBCT5MEAcjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
2214
- return { size, rect, rotation: _chunkZBCT5MEAcjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
2213
+ const rect = _chunkCBVNCWJMcjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
2214
+ return { size, rect, rotation: _chunkCBVNCWJMcjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
2215
2215
  }
2216
2216
  function turn(x, y, cx, cy, deg) {
2217
2217
  if (!deg) return [x, y];
@@ -2237,7 +2237,7 @@ function videoClipMaskOutline(project, clip) {
2237
2237
  const { rect, rotation } = picture;
2238
2238
  const cx = rect.x + rect.width / 2;
2239
2239
  const cy = rect.y + rect.height / 2;
2240
- const polygon = _chunkZBCT5MEAcjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
2240
+ const polygon = _chunkCBVNCWJMcjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
2241
2241
  if (polygon.length < 2) return null;
2242
2242
  return [...polygon, polygon[0]].flatMap(([x, y]) => [Math.round(x * 100) / 100, Math.round(y * 100) / 100]);
2243
2243
  }
@@ -2275,7 +2275,7 @@ var VideoPathGesture = (_class3 = class {
2275
2275
  // src/video-editor/plan.ts
2276
2276
  function clipIndex(project) {
2277
2277
  const out = /* @__PURE__ */ new Map();
2278
- for (const { track } of _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
2278
+ for (const { track } of _chunkCBVNCWJMcjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
2279
2279
  return out;
2280
2280
  }
2281
2281
  function diffVideoProjects(before, after) {
@@ -2284,8 +2284,8 @@ function diffVideoProjects(before, after) {
2284
2284
  const clipsAdded = [...b.keys()].filter((id) => !a.has(id));
2285
2285
  const clipsRemoved = [...a.keys()].filter((id) => !b.has(id));
2286
2286
  const clipsChanged = [...b.keys()].filter((id) => a.has(id) && JSON.stringify(a.get(id)) !== JSON.stringify(b.get(id)));
2287
- const durationBefore = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, before);
2288
- const durationAfter = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, after);
2287
+ const durationBefore = _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, before);
2288
+ const durationAfter = _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, after);
2289
2289
  return { durationBefore, durationAfter, durationDelta: durationAfter - durationBefore, clipsAdded, clipsRemoved, clipsChanged };
2290
2290
  }
2291
2291
  function planVideoEdits(project, input) {
@@ -2712,10 +2712,10 @@ function videoTransformOfView(view, base, stage) {
2712
2712
  function videoCameraBase(clip) {
2713
2713
  if (clip.camera) return clip.camera.base;
2714
2714
  const t = _nullishCoalesce(clip.transform, () => ( {}));
2715
- const keyed = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, t[p]));
2715
+ const keyed = _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, t[p]));
2716
2716
  if (keyed.length)
2717
2717
  throw new Error(`Clip "${clip.id}" keys its ${keyed.join(", ")}, which a camera move would replace; remove those keyframes first (set_video_keyframes with keys null).`);
2718
- return Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
2718
+ return Object.fromEntries(_chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
2719
2719
  }
2720
2720
  async function bakeVideoClipCamera(clip, camera, project, provider) {
2721
2721
  const stage = { width: project.width, height: project.height };
@@ -2726,22 +2726,22 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2726
2726
  const windows = {};
2727
2727
  let keys = [];
2728
2728
  let inMs = 0;
2729
- const moveIn = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.in);
2729
+ const moveIn = _chunkL2JTLW6Bcjs.cameraMoveParts.call(void 0, camera.in);
2730
2730
  if (moveIn) {
2731
- const { description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
2731
+ const { description } = await _chunkL2JTLW6Bcjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
2732
2732
  inMs = _nullishCoalesce(moveIn.ms, () => ( description.camera.durationMs));
2733
2733
  if (inMs > clip.duration) throw new Error(`The move into clip "${clip.id}" takes ${inMs} ms, longer than the clip (${clip.duration} ms); give a shorter "ms" or lengthen the clip.`);
2734
- const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
2734
+ const sample = await _chunkL2JTLW6Bcjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
2735
2735
  keys.push(...sample.keys);
2736
2736
  if (sample.cut !== void 0) cuts.push(sample.cut);
2737
2737
  windows.in = { start: 0, end: inMs };
2738
2738
  }
2739
- const moveDuring = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.during);
2739
+ const moveDuring = _chunkL2JTLW6Bcjs.cameraMoveParts.call(void 0, camera.during);
2740
2740
  const holdMs = clip.duration - inMs;
2741
2741
  if (moveDuring && holdMs > 0) {
2742
- await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
2742
+ await _chunkL2JTLW6Bcjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
2743
2743
  const at = keys.length ? keys[keys.length - 1].view : to;
2744
- const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
2744
+ const sample = await _chunkL2JTLW6Bcjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
2745
2745
  const shifted = sample.keys.map((k) => ({ t: k.t + inMs, view: k.view }));
2746
2746
  if (keys.length && shifted.length && sameView(keys[keys.length - 1].view, shifted[0].view)) shifted.shift();
2747
2747
  keys.push(...shifted);
@@ -2754,7 +2754,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2754
2754
  const base = videoCameraBase(clip);
2755
2755
  const transforms = keys.map((k) => ({ t: Math.round(k.t * 1e3) / 1e3, value: videoTransformOfView(k.view, base, stage) }));
2756
2756
  const transform = {};
2757
- for (const p of _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES) {
2757
+ for (const p of _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES) {
2758
2758
  const out = [];
2759
2759
  for (const { t, value } of transforms) {
2760
2760
  const last = out[out.length - 1];
@@ -2768,7 +2768,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2768
2768
  }
2769
2769
  var sameView = (a, b) => ["zoom", "scrollX", "scrollY", "tilt", "turn", "roll", "blur"].every((k) => Math.abs((_nullishCoalesce(a[k], () => ( 0))) - (_nullishCoalesce(b[k], () => ( 0)))) < 1e-9);
2770
2770
  function videoClipCameraMove(clip, role) {
2771
- return _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
2771
+ return _chunkL2JTLW6Bcjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
2772
2772
  }
2773
2773
 
2774
2774
  // src/video-editor/transcript-controller.ts
@@ -2997,7 +2997,7 @@ function videoProxyFfmpeg(asset, options = {}) {
2997
2997
  output
2998
2998
  ];
2999
2999
  const proxy = { scale, src: output, ...asset.width && asset.height ? { width: Math.trunc(asset.width * scale / 2) * 2, height: Math.trunc(asset.height * scale / 2) * 2 } : {} };
3000
- return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkZBCT5MEAcjs.videoShellQuote).join(" "), proxy };
3000
+ return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkCBVNCWJMcjs.videoShellQuote).join(" "), proxy };
3001
3001
  }
3002
3002
  function videoProxyPlan(project, options = {}) {
3003
3003
  const scale = _nullishCoalesce(options.scale, () => ( 0.5));
@@ -3023,7 +3023,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
3023
3023
  var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
3024
3024
  function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
3025
3025
  const out = [];
3026
- for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time).layers)) {
3026
+ for (const layer of _chunkCBVNCWJMcjs.videoFrameLeafLayers.call(void 0, _chunkCBVNCWJMcjs.videoFrameAt.call(void 0, project, time).layers)) {
3027
3027
  if (layer.type !== "media" || layer.assetKind !== "video") continue;
3028
3028
  const src = srcFor(layer);
3029
3029
  if (!src) continue;
@@ -3364,7 +3364,7 @@ var VideoPreviewEngine = (_class7 = class {
3364
3364
  if (this.destroyed) return;
3365
3365
  const state = this.source.getState();
3366
3366
  const { project, time, playing } = state;
3367
- const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time);
3367
+ const frame = _chunkCBVNCWJMcjs.videoFrameAt.call(void 0, project, time);
3368
3368
  const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
3369
3369
  const assets = new Map(project.assets.map((a) => [a.id, a]));
3370
3370
  this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
@@ -3394,7 +3394,7 @@ var VideoPreviewEngine = (_class7 = class {
3394
3394
  }
3395
3395
  };
3396
3396
  const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
3397
- for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
3397
+ for (const layer of _chunkCBVNCWJMcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
3398
3398
  if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
3399
3399
  const sound = sounding.get(layer.clip);
3400
3400
  sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _93 => _93.speed]), () => ( 1)), sound ? sound.gain : null);
@@ -3406,9 +3406,9 @@ var VideoPreviewEngine = (_class7 = class {
3406
3406
  }
3407
3407
  /** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
3408
3408
  drawable(project, frame) {
3409
- if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkZBCT5MEAcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
3410
- const at = _chunkZBCT5MEAcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
3411
- return at === frame.time ? frame : { ..._chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
3409
+ if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkCBVNCWJMcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
3410
+ const at = _chunkCBVNCWJMcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
3411
+ return at === frame.time ? frame : { ..._chunkCBVNCWJMcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
3412
3412
  }
3413
3413
  redraw() {
3414
3414
  if (this.scheduled || this.destroyed) return;
@@ -3417,7 +3417,7 @@ var VideoPreviewEngine = (_class7 = class {
3417
3417
  this.scheduled = false;
3418
3418
  if (this.destroyed) return;
3419
3419
  const { project, time } = this.source.getState();
3420
- this.draw(this.drawable(project, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time)));
3420
+ this.draw(this.drawable(project, _chunkCBVNCWJMcjs.videoFrameAt.call(void 0, project, time)));
3421
3421
  });
3422
3422
  }
3423
3423
  __init42() {this.sourceFor = (layer) => {
@@ -3460,7 +3460,7 @@ var VideoPreviewEngine = (_class7 = class {
3460
3460
  if (!source) this.complete = false;
3461
3461
  return source;
3462
3462
  };
3463
- _chunkZBCT5MEAcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
3463
+ _chunkCBVNCWJMcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
3464
3464
  defineSvgFilter: this.defineSvgFilter,
3465
3465
  lutFor: this.lutFor,
3466
3466
  scratch: this.scratch,
@@ -3533,15 +3533,15 @@ var VideoPreviewEngine = (_class7 = class {
3533
3533
  var svgUrl = (svg) => svg.trimStart().startsWith("<") ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}` : svg;
3534
3534
  var GROUPS = ["base", "background", "subject", "overlay", "text"];
3535
3535
  function videoEditsFromSequence(project, sequence, options = {}) {
3536
- const at = _nullishCoalesce(options.at, () => ( _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project)));
3536
+ const at = _nullishCoalesce(options.at, () => ( _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, project)));
3537
3537
  const W = project.width;
3538
3538
  const H = project.height;
3539
3539
  const sx = W / sequence.stage.width;
3540
3540
  const sy = H / sequence.stage.height;
3541
- const timing = _chunkZ3BRH4JKcjs.effectSequenceTiming.call(void 0, sequence);
3541
+ const timing = _chunk557BDWKOcjs.effectSequenceTiming.call(void 0, sequence);
3542
3542
  const provider = options.provider ? { provider: options.provider } : {};
3543
3543
  const notes = [];
3544
- const usedClips = new Set(_chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, project));
3544
+ const usedClips = new Set(_chunkCBVNCWJMcjs.allVideoClipIds.call(void 0, project));
3545
3545
  const usedTracks = new Set(project.tracks.map((t) => t.id));
3546
3546
  const usedAssets = new Set(project.assets.map((a) => a.id));
3547
3547
  const fresh = (used, base) => {
@@ -3583,11 +3583,11 @@ function videoEditsFromSequence(project, sequence, options = {}) {
3583
3583
  const shotEnd = _nullishCoalesce(timing.starts[i + 1], () => ( timing.total));
3584
3584
  let base;
3585
3585
  shot.layers.forEach((layer, j) => {
3586
- const span = _chunkZ3BRH4JKcjs.effectLayerSpan.call(void 0, layer, i, timing.starts, timing.total);
3586
+ const span = _chunk557BDWKOcjs.effectLayerSpan.call(void 0, layer, i, timing.starts, timing.total);
3587
3587
  if (span.end - span.start <= 0) return void notes.push(`Shot ${i + 1}, layer ${j + 1} lasts no time, so it was left out.`);
3588
3588
  const clip = clipOf(layer, at + span.start, span.end - span.start, i);
3589
- const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd && _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer) === "background" && !layer.rect;
3590
- const item = { group: isBase ? "base" : _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer), clip };
3589
+ const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd && _chunk557BDWKOcjs.effectLayerRole.call(void 0, layer) === "background" && !layer.rect;
3590
+ const item = { group: isBase ? "base" : _chunk557BDWKOcjs.effectLayerRole.call(void 0, layer), clip };
3591
3591
  if (isBase) base = item;
3592
3592
  items.push(item);
3593
3593
  });
@@ -3664,17 +3664,17 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3664
3664
  constructor(options = {}) {;_class8.prototype.__init46.call(this);_class8.prototype.__init47.call(this);_class8.prototype.__init48.call(this);_class8.prototype.__init49.call(this);_class8.prototype.__init50.call(this);_class8.prototype.__init51.call(this);_class8.prototype.__init52.call(this);_class8.prototype.__init53.call(this);_class8.prototype.__init54.call(this);_class8.prototype.__init55.call(this);_class8.prototype.__init56.call(this);_class8.prototype.__init57.call(this);_class8.prototype.__init58.call(this);
3665
3665
  this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkWKPXOGZZcjs.HistoryManager)()));
3666
3666
  this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
3667
- this.luts = options.luts instanceof _chunkZBCT5MEAcjs.VideoLutCache ? options.luts : new (0, _chunkZBCT5MEAcjs.VideoLutCache)(options.luts);
3667
+ this.luts = options.luts instanceof _chunkCBVNCWJMcjs.VideoLutCache ? options.luts : new (0, _chunkCBVNCWJMcjs.VideoLutCache)(options.luts);
3668
3668
  this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
3669
- this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)();
3669
+ this.effects = new (0, _chunkL2JTLW6Bcjs.EffectsSlot)();
3670
3670
  if (options.effects) this.effects.set(options.effects);
3671
- this.effectsEngine = new (0, _chunkZBCT5MEAcjs.VideoEffectsEngine)({ slot: this.effects });
3671
+ this.effectsEngine = new (0, _chunkCBVNCWJMcjs.VideoEffectsEngine)({ slot: this.effects });
3672
3672
  this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
3673
3673
  this.issues = checkVideoProject(this.project);
3674
3674
  this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
3675
3675
  this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
3676
3676
  this.onChange = options.onChange;
3677
- this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
3677
+ this.player = new (0, _chunkM5GLQQWGcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
3678
3678
  this.state = this.computeState();
3679
3679
  this.connect();
3680
3680
  }
@@ -3711,12 +3711,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3711
3711
  const h = this.history.getState();
3712
3712
  return {
3713
3713
  project: this.project,
3714
- duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project),
3714
+ duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, this.project),
3715
3715
  time: p.time,
3716
3716
  playing: p.playing,
3717
3717
  loop: p.loop,
3718
3718
  selection: this.selection,
3719
- current: _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
3719
+ current: _chunkCBVNCWJMcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
3720
3720
  issues: this.issues,
3721
3721
  readOnly: this.readOnly,
3722
3722
  error: this.error,
@@ -3750,7 +3750,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3750
3750
  this.issues = checkVideoProject(project);
3751
3751
  const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
3752
3752
  if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
3753
- this.player.setDuration(() => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project));
3753
+ this.player.setDuration(() => _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, this.project));
3754
3754
  } finally {
3755
3755
  this.applying = false;
3756
3756
  }
@@ -3912,7 +3912,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3912
3912
  }
3913
3913
  /** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
3914
3914
  select(clips, options = {}) {
3915
- const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
3915
+ const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
3916
3916
  let next;
3917
3917
  if (options.add) {
3918
3918
  next = [...this.selection];
@@ -3939,7 +3939,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3939
3939
  step(frames) {
3940
3940
  this.player.pause();
3941
3941
  const fps = this.project.fps;
3942
- this.player.seek(Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
3942
+ this.player.seek(Math.max(0, _chunkCBVNCWJMcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
3943
3943
  }
3944
3944
  setLoop(loop) {
3945
3945
  this.player.setLoop(loop);
@@ -3956,14 +3956,14 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3956
3956
  */
3957
3957
  snap(time, options = {}) {
3958
3958
  const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
3959
- const points = _chunkZBCT5MEAcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
3960
- const hit = _chunkZBCT5MEAcjs.snapVideoTime.call(void 0, time, points, threshold);
3961
- return hit.snapped !== null ? hit : { time: Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
3959
+ const points = _chunkCBVNCWJMcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
3960
+ const hit = _chunkCBVNCWJMcjs.snapVideoTime.call(void 0, time, points, threshold);
3961
+ return hit.snapped !== null ? hit : { time: Math.max(0, _chunkCBVNCWJMcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
3962
3962
  }
3963
3963
  /** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
3964
3964
  splitAtPlayhead() {
3965
- const t = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
3966
- const under = _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
3965
+ const t = _chunkCBVNCWJMcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
3966
+ const under = _chunkCBVNCWJMcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip));
3967
3967
  const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
3968
3968
  if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
3969
3969
  return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
@@ -3991,7 +3991,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3991
3991
  /** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
3992
3992
  async describeEffect(effect, place) {
3993
3993
  const d = await this.effects.require().describe(effect);
3994
- if (place) _chunkZBCT5MEAcjs.checkVideoEffectPlace.call(void 0, d, place);
3994
+ if (place) _chunkCBVNCWJMcjs.checkVideoEffectPlace.call(void 0, d, place);
3995
3995
  return d;
3996
3996
  }
3997
3997
  /**
@@ -4006,9 +4006,9 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4006
4006
  if (options.at !== void 0 && !(Number.isFinite(options.at) && options.at >= 0)) return this.refused(`"at" is a time in ms, 0 or more (got ${options.at}).`);
4007
4007
  let filled;
4008
4008
  try {
4009
- filled = await _chunkZ3BRH4JKcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
4009
+ filled = await _chunk557BDWKOcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
4010
4010
  } catch (error) {
4011
- if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4011
+ if (_chunkL2JTLW6Bcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4012
4012
  throw error;
4013
4013
  }
4014
4014
  const made = videoEditsFromSequence(this.getState().project, filled.sequence, { at: options.at, provider: this.effects.provider.id });
@@ -4027,7 +4027,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4027
4027
  try {
4028
4028
  plan = await run();
4029
4029
  } catch (error) {
4030
- if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4030
+ if (_chunkL2JTLW6Bcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4031
4031
  throw error;
4032
4032
  }
4033
4033
  const result = this.apply(plan.edit, plan.label, { merge });
@@ -4035,7 +4035,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4035
4035
  return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
4036
4036
  }
4037
4037
  clipOrThrow(id) {
4038
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
4038
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, id);
4039
4039
  if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
4040
4040
  return at.clip;
4041
4041
  }
@@ -4048,7 +4048,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4048
4048
  return this.effectEdit(async () => {
4049
4049
  const current = this.clipOrThrow(clip);
4050
4050
  const d = await this.describeEffect(effect, "clip");
4051
- const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4051
+ const values = _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4052
4052
  const stack = [..._nullishCoalesce(current.effects, () => ( []))];
4053
4053
  const taken = new Set(stack.map((e) => e.id));
4054
4054
  let n = 1;
@@ -4084,7 +4084,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4084
4084
  if (!(k in d.controls.properties)) throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4085
4085
  base[k] = d.defaults[k];
4086
4086
  }
4087
- next.values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
4087
+ next.values = _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
4088
4088
  }
4089
4089
  if (changes.enabled !== void 0) {
4090
4090
  if (changes.enabled) delete next.enabled;
@@ -4105,7 +4105,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4105
4105
  return (await provider.list({ kind: "camera" })).filter((e) => e.kind === "camera" && e.camera && (!role || e.camera.role === role));
4106
4106
  }
4107
4107
  cameraClip(id) {
4108
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
4108
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, id);
4109
4109
  if (!at) {
4110
4110
  const ids = this.project.tracks.flatMap((t) => t.clips.map((c) => c.id));
4111
4111
  throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
@@ -4126,7 +4126,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4126
4126
  const bake = await bakeVideoClipCamera(clip, camera, this.project, this.effects.require());
4127
4127
  const r = this.apply({ op: "update_clip", clip: clipId, set: { camera, transform: bake.transform } }, label, { merge });
4128
4128
  if (!r.ok) return r;
4129
- const keys = Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
4129
+ const keys = Object.fromEntries(_chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkCBVNCWJMcjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
4130
4130
  return { ok: true, clip: clipId, camera, keys, cuts: bake.cuts, windows: bake.windows, notes: bake.notes };
4131
4131
  }
4132
4132
  /**
@@ -4141,10 +4141,10 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4141
4141
  if (reason) return this.refused(reason);
4142
4142
  try {
4143
4143
  const current = this.cameraClip(clip);
4144
- const { spec: parts, description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
4144
+ const { spec: parts, description } = await _chunkL2JTLW6Bcjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
4145
4145
  const move = role === "transition" && parts.ms === void 0 ? { ...parts, ms: description.camera.durationMs } : parts;
4146
4146
  const simple = move.ms === void 0 && move.preset === void 0 && move.values === void 0;
4147
- const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunkISIO63Q5cjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
4147
+ const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunkL2JTLW6Bcjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
4148
4148
  for (const key of ["from", "framing"]) {
4149
4149
  if (options[key] === null) delete camera[key];
4150
4150
  else if (options[key] !== void 0) camera[key] = options[key];
@@ -4152,7 +4152,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4152
4152
  if (camera.from && !camera.in) throw new Error('"from" is where a move in starts; set a transition move too, or leave "from" out.');
4153
4153
  return await this.cameraEdit(clip, camera, `${role === "hold" ? "Hold move" : "Camera move"} ${description.name}`, options.merge);
4154
4154
  } catch (error) {
4155
- if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4155
+ if (_chunkL2JTLW6Bcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4156
4156
  throw error;
4157
4157
  }
4158
4158
  }
@@ -4165,7 +4165,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4165
4165
  if (reason) return this.refused(reason);
4166
4166
  try {
4167
4167
  const current = this.cameraClip(clip);
4168
- const field = _chunkISIO63Q5cjs.cameraMoveField.call(void 0, role);
4168
+ const field = _chunkL2JTLW6Bcjs.cameraMoveField.call(void 0, role);
4169
4169
  const other = field === "in" ? "during" : "in";
4170
4170
  if (_optionalChain([current, 'access', _121 => _121.camera, 'optionalAccess', _122 => _122[field]]) === void 0)
4171
4171
  throw new Error(`Clip "${clip}" has no camera "${field}" move to clear${_optionalChain([current, 'access', _123 => _123.camera, 'optionalAccess', _124 => _124[other]]) !== void 0 ? `; it has a "${other}" move (role ${role === "hold" ? "transition" : "hold"})` : ""}.`);
@@ -4175,7 +4175,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4175
4175
  const left = camera.in !== void 0 || camera.during !== void 0;
4176
4176
  return await this.cameraEdit(clip, left ? camera : null, role === "hold" ? "Clear hold move" : "Clear camera move");
4177
4177
  } catch (error) {
4178
- if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4178
+ if (_chunkL2JTLW6Bcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4179
4179
  throw error;
4180
4180
  }
4181
4181
  }
@@ -4183,7 +4183,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4183
4183
  removeClipEffect(clip, instance) {
4184
4184
  const reason = this.readOnlyReason();
4185
4185
  if (reason) return this.refused(reason);
4186
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip);
4186
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, clip);
4187
4187
  if (!at) return this.refused(`There is no clip "${clip}".`);
4188
4188
  const stack = _nullishCoalesce(at.clip.effects, () => ( []));
4189
4189
  const was = stack.find((e) => e.id === instance);
@@ -4200,7 +4200,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4200
4200
  return this.effectEdit(async () => {
4201
4201
  this.clipOrThrow(clip);
4202
4202
  const d = await this.describeEffect(effect, "transition");
4203
- const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values);
4203
+ const values = _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d, options.values);
4204
4204
  const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
4205
4205
  return { edit: { op: "set_transition", clip, transition: { type: "effect", duration, effect: { effect: d.id, provider: this.effects.require().id, name: d.name, values } } }, label: `Transition ${d.name}`, clip };
4206
4206
  });
@@ -4213,7 +4213,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4213
4213
  addEffectClip(track, effect, options = {}) {
4214
4214
  return this.effectEdit(async () => {
4215
4215
  const d = await this.describeEffect(effect, "generator");
4216
- const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4216
+ const values = _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4217
4217
  const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
4218
4218
  const label = `Add ${d.name}`;
4219
4219
  const clipId = _nullishCoalesce(options.id, () => ( ""));
@@ -4235,12 +4235,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4235
4235
  if (part === "generator") {
4236
4236
  if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
4237
4237
  const d2 = await this.describeEffect(current.effect);
4238
- return { edit: { op: "update_clip", clip, set: { values: _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
4238
+ return { edit: { op: "update_clip", clip, set: { values: _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
4239
4239
  }
4240
4240
  const t = current.transition;
4241
4241
  if (_optionalChain([t, 'optionalAccess', _128 => _128.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
4242
4242
  const d = await this.describeEffect(t.effect.effect);
4243
- const merged = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
4243
+ const merged = _chunkCBVNCWJMcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
4244
4244
  return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
4245
4245
  }, options.merge);
4246
4246
  }
@@ -4264,7 +4264,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4264
4264
  return fail2(`Clip "${clip}" has no effect "${instance}"; its effects are ${ids.map((i) => `"${i}"`).join(", ") || "none"} ("generator" is an effect clip's own picture).`);
4265
4265
  }
4266
4266
  const d = await this.describeEffect(effect);
4267
- const controls = _chunkISIO63Q5cjs.pathControlsOf.call(void 0, d);
4267
+ const controls = _chunkL2JTLW6Bcjs.pathControlsOf.call(void 0, d);
4268
4268
  if (!controls.length) return fail2(`"${d.id}" does not draw along a path. Find one that does with search_effects accepts ["path"].`);
4269
4269
  const control = _nullishCoalesce(options.control, () => ( (controls.length === 1 ? controls[0] : void 0)));
4270
4270
  if (!control) return fail2(`"${d.id}" has several path controls (${controls.join(", ")}); pass control.`);
@@ -4279,7 +4279,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4279
4279
  if (typeof path.d !== "string") return fail2('d must be SVG path data (a string), or "" to clear the path.');
4280
4280
  value = path.d;
4281
4281
  } else if ("mask" in path) {
4282
- const from = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
4282
+ const from = _optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
4283
4283
  if (!from) return fail2(`There is no clip "${path.mask.clip}" to take a mask from.`);
4284
4284
  const outline = videoClipMaskOutline(this.project, from);
4285
4285
  if (!outline) return fail2(`Clip "${path.mask.clip}" has no mask; add one with set_video_clip_mask, or pass points or d.`);
@@ -4321,31 +4321,31 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4321
4321
  }
4322
4322
  /** Keys for one numeric control of a clip effect (clip-relative ms), or `null` to stop animating it (keeping its value at the clip's start). */
4323
4323
  setClipEffectKeyframes(clip, instance, control, keys) {
4324
- const current = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
4324
+ const current = _optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
4325
4325
  const was = _optionalChain([current, 'optionalAccess', _135 => _135.effects, 'optionalAccess', _136 => _136.find, 'call', _137 => _137((e) => e.id === instance)]);
4326
4326
  const value = _optionalChain([was, 'optionalAccess', _138 => _138.values, 'optionalAccess', _139 => _139[control]]);
4327
- const plain = keys === null ? _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _140 => _140.keys, 'access', _141 => _141[0], 'optionalAccess', _142 => _142.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
4327
+ const plain = keys === null ? _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, value) ? _optionalChain([value, 'access', _140 => _140.keys, 'access', _141 => _141[0], 'optionalAccess', _142 => _142.v]) : value : { keys: [...keys].sort((a, b) => a.t - b.t) };
4328
4328
  return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
4329
4329
  }
4330
4330
  /** What plays at `time` (default: the playhead). */
4331
4331
  frame(time = this.player.currentTime) {
4332
- return _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, this.project, time);
4332
+ return _chunkCBVNCWJMcjs.videoFrameAt.call(void 0, this.project, time);
4333
4333
  }
4334
4334
  /** The frame at `time` (default: the playhead) as SVG. */
4335
4335
  toSvg(time = this.player.currentTime, options = {}) {
4336
- return _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
4336
+ return _chunkCBVNCWJMcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
4337
4337
  }
4338
4338
  /** The project as an ffmpeg command. */
4339
4339
  toFfmpeg(options = {}) {
4340
- return _chunkZBCT5MEAcjs.toVideoFfmpeg.call(void 0, this.project, options);
4340
+ return _chunkCBVNCWJMcjs.toVideoFfmpeg.call(void 0, this.project, options);
4341
4341
  }
4342
4342
  /** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
4343
4343
  toLoudnessMeasure(options = {}) {
4344
- return _chunkZBCT5MEAcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
4344
+ return _chunkCBVNCWJMcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
4345
4345
  }
4346
4346
  /** One track as a CMX 3600 EDL. */
4347
4347
  toEdl(options = {}) {
4348
- return _chunkZBCT5MEAcjs.toVideoEdl.call(void 0, this.project, options);
4348
+ return _chunkCBVNCWJMcjs.toVideoEdl.call(void 0, this.project, options);
4349
4349
  }
4350
4350
  }, _class8.__initStatic(), _class8);
4351
4351
  function checkPreviewScale(scale) {
@@ -4413,12 +4413,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
4413
4413
  const ticks = [];
4414
4414
  for (let t = 0; t <= duration + 1e-6; t += step) {
4415
4415
  const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
4416
- ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
4416
+ ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkCBVNCWJMcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
4417
4417
  }
4418
4418
  return ticks;
4419
4419
  }
4420
4420
  function videoClipShowsWaveform(clip, asset, mode = "audio") {
4421
- if (clip.type !== "media" || mode === "none" || !_chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset)) return false;
4421
+ if (clip.type !== "media" || mode === "none" || !_chunkCBVNCWJMcjs.videoAssetHasSound.call(void 0, asset)) return false;
4422
4422
  return mode === "all" || asset.kind === "audio";
4423
4423
  }
4424
4424
  var VIDEO_CLIP_ANIMATION_LABELS = {
@@ -4479,11 +4479,11 @@ function videoClipLabel(clip, asset, sequence) {
4479
4479
  if (clip.type === "effect") return `Effect: ${clip.effect}`;
4480
4480
  if (clip.type === "adjustment") return `Adjustment${clip.scope === "all" ? " (all tracks)" : clip.scope === "track" ? ` (${clip.targetTrack})` : ""}`;
4481
4481
  const base = _nullishCoalesce(_nullishCoalesce(_optionalChain([asset, 'optionalAccess', _145 => _145.name]), () => ( _optionalChain([asset, 'optionalAccess', _146 => _146.src, 'access', _147 => _147.replace, 'call', _148 => _148(/^.*[\\/]/, "")]))), () => ( clip.asset));
4482
- const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
4482
+ const speed = _chunkCBVNCWJMcjs.videoClipSpeed.call(void 0, clip);
4483
4483
  return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
4484
4484
  }
4485
4485
  function planVideoClipDrag(project, input) {
4486
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, input.clip);
4486
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, input.clip);
4487
4487
  if (!at) return null;
4488
4488
  const { clip, track } = at;
4489
4489
  const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
@@ -4500,17 +4500,17 @@ function planVideoClipDrag(project, input) {
4500
4500
  }
4501
4501
  const minimum = 1e3 / project.fps;
4502
4502
  if (input.mode === "trim-start") {
4503
- const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - minimum);
4503
+ const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip) - minimum);
4504
4504
  const changed2 = Math.abs(to2 - clip.start) > 1e-6;
4505
- const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - to2 };
4505
+ const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip) - to2 };
4506
4506
  return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
4507
4507
  }
4508
- const to = Math.max(snap(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
4509
- const changed = Math.abs(to - _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
4508
+ const to = Math.max(snap(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
4509
+ const changed = Math.abs(to - _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
4510
4510
  return { start: clip.start, duration: to - clip.start, track: track.id, edit: changed ? { op: "trim_clip", clip: clip.id, edge: "end", to, ...input.ripple ? { ripple: true } : {} } : null };
4511
4511
  }
4512
4512
  function videoDropTracks(project, clipId) {
4513
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4513
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, clipId);
4514
4514
  if (!at) return [];
4515
4515
  return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
4516
4516
  }
@@ -4519,7 +4519,7 @@ function videoDragLabel(edit) {
4519
4519
  return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
4520
4520
  }
4521
4521
  function videoAssetDropEdit(project, assetId, options = {}) {
4522
- const asset = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(assetId);
4522
+ const asset = _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, project).get(assetId);
4523
4523
  if (!asset) return null;
4524
4524
  const kind = asset.kind === "audio" ? "audio" : "video";
4525
4525
  const track = _nullishCoalesce(options.track, () => ( _optionalChain([project, 'access', _149 => _149.tracks, 'access', _150 => _150.find, 'call', _151 => _151((t) => t.kind === kind && !t.locked), 'optionalAccess', _152 => _152.id])));
@@ -4571,25 +4571,25 @@ var KEY_LABELS = {
4571
4571
  scale: { label: "Scale", step: 0.05 },
4572
4572
  rotation: { label: "Rotation", step: 1 }
4573
4573
  };
4574
- var animatableOf = (clip, property) => _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _153 => _153.transform, 'optionalAccess', _154 => _154[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
4574
+ var animatableOf = (clip, property) => _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([clip, 'access', _153 => _153.transform, 'optionalAccess', _154 => _154[property]]) : property === "volume" ? clip.type === "media" || clip.type === "sequence" ? clip.volume : void 0 : clip.opacity;
4575
4575
  var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
4576
4576
  function videoKeyframeRows(project, clipId, time) {
4577
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4577
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, clipId);
4578
4578
  if (!at) return [];
4579
4579
  const { clip } = at;
4580
- const asset = clip.type === "media" ? _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
4580
+ const asset = clip.type === "media" ? _chunkCBVNCWJMcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
4581
4581
  const visual = !(_optionalChain([asset, 'optionalAccess', _155 => _155.kind]) === "audio" || at.track.kind === "audio");
4582
- const audible = clip.type === "media" && _chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
4583
- const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES : []];
4582
+ const audible = clip.type === "media" && _chunkCBVNCWJMcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
4583
+ const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES : []];
4584
4584
  const clipTime = playheadInClip(clip, time);
4585
4585
  return properties.map((property) => {
4586
4586
  const prop = animatableOf(clip, property);
4587
- const keys = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
4588
- const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property];
4587
+ const keys = _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
4588
+ const limits = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS[property];
4589
4589
  return {
4590
4590
  property,
4591
4591
  ...KEY_LABELS[property],
4592
- value: Math.round(_chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
4592
+ value: Math.round(_chunkCBVNCWJMcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
4593
4593
  keyed: keys.length > 0,
4594
4594
  keys: keys.length,
4595
4595
  onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
@@ -4600,44 +4600,44 @@ function videoKeyframeRows(project, clipId, time) {
4600
4600
  });
4601
4601
  }
4602
4602
  function plainValueEdit(clip, property, value) {
4603
- if (!_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
4603
+ if (!_chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
4604
4604
  return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
4605
4605
  const transform = { ...clip.transform, [property]: value };
4606
4606
  if (value === void 0) delete transform[property];
4607
4607
  return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
4608
4608
  }
4609
4609
  function videoKeyframeValueEdit(project, clipId, property, time, value) {
4610
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4610
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, clipId);
4611
4611
  if (!at) return null;
4612
4612
  const prop = animatableOf(at.clip, property);
4613
- if (!_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
4613
+ if (!_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
4614
4614
  if (value === void 0) return null;
4615
- return { op: "set_keyframes", clip: clipId, property, keys: _chunkZBCT5MEAcjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
4615
+ return { op: "set_keyframes", clip: clipId, property, keys: _chunkCBVNCWJMcjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
4616
4616
  }
4617
4617
  function videoKeyframeToggleEdit(project, clipId, property, time) {
4618
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4618
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, clipId);
4619
4619
  if (!at) return null;
4620
4620
  const prop = animatableOf(at.clip, property);
4621
4621
  const t = playheadInClip(at.clip, time);
4622
- const fallback = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property].default;
4623
- if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) {
4622
+ const fallback = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS[property].default;
4623
+ if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, prop)) {
4624
4624
  const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
4625
4625
  if (key) {
4626
- const rest = _chunkZBCT5MEAcjs.removeVideoKey.call(void 0, prop, key.t);
4627
- return _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
4626
+ const rest = _chunkCBVNCWJMcjs.removeVideoKey.call(void 0, prop, key.t);
4627
+ return _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
4628
4628
  }
4629
4629
  }
4630
- const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, t, fallback);
4631
- return { op: "set_keyframes", clip: clipId, property, keys: _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop) ? _chunkZBCT5MEAcjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
4630
+ const v = _chunkCBVNCWJMcjs.videoValueAt.call(void 0, prop, t, fallback);
4631
+ return { op: "set_keyframes", clip: clipId, property, keys: _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, prop) ? _chunkCBVNCWJMcjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
4632
4632
  }
4633
4633
  function videoLutEdits(project, clips, lut) {
4634
4634
  const edits = [];
4635
4635
  for (const id of clips) {
4636
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id);
4636
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, id);
4637
4637
  if (!at) continue;
4638
4638
  const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
4639
4639
  if (!lut && !current) continue;
4640
- const grade = _chunkZBCT5MEAcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
4640
+ const grade = _chunkCBVNCWJMcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
4641
4641
  edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
4642
4642
  }
4643
4643
  return edits;
@@ -4658,7 +4658,7 @@ function videoAddAdjustmentEdits(project, time, options = {}) {
4658
4658
  const duration = _nullishCoalesce(options.duration, () => ( 3e3));
4659
4659
  const start = Math.max(0, time);
4660
4660
  const top = project.tracks[0];
4661
- const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > start);
4661
+ const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) > start);
4662
4662
  const edits = [];
4663
4663
  let track = _optionalChain([top, 'optionalAccess', _156 => _156.id]);
4664
4664
  if (!free) {
@@ -4677,7 +4677,7 @@ function videoMaskEdit(clip, mask) {
4677
4677
  function videoSkinProtectionEdits(project, clips, amount) {
4678
4678
  const edits = [];
4679
4679
  for (const id of clips) {
4680
- const clip = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
4680
+ const clip = _optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
4681
4681
  const lut = _optionalChain([clip, 'optionalAccess', _158 => _158.grade, 'optionalAccess', _159 => _159.lut]);
4682
4682
  if (!clip || !lut) continue;
4683
4683
  const { preserveSkinTones: _p, ...rest } = lut;
@@ -4711,7 +4711,7 @@ var RIPPLE = {
4711
4711
  };
4712
4712
  var MODE = {
4713
4713
  type: "string",
4714
- enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES],
4714
+ enum: [..._chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES],
4715
4715
  description: 'What to do with clips already where it lands: "refuse" (default) fails with the next free place; "overwrite" cuts, trims or removes what is underneath on that track; "insert" cuts everything across the start and pushes later material along by its length on this track and every sync-locked track.'
4716
4716
  };
4717
4717
  var DELTA = (what) => ({ type: "number", description: `${what}, in milliseconds of timeline time: positive is later, negative earlier. It is clamped to what the media and neighbours allow; the result says how far it went.` });
@@ -4728,11 +4728,11 @@ var TRANSFORM = object(
4728
4728
  );
4729
4729
  var TRANSITION = object(
4730
4730
  {
4731
- type: { type: "string", enum: _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES.filter((t) => t !== "effect"), description: "crossfade (this clip fades up over the one before), dip (down into a colour and up out of it), wipe (an edge travels across revealing this clip), push (this clip slides in and pushes the one before out), slide (this clip slides in over the one before) or iris (a circle opens from the centre). For a transition effect from the effects provider use set_video_effect_transition." },
4731
+ type: { type: "string", enum: _chunkCBVNCWJMcjs.VIDEO_TRANSITION_TYPES.filter((t) => t !== "effect"), description: "crossfade (this clip fades up over the one before), dip (down into a colour and up out of it), wipe (an edge travels across revealing this clip), push (this clip slides in and pushes the one before out), slide (this clip slides in over the one before) or iris (a circle opens from the centre). For a transition effect from the effects provider use set_video_effect_transition." },
4732
4732
  duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms, centred on the cut. Every type but dip needs half of it in media past the cut on both sides (handles); a dip needs none." },
4733
4733
  color: COLOR("For dip: the colour passed through (default black)"),
4734
- direction: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
4735
- audioCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fades through it: default equal-power for every type but dip (steady loudness while the two sounds overlap), linear for dip; or s-curve, exponential, logarithmic." }
4734
+ direction: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
4735
+ audioCurve: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fades through it: default equal-power for every type but dip (steady loudness while the two sounds overlap), linear for dip; or s-curve, exponential, logarithmic." }
4736
4736
  },
4737
4737
  ["type", "duration"],
4738
4738
  "A transition from the clip that ends where this one starts on the same track."
@@ -4742,7 +4742,7 @@ var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How m
4742
4742
  var SKIN = { type: "number", minimum: 0, maximum: 1, description: "How much of the LUT's change to hold back on skin tones, 0 (none, the default) to 1 (skin keeps its colour); 0.5-0.8 keeps faces natural under a heavy look. Applied in the preview and frame renders; ffmpeg's lut3d cannot, so the export notes it." };
4743
4743
  var GRADE = object(
4744
4744
  {
4745
- ...Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
4745
+ ...Object.fromEntries(_chunkCBVNCWJMcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
4746
4746
  lut: object({ src: LUT_SRC, strength: LUT_STRENGTH, name: { type: "string", minLength: 1, description: "A label for the look." }, preserveSkinTones: SKIN }, ["src"], "A 3D LUT applied after the other settings (set_video_lut checks the file first).")
4747
4747
  },
4748
4748
  [],
@@ -4750,7 +4750,7 @@ var GRADE = object(
4750
4750
  );
4751
4751
  var ANIMATION = (when) => object(
4752
4752
  {
4753
- effect: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS], description: "fade; rise (up into place) or drop (down into place); slide-left / slide-right (moving that way); zoom (grows into place); pop (grows past its size and settles). Each also fades; an exit plays the movement backwards." },
4753
+ effect: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_EFFECTS], description: "fade; rise (up into place) or drop (down into place); slide-left / slide-right (moving that way); zoom (grows into place); pop (grows past its size and settles). Each also fades; an exit plays the movement backwards." },
4754
4754
  duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
4755
4755
  },
4756
4756
  ["effect"],
@@ -4760,11 +4760,11 @@ var CLIP_COMMON = {
4760
4760
  name: { type: "string", description: "A label for the clip." },
4761
4761
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
4762
4762
  transform: TRANSFORM,
4763
- fit: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
4763
+ fit: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
4764
4764
  grade: GRADE,
4765
4765
  animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
4766
4766
  animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
4767
- blend: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_BLEND_MODES], description: "How the picture mixes with what is beneath it, as CSS mix-blend-mode (default normal): multiply darkens (shadows, textures), screen and add lighten (light leaks, flares, glows), overlay and soft-light add contrast, difference and exclusion invert." },
4767
+ blend: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_BLEND_MODES], description: "How the picture mixes with what is beneath it, as CSS mix-blend-mode (default normal): multiply darkens (shadows, textures), screen and add lighten (light leaks, flares, glows), overlay and soft-light add contrast, difference and exclusion invert." },
4768
4768
  fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
4769
4769
  fadeOut: MS("Fade down to nothing over this long")
4770
4770
  };
@@ -4773,8 +4773,8 @@ var MEDIA_FIELDS = {
4773
4773
  speed: { type: "number", minimum: 0.05, maximum: 20, description: "Playback speed (default 1). Changing it keeps the stretch of source, so the clip gets shorter or longer." },
4774
4774
  volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
4775
4775
  muted: { type: "boolean", description: "Silence this clip (default false)." },
4776
- fadeInCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade in (default linear; the picture always fades linearly): linear, equal-power (steady loudness, best for crossfades), s-curve (gentle at both ends), exponential (slow start, natural from silence) or logarithmic (fast start)." },
4777
- fadeOutCurve: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
4776
+ fadeInCurve: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade in (default linear; the picture always fades linearly): linear, equal-power (steady loudness, best for crossfades), s-curve (gentle at both ends), exponential (slow start, natural from silence) or logarithmic (fast start)." },
4777
+ fadeOutCurve: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
4778
4778
  };
4779
4779
  var TEXT_FIELDS = {
4780
4780
  text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
@@ -4823,7 +4823,7 @@ var ASSET_FIELDS = {
4823
4823
  };
4824
4824
  var KEY_PROPERTY = {
4825
4825
  type: "string",
4826
- enum: [..._chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES],
4826
+ enum: [..._chunkCBVNCWJMcjs.VIDEO_KEYFRAME_PROPERTIES],
4827
4827
  description: "Which property: opacity (0\u20131), volume (media only, 0\u20134 gain), x / y (pixels from the frame's centre, right / down), scale (1 = fitted size) or rotation (degrees clockwise)."
4828
4828
  };
4829
4829
  var KEYS = {
@@ -4838,7 +4838,7 @@ var KEYS = {
4838
4838
  ease: {
4839
4839
  description: "How the value moves from this key to the next (default linear): linear, hold (stays, then jumps at the next key), ease-in, ease-out, ease-in-out, or CSS cubic-bezier points [x1, y1, x2, y2] with x1 and x2 in 0\u20131.",
4840
4840
  anyOf: [
4841
- { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_EASE_NAMES] },
4841
+ { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_EASE_NAMES] },
4842
4842
  { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
4843
4843
  ]
4844
4844
  }
@@ -4867,19 +4867,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
4867
4867
  ...t.locked ? { locked: true } : {},
4868
4868
  ...t.syncLocked === false ? { syncLocked: false } : {},
4869
4869
  ...t.volume !== void 0 ? { volume: t.volume } : {},
4870
- clips: _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) } : {} }))
4870
+ clips: _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkCBVNCWJMcjs.videoClipSourceRange.call(void 0, c) } : {} }))
4871
4871
  }));
4872
- var videoSequenceUsers = (project, id) => _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project).flatMap(
4873
- ({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) }] : [])
4872
+ var videoSequenceUsers = (project, id) => _chunkCBVNCWJMcjs.allVideoTracks.call(void 0, project).flatMap(
4873
+ ({ sequence, track }) => track.clips.flatMap((c) => c.type === "sequence" && c.sequence === id ? [{ clip: c.id, ...sequence ? { inSequence: sequence } : {}, track: track.id, start: c.start, end: _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c), source: _chunkCBVNCWJMcjs.videoClipSourceRange.call(void 0, c) }] : [])
4874
4874
  );
4875
4875
  function describeVideoSequence(project, sequence, tracks = true) {
4876
- const cycle = _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
4876
+ const cycle = _chunkCBVNCWJMcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
4877
4877
  return {
4878
4878
  id: sequence.id,
4879
4879
  ...sequence.name ? { name: sequence.name } : {},
4880
- duration: _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, sequence),
4880
+ duration: _chunkCBVNCWJMcjs.videoSequenceDuration.call(void 0, sequence),
4881
4881
  clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
4882
- nests: _chunkZBCT5MEAcjs.videoSequenceChildren.call(void 0, sequence),
4882
+ nests: _chunkCBVNCWJMcjs.videoSequenceChildren.call(void 0, sequence),
4883
4883
  usedBy: videoSequenceUsers(project, sequence.id),
4884
4884
  ...cycle ? { cycle } : {},
4885
4885
  ...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
@@ -4891,7 +4891,7 @@ function describeVideoProject(project) {
4891
4891
  width: project.width,
4892
4892
  height: project.height,
4893
4893
  fps: project.fps,
4894
- duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project),
4894
+ duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, project),
4895
4895
  ...project.background ? { background: project.background } : {},
4896
4896
  assets: project.assets.map(videoAssetOut),
4897
4897
  tracks: describeVideoTracks(project.tracks),
@@ -4908,7 +4908,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4908
4908
  const project = () => controller.getProject();
4909
4909
  const outcome = (result, extra = {}) => {
4910
4910
  if (!result.ok) throw new Error(result.error);
4911
- return { ...extra, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
4911
+ return { ...extra, duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
4912
4912
  };
4913
4913
  const apply = (edits, label, extra) => {
4914
4914
  const result = controller.apply(edits, label);
@@ -4917,7 +4917,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4917
4917
  const clipOut = (p, id) => {
4918
4918
  for (const t of p.tracks) {
4919
4919
  const c = t.clips.find((x) => x.id === id);
4920
- if (c) return { track: t.id, ...c, end: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, c) } : {} };
4920
+ if (c) return { track: t.id, ...c, end: _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkCBVNCWJMcjs.videoClipSourceRange.call(void 0, c) } : {} };
4921
4921
  }
4922
4922
  return null;
4923
4923
  };
@@ -4929,7 +4929,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4929
4929
  });
4930
4930
  const keysOut = (p, clip, property) => {
4931
4931
  const c = clipOut(p, clip);
4932
- const value = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
4932
+ const value = _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
4933
4933
  return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
4934
4934
  };
4935
4935
  const getProject = {
@@ -4951,8 +4951,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
4951
4951
  inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
4952
4952
  annotations: { title: "What plays at a moment", ...READ },
4953
4953
  handler: ({ time }) => {
4954
- const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
4955
- return { ...frame, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
4954
+ const frame = _chunkCBVNCWJMcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
4955
+ return { ...frame, timecode: _chunkCBVNCWJMcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
4956
4956
  }
4957
4957
  };
4958
4958
  const listSequences = {
@@ -4980,7 +4980,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4980
4980
  annotations: { title: "Find gaps", ...READ },
4981
4981
  handler: ({ track }) => {
4982
4982
  if (track !== void 0 && !project().tracks.some((t) => t.id === track)) throw new Error(`There is no track "${track}"; the tracks are ${project().tracks.map((t) => `"${t.id}"`).join(", ")}.`);
4983
- return { gaps: _chunkZBCT5MEAcjs.findVideoGaps.call(void 0, project(), track) };
4983
+ return { gaps: _chunkCBVNCWJMcjs.findVideoGaps.call(void 0, project(), track) };
4984
4984
  }
4985
4985
  };
4986
4986
  const checkProject = {
@@ -5010,7 +5010,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5010
5010
  const lutSrcs = [...new Set(p.tracks.flatMap((t) => t.clips.map((c) => _optionalChain([c, 'access', _171 => _171.grade, 'optionalAccess', _172 => _172.lut, 'optionalAccess', _173 => _173.src])).filter((x) => !!x)))];
5011
5011
  const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
5012
5012
  const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
5013
- const svg = times ? _chunkZBCT5MEAcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
5013
+ const svg = times ? _chunkCBVNCWJMcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkCBVNCWJMcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
5014
5014
  const notes = [...missing.map((m) => `${m}; that LUT is left out of the picture.`), ...lutSrcs.length > missing.length ? ["LUTs are drawn approximately in SVG (curves and a colour matrix); the preview and export apply them exactly."] : []];
5015
5015
  if (format === "png") {
5016
5016
  if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
@@ -5100,7 +5100,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5100
5100
  if (play === true) controller.play();
5101
5101
  if (play === false) controller.pause();
5102
5102
  const state = controller.getState();
5103
- return { time: state.time, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
5103
+ return { time: state.time, timecode: _chunkCBVNCWJMcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
5104
5104
  }
5105
5105
  };
5106
5106
  const setSettings = {
@@ -5226,7 +5226,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5226
5226
  inputSchema: object(
5227
5227
  {
5228
5228
  clip: CLIP_ID,
5229
- set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES], description: "For adjustment clips: which pictures it changes, underneath (default), all or track." }, targetTrack: { ...TRACK_ID, description: 'For adjustment clips with scope "track": the track whose pictures it changes.' } }, [], "Fields to replace (only those that fit the clip's type)."),
5229
+ set: object({ ...CLIP_COMMON, ...MEDIA_FIELDS, asset: { ...ASSET_ID, description: "For media: play another asset (same in point)." }, ...TEXT_FIELDS, color: COLOR("Text colour, or a colour clip's fill"), scope: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_ADJUSTMENT_SCOPES], description: "For adjustment clips: which pictures it changes, underneath (default), all or track." }, targetTrack: { ...TRACK_ID, description: 'For adjustment clips with scope "track": the track whose pictures it changes.' } }, [], "Fields to replace (only those that fit the clip's type)."),
5230
5230
  remove: { type: "array", items: { type: "string", enum: ["name", "opacity", "transform", "fit", "blend", "grade", "animateIn", "animateOut", "fadeIn", "fadeOut", "fadeInCurve", "fadeOutCurve", "in", "speed", "volume", "muted", "fontSize", "fontFamily", "fontWeight", "background", "scope", "targetTrack"] }, description: 'Fields to reset to their defaults (an adjustment clip going from scope "track" to another scope must also remove targetTrack).' }
5231
5231
  },
5232
5232
  ["clip"]
@@ -5245,7 +5245,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5245
5245
  const gradeTargets = (ids) => {
5246
5246
  const p = project();
5247
5247
  for (const id of ids) {
5248
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
5248
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, p, id);
5249
5249
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5250
5250
  const { clip } = at;
5251
5251
  if (at.track.kind !== "video" || clip.type === "media" && _optionalChain([p, 'access', _174 => _174.assets, 'access', _175 => _175.find, 'call', _176 => _176((a) => a.id === clip.asset), 'optionalAccess', _177 => _177.kind]) === "audio")
@@ -5259,7 +5259,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5259
5259
  inputSchema: object(
5260
5260
  {
5261
5261
  clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
5262
- preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
5262
+ preset: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
5263
5263
  amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
5264
5264
  },
5265
5265
  ["clips", "preset"]
@@ -5268,10 +5268,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
5268
5268
  handler: ({ clips, preset, amount }) => {
5269
5269
  gradeTargets(clips);
5270
5270
  const edits = clips.map((clip) => {
5271
- const grade = _chunkZBCT5MEAcjs.videoGradeLook.call(void 0, _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
5271
+ const grade = _chunkCBVNCWJMcjs.videoGradeLook.call(void 0, _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
5272
5272
  return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
5273
5273
  });
5274
- return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _178 => _178.clip, 'access', _179 => _179.grade]), () => ( null)) })) }));
5274
+ return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _178 => _178.clip, 'access', _179 => _179.grade]), () => ( null)) })) }));
5275
5275
  }
5276
5276
  };
5277
5277
  const copyGrade = {
@@ -5282,7 +5282,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5282
5282
  annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
5283
5283
  handler: ({ from, to }) => {
5284
5284
  gradeTargets([from, ...to]);
5285
- const grade = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), from).clip.grade;
5285
+ const grade = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project(), from).clip.grade;
5286
5286
  const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
5287
5287
  return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
5288
5288
  }
@@ -5308,7 +5308,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5308
5308
  const lut = await controller.luts.load(src);
5309
5309
  const label = _nullishCoalesce(name, () => ( lut.title));
5310
5310
  const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {}, ...preserve_skin_tones ? { preserveSkinTones: preserve_skin_tones } : {} };
5311
- return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _180 => _180.clip, 'access', _181 => _181.grade]), () => ( null)) })) }));
5311
+ return apply(videoLutEdits(project(), clips, setting), "Apply LUT", (r) => ({ lut: { src, ...lut.title ? { title: lut.title } : {}, size: lut.size }, clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _180 => _180.clip, 'access', _181 => _181.grade]), () => ( null)) })) }));
5312
5312
  }
5313
5313
  };
5314
5314
  const removeLut = {
@@ -5320,9 +5320,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
5320
5320
  handler: ({ clips }) => {
5321
5321
  gradeTargets(clips);
5322
5322
  const p = project();
5323
- const withLut = clips.filter((id) => _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id), 'access', _182 => _182.clip, 'access', _183 => _183.grade, 'optionalAccess', _184 => _184.lut]));
5323
+ const withLut = clips.filter((id) => _optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, p, id), 'access', _182 => _182.clip, 'access', _183 => _183.grade, 'optionalAccess', _184 => _184.lut]));
5324
5324
  if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
5325
- return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _185 => _185.clip, 'access', _186 => _186.grade]), () => ( null)) })) }));
5325
+ return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _185 => _185.clip, 'access', _186 => _186.grade]), () => ( null)) })) }));
5326
5326
  }
5327
5327
  };
5328
5328
  const PROXY_SCALE = { type: "number", exclusiveMinimum: 0, exclusiveMaximum: 1, description: "Proxy size as a fraction of the original: 0.5 (half width and height, the default) or 0.25 for very large footage." };
@@ -5431,7 +5431,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5431
5431
  approximate: parsed.approximate,
5432
5432
  first: list[0],
5433
5433
  last: list[list.length - 1],
5434
- ...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON ? { warning: `The transcript runs to ${list[list.length - 1].end} ms, past the asset's ${a.duration} ms: is it for this asset?` } : {}
5434
+ ...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON ? { warning: `The transcript runs to ${list[list.length - 1].end} ms, past the asset's ${a.duration} ms: is it for this asset?` } : {}
5435
5435
  }));
5436
5436
  }
5437
5437
  };
@@ -5502,22 +5502,22 @@ function createVideoEditorToolProvider(controller, options = {}) {
5502
5502
  const bad = ranges.findIndex((r) => !(r.to > r.from));
5503
5503
  if (bad >= 0) throw new Error(`Range ${bad + 1} is empty or backwards (${ranges[bad].from}\u2013${ranges[bad].to} ms); "to" must be after "from".`);
5504
5504
  const merged = mergeVideoRanges(ranges);
5505
- const before = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project());
5506
- return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project) }));
5505
+ const before = _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, project());
5506
+ return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, r.project) }));
5507
5507
  }
5508
5508
  };
5509
5509
  const rampTarget = (id) => {
5510
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
5510
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project(), id);
5511
5511
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5512
5512
  const { clip } = at;
5513
5513
  if (clip.type === "sequence") throw new Error(`Clip "${id}" is a compound clip, which plays its sequence at normal speed; change the speed of the clips inside the sequence instead.`);
5514
- if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkZBCT5MEAcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
5514
+ if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkCBVNCWJMcjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
5515
5515
  if (_optionalChain([project, 'call', _191 => _191(), 'access', _192 => _192.assets, 'access', _193 => _193.find, 'call', _194 => _194((a) => a.id === clip.asset), 'optionalAccess', _195 => _195.kind]) === "image") throw new Error(`Clip "${id}" is a still, so it has no motion to change the speed of.`);
5516
5516
  return clip;
5517
5517
  };
5518
5518
  const rampOut = (r, id) => {
5519
5519
  const outcome2 = r.outcomes[r.outcomes.length - 1];
5520
- return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project) };
5520
+ return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, r.project) };
5521
5521
  };
5522
5522
  const RIPPLE_RAMP = { type: "boolean", description: "Move later material on every sync-locked track by the change in length (default true); false refuses if the clip would overlap the next one." };
5523
5523
  const setSpeedRamp = {
@@ -5548,8 +5548,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
5548
5548
  ),
5549
5549
  annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
5550
5550
  handler: ({ clip, segments, ripple }) => {
5551
- const edit = _chunkZBCT5MEAcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
5552
- return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkZBCT5MEAcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
5551
+ const edit = _chunkCBVNCWJMcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
5552
+ return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkCBVNCWJMcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
5553
5553
  }
5554
5554
  };
5555
5555
  const addFreeze = {
@@ -5569,8 +5569,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
5569
5569
  handler: ({ clip, at, duration, ripple }) => {
5570
5570
  const c = rampTarget(clip);
5571
5571
  const t = at - c.start;
5572
- if (t < 0 || t > c.duration) throw new Error(`${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkZBCT5MEAcjs.formatVideoSeconds.call(void 0, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
5573
- return apply(_chunkZBCT5MEAcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
5572
+ if (t < 0 || t > c.duration) throw new Error(`${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkCBVNCWJMcjs.formatVideoSeconds.call(void 0, _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
5573
+ return apply(_chunkCBVNCWJMcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
5574
5574
  }
5575
5575
  };
5576
5576
  const removeRamp = {
@@ -5743,7 +5743,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5743
5743
  let from;
5744
5744
  let to;
5745
5745
  if (args.clip !== void 0) {
5746
- const found = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, args.clip);
5746
+ const found = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, p, args.clip);
5747
5747
  if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
5748
5748
  const c = found.clip;
5749
5749
  if (c.type === "sequence") throw new Error(`Clip "${c.id}" is a compound clip; its sound is the mix of its sequence "${c.sequence}", so read the levels of the media in it (list_video_sequences lists its clips and assets).`);
@@ -5753,7 +5753,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5753
5753
  toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
5754
5754
  toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
5755
5755
  from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
5756
- to = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c))));
5756
+ to = Math.min(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c))));
5757
5757
  } else {
5758
5758
  asset = p.assets.find((a) => a.id === args.asset);
5759
5759
  if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
@@ -5834,15 +5834,15 @@ function createVideoEditorToolProvider(controller, options = {}) {
5834
5834
  annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
5835
5835
  handler: async ({ time, bins, columns }) => {
5836
5836
  const p = project();
5837
- const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, p);
5837
+ const end = _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, p);
5838
5838
  const t = _nullishCoalesce(time, () => ( controller.getState().time));
5839
5839
  if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
5840
5840
  const pixels = await pixelsAt(t);
5841
- return { time: t, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
5841
+ return { time: t, timecode: _chunkCBVNCWJMcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
5842
5842
  }
5843
5843
  };
5844
5844
  const MASK_FIELDS = {
5845
- shape: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES], description: "rectangle (with corner_radius), ellipse, linear (a straight split: the side above the line at rotation 0 shows) or polygon (points)." },
5845
+ shape: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_MASK_SHAPES], description: "rectangle (with corner_radius), ellipse, linear (a straight split: the side above the line at rotation 0 shows) or polygon (points)." },
5846
5846
  x: { type: "number", description: "Centre across the clip's picture, 0 (left edge) to 1 (right edge); default 0.5." },
5847
5847
  y: { type: "number", description: "Centre down the clip's picture, 0 (top) to 1 (bottom); default 0.5." },
5848
5848
  width: { type: "number", minimum: 0, description: "Width as a fraction of the picture's width (default 0.5). Unused by linear." },
@@ -5862,10 +5862,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
5862
5862
  track: { ...TRACK_ID, description: 'A video track to put it on; tracks below it are "underneath".' },
5863
5863
  start: MS("Where it starts on the timeline (default: the end of the track)"),
5864
5864
  duration: { type: "number", exclusiveMinimum: 0, description: "How long it lasts, in ms (default 3000)." },
5865
- scope: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
5865
+ scope: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
5866
5866
  target_track: { ...TRACK_ID, description: 'For scope "track" (required then): the track whose pictures it changes.' },
5867
5867
  grade: GRADE,
5868
- preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
5868
+ preset: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
5869
5869
  amount: { type: "number", minimum: 0, maximum: 1, description: "Strength of the preset, 0\u20131 (default 1)." },
5870
5870
  name: { type: "string", minLength: 1, description: 'A label for the clip (e.g. "Night look").' },
5871
5871
  id: { type: "string", minLength: 1, description: 'Your own id for the clip (default: a fresh one such as "c7").' },
@@ -5879,13 +5879,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
5879
5879
  if (t && t.kind !== "video") throw new Error(`Track "${track}" is an audio track; adjustment clips change pictures, so put it on a video track.`);
5880
5880
  if (scope === "track" && !target_track) throw new Error('Scope "track" needs target_track: the id of the track whose pictures it changes.');
5881
5881
  if (target_track !== void 0 && scope !== "track") throw new Error('target_track is only for scope "track"; leave it out or set scope to "track".');
5882
- const look = { ...preset ? _chunkZBCT5MEAcjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
5882
+ const look = { ...preset ? _chunkCBVNCWJMcjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
5883
5883
  const clip = { type: "adjustment", ...id ? { id } : {}, ...name ? { name } : {}, ...start !== void 0 ? { start } : {}, duration: _nullishCoalesce(duration, () => ( 3e3)), ...scope ? { scope } : {}, ...target_track ? { targetTrack: target_track } : {}, ...Object.keys(look).length ? { grade: look } : {} };
5884
5884
  return apply({ op: "add_clip", track, clip, mode }, "Add adjustment clip", (r) => ({ clip: clipOut(r.project, r.outcomes[0].clip), ...placed(r.outcomes[0]), ...Object.keys(look).length ? {} : { hint: "It changes nothing yet: give it a grade (update_video_clip), effects (apply_effect) or a mask." } }));
5885
5885
  }
5886
5886
  };
5887
5887
  const maskTarget = (id) => {
5888
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
5888
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project(), id);
5889
5889
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5890
5890
  if (at.track.kind !== "video") throw new Error(`Clip "${id}" is on audio track "${at.track.id}"; masks cut pictures, so pass a clip on a video track.`);
5891
5891
  return at;
@@ -5927,13 +5927,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
5927
5927
  gradeTargets(clips);
5928
5928
  const edits = [];
5929
5929
  for (const id of clips) {
5930
- const clip = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id).clip;
5930
+ const clip = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, project(), id).clip;
5931
5931
  const lut = _optionalChain([clip, 'access', _196 => _196.grade, 'optionalAccess', _197 => _197.lut]);
5932
5932
  if (!lut) throw new Error(`Clip "${id}" has no LUT to protect skin from; add one with set_video_lut first.`);
5933
5933
  const { preserveSkinTones: _p, ...rest } = lut;
5934
5934
  edits.push({ op: "update_clip", clip: id, set: { grade: { ...clip.grade, lut: amount > 0 ? { ...rest, preserveSkinTones: amount } : rest } } });
5935
5935
  }
5936
- return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _198 => _198.clip, 'access', _199 => _199.grade, 'optionalAccess', _200 => _200.lut]), () => ( null)) })) }));
5936
+ return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkCBVNCWJMcjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _198 => _198.clip, 'access', _199 => _199.grade, 'optionalAccess', _200 => _200.lut]), () => ( null)) })) }));
5937
5937
  }
5938
5938
  };
5939
5939
  const planOut = (plan) => ({
@@ -5986,7 +5986,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5986
5986
  handler: ({ plan }) => {
5987
5987
  const r = controller.applyPlan(plan);
5988
5988
  if (!r.ok) throw new Error(r.error);
5989
- return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
5989
+ return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
5990
5990
  }
5991
5991
  };
5992
5992
  const discardPlan = {
@@ -6074,7 +6074,7 @@ function videoCameraMoveTools(controller, ctx) {
6074
6074
  clip: { type: "string", minLength: 1, description: "A clip id with a picture, from get_video_project." },
6075
6075
  role: ROLE,
6076
6076
  move: { type: "string", minLength: 1, description: "A camera move id of that role from list_video_camera_moves." },
6077
- ms: { type: "number", minimum: 0, maximum: _chunkISIO63Q5cjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (default the move's durationMs; at most the clip's length). Not for a hold, which plays across the rest of the clip.` },
6077
+ ms: { type: "number", minimum: 0, maximum: _chunkL2JTLW6Bcjs.CAMERA_MOVE_MAX_MS, description: `How long a transition takes, ms (default the move's durationMs; at most the clip's length). Not for a hold, which plays across the rest of the clip.` },
6078
6078
  preset: { type: "string", minLength: 1, description: "A preset of the move by name, from describe_effect." },
6079
6079
  values: ctx.valuesSchema("Control values over the move's defaults (and the preset's), from describe_effect"),
6080
6080
  from: FRAMING("Where a transition starts."),
@@ -6124,7 +6124,7 @@ var KEYS2 = {
6124
6124
  properties: {
6125
6125
  t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
6126
6126
  v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
6127
- ease: { anyOf: [{ type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_EASE_NAMES] }, { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }], description: "How the value moves to the next key: linear (default), hold, ease-in, ease-out, ease-in-out, or CSS cubic-bezier [x1, y1, x2, y2]." }
6127
+ ease: { anyOf: [{ type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_EASE_NAMES] }, { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }], description: "How the value moves to the next key: linear (default), hold, ease-in, ease-out, ease-in-out, or CSS cubic-bezier [x1, y1, x2, y2]." }
6128
6128
  },
6129
6129
  required: ["t", "v"],
6130
6130
  additionalProperties: false
@@ -6138,7 +6138,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6138
6138
  return controller.readOnlyReason();
6139
6139
  };
6140
6140
  const clipOf = (id) => {
6141
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), id);
6141
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, controller.getProject(), id);
6142
6142
  if (!at) {
6143
6143
  const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
6144
6144
  throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
@@ -6151,7 +6151,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6151
6151
  const effect = _nullishCoalesce(effects.find((e) => e.id === (_nullishCoalesce(instance, () => ( _optionalChain([r, 'access', _205 => _205.effect, 'optionalAccess', _206 => _206.id]))))), () => ( (r.effect ? { id: r.effect.id, effect: r.effect.effect, role: "clip effect", enabled: r.effect.enabled !== false, values: _nullishCoalesce(r.effect.values, () => ( {})) } : effects[0])));
6152
6152
  return { target, effect, effects, ...extra };
6153
6153
  };
6154
- return withVideoPlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
6154
+ return withVideoPlayback(_chunkL2JTLW6Bcjs.createEffectToolProvider.call(void 0, {
6155
6155
  id: _nullishCoalesce(options.id, () => ( "video-effects")),
6156
6156
  namespace: options.namespace,
6157
6157
  title: "Video effects",
@@ -6197,7 +6197,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6197
6197
  subscribe: (notify) => controller.subscribe(() => notify()),
6198
6198
  extraTools: (ctx) => [
6199
6199
  ...videoCameraMoveTools(controller, ctx),
6200
- ..._chunkZ3BRH4JKcjs.effectTemplateTools.call(void 0,
6200
+ ..._chunk557BDWKOcjs.effectTemplateTools.call(void 0,
6201
6201
  {
6202
6202
  provider: () => controller.effectsProvider,
6203
6203
  fillDetails: `It goes on the timeline at "at" (default the end of the project), on new tracks above the others: each shot's bottom layer on a base track (with the shot's transition), other layers as effect, picture and text clips on tracks by role, titles and captions as text clips; an open subject slot becomes a grey placeholder clip named after it. Camera moves are not carried over. Returns { template, tracks, clips, assets, start, end (ms), placeholders (clip ids by open slot), openSlots, notes }. To fill an open slot, add the picture with add_video_asset and put it on the placeholder's track at its start with add_video_clip in overwrite mode.`,
@@ -6224,7 +6224,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6224
6224
  duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
6225
6225
  values: ctx.valuesSchema("Control values over the effect's defaults", true),
6226
6226
  name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
6227
- mode: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
6227
+ mode: { type: "string", enum: [..._chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
6228
6228
  },
6229
6229
  required: ["track", "effect"],
6230
6230
  additionalProperties: false
@@ -6325,7 +6325,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6325
6325
  const clip = clipOf(args.clip);
6326
6326
  if (clip.type !== "effect") throw new Error(`Clip "${args.clip}" is not an effect clip; give the id of one of its effects (list_applied_effects).`);
6327
6327
  const was = _optionalChain([clip, 'access', _207 => _207.values, 'optionalAccess', _208 => _208[args.control]]);
6328
- const plain = keys === null ? _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _209 => _209.keys, 'access', _210 => _210[0], 'optionalAccess', _211 => _211.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
6328
+ const plain = keys === null ? _chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, was) ? _optionalChain([was, 'access', _209 => _209.keys, 'access', _210 => _210[0], 'optionalAccess', _211 => _211.v]) : was : { keys: [...keys].sort((a, b) => a.t - b.t) };
6329
6329
  if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
6330
6330
  r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
6331
6331
  } else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
@@ -6403,7 +6403,7 @@ function createVideoDialogueToolProvider(controller, options = {}) {
6403
6403
  const r = controller.proposePlan({ title, description: "Cuts fillers, long pauses and stutters found in the transcript, closing up every sync-locked track.", edits: videoRemoveRangesEdits(cuts), ranges: cuts.map((d) => ({ from: d.from, to: d.to, text: d.text, reason: d.kind })), source: "plan_video_dialogue_cleanup" });
6404
6404
  if (!r.ok) throw new Error(r.error);
6405
6405
  const p = r.plan;
6406
- return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, controller.getProject()), hint: `Nothing changed yet. Show the user the plan, then call apply_video_edit_plan with plan "${p.id}" (or discard_video_edit_plan).` };
6406
+ return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkCBVNCWJMcjs.videoProjectDuration.call(void 0, controller.getProject()), hint: `Nothing changed yet. Show the user the plan, then call apply_video_edit_plan with plan "${p.id}" (or discard_video_edit_plan).` };
6407
6407
  }
6408
6408
  };
6409
6409
  return withVideoPlayback(
@@ -6450,7 +6450,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6450
6450
  };
6451
6451
  const project = () => controller.getProject();
6452
6452
  const soundClip = (p, id) => {
6453
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
6453
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, p, id);
6454
6454
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
6455
6455
  const c = at.clip;
6456
6456
  if (c.type !== "media") throw new Error(`Clip "${id}" is a ${c.type} clip and has no sound of its own; pass a video or audio clip.`);
@@ -6466,8 +6466,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
6466
6466
  const { clip, asset: asset2 } = soundClip(p, args.clip);
6467
6467
  const speed = _nullishCoalesce(clip.speed, () => ( 1));
6468
6468
  const from2 = Math.max(clip.start, _nullishCoalesce(args.from, () => ( clip.start)));
6469
- const to2 = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip))));
6470
- if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
6469
+ const to2 = Math.min(_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip))));
6470
+ if (!(to2 > from2)) throw new Error(`The stretch is empty (${from2}\u2013${to2} ms); "from" and "to" must be inside the clip (${clip.start}\u2013${_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
6471
6471
  return { asset: asset2, from: (_nullishCoalesce(clip.in, () => ( 0))) + (from2 - clip.start) * speed, to: (_nullishCoalesce(clip.in, () => ( 0))) + (to2 - clip.start) * speed, out: (s) => clip.start + (s - (_nullishCoalesce(clip.in, () => ( 0)))) / speed };
6472
6472
  }
6473
6473
  const asset = p.assets.find((a) => a.id === args.asset);
@@ -6509,7 +6509,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6509
6509
  handler: async ({ clips, target, ceiling, replace }) => {
6510
6510
  const p = project();
6511
6511
  const targets = clips.map((id) => soundClip(p, id));
6512
- for (const t of targets) if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, t.clip.volume) && !replace) throw new Error(`Clip "${t.clip.id}" has volume keyframes, which a constant gain would replace; pass replace: true, or remove them first.`);
6512
+ for (const t of targets) if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, t.clip.volume) && !replace) throw new Error(`Clip "${t.clip.id}" has volume keyframes, which a constant gain would replace; pass replace: true, or remove them first.`);
6513
6513
  const results = [];
6514
6514
  const edits = [];
6515
6515
  for (const { clip, asset } of targets) {
@@ -6554,7 +6554,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6554
6554
  handler: async (args) => {
6555
6555
  const p = project();
6556
6556
  const music = args.music.map((id) => soundClip(p, id));
6557
- for (const m of music) if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, m.clip.volume) && !args.replace) throw new Error(`Music clip "${m.clip.id}" already has volume keyframes; pass replace: true to replace them, or remove them first.`);
6557
+ for (const m of music) if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, m.clip.volume) && !args.replace) throw new Error(`Music clip "${m.clip.id}" already has volume keyframes; pass replace: true to replace them, or remove them first.`);
6558
6558
  const transcriptTrack = videoTranscriptTrack(p, args.dialogue_track);
6559
6559
  const mode = _nullishCoalesce(args.speech, () => ( (transcriptTrack && videoTimelineTranscript(p, { track: transcriptTrack }).length ? "transcript" : "audio")));
6560
6560
  let ranges = [];
@@ -6567,7 +6567,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6567
6567
  const track = p.tracks.find((t) => t.id === args.dialogue_track);
6568
6568
  if (!track) throw new Error(`There is no track "${args.dialogue_track}".`);
6569
6569
  const musicIds = new Set(music.map((m) => m.clip.id));
6570
- for (const c of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
6570
+ for (const c of _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track)) {
6571
6571
  if (c.type !== "media" || musicIds.has(c.id)) continue;
6572
6572
  const asset = p.assets.find((a) => a.id === c.asset);
6573
6573
  if (!asset || asset.kind === "image" || asset.hasAudio === false) continue;
@@ -6578,10 +6578,10 @@ function createVideoMusicToolProvider(controller, options = {}) {
6578
6578
  let at = c.start;
6579
6579
  for (const s of silences) {
6580
6580
  const a = c.start + (s.start - src0) / speed;
6581
- if (a - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
6581
+ if (a - at > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
6582
6582
  at = c.start + (s.end - src0) / speed;
6583
6583
  }
6584
- if (_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) });
6584
+ if (_chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) - at > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, c) });
6585
6585
  }
6586
6586
  if (!ranges.length) throw new Error(`Track "${args.dialogue_track}" has no sound above -40 dBFS, so there is no speech to duck under.`);
6587
6587
  }
@@ -6644,7 +6644,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6644
6644
  if (!beats.length) throw new Error(`No beats were found in "${args.music}"; try a lower sensitivity, or pass beats.`);
6645
6645
  } else beats = [...args.beats].sort((a, b) => a - b);
6646
6646
  const tolerance = _nullishCoalesce(args.tolerance, () => ( 150));
6647
- const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
6647
+ const clips = _chunkCBVNCWJMcjs.sortedVideoClips.call(void 0, track);
6648
6648
  const edits = [];
6649
6649
  const ranges = [];
6650
6650
  const skipped = [];
@@ -6652,8 +6652,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
6652
6652
  for (let i = 0; i + 1 < clips.length; i++) {
6653
6653
  const left = clips[i];
6654
6654
  const right = clips[i + 1];
6655
- const cut = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, left);
6656
- if (Math.abs(right.start - cut) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
6655
+ const cut = _chunkCBVNCWJMcjs.videoClipEnd.call(void 0, left);
6656
+ if (Math.abs(right.start - cut) > _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON) continue;
6657
6657
  const beat = nearestVideoBeat(beats, cut, tolerance);
6658
6658
  if (beat === null) {
6659
6659
  skipped.push({ cut: round4(cut), reason: `no beat within ${tolerance} ms` });
@@ -6728,7 +6728,7 @@ function videoClipEffectDocument(clip, instance, providerId) {
6728
6728
  const values = {};
6729
6729
  const tracks = {};
6730
6730
  for (const [control, v] of Object.entries(_nullishCoalesce(effect.values, () => ( {})))) {
6731
- if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) {
6731
+ if (_chunkCBVNCWJMcjs.isVideoKeyframes.call(void 0, v)) {
6732
6732
  values[control] = v.keys[0].v;
6733
6733
  tracks[control] = v.keys.map((k) => ({ time: k.t, value: k.v, ...k.ease && k.ease !== "linear" ? { easing: videoEaseToAnimationEasing(k.ease) } : {} }));
6734
6734
  } else values[control] = v;
@@ -6769,10 +6769,10 @@ function videoEffectValuesFromDocument(doc) {
6769
6769
  async function openVideoClipEffectAuthoring(controller, clip, instance, options = {}) {
6770
6770
  const provider = controller.effectsProvider;
6771
6771
  if (!provider) throw new Error("No effects provider is registered, so the effect cannot be opened for authoring; register one with setEffectsProvider.");
6772
- const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), clip);
6772
+ const at = _chunkCBVNCWJMcjs.findVideoClip.call(void 0, controller.getProject(), clip);
6773
6773
  if (!at) throw new Error(`There is no clip "${clip}".`);
6774
6774
  const doc = videoClipEffectDocument(at.clip, instance, provider.id);
6775
- const session = await _chunkQKXO6JPPcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
6775
+ const session = await _chunk2OQGPEHHcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
6776
6776
  return {
6777
6777
  clip,
6778
6778
  instance,
@@ -7126,4 +7126,4 @@ function createVideoEditorDocument(controller) {
7126
7126
 
7127
7127
 
7128
7128
 
7129
- exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkZBCT5MEAcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkZBCT5MEAcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkZBCT5MEAcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkZBCT5MEAcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkZBCT5MEAcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkZBCT5MEAcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkZBCT5MEAcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkZBCT5MEAcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkZBCT5MEAcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkZBCT5MEAcjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkZBCT5MEAcjs.allVideoClipIds; exports.allVideoTracks = _chunkZBCT5MEAcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkZBCT5MEAcjs.applyVideoGrade; exports.applyVideoLut = _chunkZBCT5MEAcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkZBCT5MEAcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkZBCT5MEAcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkZBCT5MEAcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkZBCT5MEAcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkZBCT5MEAcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkZBCT5MEAcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkZBCT5MEAcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkZBCT5MEAcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkZBCT5MEAcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkZBCT5MEAcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkZBCT5MEAcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkZBCT5MEAcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkZBCT5MEAcjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkZBCT5MEAcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkZBCT5MEAcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkZBCT5MEAcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkZBCT5MEAcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkZBCT5MEAcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkZBCT5MEAcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkZBCT5MEAcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkZBCT5MEAcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkZBCT5MEAcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkZBCT5MEAcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkZBCT5MEAcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkZBCT5MEAcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkZBCT5MEAcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkZBCT5MEAcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkZBCT5MEAcjs.setVideoKey; exports.snapToVideoFrame = _chunkZBCT5MEAcjs.snapToVideoFrame; exports.snapVideoTime = _chunkZBCT5MEAcjs.snapVideoTime; exports.sortVideoKeys = _chunkZBCT5MEAcjs.sortVideoKeys; exports.sortedVideoClips = _chunkZBCT5MEAcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkZBCT5MEAcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkZBCT5MEAcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkZBCT5MEAcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkZBCT5MEAcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkZBCT5MEAcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkZBCT5MEAcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkZBCT5MEAcjs.videoClipAfter; exports.videoClipAnimated = _chunkZBCT5MEAcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkZBCT5MEAcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkZBCT5MEAcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkZBCT5MEAcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkZBCT5MEAcjs.videoClipEffectUses; exports.videoClipEnd = _chunkZBCT5MEAcjs.videoClipEnd; exports.videoClipHandles = _chunkZBCT5MEAcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkZBCT5MEAcjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkZBCT5MEAcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkZBCT5MEAcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkZBCT5MEAcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkZBCT5MEAcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkZBCT5MEAcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkZBCT5MEAcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkZBCT5MEAcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkZBCT5MEAcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkZBCT5MEAcjs.videoEaseBezier; exports.videoEaseProgress = _chunkZBCT5MEAcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkZBCT5MEAcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkZBCT5MEAcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkZBCT5MEAcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkZBCT5MEAcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkZBCT5MEAcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkZBCT5MEAcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkZBCT5MEAcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkZBCT5MEAcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkZBCT5MEAcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkZBCT5MEAcjs.videoFrameToSvg; exports.videoFrames = _chunkZBCT5MEAcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkZBCT5MEAcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkZBCT5MEAcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkZBCT5MEAcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkZBCT5MEAcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkZBCT5MEAcjs.videoGradeLook; exports.videoGradePreset = _chunkZBCT5MEAcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkZBCT5MEAcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkZBCT5MEAcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkZBCT5MEAcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkZBCT5MEAcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkZBCT5MEAcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkZBCT5MEAcjs.videoHourFrames; exports.videoIrisRadius = _chunkZBCT5MEAcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkZBCT5MEAcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkZBCT5MEAcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkZBCT5MEAcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkZBCT5MEAcjs.videoKeysOf; exports.videoLayerMask = _chunkZBCT5MEAcjs.videoLayerMask; exports.videoLayersUseEffects = _chunkZBCT5MEAcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkZBCT5MEAcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkZBCT5MEAcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkZBCT5MEAcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkZBCT5MEAcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkZBCT5MEAcjs.videoLutToCube; exports.videoMaskContains = _chunkZBCT5MEAcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkZBCT5MEAcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkZBCT5MEAcjs.videoMaskSvgPath; exports.videoOverlap = _chunkZBCT5MEAcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkZBCT5MEAcjs.videoProjectDuration; exports.videoProjectEffects = _chunkZBCT5MEAcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkZBCT5MEAcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkZBCT5MEAcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkZBCT5MEAcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkZBCT5MEAcjs.videoSequenceMap; exports.videoShellQuote = _chunkZBCT5MEAcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkZBCT5MEAcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkZBCT5MEAcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkZBCT5MEAcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkZBCT5MEAcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkZBCT5MEAcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkZBCT5MEAcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkZBCT5MEAcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkZBCT5MEAcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkZBCT5MEAcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkZBCT5MEAcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkZBCT5MEAcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkZBCT5MEAcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkZBCT5MEAcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkZBCT5MEAcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkZBCT5MEAcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkZBCT5MEAcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
7129
+ exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkCBVNCWJMcjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkCBVNCWJMcjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkCBVNCWJMcjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkCBVNCWJMcjs.VIDEO_CLIP_TYPES; exports.VIDEO_DEFAULT_FILLERS = VIDEO_DEFAULT_FILLERS; exports.VIDEO_DEFAULT_STILL_DURATION = VIDEO_DEFAULT_STILL_DURATION; exports.VIDEO_DEFAULT_TITLE_DURATION = VIDEO_DEFAULT_TITLE_DURATION; exports.VIDEO_DISFLUENCY_KINDS = VIDEO_DISFLUENCY_KINDS; exports.VIDEO_EASE_NAMES = _chunkCBVNCWJMcjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkCBVNCWJMcjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkCBVNCWJMcjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkCBVNCWJMcjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkCBVNCWJMcjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkCBVNCWJMcjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkCBVNCWJMcjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkCBVNCWJMcjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkCBVNCWJMcjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkCBVNCWJMcjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkCBVNCWJMcjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkCBVNCWJMcjs.VIDEO_PLACEMENT_MODES; exports.VIDEO_PREVIEW_SCALE_OPTIONS = VIDEO_PREVIEW_SCALE_OPTIONS; exports.VIDEO_PROXY_SCALES = VIDEO_PROXY_SCALES; exports.VIDEO_SCOPE_KINDS = VIDEO_SCOPE_KINDS; exports.VIDEO_TIME_EPSILON = _chunkCBVNCWJMcjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkCBVNCWJMcjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkCBVNCWJMcjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkCBVNCWJMcjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkCBVNCWJMcjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkCBVNCWJMcjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkCBVNCWJMcjs.allVideoClipIds; exports.allVideoTracks = _chunkCBVNCWJMcjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkCBVNCWJMcjs.applyVideoGrade; exports.applyVideoLut = _chunkCBVNCWJMcjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkCBVNCWJMcjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkCBVNCWJMcjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkCBVNCWJMcjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkCBVNCWJMcjs.checkVideoTimeRemap; exports.createVideoDialogueToolProvider = createVideoDialogueToolProvider; exports.createVideoEditorDocument = createVideoEditorDocument; exports.createVideoEditorToolProvider = createVideoEditorToolProvider; exports.createVideoEffectsToolProvider = createVideoEffectsToolProvider; exports.createVideoElementDecoder = createVideoElementDecoder; exports.createVideoMusicToolProvider = createVideoMusicToolProvider; exports.createVideoProject = createVideoProject; exports.decodeVideoAudioPeaks = decodeVideoAudioPeaks; exports.describeVideoEditPlan = describeVideoEditPlan; exports.describeVideoProject = describeVideoProject; exports.describeVideoSequence = describeVideoSequence; exports.detectVideoDisfluencies = detectVideoDisfluencies; exports.diffVideoProjects = diffVideoProjects; exports.drawVideoFrame = _chunkCBVNCWJMcjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkCBVNCWJMcjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkCBVNCWJMcjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkCBVNCWJMcjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkCBVNCWJMcjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkCBVNCWJMcjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkCBVNCWJMcjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkCBVNCWJMcjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkCBVNCWJMcjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkCBVNCWJMcjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkCBVNCWJMcjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkCBVNCWJMcjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkCBVNCWJMcjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkCBVNCWJMcjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkCBVNCWJMcjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkCBVNCWJMcjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkCBVNCWJMcjs.overEffectPixels; exports.parseVideoAnimatable = parseVideoAnimatable; exports.parseVideoAsset = parseVideoAsset; exports.parseVideoAssetProxies = parseVideoAssetProxies; exports.parseVideoClip = parseVideoClip; exports.parseVideoClipAnimation = parseVideoClipAnimation; exports.parseVideoClipCamera = parseVideoClipCamera; exports.parseVideoClipEffects = parseVideoClipEffects; exports.parseVideoClipMask = parseVideoClipMask; exports.parseVideoCubeLut = _chunkCBVNCWJMcjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkCBVNCWJMcjs.parseVideoLoudnessMeasurement; exports.parseVideoMarker = parseVideoMarker; exports.parseVideoPreviewScale = parseVideoPreviewScale; exports.parseVideoProject = parseVideoProject; exports.parseVideoSequence = parseVideoSequence; exports.parseVideoTimeRef = parseVideoTimeRef; exports.parseVideoTimeRemap = parseVideoTimeRemap; exports.parseVideoTrack = parseVideoTrack; exports.parseVideoTranscript = parseVideoTranscript; exports.parseVideoTranscriptWords = parseVideoTranscriptWords; exports.parseVideoTransform = parseVideoTransform; exports.parseVideoTransition = parseVideoTransition; exports.placeVideoRect = _chunkCBVNCWJMcjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkCBVNCWJMcjs.removeVideoKey; exports.renderVideoFrameExact = _chunkCBVNCWJMcjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkCBVNCWJMcjs.retimeVideoAnimatable; exports.setVideoKey = _chunkCBVNCWJMcjs.setVideoKey; exports.snapToVideoFrame = _chunkCBVNCWJMcjs.snapToVideoFrame; exports.snapVideoTime = _chunkCBVNCWJMcjs.snapVideoTime; exports.sortVideoKeys = _chunkCBVNCWJMcjs.sortVideoKeys; exports.sortedVideoClips = _chunkCBVNCWJMcjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkCBVNCWJMcjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkCBVNCWJMcjs.toVideoEdl; exports.toVideoFfmpeg = _chunkCBVNCWJMcjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkCBVNCWJMcjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkCBVNCWJMcjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkCBVNCWJMcjs.videoAssetMap; exports.videoAssetProxy = videoAssetProxy; exports.videoAudioLevels = videoAudioLevels; exports.videoAudioLoudness = videoAudioLoudness; exports.videoAudioPeakRange = videoAudioPeakRange; exports.videoAudioPeakSpans = videoAudioPeakSpans; exports.videoAudioPeaksDuration = videoAudioPeaksDuration; exports.videoAuthorableEffects = videoAuthorableEffects; exports.videoCacheEvictions = videoCacheEvictions; exports.videoCameraBase = videoCameraBase; exports.videoCameraMoveTools = videoCameraMoveTools; exports.videoCameraView = videoCameraView; exports.videoChroma = videoChroma; exports.videoClipAfter = _chunkCBVNCWJMcjs.videoClipAfter; exports.videoClipAnimated = _chunkCBVNCWJMcjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkCBVNCWJMcjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkCBVNCWJMcjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkCBVNCWJMcjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkCBVNCWJMcjs.videoClipEffectUses; exports.videoClipEnd = _chunkCBVNCWJMcjs.videoClipEnd; exports.videoClipHandles = _chunkCBVNCWJMcjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkCBVNCWJMcjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkCBVNCWJMcjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkCBVNCWJMcjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkCBVNCWJMcjs.videoClipSourceTime; exports.videoClipSpeed = _chunkCBVNCWJMcjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkCBVNCWJMcjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkCBVNCWJMcjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkCBVNCWJMcjs.videoClipsAt; exports.videoContactSheetSvg = _chunkCBVNCWJMcjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkCBVNCWJMcjs.videoEaseBezier; exports.videoEaseProgress = _chunkCBVNCWJMcjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkCBVNCWJMcjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkCBVNCWJMcjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkCBVNCWJMcjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkCBVNCWJMcjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkCBVNCWJMcjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkCBVNCWJMcjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkCBVNCWJMcjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkCBVNCWJMcjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkCBVNCWJMcjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkCBVNCWJMcjs.videoFrameToSvg; exports.videoFrames = _chunkCBVNCWJMcjs.videoFrames; exports.videoFreezeFrameEdit = _chunkCBVNCWJMcjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkCBVNCWJMcjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkCBVNCWJMcjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkCBVNCWJMcjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkCBVNCWJMcjs.videoGradeLook; exports.videoGradePreset = _chunkCBVNCWJMcjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkCBVNCWJMcjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkCBVNCWJMcjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkCBVNCWJMcjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkCBVNCWJMcjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkCBVNCWJMcjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkCBVNCWJMcjs.videoHourFrames; exports.videoIrisRadius = _chunkCBVNCWJMcjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkCBVNCWJMcjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkCBVNCWJMcjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkCBVNCWJMcjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkCBVNCWJMcjs.videoKeysOf; exports.videoLayerMask = _chunkCBVNCWJMcjs.videoLayerMask; exports.videoLayersUseEffects = _chunkCBVNCWJMcjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkCBVNCWJMcjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkCBVNCWJMcjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkCBVNCWJMcjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkCBVNCWJMcjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkCBVNCWJMcjs.videoLutToCube; exports.videoMaskContains = _chunkCBVNCWJMcjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkCBVNCWJMcjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkCBVNCWJMcjs.videoMaskSvgPath; exports.videoOverlap = _chunkCBVNCWJMcjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkCBVNCWJMcjs.videoProjectDuration; exports.videoProjectEffects = _chunkCBVNCWJMcjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkCBVNCWJMcjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkCBVNCWJMcjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkCBVNCWJMcjs.videoSequenceDuration; exports.videoSequenceMap = _chunkCBVNCWJMcjs.videoSequenceMap; exports.videoShellQuote = _chunkCBVNCWJMcjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkCBVNCWJMcjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkCBVNCWJMcjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkCBVNCWJMcjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkCBVNCWJMcjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkCBVNCWJMcjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkCBVNCWJMcjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkCBVNCWJMcjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkCBVNCWJMcjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkCBVNCWJMcjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkCBVNCWJMcjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkCBVNCWJMcjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkCBVNCWJMcjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkCBVNCWJMcjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkCBVNCWJMcjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkCBVNCWJMcjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkCBVNCWJMcjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;