@pixerate/editor 0.248.0 → 0.250.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 (122) hide show
  1. package/README.md +1 -0
  2. package/dist/animation-editor/index.cjs +118 -114
  3. package/dist/animation-editor/index.js +11 -7
  4. package/dist/{brushstrokeRender-QLCXROJK.js → brushstrokeRender-2FHFLSEG.js} +8 -4
  5. package/dist/{brushstrokeRender-DTDPFBLC.cjs → brushstrokeRender-QGRXOKDA.cjs} +15 -11
  6. package/dist/canvas/index.cjs +71 -15
  7. package/dist/canvas/index.d.cts +1 -0
  8. package/dist/canvas/index.d.ts +1 -0
  9. package/dist/canvas/index.js +58 -2
  10. package/dist/canvas/stickers.d.cts +35 -0
  11. package/dist/canvas/stickers.d.ts +35 -0
  12. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  13. package/dist/{chunk-SC2RZ5EF.js → chunk-2VJAVXLI.js} +2 -2
  14. package/dist/{chunk-OLNIPTB3.cjs → chunk-2VX55NFM.cjs} +1 -320
  15. package/dist/chunk-3K6HWEXZ.cjs +92 -0
  16. package/dist/{chunk-UOOK7HTX.js → chunk-3PPJRMIG.js} +1 -1
  17. package/dist/{chunk-ZFSLEOSQ.js → chunk-3TWOCSCY.js} +11 -9
  18. package/dist/chunk-4D6KP5BV.js +92 -0
  19. package/dist/chunk-4JNWA3VT.cjs +302 -0
  20. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  21. package/dist/{chunk-2ONK3ERD.cjs → chunk-75K3W4D6.cjs} +20 -20
  22. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  23. package/dist/chunk-ATK6ABN3.cjs +303 -0
  24. package/dist/{chunk-7T7JWTVE.cjs → chunk-BOHDJJ2O.cjs} +8 -8
  25. package/dist/{chunk-2PBZBRP5.js → chunk-D5KGAO4Z.js} +10 -92
  26. package/dist/{chunk-HB4ICNNA.cjs → chunk-DPYAO5U6.cjs} +42 -42
  27. package/dist/{chunk-6G6ZDDDB.cjs → chunk-GT77U7QG.cjs} +303 -149
  28. package/dist/{chunk-PQ3H2AAN.cjs → chunk-I7NJPHWV.cjs} +122 -204
  29. package/dist/{chunk-42TWUPNJ.js → chunk-IRSTHLQQ.js} +1 -320
  30. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  31. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  32. package/dist/{chunk-VMROIWLL.cjs → chunk-KBYB7OWB.cjs} +3 -3
  33. package/dist/{chunk-Q2HA52V4.js → chunk-KDLBJ6QR.js} +2 -2
  34. package/dist/{chunk-WVS5KQDH.cjs → chunk-M2VKFE5L.cjs} +246 -244
  35. package/dist/{chunk-5GLYUSNT.js → chunk-NOHJP5TK.js} +1 -1
  36. package/dist/{chunk-XNRBMYNB.js → chunk-NTRAVM2I.js} +1 -1
  37. package/dist/{chunk-VNBUDVD4.js → chunk-OTEPAQJX.js} +228 -74
  38. package/dist/chunk-OTTT5N3K.js +322 -0
  39. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  40. package/dist/{chunk-NZ3O3A5C.js → chunk-SMSGP2HQ.js} +1 -1
  41. package/dist/chunk-SZTI6EER.js +13 -0
  42. package/dist/chunk-U4NUOKBT.js +303 -0
  43. package/dist/chunk-U67EN7GG.cjs +13 -0
  44. package/dist/chunk-W5M3J7PV.cjs +322 -0
  45. package/dist/{chunk-4P6H35HU.js → chunk-WA44NKPF.js} +2 -2
  46. package/dist/chunk-WKH5ZAUA.js +302 -0
  47. package/dist/{chunk-L6REDLNB.cjs → chunk-WPUXGDH4.cjs} +7 -7
  48. package/dist/{chunk-P3NIPIKS.js → chunk-WQCNC4DK.js} +1 -1
  49. package/dist/{chunk-IBDU6EGZ.cjs → chunk-X7WRL5ZZ.cjs} +35 -35
  50. package/dist/{chunk-XWTRATIM.cjs → chunk-YM6ZBTXG.cjs} +23 -23
  51. package/dist/{chunk-TPWB4Y6L.cjs → chunk-YW43M56C.cjs} +1 -1
  52. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  53. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  54. package/dist/effects/helpers.d.cts +6 -0
  55. package/dist/effects/helpers.d.ts +6 -0
  56. package/dist/effects/index.cjs +62 -60
  57. package/dist/effects/index.js +5 -3
  58. package/dist/effects/tools.d.cts +6 -0
  59. package/dist/effects/tools.d.ts +6 -0
  60. package/dist/image-editor/effects.d.cts +1 -1
  61. package/dist/image-editor/effects.d.ts +1 -1
  62. package/dist/image-editor/index.cjs +1097 -1069
  63. package/dist/image-editor/index.d.cts +1 -0
  64. package/dist/image-editor/index.d.ts +1 -0
  65. package/dist/image-editor/index.js +58 -30
  66. package/dist/image-editor/stickers.d.cts +9 -0
  67. package/dist/image-editor/stickers.d.ts +9 -0
  68. package/dist/paint/index.cjs +8 -5
  69. package/dist/paint/index.js +13 -10
  70. package/dist/paint-editor/controller.d.cts +37 -1
  71. package/dist/paint-editor/controller.d.ts +37 -1
  72. package/dist/paint-editor/index.cjs +753 -609
  73. package/dist/paint-editor/index.d.cts +3 -0
  74. package/dist/paint-editor/index.d.ts +3 -0
  75. package/dist/paint-editor/index.js +187 -43
  76. package/dist/paint-editor/sticker-art.d.cts +55 -0
  77. package/dist/paint-editor/sticker-art.d.ts +55 -0
  78. package/dist/paint-editor/stickers.d.cts +30 -17
  79. package/dist/paint-editor/stickers.d.ts +30 -17
  80. package/dist/paint-editor/stroke.d.cts +4 -0
  81. package/dist/paint-editor/stroke.d.ts +4 -0
  82. package/dist/paint-editor/ui.d.cts +10 -2
  83. package/dist/paint-editor/ui.d.ts +10 -2
  84. package/dist/raster/index.cjs +6 -4
  85. package/dist/raster/index.js +12 -10
  86. package/dist/stickers/browser.d.cts +48 -0
  87. package/dist/stickers/browser.d.ts +48 -0
  88. package/dist/stickers/combine.d.cts +10 -0
  89. package/dist/stickers/combine.d.ts +10 -0
  90. package/dist/stickers/conformance.d.cts +18 -0
  91. package/dist/stickers/conformance.d.ts +18 -0
  92. package/dist/stickers/editor.d.cts +14 -0
  93. package/dist/stickers/editor.d.ts +14 -0
  94. package/dist/stickers/errors.d.cts +6 -0
  95. package/dist/stickers/errors.d.ts +6 -0
  96. package/dist/stickers/fake.d.cts +16 -0
  97. package/dist/stickers/fake.d.ts +16 -0
  98. package/dist/stickers/helpers.d.cts +51 -0
  99. package/dist/stickers/helpers.d.ts +51 -0
  100. package/dist/stickers/index.cjs +337 -0
  101. package/dist/stickers/index.d.cts +16 -0
  102. package/dist/stickers/index.d.ts +16 -0
  103. package/dist/stickers/index.js +337 -0
  104. package/dist/stickers/stamps.d.cts +13 -0
  105. package/dist/stickers/stamps.d.ts +13 -0
  106. package/dist/stickers/tools.d.cts +81 -0
  107. package/dist/stickers/tools.d.ts +81 -0
  108. package/dist/stickers/types.d.cts +123 -0
  109. package/dist/stickers/types.d.ts +123 -0
  110. package/dist/vector/index.cjs +1018 -981
  111. package/dist/vector/index.d.cts +1 -0
  112. package/dist/vector/index.d.ts +1 -0
  113. package/dist/vector/index.js +44 -7
  114. package/dist/vector/stickers.d.cts +11 -0
  115. package/dist/vector/stickers.d.ts +11 -0
  116. package/dist/video-editor/index.cjs +344 -344
  117. package/dist/video-editor/index.js +4 -4
  118. package/package.json +11 -1
  119. package/skills/README.md +1 -0
  120. package/skills/pixerate-image-editor/SKILL.md +1 -1
  121. package/skills/pixerate-paint-editor/SKILL.md +8 -5
  122. package/skills/pixerate-stickers/SKILL.md +57 -0
@@ -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 _chunkQOBCBGGIcjs = require('../chunk-QOBCBGGI.cjs');
3
+ var _chunkQKXO6JPPcjs = require('../chunk-QKXO6JPP.cjs');
4
4
 
5
5
 
6
6
 
@@ -149,7 +149,7 @@ var _chunkQOBCBGGIcjs = require('../chunk-QOBCBGGI.cjs');
149
149
 
150
150
 
151
151
 
152
- var _chunkXNZFVYC2cjs = require('../chunk-XNZFVYC2.cjs');
152
+ var _chunkZBCT5MEAcjs = require('../chunk-ZBCT5MEA.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 _chunkK5DS2JTAcjs = require('../chunk-K5DS2JTA.cjs');
162
+ var _chunkZ3BRH4JKcjs = require('../chunk-Z3BRH4JK.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 _chunkGHCSC2WPcjs = require('../chunk-GHCSC2WP.cjs');
174
+ var _chunkISIO63Q5cjs = require('../chunk-ISIO63Q5.cjs');
175
175
  require('../chunk-WOFXZ3XU.cjs');
176
176
 
177
177
 
@@ -231,7 +231,7 @@ function parseVideoEase(v, path) {
231
231
  if (v[0] < 0 || v[0] > 1 || v[2] < 0 || v[2] > 1) fail(path, "must have x1 and x2 between 0 and 1");
232
232
  return [v[0], v[1], v[2], v[3]];
233
233
  }
234
- return oneOf(v, _chunkXNZFVYC2cjs.VIDEO_EASE_NAMES, path);
234
+ return oneOf(v, _chunkZBCT5MEAcjs.VIDEO_EASE_NAMES, path);
235
235
  }
236
236
  function parseVideoKeyframes(v, path, { min, max } = {}) {
237
237
  if (!isObject(v)) return fail(path, "must be a number or keyframes { keys: [{ t, v, ease }] }");
@@ -273,7 +273,7 @@ function parseVideoTimeRemap(v, speed, path) {
273
273
  if (speed !== void 0 && speed !== 1) fail(path, 'cannot be used with a speed; a ramp sets the speed itself (remove "speed")');
274
274
  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`);
275
275
  try {
276
- _chunkXNZFVYC2cjs.checkVideoTimeRemap.call(void 0, remap, path);
276
+ _chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, path);
277
277
  } catch (e) {
278
278
  throw new Error(e.message.replace(/\.?$/, "."));
279
279
  }
@@ -283,17 +283,17 @@ function parseVideoClipAnimation(v, path) {
283
283
  if (v === void 0) return void 0;
284
284
  if (!isObject(v)) return fail(path, "must be an object { effect, duration }");
285
285
  return compact({
286
- effect: oneOf(v.effect, _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
286
+ effect: oneOf(v.effect, _chunkZBCT5MEAcjs.VIDEO_CLIP_ANIMATION_EFFECTS, `${path}.effect`, false),
287
287
  duration: num(v.duration, `${path}.duration`, { optional: true, positive: true })
288
288
  });
289
289
  }
290
290
  function parseVideoGrade(v, path) {
291
291
  if (v === void 0) return void 0;
292
292
  if (!isObject(v)) return fail(path, "must be an object such as { exposure, contrast, saturation }");
293
- const known = /* @__PURE__ */ new Set([..._chunkXNZFVYC2cjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
293
+ const known = /* @__PURE__ */ new Set([..._chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => c.key), "lut"]);
294
294
  const unknown = Object.keys(v).find((k) => !known.has(k));
295
295
  if (unknown) fail(`${path}.${unknown}`, `is not a grade setting; use ${[...known].join(", ")}`);
296
- return compact({ ...Object.fromEntries(_chunkXNZFVYC2cjs.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
+ 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`) });
297
297
  }
298
298
  function parseVideoGradeLut(v, path) {
299
299
  if (v === void 0) return void 0;
@@ -308,7 +308,7 @@ function parseVideoClipMask(v, path) {
308
308
  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 }');
309
309
  const unknown = Object.keys(v).find((k) => !MASK_KEYS.includes(k));
310
310
  if (unknown) fail(`${path}.${unknown}`, `is not a mask setting; use ${MASK_KEYS.join(", ")}`);
311
- const shape = oneOf(v.shape, _chunkXNZFVYC2cjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
311
+ const shape = oneOf(v.shape, _chunkZBCT5MEAcjs.VIDEO_MASK_SHAPES, `${path}.shape`, false);
312
312
  let points;
313
313
  if (v.points !== void 0) {
314
314
  if (shape !== "polygon") fail(`${path}.points`, "is only for polygon masks");
@@ -334,15 +334,15 @@ function parseVideoClipMask(v, path) {
334
334
  function parseVideoTransition(v, path) {
335
335
  if (v === void 0) return void 0;
336
336
  if (!isObject(v)) return fail(path, "must be an object { type, duration }");
337
- const type = oneOf(v.type, _chunkXNZFVYC2cjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
337
+ const type = oneOf(v.type, _chunkZBCT5MEAcjs.VIDEO_TRANSITION_TYPES, `${path}.type`, false);
338
338
  if (type === "effect" && v.effect === void 0) fail(`${path}.effect`, 'is required for an effect transition: { effect: "<effect id>", values }');
339
339
  if (type !== "effect" && v.effect !== void 0) fail(`${path}.effect`, 'is only for transitions of type "effect"');
340
340
  return compact({
341
341
  type,
342
342
  duration: num(v.duration, `${path}.duration`, { positive: true }),
343
343
  color: str(v.color, `${path}.color`, true),
344
- direction: oneOf(v.direction, _chunkXNZFVYC2cjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
345
- audioCurve: oneOf(v.audioCurve, _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
344
+ direction: oneOf(v.direction, _chunkZBCT5MEAcjs.VIDEO_WIPE_DIRECTIONS, `${path}.direction`),
345
+ audioCurve: oneOf(v.audioCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.audioCurve`),
346
346
  effect: v.effect === void 0 ? void 0 : parseVideoEffectRef(v.effect, `${path}.effect`, false)
347
347
  });
348
348
  }
@@ -471,7 +471,7 @@ function parseVideoClipCamera(v, path) {
471
471
  }
472
472
  function parseVideoClip(v, path = "clip") {
473
473
  if (!isObject(v)) return fail(path, "must be an object");
474
- const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkXNZFVYC2cjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
474
+ const type = oneOf(_nullishCoalesce(v.type, () => ( "media")), _chunkZBCT5MEAcjs.VIDEO_CLIP_TYPES, `${path}.type`, false);
475
475
  const base = {
476
476
  id: str(v.id, `${path}.id`),
477
477
  name: str(v.name, `${path}.name`, true),
@@ -479,8 +479,8 @@ function parseVideoClip(v, path = "clip") {
479
479
  duration: num(v.duration, `${path}.duration`, { positive: true }),
480
480
  opacity: parseVideoAnimatable(v.opacity, `${path}.opacity`, { optional: true, min: 0, max: 1 }),
481
481
  transform: parseVideoTransform(v.transform, `${path}.transform`),
482
- fit: oneOf(v.fit, _chunkXNZFVYC2cjs.VIDEO_FITS, `${path}.fit`),
483
- blend: oneOf(v.blend, _chunkXNZFVYC2cjs.VIDEO_BLEND_MODES, `${path}.blend`),
482
+ fit: oneOf(v.fit, _chunkZBCT5MEAcjs.VIDEO_FITS, `${path}.fit`),
483
+ blend: oneOf(v.blend, _chunkZBCT5MEAcjs.VIDEO_BLEND_MODES, `${path}.blend`),
484
484
  grade: parseVideoGrade(v.grade, `${path}.grade`),
485
485
  animateIn: parseVideoClipAnimation(v.animateIn, `${path}.animateIn`),
486
486
  animateOut: parseVideoClipAnimation(v.animateOut, `${path}.animateOut`),
@@ -501,8 +501,8 @@ function parseVideoClip(v, path = "clip") {
501
501
  volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
502
502
  muted: bool(v.muted, `${path}.muted`),
503
503
  timeRemap: parseVideoTimeRemap(v.timeRemap, v.speed, `${path}.timeRemap`),
504
- fadeInCurve: oneOf(v.fadeInCurve, _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
505
- fadeOutCurve: oneOf(v.fadeOutCurve, _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
504
+ fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
505
+ fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
506
506
  });
507
507
  if (type === "sequence") {
508
508
  for (const key of ["speed", "timeRemap"])
@@ -514,8 +514,8 @@ function parseVideoClip(v, path = "clip") {
514
514
  in: num(v.in, `${path}.in`, { optional: true, min: 0 }),
515
515
  volume: parseVideoAnimatable(v.volume, `${path}.volume`, { optional: true, min: 0, max: 4 }),
516
516
  muted: bool(v.muted, `${path}.muted`),
517
- fadeInCurve: oneOf(v.fadeInCurve, _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
518
- fadeOutCurve: oneOf(v.fadeOutCurve, _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
517
+ fadeInCurve: oneOf(v.fadeInCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeInCurve`),
518
+ fadeOutCurve: oneOf(v.fadeOutCurve, _chunkZBCT5MEAcjs.VIDEO_FADE_CURVES, `${path}.fadeOutCurve`)
519
519
  });
520
520
  }
521
521
  if (type === "text")
@@ -530,7 +530,7 @@ function parseVideoClip(v, path = "clip") {
530
530
  background: str(v.background, `${path}.background`, true)
531
531
  });
532
532
  if (type === "adjustment") {
533
- const scope = oneOf(v.scope, _chunkXNZFVYC2cjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
533
+ const scope = oneOf(v.scope, _chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES, `${path}.scope`);
534
534
  const targetTrack = str(v.targetTrack, `${path}.targetTrack`, true);
535
535
  if (scope === "track" && !targetTrack) fail(`${path}.targetTrack`, 'is required when scope is "track": the id of the track whose pictures the adjustment changes');
536
536
  if (targetTrack !== void 0 && scope !== "track") fail(`${path}.targetTrack`, 'is only for scope "track"');
@@ -633,9 +633,9 @@ function createVideoProject(options = {}) {
633
633
  // src/video-editor/check.ts
634
634
  function videoClipKeyframes(clip) {
635
635
  const out = [
636
- { property: "opacity", keys: _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, clip.opacity) },
637
- { property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, clip.volume) : [] },
638
- ..._chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
636
+ { property: "opacity", keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.opacity) },
637
+ { property: "volume", keys: clip.type === "media" || clip.type === "sequence" ? _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, clip.volume) : [] },
638
+ ..._chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => ({ property: p, keys: _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _2 => _2.transform, 'optionalAccess', _3 => _3[p]])) }))
639
639
  ];
640
640
  return out.filter((o) => o.keys.length);
641
641
  }
@@ -664,8 +664,8 @@ var VIDEO_ISSUE_CODES = [
664
664
  var videoIssueKey = (i) => [i.code, _nullishCoalesce(i.sequence, () => ( "")), _nullishCoalesce(i.track, () => ( "")), _nullishCoalesce(i.clip, () => ( "")), _nullishCoalesce(i.asset, () => ( "")), _nullishCoalesce(i.marker, () => ( ""))].join("|");
665
665
  function checkVideoProject(project) {
666
666
  const issues = [];
667
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, project);
668
- const sequences = _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, project);
667
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
668
+ const sequences = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, project);
669
669
  const used = /* @__PURE__ */ new Set();
670
670
  const usedSequences = /* @__PURE__ */ new Set();
671
671
  const cycles = /* @__PURE__ */ new Map();
@@ -673,7 +673,7 @@ function checkVideoProject(project) {
673
673
  if ((asset.kind === "video" || asset.kind === "audio") && asset.duration === void 0)
674
674
  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.` });
675
675
  const checkTrack = (track, sequence) => {
676
- const clips = _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track);
676
+ const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
677
677
  const where = sequence ? ` in sequence "${sequence}"` : "";
678
678
  for (let i = 0; i < clips.length; i++) {
679
679
  const clip = clips[i];
@@ -683,13 +683,13 @@ function checkVideoProject(project) {
683
683
  const seq = sequences.get(clip.sequence);
684
684
  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.` });
685
685
  else {
686
- if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkXNZFVYC2cjs.findVideoSequenceCycle.call(void 0, project, seq.id));
686
+ if (!cycles.has(seq.id)) cycles.set(seq.id, _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, seq.id));
687
687
  const cycle = cycles.get(seq.id);
688
688
  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.` });
689
- const length = _chunkXNZFVYC2cjs.videoSequenceDuration.call(void 0, seq);
690
- const range = _chunkXNZFVYC2cjs.videoClipSourceRange.call(void 0, clip);
691
- if (range.out > length + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
692
- issues.push({ code: "source-overrun", severity: "error", ...at, message: `Compound clip "${clip.id}" plays to ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, range.out)} of sequence "${seq.id}", which is only ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, length)} long; shorten the clip or move its in point.` });
689
+ const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq);
690
+ const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
691
+ if (range.out > length + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
692
+ 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.` });
693
693
  }
694
694
  } else if (clip.type === "media") {
695
695
  used.add(clip.asset);
@@ -698,32 +698,32 @@ function checkVideoProject(project) {
698
698
  else {
699
699
  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.` });
700
700
  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.` });
701
- const range = _chunkXNZFVYC2cjs.videoClipSourceRange.call(void 0, clip);
702
- if (asset.duration !== void 0 && range.out > asset.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
703
- issues.push({ code: "source-overrun", severity: "error", ...at, message: `Clip "${clip.id}" plays to ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, range.out)} of "${asset.id}", which is only ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, asset.duration)} long; shorten the clip or move its in point.` });
701
+ const range = _chunkZBCT5MEAcjs.videoClipSourceRange.call(void 0, clip);
702
+ if (asset.duration !== void 0 && range.out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
703
+ 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.` });
704
704
  }
705
705
  } 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.` });
706
706
  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))
707
707
  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.` });
708
708
  const next = clips[i + 1];
709
- if (next && next.start < _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip) - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
710
- issues.push({ code: "overlap", severity: "error", ...at, message: `Clips "${clip.id}" and "${next.id}" overlap on track "${track.id}"${where} from ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, next.start)}; move one of them.` });
711
- if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
709
+ if (next && next.start < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
710
+ 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.` });
711
+ if ((_nullishCoalesce(clip.fadeIn, () => ( 0))) + (_nullishCoalesce(clip.fadeOut, () => ( 0))) > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
712
712
  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.` });
713
- const anim = (clip.animateIn ? _nullishCoalesce(clip.animateIn.duration, () => ( _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0) + (clip.animateOut ? _nullishCoalesce(clip.animateOut.duration, () => ( _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_DURATION)) : 0);
714
- if (anim > clip.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
713
+ 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);
714
+ if (anim > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
715
715
  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.` });
716
716
  for (const which of ["animateIn", "animateOut"]) {
717
717
  const a = clip[which];
718
718
  if (!a) continue;
719
- const keyed = _chunkXNZFVYC2cjs.videoClipAnimationProperties.call(void 0, a).filter((p) => _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, p === "opacity" ? clip.opacity : _optionalChain([clip, 'access', _7 => _7.transform, 'optionalAccess', _8 => _8[p]])).length);
719
+ 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);
720
720
  if (keyed.length)
721
721
  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.` });
722
722
  }
723
723
  if (clip.camera) {
724
- const last = Math.max(0, ..._chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, _optionalChain([clip, 'access', _9 => _9.transform, 'optionalAccess', _10 => _10[p]])).map((k) => k.t)));
724
+ 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)));
725
725
  const frame = 1e3 / (project.fps || 30);
726
- if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
726
+ if (last > 0 && Math.abs(last - clip.duration) > frame + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
727
727
  issues.push({
728
728
  code: "camera-stale",
729
729
  severity: "warning",
@@ -732,7 +732,7 @@ function checkVideoProject(project) {
732
732
  });
733
733
  }
734
734
  for (const { property, keys } of videoClipKeyframes(clip)) {
735
- const outside = keys.filter((k) => k.t < -_chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON);
735
+ const outside = keys.filter((k) => k.t < -_chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || k.t > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
736
736
  if (outside.length)
737
737
  issues.push({
738
738
  code: "keyframes-outside-clip",
@@ -743,20 +743,20 @@ function checkVideoProject(project) {
743
743
  }
744
744
  if (clip.transition) {
745
745
  const d = clip.transition.duration;
746
- const before = _chunkXNZFVYC2cjs.videoClipBefore.call(void 0, track, clip);
746
+ const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
747
747
  if (!before) {
748
748
  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.` });
749
749
  continue;
750
750
  }
751
- if (d > clip.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) {
751
+ if (d > clip.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || d > before.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
752
752
  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.` });
753
753
  continue;
754
754
  }
755
755
  if (clip.transition.type === "dip") continue;
756
- const outgoing = _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, before, assets, sequences).after;
757
- const incoming = _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
756
+ const outgoing = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, before, assets, sequences).after;
757
+ const incoming = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, assets, sequences).before;
758
758
  const half = d / 2;
759
- if (outgoing < half - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON || incoming < half - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) {
759
+ if (outgoing < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || incoming < half - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
760
760
  const fits = 2 * Math.min(outgoing, incoming);
761
761
  issues.push({
762
762
  code: "transition-handles",
@@ -773,9 +773,9 @@ function checkVideoProject(project) {
773
773
  for (const sequence of _nullishCoalesce(project.sequences, () => ( [])))
774
774
  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.` });
775
775
  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.` });
776
- const end = _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, project);
776
+ const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project);
777
777
  for (const marker of _nullishCoalesce(project.markers, () => ( [])))
778
- if (marker.time > end + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) issues.push({ code: "marker-past-end", severity: "note", marker: marker.id, message: `Marker "${marker.id}" at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, marker.time)} is past the end (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, end)}).` });
778
+ 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)}).` });
779
779
  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." });
780
780
  const rank = { error: 0, warning: 1, note: 2 };
781
781
  return issues.sort((a, b) => rank[a.severity] - rank[b.severity]);
@@ -829,7 +829,7 @@ function mergeSpans(spans) {
829
829
  const out = [];
830
830
  for (const [from, to] of [...spans].sort((a, b) => a[0] - b[0])) {
831
831
  const last = out[out.length - 1];
832
- if (last && from <= last[1] + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
832
+ if (last && from <= last[1] + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last[1] = Math.max(last[1], to);
833
833
  else out.push([from, to]);
834
834
  }
835
835
  return out;
@@ -843,13 +843,13 @@ function clipAnimatables(clip) {
843
843
  // A speed ramp is keys in clip time too, so trims and splits keep it on the same frames of source.
844
844
  { get: () => c.timeRemap, set: (v) => c.timeRemap = v }
845
845
  ];
846
- for (const p of _chunkXNZFVYC2cjs.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
+ 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) });
847
847
  return out;
848
848
  }
849
849
  function retimeClipKeys(clip, fn) {
850
850
  for (const a of clipAnimatables(clip)) {
851
851
  const v = a.get();
852
- if (_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
852
+ if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) a.set(fn(v));
853
853
  }
854
854
  }
855
855
  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"];
@@ -866,8 +866,8 @@ var Editor = (_class = class {
866
866
  return t;
867
867
  }
868
868
  clip(id) {
869
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.p, id);
870
- const nested = at ? null : _chunkXNZFVYC2cjs.findVideoSequenceClip.call(void 0, this.p, id);
869
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.p, id);
870
+ const nested = at ? null : _chunkZBCT5MEAcjs.findVideoSequenceClip.call(void 0, this.p, id);
871
871
  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).`);
872
872
  if (!at) {
873
873
  const ids = this.p.tracks.flatMap((t) => t.clips.map((c) => c.id));
@@ -884,16 +884,16 @@ var Editor = (_class = class {
884
884
  return a;
885
885
  }
886
886
  fits(track, start, duration, ignore, what) {
887
- const hit = _chunkXNZFVYC2cjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
887
+ const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, track, start, start + duration, ignore);
888
888
  if (hit) {
889
- const free = _chunkXNZFVYC2cjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
890
- refuse(`${what} at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, start)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, start + duration)} would overlap clip "${hit.id}" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, hit))}) on track "${track.id}"; the next free place is ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, free)}, or use mode "insert" to push later clips along or "overwrite" to replace what is there.`);
889
+ const free = _chunkZBCT5MEAcjs.nextFreeVideoSlot.call(void 0, track, start, duration, ignore);
890
+ 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.`);
891
891
  }
892
892
  }
893
893
  /** An adjustment clip's target track must exist. */
894
894
  adjustmentTarget(clip) {
895
895
  if (clip.type !== "adjustment" || clip.targetTrack === void 0) return;
896
- const ids = _chunkXNZFVYC2cjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
896
+ const ids = _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, this.p).map(({ track }) => track.id);
897
897
  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(", ")}.`);
898
898
  }
899
899
  kindFits(track, clip) {
@@ -909,14 +909,14 @@ var Editor = (_class = class {
909
909
  /** Moves every clip on `track` starting at or after `from` by `delta`. */
910
910
  shift(track, from, delta, except = /* @__PURE__ */ new Set()) {
911
911
  if (!delta) return;
912
- for (const c of track.clips) if (!except.has(c.id) && c.start >= from - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) c.start = Math.max(0, c.start + delta);
912
+ 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);
913
913
  track.clips.sort((a, b) => a.start - b.start);
914
914
  }
915
915
  get frame() {
916
916
  return 1e3 / this.p.fps;
917
917
  }
918
918
  ids() {
919
- return _chunkXNZFVYC2cjs.allVideoClipIds.call(void 0, this.p);
919
+ return _chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, this.p);
920
920
  }
921
921
  /**
922
922
  * The tracks a ripple on `sources` moves, top to bottom: the sources, and every unlocked
@@ -924,8 +924,8 @@ var Editor = (_class = class {
924
924
  */
925
925
  rippleTracks(sources) {
926
926
  const set = new Set(sources);
927
- if ([...set].some(_chunkXNZFVYC2cjs.videoTrackSyncLocked)) {
928
- for (const t of this.p.tracks) if (_chunkXNZFVYC2cjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
927
+ if ([...set].some(_chunkZBCT5MEAcjs.videoTrackSyncLocked)) {
928
+ for (const t of this.p.tracks) if (_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t) && !t.locked) set.add(t);
929
929
  }
930
930
  return this.p.tracks.filter((t) => set.has(t));
931
931
  }
@@ -942,7 +942,7 @@ var Editor = (_class = class {
942
942
  return open;
943
943
  }
944
944
  range(from, to) {
945
- if (!(to - from > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)) refuse(`"to" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, to)}) must be after "from" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, from)}).`);
945
+ 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)}).`);
946
946
  }
947
947
  /** Moves a media or compound clip's in point by `delta` of timeline time (stills, titles and colours have none). */
948
948
  moveIn(clip, delta) {
@@ -951,18 +951,18 @@ var Editor = (_class = class {
951
951
  if (clip.in < 1e-9) delete clip.in;
952
952
  return;
953
953
  }
954
- if (clip.type !== "media" || _optionalChain([_chunkXNZFVYC2cjs.videoAssetMap.call(void 0, this.p), 'access', _14 => _14.get, 'call', _15 => _15(clip.asset), 'optionalAccess', _16 => _16.kind]) === "image") return;
955
- clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkXNZFVYC2cjs.videoClipSpeed.call(void 0, clip));
954
+ 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;
955
+ clip.in = Math.max(0, (_nullishCoalesce(clip.in, () => ( 0))) + delta * _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip));
956
956
  if (clip.in < 1e-9) delete clip.in;
957
957
  }
958
958
  /** Moves a clip's head `delta` later in time (start, in point and keys); the caller sets start and duration. */
959
959
  trimHead(clip, delta) {
960
960
  if (!isRamped(clip)) this.moveIn(clip, delta);
961
- retimeClipKeys(clip, (v) => _chunkXNZFVYC2cjs.retimeVideoAnimatable.call(void 0, v, -delta));
961
+ retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
962
962
  }
963
963
  /** Cuts `clip` at `at` (inside it): the left part keeps the id, the right part is returned. */
964
964
  cut(track, clip, at, id) {
965
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip);
965
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
966
966
  const right = { ...structuredClone(clip), id: _nullishCoalesce(id, () => ( freshId(`${clip.id}-`, this.ids()))), start: at, duration: end - at };
967
967
  delete right.transition;
968
968
  delete right.fadeIn;
@@ -970,9 +970,9 @@ var Editor = (_class = class {
970
970
  delete right.animateIn;
971
971
  const leftValues = clipAnimatables(clip);
972
972
  clipAnimatables(right).forEach((r, i) => {
973
- const [l, rr] = _chunkXNZFVYC2cjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
974
- if (_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
975
- if (_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
973
+ const [l, rr] = _chunkZBCT5MEAcjs.splitVideoAnimatable.call(void 0, leftValues[i].get(), at - clip.start);
974
+ if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, l)) leftValues[i].set(l);
975
+ if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, rr)) r.set(rr);
976
976
  });
977
977
  if (!isRamped(right)) this.moveIn(right, at - clip.start);
978
978
  clip.duration = at - clip.start;
@@ -986,7 +986,7 @@ var Editor = (_class = class {
986
986
  /** Cuts every clip on `tracks` that runs across `at`; returns the new right-hand parts. */
987
987
  cutAcross(tracks, at) {
988
988
  const made = [];
989
- for (const t of tracks) for (const c of [...t.clips]) if (c.start < at - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON && _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) > at + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) made.push(this.cut(t, c, at));
989
+ 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));
990
990
  return made;
991
991
  }
992
992
  /**
@@ -1004,10 +1004,10 @@ var Editor = (_class = class {
1004
1004
  */
1005
1005
  close(tracks, from, to) {
1006
1006
  for (const t of tracks) {
1007
- const hit = _chunkXNZFVYC2cjs.videoOverlap.call(void 0, t, from, to);
1007
+ const hit = _chunkZBCT5MEAcjs.videoOverlap.call(void 0, t, from, to);
1008
1008
  if (hit)
1009
1009
  refuse(
1010
- `Rippling out ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, from)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, to)} would pull track "${t.id}" out of sync: clip "${hit.id}" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, hit.start)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, _chunkXNZFVYC2cjs.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
+ `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.`
1011
1011
  );
1012
1012
  }
1013
1013
  for (const t of tracks) this.shift(t, to, from - to);
@@ -1019,10 +1019,10 @@ var Editor = (_class = class {
1019
1019
  clear(track, from, to, report) {
1020
1020
  for (const c of [...track.clips]) {
1021
1021
  const start = c.start;
1022
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c);
1023
- if (end <= from + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON || start >= to - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) continue;
1024
- const coversHead = start >= from - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON;
1025
- const coversTail = end <= to + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON;
1022
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c);
1023
+ if (end <= from + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON || start >= to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
1024
+ const coversHead = start >= from - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
1025
+ const coversTail = end <= to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON;
1026
1026
  if (coversHead && coversTail) {
1027
1027
  track.clips = track.clips.filter((x) => x !== c);
1028
1028
  report.removed.push(c.id);
@@ -1045,8 +1045,8 @@ var Editor = (_class = class {
1045
1045
  /** Clamps a slip, roll or slide to `[lo, hi]`, refusing when it cannot move that way at all. */
1046
1046
  clamp(delta, lo, hi, why) {
1047
1047
  const applied = Math.min(Math.max(delta, Math.min(0, lo)), Math.max(0, hi));
1048
- if (Math.abs(delta) > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(why());
1049
- return Math.abs(applied) <= _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON ? 0 : applied;
1048
+ if (Math.abs(delta) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) refuse(why());
1049
+ return Math.abs(applied) <= _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON ? 0 : applied;
1050
1050
  }
1051
1051
  /** Places a clip on a track by `mode`, returning what it cut, trimmed, removed and rippled. */
1052
1052
  place(track, clip, mode, outcome) {
@@ -1056,14 +1056,14 @@ var Editor = (_class = class {
1056
1056
  outcome.rippled = tracks.map((t) => t.id);
1057
1057
  } else if (mode === "overwrite") {
1058
1058
  const report = { removed: [], trimmed: [], created: [] };
1059
- this.clear(track, clip.start, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip), report);
1059
+ this.clear(track, clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), report);
1060
1060
  Object.assign(outcome, report);
1061
1061
  } else this.fits(track, clip.start, clip.duration, /* @__PURE__ */ new Set([clip.id]), `Clip "${clip.id}"`);
1062
1062
  track.clips.push(clip);
1063
1063
  track.clips.sort((a, b) => a.start - b.start);
1064
1064
  }
1065
1065
  placement(mode, ripple) {
1066
- if (mode !== void 0 && !_chunkXNZFVYC2cjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkXNZFVYC2cjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
1066
+ if (mode !== void 0 && !_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.includes(mode)) refuse(`"mode" must be ${_chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES.map((m) => `"${m}"`).join(", ")}.`);
1067
1067
  if (ripple && mode !== void 0 && mode !== "insert") refuse(`"ripple" means mode "insert", so it cannot go with mode "${mode}"; pass one or the other.`);
1068
1068
  return _nullishCoalesce(mode, () => ( (ripple ? "insert" : "refuse")));
1069
1069
  }
@@ -1100,7 +1100,7 @@ var Editor = (_class = class {
1100
1100
  }
1101
1101
  case "remove_asset": {
1102
1102
  const asset = this.asset(e.asset);
1103
- const users = _chunkXNZFVYC2cjs.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
+ 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));
1104
1104
  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.`);
1105
1105
  this.p.assets = this.p.assets.filter((a) => a !== asset);
1106
1106
  return this.outcomes.push({ op: e.op, asset: asset.id });
@@ -1153,12 +1153,12 @@ var Editor = (_class = class {
1153
1153
  else draft.duration = (asset.duration - (_nullishCoalesce(draft.in, () => ( 0)))) / (_nullishCoalesce(draft.speed, () => ( 1)));
1154
1154
  if (!(draft.duration > 0)) refuse(`"in" (${draft.in} ms) is at or past the end of "${asset.id}" (${asset.duration} ms).`);
1155
1155
  } else if (draft.type === "sequence") {
1156
- const length = _chunkXNZFVYC2cjs.videoSequenceDuration.call(void 0, _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
1156
+ const length = _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(draft.sequence)) - (_nullishCoalesce(draft.in, () => ( 0)));
1157
1157
  if (!(length > 0)) refuse(`"in" (${_nullishCoalesce(draft.in, () => ( 0))} ms) is at or past the end of sequence "${draft.sequence}".`);
1158
1158
  draft.duration = length;
1159
1159
  } else draft.duration = VIDEO_DEFAULT_TITLE_DURATION;
1160
1160
  }
1161
- const end = _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c)), 0);
1161
+ const end = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track).reduce((m, c) => Math.max(m, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c)), 0);
1162
1162
  draft.start ??= end;
1163
1163
  const clip = parseVideoClip(draft, "clip");
1164
1164
  this.adjustmentTarget(clip);
@@ -1184,20 +1184,20 @@ var Editor = (_class = class {
1184
1184
  case "trim_clip": {
1185
1185
  const { track, clip } = this.clip(e.clip);
1186
1186
  this.unlocked(track);
1187
- const speed = _chunkXNZFVYC2cjs.videoClipSpeed.call(void 0, clip);
1188
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip);
1187
+ const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
1188
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1189
1189
  const minimum = 1e3 / this.p.fps;
1190
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, this.p);
1190
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1191
1191
  if (e.edge === "start") {
1192
1192
  const delta = e.to - clip.start;
1193
- if (clip.duration - delta < minimum - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(`Trimming the start to ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it ends at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, end)}.`);
1193
+ 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)}.`);
1194
1194
  if (clip.type === "media" && !isRamped(clip) || clip.type === "sequence") {
1195
1195
  const sourceIn = (_nullishCoalesce(clip.in, () => ( 0))) + delta * speed;
1196
- if (sourceIn < -_chunkXNZFVYC2cjs.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 ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, clip.start - (_nullishCoalesce(clip.in, () => ( 0))) / speed)}).`);
1196
+ 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)}).`);
1197
1197
  clip.in = Math.max(0, sourceIn);
1198
1198
  if (clip.in === 0) delete clip.in;
1199
1199
  }
1200
- retimeClipKeys(clip, (v) => _chunkXNZFVYC2cjs.retimeVideoAnimatable.call(void 0, v, -delta));
1200
+ retimeClipKeys(clip, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, -delta));
1201
1201
  if (e.ripple) {
1202
1202
  const tracks = this.rippleTracks([track]);
1203
1203
  if (delta > 0) {
@@ -1218,17 +1218,17 @@ var Editor = (_class = class {
1218
1218
  }
1219
1219
  } else {
1220
1220
  const duration = e.to - clip.start;
1221
- if (duration < minimum - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(`Trimming the end to ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, e.to)} would leave "${clip.id}" shorter than a frame; it starts at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, clip.start)}.`);
1221
+ 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)}.`);
1222
1222
  if (clip.type === "media" && !isRamped(clip)) {
1223
1223
  const asset = assets.get(clip.asset);
1224
1224
  const out = (_nullishCoalesce(clip.in, () => ( 0))) + duration * speed;
1225
- if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
1226
- refuse(`"${clip.id}" can end at most at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, clip.start + (asset.duration - (_nullishCoalesce(clip.in, () => ( 0)))) / speed)}, where "${asset.id}" runs out.`);
1225
+ if (_optionalChain([asset, 'optionalAccess', _17 => _17.duration]) !== void 0 && out > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1226
+ 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.`);
1227
1227
  }
1228
1228
  if (clip.type === "sequence") {
1229
- const seq = _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
1230
- const length = seq ? _chunkXNZFVYC2cjs.videoSequenceDuration.call(void 0, seq) : Infinity;
1231
- if ((_nullishCoalesce(clip.in, () => ( 0))) + duration > length + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(`"${clip.id}" can end at most at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, clip.start + length - (_nullishCoalesce(clip.in, () => ( 0))))}, where sequence "${clip.sequence}" ends.`);
1229
+ const seq = _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p).get(clip.sequence);
1230
+ const length = seq ? _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, seq) : Infinity;
1231
+ 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.`);
1232
1232
  }
1233
1233
  if (e.ripple) {
1234
1234
  const tracks = this.rippleTracks([track]);
@@ -1250,9 +1250,9 @@ var Editor = (_class = class {
1250
1250
  case "split_clip": {
1251
1251
  const { track, clip } = this.clip(e.clip);
1252
1252
  this.unlocked(track);
1253
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip);
1253
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1254
1254
  const minimum = 1e3 / this.p.fps;
1255
- if (e.at < clip.start + minimum - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON || e.at > end - minimum + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(`${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, e.at)} is not inside "${clip.id}" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, clip.start)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, end)}), at least a frame from either end.`);
1255
+ 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.`);
1256
1256
  if (e.id !== void 0 && this.ids().includes(e.id)) refuse(`There is already a clip "${e.id}".`);
1257
1257
  const right = this.cut(track, clip, e.at, e.id);
1258
1258
  return this.outcomes.push({ op: e.op, clips: [clip.id, right.id], clip: right.id, track: track.id });
@@ -1263,12 +1263,12 @@ var Editor = (_class = class {
1263
1263
  for (const track of new Set(found.map((f) => f.track))) track.clips = track.clips.filter((c) => !found.some((f) => f.clip === c));
1264
1264
  if (!e.ripple) return this.outcomes.push({ op: e.op, clips: found.map((f) => f.clip.id) });
1265
1265
  const rippled = /* @__PURE__ */ new Set();
1266
- const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkXNZFVYC2cjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
1267
- if (found.some((f) => _chunkXNZFVYC2cjs.videoTrackSyncLocked.call(void 0, f.track))) groups.push(found.filter((f) => _chunkXNZFVYC2cjs.videoTrackSyncLocked.call(void 0, f.track)).map((f) => f.track));
1266
+ const groups = [...new Set(found.map((f) => f.track))].filter((t) => !_chunkZBCT5MEAcjs.videoTrackSyncLocked.call(void 0, t)).map((t) => [t]);
1267
+ 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));
1268
1268
  for (const sources of groups) {
1269
1269
  const tracks = this.rippleTracks(sources);
1270
1270
  tracks.forEach((t) => rippled.add(t));
1271
- const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, f.clip)]));
1271
+ const spans = mergeSpans(found.filter((f) => sources.includes(f.track)).map((f) => [f.clip.start, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, f.clip)]));
1272
1272
  for (const [from, to] of spans.reverse()) this.close(tracks, from, to);
1273
1273
  }
1274
1274
  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) });
@@ -1284,7 +1284,7 @@ var Editor = (_class = class {
1284
1284
  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.");
1285
1285
  let stretch = 1;
1286
1286
  if (at.clip.type === "media" && !("duration" in set)) {
1287
- const was = _chunkXNZFVYC2cjs.videoClipSpeed.call(void 0, at.clip);
1287
+ const was = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, at.clip);
1288
1288
  const now = "speed" in set ? set.speed : _optionalChain([e, 'access', _18 => _18.remove, 'optionalAccess', _19 => _19.includes, 'call', _20 => _20("speed")]) ? 1 : was;
1289
1289
  if (now !== was) {
1290
1290
  set.duration = at.clip.duration * was / now;
@@ -1292,7 +1292,7 @@ var Editor = (_class = class {
1292
1292
  }
1293
1293
  }
1294
1294
  const next = { ...structuredClone(at.clip), ...set };
1295
- if (stretch !== 1) retimeClipKeys(next, (v) => _chunkXNZFVYC2cjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
1295
+ if (stretch !== 1) retimeClipKeys(next, (v) => _chunkZBCT5MEAcjs.retimeVideoAnimatable.call(void 0, v, 0, stretch));
1296
1296
  for (const k of _nullishCoalesce(e.remove, () => ( []))) delete next[k];
1297
1297
  const clip = parseVideoClip(next, "set");
1298
1298
  this.adjustmentTarget(clip);
@@ -1306,17 +1306,17 @@ var Editor = (_class = class {
1306
1306
  const { track, clip } = this.clip(e.clip);
1307
1307
  this.unlocked(track);
1308
1308
  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.`);
1309
- if (clip.type !== "media") refuse(`Clip "${clip.id}" is a ${_chunkXNZFVYC2cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to ramp; only video and audio clips change speed.`);
1309
+ 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.`);
1310
1310
  const asset = this.asset(clip.asset);
1311
1311
  if (asset.kind === "image") refuse(`Clip "${clip.id}" is a still ("${asset.id}"), so it has no motion to ramp.`);
1312
1312
  const media = clip;
1313
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, media);
1313
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, media);
1314
1314
  const duration = _nullishCoalesce(e.duration, () => ( media.duration));
1315
- if (!(duration >= 1e3 / this.p.fps - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)) refuse(`"duration" must be at least a frame (${Math.ceil(1e3 / this.p.fps)} ms).`);
1315
+ 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).`);
1316
1316
  if (e.keys === null) {
1317
1317
  if (!media.timeRemap) refuse(`Clip "${clip.id}" has no speed ramp to remove.`);
1318
1318
  const from = (_nullishCoalesce(media.in, () => ( 0))) + media.timeRemap.keys[0].v;
1319
- if (asset.duration !== void 0 && from + duration > asset.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
1319
+ if (asset.duration !== void 0 && from + duration > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1320
1320
  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.`);
1321
1321
  delete media.timeRemap;
1322
1322
  media.in = from;
@@ -1324,17 +1324,17 @@ var Editor = (_class = class {
1324
1324
  } else {
1325
1325
  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).');
1326
1326
  const remap = parseVideoTimeRemap({ keys: e.keys }, void 0, "keys");
1327
- remap.keys = _chunkXNZFVYC2cjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
1328
- _chunkXNZFVYC2cjs.checkVideoTimeRemap.call(void 0, remap, "keys");
1329
- const span = _chunkXNZFVYC2cjs.videoTimeRemapSpan.call(void 0, remap);
1330
- if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON)
1327
+ remap.keys = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, remap.keys, { jumps: false });
1328
+ _chunkZBCT5MEAcjs.checkVideoTimeRemap.call(void 0, remap, "keys");
1329
+ const span = _chunkZBCT5MEAcjs.videoTimeRemapSpan.call(void 0, remap);
1330
+ if (asset.duration !== void 0 && (_nullishCoalesce(media.in, () => ( 0))) + span.to > asset.duration + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON)
1331
1331
  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.`);
1332
1332
  media.timeRemap = remap;
1333
1333
  delete media.speed;
1334
1334
  }
1335
1335
  const newEnd = media.start + duration;
1336
1336
  const outcome = { op: e.op, clip: clip.id, track: track.id };
1337
- if (Math.abs(newEnd - end) > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) {
1337
+ if (Math.abs(newEnd - end) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1338
1338
  if (e.ripple) {
1339
1339
  const tracks = this.rippleTracks([track]);
1340
1340
  if (newEnd < end) {
@@ -1363,11 +1363,11 @@ var Editor = (_class = class {
1363
1363
  case "slip_clip": {
1364
1364
  const { track, clip } = this.clip(e.clip);
1365
1365
  this.unlocked(track);
1366
- if (clip.type !== "media" && clip.type !== "sequence") refuse(`Clip "${clip.id}" is a ${_chunkXNZFVYC2cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to slip; only video, audio and compound clips slip.`);
1366
+ 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.`);
1367
1367
  const source = clip.type === "sequence" ? `sequence "${clip.sequence}"` : `"${this.asset(clip.asset).id}"`;
1368
1368
  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.`);
1369
- const handles = _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, clip, _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, this.p), _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p));
1370
- const { lead, tail } = _chunkXNZFVYC2cjs.videoClipOverhang.call(void 0, track, clip);
1369
+ const handles = _chunkZBCT5MEAcjs.videoClipHandles.call(void 0, clip, _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p), _chunkZBCT5MEAcjs.videoSequenceMap.call(void 0, this.p));
1370
+ const { lead, tail } = _chunkZBCT5MEAcjs.videoClipOverhang.call(void 0, track, clip);
1371
1371
  const delta = this.clamp(
1372
1372
  e.delta,
1373
1373
  lead - handles.before,
@@ -1385,13 +1385,13 @@ var Editor = (_class = class {
1385
1385
  this.unlocked(track);
1386
1386
  const L = left.clip;
1387
1387
  const R = right.clip;
1388
- if (Math.abs(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, L) - R.start) > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) {
1389
- if (Math.abs(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, R) - L.start) <= _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) refuse(`"${R.id}" comes before "${L.id}"; pass left "${R.id}" and right "${L.id}".`);
1390
- refuse(`"${L.id}" ends at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, L))} but "${R.id}" starts at ${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, R.start)}; a roll needs two clips that meet at a cut (use trim_clip to move one edge).`);
1388
+ if (Math.abs(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, L) - R.start) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1389
+ 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}".`);
1390
+ 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).`);
1391
1391
  }
1392
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, this.p);
1393
- const lo = Math.max(-(L.duration - this.frame), -(_chunkXNZFVYC2cjs.videoClipHandles.call(void 0, R, assets, _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p)).before - _chunkXNZFVYC2cjs.videoClipOverhang.call(void 0, track, R).lead));
1394
- const hi = Math.min(R.duration - this.frame, _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, L, assets, _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p)).after - _chunkXNZFVYC2cjs.videoClipOverhang.call(void 0, track, L).tail);
1392
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1393
+ 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));
1394
+ 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);
1395
1395
  const delta = this.clamp(
1396
1396
  e.delta,
1397
1397
  lo,
@@ -1407,18 +1407,18 @@ var Editor = (_class = class {
1407
1407
  case "slide_clip": {
1408
1408
  const { track, clip } = this.clip(e.clip);
1409
1409
  this.unlocked(track);
1410
- const before = _chunkXNZFVYC2cjs.videoClipBefore.call(void 0, track, clip);
1411
- const after = _chunkXNZFVYC2cjs.videoClipAfter.call(void 0, track, clip);
1410
+ const before = _chunkZBCT5MEAcjs.videoClipBefore.call(void 0, track, clip);
1411
+ const after = _chunkZBCT5MEAcjs.videoClipAfter.call(void 0, track, clip);
1412
1412
  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.`);
1413
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, this.p);
1414
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip);
1413
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, this.p);
1414
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1415
1415
  const others = track.clips.filter((c) => c !== clip);
1416
1416
  const room = {
1417
- earlier: before ? before.duration - this.frame : clip.start - others.filter((c) => _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) <= clip.start + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.max(m, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c)), 0),
1418
- later: after ? after.duration - this.frame : others.filter((c) => c.start >= end - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON).reduce((m, c) => Math.min(m, c.start - end), Infinity)
1417
+ 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),
1418
+ 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)
1419
1419
  };
1420
- const lo = -Math.min(room.earlier, after ? _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, after, assets, _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p)).before - _chunkXNZFVYC2cjs.videoClipOverhang.call(void 0, track, after).lead : Infinity);
1421
- const hi = Math.min(room.later, before ? _chunkXNZFVYC2cjs.videoClipHandles.call(void 0, before, assets, _chunkXNZFVYC2cjs.videoSequenceMap.call(void 0, this.p)).after - _chunkXNZFVYC2cjs.videoClipOverhang.call(void 0, track, before).tail : Infinity);
1420
+ 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);
1421
+ 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);
1422
1422
  const delta = this.clamp(
1423
1423
  e.delta,
1424
1424
  lo,
@@ -1451,29 +1451,29 @@ var Editor = (_class = class {
1451
1451
  }
1452
1452
  case "split_at": {
1453
1453
  const tracks = this.rangeTracks(e.tracks);
1454
- const lefts = tracks.flatMap((t) => t.clips.filter((c) => c.start < e.at - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON && _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) > e.at + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON).map((c) => c.id));
1455
- if (!lefts.length) refuse(`No clip runs across ${_chunkXNZFVYC2cjs.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.`);
1454
+ 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));
1455
+ 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.`);
1456
1456
  const created = this.cutAcross(tracks, e.at).map((c) => c.id);
1457
1457
  return this.outcomes.push({ op: e.op, clips: lefts, created });
1458
1458
  }
1459
1459
  case "set_keyframes": {
1460
1460
  const { track, clip } = this.clip(e.clip);
1461
1461
  this.unlocked(track);
1462
- if (!_chunkXNZFVYC2cjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkXNZFVYC2cjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
1462
+ if (!_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.includes(e.property)) refuse(`"${e.property}" cannot be keyframed; use one of ${_chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES.join(", ")}.`);
1463
1463
  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.`);
1464
- const limits = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS[e.property];
1465
- const transform = _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
1464
+ const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[e.property];
1465
+ const transform = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(e.property);
1466
1466
  const c = clip;
1467
1467
  const current = transform ? _optionalChain([c, 'access', _23 => _23.transform, 'optionalAccess', _24 => _24[e.property]]) : c[e.property];
1468
1468
  let value;
1469
1469
  if (e.keys === null) {
1470
- const v = _chunkXNZFVYC2cjs.videoValueAt.call(void 0, current, 0, limits.default);
1471
- value = _chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
1470
+ const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, current, 0, limits.default);
1471
+ value = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, current) ? v === limits.default ? void 0 : v : current;
1472
1472
  } else {
1473
1473
  if (!Array.isArray(e.keys) || !e.keys.length) refuse('"keys" must list at least one key { t, v }; pass null to remove the keyframes.');
1474
1474
  let sorted = [];
1475
1475
  try {
1476
- sorted = _chunkXNZFVYC2cjs.sortVideoKeys.call(void 0, e.keys);
1476
+ sorted = _chunkZBCT5MEAcjs.sortVideoKeys.call(void 0, e.keys);
1477
1477
  } catch (error) {
1478
1478
  refuse(error.message);
1479
1479
  }
@@ -1492,12 +1492,12 @@ var Editor = (_class = class {
1492
1492
  this.unlocked(track);
1493
1493
  let at = 0;
1494
1494
  const moved = [];
1495
- for (const clip of _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track)) {
1496
- if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) {
1495
+ for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
1496
+ if (clip.start >= (_nullishCoalesce(e.from, () => ( 0))) - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON && clip.start > at + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) {
1497
1497
  clip.start = Math.max(at, _nullishCoalesce(e.from, () => ( 0)));
1498
1498
  moved.push(clip.id);
1499
1499
  }
1500
- at = Math.max(at, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip));
1500
+ at = Math.max(at, _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
1501
1501
  }
1502
1502
  return this.outcomes.push({ op: e.op, track: track.id, clips: moved });
1503
1503
  }
@@ -1627,7 +1627,7 @@ function videoTranscriptTrack(project, track) {
1627
1627
  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(", ")}.`);
1628
1628
  return track;
1629
1629
  }
1630
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, project);
1630
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
1631
1631
  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]));
1632
1632
  return _nullishCoalesce(_optionalChain([(_nullishCoalesce(project.tracks.find((t) => t.kind === "audio" && transcribed(t)), () => ( project.tracks.find(transcribed)))), 'optionalAccess', _30 => _30.id]), () => ( null));
1633
1633
  }
@@ -1635,16 +1635,16 @@ function videoTimelineTranscript(project, options = {}) {
1635
1635
  const id = videoTranscriptTrack(project, options.track);
1636
1636
  if (!id) return [];
1637
1637
  const track = project.tracks.find((t) => t.id === id);
1638
- const assets = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, project);
1638
+ const assets = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project);
1639
1639
  const out = [];
1640
- for (const clip of _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track)) {
1640
+ for (const clip of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
1641
1641
  if (clip.type !== "media") continue;
1642
1642
  const words = _optionalChain([assets, 'access', _31 => _31.get, 'call', _32 => _32(clip.asset), 'optionalAccess', _33 => _33.transcript]);
1643
1643
  if (!_optionalChain([words, 'optionalAccess', _34 => _34.length])) continue;
1644
- const speed = _chunkXNZFVYC2cjs.videoClipSpeed.call(void 0, clip);
1644
+ const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
1645
1645
  const from = _nullishCoalesce(clip.in, () => ( 0));
1646
1646
  const to = from + clip.duration * speed;
1647
- const toTimeline = (s) => Math.min(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
1647
+ const toTimeline = (s) => Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), Math.max(clip.start, clip.start + (s - from) / speed));
1648
1648
  words.forEach((w, index) => {
1649
1649
  const mid = (w.start + w.end) / 2;
1650
1650
  if (mid < from || mid >= to) return;
@@ -1689,19 +1689,19 @@ function findVideoTranscriptPauses(words, options = {}) {
1689
1689
  let to = b.start - keep;
1690
1690
  if (options.fps) {
1691
1691
  const f = 1e3 / options.fps;
1692
- from = _chunkXNZFVYC2cjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
1693
- to = _chunkXNZFVYC2cjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
1692
+ from = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.ceil(from / f - 1e-9) * f, options.fps);
1693
+ to = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, Math.floor(to / f + 1e-9) * f, options.fps);
1694
1694
  }
1695
- if (to - from > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
1695
+ if (to - from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) out.push({ from, to, text: `(pause after "${a.word}")` });
1696
1696
  }
1697
1697
  return out;
1698
1698
  }
1699
1699
  function mergeVideoRanges(ranges) {
1700
- const sorted = ranges.filter((r) => r.to - r.from > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON).map((r) => ({ from: r.from, to: r.to })).sort((a, b) => a.from - b.from);
1700
+ 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);
1701
1701
  const out = [];
1702
1702
  for (const r of sorted) {
1703
1703
  const last = out[out.length - 1];
1704
- if (last && r.from <= last.to + _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
1704
+ if (last && r.from <= last.to + _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) last.to = Math.max(last.to, r.to);
1705
1705
  else out.push(r);
1706
1706
  }
1707
1707
  return out;
@@ -1747,7 +1747,7 @@ function findVideoRepetitions(words, options = {}) {
1747
1747
  var VIDEO_DISFLUENCY_KINDS = ["filler", "pause", "repetition"];
1748
1748
  function detectVideoDisfluencies(words, options = {}) {
1749
1749
  const kinds = new Set(_nullishCoalesce(options.kinds, () => ( VIDEO_DISFLUENCY_KINDS)));
1750
- const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON));
1750
+ const startIndex = (time) => Math.max(0, words.findIndex((w) => w.start >= time - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON));
1751
1751
  const out = [];
1752
1752
  if (kinds.has("filler"))
1753
1753
  for (const r of findVideoFillers(words, options.fillers)) {
@@ -1761,13 +1761,13 @@ function detectVideoDisfluencies(words, options = {}) {
1761
1761
  }
1762
1762
  if (kinds.has("pause"))
1763
1763
  for (const r of findVideoTranscriptPauses(words, options.pauses)) {
1764
- const after = words.findIndex((w) => w.start >= r.to - _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON);
1764
+ const after = words.findIndex((w) => w.start >= r.to - _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
1765
1765
  out.push({ ...r, kind: "pause", words: [Math.max(0, after - 1), Math.max(0, after)] });
1766
1766
  }
1767
1767
  return out.sort((a, b) => a.from - b.from || a.to - b.to);
1768
1768
  }
1769
1769
  function videoCutsWithMargin(ranges, keep) {
1770
- return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON);
1770
+ return ranges.map((r) => ({ ...r, from: r.from + keep, to: r.to - keep })).filter((r) => r.to - r.from > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON);
1771
1771
  }
1772
1772
 
1773
1773
  // src/video-editor/mix.ts
@@ -1873,7 +1873,7 @@ function videoDuckingKeys(clip, speech, options = {}) {
1873
1873
  const gap = Math.max(_nullishCoalesce(options.mergeGap, () => ( 600)), attack + release);
1874
1874
  const base = _nullishCoalesce(options.base, () => ( 1));
1875
1875
  const low = Math.round(base * 10 ** (duckDb / 20) * 1e4) / 1e4;
1876
- const end = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip);
1876
+ const end = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip);
1877
1877
  const ranges = [];
1878
1878
  for (const r of mergeVideoRanges(speech)) {
1879
1879
  if (r.to <= clip.start - release || r.from >= end + attack) continue;
@@ -2078,7 +2078,7 @@ function videoClipWaveform(clip, peaks, columns) {
2078
2078
  const step = clip.duration / Math.max(1, n);
2079
2079
  for (let c = 0; c < n; c++) {
2080
2080
  const { min, max } = videoAudioPeakRange(peaks, start + c * step * speed, start + (c + 1) * step * speed);
2081
- const gain = _chunkXNZFVYC2cjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
2081
+ const gain = _chunkZBCT5MEAcjs.videoClipSoundGain.call(void 0, clip, (c + 0.5) * step);
2082
2082
  out[2 * c] = min * gain;
2083
2083
  out[2 * c + 1] = max * gain;
2084
2084
  }
@@ -2211,8 +2211,8 @@ function videoClipPicture(project, clip) {
2211
2211
  const asset = clip.type === "media" ? project.assets.find((a) => a.id === clip.asset) : void 0;
2212
2212
  const size = asset ? { width: _nullishCoalesce(asset.width, () => ( project.width)), height: _nullishCoalesce(asset.height, () => ( project.height)) } : { width: project.width, height: project.height };
2213
2213
  const fit = _nullishCoalesce(clip.fit, () => ( (clip.type === "media" || clip.type === "sequence" ? "contain" : "fill")));
2214
- const rect = _chunkXNZFVYC2cjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
2215
- return { size, rect, rotation: _chunkXNZFVYC2cjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
2214
+ const rect = _chunkZBCT5MEAcjs.placeVideoRect.call(void 0, project, size, clip.type === "text" ? "fill" : fit, clip.transform, 0);
2215
+ return { size, rect, rotation: _chunkZBCT5MEAcjs.videoTransformAt.call(void 0, clip.transform, 0).rotation };
2216
2216
  }
2217
2217
  function turn(x, y, cx, cy, deg) {
2218
2218
  if (!deg) return [x, y];
@@ -2238,7 +2238,7 @@ function videoClipMaskOutline(project, clip) {
2238
2238
  const { rect, rotation } = picture;
2239
2239
  const cx = rect.x + rect.width / 2;
2240
2240
  const cy = rect.y + rect.height / 2;
2241
- const polygon = _chunkXNZFVYC2cjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
2241
+ const polygon = _chunkZBCT5MEAcjs.videoMaskPolygon.call(void 0, clip.mask, rect).map(([x, y]) => turn(x, y, cx, cy, rotation));
2242
2242
  if (polygon.length < 2) return null;
2243
2243
  return [...polygon, polygon[0]].flatMap(([x, y]) => [Math.round(x * 100) / 100, Math.round(y * 100) / 100]);
2244
2244
  }
@@ -2276,7 +2276,7 @@ var VideoPathGesture = (_class3 = class {
2276
2276
  // src/video-editor/plan.ts
2277
2277
  function clipIndex(project) {
2278
2278
  const out = /* @__PURE__ */ new Map();
2279
- for (const { track } of _chunkXNZFVYC2cjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
2279
+ for (const { track } of _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project)) for (const c of track.clips) out.set(c.id, c);
2280
2280
  return out;
2281
2281
  }
2282
2282
  function diffVideoProjects(before, after) {
@@ -2285,8 +2285,8 @@ function diffVideoProjects(before, after) {
2285
2285
  const clipsAdded = [...b.keys()].filter((id) => !a.has(id));
2286
2286
  const clipsRemoved = [...a.keys()].filter((id) => !b.has(id));
2287
2287
  const clipsChanged = [...b.keys()].filter((id) => a.has(id) && JSON.stringify(a.get(id)) !== JSON.stringify(b.get(id)));
2288
- const durationBefore = _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, before);
2289
- const durationAfter = _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, after);
2288
+ const durationBefore = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, before);
2289
+ const durationAfter = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, after);
2290
2290
  return { durationBefore, durationAfter, durationDelta: durationAfter - durationBefore, clipsAdded, clipsRemoved, clipsChanged };
2291
2291
  }
2292
2292
  function planVideoEdits(project, input) {
@@ -2713,10 +2713,10 @@ function videoTransformOfView(view, base, stage) {
2713
2713
  function videoCameraBase(clip) {
2714
2714
  if (clip.camera) return clip.camera.base;
2715
2715
  const t = _nullishCoalesce(clip.transform, () => ( {}));
2716
- const keyed = _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, t[p]));
2716
+ const keyed = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.filter((p) => _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, t[p]));
2717
2717
  if (keyed.length)
2718
2718
  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).`);
2719
- return Object.fromEntries(_chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
2719
+ return Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.flatMap((p) => typeof t[p] === "number" ? [[p, t[p]]] : []));
2720
2720
  }
2721
2721
  async function bakeVideoClipCamera(clip, camera, project, provider) {
2722
2722
  const stage = { width: project.width, height: project.height };
@@ -2727,22 +2727,22 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2727
2727
  const windows = {};
2728
2728
  let keys = [];
2729
2729
  let inMs = 0;
2730
- const moveIn = _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, camera.in);
2730
+ const moveIn = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.in);
2731
2731
  if (moveIn) {
2732
- const { description } = await _chunkGHCSC2WPcjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
2732
+ const { description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveIn, "transition");
2733
2733
  inMs = _nullishCoalesce(moveIn.ms, () => ( description.camera.durationMs));
2734
2734
  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.`);
2735
- const sample = await _chunkGHCSC2WPcjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
2735
+ const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveIn.move, { from: videoCameraView(camera.from, stage), to, ms: inMs, stage, fps, values: moveIn.values });
2736
2736
  keys.push(...sample.keys);
2737
2737
  if (sample.cut !== void 0) cuts.push(sample.cut);
2738
2738
  windows.in = { start: 0, end: inMs };
2739
2739
  }
2740
- const moveDuring = _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, camera.during);
2740
+ const moveDuring = _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, camera.during);
2741
2741
  const holdMs = clip.duration - inMs;
2742
2742
  if (moveDuring && holdMs > 0) {
2743
- await _chunkGHCSC2WPcjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
2743
+ await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, provider, moveDuring, "hold");
2744
2744
  const at = keys.length ? keys[keys.length - 1].view : to;
2745
- const sample = await _chunkGHCSC2WPcjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
2745
+ const sample = await _chunkISIO63Q5cjs.sampleEffectCameraMove.call(void 0, provider, moveDuring.move, { from: at, to: at, ms: holdMs, stage, fps, values: moveDuring.values });
2746
2746
  const shifted = sample.keys.map((k) => ({ t: k.t + inMs, view: k.view }));
2747
2747
  if (keys.length && shifted.length && sameView(keys[keys.length - 1].view, shifted[0].view)) shifted.shift();
2748
2748
  keys.push(...shifted);
@@ -2755,7 +2755,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2755
2755
  const base = videoCameraBase(clip);
2756
2756
  const transforms = keys.map((k) => ({ t: Math.round(k.t * 1e3) / 1e3, value: videoTransformOfView(k.view, base, stage) }));
2757
2757
  const transform = {};
2758
- for (const p of _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES) {
2758
+ for (const p of _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES) {
2759
2759
  const out = [];
2760
2760
  for (const { t, value } of transforms) {
2761
2761
  const last = out[out.length - 1];
@@ -2769,7 +2769,7 @@ async function bakeVideoClipCamera(clip, camera, project, provider) {
2769
2769
  }
2770
2770
  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);
2771
2771
  function videoClipCameraMove(clip, role) {
2772
- return _chunkGHCSC2WPcjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
2772
+ return _chunkISIO63Q5cjs.cameraMoveParts.call(void 0, _optionalChain([clip, 'optionalAccess', _45 => _45.camera, 'optionalAccess', _46 => _46[role === "transition" ? "in" : "during"]]));
2773
2773
  }
2774
2774
 
2775
2775
  // src/video-editor/transcript-controller.ts
@@ -2998,7 +2998,7 @@ function videoProxyFfmpeg(asset, options = {}) {
2998
2998
  output
2999
2999
  ];
3000
3000
  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 } : {} };
3001
- return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkXNZFVYC2cjs.videoShellQuote).join(" "), proxy };
3001
+ return { asset: asset.id, args, command: ["ffmpeg", ...args].map(_chunkZBCT5MEAcjs.videoShellQuote).join(" "), proxy };
3002
3002
  }
3003
3003
  function videoProxyPlan(project, options = {}) {
3004
3004
  const scale = _nullishCoalesce(options.scale, () => ( 0.5));
@@ -3024,7 +3024,7 @@ var videoSourceFrameTime = (frame, fps) => (frame + 0.5) * 1e3 / fps;
3024
3024
  var videoFrameCacheKey = (src, frame) => `${frame}@${src}`;
3025
3025
  function videoFrameRequestsAt(project, time, srcFor = (l) => l.src) {
3026
3026
  const out = [];
3027
- for (const layer of _chunkXNZFVYC2cjs.videoFrameLeafLayers.call(void 0, _chunkXNZFVYC2cjs.videoFrameAt.call(void 0, project, time).layers)) {
3027
+ for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time).layers)) {
3028
3028
  if (layer.type !== "media" || layer.assetKind !== "video") continue;
3029
3029
  const src = srcFor(layer);
3030
3030
  if (!src) continue;
@@ -3365,7 +3365,7 @@ var VideoPreviewEngine = (_class7 = class {
3365
3365
  if (this.destroyed) return;
3366
3366
  const state = this.source.getState();
3367
3367
  const { project, time, playing } = state;
3368
- const frame = _chunkXNZFVYC2cjs.videoFrameAt.call(void 0, project, time);
3368
+ const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time);
3369
3369
  const scale = resolveVideoPreviewScale(_nullishCoalesce(this.options.previewScale, () => ( state.previewScale)), this.resolutionFor(project.width));
3370
3370
  const assets = new Map(project.assets.map((a) => [a.id, a]));
3371
3371
  this.srcFor = (layer) => videoPreviewSrc(assets.get(_nullishCoalesce(layer.asset, () => ( ""))), scale, layer.src);
@@ -3395,7 +3395,7 @@ var VideoPreviewEngine = (_class7 = class {
3395
3395
  }
3396
3396
  };
3397
3397
  const sounding = new Map(frame.audio.map((a) => [a.clip, a]));
3398
- for (const layer of _chunkXNZFVYC2cjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
3398
+ for (const layer of _chunkZBCT5MEAcjs.videoFrameLeafLayers.call(void 0, frame.layers)) {
3399
3399
  if (layer.type !== "media" || layer.assetKind !== "video" || !layer.src) continue;
3400
3400
  const sound = sounding.get(layer.clip);
3401
3401
  sync(layer.clip, this.srcFor(layer), "video", _nullishCoalesce(layer.sourceTime, () => ( 0)), _nullishCoalesce(_optionalChain([sound, 'optionalAccess', _93 => _93.speed]), () => ( 1)), sound ? sound.gain : null);
@@ -3407,9 +3407,9 @@ var VideoPreviewEngine = (_class7 = class {
3407
3407
  }
3408
3408
  /** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
3409
3409
  drawable(project, frame) {
3410
- if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkXNZFVYC2cjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
3411
- const at = _chunkXNZFVYC2cjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
3412
- return at === frame.time ? frame : { ..._chunkXNZFVYC2cjs.videoFrameAt.call(void 0, project, at), time: frame.time };
3410
+ if (!_optionalChain([this, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.available]) || !_chunkZBCT5MEAcjs.videoLayersUseEffects.call(void 0, frame.layers)) return frame;
3411
+ const at = _chunkZBCT5MEAcjs.videoEffectFrameTime.call(void 0, frame.time, project.fps);
3412
+ return at === frame.time ? frame : { ..._chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, at), time: frame.time };
3413
3413
  }
3414
3414
  redraw() {
3415
3415
  if (this.scheduled || this.destroyed) return;
@@ -3418,7 +3418,7 @@ var VideoPreviewEngine = (_class7 = class {
3418
3418
  this.scheduled = false;
3419
3419
  if (this.destroyed) return;
3420
3420
  const { project, time } = this.source.getState();
3421
- this.draw(this.drawable(project, _chunkXNZFVYC2cjs.videoFrameAt.call(void 0, project, time)));
3421
+ this.draw(this.drawable(project, _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project, time)));
3422
3422
  });
3423
3423
  }
3424
3424
  __init42() {this.sourceFor = (layer) => {
@@ -3461,7 +3461,7 @@ var VideoPreviewEngine = (_class7 = class {
3461
3461
  if (!source) this.complete = false;
3462
3462
  return source;
3463
3463
  };
3464
- _chunkXNZFVYC2cjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
3464
+ _chunkZBCT5MEAcjs.drawVideoFrame.call(void 0, this.ctx, frame, sourceFor, resolution, {
3465
3465
  defineSvgFilter: this.defineSvgFilter,
3466
3466
  lutFor: this.lutFor,
3467
3467
  scratch: this.scratch,
@@ -3534,15 +3534,15 @@ var VideoPreviewEngine = (_class7 = class {
3534
3534
  var svgUrl = (svg) => svg.trimStart().startsWith("<") ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}` : svg;
3535
3535
  var GROUPS = ["base", "background", "subject", "overlay", "text"];
3536
3536
  function videoEditsFromSequence(project, sequence, options = {}) {
3537
- const at = _nullishCoalesce(options.at, () => ( _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, project)));
3537
+ const at = _nullishCoalesce(options.at, () => ( _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project)));
3538
3538
  const W = project.width;
3539
3539
  const H = project.height;
3540
3540
  const sx = W / sequence.stage.width;
3541
3541
  const sy = H / sequence.stage.height;
3542
- const timing = _chunkK5DS2JTAcjs.effectSequenceTiming.call(void 0, sequence);
3542
+ const timing = _chunkZ3BRH4JKcjs.effectSequenceTiming.call(void 0, sequence);
3543
3543
  const provider = options.provider ? { provider: options.provider } : {};
3544
3544
  const notes = [];
3545
- const usedClips = new Set(_chunkXNZFVYC2cjs.allVideoClipIds.call(void 0, project));
3545
+ const usedClips = new Set(_chunkZBCT5MEAcjs.allVideoClipIds.call(void 0, project));
3546
3546
  const usedTracks = new Set(project.tracks.map((t) => t.id));
3547
3547
  const usedAssets = new Set(project.assets.map((a) => a.id));
3548
3548
  const fresh = (used, base) => {
@@ -3584,11 +3584,11 @@ function videoEditsFromSequence(project, sequence, options = {}) {
3584
3584
  const shotEnd = _nullishCoalesce(timing.starts[i + 1], () => ( timing.total));
3585
3585
  let base;
3586
3586
  shot.layers.forEach((layer, j) => {
3587
- const span = _chunkK5DS2JTAcjs.effectLayerSpan.call(void 0, layer, i, timing.starts, timing.total);
3587
+ const span = _chunkZ3BRH4JKcjs.effectLayerSpan.call(void 0, layer, i, timing.starts, timing.total);
3588
3588
  if (span.end - span.start <= 0) return void notes.push(`Shot ${i + 1}, layer ${j + 1} lasts no time, so it was left out.`);
3589
3589
  const clip = clipOf(layer, at + span.start, span.end - span.start, i);
3590
- const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd && _chunkK5DS2JTAcjs.effectLayerRole.call(void 0, layer) === "background" && !layer.rect;
3591
- const item = { group: isBase ? "base" : _chunkK5DS2JTAcjs.effectLayerRole.call(void 0, layer), clip };
3590
+ const isBase = j === 0 && !base && span.start === shotStart && span.end === shotEnd && _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer) === "background" && !layer.rect;
3591
+ const item = { group: isBase ? "base" : _chunkZ3BRH4JKcjs.effectLayerRole.call(void 0, layer), clip };
3592
3592
  if (isBase) base = item;
3593
3593
  items.push(item);
3594
3594
  });
@@ -3665,17 +3665,17 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3665
3665
  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);
3666
3666
  this.history = _nullishCoalesce(options.history, () => ( new (0, _chunkWKPXOGZZcjs.HistoryManager)()));
3667
3667
  this.audioPeaks = options.audioPeaks instanceof VideoAudioPeaksCache ? options.audioPeaks : new VideoAudioPeaksCache(options.audioPeaks);
3668
- this.luts = options.luts instanceof _chunkXNZFVYC2cjs.VideoLutCache ? options.luts : new (0, _chunkXNZFVYC2cjs.VideoLutCache)(options.luts);
3668
+ this.luts = options.luts instanceof _chunkZBCT5MEAcjs.VideoLutCache ? options.luts : new (0, _chunkZBCT5MEAcjs.VideoLutCache)(options.luts);
3669
3669
  this.frameCache = _nullishCoalesce(options.frameCache, () => ( null));
3670
- this.effects = new (0, _chunkGHCSC2WPcjs.EffectsSlot)();
3670
+ this.effects = new (0, _chunkISIO63Q5cjs.EffectsSlot)();
3671
3671
  if (options.effects) this.effects.set(options.effects);
3672
- this.effectsEngine = new (0, _chunkXNZFVYC2cjs.VideoEffectsEngine)({ slot: this.effects });
3672
+ this.effectsEngine = new (0, _chunkZBCT5MEAcjs.VideoEffectsEngine)({ slot: this.effects });
3673
3673
  this.project = options.project ? parseVideoProject(options.project) : createVideoProject();
3674
3674
  this.issues = checkVideoProject(this.project);
3675
3675
  this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
3676
3676
  this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
3677
3677
  this.onChange = options.onChange;
3678
- this.player = new (0, _chunkLJZRHVZVcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
3678
+ this.player = new (0, _chunkLJZRHVZVcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
3679
3679
  this.state = this.computeState();
3680
3680
  this.connect();
3681
3681
  }
@@ -3712,12 +3712,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3712
3712
  const h = this.history.getState();
3713
3713
  return {
3714
3714
  project: this.project,
3715
- duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, this.project),
3715
+ duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project),
3716
3716
  time: p.time,
3717
3717
  playing: p.playing,
3718
3718
  loop: p.loop,
3719
3719
  selection: this.selection,
3720
- current: _chunkXNZFVYC2cjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
3720
+ current: _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, p.time).map((c) => c.clip.id),
3721
3721
  issues: this.issues,
3722
3722
  readOnly: this.readOnly,
3723
3723
  error: this.error,
@@ -3751,7 +3751,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3751
3751
  this.issues = checkVideoProject(project);
3752
3752
  const ids = new Set(project.tracks.flatMap((t) => t.clips.map((c) => c.id)));
3753
3753
  if (this.selection.some((id) => !ids.has(id))) this.selection = this.selection.filter((id) => ids.has(id));
3754
- this.player.setDuration(() => _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, this.project));
3754
+ this.player.setDuration(() => _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, this.project));
3755
3755
  } finally {
3756
3756
  this.applying = false;
3757
3757
  }
@@ -3913,7 +3913,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3913
3913
  }
3914
3914
  /** Selects clips (unknown ids are dropped). `add` toggles them into the current selection. */
3915
3915
  select(clips, options = {}) {
3916
- const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
3916
+ const known = _nullishCoalesce(_optionalChain([clips, 'optionalAccess', _117 => _117.filter, 'call', _118 => _118((id) => _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id))]), () => ( []));
3917
3917
  let next;
3918
3918
  if (options.add) {
3919
3919
  next = [...this.selection];
@@ -3940,7 +3940,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3940
3940
  step(frames) {
3941
3941
  this.player.pause();
3942
3942
  const fps = this.project.fps;
3943
- this.player.seek(Math.max(0, _chunkXNZFVYC2cjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
3943
+ this.player.seek(Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, fps) + frames * 1e3 / fps));
3944
3944
  }
3945
3945
  setLoop(loop) {
3946
3946
  this.player.setLoop(loop);
@@ -3957,14 +3957,14 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3957
3957
  */
3958
3958
  snap(time, options = {}) {
3959
3959
  const threshold = _nullishCoalesce(options.threshold, () => ( 8 * 1e3 / this.project.fps));
3960
- const points = _chunkXNZFVYC2cjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
3961
- const hit = _chunkXNZFVYC2cjs.snapVideoTime.call(void 0, time, points, threshold);
3962
- return hit.snapped !== null ? hit : { time: Math.max(0, _chunkXNZFVYC2cjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
3960
+ const points = _chunkZBCT5MEAcjs.videoSnapPoints.call(void 0, this.project, { exclude: options.exclude, playhead: options.playhead === false ? void 0 : this.player.currentTime });
3961
+ const hit = _chunkZBCT5MEAcjs.snapVideoTime.call(void 0, time, points, threshold);
3962
+ return hit.snapped !== null ? hit : { time: Math.max(0, _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, time, this.project.fps)), snapped: null };
3963
3963
  }
3964
3964
  /** Splits the selected clips (or every clip) under the playhead there, as one undo step. */
3965
3965
  splitAtPlayhead() {
3966
- const t = _chunkXNZFVYC2cjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
3967
- const under = _chunkXNZFVYC2cjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip));
3966
+ const t = _chunkZBCT5MEAcjs.snapToVideoFrame.call(void 0, this.player.currentTime, this.project.fps);
3967
+ const under = _chunkZBCT5MEAcjs.videoClipsAt.call(void 0, this.project, t).filter(({ clip }) => t > clip.start && t < _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip));
3968
3968
  const chosen = this.selection.length ? under.filter(({ clip }) => this.selection.includes(clip.id)) : under;
3969
3969
  if (!chosen.length) return this.refuse("No clip is under the playhead to split.");
3970
3970
  return this.apply(chosen.map(({ clip }) => ({ op: "split_clip", clip: clip.id, at: t })), "Split");
@@ -3992,7 +3992,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
3992
3992
  /** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
3993
3993
  async describeEffect(effect, place) {
3994
3994
  const d = await this.effects.require().describe(effect);
3995
- if (place) _chunkXNZFVYC2cjs.checkVideoEffectPlace.call(void 0, d, place);
3995
+ if (place) _chunkZBCT5MEAcjs.checkVideoEffectPlace.call(void 0, d, place);
3996
3996
  return d;
3997
3997
  }
3998
3998
  /**
@@ -4007,9 +4007,9 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4007
4007
  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}).`);
4008
4008
  let filled;
4009
4009
  try {
4010
- filled = await _chunkK5DS2JTAcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
4010
+ filled = await _chunkZ3BRH4JKcjs.fillEffectTemplate.call(void 0, this.effects.provider, template, values, options.name ? { name: options.name } : {});
4011
4011
  } catch (error) {
4012
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4012
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4013
4013
  throw error;
4014
4014
  }
4015
4015
  const made = videoEditsFromSequence(this.getState().project, filled.sequence, { at: options.at, provider: this.effects.provider.id });
@@ -4028,7 +4028,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4028
4028
  try {
4029
4029
  plan = await run();
4030
4030
  } catch (error) {
4031
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4031
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4032
4032
  throw error;
4033
4033
  }
4034
4034
  const result = this.apply(plan.edit, plan.label, { merge });
@@ -4036,7 +4036,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4036
4036
  return { ...result, clip: plan.clip, ...plan.effect ? { effect: plan.effect() } : {} };
4037
4037
  }
4038
4038
  clipOrThrow(id) {
4039
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, id);
4039
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
4040
4040
  if (!at) throw new Error(`There is no clip "${id}"; list_applied_effects or get_video_project lists the clips.`);
4041
4041
  return at.clip;
4042
4042
  }
@@ -4049,7 +4049,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4049
4049
  return this.effectEdit(async () => {
4050
4050
  const current = this.clipOrThrow(clip);
4051
4051
  const d = await this.describeEffect(effect, "clip");
4052
- const values = _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4052
+ const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4053
4053
  const stack = [..._nullishCoalesce(current.effects, () => ( []))];
4054
4054
  const taken = new Set(stack.map((e) => e.id));
4055
4055
  let n = 1;
@@ -4085,7 +4085,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4085
4085
  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(", ")}.`);
4086
4086
  base[k] = d.defaults[k];
4087
4087
  }
4088
- next.values = _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
4088
+ next.values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, given, { base, keyframes: true });
4089
4089
  }
4090
4090
  if (changes.enabled !== void 0) {
4091
4091
  if (changes.enabled) delete next.enabled;
@@ -4106,7 +4106,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4106
4106
  return (await provider.list({ kind: "camera" })).filter((e) => e.kind === "camera" && e.camera && (!role || e.camera.role === role));
4107
4107
  }
4108
4108
  cameraClip(id) {
4109
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, id);
4109
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, id);
4110
4110
  if (!at) {
4111
4111
  const ids = this.project.tracks.flatMap((t) => t.clips.map((c) => c.id));
4112
4112
  throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
@@ -4127,7 +4127,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4127
4127
  const bake = await bakeVideoClipCamera(clip, camera, this.project, this.effects.require());
4128
4128
  const r = this.apply({ op: "update_clip", clip: clipId, set: { camera, transform: bake.transform } }, label, { merge });
4129
4129
  if (!r.ok) return r;
4130
- const keys = Object.fromEntries(_chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkXNZFVYC2cjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
4130
+ const keys = Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.map((p) => [p, _chunkZBCT5MEAcjs.videoKeysOf.call(void 0, bake.transform[p]).length]));
4131
4131
  return { ok: true, clip: clipId, camera, keys, cuts: bake.cuts, windows: bake.windows, notes: bake.notes };
4132
4132
  }
4133
4133
  /**
@@ -4142,10 +4142,10 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4142
4142
  if (reason) return this.refused(reason);
4143
4143
  try {
4144
4144
  const current = this.cameraClip(clip);
4145
- const { spec: parts, description } = await _chunkGHCSC2WPcjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
4145
+ const { spec: parts, description } = await _chunkISIO63Q5cjs.resolveCameraMoveSpec.call(void 0, this.effects.require(), spec, role);
4146
4146
  const move = role === "transition" && parts.ms === void 0 ? { ...parts, ms: description.camera.durationMs } : parts;
4147
4147
  const simple = move.ms === void 0 && move.preset === void 0 && move.values === void 0;
4148
- const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunkGHCSC2WPcjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
4148
+ const camera = { ..._nullishCoalesce(current.camera, () => ( { base: videoCameraBase(current) })), [_chunkISIO63Q5cjs.cameraMoveField.call(void 0, role)]: simple ? move.move : move };
4149
4149
  for (const key of ["from", "framing"]) {
4150
4150
  if (options[key] === null) delete camera[key];
4151
4151
  else if (options[key] !== void 0) camera[key] = options[key];
@@ -4153,7 +4153,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4153
4153
  if (camera.from && !camera.in) throw new Error('"from" is where a move in starts; set a transition move too, or leave "from" out.');
4154
4154
  return await this.cameraEdit(clip, camera, `${role === "hold" ? "Hold move" : "Camera move"} ${description.name}`, options.merge);
4155
4155
  } catch (error) {
4156
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4156
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4157
4157
  throw error;
4158
4158
  }
4159
4159
  }
@@ -4166,7 +4166,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4166
4166
  if (reason) return this.refused(reason);
4167
4167
  try {
4168
4168
  const current = this.cameraClip(clip);
4169
- const field = _chunkGHCSC2WPcjs.cameraMoveField.call(void 0, role);
4169
+ const field = _chunkISIO63Q5cjs.cameraMoveField.call(void 0, role);
4170
4170
  const other = field === "in" ? "during" : "in";
4171
4171
  if (_optionalChain([current, 'access', _121 => _121.camera, 'optionalAccess', _122 => _122[field]]) === void 0)
4172
4172
  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"})` : ""}.`);
@@ -4176,7 +4176,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4176
4176
  const left = camera.in !== void 0 || camera.during !== void 0;
4177
4177
  return await this.cameraEdit(clip, left ? camera : null, role === "hold" ? "Clear hold move" : "Clear camera move");
4178
4178
  } catch (error) {
4179
- if (_chunkGHCSC2WPcjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4179
+ if (_chunkISIO63Q5cjs.isEffectError.call(void 0, error) || error instanceof Error) return this.refused(error.message);
4180
4180
  throw error;
4181
4181
  }
4182
4182
  }
@@ -4184,7 +4184,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4184
4184
  removeClipEffect(clip, instance) {
4185
4185
  const reason = this.readOnlyReason();
4186
4186
  if (reason) return this.refused(reason);
4187
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, clip);
4187
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip);
4188
4188
  if (!at) return this.refused(`There is no clip "${clip}".`);
4189
4189
  const stack = _nullishCoalesce(at.clip.effects, () => ( []));
4190
4190
  const was = stack.find((e) => e.id === instance);
@@ -4201,7 +4201,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4201
4201
  return this.effectEdit(async () => {
4202
4202
  this.clipOrThrow(clip);
4203
4203
  const d = await this.describeEffect(effect, "transition");
4204
- const values = _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d, options.values);
4204
+ const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values);
4205
4205
  const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 1e3));
4206
4206
  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 };
4207
4207
  });
@@ -4214,7 +4214,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4214
4214
  addEffectClip(track, effect, options = {}) {
4215
4215
  return this.effectEdit(async () => {
4216
4216
  const d = await this.describeEffect(effect, "generator");
4217
- const values = _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4217
+ const values = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, options.values, { keyframes: true });
4218
4218
  const duration = _nullishCoalesce(_nullishCoalesce(options.duration, () => ( d.duration)), () => ( 5e3));
4219
4219
  const label = `Add ${d.name}`;
4220
4220
  const clipId = _nullishCoalesce(options.id, () => ( ""));
@@ -4236,12 +4236,12 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4236
4236
  if (part === "generator") {
4237
4237
  if (current.type !== "effect") throw new Error(`Clip "${clip}" is not an effect clip.`);
4238
4238
  const d2 = await this.describeEffect(current.effect);
4239
- return { edit: { op: "update_clip", clip, set: { values: _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d2, values, { base: _nullishCoalesce(current.values, () => ( {})), keyframes: true }) } }, label: `Change ${_nullishCoalesce(current.name, () => ( d2.name))}`, clip };
4239
+ 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 };
4240
4240
  }
4241
4241
  const t = current.transition;
4242
4242
  if (_optionalChain([t, 'optionalAccess', _128 => _128.type]) !== "effect" || !t.effect) throw new Error(`Clip "${clip}" has no effect transition.`);
4243
4243
  const d = await this.describeEffect(t.effect.effect);
4244
- const merged = _chunkXNZFVYC2cjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
4244
+ const merged = _chunkZBCT5MEAcjs.checkVideoEffectValues.call(void 0, d, values, { base: _nullishCoalesce(t.effect.values, () => ( {})) });
4245
4245
  return { edit: { op: "set_transition", clip, transition: { ...t, effect: { ...t.effect, values: merged } } }, label: `Change transition ${d.name}`, clip };
4246
4246
  }, options.merge);
4247
4247
  }
@@ -4265,7 +4265,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4265
4265
  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).`);
4266
4266
  }
4267
4267
  const d = await this.describeEffect(effect);
4268
- const controls = _chunkGHCSC2WPcjs.pathControlsOf.call(void 0, d);
4268
+ const controls = _chunkISIO63Q5cjs.pathControlsOf.call(void 0, d);
4269
4269
  if (!controls.length) return fail2(`"${d.id}" does not draw along a path. Find one that does with search_effects accepts ["path"].`);
4270
4270
  const control = _nullishCoalesce(options.control, () => ( (controls.length === 1 ? controls[0] : void 0)));
4271
4271
  if (!control) return fail2(`"${d.id}" has several path controls (${controls.join(", ")}); pass control.`);
@@ -4280,7 +4280,7 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4280
4280
  if (typeof path.d !== "string") return fail2('d must be SVG path data (a string), or "" to clear the path.');
4281
4281
  value = path.d;
4282
4282
  } else if ("mask" in path) {
4283
- const from = _optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
4283
+ const from = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, path.mask.clip), 'optionalAccess', _133 => _133.clip]);
4284
4284
  if (!from) return fail2(`There is no clip "${path.mask.clip}" to take a mask from.`);
4285
4285
  const outline = videoClipMaskOutline(this.project, from);
4286
4286
  if (!outline) return fail2(`Clip "${path.mask.clip}" has no mask; add one with set_video_clip_mask, or pass points or d.`);
@@ -4322,31 +4322,31 @@ var VideoEditorController = (_class8 = class _VideoEditorController {
4322
4322
  }
4323
4323
  /** 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). */
4324
4324
  setClipEffectKeyframes(clip, instance, control, keys) {
4325
- const current = _optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
4325
+ const current = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, this.project, clip), 'optionalAccess', _134 => _134.clip]);
4326
4326
  const was = _optionalChain([current, 'optionalAccess', _135 => _135.effects, 'optionalAccess', _136 => _136.find, 'call', _137 => _137((e) => e.id === instance)]);
4327
4327
  const value = _optionalChain([was, 'optionalAccess', _138 => _138.values, 'optionalAccess', _139 => _139[control]]);
4328
- const plain = keys === null ? _chunkXNZFVYC2cjs.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
+ 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) };
4329
4329
  return this.updateClipEffect(clip, instance, { values: { [control]: _nullishCoalesce(plain, () => ( null)) } });
4330
4330
  }
4331
4331
  /** What plays at `time` (default: the playhead). */
4332
4332
  frame(time = this.player.currentTime) {
4333
- return _chunkXNZFVYC2cjs.videoFrameAt.call(void 0, this.project, time);
4333
+ return _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, this.project, time);
4334
4334
  }
4335
4335
  /** The frame at `time` (default: the playhead) as SVG. */
4336
4336
  toSvg(time = this.player.currentTime, options = {}) {
4337
- return _chunkXNZFVYC2cjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
4337
+ return _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, this.project, time, { lutFor: (src) => this.luts.peek(src), ...options });
4338
4338
  }
4339
4339
  /** The project as an ffmpeg command. */
4340
4340
  toFfmpeg(options = {}) {
4341
- return _chunkXNZFVYC2cjs.toVideoFfmpeg.call(void 0, this.project, options);
4341
+ return _chunkZBCT5MEAcjs.toVideoFfmpeg.call(void 0, this.project, options);
4342
4342
  }
4343
4343
  /** The ffmpeg command that measures the mix's loudness (see `toVideoLoudnessMeasure`). */
4344
4344
  toLoudnessMeasure(options = {}) {
4345
- return _chunkXNZFVYC2cjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
4345
+ return _chunkZBCT5MEAcjs.toVideoLoudnessMeasure.call(void 0, this.project, options);
4346
4346
  }
4347
4347
  /** One track as a CMX 3600 EDL. */
4348
4348
  toEdl(options = {}) {
4349
- return _chunkXNZFVYC2cjs.toVideoEdl.call(void 0, this.project, options);
4349
+ return _chunkZBCT5MEAcjs.toVideoEdl.call(void 0, this.project, options);
4350
4350
  }
4351
4351
  }, _class8.__initStatic(), _class8);
4352
4352
  function checkPreviewScale(scale) {
@@ -4414,12 +4414,12 @@ function videoRulerTicks(duration, pxPerSecond, fps) {
4414
4414
  const ticks = [];
4415
4415
  for (let t = 0; t <= duration + 1e-6; t += step) {
4416
4416
  const isMajor = Math.abs(t / major - Math.round(t / major)) < 1e-9;
4417
- ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkXNZFVYC2cjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
4417
+ ticks.push({ time: t, x: t * pxPerMs, major: isMajor, ...isMajor ? { label: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, fps).replace(/^00:/, "") } : {} });
4418
4418
  }
4419
4419
  return ticks;
4420
4420
  }
4421
4421
  function videoClipShowsWaveform(clip, asset, mode = "audio") {
4422
- if (clip.type !== "media" || mode === "none" || !_chunkXNZFVYC2cjs.videoAssetHasSound.call(void 0, asset)) return false;
4422
+ if (clip.type !== "media" || mode === "none" || !_chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset)) return false;
4423
4423
  return mode === "all" || asset.kind === "audio";
4424
4424
  }
4425
4425
  var VIDEO_CLIP_ANIMATION_LABELS = {
@@ -4480,11 +4480,11 @@ function videoClipLabel(clip, asset, sequence) {
4480
4480
  if (clip.type === "effect") return `Effect: ${clip.effect}`;
4481
4481
  if (clip.type === "adjustment") return `Adjustment${clip.scope === "all" ? " (all tracks)" : clip.scope === "track" ? ` (${clip.targetTrack})` : ""}`;
4482
4482
  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));
4483
- const speed = _chunkXNZFVYC2cjs.videoClipSpeed.call(void 0, clip);
4483
+ const speed = _chunkZBCT5MEAcjs.videoClipSpeed.call(void 0, clip);
4484
4484
  return speed !== 1 ? `${base} (${Math.round(speed * 100)}%)` : base;
4485
4485
  }
4486
4486
  function planVideoClipDrag(project, input) {
4487
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, input.clip);
4487
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, input.clip);
4488
4488
  if (!at) return null;
4489
4489
  const { clip, track } = at;
4490
4490
  const snap = _nullishCoalesce(input.snap, () => ( ((t) => t)));
@@ -4501,17 +4501,17 @@ function planVideoClipDrag(project, input) {
4501
4501
  }
4502
4502
  const minimum = 1e3 / project.fps;
4503
4503
  if (input.mode === "trim-start") {
4504
- const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip) - minimum);
4504
+ const to2 = Math.min(snap(Math.max(0, clip.start + input.delta)), _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - minimum);
4505
4505
  const changed2 = Math.abs(to2 - clip.start) > 1e-6;
4506
- const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip) - to2 };
4506
+ const plan = input.ripple ? { start: clip.start, duration: clip.duration - (to2 - clip.start) } : { start: to2, duration: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) - to2 };
4507
4507
  return { ...plan, track: track.id, edit: changed2 ? { op: "trim_clip", clip: clip.id, edge: "start", to: to2, ...input.ripple ? { ripple: true } : {} } : null };
4508
4508
  }
4509
- const to = Math.max(snap(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
4510
- const changed = Math.abs(to - _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip)) > 1e-6;
4509
+ const to = Math.max(snap(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip) + input.delta), clip.start + minimum);
4510
+ const changed = Math.abs(to - _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip)) > 1e-6;
4511
4511
  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 };
4512
4512
  }
4513
4513
  function videoDropTracks(project, clipId) {
4514
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, clipId);
4514
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4515
4515
  if (!at) return [];
4516
4516
  return project.tracks.filter((t) => t.kind === at.track.kind && !t.locked).map((t) => t.id);
4517
4517
  }
@@ -4520,7 +4520,7 @@ function videoDragLabel(edit) {
4520
4520
  return edit.op === "trim_clip" && edit.ripple ? "Ripple trim" : "Trim clip";
4521
4521
  }
4522
4522
  function videoAssetDropEdit(project, assetId, options = {}) {
4523
- const asset = _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, project).get(assetId);
4523
+ const asset = _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(assetId);
4524
4524
  if (!asset) return null;
4525
4525
  const kind = asset.kind === "audio" ? "audio" : "video";
4526
4526
  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])));
@@ -4572,25 +4572,25 @@ var KEY_LABELS = {
4572
4572
  scale: { label: "Scale", step: 0.05 },
4573
4573
  rotation: { label: "Rotation", step: 1 }
4574
4574
  };
4575
- var animatableOf = (clip, property) => _chunkXNZFVYC2cjs.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
+ 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;
4576
4576
  var playheadInClip = (clip, time) => Math.round(Math.min(clip.duration, Math.max(0, time - clip.start)));
4577
4577
  function videoKeyframeRows(project, clipId, time) {
4578
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, clipId);
4578
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4579
4579
  if (!at) return [];
4580
4580
  const { clip } = at;
4581
- const asset = clip.type === "media" ? _chunkXNZFVYC2cjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
4581
+ const asset = clip.type === "media" ? _chunkZBCT5MEAcjs.videoAssetMap.call(void 0, project).get(clip.asset) : void 0;
4582
4582
  const visual = !(_optionalChain([asset, 'optionalAccess', _155 => _155.kind]) === "audio" || at.track.kind === "audio");
4583
- const audible = clip.type === "media" && _chunkXNZFVYC2cjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
4584
- const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES : []];
4583
+ const audible = clip.type === "media" && _chunkZBCT5MEAcjs.videoAssetHasSound.call(void 0, asset) || clip.type === "sequence";
4584
+ const properties = [...visual ? ["opacity"] : [], ...audible ? ["volume"] : [], ...visual ? _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES : []];
4585
4585
  const clipTime = playheadInClip(clip, time);
4586
4586
  return properties.map((property) => {
4587
4587
  const prop = animatableOf(clip, property);
4588
- const keys = _chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
4589
- const limits = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS[property];
4588
+ const keys = _chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop) ? prop.keys : [];
4589
+ const limits = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property];
4590
4590
  return {
4591
4591
  property,
4592
4592
  ...KEY_LABELS[property],
4593
- value: Math.round(_chunkXNZFVYC2cjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
4593
+ value: Math.round(_chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, clipTime, limits.default) * 1e3) / 1e3,
4594
4594
  keyed: keys.length > 0,
4595
4595
  keys: keys.length,
4596
4596
  onKey: keys.some((k) => Math.abs(k.t - clipTime) < 0.5),
@@ -4601,44 +4601,44 @@ function videoKeyframeRows(project, clipId, time) {
4601
4601
  });
4602
4602
  }
4603
4603
  function plainValueEdit(clip, property, value) {
4604
- if (!_chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
4604
+ if (!_chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property))
4605
4605
  return value === void 0 ? { op: "update_clip", clip: clip.id, remove: [property] } : { op: "update_clip", clip: clip.id, set: { [property]: value } };
4606
4606
  const transform = { ...clip.transform, [property]: value };
4607
4607
  if (value === void 0) delete transform[property];
4608
4608
  return Object.keys(transform).length ? { op: "update_clip", clip: clip.id, set: { transform } } : { op: "update_clip", clip: clip.id, remove: ["transform"] };
4609
4609
  }
4610
4610
  function videoKeyframeValueEdit(project, clipId, property, time, value) {
4611
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, clipId);
4611
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4612
4612
  if (!at) return null;
4613
4613
  const prop = animatableOf(at.clip, property);
4614
- if (!_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
4614
+ if (!_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) return plainValueEdit(at.clip, property, value);
4615
4615
  if (value === void 0) return null;
4616
- return { op: "set_keyframes", clip: clipId, property, keys: _chunkXNZFVYC2cjs.setVideoKey.call(void 0, prop, { t: playheadInClip(at.clip, time), v: value }, _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS[property].default).keys };
4616
+ 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 };
4617
4617
  }
4618
4618
  function videoKeyframeToggleEdit(project, clipId, property, time) {
4619
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, clipId);
4619
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, clipId);
4620
4620
  if (!at) return null;
4621
4621
  const prop = animatableOf(at.clip, property);
4622
4622
  const t = playheadInClip(at.clip, time);
4623
- const fallback = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS[property].default;
4624
- if (_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, prop)) {
4623
+ const fallback = _chunkZBCT5MEAcjs.VIDEO_KEYFRAME_LIMITS[property].default;
4624
+ if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, prop)) {
4625
4625
  const key = prop.keys.find((k) => Math.abs(k.t - t) < 0.5);
4626
4626
  if (key) {
4627
- const rest = _chunkXNZFVYC2cjs.removeVideoKey.call(void 0, prop, key.t);
4628
- return _chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, rest) ? { op: "set_keyframes", clip: clipId, property, keys: rest.keys } : plainValueEdit(at.clip, property, rest === fallback ? void 0 : rest);
4627
+ const rest = _chunkZBCT5MEAcjs.removeVideoKey.call(void 0, prop, key.t);
4628
+ 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);
4629
4629
  }
4630
4630
  }
4631
- const v = _chunkXNZFVYC2cjs.videoValueAt.call(void 0, prop, t, fallback);
4632
- return { op: "set_keyframes", clip: clipId, property, keys: _chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, prop) ? _chunkXNZFVYC2cjs.setVideoKey.call(void 0, prop, { t, v }, fallback).keys : [{ t, v }] };
4631
+ const v = _chunkZBCT5MEAcjs.videoValueAt.call(void 0, prop, t, fallback);
4632
+ 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 }] };
4633
4633
  }
4634
4634
  function videoLutEdits(project, clips, lut) {
4635
4635
  const edits = [];
4636
4636
  for (const id of clips) {
4637
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, id);
4637
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id);
4638
4638
  if (!at) continue;
4639
4639
  const { lut: current, ...rest } = _nullishCoalesce(at.clip.grade, () => ( {}));
4640
4640
  if (!lut && !current) continue;
4641
- const grade = _chunkXNZFVYC2cjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
4641
+ const grade = _chunkZBCT5MEAcjs.normalizeVideoGrade.call(void 0, lut ? { ...rest, lut } : rest);
4642
4642
  edits.push(grade ? { op: "update_clip", clip: id, set: { grade } } : { op: "update_clip", clip: id, remove: ["grade"] });
4643
4643
  }
4644
4644
  return edits;
@@ -4659,7 +4659,7 @@ function videoAddAdjustmentEdits(project, time, options = {}) {
4659
4659
  const duration = _nullishCoalesce(options.duration, () => ( 3e3));
4660
4660
  const start = Math.max(0, time);
4661
4661
  const top = project.tracks[0];
4662
- const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) > start);
4662
+ const free = top && top.kind === "video" && !top.locked && !top.clips.some((c) => c.start < start + duration && _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) > start);
4663
4663
  const edits = [];
4664
4664
  let track = _optionalChain([top, 'optionalAccess', _156 => _156.id]);
4665
4665
  if (!free) {
@@ -4678,7 +4678,7 @@ function videoMaskEdit(clip, mask) {
4678
4678
  function videoSkinProtectionEdits(project, clips, amount) {
4679
4679
  const edits = [];
4680
4680
  for (const id of clips) {
4681
- const clip = _optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
4681
+ const clip = _optionalChain([_chunkZBCT5MEAcjs.findVideoClip.call(void 0, project, id), 'optionalAccess', _157 => _157.clip]);
4682
4682
  const lut = _optionalChain([clip, 'optionalAccess', _158 => _158.grade, 'optionalAccess', _159 => _159.lut]);
4683
4683
  if (!clip || !lut) continue;
4684
4684
  const { preserveSkinTones: _p, ...rest } = lut;
@@ -4712,7 +4712,7 @@ var RIPPLE = {
4712
4712
  };
4713
4713
  var MODE = {
4714
4714
  type: "string",
4715
- enum: [..._chunkXNZFVYC2cjs.VIDEO_PLACEMENT_MODES],
4715
+ enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES],
4716
4716
  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.'
4717
4717
  };
4718
4718
  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.` });
@@ -4729,11 +4729,11 @@ var TRANSFORM = object(
4729
4729
  );
4730
4730
  var TRANSITION = object(
4731
4731
  {
4732
- type: { type: "string", enum: _chunkXNZFVYC2cjs.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
+ 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." },
4733
4733
  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." },
4734
4734
  color: COLOR("For dip: the colour passed through (default black)"),
4735
- direction: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_WIPE_DIRECTIONS], description: "For wipe, push and slide: the way the edge or picture travels (default right, coming in from the left)." },
4736
- audioCurve: { type: "string", enum: [..._chunkXNZFVYC2cjs.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." }
4735
+ 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)." },
4736
+ 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." }
4737
4737
  },
4738
4738
  ["type", "duration"],
4739
4739
  "A transition from the clip that ends where this one starts on the same track."
@@ -4743,7 +4743,7 @@ var LUT_STRENGTH = { type: "number", minimum: 0, maximum: 1, description: "How m
4743
4743
  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." };
4744
4744
  var GRADE = object(
4745
4745
  {
4746
- ...Object.fromEntries(_chunkXNZFVYC2cjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
4746
+ ...Object.fromEntries(_chunkZBCT5MEAcjs.VIDEO_GRADE_CONTROLS.map((c) => [c.key, { type: "number", minimum: c.min, maximum: c.max, description: c.description }])),
4747
4747
  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).")
4748
4748
  },
4749
4749
  [],
@@ -4751,7 +4751,7 @@ var GRADE = object(
4751
4751
  );
4752
4752
  var ANIMATION = (when) => object(
4753
4753
  {
4754
- effect: { type: "string", enum: [..._chunkXNZFVYC2cjs.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
+ 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." },
4755
4755
  duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default 500)." }
4756
4756
  },
4757
4757
  ["effect"],
@@ -4761,11 +4761,11 @@ var CLIP_COMMON = {
4761
4761
  name: { type: "string", description: "A label for the clip." },
4762
4762
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Opacity 0\u20131 (default 1). A number replaces any keyframes; set_video_keyframes animates it." },
4763
4763
  transform: TRANSFORM,
4764
- fit: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_FITS], description: "How the picture fits the frame before the transform, as CSS object-fit (default contain for media, fill for colours)." },
4764
+ 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)." },
4765
4765
  grade: GRADE,
4766
4766
  animateIn: ANIMATION("How the picture enters, from the clip's start (on top of any fade in). Titles usually rise, pop or fade in."),
4767
4767
  animateOut: ANIMATION("How the picture leaves, ending at the clip's end."),
4768
- blend: { type: "string", enum: [..._chunkXNZFVYC2cjs.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
+ 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." },
4769
4769
  fadeIn: MS("Fade up from nothing (picture and sound) over this long"),
4770
4770
  fadeOut: MS("Fade down to nothing over this long")
4771
4771
  };
@@ -4774,8 +4774,8 @@ var MEDIA_FIELDS = {
4774
4774
  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." },
4775
4775
  volume: { type: "number", minimum: 0, maximum: 4, description: "Gain (1 = unchanged, default 1). A number replaces any keyframes; set_video_keyframes animates it." },
4776
4776
  muted: { type: "boolean", description: "Silence this clip (default false)." },
4777
- fadeInCurve: { type: "string", enum: [..._chunkXNZFVYC2cjs.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)." },
4778
- fadeOutCurve: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_FADE_CURVES], description: "Shape of the sound's fade out (default linear), the same choices as fadeInCurve; exponential sounds natural fading to silence." }
4777
+ 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)." },
4778
+ 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." }
4779
4779
  };
4780
4780
  var TEXT_FIELDS = {
4781
4781
  text: { type: "string", minLength: 1, description: `The title's text ("\\n" breaks lines).` },
@@ -4824,7 +4824,7 @@ var ASSET_FIELDS = {
4824
4824
  };
4825
4825
  var KEY_PROPERTY = {
4826
4826
  type: "string",
4827
- enum: [..._chunkXNZFVYC2cjs.VIDEO_KEYFRAME_PROPERTIES],
4827
+ enum: [..._chunkZBCT5MEAcjs.VIDEO_KEYFRAME_PROPERTIES],
4828
4828
  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)."
4829
4829
  };
4830
4830
  var KEYS = {
@@ -4839,7 +4839,7 @@ var KEYS = {
4839
4839
  ease: {
4840
4840
  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.",
4841
4841
  anyOf: [
4842
- { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_EASE_NAMES] },
4842
+ { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_EASE_NAMES] },
4843
4843
  { type: "array", items: { type: "number" }, minItems: 4, maxItems: 4 }
4844
4844
  ]
4845
4845
  }
@@ -4868,19 +4868,19 @@ var describeVideoTracks = (tracks) => tracks.map((t, index) => ({
4868
4868
  ...t.locked ? { locked: true } : {},
4869
4869
  ...t.syncLocked === false ? { syncLocked: false } : {},
4870
4870
  ...t.volume !== void 0 ? { volume: t.volume } : {},
4871
- clips: _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, t).map((c) => ({ ...c, end: _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkXNZFVYC2cjs.videoClipSourceRange.call(void 0, c) } : {} }))
4871
+ 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) } : {} }))
4872
4872
  }));
4873
- var videoSequenceUsers = (project, id) => _chunkXNZFVYC2cjs.allVideoTracks.call(void 0, project).flatMap(
4874
- ({ 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: _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c), source: _chunkXNZFVYC2cjs.videoClipSourceRange.call(void 0, c) }] : [])
4873
+ var videoSequenceUsers = (project, id) => _chunkZBCT5MEAcjs.allVideoTracks.call(void 0, project).flatMap(
4874
+ ({ 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) }] : [])
4875
4875
  );
4876
4876
  function describeVideoSequence(project, sequence, tracks = true) {
4877
- const cycle = _chunkXNZFVYC2cjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
4877
+ const cycle = _chunkZBCT5MEAcjs.findVideoSequenceCycle.call(void 0, project, sequence.id);
4878
4878
  return {
4879
4879
  id: sequence.id,
4880
4880
  ...sequence.name ? { name: sequence.name } : {},
4881
- duration: _chunkXNZFVYC2cjs.videoSequenceDuration.call(void 0, sequence),
4881
+ duration: _chunkZBCT5MEAcjs.videoSequenceDuration.call(void 0, sequence),
4882
4882
  clipCount: sequence.tracks.reduce((n, t) => n + t.clips.length, 0),
4883
- nests: _chunkXNZFVYC2cjs.videoSequenceChildren.call(void 0, sequence),
4883
+ nests: _chunkZBCT5MEAcjs.videoSequenceChildren.call(void 0, sequence),
4884
4884
  usedBy: videoSequenceUsers(project, sequence.id),
4885
4885
  ...cycle ? { cycle } : {},
4886
4886
  ...tracks ? { tracks: describeVideoTracks(sequence.tracks) } : { trackCount: sequence.tracks.length }
@@ -4892,7 +4892,7 @@ function describeVideoProject(project) {
4892
4892
  width: project.width,
4893
4893
  height: project.height,
4894
4894
  fps: project.fps,
4895
- duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, project),
4895
+ duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project),
4896
4896
  ...project.background ? { background: project.background } : {},
4897
4897
  assets: project.assets.map(videoAssetOut),
4898
4898
  tracks: describeVideoTracks(project.tracks),
@@ -4909,7 +4909,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4909
4909
  const project = () => controller.getProject();
4910
4910
  const outcome = (result, extra = {}) => {
4911
4911
  if (!result.ok) throw new Error(result.error);
4912
- return { ...extra, duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
4912
+ return { ...extra, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, result.project), issues: issueSummary(result.issues) };
4913
4913
  };
4914
4914
  const apply = (edits, label, extra) => {
4915
4915
  const result = controller.apply(edits, label);
@@ -4918,7 +4918,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4918
4918
  const clipOut = (p, id) => {
4919
4919
  for (const t of p.tracks) {
4920
4920
  const c = t.clips.find((x) => x.id === id);
4921
- if (c) return { track: t.id, ...c, end: _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c), ...c.type === "media" || c.type === "sequence" ? { source: _chunkXNZFVYC2cjs.videoClipSourceRange.call(void 0, c) } : {} };
4921
+ 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) } : {} };
4922
4922
  }
4923
4923
  return null;
4924
4924
  };
@@ -4930,7 +4930,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4930
4930
  });
4931
4931
  const keysOut = (p, clip, property) => {
4932
4932
  const c = clipOut(p, clip);
4933
- const value = _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
4933
+ const value = _chunkZBCT5MEAcjs.VIDEO_TRANSFORM_PROPERTIES.includes(property) ? _optionalChain([c, 'optionalAccess', _168 => _168.transform, 'optionalAccess', _169 => _169[property]]) : _optionalChain([c, 'optionalAccess', _170 => _170[property]]);
4934
4934
  return typeof value === "object" ? { keys: value.keys } : { keys: [], value: _nullishCoalesce(value, () => ( null)) };
4935
4935
  };
4936
4936
  const getProject = {
@@ -4952,8 +4952,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
4952
4952
  inputSchema: object({ time: MS("Time from the start (default: the playhead)") }),
4953
4953
  annotations: { title: "What plays at a moment", ...READ },
4954
4954
  handler: ({ time }) => {
4955
- const frame = _chunkXNZFVYC2cjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
4956
- return { ...frame, timecode: _chunkXNZFVYC2cjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
4955
+ const frame = _chunkZBCT5MEAcjs.videoFrameAt.call(void 0, project(), _nullishCoalesce(time, () => ( controller.getState().time)));
4956
+ return { ...frame, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, frame.time, project().fps) };
4957
4957
  }
4958
4958
  };
4959
4959
  const listSequences = {
@@ -4981,7 +4981,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
4981
4981
  annotations: { title: "Find gaps", ...READ },
4982
4982
  handler: ({ track }) => {
4983
4983
  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(", ")}.`);
4984
- return { gaps: _chunkXNZFVYC2cjs.findVideoGaps.call(void 0, project(), track) };
4984
+ return { gaps: _chunkZBCT5MEAcjs.findVideoGaps.call(void 0, project(), track) };
4985
4985
  }
4986
4986
  };
4987
4987
  const checkProject = {
@@ -5011,7 +5011,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5011
5011
  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)))];
5012
5012
  const missing = (await Promise.all(lutSrcs.map((src) => controller.luts.load(src).then(() => null, (e) => e.message)))).filter((m) => !!m);
5013
5013
  const svgOptions = { lutFor: (src) => controller.luts.peek(src), ...columns ? { columns } : {} };
5014
- const svg = times ? _chunkXNZFVYC2cjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkXNZFVYC2cjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
5014
+ const svg = times ? _chunkZBCT5MEAcjs.videoContactSheetSvg.call(void 0, p, times, svgOptions) : _chunkZBCT5MEAcjs.videoProjectSvg.call(void 0, p, _nullishCoalesce(time, () => ( controller.getState().time)), svgOptions);
5015
5015
  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."] : []];
5016
5016
  if (format === "png") {
5017
5017
  if (!options.rasterize) throw new Error('This host cannot make PNG images; call render_video_frame with format "svg".');
@@ -5101,7 +5101,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5101
5101
  if (play === true) controller.play();
5102
5102
  if (play === false) controller.pause();
5103
5103
  const state = controller.getState();
5104
- return { time: state.time, timecode: _chunkXNZFVYC2cjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
5104
+ return { time: state.time, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, state.time, p.fps), playing: state.playing, clips: state.current };
5105
5105
  }
5106
5106
  };
5107
5107
  const setSettings = {
@@ -5227,7 +5227,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5227
5227
  inputSchema: object(
5228
5228
  {
5229
5229
  clip: CLIP_ID,
5230
- 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: [..._chunkXNZFVYC2cjs.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
+ 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)."),
5231
5231
  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).' }
5232
5232
  },
5233
5233
  ["clip"]
@@ -5246,7 +5246,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5246
5246
  const gradeTargets = (ids) => {
5247
5247
  const p = project();
5248
5248
  for (const id of ids) {
5249
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, p, id);
5249
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
5250
5250
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5251
5251
  const { clip } = at;
5252
5252
  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")
@@ -5260,7 +5260,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5260
5260
  inputSchema: object(
5261
5261
  {
5262
5262
  clips: { type: "array", items: CLIP_ID, minItems: 1, description: "Clips on video tracks to grade." },
5263
- preset: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
5263
+ preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "The look." },
5264
5264
  amount: { type: "number", minimum: 0, maximum: 1, description: "Strength, 0 (none) to 1 (full, the default); 0.5 is a subtler version." }
5265
5265
  },
5266
5266
  ["clips", "preset"]
@@ -5269,10 +5269,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
5269
5269
  handler: ({ clips, preset, amount }) => {
5270
5270
  gradeTargets(clips);
5271
5271
  const edits = clips.map((clip) => {
5272
- const grade = _chunkXNZFVYC2cjs.videoGradeLook.call(void 0, _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
5272
+ const grade = _chunkZBCT5MEAcjs.videoGradeLook.call(void 0, _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), clip).clip.grade, preset, _nullishCoalesce(amount, () => ( 1)));
5273
5273
  return grade ? { op: "update_clip", clip, set: { grade } } : { op: "update_clip", clip, remove: ["grade"] };
5274
5274
  });
5275
- return apply(edits, `Apply ${preset} look`, (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _178 => _178.clip, 'access', _179 => _179.grade]), () => ( null)) })) }));
5275
+ 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)) })) }));
5276
5276
  }
5277
5277
  };
5278
5278
  const copyGrade = {
@@ -5283,7 +5283,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5283
5283
  annotations: { title: "Copy a colour grade", ...WRITE_IDEMPOTENT },
5284
5284
  handler: ({ from, to }) => {
5285
5285
  gradeTargets([from, ...to]);
5286
- const grade = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project(), from).clip.grade;
5286
+ const grade = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), from).clip.grade;
5287
5287
  const edits = to.map((clip) => grade ? { op: "update_clip", clip, set: { grade: { ...grade } } } : { op: "update_clip", clip, remove: ["grade"] });
5288
5288
  return apply(edits, "Copy grade", () => ({ grade: _nullishCoalesce(grade, () => ( null)), clips: to }));
5289
5289
  }
@@ -5309,7 +5309,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5309
5309
  const lut = await controller.luts.load(src);
5310
5310
  const label = _nullishCoalesce(name, () => ( lut.title));
5311
5311
  const setting = { src, ...strength !== void 0 && strength !== 1 ? { strength } : {}, ...label ? { name: label } : {}, ...preserve_skin_tones ? { preserveSkinTones: preserve_skin_tones } : {} };
5312
- 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([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _180 => _180.clip, 'access', _181 => _181.grade]), () => ( null)) })) }));
5312
+ 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)) })) }));
5313
5313
  }
5314
5314
  };
5315
5315
  const removeLut = {
@@ -5321,9 +5321,9 @@ function createVideoEditorToolProvider(controller, options = {}) {
5321
5321
  handler: ({ clips }) => {
5322
5322
  gradeTargets(clips);
5323
5323
  const p = project();
5324
- const withLut = clips.filter((id) => _optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, p, id), 'access', _182 => _182.clip, 'access', _183 => _183.grade, 'optionalAccess', _184 => _184.lut]));
5324
+ 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]));
5325
5325
  if (!withLut.length) throw new Error(`None of ${clips.map((c) => `"${c}"`).join(", ")} has a LUT; get_video_project shows each clip's grade.`);
5326
- return apply(videoLutEdits(p, withLut, null), "Remove LUT", (r) => ({ clips: clips.map((id) => ({ id, grade: _nullishCoalesce(_optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _185 => _185.clip, 'access', _186 => _186.grade]), () => ( null)) })) }));
5326
+ 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)) })) }));
5327
5327
  }
5328
5328
  };
5329
5329
  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." };
@@ -5432,7 +5432,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5432
5432
  approximate: parsed.approximate,
5433
5433
  first: list[0],
5434
5434
  last: list[list.length - 1],
5435
- ...a.duration !== void 0 && list[list.length - 1].end > a.duration + _chunkXNZFVYC2cjs.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
+ ...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?` } : {}
5436
5436
  }));
5437
5437
  }
5438
5438
  };
@@ -5503,22 +5503,22 @@ function createVideoEditorToolProvider(controller, options = {}) {
5503
5503
  const bad = ranges.findIndex((r) => !(r.to > r.from));
5504
5504
  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".`);
5505
5505
  const merged = mergeVideoRanges(ranges);
5506
- const before = _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, project());
5507
- return apply(videoRemoveRangesEdits(merged, tracks), merged.length > 1 ? `Cut ${merged.length} stretches` : "Cut stretch", (r) => ({ removed: merged.length, time: round(before - _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, r.project)), duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, r.project) }));
5506
+ const before = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, project());
5507
+ 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) }));
5508
5508
  }
5509
5509
  };
5510
5510
  const rampTarget = (id) => {
5511
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project(), id);
5511
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
5512
5512
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5513
5513
  const { clip } = at;
5514
5514
  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.`);
5515
- if (clip.type !== "media") throw new Error(`Clip "${id}" is a ${_chunkXNZFVYC2cjs.videoClipTypeLabel.call(void 0, clip)}, so it has no source to change the speed of; use a video or audio clip.`);
5515
+ 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.`);
5516
5516
  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.`);
5517
5517
  return clip;
5518
5518
  };
5519
5519
  const rampOut = (r, id) => {
5520
5520
  const outcome2 = r.outcomes[r.outcomes.length - 1];
5521
- return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, r.project) };
5521
+ return { clip: clipOut(r.project, id), ...outcome2.rippled ? { rippled: outcome2.rippled } : {}, duration: _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, r.project) };
5522
5522
  };
5523
5523
  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." };
5524
5524
  const setSpeedRamp = {
@@ -5549,8 +5549,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
5549
5549
  ),
5550
5550
  annotations: { title: "Ramp the speed", ...WRITE_IDEMPOTENT },
5551
5551
  handler: ({ clip, segments, ripple }) => {
5552
- const edit = _chunkXNZFVYC2cjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
5553
- return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkXNZFVYC2cjs.videoSpeedRampKeys.call(void 0, segments).source) }));
5552
+ const edit = _chunkZBCT5MEAcjs.videoSpeedRampEdit.call(void 0, rampTarget(clip), segments, _nullishCoalesce(ripple, () => ( true)));
5553
+ return apply(edit, "Speed ramp", (r) => ({ ...rampOut(r, clip), source: Math.round(_chunkZBCT5MEAcjs.videoSpeedRampKeys.call(void 0, segments).source) }));
5554
5554
  }
5555
5555
  };
5556
5556
  const addFreeze = {
@@ -5570,8 +5570,8 @@ function createVideoEditorToolProvider(controller, options = {}) {
5570
5570
  handler: ({ clip, at, duration, ripple }) => {
5571
5571
  const c = rampTarget(clip);
5572
5572
  const t = at - c.start;
5573
- if (t < 0 || t > c.duration) throw new Error(`${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, at)} is outside clip "${clip}" (${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, c.start)}\u2013${_chunkXNZFVYC2cjs.formatVideoSeconds.call(void 0, _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c))}); pick a time inside it.`);
5574
- return apply(_chunkXNZFVYC2cjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
5573
+ 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.`);
5574
+ return apply(_chunkZBCT5MEAcjs.videoFreezeFrameEdit.call(void 0, c, t, duration, _nullishCoalesce(ripple, () => ( true))), "Freeze frame", (r) => rampOut(r, clip));
5575
5575
  }
5576
5576
  };
5577
5577
  const removeRamp = {
@@ -5744,7 +5744,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5744
5744
  let from;
5745
5745
  let to;
5746
5746
  if (args.clip !== void 0) {
5747
- const found = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, p, args.clip);
5747
+ const found = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, args.clip);
5748
5748
  if (!found) throw new Error(`There is no clip "${args.clip}"; get_video_project lists the clips.`);
5749
5749
  const c = found.clip;
5750
5750
  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).`);
@@ -5754,7 +5754,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5754
5754
  toSource = (t) => (_nullishCoalesce(c.in, () => ( 0))) + (t - c.start) * speed;
5755
5755
  toOut = (s) => c.start + (s - (_nullishCoalesce(c.in, () => ( 0)))) / speed;
5756
5756
  from = Math.max(c.start, _nullishCoalesce(args.from, () => ( c.start)));
5757
- to = Math.min(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c))));
5757
+ to = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c))));
5758
5758
  } else {
5759
5759
  asset = p.assets.find((a) => a.id === args.asset);
5760
5760
  if (!asset) throw new Error(`There is no asset "${args.asset}"; the assets are ${p.assets.map((a) => `"${a.id}"`).join(", ") || "none"}.`);
@@ -5835,15 +5835,15 @@ function createVideoEditorToolProvider(controller, options = {}) {
5835
5835
  annotations: { title: "Measure a frame with scopes", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
5836
5836
  handler: async ({ time, bins, columns }) => {
5837
5837
  const p = project();
5838
- const end = _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, p);
5838
+ const end = _chunkZBCT5MEAcjs.videoProjectDuration.call(void 0, p);
5839
5839
  const t = _nullishCoalesce(time, () => ( controller.getState().time));
5840
5840
  if (time !== void 0 && time > end) throw new Error(`Time ${time} ms is past the end of the project (${end} ms).`);
5841
5841
  const pixels = await pixelsAt(t);
5842
- return { time: t, timecode: _chunkXNZFVYC2cjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
5842
+ return { time: t, timecode: _chunkZBCT5MEAcjs.formatVideoTimecode.call(void 0, t, p.fps), width: pixels.width, height: pixels.height, ...summarizeVideoScopes(pixels, { bins, columns }) };
5843
5843
  }
5844
5844
  };
5845
5845
  const MASK_FIELDS = {
5846
- shape: { type: "string", enum: [..._chunkXNZFVYC2cjs.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
+ 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)." },
5847
5847
  x: { type: "number", description: "Centre across the clip's picture, 0 (left edge) to 1 (right edge); default 0.5." },
5848
5848
  y: { type: "number", description: "Centre down the clip's picture, 0 (top) to 1 (bottom); default 0.5." },
5849
5849
  width: { type: "number", minimum: 0, description: "Width as a fraction of the picture's width (default 0.5). Unused by linear." },
@@ -5863,10 +5863,10 @@ function createVideoEditorToolProvider(controller, options = {}) {
5863
5863
  track: { ...TRACK_ID, description: 'A video track to put it on; tracks below it are "underneath".' },
5864
5864
  start: MS("Where it starts on the timeline (default: the end of the track)"),
5865
5865
  duration: { type: "number", exclusiveMinimum: 0, description: "How long it lasts, in ms (default 3000)." },
5866
- scope: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
5866
+ scope: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_ADJUSTMENT_SCOPES], description: "Which pictures it changes: underneath (default), all or track." },
5867
5867
  target_track: { ...TRACK_ID, description: 'For scope "track" (required then): the track whose pictures it changes.' },
5868
5868
  grade: GRADE,
5869
- preset: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
5869
+ preset: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_GRADE_PRESET_NAMES], description: "A named look to start from (grade settings given override it)." },
5870
5870
  amount: { type: "number", minimum: 0, maximum: 1, description: "Strength of the preset, 0\u20131 (default 1)." },
5871
5871
  name: { type: "string", minLength: 1, description: 'A label for the clip (e.g. "Night look").' },
5872
5872
  id: { type: "string", minLength: 1, description: 'Your own id for the clip (default: a fresh one such as "c7").' },
@@ -5880,13 +5880,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
5880
5880
  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.`);
5881
5881
  if (scope === "track" && !target_track) throw new Error('Scope "track" needs target_track: the id of the track whose pictures it changes.');
5882
5882
  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".');
5883
- const look = { ...preset ? _chunkXNZFVYC2cjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
5883
+ const look = { ...preset ? _chunkZBCT5MEAcjs.videoGradePreset.call(void 0, preset, _nullishCoalesce(amount, () => ( 1))) : {}, ..._nullishCoalesce(grade, () => ( {})) };
5884
5884
  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 } : {} };
5885
5885
  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." } }));
5886
5886
  }
5887
5887
  };
5888
5888
  const maskTarget = (id) => {
5889
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project(), id);
5889
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id);
5890
5890
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
5891
5891
  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.`);
5892
5892
  return at;
@@ -5928,13 +5928,13 @@ function createVideoEditorToolProvider(controller, options = {}) {
5928
5928
  gradeTargets(clips);
5929
5929
  const edits = [];
5930
5930
  for (const id of clips) {
5931
- const clip = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, project(), id).clip;
5931
+ const clip = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, project(), id).clip;
5932
5932
  const lut = _optionalChain([clip, 'access', _196 => _196.grade, 'optionalAccess', _197 => _197.lut]);
5933
5933
  if (!lut) throw new Error(`Clip "${id}" has no LUT to protect skin from; add one with set_video_lut first.`);
5934
5934
  const { preserveSkinTones: _p, ...rest } = lut;
5935
5935
  edits.push({ op: "update_clip", clip: id, set: { grade: { ...clip.grade, lut: amount > 0 ? { ...rest, preserveSkinTones: amount } : rest } } });
5936
5936
  }
5937
- return apply(edits, amount > 0 ? "Protect skin tones" : "Stop protecting skin tones", (r) => ({ clips: clips.map((id) => ({ id, lut: _nullishCoalesce(_optionalChain([_chunkXNZFVYC2cjs.findVideoClip.call(void 0, r.project, id), 'optionalAccess', _198 => _198.clip, 'access', _199 => _199.grade, 'optionalAccess', _200 => _200.lut]), () => ( null)) })) }));
5937
+ 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)) })) }));
5938
5938
  }
5939
5939
  };
5940
5940
  const planOut = (plan) => ({
@@ -5987,7 +5987,7 @@ function createVideoEditorToolProvider(controller, options = {}) {
5987
5987
  handler: ({ plan }) => {
5988
5988
  const r = controller.applyPlan(plan);
5989
5989
  if (!r.ok) throw new Error(r.error);
5990
- return { plan: r.plan.id, title: r.plan.title, stale: r.stale, outcomes: r.outcomes, duration: _chunkXNZFVYC2cjs.videoProjectDuration.call(void 0, r.project), issues: issueSummary(r.issues) };
5990
+ 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) };
5991
5991
  }
5992
5992
  };
5993
5993
  const discardPlan = {
@@ -6075,7 +6075,7 @@ function videoCameraMoveTools(controller, ctx) {
6075
6075
  clip: { type: "string", minLength: 1, description: "A clip id with a picture, from get_video_project." },
6076
6076
  role: ROLE,
6077
6077
  move: { type: "string", minLength: 1, description: "A camera move id of that role from list_video_camera_moves." },
6078
- ms: { type: "number", minimum: 0, maximum: _chunkGHCSC2WPcjs.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
+ 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.` },
6079
6079
  preset: { type: "string", minLength: 1, description: "A preset of the move by name, from describe_effect." },
6080
6080
  values: ctx.valuesSchema("Control values over the move's defaults (and the preset's), from describe_effect"),
6081
6081
  from: FRAMING("Where a transition starts."),
@@ -6125,7 +6125,7 @@ var KEYS2 = {
6125
6125
  properties: {
6126
6126
  t: { type: "number", description: "Clip-relative time in ms (0 = the clip's start)." },
6127
6127
  v: { type: "number", description: "The control's value at t, within its range from describe_effect." },
6128
- ease: { anyOf: [{ type: "string", enum: [..._chunkXNZFVYC2cjs.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
+ 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]." }
6129
6129
  },
6130
6130
  required: ["t", "v"],
6131
6131
  additionalProperties: false
@@ -6139,7 +6139,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6139
6139
  return controller.readOnlyReason();
6140
6140
  };
6141
6141
  const clipOf = (id) => {
6142
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, controller.getProject(), id);
6142
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), id);
6143
6143
  if (!at) {
6144
6144
  const ids = controller.getProject().tracks.flatMap((t) => t.clips.map((c) => c.id));
6145
6145
  throw new Error(`There is no clip "${id}"; the clips are ${ids.map((c) => `"${c}"`).join(", ") || "none"} (get_video_project lists them).`);
@@ -6152,7 +6152,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6152
6152
  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])));
6153
6153
  return { target, effect, effects, ...extra };
6154
6154
  };
6155
- return withVideoPlayback(_chunkGHCSC2WPcjs.createEffectToolProvider.call(void 0, {
6155
+ return withVideoPlayback(_chunkISIO63Q5cjs.createEffectToolProvider.call(void 0, {
6156
6156
  id: _nullishCoalesce(options.id, () => ( "video-effects")),
6157
6157
  namespace: options.namespace,
6158
6158
  title: "Video effects",
@@ -6198,7 +6198,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6198
6198
  subscribe: (notify) => controller.subscribe(() => notify()),
6199
6199
  extraTools: (ctx) => [
6200
6200
  ...videoCameraMoveTools(controller, ctx),
6201
- ..._chunkK5DS2JTAcjs.effectTemplateTools.call(void 0,
6201
+ ..._chunkZ3BRH4JKcjs.effectTemplateTools.call(void 0,
6202
6202
  {
6203
6203
  provider: () => controller.effectsProvider,
6204
6204
  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.`,
@@ -6225,7 +6225,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6225
6225
  duration: { type: "number", exclusiveMinimum: 0, description: "Length in ms (default: the effect's own length, else 5000)." },
6226
6226
  values: ctx.valuesSchema("Control values over the effect's defaults", true),
6227
6227
  name: { type: "string", minLength: 1, description: "A label for the clip (default: the effect's name)." },
6228
- mode: { type: "string", enum: [..._chunkXNZFVYC2cjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
6228
+ mode: { type: "string", enum: [..._chunkZBCT5MEAcjs.VIDEO_PLACEMENT_MODES], description: "What to do with clips already there: refuse (default), overwrite or insert." }
6229
6229
  },
6230
6230
  required: ["track", "effect"],
6231
6231
  additionalProperties: false
@@ -6326,7 +6326,7 @@ function createVideoEffectsToolProvider(controller, options = {}) {
6326
6326
  const clip = clipOf(args.clip);
6327
6327
  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).`);
6328
6328
  const was = _optionalChain([clip, 'access', _207 => _207.values, 'optionalAccess', _208 => _208[args.control]]);
6329
- const plain = keys === null ? _chunkXNZFVYC2cjs.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
+ 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) };
6330
6330
  if (plain === void 0) throw new Error(`"${args.control}" has no value to keep; give keys instead.`);
6331
6331
  r = await controller.updateEffectValues(args.clip, "generator", { [args.control]: plain });
6332
6332
  } else r = await controller.setClipEffectKeyframes(args.clip, args.effect, args.control, keys);
@@ -6404,7 +6404,7 @@ function createVideoDialogueToolProvider(controller, options = {}) {
6404
6404
  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" });
6405
6405
  if (!r.ok) throw new Error(r.error);
6406
6406
  const p = r.plan;
6407
- return { plan: { id: p.id, title: p.title, summary: p.summary, text: describeVideoEditPlan(p), cuts: cuts.length }, durationNow: _chunkXNZFVYC2cjs.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
+ 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).` };
6408
6408
  }
6409
6409
  };
6410
6410
  return withVideoPlayback(
@@ -6451,7 +6451,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6451
6451
  };
6452
6452
  const project = () => controller.getProject();
6453
6453
  const soundClip = (p, id) => {
6454
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, p, id);
6454
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, p, id);
6455
6455
  if (!at) throw new Error(`There is no clip "${id}"; get_video_project lists the clips.`);
6456
6456
  const c = at.clip;
6457
6457
  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.`);
@@ -6467,8 +6467,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
6467
6467
  const { clip, asset: asset2 } = soundClip(p, args.clip);
6468
6468
  const speed = _nullishCoalesce(clip.speed, () => ( 1));
6469
6469
  const from2 = Math.max(clip.start, _nullishCoalesce(args.from, () => ( clip.start)));
6470
- const to2 = Math.min(_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip))));
6471
- 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${_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, clip)} ms) with "to" after "from".`);
6470
+ const to2 = Math.min(_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip), _nullishCoalesce(args.to, () => ( _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, clip))));
6471
+ 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".`);
6472
6472
  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 };
6473
6473
  }
6474
6474
  const asset = p.assets.find((a) => a.id === args.asset);
@@ -6510,7 +6510,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6510
6510
  handler: async ({ clips, target, ceiling, replace }) => {
6511
6511
  const p = project();
6512
6512
  const targets = clips.map((id) => soundClip(p, id));
6513
- for (const t of targets) if (_chunkXNZFVYC2cjs.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
+ 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.`);
6514
6514
  const results = [];
6515
6515
  const edits = [];
6516
6516
  for (const { clip, asset } of targets) {
@@ -6555,7 +6555,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6555
6555
  handler: async (args) => {
6556
6556
  const p = project();
6557
6557
  const music = args.music.map((id) => soundClip(p, id));
6558
- for (const m of music) if (_chunkXNZFVYC2cjs.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
+ 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.`);
6559
6559
  const transcriptTrack = videoTranscriptTrack(p, args.dialogue_track);
6560
6560
  const mode = _nullishCoalesce(args.speech, () => ( (transcriptTrack && videoTimelineTranscript(p, { track: transcriptTrack }).length ? "transcript" : "audio")));
6561
6561
  let ranges = [];
@@ -6568,7 +6568,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6568
6568
  const track = p.tracks.find((t) => t.id === args.dialogue_track);
6569
6569
  if (!track) throw new Error(`There is no track "${args.dialogue_track}".`);
6570
6570
  const musicIds = new Set(music.map((m) => m.clip.id));
6571
- for (const c of _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track)) {
6571
+ for (const c of _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track)) {
6572
6572
  if (c.type !== "media" || musicIds.has(c.id)) continue;
6573
6573
  const asset = p.assets.find((a) => a.id === c.asset);
6574
6574
  if (!asset || asset.kind === "image" || asset.hasAudio === false) continue;
@@ -6579,10 +6579,10 @@ function createVideoMusicToolProvider(controller, options = {}) {
6579
6579
  let at = c.start;
6580
6580
  for (const s of silences) {
6581
6581
  const a = c.start + (s.start - src0) / speed;
6582
- if (a - at > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
6582
+ if (a - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: a });
6583
6583
  at = c.start + (s.end - src0) / speed;
6584
6584
  }
6585
- if (_chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) - at > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, c) });
6585
+ if (_chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) - at > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) ranges.push({ from: at, to: _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, c) });
6586
6586
  }
6587
6587
  if (!ranges.length) throw new Error(`Track "${args.dialogue_track}" has no sound above -40 dBFS, so there is no speech to duck under.`);
6588
6588
  }
@@ -6645,7 +6645,7 @@ function createVideoMusicToolProvider(controller, options = {}) {
6645
6645
  if (!beats.length) throw new Error(`No beats were found in "${args.music}"; try a lower sensitivity, or pass beats.`);
6646
6646
  } else beats = [...args.beats].sort((a, b) => a - b);
6647
6647
  const tolerance = _nullishCoalesce(args.tolerance, () => ( 150));
6648
- const clips = _chunkXNZFVYC2cjs.sortedVideoClips.call(void 0, track);
6648
+ const clips = _chunkZBCT5MEAcjs.sortedVideoClips.call(void 0, track);
6649
6649
  const edits = [];
6650
6650
  const ranges = [];
6651
6651
  const skipped = [];
@@ -6653,8 +6653,8 @@ function createVideoMusicToolProvider(controller, options = {}) {
6653
6653
  for (let i = 0; i + 1 < clips.length; i++) {
6654
6654
  const left = clips[i];
6655
6655
  const right = clips[i + 1];
6656
- const cut = _chunkXNZFVYC2cjs.videoClipEnd.call(void 0, left);
6657
- if (Math.abs(right.start - cut) > _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON) continue;
6656
+ const cut = _chunkZBCT5MEAcjs.videoClipEnd.call(void 0, left);
6657
+ if (Math.abs(right.start - cut) > _chunkZBCT5MEAcjs.VIDEO_TIME_EPSILON) continue;
6658
6658
  const beat = nearestVideoBeat(beats, cut, tolerance);
6659
6659
  if (beat === null) {
6660
6660
  skipped.push({ cut: round4(cut), reason: `no beat within ${tolerance} ms` });
@@ -6729,7 +6729,7 @@ function videoClipEffectDocument(clip, instance, providerId) {
6729
6729
  const values = {};
6730
6730
  const tracks = {};
6731
6731
  for (const [control, v] of Object.entries(_nullishCoalesce(effect.values, () => ( {})))) {
6732
- if (_chunkXNZFVYC2cjs.isVideoKeyframes.call(void 0, v)) {
6732
+ if (_chunkZBCT5MEAcjs.isVideoKeyframes.call(void 0, v)) {
6733
6733
  values[control] = v.keys[0].v;
6734
6734
  tracks[control] = v.keys.map((k) => ({ time: k.t, value: k.v, ...k.ease && k.ease !== "linear" ? { easing: videoEaseToAnimationEasing(k.ease) } : {} }));
6735
6735
  } else values[control] = v;
@@ -6770,10 +6770,10 @@ function videoEffectValuesFromDocument(doc) {
6770
6770
  async function openVideoClipEffectAuthoring(controller, clip, instance, options = {}) {
6771
6771
  const provider = controller.effectsProvider;
6772
6772
  if (!provider) throw new Error("No effects provider is registered, so the effect cannot be opened for authoring; register one with setEffectsProvider.");
6773
- const at = _chunkXNZFVYC2cjs.findVideoClip.call(void 0, controller.getProject(), clip);
6773
+ const at = _chunkZBCT5MEAcjs.findVideoClip.call(void 0, controller.getProject(), clip);
6774
6774
  if (!at) throw new Error(`There is no clip "${clip}".`);
6775
6775
  const doc = videoClipEffectDocument(at.clip, instance, provider.id);
6776
- const session = await _chunkQOBCBGGIcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
6776
+ const session = await _chunkQKXO6JPPcjs.createEffectAuthoringSession.call(void 0, { document: doc }, { ...options, provider });
6777
6777
  return {
6778
6778
  clip,
6779
6779
  instance,
@@ -7127,4 +7127,4 @@ function createVideoEditorDocument(controller) {
7127
7127
 
7128
7128
 
7129
7129
 
7130
- exports.TranscriptVideoController = TranscriptVideoController; exports.VIDEO_ADJUSTMENT_SCOPES = _chunkXNZFVYC2cjs.VIDEO_ADJUSTMENT_SCOPES; exports.VIDEO_ADJUSTMENT_SCOPE_LABELS = VIDEO_ADJUSTMENT_SCOPE_LABELS; exports.VIDEO_BLEND_MODES = _chunkXNZFVYC2cjs.VIDEO_BLEND_MODES; exports.VIDEO_BLEND_MODE_LABELS = VIDEO_BLEND_MODE_LABELS; exports.VIDEO_CLIP_ANIMATION_DURATION = _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_DURATION; exports.VIDEO_CLIP_ANIMATION_EFFECTS = _chunkXNZFVYC2cjs.VIDEO_CLIP_ANIMATION_EFFECTS; exports.VIDEO_CLIP_ANIMATION_LABELS = VIDEO_CLIP_ANIMATION_LABELS; exports.VIDEO_CLIP_TYPES = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.VIDEO_EASE_NAMES; exports.VIDEO_EDIT_OPS = VIDEO_EDIT_OPS; exports.VIDEO_EFFECT_PLACES = _chunkXNZFVYC2cjs.VIDEO_EFFECT_PLACES; exports.VIDEO_FADE_CURVES = _chunkXNZFVYC2cjs.VIDEO_FADE_CURVES; exports.VIDEO_FADE_CURVE_LABELS = VIDEO_FADE_CURVE_LABELS; exports.VIDEO_FITS = _chunkXNZFVYC2cjs.VIDEO_FITS; exports.VIDEO_GRADE_CONTROLS = _chunkXNZFVYC2cjs.VIDEO_GRADE_CONTROLS; exports.VIDEO_GRADE_PRESETS = _chunkXNZFVYC2cjs.VIDEO_GRADE_PRESETS; exports.VIDEO_GRADE_PRESET_NAMES = _chunkXNZFVYC2cjs.VIDEO_GRADE_PRESET_NAMES; exports.VIDEO_ISSUE_CODES = VIDEO_ISSUE_CODES; exports.VIDEO_KEYFRAME_LIMITS = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_LIMITS; exports.VIDEO_KEYFRAME_PROPERTIES = _chunkXNZFVYC2cjs.VIDEO_KEYFRAME_PROPERTIES; exports.VIDEO_LOUDNESS_HOP = VIDEO_LOUDNESS_HOP; exports.VIDEO_LUT_MAX_SIZE = _chunkXNZFVYC2cjs.VIDEO_LUT_MAX_SIZE; exports.VIDEO_MASK_DEFAULTS = _chunkXNZFVYC2cjs.VIDEO_MASK_DEFAULTS; exports.VIDEO_MASK_SHAPES = _chunkXNZFVYC2cjs.VIDEO_MASK_SHAPES; exports.VIDEO_MASK_SHAPE_LABELS = VIDEO_MASK_SHAPE_LABELS; exports.VIDEO_PEAK_BLOCK = VIDEO_PEAK_BLOCK; exports.VIDEO_PLACEMENT_MODES = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.VIDEO_TIME_EPSILON; exports.VIDEO_TRANSFORM_PROPERTIES = _chunkXNZFVYC2cjs.VIDEO_TRANSFORM_PROPERTIES; exports.VIDEO_TRANSITION_LABELS = VIDEO_TRANSITION_LABELS; exports.VIDEO_TRANSITION_TYPES = _chunkXNZFVYC2cjs.VIDEO_TRANSITION_TYPES; exports.VIDEO_VECTORSCOPE_TARGETS = VIDEO_VECTORSCOPE_TARGETS; exports.VIDEO_WIPE_DIRECTIONS = _chunkXNZFVYC2cjs.VIDEO_WIPE_DIRECTIONS; exports.VideoAudioPeaksCache = VideoAudioPeaksCache; exports.VideoEditorController = VideoEditorController; exports.VideoEffectsEngine = _chunkXNZFVYC2cjs.VideoEffectsEngine; exports.VideoFrameCache = VideoFrameCache; exports.VideoLutCache = _chunkXNZFVYC2cjs.VideoLutCache; exports.VideoPathGesture = VideoPathGesture; exports.VideoPreviewEngine = VideoPreviewEngine; exports.VideoPreviewPixels = VideoPreviewPixels; exports.allVideoClipIds = _chunkXNZFVYC2cjs.allVideoClipIds; exports.allVideoTracks = _chunkXNZFVYC2cjs.allVideoTracks; exports.animationEasingToVideoEase = animationEasingToVideoEase; exports.applyVideoEdits = applyVideoEdits; exports.applyVideoGrade = _chunkXNZFVYC2cjs.applyVideoGrade; exports.applyVideoLut = _chunkXNZFVYC2cjs.applyVideoLut; exports.applyVideoLutToPixels = _chunkXNZFVYC2cjs.applyVideoLutToPixels; exports.bakeVideoClipCamera = bakeVideoClipCamera; exports.buildVideoAudioPeaks = buildVideoAudioPeaks; exports.checkVideoEffectPlace = _chunkXNZFVYC2cjs.checkVideoEffectPlace; exports.checkVideoEffectValues = _chunkXNZFVYC2cjs.checkVideoEffectValues; exports.checkVideoProject = checkVideoProject; exports.checkVideoTimeRemap = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.drawVideoFrame; exports.ffmpegFilterValue = _chunkXNZFVYC2cjs.ffmpegFilterValue; exports.findVideoAudioBeats = findVideoAudioBeats; exports.findVideoAudioSilences = findVideoAudioSilences; exports.findVideoClip = _chunkXNZFVYC2cjs.findVideoClip; exports.findVideoFillers = findVideoFillers; exports.findVideoGaps = _chunkXNZFVYC2cjs.findVideoGaps; exports.findVideoRepetitions = findVideoRepetitions; exports.findVideoSequenceClip = _chunkXNZFVYC2cjs.findVideoSequenceClip; exports.findVideoSequenceCycle = _chunkXNZFVYC2cjs.findVideoSequenceCycle; exports.findVideoTranscriptPauses = findVideoTranscriptPauses; exports.findVideoTranscriptText = findVideoTranscriptText; exports.formatVideoSeconds = _chunkXNZFVYC2cjs.formatVideoSeconds; exports.formatVideoTimecode = _chunkXNZFVYC2cjs.formatVideoTimecode; exports.formatVideoTimecodeFrames = _chunkXNZFVYC2cjs.formatVideoTimecodeFrames; exports.framePointsToPicture = framePointsToPicture; exports.isVideoDropFrameRate = _chunkXNZFVYC2cjs.isVideoDropFrameRate; exports.isVideoKeyframes = _chunkXNZFVYC2cjs.isVideoKeyframes; exports.measureVideoLoudness = measureVideoLoudness; exports.mergeVideoRanges = mergeVideoRanges; exports.mixEffectPixels = _chunkXNZFVYC2cjs.mixEffectPixels; exports.nearestVideoBeat = nearestVideoBeat; exports.nextFreeVideoSlot = _chunkXNZFVYC2cjs.nextFreeVideoSlot; exports.normalizeVideoClipMask = _chunkXNZFVYC2cjs.normalizeVideoClipMask; exports.normalizeVideoGrade = _chunkXNZFVYC2cjs.normalizeVideoGrade; exports.normalizeVideoGradeLut = _chunkXNZFVYC2cjs.normalizeVideoGradeLut; exports.normalizeVideoWord = normalizeVideoWord; exports.openVideoClipEffectAuthoring = openVideoClipEffectAuthoring; exports.overEffectPixels = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.parseVideoCubeLut; exports.parseVideoEffectRef = parseVideoEffectRef; exports.parseVideoEffectValues = parseVideoEffectValues; exports.parseVideoGrade = parseVideoGrade; exports.parseVideoGradeLut = parseVideoGradeLut; exports.parseVideoKeyframes = parseVideoKeyframes; exports.parseVideoLoudnessMeasurement = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.placeVideoRect; exports.planVideoClipDrag = planVideoClipDrag; exports.planVideoEdits = planVideoEdits; exports.planVideoPrefetch = planVideoPrefetch; exports.planVideoToolPlayback = planVideoToolPlayback; exports.probeVideoMedia = probeVideoMedia; exports.readVideoScopesPanel = readVideoScopesPanel; exports.removeVideoKey = _chunkXNZFVYC2cjs.removeVideoKey; exports.renderVideoFrameExact = _chunkXNZFVYC2cjs.renderVideoFrameExact; exports.resolveVideoPreviewScale = resolveVideoPreviewScale; exports.retimeVideoAnimatable = _chunkXNZFVYC2cjs.retimeVideoAnimatable; exports.setVideoKey = _chunkXNZFVYC2cjs.setVideoKey; exports.snapToVideoFrame = _chunkXNZFVYC2cjs.snapToVideoFrame; exports.snapVideoTime = _chunkXNZFVYC2cjs.snapVideoTime; exports.sortVideoKeys = _chunkXNZFVYC2cjs.sortVideoKeys; exports.sortedVideoClips = _chunkXNZFVYC2cjs.sortedVideoClips; exports.splitVideoAnimatable = _chunkXNZFVYC2cjs.splitVideoAnimatable; exports.summarizeVideoScopes = summarizeVideoScopes; exports.toVideoEdl = _chunkXNZFVYC2cjs.toVideoEdl; exports.toVideoFfmpeg = _chunkXNZFVYC2cjs.toVideoFfmpeg; exports.toVideoLoudnessMeasure = _chunkXNZFVYC2cjs.toVideoLoudnessMeasure; exports.videoAddAdjustmentEdits = videoAddAdjustmentEdits; exports.videoAssetDropEdit = videoAssetDropEdit; exports.videoAssetHasSound = _chunkXNZFVYC2cjs.videoAssetHasSound; exports.videoAssetKindOf = videoAssetKindOf; exports.videoAssetMap = _chunkXNZFVYC2cjs.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 = _chunkXNZFVYC2cjs.videoClipAfter; exports.videoClipAnimated = _chunkXNZFVYC2cjs.videoClipAnimated; exports.videoClipAnimationProperties = _chunkXNZFVYC2cjs.videoClipAnimationProperties; exports.videoClipAnimationSpans = _chunkXNZFVYC2cjs.videoClipAnimationSpans; exports.videoClipAppliedEffects = videoClipAppliedEffects; exports.videoClipBefore = _chunkXNZFVYC2cjs.videoClipBefore; exports.videoClipCameraMove = videoClipCameraMove; exports.videoClipEffectDocument = videoClipEffectDocument; exports.videoClipEffectUses = _chunkXNZFVYC2cjs.videoClipEffectUses; exports.videoClipEnd = _chunkXNZFVYC2cjs.videoClipEnd; exports.videoClipHandles = _chunkXNZFVYC2cjs.videoClipHandles; exports.videoClipHeading = videoClipHeading; exports.videoClipKeyframes = videoClipKeyframes; exports.videoClipLabel = videoClipLabel; exports.videoClipMaskOutline = videoClipMaskOutline; exports.videoClipOverhang = _chunkXNZFVYC2cjs.videoClipOverhang; exports.videoClipPicture = videoClipPicture; exports.videoClipShowsWaveform = videoClipShowsWaveform; exports.videoClipSoundGain = _chunkXNZFVYC2cjs.videoClipSoundGain; exports.videoClipSourceRange = _chunkXNZFVYC2cjs.videoClipSourceRange; exports.videoClipSourceTime = _chunkXNZFVYC2cjs.videoClipSourceTime; exports.videoClipSpeed = _chunkXNZFVYC2cjs.videoClipSpeed; exports.videoClipSpeedAt = _chunkXNZFVYC2cjs.videoClipSpeedAt; exports.videoClipTint = videoClipTint; exports.videoClipTypeLabel = _chunkXNZFVYC2cjs.videoClipTypeLabel; exports.videoClipWaveform = videoClipWaveform; exports.videoClipWaveformPath = videoClipWaveformPath; exports.videoClipsAt = _chunkXNZFVYC2cjs.videoClipsAt; exports.videoContactSheetSvg = _chunkXNZFVYC2cjs.videoContactSheetSvg; exports.videoCutsWithMargin = videoCutsWithMargin; exports.videoDragLabel = videoDragLabel; exports.videoDropTracks = videoDropTracks; exports.videoDuckingKeys = videoDuckingKeys; exports.videoEaseBezier = _chunkXNZFVYC2cjs.videoEaseBezier; exports.videoEaseProgress = _chunkXNZFVYC2cjs.videoEaseProgress; exports.videoEaseToAnimationEasing = videoEaseToAnimationEasing; exports.videoEditsFromSequence = videoEditsFromSequence; exports.videoEffectFrameTime = _chunkXNZFVYC2cjs.videoEffectFrameTime; exports.videoEffectLayerKey = _chunkXNZFVYC2cjs.videoEffectLayerKey; exports.videoEffectValuesAt = _chunkXNZFVYC2cjs.videoEffectValuesAt; exports.videoEffectValuesFromDocument = videoEffectValuesFromDocument; exports.videoExposureNotes = videoExposureNotes; exports.videoExposureStats = videoExposureStats; exports.videoFadeCurveGain = _chunkXNZFVYC2cjs.videoFadeCurveGain; exports.videoFfmpegUnsupportedEffects = _chunkXNZFVYC2cjs.videoFfmpegUnsupportedEffects; exports.videoFfmpegUnsupportedFeatures = _chunkXNZFVYC2cjs.videoFfmpegUnsupportedFeatures; exports.videoFrameAt = _chunkXNZFVYC2cjs.videoFrameAt; exports.videoFrameCacheKey = videoFrameCacheKey; exports.videoFrameDuration = _chunkXNZFVYC2cjs.videoFrameDuration; exports.videoFrameLeafLayers = _chunkXNZFVYC2cjs.videoFrameLeafLayers; exports.videoFrameRequestsAt = videoFrameRequestsAt; exports.videoFrameToSvg = _chunkXNZFVYC2cjs.videoFrameToSvg; exports.videoFrames = _chunkXNZFVYC2cjs.videoFrames; exports.videoFreezeFrameEdit = _chunkXNZFVYC2cjs.videoFreezeFrameEdit; exports.videoGradeCssFilter = _chunkXNZFVYC2cjs.videoGradeCssFilter; exports.videoGradeFfmpegFilters = _chunkXNZFVYC2cjs.videoGradeFfmpegFilters; exports.videoGradeGainsFilterId = _chunkXNZFVYC2cjs.videoGradeGainsFilterId; exports.videoGradeLook = _chunkXNZFVYC2cjs.videoGradeLook; exports.videoGradePreset = _chunkXNZFVYC2cjs.videoGradePreset; exports.videoGradeStepMatrix = _chunkXNZFVYC2cjs.videoGradeStepMatrix; exports.videoGradeStepSvgValues = _chunkXNZFVYC2cjs.videoGradeStepSvgValues; exports.videoGradeSteps = _chunkXNZFVYC2cjs.videoGradeSteps; exports.videoGradeSvgDefs = _chunkXNZFVYC2cjs.videoGradeSvgDefs; exports.videoGradeSvgFilter = _chunkXNZFVYC2cjs.videoGradeSvgFilter; exports.videoHistogram = videoHistogram; exports.videoHistogramImage = videoHistogramImage; exports.videoHourFrames = _chunkXNZFVYC2cjs.videoHourFrames; exports.videoIrisRadius = _chunkXNZFVYC2cjs.videoIrisRadius; exports.videoIssueKey = videoIssueKey; exports.videoKeyTimesProblem = _chunkXNZFVYC2cjs.videoKeyTimesProblem; exports.videoKeyframeBreakpoints = _chunkXNZFVYC2cjs.videoKeyframeBreakpoints; exports.videoKeyframeFfmpegExpr = _chunkXNZFVYC2cjs.videoKeyframeFfmpegExpr; exports.videoKeyframeRows = videoKeyframeRows; exports.videoKeyframeToggleEdit = videoKeyframeToggleEdit; exports.videoKeyframeValueEdit = videoKeyframeValueEdit; exports.videoKeysOf = _chunkXNZFVYC2cjs.videoKeysOf; exports.videoLayerMask = _chunkXNZFVYC2cjs.videoLayerMask; exports.videoLayersUseEffects = _chunkXNZFVYC2cjs.videoLayersUseEffects; exports.videoLayersWithoutTransitionEffects = _chunkXNZFVYC2cjs.videoLayersWithoutTransitionEffects; exports.videoLoudnessEnergy = videoLoudnessEnergy; exports.videoLoudnessGain = videoLoudnessGain; exports.videoLoudnessOf = videoLoudnessOf; exports.videoLuma = videoLuma; exports.videoLumaWaveform = videoLumaWaveform; exports.videoLutEdits = videoLutEdits; exports.videoLutFromFunction = _chunkXNZFVYC2cjs.videoLutFromFunction; exports.videoLutSvgApproximation = _chunkXNZFVYC2cjs.videoLutSvgApproximation; exports.videoLutSvgPrimitives = _chunkXNZFVYC2cjs.videoLutSvgPrimitives; exports.videoLutToCube = _chunkXNZFVYC2cjs.videoLutToCube; exports.videoMaskContains = _chunkXNZFVYC2cjs.videoMaskContains; exports.videoMaskEdit = videoMaskEdit; exports.videoMaskPolygon = _chunkXNZFVYC2cjs.videoMaskPolygon; exports.videoMaskSvgPath = _chunkXNZFVYC2cjs.videoMaskSvgPath; exports.videoOverlap = _chunkXNZFVYC2cjs.videoOverlap; exports.videoPeakDb = videoPeakDb; exports.videoPreviewSrc = videoPreviewSrc; exports.videoProjectDuration = _chunkXNZFVYC2cjs.videoProjectDuration; exports.videoProjectEffects = _chunkXNZFVYC2cjs.videoProjectEffects; exports.videoProjectHasProxies = videoProjectHasProxies; exports.videoProjectSvg = _chunkXNZFVYC2cjs.videoProjectSvg; exports.videoProxyFfmpeg = videoProxyFfmpeg; exports.videoProxyName = videoProxyName; exports.videoProxyPlan = videoProxyPlan; exports.videoRemoveRangesEdits = videoRemoveRangesEdits; exports.videoRulerTicks = videoRulerTicks; exports.videoScopeImage = videoScopeImage; exports.videoSequenceChildren = _chunkXNZFVYC2cjs.videoSequenceChildren; exports.videoSequenceDuration = _chunkXNZFVYC2cjs.videoSequenceDuration; exports.videoSequenceMap = _chunkXNZFVYC2cjs.videoSequenceMap; exports.videoShellQuote = _chunkXNZFVYC2cjs.videoShellQuote; exports.videoSkinProtectionEdits = videoSkinProtectionEdits; exports.videoSkinToneWeight = _chunkXNZFVYC2cjs.videoSkinToneWeight; exports.videoSlowMotionRamp = _chunkXNZFVYC2cjs.videoSlowMotionRamp; exports.videoSnapPoints = _chunkXNZFVYC2cjs.videoSnapPoints; exports.videoSourceFrame = videoSourceFrame; exports.videoSourceFrameTime = videoSourceFrameTime; exports.videoSpeechRanges = videoSpeechRanges; exports.videoSpeedRampEdit = _chunkXNZFVYC2cjs.videoSpeedRampEdit; exports.videoSpeedRampKeys = _chunkXNZFVYC2cjs.videoSpeedRampKeys; exports.videoTextStyle = _chunkXNZFVYC2cjs.videoTextStyle; exports.videoTimeRef = videoTimeRef; exports.videoTimeRemapBreakpoints = _chunkXNZFVYC2cjs.videoTimeRemapBreakpoints; exports.videoTimeRemapSpan = _chunkXNZFVYC2cjs.videoTimeRemapSpan; exports.videoTimecodeFrames = _chunkXNZFVYC2cjs.videoTimecodeFrames; exports.videoTimelineTranscript = videoTimelineTranscript; exports.videoTitleFrame = _chunkXNZFVYC2cjs.videoTitleFrame; exports.videoTrackSyncLocked = _chunkXNZFVYC2cjs.videoTrackSyncLocked; exports.videoTranscriptEdit = videoTranscriptEdit; exports.videoTranscriptTrack = videoTranscriptTrack; exports.videoTransformAt = _chunkXNZFVYC2cjs.videoTransformAt; exports.videoTransformOfView = videoTransformOfView; exports.videoTransitionAudioCurve = _chunkXNZFVYC2cjs.videoTransitionAudioCurve; exports.videoTransitionEase = _chunkXNZFVYC2cjs.videoTransitionEase; exports.videoTransitionHasDirection = videoTransitionHasDirection; exports.videoValueAt = _chunkXNZFVYC2cjs.videoValueAt; exports.videoVectorscope = videoVectorscope; exports.videoVectorscopeAngle = videoVectorscopeAngle; exports.videoVectorscopeImage = videoVectorscopeImage; exports.videoVectorscopePoint = videoVectorscopePoint; exports.videoWaveformImage = videoWaveformImage; exports.videoWaveformPath = videoWaveformPath; exports.videoWipeRect = _chunkXNZFVYC2cjs.videoWipeRect; exports.videoWordAt = videoWordAt; exports.videoWordsRange = videoWordsRange; exports.withVideoPlayback = withVideoPlayback;
7130
+ 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;