@pixerate/editor 0.75.0 → 0.76.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 (42) hide show
  1. package/dist/agent/index.cjs +28 -28
  2. package/dist/agent/index.js +3 -3
  3. package/dist/animation-editor/index.cjs +148 -218
  4. package/dist/animation-editor/index.cjs.map +1 -1
  5. package/dist/animation-editor/index.js +8 -78
  6. package/dist/animation-editor/index.js.map +1 -1
  7. package/dist/{chunk-OK7T2LHK.js → chunk-GNO5PEMH.js} +2 -2
  8. package/dist/{chunk-EIXXBKUB.js → chunk-IMSX4IVG.js} +7 -7
  9. package/dist/chunk-INZJALPY.js +87 -0
  10. package/dist/chunk-INZJALPY.js.map +1 -0
  11. package/dist/{chunk-PL3MPFPA.cjs → chunk-MXF4DP2C.cjs} +77 -77
  12. package/dist/{chunk-PL3MPFPA.cjs.map → chunk-MXF4DP2C.cjs.map} +1 -1
  13. package/dist/{chunk-T4XWVPJK.cjs → chunk-RKJDBXTY.cjs} +3 -3
  14. package/dist/{chunk-T4XWVPJK.cjs.map → chunk-RKJDBXTY.cjs.map} +1 -1
  15. package/dist/{chunk-HNDSPZ5T.cjs → chunk-ROXFP2LQ.cjs} +4 -4
  16. package/dist/{chunk-HNDSPZ5T.cjs.map → chunk-ROXFP2LQ.cjs.map} +1 -1
  17. package/dist/{chunk-WON34HKM.js → chunk-SVW2UNUC.js} +2 -2
  18. package/dist/{chunk-66IMF6OD.cjs → chunk-TYOAJDFD.cjs} +3 -3
  19. package/dist/{chunk-66IMF6OD.cjs.map → chunk-TYOAJDFD.cjs.map} +1 -1
  20. package/dist/chunk-WAJQKWQU.cjs +87 -0
  21. package/dist/chunk-WAJQKWQU.cjs.map +1 -0
  22. package/dist/{chunk-UKI64KUD.js → chunk-ZQNDSUZO.js} +6 -6
  23. package/dist/extensions/index.cjs +7 -7
  24. package/dist/extensions/index.cjs.map +1 -1
  25. package/dist/extensions/index.js +6 -6
  26. package/dist/index.cjs +35 -35
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +17 -17
  29. package/dist/serializers/index.cjs +4 -4
  30. package/dist/serializers/index.cjs.map +1 -1
  31. package/dist/serializers/index.js +3 -3
  32. package/dist/video-editor/index.cjs +2219 -0
  33. package/dist/video-editor/index.cjs.map +1 -0
  34. package/dist/video-editor/index.d.cts +985 -0
  35. package/dist/video-editor/index.d.ts +985 -0
  36. package/dist/video-editor/index.js +2219 -0
  37. package/dist/video-editor/index.js.map +1 -0
  38. package/package.json +6 -1
  39. /package/dist/{chunk-OK7T2LHK.js.map → chunk-GNO5PEMH.js.map} +0 -0
  40. /package/dist/{chunk-EIXXBKUB.js.map → chunk-IMSX4IVG.js.map} +0 -0
  41. /package/dist/{chunk-WON34HKM.js.map → chunk-SVW2UNUC.js.map} +0 -0
  42. /package/dist/{chunk-UKI64KUD.js.map → chunk-ZQNDSUZO.js.map} +0 -0
@@ -27,6 +27,14 @@ var _chunk7MD7C6XQcjs = require('../chunk-7MD7C6XQ.cjs');
27
27
 
28
28
 
29
29
 
30
+
31
+ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
32
+
33
+
34
+
35
+
36
+
37
+
30
38
  var _chunkXGD3FSNCcjs = require('../chunk-XGD3FSNC.cjs');
31
39
 
32
40
 
@@ -141,84 +149,6 @@ function motionFlairPrimitive(command3) {
141
149
  }
142
150
  }
143
151
 
144
- // src/animation-editor/issues.ts
145
- var MOTION_ISSUE_CODES = {
146
- "no-shots": { severity: "note", wording: "The scene has no shots yet." },
147
- "duplicate-shot-id": { severity: "error", wording: "Two shots share an id." },
148
- "unknown-target": { severity: "error", wording: "A command names a node the artwork does not have." },
149
- "unknown-path": { severity: "error", wording: "A follow command names a path the artwork does not have." },
150
- "not-a-path": { severity: "error", wording: "A follow path must be a path node, not a group." },
151
- "reveal-no-box": { severity: "warning", wording: "A wipe, iris or split cannot clip a node with no width or height (a lone straight line), so it fades instead." },
152
- "driver-cycle": { severity: "error", wording: "Drivers follow each other in a loop, so none of them has a value." },
153
- "split-not-text": { severity: "warning", wording: "A command splits a target into letters, but it is not a group of letter paths, so it animates as a whole." },
154
- "unknown-clip": { severity: "error", wording: "A play command names a clip the scene does not have." },
155
- "unknown-shape": { severity: "error", wording: "A morph names a shape the artwork does not have." },
156
- "match-self": { severity: "error", wording: "A match turns a group into itself or into a group it holds (or that holds it)." },
157
- "match-unpaired": { severity: "note", wording: `Parts of a match's "into" group have no partner in the target, so they do not appear.` },
158
- "unknown-effect": { severity: "error", wording: "An effect command names an effect the node does not have." },
159
- "unknown-effect-param": { severity: "error", wording: "An effect command names a parameter that is not a number of that effect." },
160
- "unknown-frame": { severity: "error", wording: "A camera frames a node the artwork does not have." },
161
- "invalid-camera": { severity: "error", wording: "A camera rectangle has no area." },
162
- "invalid-color": { severity: "error", wording: "A colour cannot be read." },
163
- "paint-not-color": { severity: "warning", wording: "A style command recolours a gradient or empty paint, which only switches at the end, or a colour pulse has no solid paint to tint." },
164
- "overlap": { severity: "warning", wording: "Two commands change the same property of a node at the same time; the later one wins." },
165
- "enter-visible": { severity: "warning", wording: "A node enters while it is already showing, so it blinks out first." },
166
- "exit-hidden": { severity: "warning", wording: "A node exits or animates while it is hidden." },
167
- "out-of-frame": { severity: "warning", wording: "A node a command animates ends up outside the camera." },
168
- "too-fast": { severity: "warning", wording: "A change is too quick to follow." },
169
- "spring-cut-short": { severity: "warning", wording: "A spring is given a duration shorter than it takes to settle, so it jumps to its end." },
170
- "unknown-cue": { severity: "error", wording: "A shot is cued to a beat with no beat grid, or to a word the narration does not have." },
171
- "cue-missed": { severity: "warning", wording: "A shot starts after its cue, because the shot before runs past it." },
172
- "trigger-loop": { severity: "note", wording: "A scene that plays on a trigger ignores its loop." },
173
- "click-cue": { severity: "warning", wording: "A shot of a click-triggered scene is cued, but clicks decide when its shots start." },
174
- "click-one-shot": { severity: "note", wording: "A click-triggered scene has one shot, so every click replays it." },
175
- "scene-too-long": { severity: "warning", wording: "The scene runs past its target length." },
176
- "scene-too-short": { severity: "warning", wording: "The scene ends before its target length." },
177
- "unknown-control-color": { severity: "warning", wording: "A control stands for a colour the scene never uses." },
178
- "empty-shot": { severity: "note", wording: "A shot neither moves the camera nor runs a command." },
179
- "camera-aspect": { severity: "note", wording: "A camera rectangle has a different shape from the artwork, so it is letterboxed." }
180
- };
181
- function motionIssue(code, message, extra = {}) {
182
- return { code, severity: MOTION_ISSUE_CODES[code].severity, message, ...extra };
183
- }
184
- function motionIssueKey(issue) {
185
- if (_optionalChain([issue, 'access', _2 => _2.ids, 'optionalAccess', _3 => _3.length])) return `${issue.code}:${[...issue.ids].sort().join(",")}`;
186
- return `${issue.code}@${_nullishCoalesce(issue.shot, () => ( ""))}#${_nullishCoalesce(issue.command, () => ( ""))}`;
187
- }
188
- function motionIssueLine(issue) {
189
- const where = issue.shot !== void 0 ? `Shot "${issue.shot}"${issue.command !== void 0 ? `, command ${issue.command + 1}` : ""}: ` : "";
190
- return `${where}${issue.message}`;
191
- }
192
- function editDistance(a, b) {
193
- const d = Array.from({ length: a.length + 1 }, (_, i) => [i, ...Array(b.length).fill(0)]);
194
- for (let j = 1; j <= b.length; j++) d[0][j] = j;
195
- for (let i = 1; i <= a.length; i++) {
196
- for (let j = 1; j <= b.length; j++) {
197
- const cost = a[i - 1] === b[j - 1] ? 0 : 1;
198
- d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
199
- if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);
200
- }
201
- }
202
- return d[a.length][b.length];
203
- }
204
- function suggestName(word, candidates) {
205
- const w = word.toLowerCase();
206
- let best;
207
- let bestDistance = Infinity;
208
- for (const c of candidates) {
209
- const distance = editDistance(w, c.toLowerCase());
210
- if (distance < bestDistance) {
211
- best = c;
212
- bestDistance = distance;
213
- }
214
- }
215
- return best !== void 0 && bestDistance <= Math.max(1, Math.floor(word.length / 3)) ? best : void 0;
216
- }
217
- function namedWithSuggestion(word, candidates) {
218
- const s = suggestName(word, candidates);
219
- return s !== void 0 && s !== word ? `"${word}" (did you mean "${s}"?)` : `"${word}"`;
220
- }
221
-
222
152
  // src/animation-editor/parse.ts
223
153
  var MotionSceneFormatError = class extends Error {
224
154
 
@@ -260,14 +190,14 @@ var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
260
190
  var isNum = (v) => typeof v === "number" && Number.isFinite(v);
261
191
  var isPoint = (v) => isObject(v) && isNum(v.x) && isNum(v.y);
262
192
  function unknownKeys(value, known, where, problems) {
263
- for (const key of Object.keys(value)) if (!known.includes(key)) problems.push(`${where}: unknown field ${namedWithSuggestion(key, known)}.`);
193
+ for (const key of Object.keys(value)) if (!known.includes(key)) problems.push(`${where}: unknown field ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, key, known)}.`);
264
194
  }
265
195
  function commandShapeProblems(command3, where) {
266
196
  const problems = [];
267
197
  if (!isObject(command3)) return [`${where} must be an object.`];
268
198
  const type = command3.type;
269
199
  if (typeof type !== "string" || !MOTION_COMMAND_TYPES.includes(type)) {
270
- return [`${where}: unknown type ${typeof type === "string" ? namedWithSuggestion(type, MOTION_COMMAND_TYPES) : String(type)}; use one of ${MOTION_COMMAND_TYPES.join(", ")}.`];
200
+ return [`${where}: unknown type ${typeof type === "string" ? _chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, type, MOTION_COMMAND_TYPES) : String(type)}; use one of ${MOTION_COMMAND_TYPES.join(", ")}.`];
271
201
  }
272
202
  unknownKeys(command3, COMMAND_KEYS[type], `${where} (${type})`, problems);
273
203
  const p = (msg) => problems.push(`${where} (${type}): ${msg}`);
@@ -314,7 +244,7 @@ function commandShapeProblems(command3, where) {
314
244
  case "exit": {
315
245
  const styles = type === "enter" ? MOTION_ENTER_STYLES : MOTION_EXIT_STYLES;
316
246
  if (command3.style !== void 0 && !(typeof command3.style === "string" && styles.includes(command3.style)))
317
- p(`"style" must be one of ${styles.join(", ")}${typeof command3.style === "string" ? ` (got ${namedWithSuggestion(command3.style, styles)})` : ""}.`);
247
+ p(`"style" must be one of ${styles.join(", ")}${typeof command3.style === "string" ? ` (got ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, command3.style, styles)})` : ""}.`);
318
248
  if (command3.direction !== void 0 && !MOTION_DIRECTIONS.includes(command3.direction)) p(`"direction" must be one of ${MOTION_DIRECTIONS.join(", ")}.`);
319
249
  optionalNumber("distance");
320
250
  if (command3.scale !== void 0 && !(isNum(command3.scale) && command3.scale >= 0)) p(`"scale" must be a number \u2265 0 (the starting scale for pop and zoom).`);
@@ -566,7 +496,7 @@ function matchMotionNodes(from, into) {
566
496
  else out.pairs.push([x.id, y.id]);
567
497
  }
568
498
  };
569
- pair((n) => _optionalChain([n, 'access', _4 => _4.name, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]) || void 0);
499
+ pair((n) => _optionalChain([n, 'access', _2 => _2.name, 'optionalAccess', _3 => _3.trim, 'call', _4 => _4()]) || void 0);
570
500
  pair((n, g) => localId(n.id, g.id) || void 0);
571
501
  for (const x of [...left]) {
572
502
  const y = [...right].find((n) => n.type === x.type);
@@ -624,9 +554,9 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
624
554
 
625
555
  // src/animation-editor/text.ts
626
556
  function motionTextLayout(nodes, id) {
627
- const group = _optionalChain([nodes, 'access', _7 => _7.get, 'call', _8 => _8(id), 'optionalAccess', _9 => _9.node]);
557
+ const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
628
558
  if (!group || group.type !== "group") return null;
629
- const letters = _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _10 => _10.get, 'call', _11 => _11(p.id), 'optionalAccess', _12 => _12.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
559
+ const letters = _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
630
560
  if (!letters.length) return null;
631
561
  const lines = [];
632
562
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -782,10 +712,10 @@ function motionRevealClip(entry, reveal) {
782
712
  }
783
713
  }
784
714
  function motionRestValue(entry, property, artwork) {
785
- const node = _optionalChain([entry, 'optionalAccess', _13 => _13.node]);
715
+ const node = _optionalChain([entry, 'optionalAccess', _11 => _11.node]);
786
716
  switch (property) {
787
717
  case "opacity":
788
- return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _14 => _14.opacity]), () => ( 1));
718
+ return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _12 => _12.opacity]), () => ( 1));
789
719
  case "x":
790
720
  case "y":
791
721
  case "rotation":
@@ -803,11 +733,11 @@ function motionRestValue(entry, property, artwork) {
803
733
  case "stroke":
804
734
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
805
735
  case "strokeWidth": {
806
- const path = _optionalChain([node, 'optionalAccess', _15 => _15.type]) === "path" ? node : node ? _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, node)[0] : void 0;
807
- return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _16 => _16.strokeWidth]), () => ( 1));
736
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, node)[0] : void 0;
737
+ return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
808
738
  }
809
739
  case "shape":
810
- return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _17 => _17.id]), () => ( ""));
740
+ return _nullishCoalesce(_optionalChain([node, 'optionalAccess', _15 => _15.id]), () => ( ""));
811
741
  case "clipRect":
812
742
  case "clipCircle": {
813
743
  const pad = entry && motionRevealPadding(entry);
@@ -817,7 +747,7 @@ function motionRestValue(entry, property, artwork) {
817
747
  return [0, 0, artwork.width, artwork.height];
818
748
  }
819
749
  const [, effectId, param] = property.split(":");
820
- const effect = _optionalChain([node, 'optionalAccess', _18 => _18.effects, 'optionalAccess', _19 => _19.find, 'call', _20 => _20((e) => e.id === effectId)]);
750
+ const effect = _optionalChain([node, 'optionalAccess', _16 => _16.effects, 'optionalAccess', _17 => _17.find, 'call', _18 => _18((e) => e.id === effectId)]);
821
751
  const v = effect ? effect.params[param] : void 0;
822
752
  return typeof v === "number" ? v : 0;
823
753
  }
@@ -866,13 +796,13 @@ function segmentValue(segment, time, raw = false) {
866
796
  return typeof segment.from === "string" ? interpolateMotionValue(segment.from, segment.to, Math.min(1, Math.max(0, p))) : interpolateMotionValue(segment.from, segment.to, p);
867
797
  }
868
798
  function activeSegment(track, time) {
869
- if (!_optionalChain([track, 'optionalAccess', _21 => _21.length])) return void 0;
799
+ if (!_optionalChain([track, 'optionalAccess', _19 => _19.length])) return void 0;
870
800
  let found;
871
801
  for (const s of track) if (s.start <= time && (!found || s.start >= found.start)) found = s;
872
802
  return found;
873
803
  }
874
804
  function trackValue(track, time, raw = false) {
875
- if (!_optionalChain([track, 'optionalAccess', _22 => _22.length])) return void 0;
805
+ if (!_optionalChain([track, 'optionalAccess', _20 => _20.length])) return void 0;
876
806
  const s = activeSegment(track, time);
877
807
  if (s) return segmentValue(s, time, raw);
878
808
  let first = track[0];
@@ -905,7 +835,7 @@ function fitMotionRect(rect, aspect) {
905
835
  function resolveMotionCamera(camera, scene) {
906
836
  if ("frame" in camera && typeof camera.frame === "string") {
907
837
  const entry = indexMotionNodes(scene.artwork.nodes).get(camera.frame);
908
- if (!_optionalChain([entry, 'optionalAccess', _23 => _23.bounds])) return null;
838
+ if (!_optionalChain([entry, 'optionalAccess', _21 => _21.bounds])) return null;
909
839
  const pad = _nullishCoalesce(camera.padding, () => ( 24));
910
840
  const b = entry.bounds;
911
841
  const rect = { x: b.x - pad, y: b.y - pad, width: Math.max(1, b.width + pad * 2), height: Math.max(1, b.height + pad * 2) };
@@ -940,12 +870,12 @@ function motionBeatAt(grid, ms) {
940
870
  function motionCueTime(scene, cue) {
941
871
  if (typeof cue.ms === "number") return Math.max(0, cue.ms);
942
872
  if (typeof cue.beat === "number") return scene.beat && scene.beat.bpm > 0 ? Math.max(0, motionBeatTime(scene.beat, cue.beat)) : void 0;
943
- if (typeof cue.word === "number") return _optionalChain([scene, 'access', _24 => _24.narration, 'optionalAccess', _25 => _25.words, 'access', _26 => _26[cue.word], 'optionalAccess', _27 => _27.start]);
873
+ if (typeof cue.word === "number") return _optionalChain([scene, 'access', _22 => _22.narration, 'optionalAccess', _23 => _23.words, 'access', _24 => _24[cue.word], 'optionalAccess', _25 => _25.start]);
944
874
  return void 0;
945
875
  }
946
876
  var SCALE_LIKE = /* @__PURE__ */ new Set(["scaleX", "scaleY", "opacity"]);
947
877
  function motionPropertyValue(timeline, node, property, time, raw = false, depth = 0) {
948
- const rest = property === "opacity" ? _nullishCoalesce(_optionalChain([timeline, 'access', _28 => _28.restOpacity, 'optionalAccess', _29 => _29.get, 'call', _30 => _30(node)]), () => ( 1)) : SCALE_LIKE.has(property) ? 1 : 0;
878
+ const rest = property === "opacity" ? _nullishCoalesce(_optionalChain([timeline, 'access', _26 => _26.restOpacity, 'optionalAccess', _27 => _27.get, 'call', _28 => _28(node)]), () => ( 1)) : SCALE_LIKE.has(property) ? 1 : 0;
949
879
  const v = trackValue(timeline.tracks.get(motionTrackKey(node, property)), time, raw);
950
880
  const base = property === "opacity" ? typeof v === "number" ? v : rest : withMotionLayers(timeline, node, property, typeof v === "number" ? v : rest, time, raw);
951
881
  return applyMotionDrivers(timeline, node, property, base, time, raw, depth);
@@ -956,7 +886,7 @@ function applyMotionDrivers(timeline, node, property, value, time, raw = false,
956
886
  for (const d of timeline.drivers) {
957
887
  if (d.target !== node || d.property !== property) continue;
958
888
  const src = motionPropertyValue(timeline, d.source.node, d.source.property, time, raw, depth + 1);
959
- const srcRest = d.source.property === "opacity" ? _nullishCoalesce(_optionalChain([timeline, 'access', _31 => _31.restOpacity, 'optionalAccess', _32 => _32.get, 'call', _33 => _33(d.source.node)]), () => ( 1)) : SCALE_LIKE.has(d.source.property) ? 1 : 0;
889
+ const srcRest = d.source.property === "opacity" ? _nullishCoalesce(_optionalChain([timeline, 'access', _29 => _29.restOpacity, 'optionalAccess', _30 => _30.get, 'call', _31 => _31(d.source.node)]), () => ( 1)) : SCALE_LIKE.has(d.source.property) ? 1 : 0;
960
890
  let change = (src - srcRest) * (_nullishCoalesce(d.factor, () => ( 1))) + (_nullishCoalesce(d.offset, () => ( 0)));
961
891
  if (d.clamp) change = Math.min(d.clamp[1], Math.max(d.clamp[0], change));
962
892
  v = SCALE_LIKE.has(property) ? v * (1 + change) : v + change;
@@ -987,7 +917,7 @@ function motionCommandDuration(command3, scene, target) {
987
917
  return motionCycleDuration(command3, scene, target) * motionCommandRepeat(command3);
988
918
  }
989
919
  function motionClipLayout(scene, clip, target, speed = 1) {
990
- const run = _optionalChain([scene, 'access', _34 => _34.clips, 'optionalAccess', _35 => _35[clip], 'optionalAccess', _36 => _36.run]);
920
+ const run = _optionalChain([scene, 'access', _32 => _32.clips, 'optionalAccess', _33 => _33[clip], 'optionalAccess', _34 => _34.run]);
991
921
  if (!run) return { items: [], length: 0 };
992
922
  const f = speed > 0 && Number.isFinite(speed) ? 1 / speed : 1;
993
923
  const items = [];
@@ -1029,7 +959,7 @@ function motionCycleDuration(command3, scene, target) {
1029
959
  const ms = length * MOTION_DRAW_MS_PER_UNIT;
1030
960
  return Math.round(Math.min(MOTION_DRAW_RANGE[1], Math.max(MOTION_DRAW_RANGE[0], ms)));
1031
961
  }
1032
- if (command3.type === "move" && _optionalChain([command3, 'access', _37 => _37.via, 'optionalAccess', _38 => _38.length])) return MOTION_DEFAULT_DURATIONS.move + 400 * command3.via.length;
962
+ if (command3.type === "move" && _optionalChain([command3, 'access', _35 => _35.via, 'optionalAccess', _36 => _36.length])) return MOTION_DEFAULT_DURATIONS.move + 400 * command3.via.length;
1033
963
  return MOTION_DEFAULT_DURATIONS[command3.type];
1034
964
  }
1035
965
  var MOTION_EASE_OUT = { type: "cubic-bezier", x1: 1 / 3, y1: 1, x2: 2 / 3, y2: 1 };
@@ -1070,10 +1000,10 @@ function compileMotionScene(scene) {
1070
1000
  const base = command3.with === "previous" && i > 0 ? prevStart : runEnd;
1071
1001
  const begin = base + (command3.type === "wait" ? 0 : (_nullishCoalesce(command3.delay, () => ( 0))) * f);
1072
1002
  const split = command3.type === "wait" ? null : motionCommandSlots(nodes, command3);
1073
- const slots = _nullishCoalesce(_optionalChain([split, 'optionalAccess', _39 => _39.slots]), () => ( []));
1003
+ const slots = _nullishCoalesce(_optionalChain([split, 'optionalAccess', _37 => _37.slots]), () => ( []));
1074
1004
  const durations = command3.type === "wait" ? [command3.duration * f] : slots.map((s) => motionCommandDuration(command3, scene, s.id) * f);
1075
- const stagger = (_nullishCoalesce(_optionalChain([split, 'optionalAccess', _40 => _40.stagger]), () => ( 0))) * f;
1076
- const end2 = durations.reduce((m, d, k) => Math.max(m, begin + (_nullishCoalesce(_optionalChain([slots, 'access', _41 => _41[k], 'optionalAccess', _42 => _42.slot]), () => ( k))) * stagger + d), begin);
1005
+ const stagger = (_nullishCoalesce(_optionalChain([split, 'optionalAccess', _38 => _38.stagger]), () => ( 0))) * f;
1006
+ const end2 = durations.reduce((m, d, k) => Math.max(m, begin + (_nullishCoalesce(_optionalChain([slots, 'access', _39 => _39[k], 'optionalAccess', _40 => _40.slot]), () => ( k))) * stagger + d), begin);
1077
1007
  commands.push({ shot: shot.id, shotIndex: index, command: i, type: command3.type, start: begin, end: end2, duration: _nullishCoalesce(durations[0], () => ( 0)) });
1078
1008
  prevStart = begin;
1079
1009
  runEnd = Math.max(runEnd, end2);
@@ -1177,11 +1107,11 @@ function compileMotionScene(scene) {
1177
1107
  const at = nodes.get(p.id);
1178
1108
  let first = { x: 0, y: 0 };
1179
1109
  try {
1180
- const m = _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _43 => _43.parentWorld]), () => ( _chunk7MD7C6XQcjs.IDENTITY_MATRIX)), { effects: false })[0];
1110
+ const m = _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunk7MD7C6XQcjs.IDENTITY_MATRIX)), { effects: false })[0];
1181
1111
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1182
1112
  } catch (e3) {
1183
1113
  }
1184
- return { id: p.id, len: Math.max(1e-6, motionPathLength(p, _optionalChain([at, 'optionalAccess', _44 => _44.parentWorld]))), first };
1114
+ return { id: p.id, len: Math.max(1e-6, motionPathLength(p, _optionalChain([at, 'optionalAccess', _42 => _42.parentWorld]))), first };
1185
1115
  });
1186
1116
  if (!list.length) return null;
1187
1117
  const span = Math.max(0, e - s);
@@ -1210,7 +1140,7 @@ function compileMotionScene(scene) {
1210
1140
  const style = _nullishCoalesce(command3.style, () => ( "fade"));
1211
1141
  const opacity = rest("opacity");
1212
1142
  const reveal = style === "wipe" ? motionRevealClip(entry, { style, direction: command3.direction }) : style === "iris" ? motionRevealClip(entry, { style, shape: command3.shape }) : style === "split" ? motionRevealClip(entry, { style, orientation: command3.orientation }) : null;
1213
- for (const p of ["clipRect", "clipCircle"]) if (p !== _optionalChain([reveal, 'optionalAccess', _45 => _45.property]) && tracks.has(motionTrackKey(node, p))) seg(p, rest(p), "linear", start, start);
1143
+ for (const p of ["clipRect", "clipCircle"]) if (p !== _optionalChain([reveal, 'optionalAccess', _43 => _43.property]) && tracks.has(motionTrackKey(node, p))) seg(p, rest(p), "linear", start, start);
1214
1144
  if (reveal) {
1215
1145
  seg("opacity", opacity, "linear", start, start);
1216
1146
  seg(reveal.property, reveal.to, _nullishCoalesce(ease, () => ( MOTION_EASE_OUT)), start, end, { from: reveal.from });
@@ -1286,15 +1216,15 @@ function compileMotionScene(scene) {
1286
1216
  }
1287
1217
  case "move": {
1288
1218
  const e = _nullishCoalesce(ease, () => ( MOTION_EASE_IN_OUT));
1289
- let dx = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.x]), () => ( 0));
1290
- let dy = _nullishCoalesce(_optionalChain([command3, 'access', _48 => _48.by, 'optionalAccess', _49 => _49.y]), () => ( 0));
1219
+ let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
1220
+ let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
1291
1221
  if (command3.to) {
1292
1222
  const inv = _chunk7MD7C6XQcjs.invertMatrix.call(void 0, entry.parentWorld);
1293
1223
  const target = _chunk7MD7C6XQcjs.applyMatrix.call(void 0, inv, command3.to);
1294
1224
  dx = target.x - (entry.center.x + num2("x"));
1295
1225
  dy = target.y - (entry.center.y + num2("y"));
1296
1226
  }
1297
- if (_optionalChain([command3, 'access', _50 => _50.via, 'optionalAccess', _51 => _51.length])) {
1227
+ if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
1298
1228
  const inv = _chunk7MD7C6XQcjs.invertMatrix.call(void 0, entry.parentWorld);
1299
1229
  const x0 = num2("x");
1300
1230
  const y0 = num2("y");
@@ -1392,7 +1322,7 @@ function compileMotionScene(scene) {
1392
1322
  for (const track of tracks.values()) track.sort((a, b) => a.start - b.start);
1393
1323
  segments.sort((a, b) => a.start - b.start);
1394
1324
  const duration = shots.length ? shots[shots.length - 1].end : 0;
1395
- const timeline = { duration, shots, commands, segments, tracks, ..._optionalChain([scene, 'access', _52 => _52.drivers, 'optionalAccess', _53 => _53.length]) ? { drivers: scene.drivers, restOpacity: new Map([...nodes].map(([id, e]) => [id, _nullishCoalesce(e.node.opacity, () => ( 1))])) } : {} };
1325
+ const timeline = { duration, shots, commands, segments, tracks, ..._optionalChain([scene, 'access', _50 => _50.drivers, 'optionalAccess', _51 => _51.length]) ? { drivers: scene.drivers, restOpacity: new Map([...nodes].map(([id, e]) => [id, _nullishCoalesce(e.node.opacity, () => ( 1))])) } : {} };
1396
1326
  timelineCache.set(scene, timeline);
1397
1327
  return timeline;
1398
1328
  }
@@ -1405,7 +1335,7 @@ var MOTION_DRAW_EFFECT_ID = "~draw";
1405
1335
  var TRANSFORM_PROPS = ["x", "y", "rotation", "scaleX", "scaleY", "follow"];
1406
1336
  var tidy = (v) => Math.round(v * 1e6) / 1e6 || 0;
1407
1337
  function applyMotionControlValues(scene, values) {
1408
- if (!values || !_optionalChain([scene, 'access', _54 => _54.controls, 'optionalAccess', _55 => _55.length])) return scene;
1338
+ if (!values || !_optionalChain([scene, 'access', _52 => _52.controls, 'optionalAccess', _53 => _53.length])) return scene;
1409
1339
  const map = /* @__PURE__ */ new Map();
1410
1340
  for (const control of scene.controls) {
1411
1341
  const value = values[control.name];
@@ -1451,7 +1381,7 @@ function shapeIn(entry, shape) {
1451
1381
  }
1452
1382
  function shapeAt(entry, timeline, nodes, time) {
1453
1383
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
1454
- if (!_optionalChain([track, 'optionalAccess', _56 => _56.length])) return null;
1384
+ if (!_optionalChain([track, 'optionalAccess', _54 => _54.length])) return null;
1455
1385
  const s = activeSegment(track, time);
1456
1386
  const fromId = String(s ? s.from : track[0].from);
1457
1387
  if (!s) return fromId === entry.node.id ? null : nodes.get(fromId) ? shapeIn(entry, nodes.get(fromId)) : null;
@@ -1474,8 +1404,8 @@ function motionFollowRoute(entry, path) {
1474
1404
  }
1475
1405
  function followAt(entry, timeline, nodes, time) {
1476
1406
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "follow"));
1477
- const s = _nullishCoalesce(activeSegment(track, time), () => ( _optionalChain([track, 'optionalAccess', _57 => _57[0]])));
1478
- if (!_optionalChain([s, 'optionalAccess', _58 => _58.path])) return null;
1407
+ const s = _nullishCoalesce(activeSegment(track, time), () => ( _optionalChain([track, 'optionalAccess', _55 => _55[0]])));
1408
+ if (!_optionalChain([s, 'optionalAccess', _56 => _56.path])) return null;
1479
1409
  const route = motionFollowRoute(entry, nodes.get(s.path));
1480
1410
  const progress = Number(trackValue(track, time));
1481
1411
  if (!route || !(progress >= 0)) return null;
@@ -1493,7 +1423,7 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
1493
1423
  const layered = withMotionLayers(timeline, entry.node.id, p, typeof v === "number" ? v : rest, time, raw);
1494
1424
  return p === "follow" ? layered : applyMotionDrivers(timeline, entry.node.id, p, layered, time, raw);
1495
1425
  };
1496
- const driven = _optionalChain([timeline, 'access', _59 => _59.drivers, 'optionalAccess', _60 => _60.some, 'call', _61 => _61((d) => d.target === entry.node.id && d.property !== "opacity")]);
1426
+ const driven = _optionalChain([timeline, 'access', _57 => _57.drivers, 'optionalAccess', _58 => _58.some, 'call', _59 => _59((d) => d.target === entry.node.id && d.property !== "opacity")]);
1497
1427
  if (!driven && !TRANSFORM_PROPS.some((p) => (follow || p !== "follow") && (timeline.tracks.has(motionTrackKey(entry.node.id, p)) || timeline.tracks.has(motionAddTrackKey(entry.node.id, p))))) return null;
1498
1428
  const dx = read("x", 0);
1499
1429
  const dy = read("y", 0);
@@ -1537,7 +1467,7 @@ function motionFrameAt(scene, time, options = {}) {
1537
1467
  if (out.visible === void 0) delete out.visible;
1538
1468
  }
1539
1469
  const effectTracks = [...timeline.tracks.keys()].filter((k) => k.startsWith(`${id}\0effect:`));
1540
- if (effectTracks.length && _optionalChain([out, 'access', _62 => _62.effects, 'optionalAccess', _63 => _63.length])) {
1470
+ if (effectTracks.length && _optionalChain([out, 'access', _60 => _60.effects, 'optionalAccess', _61 => _61.length])) {
1541
1471
  out = {
1542
1472
  ...out,
1543
1473
  effects: out.effects.map((effect) => {
@@ -1577,7 +1507,7 @@ function motionFrameAt(scene, time, options = {}) {
1577
1507
  return p;
1578
1508
  });
1579
1509
  }
1580
- const opacity = _optionalChain([timeline, 'access', _64 => _64.drivers, 'optionalAccess', _65 => _65.some, 'call', _66 => _66((d) => d.target === id && d.property === "opacity")]) ? motionPropertyValue(timeline, id, "opacity", time) : value(id, "opacity");
1510
+ const opacity = _optionalChain([timeline, 'access', _62 => _62.drivers, 'optionalAccess', _63 => _63.some, 'call', _64 => _64((d) => d.target === id && d.property === "opacity")]) ? motionPropertyValue(timeline, id, "opacity", time) : value(id, "opacity");
1581
1511
  if (typeof opacity === "number") {
1582
1512
  const o = Math.min(1, Math.max(0, tidy(opacity)));
1583
1513
  out = { ...out, opacity: o };
@@ -1650,7 +1580,7 @@ function motionPath(scene, id, options = {}) {
1650
1580
  const r = (n) => Math.round(n * 100) / 100;
1651
1581
  const centreAt = (t) => {
1652
1582
  const node = indexMotionNodes(motionFrameAtCache(scene, t)).get(id);
1653
- const b = _optionalChain([node, 'optionalAccess', _67 => _67.bounds]);
1583
+ const b = _optionalChain([node, 'optionalAccess', _65 => _65.bounds]);
1654
1584
  return b ? { t: r(t), x: r(b.x + b.width / 2), y: r(b.y + b.height / 2) } : null;
1655
1585
  };
1656
1586
  const points = [];
@@ -1684,8 +1614,8 @@ function motionBlurTimes(scene, time, blur = {}) {
1684
1614
  const b = indexMotionNodes(motionFrameAt(scene, time + span / 2).document.nodes);
1685
1615
  let travel = 0;
1686
1616
  for (const id of ids) {
1687
- const p = _optionalChain([a, 'access', _68 => _68.get, 'call', _69 => _69(id), 'optionalAccess', _70 => _70.bounds]);
1688
- const q = _optionalChain([b, 'access', _71 => _71.get, 'call', _72 => _72(id), 'optionalAccess', _73 => _73.bounds]);
1617
+ const p = _optionalChain([a, 'access', _66 => _66.get, 'call', _67 => _67(id), 'optionalAccess', _68 => _68.bounds]);
1618
+ const q = _optionalChain([b, 'access', _69 => _69.get, 'call', _70 => _70(id), 'optionalAccess', _71 => _71.bounds]);
1689
1619
  if (p && q) travel = Math.max(travel, Math.abs(p.x - q.x), Math.abs(p.y - q.y), Math.abs(p.x + p.width - q.x - q.width), Math.abs(p.y + p.height - q.y - q.height));
1690
1620
  }
1691
1621
  const n = Math.min(most, Math.ceil(travel / 1.5));
@@ -1697,7 +1627,7 @@ function averagedFrames(scene, times, options, prefix) {
1697
1627
  return `<g data-motion-blur="${n}" style="isolation:isolate">${times.map((t, k) => {
1698
1628
  const own = `${prefix}blur${k}-`;
1699
1629
  const frame = motionFrameToSvg(scene, t, { ...options, idPrefix: own, background: false });
1700
- const view = _nullishCoalesce(_optionalChain([/viewBox="([^"]*)"/, 'access', _74 => _74.exec, 'call', _75 => _75(frame), 'optionalAccess', _76 => _76[1]]), () => ( ""));
1630
+ const view = _nullishCoalesce(_optionalChain([/viewBox="([^"]*)"/, 'access', _72 => _72.exec, 'call', _73 => _73(frame), 'optionalAccess', _74 => _74[1]]), () => ( ""));
1701
1631
  const inner = k === n - 1 ? innerSvg(frame) : innerSvg(frame).replace(new RegExp(` id="(?!${own.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})[^"]*"`, "g"), "");
1702
1632
  return `<svg viewBox="${view}" preserveAspectRatio="none" style="mix-blend-mode:plus-lighter" opacity="${Math.round(1e4 / n) / 1e4}">${inner}</svg>`;
1703
1633
  }).join("")}</g>`;
@@ -1712,7 +1642,7 @@ function motionStageSvg(scene, time, options = {}) {
1712
1642
  if (blurTimes.length > 1) {
1713
1643
  const open2 = current.indexOf(">") + 1;
1714
1644
  const body2 = current.slice(open2, current.lastIndexOf("</svg>"));
1715
- const bg2 = svgOptions.background !== false && scene.artwork.background ? _nullishCoalesce(_optionalChain([/^\s*<rect[^>]*\/>/, 'access', _77 => _77.exec, 'call', _78 => _78(body2), 'optionalAccess', _79 => _79[0]]), () => ( "")) : "";
1645
+ const bg2 = svgOptions.background !== false && scene.artwork.background ? _nullishCoalesce(_optionalChain([/^\s*<rect[^>]*\/>/, 'access', _75 => _75.exec, 'call', _76 => _76(body2), 'optionalAccess', _77 => _77[0]]), () => ( "")) : "";
1716
1646
  current = `${current.slice(0, open2)}${bg2}${averagedFrames(scene, blurTimes, svgOptions, prefix)}</svg>`;
1717
1647
  }
1718
1648
  if (!onionSkin && !motionPaths) return current;
@@ -1727,7 +1657,7 @@ function motionStageSvg(scene, time, options = {}) {
1727
1657
  const open = current.indexOf(">") + 1;
1728
1658
  const close = current.lastIndexOf("</svg>");
1729
1659
  const body = current.slice(open, close);
1730
- const bg = svgOptions.background !== false && scene.artwork.background ? _nullishCoalesce(_optionalChain([/^\s*<rect[^>]*\/>/, 'access', _80 => _80.exec, 'call', _81 => _81(body), 'optionalAccess', _82 => _82[0]]), () => ( "")) : "";
1660
+ const bg = svgOptions.background !== false && scene.artwork.background ? _nullishCoalesce(_optionalChain([/^\s*<rect[^>]*\/>/, 'access', _78 => _78.exec, 'call', _79 => _79(body), 'optionalAccess', _80 => _80[0]]), () => ( "")) : "";
1731
1661
  return `${current.slice(0, open)}${bg}${ghosts.join("")}${body.slice(bg.length)}${paths}</svg>`;
1732
1662
  }
1733
1663
  function motionContactSheetSvg(scene, times, options = {}) {
@@ -1746,7 +1676,7 @@ function motionContactSheetSvg(scene, times, options = {}) {
1746
1676
  const x = gap + i % cols * (w + gap);
1747
1677
  const y = gap + Math.floor(i / cols) * (h + label + gap);
1748
1678
  const frame = motionStageSvg(scene, t, { ...frameOptions, idPrefix: `${prefix}f${i}-` });
1749
- const view = _nullishCoalesce(_optionalChain([/viewBox="([^"]*)"/, 'access', _83 => _83.exec, 'call', _84 => _84(frame), 'optionalAccess', _85 => _85[1]]), () => ( `0 0 ${w} ${h}`));
1679
+ const view = _nullishCoalesce(_optionalChain([/viewBox="([^"]*)"/, 'access', _81 => _81.exec, 'call', _82 => _82(frame), 'optionalAccess', _83 => _83[1]]), () => ( `0 0 ${w} ${h}`));
1750
1680
  const inner = innerSvg(frame).replace(new RegExp(` id="(?!${`${prefix}f${i}-`.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})[^"]*"`, "g"), "");
1751
1681
  const shot = _nullishCoalesce(timeline.shots.find((s) => t >= s.start && t < s.end), () => ( timeline.shots[timeline.shots.length - 1]));
1752
1682
  const caption = labels ? `<text x="${x + w / 2}" y="${y + h + label * 0.8}" font-family="system-ui, sans-serif" font-size="${Math.round(label * 0.7)}" text-anchor="middle" fill="#64748b">${(t / 1e3).toFixed(2)} s${shot ? ` \xB7 ${shot.id.replace(/[<&]/g, "")}` : ""}</text>` : "";
@@ -1758,7 +1688,7 @@ function motionContactSheetSvg(scene, times, options = {}) {
1758
1688
  // src/animation-editor/check.ts
1759
1689
  var MOTION_MIN_CHANGE_MS = 120;
1760
1690
  var NUMERIC_PARAMS = (node, effectId) => {
1761
- const effect = _optionalChain([node, 'access', _86 => _86.effects, 'optionalAccess', _87 => _87.find, 'call', _88 => _88((e) => e.id === effectId)]);
1691
+ const effect = _optionalChain([node, 'access', _84 => _84.effects, 'optionalAccess', _85 => _85.find, 'call', _86 => _86((e) => e.id === effectId)]);
1762
1692
  if (!effect) return null;
1763
1693
  return Object.entries(effect.params).filter(([, v]) => typeof v === "number").map(([k]) => k);
1764
1694
  };
@@ -1801,96 +1731,96 @@ function checkMotionScene(scene) {
1801
1731
  const ids = [...nodes.keys()];
1802
1732
  const timeline = compileMotionScene(scene);
1803
1733
  const artAspect = scene.artwork.width / scene.artwork.height;
1804
- if (!scene.shots.length) issues.push(motionIssue("no-shots", "The scene has no shots yet; add one with a list of commands."));
1734
+ if (!scene.shots.length) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "no-shots", "The scene has no shots yet; add one with a list of commands."));
1805
1735
  const seen = /* @__PURE__ */ new Set();
1806
1736
  for (const shot of scene.shots) {
1807
- if (seen.has(shot.id)) issues.push(motionIssue("duplicate-shot-id", `Shot id "${shot.id}" is used twice; give each shot its own id.`, { shot: shot.id }));
1737
+ if (seen.has(shot.id)) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "duplicate-shot-id", `Shot id "${shot.id}" is used twice; give each shot its own id.`, { shot: shot.id }));
1808
1738
  seen.add(shot.id);
1809
1739
  }
1810
1740
  const known = (id, code, what, where) => {
1811
1741
  if (nodes.has(id)) return true;
1812
- issues.push(motionIssue(code, `There is no ${what} ${namedWithSuggestion(id, ids)} in the artwork${ids.length ? "" : " (it has no nodes yet)"}.`, { ...where, ids: [id] }));
1742
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, code, `There is no ${what} ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, ids)} in the artwork${ids.length ? "" : " (it has no nodes yet)"}.`, { ...where, ids: [id] }));
1813
1743
  return false;
1814
1744
  };
1815
1745
  scene.shots.forEach((shot, shotIndex2) => {
1816
1746
  if (shot.camera && "frame" in shot.camera && typeof shot.camera.frame === "string") known(shot.camera.frame, "unknown-frame", "node to frame", { shot: shot.id });
1817
1747
  else if (shot.camera) {
1818
1748
  const c = shot.camera;
1819
- if (!(c.width > 0 && c.height > 0)) issues.push(motionIssue("invalid-camera", `The camera needs a positive width and height (got ${c.width} \xD7 ${c.height}).`, { shot: shot.id }));
1749
+ if (!(c.width > 0 && c.height > 0)) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "invalid-camera", `The camera needs a positive width and height (got ${c.width} \xD7 ${c.height}).`, { shot: shot.id }));
1820
1750
  else if (Math.abs(c.width / c.height / artAspect - 1) > 0.02)
1821
- issues.push(motionIssue("camera-aspect", `The camera is ${c.width} \xD7 ${c.height}, a different shape from the ${scene.artwork.width} \xD7 ${scene.artwork.height} artwork, so it shows bands at the sides; frame a node instead to match.`, { shot: shot.id }));
1751
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "camera-aspect", `The camera is ${c.width} \xD7 ${c.height}, a different shape from the ${scene.artwork.width} \xD7 ${scene.artwork.height} artwork, so it shows bands at the sides; frame a node instead to match.`, { shot: shot.id }));
1822
1752
  }
1823
- if (!shot.run.length && !shot.camera && shotIndex2 > 0) issues.push(motionIssue("empty-shot", "This shot only holds; add commands or a camera move, or remove it.", { shot: shot.id }));
1753
+ if (!shot.run.length && !shot.camera && shotIndex2 > 0) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "empty-shot", "This shot only holds; add commands or a camera move, or remove it.", { shot: shot.id }));
1824
1754
  shot.run.forEach((command3, i) => {
1825
1755
  const where = { shot: shot.id, command: i };
1826
1756
  if (command3.type === "wait") return;
1827
1757
  const targets = command3.targets.filter((id) => known(id, "unknown-target", "node", where));
1828
1758
  const timing = timeline.commands.find((c) => c.shot === shot.id && c.command === i);
1829
1759
  if (timing && timing.duration > 0 && timing.duration < MOTION_MIN_CHANGE_MS)
1830
- issues.push(motionIssue("too-fast", `This ${command3.type} lasts ${timing.duration} ms, too quick to follow; make it at least ${MOTION_MIN_CHANGE_MS} ms.`, { ...where, measured: timing.duration, needed: MOTION_MIN_CHANGE_MS, unit: "ms", ids: targets }));
1760
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "too-fast", `This ${command3.type} lasts ${timing.duration} ms, too quick to follow; make it at least ${MOTION_MIN_CHANGE_MS} ms.`, { ...where, measured: timing.duration, needed: MOTION_MIN_CHANGE_MS, unit: "ms", ids: targets }));
1831
1761
  if (command3.duration !== void 0 && command3.ease !== void 0) {
1832
1762
  const ease = _chunk2FHLHZALcjs.resolveEasing.call(void 0, command3.ease);
1833
1763
  if (ease !== "hold" && ease.type === "spring") {
1834
1764
  const settle = _chunk2FHLHZALcjs.springSettleMs.call(void 0, ease);
1835
1765
  if (command3.duration < settle * 0.9)
1836
- issues.push(motionIssue("spring-cut-short", `This ${command3.type}'s spring takes ${settle} ms to settle but lasts ${command3.duration} ms, so it jumps to its end; leave "duration" out (the spring sets it) or make it at least ${settle} ms.`, { ...where, measured: command3.duration, needed: settle, unit: "ms", ids: targets }));
1766
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "spring-cut-short", `This ${command3.type}'s spring takes ${settle} ms to settle but lasts ${command3.duration} ms, so it jumps to its end; leave "duration" out (the spring sets it) or make it at least ${settle} ms.`, { ...where, measured: command3.duration, needed: settle, unit: "ms", ids: targets }));
1837
1767
  }
1838
1768
  }
1839
1769
  if (command3.type === "follow" && known(command3.path, "unknown-path", "path", where) && nodes.get(command3.path).node.type !== "path")
1840
- issues.push(motionIssue("not-a-path", `"${command3.path}" is a group; follow a single path node.`, { ...where, ids: [command3.path] }));
1770
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "not-a-path", `"${command3.path}" is a group; follow a single path node.`, { ...where, ids: [command3.path] }));
1841
1771
  if (command3.type === "morph") known(command3.into, "unknown-shape", "shape", where);
1842
1772
  if (command3.type !== "play" && command3.split) {
1843
1773
  for (const id of targets)
1844
1774
  if (!motionTextLayout(nodes, id))
1845
- issues.push(motionIssue("split-not-text", `"${id}" is not a group of letter paths, so "split": "${command3.split}" animates it as a whole; convert the text to outlines and group the letters (get_text_layout shows how they read).`, { ...where, ids: [id] }));
1775
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "split-not-text", `"${id}" is not a group of letter paths, so "split": "${command3.split}" animates it as a whole; convert the text to outlines and group the letters (get_text_layout shows how they read).`, { ...where, ids: [id] }));
1846
1776
  }
1847
- if (command3.type === "play" && !_optionalChain([scene, 'access', _89 => _89.clips, 'optionalAccess', _90 => _90[command3.clip]]))
1848
- issues.push(motionIssue("unknown-clip", `There is no clip ${namedWithSuggestion(command3.clip, Object.keys(_nullishCoalesce(scene.clips, () => ( {}))))}; define it with set_animation_clip.`, where));
1777
+ if (command3.type === "play" && !_optionalChain([scene, 'access', _87 => _87.clips, 'optionalAccess', _88 => _88[command3.clip]]))
1778
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-clip", `There is no clip ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, command3.clip, Object.keys(_nullishCoalesce(scene.clips, () => ( {}))))}; define it with set_animation_clip.`, where));
1849
1779
  if (command3.type === "match" && known(command3.into, "unknown-shape", "group", where)) {
1850
1780
  const into = nodes.get(command3.into);
1851
1781
  for (const id of targets) {
1852
1782
  const entry = nodes.get(id);
1853
1783
  if (id === command3.into || into.ancestors.includes(id) || entry.ancestors.includes(command3.into)) {
1854
- issues.push(motionIssue("match-self", `"${id}" cannot match "${command3.into}": one is the other or holds it. Match two separate groups (the second usually hidden).`, { ...where, ids: [id, command3.into] }));
1784
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "match-self", `"${id}" cannot match "${command3.into}": one is the other or holds it. Match two separate groups (the second usually hidden).`, { ...where, ids: [id, command3.into] }));
1855
1785
  continue;
1856
1786
  }
1857
1787
  const m = matchMotionNodes(entry.node, into.node);
1858
1788
  if (m.unpairedInto.length)
1859
- issues.push(motionIssue("match-unpaired", `${m.unpairedInto.map((x) => `"${x}"`).join(", ")} in "${command3.into}" ${m.unpairedInto.length > 1 ? "have" : "has"} no partner in "${id}", so ${m.unpairedInto.length > 1 ? "they do" : "it does"} not appear; add a part with the same name or id to "${id}" (it can start hidden or tiny).`, { ...where, ids: m.unpairedInto }));
1789
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "match-unpaired", `${m.unpairedInto.map((x) => `"${x}"`).join(", ")} in "${command3.into}" ${m.unpairedInto.length > 1 ? "have" : "has"} no partner in "${id}", so ${m.unpairedInto.length > 1 ? "they do" : "it does"} not appear; add a part with the same name or id to "${id}" (it can start hidden or tiny).`, { ...where, ids: m.unpairedInto }));
1860
1790
  }
1861
1791
  }
1862
1792
  const style = command3.type === "enter" || command3.type === "exit" ? command3.style : void 0;
1863
1793
  if (style === "wipe" || style === "iris" || style === "split") {
1864
1794
  for (const id of targets)
1865
1795
  if (!motionRevealPadding(nodes.get(id)))
1866
- issues.push(motionIssue("reveal-no-box", `"${id}" has no width or height (a straight line), so a ${style} cannot clip it and it fades instead; use style "${command3.type === "enter" ? "draw" : "undraw"}" for a line.`, { ...where, ids: [id] }));
1796
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "reveal-no-box", `"${id}" has no width or height (a straight line), so a ${style} cannot clip it and it fades instead; use style "${command3.type === "enter" ? "draw" : "undraw"}" for a line.`, { ...where, ids: [id] }));
1867
1797
  }
1868
1798
  if (command3.type === "style") {
1869
1799
  for (const key of ["fill", "stroke"]) {
1870
1800
  const color = command3[key];
1871
1801
  if (color === void 0) continue;
1872
1802
  if (_chunkA6PHCAGXcjs.normalizeTokenColor.call(void 0, color) === null) {
1873
- issues.push(motionIssue("invalid-color", `${key} "${color}" is not a colour this editor reads; use hex ("#0ea5e9"), rgb() or rgba().`, where));
1803
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "invalid-color", `${key} "${color}" is not a colour this editor reads; use hex ("#0ea5e9"), rgb() or rgba().`, where));
1874
1804
  continue;
1875
1805
  }
1876
1806
  for (const id of targets) {
1877
1807
  const node = nodes.get(id).node;
1878
1808
  const paths = node.type === "path" ? [node] : _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, node);
1879
1809
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
1880
- issues.push(motionIssue("paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
1810
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
1881
1811
  }
1882
1812
  }
1883
1813
  }
1884
1814
  if (command3.type === "color-pulse") {
1885
1815
  const key = _nullishCoalesce(command3.paint, () => ( "fill"));
1886
1816
  const color = _nullishCoalesce(command3.color, () => ( "#f59e0b"));
1887
- if (_chunkA6PHCAGXcjs.normalizeTokenColor.call(void 0, color) === null) issues.push(motionIssue("invalid-color", `color "${color}" is not a colour this editor reads; use hex ("#0ea5e9"), rgb() or rgba().`, where));
1817
+ if (_chunkA6PHCAGXcjs.normalizeTokenColor.call(void 0, color) === null) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "invalid-color", `color "${color}" is not a colour this editor reads; use hex ("#0ea5e9"), rgb() or rgba().`, where));
1888
1818
  else
1889
1819
  for (const id of targets) {
1890
1820
  const node = nodes.get(id).node;
1891
1821
  const paths = node.type === "path" ? [node] : _chunk7MD7C6XQcjs.collectPathNodes.call(void 0, node);
1892
1822
  if (paths.some((p) => typeof p[key] !== "string"))
1893
- issues.push(motionIssue("paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
1823
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
1894
1824
  }
1895
1825
  }
1896
1826
  if (command3.type === "effect") {
@@ -1899,9 +1829,9 @@ function checkMotionScene(scene) {
1899
1829
  const params = NUMERIC_PARAMS(node, command3.effect);
1900
1830
  const effects = (_nullishCoalesce(node.effects, () => ( []))).map((e) => e.id);
1901
1831
  if (!params)
1902
- issues.push(motionIssue("unknown-effect", `"${id}" has no effect ${namedWithSuggestion(command3.effect, effects)}${effects.length ? `; its effects are ${effects.map((e) => `"${e}"`).join(", ")}` : "; it has no live effects"}.`, { ...where, ids: [id] }));
1832
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-effect", `"${id}" has no effect ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, command3.effect, effects)}${effects.length ? `; its effects are ${effects.map((e) => `"${e}"`).join(", ")}` : "; it has no live effects"}.`, { ...where, ids: [id] }));
1903
1833
  else if (!params.includes(command3.param))
1904
- issues.push(motionIssue("unknown-effect-param", `Effect "${command3.effect}" has no numeric parameter ${namedWithSuggestion(command3.param, params)}; use one of ${params.join(", ")}.`, { ...where, ids: [id] }));
1834
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-effect-param", `Effect "${command3.effect}" has no numeric parameter ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, command3.param, params)}; use one of ${params.join(", ")}.`, { ...where, ids: [id] }));
1905
1835
  }
1906
1836
  }
1907
1837
  if (timing) {
@@ -1910,10 +1840,10 @@ function checkMotionScene(scene) {
1910
1840
  const before = Math.max(0, timing.start - 0.5);
1911
1841
  const visible = timing.start > 0 ? visibleAt(timeline, id, before, node) : node.visible !== false;
1912
1842
  if (command3.type === "enter" && visible && timing.start > 0)
1913
- issues.push(motionIssue("enter-visible", `"${id}" is already showing when it enters, so it blinks out first; remove the enter or exit it earlier.`, { ...where, ids: [id] }));
1843
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "enter-visible", `"${id}" is already showing when it enters, so it blinks out first; remove the enter or exit it earlier.`, { ...where, ids: [id] }));
1914
1844
  const probe = command3.type === "exit" ? timing.start + 0.5 : (timing.start + timing.end) / 2;
1915
1845
  if (command3.type !== "enter" && command3.type !== "draw" && !visibleAt(timeline, id, probe, node))
1916
- issues.push(motionIssue("exit-hidden", `"${id}" is hidden when this ${command3.type} starts, so it is not seen; enter it first.`, { ...where, ids: [id] }));
1846
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "exit-hidden", `"${id}" is hidden when this ${command3.type} starts, so it is not seen; enter it first.`, { ...where, ids: [id] }));
1917
1847
  }
1918
1848
  }
1919
1849
  });
@@ -1921,7 +1851,7 @@ function checkMotionScene(scene) {
1921
1851
  const drivers = _nullishCoalesce(scene.drivers, () => ( []));
1922
1852
  drivers.forEach((d, i) => {
1923
1853
  for (const id of [d.target, d.source.node])
1924
- if (!nodes.has(id)) issues.push(motionIssue("unknown-target", `Driver ${i + 1} names ${namedWithSuggestion(id, [...nodes.keys()])}, which the artwork does not have.`, { ids: [id] }));
1854
+ if (!nodes.has(id)) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-target", `Driver ${i + 1} names ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, [...nodes.keys()])}, which the artwork does not have.`, { ids: [id] }));
1925
1855
  });
1926
1856
  {
1927
1857
  const key = (n, p) => `${n}.${p}`;
@@ -1938,20 +1868,20 @@ function checkMotionScene(scene) {
1938
1868
  return false;
1939
1869
  };
1940
1870
  for (const k of edges.keys()) if (visit(k, [])) break;
1941
- if (loop.length) issues.push(motionIssue("driver-cycle", `Drivers follow each other round in a loop (${loop.join(" \u2190 ")}); remove one of them.`, { ids: [...new Set(loop.map((k) => k.split(".")[0]))] }));
1871
+ if (loop.length) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "driver-cycle", `Drivers follow each other round in a loop (${loop.join(" \u2190 ")}); remove one of them.`, { ids: [...new Set(loop.map((k) => k.split(".")[0]))] }));
1942
1872
  }
1943
1873
  for (const [name, clip] of Object.entries(_nullishCoalesce(scene.clips, () => ( {}))))
1944
1874
  for (const command3 of clip.run)
1945
1875
  if (command3.type !== "wait") {
1946
1876
  for (const id of command3.targets)
1947
- if (id !== MOTION_CLIP_TARGET && !nodes.has(id)) issues.push(motionIssue("unknown-target", `Clip "${name}" names ${namedWithSuggestion(id, [...nodes.keys()])}, which the artwork does not have; use "$" for the node the clip is played on.`, { ids: [id] }));
1877
+ if (id !== MOTION_CLIP_TARGET && !nodes.has(id)) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-target", `Clip "${name}" names ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, [...nodes.keys()])}, which the artwork does not have; use "$" for the node the clip is played on.`, { ids: [id] }));
1948
1878
  }
1949
1879
  if (scene.trigger) {
1950
- if ((_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") issues.push(motionIssue("trigger-loop", `The scene plays on ${scene.trigger}, so its "${scene.loop}" loop does not apply; set loop to "none" or remove the trigger.`, {}));
1880
+ if ((_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "trigger-loop", `The scene plays on ${scene.trigger}, so its "${scene.loop}" loop does not apply; set loop to "none" or remove the trigger.`, {}));
1951
1881
  if (scene.trigger === "click") {
1952
- if (scene.shots.length === 1) issues.push(motionIssue("click-one-shot", "The scene plays on click but has one shot, so every click replays it from the start; split it into shots (each click plays the next one).", { shot: scene.shots[0].id }));
1882
+ if (scene.shots.length === 1) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "click-one-shot", "The scene plays on click but has one shot, so every click replays it from the start; split it into shots (each click plays the next one).", { shot: scene.shots[0].id }));
1953
1883
  scene.shots.forEach((shot, i) => {
1954
- if (i > 0 && shot.at) issues.push(motionIssue("click-cue", `Shot "${shot.id}" is cued, but on click a shot starts when it is clicked to; remove its "at" or the trigger.`, { shot: shot.id }));
1884
+ if (i > 0 && shot.at) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "click-cue", `Shot "${shot.id}" is cued, but on click a shot starts when it is clicked to; remove its "at" or the trigger.`, { shot: shot.id }));
1955
1885
  });
1956
1886
  }
1957
1887
  }
@@ -1959,11 +1889,11 @@ function checkMotionScene(scene) {
1959
1889
  if (!shot.at) return;
1960
1890
  const timing = timeline.shots[i];
1961
1891
  if (timing.cue === void 0) {
1962
- const what = shot.at.beat !== void 0 ? `beat ${shot.at.beat}, but the scene has no beat grid; set one with set_animation_settings ({ "beat": { "bpm": \u2026 } })` : `word ${shot.at.word}, but the narration has ${_nullishCoalesce(_optionalChain([scene, 'access', _91 => _91.narration, 'optionalAccess', _92 => _92.words, 'access', _93 => _93.length]), () => ( 0))} words (indexes from 0)`;
1963
- issues.push(motionIssue("unknown-cue", `Shot "${shot.id}" is cued to ${what}.`, { shot: shot.id }));
1892
+ const what = shot.at.beat !== void 0 ? `beat ${shot.at.beat}, but the scene has no beat grid; set one with set_animation_settings ({ "beat": { "bpm": \u2026 } })` : `word ${shot.at.word}, but the narration has ${_nullishCoalesce(_optionalChain([scene, 'access', _89 => _89.narration, 'optionalAccess', _90 => _90.words, 'access', _91 => _91.length]), () => ( 0))} words (indexes from 0)`;
1893
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-cue", `Shot "${shot.id}" is cued to ${what}.`, { shot: shot.id }));
1964
1894
  } else if (timing.missedBy !== void 0) {
1965
1895
  const late = Math.round(timing.missedBy);
1966
- issues.push(motionIssue("cue-missed", `Shot "${shot.id}" is cued at ${Math.round(timing.cue)} ms but starts ${late} ms late, because the shot before runs until ${Math.round(timing.start)} ms; shorten that shot (its hold, durations or speed) or cue this one later.`, { shot: shot.id, measured: late, needed: 0, unit: "ms" }));
1896
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "cue-missed", `Shot "${shot.id}" is cued at ${Math.round(timing.cue)} ms but starts ${late} ms late, because the shot before runs until ${Math.round(timing.start)} ms; shorten that shot (its hold, durations or speed) or cue this one later.`, { shot: shot.id, measured: late, needed: 0, unit: "ms" }));
1967
1897
  }
1968
1898
  });
1969
1899
  for (const [key, track] of timeline.tracks) {
@@ -1975,7 +1905,7 @@ function checkMotionScene(scene) {
1975
1905
  const property = key.split("\0")[1];
1976
1906
  if (!a.node) continue;
1977
1907
  issues.push(
1978
- motionIssue("overlap", `"${a.node}" ${property} is changed by two commands at once (shot "${a.shot}" command ${a.command + 1} and shot "${b.shot}" command ${b.command + 1}); the later one takes over. Start it after the first ends, or use with: "after".`, {
1908
+ _chunkWAJQKWQUcjs.motionIssue.call(void 0, "overlap", `"${a.node}" ${property} is changed by two commands at once (shot "${a.shot}" command ${a.command + 1} and shot "${b.shot}" command ${b.command + 1}); the later one takes over. Start it after the first ends, or use with: "after".`, {
1979
1909
  shot: b.shot,
1980
1910
  command: b.command,
1981
1911
  ids: [a.node]
@@ -1992,26 +1922,26 @@ function checkMotionScene(scene) {
1992
1922
  const cam = frame.camera;
1993
1923
  const docIndex = indexMotionNodes(frame.document.nodes);
1994
1924
  for (const id of command3.targets) {
1995
- const b = _optionalChain([docIndex, 'access', _94 => _94.get, 'call', _95 => _95(id), 'optionalAccess', _96 => _96.bounds]);
1925
+ const b = _optionalChain([docIndex, 'access', _92 => _92.get, 'call', _93 => _93(id), 'optionalAccess', _94 => _94.bounds]);
1996
1926
  if (!b || reported.has(id) || !visibleAt(timeline, id, timing.end, nodes.get(id).node)) continue;
1997
1927
  const outside = b.x + b.width < cam.x || b.y + b.height < cam.y || b.x > cam.x + cam.width || b.y > cam.y + cam.height;
1998
1928
  if (outside) {
1999
1929
  reported.add(id);
2000
- issues.push(motionIssue("out-of-frame", `"${id}" is outside the camera when this ${command3.type} ends, so it is not seen; move it into frame or move the camera.`, { shot: timing.shot, command: timing.command, ids: [id] }));
1930
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "out-of-frame", `"${id}" is outside the camera when this ${command3.type} ends, so it is not seen; move it into frame or move the camera.`, { shot: timing.shot, command: timing.command, ids: [id] }));
2001
1931
  }
2002
1932
  }
2003
1933
  }
2004
1934
  if (scene.controls) {
2005
1935
  for (const control of scene.controls) {
2006
1936
  if (!usesColor(scene, control.default))
2007
- issues.push(motionIssue("unknown-control-color", `Control "${control.name}" stands for ${control.default}, which the scene never uses; set its default to a colour in the artwork.`));
1937
+ issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "unknown-control-color", `Control "${control.name}" stands for ${control.default}, which the scene never uses; set its default to a colour in the artwork.`));
2008
1938
  }
2009
1939
  }
2010
1940
  if (scene.target && scene.shots.length) {
2011
1941
  const seconds = Math.round(timeline.duration / 100) / 10;
2012
1942
  const [min, max] = scene.target;
2013
- if (seconds > max) issues.push(motionIssue("scene-too-long", `The scene runs ${seconds} s, past its ${max} s target; shorten holds or durations, or fit it (fit_animation).`, { measured: seconds, needed: max, unit: "s" }));
2014
- if (seconds < min) issues.push(motionIssue("scene-too-short", `The scene runs ${seconds} s, under its ${min} s target; hold longer, add shots, or fit it (fit_animation).`, { measured: seconds, needed: min, unit: "s" }));
1943
+ if (seconds > max) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "scene-too-long", `The scene runs ${seconds} s, past its ${max} s target; shorten holds or durations, or fit it (fit_animation).`, { measured: seconds, needed: max, unit: "s" }));
1944
+ if (seconds < min) issues.push(_chunkWAJQKWQUcjs.motionIssue.call(void 0, "scene-too-short", `The scene runs ${seconds} s, under its ${min} s target; hold longer, add shots, or fit it (fit_animation).`, { measured: seconds, needed: min, unit: "s" }));
2015
1945
  }
2016
1946
  return issues;
2017
1947
  }
@@ -2040,7 +1970,7 @@ var fail = (message) => {
2040
1970
  };
2041
1971
  function shotIndex(scene, id) {
2042
1972
  const i = scene.shots.findIndex((s) => s.id === id);
2043
- if (i < 0) fail(`There is no shot ${namedWithSuggestion(id, scene.shots.map((s) => s.id))}; the shots are ${scene.shots.map((s) => `"${s.id}"`).join(", ") || "none yet"}.`);
1973
+ if (i < 0) fail(`There is no shot ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, scene.shots.map((s) => s.id))}; the shots are ${scene.shots.map((s) => `"${s.id}"`).join(", ") || "none yet"}.`);
2044
1974
  return i;
2045
1975
  }
2046
1976
  function position(at, length, what) {
@@ -2098,7 +2028,7 @@ function applyOne(scene, edit) {
2098
2028
  if (typeof edit.name !== "string" || !edit.name) fail('Give the clip a "name".');
2099
2029
  const clips = { ..._nullishCoalesce(scene.clips, () => ( {})) };
2100
2030
  if (edit.clip === null) {
2101
- if (!clips[edit.name]) fail(`There is no clip ${namedWithSuggestion(edit.name, Object.keys(clips))} to delete.`);
2031
+ if (!clips[edit.name]) fail(`There is no clip ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, edit.name, Object.keys(clips))} to delete.`);
2102
2032
  const playing = scene.shots.filter((s) => s.run.some((c) => c.type === "play" && c.clip === edit.name)).map((s) => `"${s.id}"`);
2103
2033
  if (playing.length) fail(`Clip "${edit.name}" is played in shot${playing.length > 1 ? "s" : ""} ${playing.join(", ")}; remove those play commands first.`);
2104
2034
  delete clips[edit.name];
@@ -2204,7 +2134,7 @@ function applyOne(scene, edit) {
2204
2134
  const names = new Set(edit.controls.map((c) => c.name));
2205
2135
  for (const preset2 of _nullishCoalesce(next.presets, () => ( [])))
2206
2136
  for (const key of Object.keys(preset2.values))
2207
- if (!names.has(key)) fail(`Preset "${preset2.name}" sets ${namedWithSuggestion(key, names)}, which is not a control.`);
2137
+ if (!names.has(key)) fail(`Preset "${preset2.name}" sets ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, key, names)}, which is not a control.`);
2208
2138
  return next;
2209
2139
  }
2210
2140
  case "replace_scene":
@@ -2212,11 +2142,11 @@ function applyOne(scene, edit) {
2212
2142
  }
2213
2143
  }
2214
2144
  function errorKeys(issues) {
2215
- return new Set(issues.filter((i) => i.severity === "error").map(motionIssueKey));
2145
+ return new Set(issues.filter((i) => i.severity === "error").map(_chunkWAJQKWQUcjs.motionIssueKey));
2216
2146
  }
2217
2147
  function editHints(before, after) {
2218
- const old = new Set(before.map(motionIssueKey));
2219
- return after.filter((i) => i.code === "overlap" && !old.has(motionIssueKey(i))).map(motionIssueLine);
2148
+ const old = new Set(before.map(_chunkWAJQKWQUcjs.motionIssueKey));
2149
+ return after.filter((i) => i.code === "overlap" && !old.has(_chunkWAJQKWQUcjs.motionIssueKey.call(void 0, i))).map(_chunkWAJQKWQUcjs.motionIssueLine);
2220
2150
  }
2221
2151
  function applyMotionEdits(scene, edits) {
2222
2152
  const list = Array.isArray(edits) ? edits : [edits];
@@ -2224,9 +2154,9 @@ function applyMotionEdits(scene, edits) {
2224
2154
  let next = scene;
2225
2155
  for (let i = 0; i < list.length; i++) {
2226
2156
  const edit = list[i];
2227
- const prefix = list.length > 1 ? `op ${i + 1} (${_optionalChain([edit, 'optionalAccess', _97 => _97.op])}): ` : "";
2157
+ const prefix = list.length > 1 ? `op ${i + 1} (${_optionalChain([edit, 'optionalAccess', _95 => _95.op])}): ` : "";
2228
2158
  if (!edit || !MOTION_EDIT_OPS.includes(edit.op))
2229
- return { ok: false, error: `${prefix}Unknown op ${namedWithSuggestion(String(_optionalChain([edit, 'optionalAccess', _98 => _98.op])), MOTION_EDIT_OPS)}. Nothing was changed.` };
2159
+ return { ok: false, error: `${prefix}Unknown op ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, String(_optionalChain([edit, 'optionalAccess', _96 => _96.op])), MOTION_EDIT_OPS)}. Nothing was changed.` };
2230
2160
  try {
2231
2161
  next = applyOne(next, edit);
2232
2162
  } catch (error) {
@@ -2238,8 +2168,8 @@ function applyMotionEdits(scene, edits) {
2238
2168
  }
2239
2169
  const issues = checkMotionScene(next);
2240
2170
  const had = errorKeys(before);
2241
- const added = issues.filter((i) => i.severity === "error" && !had.has(motionIssueKey(i)));
2242
- if (added.length) return { ok: false, error: `Nothing was changed: ${added.map(motionIssueLine).join(" ")}` };
2171
+ const added = issues.filter((i) => i.severity === "error" && !had.has(_chunkWAJQKWQUcjs.motionIssueKey.call(void 0, i)));
2172
+ if (added.length) return { ok: false, error: `Nothing was changed: ${added.map(_chunkWAJQKWQUcjs.motionIssueLine).join(" ")}` };
2243
2173
  return { ok: true, scene: next, issues, hints: editHints(before, issues) };
2244
2174
  }
2245
2175
  var REF = /^\$(\d+|last)((?:\.[A-Za-z_]\w*|\[\d+\])+)$/;
@@ -2248,7 +2178,7 @@ function resolveMotionEditRefs(scene, edits) {
2248
2178
  const resolved = [];
2249
2179
  let next = scene;
2250
2180
  for (let i = 0; i < edits.length; i++) {
2251
- const where = `op ${i + 1} (${_optionalChain([edits, 'access', _99 => _99[i], 'optionalAccess', _100 => _100.op])})`;
2181
+ const where = `op ${i + 1} (${_optionalChain([edits, 'access', _97 => _97[i], 'optionalAccess', _98 => _98.op])})`;
2252
2182
  let problem = null;
2253
2183
  const walk = (v) => {
2254
2184
  if (typeof v === "string") {
@@ -2281,9 +2211,9 @@ function resolveMotionEditRefs(scene, edits) {
2281
2211
  resolved.push(edit);
2282
2212
  const out = { op: edit.op };
2283
2213
  if (edit.op === "insert_shots") out.shots = edit.shots.map((s) => s.id);
2284
- if ("shot" in edit && typeof edit.shot === "string") out.shot = edit.op === "update_shot" && _optionalChain([edit, 'access', _101 => _101.set, 'optionalAccess', _102 => _102.id]) ? edit.set.id : edit.shot;
2214
+ if ("shot" in edit && typeof edit.shot === "string") out.shot = edit.op === "update_shot" && _optionalChain([edit, 'access', _99 => _99.set, 'optionalAccess', _100 => _100.id]) ? edit.set.id : edit.shot;
2285
2215
  if (edit.op === "add_commands") {
2286
- const at = _nullishCoalesce(_nullishCoalesce(edit.at, () => ( _optionalChain([before, 'access', _103 => _103.shots, 'access', _104 => _104.find, 'call', _105 => _105((s) => s.id === edit.shot), 'optionalAccess', _106 => _106.run, 'access', _107 => _107.length]))), () => ( 0));
2216
+ const at = _nullishCoalesce(_nullishCoalesce(edit.at, () => ( _optionalChain([before, 'access', _101 => _101.shots, 'access', _102 => _102.find, 'call', _103 => _103((s) => s.id === edit.shot), 'optionalAccess', _104 => _104.run, 'access', _105 => _105.length]))), () => ( 0));
2287
2217
  out.indexes = edit.commands.map((_, k) => at + k);
2288
2218
  }
2289
2219
  if (edit.op === "move_command") out.indexes = [edit.to];
@@ -2302,7 +2232,7 @@ function fitMotionScene(scene, ms, options = {}) {
2302
2232
  if (!(Number.isFinite(ms) && ms > 0)) throw new Error("Give the length to fit as a number of milliseconds above 0.");
2303
2233
  const ids = scene.shots.map((s) => s.id);
2304
2234
  const keep = new Set(_nullishCoalesce(options.keep, () => ( [])));
2305
- for (const id of keep) if (!ids.includes(id)) throw new Error(`There is no shot ${namedWithSuggestion(id, ids)} to keep.`);
2235
+ for (const id of keep) if (!ids.includes(id)) throw new Error(`There is no shot ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, ids)} to keep.`);
2306
2236
  const timeline = compileMotionScene(scene);
2307
2237
  let kept = 0;
2308
2238
  let rest = 0;
@@ -2442,7 +2372,7 @@ function toFlairSvgMotion(scene, options = {}) {
2442
2372
  const wrapper = freshId(`${id}--follow`);
2443
2373
  const centre = freshId(`${id}--follow-centre`);
2444
2374
  const c = entry.center;
2445
- const at = _optionalChain([motionNodeOffset, 'call', _108 => _108(entry, timeline, 0, nodes), 'optionalAccess', _109 => _109.follow]);
2375
+ const at = _optionalChain([motionNodeOffset, 'call', _106 => _106(entry, timeline, 0, nodes), 'optionalAccess', _107 => _107.follow]);
2446
2376
  const placed = at ? `translate(${f(at.x)} ${f(at.y)})${at.angle ? ` rotate(${f(at.angle)})` : ""}` : void 0;
2447
2377
  (wrap[id] ??= []).push({ id: wrapper, ...placed ? { transform: placed } : {} }, { id: centre, transform: `translate(${f(-c.x)} ${f(-c.y)})` });
2448
2378
  follows.push({ id, wrapper, routes: ids, segments: followSegments.filter((seg) => seg.path && ids.has(seg.path)) });
@@ -2503,7 +2433,7 @@ function toFlairSvgMotion(scene, options = {}) {
2503
2433
  exact: () => false,
2504
2434
  value: (t) => {
2505
2435
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
2506
- const now = _chunk7MD7C6XQcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _110 => _110(frame.document.nodes), 'access', _111 => _111.get, 'call', _112 => _112(id), 'optionalAccess', _113 => _113.node]));
2436
+ const now = _chunk7MD7C6XQcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
2507
2437
  if (!now || now.type !== "path") return "";
2508
2438
  const bezier = _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, now, _chunk7MD7C6XQcjs.IDENTITY_MATRIX, { effects: false }), inverse);
2509
2439
  return _chunkXGD3FSNCcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
@@ -2524,8 +2454,8 @@ function toFlairSvgMotion(scene, options = {}) {
2524
2454
  ...delay > 0 ? { delay: round2(delay) } : {},
2525
2455
  ms: round2(ms),
2526
2456
  ease: written,
2527
- ..._optionalChain([segment, 'optionalAccess', _114 => _114.behavior]) ? { behavior: segment.behavior } : {},
2528
- ..._optionalChain([segment, 'optionalAccess', _115 => _115.steps]) ? { strobe: segment.steps } : {}
2457
+ ..._optionalChain([segment, 'optionalAccess', _112 => _112.behavior]) ? { behavior: segment.behavior } : {},
2458
+ ..._optionalChain([segment, 'optionalAccess', _113 => _113.steps]) ? { strobe: segment.steps } : {}
2529
2459
  };
2530
2460
  if (channel.kind === "view") animate.push({ ...base, view: to });
2531
2461
  else if (channel.kind === "draw") animate.push({ ...base, draw: [from, to] });
@@ -2615,7 +2545,7 @@ function toFlairSvgMotion(scene, options = {}) {
2615
2545
  let svg = _chunk7MD7C6XQcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunk7MD7C6XQcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2616
2546
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
2617
2547
  let motion = { svg, animate };
2618
- if (_optionalChain([scene, 'access', _116 => _116.controls, 'optionalAccess', _117 => _117.length])) {
2548
+ if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
2619
2549
  const declarations = scene.controls.map((c) => `{{${c.name}: color default=${c.default.toUpperCase()}${c.label ? ` label='${c.label.replace(/'/g, "\u2019")}'` : ""}}}`).join(" ");
2620
2550
  const swap = (text) => scene.controls.reduce((s, c) => s.replace(new RegExp(`${c.default}(?![0-9a-fA-F])`, "gi"), `{{${c.name}}}`), text);
2621
2551
  svg = svg.replace(/^(<svg[^>]*>)/, `$1<!-- ${declarations} -->`);
@@ -2637,7 +2567,7 @@ function toFlairVectorEffect(scene, options = {}) {
2637
2567
  tags: _nullishCoalesce(options.tags, () => ( [])),
2638
2568
  motion: out.motion,
2639
2569
  hold: out.hold,
2640
- ..._optionalChain([scene, 'access', _118 => _118.presets, 'optionalAccess', _119 => _119.length]) ? { presets: scene.presets } : {},
2570
+ ..._optionalChain([scene, 'access', _116 => _116.presets, 'optionalAccess', _117 => _117.length]) ? { presets: scene.presets } : {},
2641
2571
  ...out.trigger ? { trigger: out.trigger } : {}
2642
2572
  };
2643
2573
  }
@@ -2681,7 +2611,7 @@ function resolvePlaceholders(motion, notes) {
2681
2611
  const filled = text.replace(PLACEHOLDER, (_, name) => {
2682
2612
  const d = declared.get(name);
2683
2613
  if (!d) unknown.add(name);
2684
- return (_nullishCoalesce(_optionalChain([d, 'optionalAccess', _120 => _120.value]), () => ( ""))).replace(/"/g, '\\"');
2614
+ return (_nullishCoalesce(_optionalChain([d, 'optionalAccess', _118 => _118.value]), () => ( ""))).replace(/"/g, '\\"');
2685
2615
  });
2686
2616
  for (const name of unknown) notes.push(`Placeholder "{{${name}}}" has no declaration, so it was left empty.`);
2687
2617
  return { motion: JSON.parse(filled), controls };
@@ -2735,7 +2665,7 @@ function commandsFor(anim, nodes, entered, notes) {
2735
2665
  if (anim.along) {
2736
2666
  const path = nodes.get(anim.along);
2737
2667
  if (!path || path.node.type !== "path") notes.push(`${where} follows "${anim.along}", which is not a path in the artwork; the follow was skipped.`);
2738
- else out.push({ type: "follow", targets, path: anim.along, from: _nullishCoalesce(_optionalChain([anim, 'access', _121 => _121.at, 'optionalAccess', _122 => _122[0]]), () => ( 0)), to: _nullishCoalesce(_optionalChain([anim, 'access', _123 => _123.at, 'optionalAccess', _124 => _124[1]]), () => ( 1)), ...anim.orient ? { rotate: true } : {}, ...timing, ...ease(MOTION_EASE_IN_OUT) });
2668
+ else out.push({ type: "follow", targets, path: anim.along, from: _nullishCoalesce(_optionalChain([anim, 'access', _119 => _119.at, 'optionalAccess', _120 => _120[0]]), () => ( 0)), to: _nullishCoalesce(_optionalChain([anim, 'access', _121 => _121.at, 'optionalAccess', _122 => _122[1]]), () => ( 1)), ...anim.orient ? { rotate: true } : {}, ...timing, ...ease(MOTION_EASE_IN_OUT) });
2739
2669
  }
2740
2670
  for (const [attr, [a, b]] of Object.entries(_nullishCoalesce(anim.attrs, () => ( {})))) {
2741
2671
  if (attr === "opacity") {
@@ -2746,7 +2676,7 @@ function commandsFor(anim, nodes, entered, notes) {
2746
2676
  out.push({ type: "enter", targets, style: "fade", ...timing, ...ease(MOTION_EASE_OUT) });
2747
2677
  } else out.push({ type: "fade", targets, to: Math.min(1, Math.max(0, to)), ...timing, ...ease(MOTION_EASE_IN_OUT) });
2748
2678
  } else if (attr === "fill" || attr === "stroke") {
2749
- if (_optionalChain([behavior, 'optionalAccess', _125 => _125.type]) === "pulse") out.push({ type: "color-pulse", targets, color: String(b), paint: attr, count: _nullishCoalesce(behavior.count, () => ( 1)), ...timing, ...ease("linear") });
2679
+ if (_optionalChain([behavior, 'optionalAccess', _123 => _123.type]) === "pulse") out.push({ type: "color-pulse", targets, color: String(b), paint: attr, count: _nullishCoalesce(behavior.count, () => ( 1)), ...timing, ...ease("linear") });
2750
2680
  else {
2751
2681
  if (behavior) notes.push(`${where}: a ${attr} ${behavior.type} became a plain colour change.`);
2752
2682
  out.push({ type: "style", targets, [attr]: String(b), ...timing, ...ease(MOTION_EASE_IN_OUT) });
@@ -3036,7 +2966,7 @@ function toLottie(scene, options = {}) {
3036
2966
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
3037
2967
  const geometryAt = (t) => {
3038
2968
  if (!shapeSegments.length) return _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, path);
3039
- const now = _optionalChain([indexMotionNodes, 'call', _126 => _126(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _127 => _127.get, 'call', _128 => _128(path.id), 'optionalAccess', _129 => _129.node]);
2969
+ const now = _optionalChain([indexMotionNodes, 'call', _124 => _124(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _125 => _125.get, 'call', _126 => _126(path.id), 'optionalAccess', _127 => _127.node]);
3040
2970
  return now && now.type === "path" ? _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, _chunk7MD7C6XQcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunk7MD7C6XQcjs.vectorPathWorldBezier.call(void 0, path);
3041
2971
  };
3042
2972
  const rest = lottieContours(_chunkXGD3FSNCcjs.toBezierPath.call(void 0, geometryAt(0)), round2);
@@ -3084,7 +3014,7 @@ function toLottie(scene, options = {}) {
3084
3014
  lj: path.strokeLinejoin === "round" ? 2 : path.strokeLinejoin === "bevel" ? 3 : 1,
3085
3015
  ml: 4
3086
3016
  });
3087
- if (_optionalChain([path, 'access', _130 => _130.strokeDasharray, 'optionalAccess', _131 => _131.length])) notes.push(`"${path.id}": its dashes are not exported; the stroke is solid.`);
3017
+ if (_optionalChain([path, 'access', _128 => _128.strokeDasharray, 'optionalAccess', _129 => _129.length])) notes.push(`"${path.id}": its dashes are not exported; the stroke is solid.`);
3088
3018
  if (path.strokeAlign && path.strokeAlign !== "center") notes.push(`"${path.id}": its stroke is drawn centred (Lottie has no inside or outside strokes).`);
3089
3019
  }
3090
3020
  const fill = paintOf(path.fill, "fill", path.id);
@@ -3174,7 +3104,7 @@ var kids = (el, name) => el ? Array.from(el.children).filter((c) => c.localName
3174
3104
  var kid = (el, name) => _nullishCoalesce(kids(el, name)[0], () => ( null));
3175
3105
  var deep = (el, name) => el ? Array.from(el.getElementsByTagNameNS("*", name)) : [];
3176
3106
  var num = (el, attr, fallback = 0) => {
3177
- const v = _optionalChain([el, 'optionalAccess', _132 => _132.getAttribute, 'call', _133 => _133(attr)]);
3107
+ const v = _optionalChain([el, 'optionalAccess', _130 => _130.getAttribute, 'call', _131 => _131(attr)]);
3178
3108
  const n = v === null || v === void 0 ? NaN : Number(v);
3179
3109
  return Number.isFinite(n) ? n : fallback;
3180
3110
  };
@@ -3282,8 +3212,8 @@ function placement(xfrm, map) {
3282
3212
  const ext = kid(xfrm, "ext");
3283
3213
  const [x, y, w, h] = map(num(off, "x"), num(off, "y"), num(ext, "cx"), num(ext, "cy"));
3284
3214
  const rot = num(xfrm, "rot") / 6e4 * (Math.PI / 180);
3285
- const fx = _optionalChain([xfrm, 'optionalAccess', _134 => _134.getAttribute, 'call', _135 => _135("flipH")]) === "1" ? -1 : 1;
3286
- const fy = _optionalChain([xfrm, 'optionalAccess', _136 => _136.getAttribute, 'call', _137 => _137("flipV")]) === "1" ? -1 : 1;
3215
+ const fx = _optionalChain([xfrm, 'optionalAccess', _132 => _132.getAttribute, 'call', _133 => _133("flipH")]) === "1" ? -1 : 1;
3216
+ const fy = _optionalChain([xfrm, 'optionalAccess', _134 => _134.getAttribute, 'call', _135 => _135("flipV")]) === "1" ? -1 : 1;
3287
3217
  const cx = x + w / 2;
3288
3218
  const cy = y + h / 2;
3289
3219
  const cos = Math.cos(rot);
@@ -3310,7 +3240,7 @@ function shapes(ctx, tree, map) {
3310
3240
  const nv = el.firstElementChild;
3311
3241
  const cNvPr = kid(nv, "cNvPr");
3312
3242
  const spid = num(cNvPr, "id", -1);
3313
- const name = _nullishCoalesce(_optionalChain([cNvPr, 'optionalAccess', _138 => _138.getAttribute, 'call', _139 => _139("name")]), () => ( ""));
3243
+ const name = _nullishCoalesce(_optionalChain([cNvPr, 'optionalAccess', _136 => _136.getAttribute, 'call', _137 => _137("name")]), () => ( ""));
3314
3244
  if (el.localName === "grpSp") {
3315
3245
  const xfrm = kid(kid(el, "grpSpPr"), "xfrm");
3316
3246
  const off = kid(xfrm, "off");
@@ -3331,7 +3261,7 @@ function shapes(ctx, tree, map) {
3331
3261
  if (el.localName !== "sp" && el.localName !== "cxnSp") continue;
3332
3262
  const spPr = kid(el, "spPr");
3333
3263
  const { w, h, transform } = placement(kid(spPr, "xfrm"), map);
3334
- const prst = _optionalChain([kid, 'call', _140 => _140(spPr, "prstGeom"), 'optionalAccess', _141 => _141.getAttribute, 'call', _142 => _142("prst")]);
3264
+ const prst = _optionalChain([kid, 'call', _138 => _138(spPr, "prstGeom"), 'optionalAccess', _139 => _139.getAttribute, 'call', _140 => _140("prst")]);
3335
3265
  const cust = kid(spPr, "custGeom");
3336
3266
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
3337
3267
  if (!subpaths) {
@@ -3445,13 +3375,13 @@ function command(ctx, ctn, scene, artwork, target, hidden) {
3445
3375
  }
3446
3376
  if (cls === "path") {
3447
3377
  const motion = deep(ctn, "animMotion")[0];
3448
- const d = _optionalChain([motion, 'optionalAccess', _143 => _143.getAttribute, 'call', _144 => _144("path")]);
3378
+ const d = _optionalChain([motion, 'optionalAccess', _141 => _141.getAttribute, 'call', _142 => _142("path")]);
3449
3379
  if (!d) return null;
3450
3380
  const entry = artwork.flatMap(function all(n) {
3451
3381
  return n.type === "group" ? [n, ...n.children.flatMap(all)] : [n];
3452
3382
  }).find((n) => n.id === target);
3453
- const t = _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _145 => _145.transform]), () => ( [1, 0, 0, 1, 0, 0]));
3454
- const p = _optionalChain([entry, 'optionalAccess', _146 => _146.type]) === "path" ? _optionalChain([entry, 'access', _147 => _147.subpaths, 'access', _148 => _148[0], 'optionalAccess', _149 => _149.anchors]) : void 0;
3383
+ const t = _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _143 => _143.transform]), () => ( [1, 0, 0, 1, 0, 0]));
3384
+ const p = _optionalChain([entry, 'optionalAccess', _144 => _144.type]) === "path" ? _optionalChain([entry, 'access', _145 => _145.subpaths, 'access', _146 => _146[0], 'optionalAccess', _147 => _147.anchors]) : void 0;
3455
3385
  const xs = (_nullishCoalesce(p, () => ( []))).map((a) => a.x);
3456
3386
  const ys = (_nullishCoalesce(p, () => ( []))).map((a) => a.y);
3457
3387
  const lx = xs.length ? (Math.min(...xs) + Math.max(...xs)) / 2 : 0;
@@ -3503,9 +3433,9 @@ async function fromPptxAnimation(data, options = {}) {
3503
3433
  if (!path.includes("theme/")) continue;
3504
3434
  const theme = await xml(ctx, path);
3505
3435
  const scheme = deep(theme, "clrScheme")[0];
3506
- for (const c of Array.from(_nullishCoalesce(_optionalChain([scheme, 'optionalAccess', _150 => _150.children]), () => ( [])))) {
3436
+ for (const c of Array.from(_nullishCoalesce(_optionalChain([scheme, 'optionalAccess', _148 => _148.children]), () => ( [])))) {
3507
3437
  const v = c.firstElementChild;
3508
- const hex = _optionalChain([v, 'optionalAccess', _151 => _151.localName]) === "srgbClr" ? v.getAttribute("val") : _optionalChain([v, 'optionalAccess', _152 => _152.getAttribute, 'call', _153 => _153("lastClr")]);
3438
+ const hex = _optionalChain([v, 'optionalAccess', _149 => _149.localName]) === "srgbClr" ? v.getAttribute("val") : _optionalChain([v, 'optionalAccess', _150 => _150.getAttribute, 'call', _151 => _151("lastClr")]);
3509
3439
  if (hex) ctx.theme.set(c.localName, `#${hex.toLowerCase()}`);
3510
3440
  }
3511
3441
  break;
@@ -3612,7 +3542,7 @@ var AnimationEditorController = (_class = class {
3612
3542
  time: p.time,
3613
3543
  playing: p.playing,
3614
3544
  loop: p.loop,
3615
- currentShot: _nullishCoalesce(_optionalChain([motionShotAt, 'call', _154 => _154(timeline, p.time), 'optionalAccess', _155 => _155.id]), () => ( null)),
3545
+ currentShot: _nullishCoalesce(_optionalChain([motionShotAt, 'call', _152 => _152(timeline, p.time), 'optionalAccess', _153 => _153.id]), () => ( null)),
3616
3546
  selection: this.selection,
3617
3547
  readOnly: this.readOnly,
3618
3548
  error: this.error,
@@ -3651,7 +3581,7 @@ var AnimationEditorController = (_class = class {
3651
3581
  this.applying = false;
3652
3582
  }
3653
3583
  this.notify();
3654
- _optionalChain([this, 'access', _156 => _156.onChange, 'optionalCall', _157 => _157(scene)]);
3584
+ _optionalChain([this, 'access', _154 => _154.onChange, 'optionalCall', _155 => _155(scene)]);
3655
3585
  }
3656
3586
  commit(label, next) {
3657
3587
  const before = this.scene;
@@ -4058,7 +3988,7 @@ var issueSummary = (issues) => ({
4058
3988
  errors: issues.filter((i) => i.severity === "error").length,
4059
3989
  warnings: issues.filter((i) => i.severity === "warning").length,
4060
3990
  notes: issues.filter((i) => i.severity === "note").length,
4061
- lines: issues.map((i) => `${i.severity}: ${motionIssueLine(i)}`)
3991
+ lines: issues.map((i) => `${i.severity}: ${_chunkWAJQKWQUcjs.motionIssueLine.call(void 0, i)}`)
4062
3992
  });
4063
3993
  function createAnimationEditorToolProvider(controller, options = {}) {
4064
3994
  const readOnlyReason = () => {
@@ -4180,7 +4110,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4180
4110
  }
4181
4111
  if (Array.isArray(motion_paths)) {
4182
4112
  const known = new Set(describeMotionElements(s).map((e) => e.id));
4183
- for (const id of motion_paths) if (!known.has(id)) throw new Error(`There is no element ${namedWithSuggestion(id, known)} to draw a motion path for.`);
4113
+ for (const id of motion_paths) if (!known.has(id)) throw new Error(`There is no element ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, known)} to draw a motion path for.`);
4184
4114
  }
4185
4115
  const overlays = { ...onion_skin ? { onionSkin: onion_skin } : {}, ...motion_paths ? { motionPaths: motion_paths } : {} };
4186
4116
  if (times) {
@@ -4218,9 +4148,9 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4218
4148
  handler: ({ from = 0, to, limit = 200 }) => {
4219
4149
  const s = scene();
4220
4150
  const timeline = compileMotionScene(s);
4221
- const words = _nullishCoalesce(_optionalChain([s, 'access', _158 => _158.narration, 'optionalAccess', _159 => _159.words]), () => ( []));
4151
+ const words = _nullishCoalesce(_optionalChain([s, 'access', _156 => _156.narration, 'optionalAccess', _157 => _157.words]), () => ( []));
4222
4152
  const end = _nullishCoalesce(to, () => ( Math.max(timeline.duration, words.length ? _nullishCoalesce(words[words.length - 1].end, () => ( words[words.length - 1].start)) : 0)));
4223
- const shotAt = (ms) => _optionalChain([timeline, 'access', _160 => _160.shots, 'access', _161 => _161.find, 'call', _162 => _162((x) => ms >= x.start && ms < x.end), 'optionalAccess', _163 => _163.id]);
4153
+ const shotAt = (ms) => _optionalChain([timeline, 'access', _158 => _158.shots, 'access', _159 => _159.find, 'call', _160 => _160((x) => ms >= x.start && ms < x.end), 'optionalAccess', _161 => _161.id]);
4224
4154
  const beats = [];
4225
4155
  if (s.beat && s.beat.bpm > 0) {
4226
4156
  const first = Math.max(0, Math.ceil(motionBeatAt(s.beat, from).beat - 1e-9));
@@ -4250,7 +4180,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4250
4180
  handler: ({ group }) => {
4251
4181
  const s = scene();
4252
4182
  const nodes = indexMotionNodes(s.artwork.nodes);
4253
- if (!nodes.has(group)) throw new Error(`There is no element ${namedWithSuggestion(group, [...nodes.keys()])}.`);
4183
+ if (!nodes.has(group)) throw new Error(`There is no element ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, group, [...nodes.keys()])}.`);
4254
4184
  const layout = motionTextLayout(nodes, group);
4255
4185
  if (!layout) throw new Error(`"${group}" is not a group of paths; convert the text to outlines (one path a letter) and group it.`);
4256
4186
  return { group, letters: layout.lines.reduce((n, l) => n + l.words.reduce((m, w) => m + w.letters.length, 0), 0), ...layout };
@@ -4270,7 +4200,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4270
4200
  handler: ({ node, from, to, step }) => {
4271
4201
  const s = scene();
4272
4202
  const ids = describeMotionElements(s).map((e) => e.id);
4273
- if (!ids.includes(node)) throw new Error(`There is no element ${namedWithSuggestion(node, ids)}.`);
4203
+ if (!ids.includes(node)) throw new Error(`There is no element ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, node, ids)}.`);
4274
4204
  return motionPath(s, node, { from, to, step });
4275
4205
  }
4276
4206
  };
@@ -4468,11 +4398,11 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4468
4398
  handler: ({ from, to, shots, stagger }) => {
4469
4399
  const s = scene();
4470
4400
  const ids = describeMotionElements(s).map((e) => e.id);
4471
- for (const id of [from, ...to]) if (!ids.includes(id)) throw new Error(`There is no element ${namedWithSuggestion(id, ids)}. Nothing was changed.`);
4401
+ for (const id of [from, ...to]) if (!ids.includes(id)) throw new Error(`There is no element ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, ids)}. Nothing was changed.`);
4472
4402
  if (to.includes(from)) throw new Error(`"to" includes "${from}" itself; give other elements. Nothing was changed.`);
4473
4403
  const only = shots ? new Set(shots) : null;
4474
4404
  if (only) {
4475
- for (const id of only) if (!s.shots.some((x) => x.id === id)) throw new Error(`There is no shot ${namedWithSuggestion(id, s.shots.map((x) => x.id))}. Nothing was changed.`);
4405
+ for (const id of only) if (!s.shots.some((x) => x.id === id)) throw new Error(`There is no shot ${_chunkWAJQKWQUcjs.namedWithSuggestion.call(void 0, id, s.shots.map((x) => x.id))}. Nothing was changed.`);
4476
4406
  }
4477
4407
  const copied = {};
4478
4408
  const edits = [];
@@ -4542,7 +4472,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4542
4472
  inputSchema: object({ shot: SHOT_ID, commands: { type: "array", items: MOTION_COMMAND_SCHEMA, minItems: 1, description: "Commands to add." }, at: { type: "integer", minimum: 0, description: "Index in the run (default: the end)." } }, ["shot", "commands"]),
4543
4473
  annotations: { title: "Add commands to a shot", ...WRITE },
4544
4474
  handler: ({ shot, commands, at }) => {
4545
- const before = _nullishCoalesce(_optionalChain([scene, 'call', _164 => _164(), 'access', _165 => _165.shots, 'access', _166 => _166.find, 'call', _167 => _167((s) => s.id === shot), 'optionalAccess', _168 => _168.run, 'access', _169 => _169.length]), () => ( 0));
4475
+ const before = _nullishCoalesce(_optionalChain([scene, 'call', _162 => _162(), 'access', _163 => _163.shots, 'access', _164 => _164.find, 'call', _165 => _165((s) => s.id === shot), 'optionalAccess', _166 => _166.run, 'access', _167 => _167.length]), () => ( 0));
4546
4476
  const first = _nullishCoalesce(at, () => ( before));
4547
4477
  return apply({ op: "add_commands", shot, commands, at }, "Add commands", (s) => {
4548
4478
  const shots = describeMotionShots(s);
@@ -4738,7 +4668,7 @@ var TIMING = /* @__PURE__ */ new Set(["duration", "delay", "stagger", "with", "e
4738
4668
  var COLORS = /* @__PURE__ */ new Set(["fill", "stroke", "color"]);
4739
4669
  var NODES = /* @__PURE__ */ new Set(["into", "path"]);
4740
4670
  function branch(type) {
4741
- return (_nullishCoalesce(MOTION_COMMAND_SCHEMA.oneOf, () => ( []))).find((b) => _optionalChain([b, 'access', _170 => _170.properties, 'optionalAccess', _171 => _171.type, 'optionalAccess', _172 => _172.const]) === type);
4671
+ return (_nullishCoalesce(MOTION_COMMAND_SCHEMA.oneOf, () => ( []))).find((b) => _optionalChain([b, 'access', _168 => _168.properties, 'optionalAccess', _169 => _169.type, 'optionalAccess', _170 => _170.const]) === type);
4742
4672
  }
4743
4673
  function unitOf(type, name) {
4744
4674
  if (name === "duration" || name === "delay" || name === "stagger") return "ms";
@@ -4773,7 +4703,7 @@ function kindOf(name, schema) {
4773
4703
  }
4774
4704
  function motionCommandFields(type) {
4775
4705
  const schema = branch(type);
4776
- if (!_optionalChain([schema, 'optionalAccess', _173 => _173.properties])) return [];
4706
+ if (!_optionalChain([schema, 'optionalAccess', _171 => _171.properties])) return [];
4777
4707
  const required = new Set(_nullishCoalesce(schema.required, () => ( [])));
4778
4708
  const fields = Object.entries(schema.properties).filter(([name]) => name !== "type").map(([name, s]) => {
4779
4709
  const kind = kindOf(name, s);
@@ -4830,7 +4760,7 @@ function defaultMotionCommand(type, targets, scene) {
4830
4760
  if (type === "wait") return { type: "wait", duration: 500 };
4831
4761
  if (!targets.length) return { error: "Pick a target first: click an element on the stage." };
4832
4762
  const nodes = [...indexMotionNodes(scene.artwork.nodes).values()];
4833
- const other = (pred) => _optionalChain([nodes, 'access', _174 => _174.find, 'call', _175 => _175((e) => !targets.includes(e.node.id) && pred(e)), 'optionalAccess', _176 => _176.node, 'access', _177 => _177.id]);
4763
+ const other = (pred) => _optionalChain([nodes, 'access', _172 => _172.find, 'call', _173 => _173((e) => !targets.includes(e.node.id) && pred(e)), 'optionalAccess', _174 => _174.node, 'access', _175 => _175.id]);
4834
4764
  const base = { targets: [...targets] };
4835
4765
  switch (type) {
4836
4766
  case "scale":
@@ -4861,8 +4791,8 @@ function defaultMotionCommand(type, targets, scene) {
4861
4791
  }
4862
4792
  case "effect": {
4863
4793
  for (const id of targets) {
4864
- const node = _optionalChain([nodes, 'access', _178 => _178.find, 'call', _179 => _179((e) => e.node.id === id), 'optionalAccess', _180 => _180.node]);
4865
- for (const effect of _nullishCoalesce(_optionalChain([node, 'optionalAccess', _181 => _181.effects]), () => ( []))) {
4794
+ const node = _optionalChain([nodes, 'access', _176 => _176.find, 'call', _177 => _177((e) => e.node.id === id), 'optionalAccess', _178 => _178.node]);
4795
+ for (const effect of _nullishCoalesce(_optionalChain([node, 'optionalAccess', _179 => _179.effects]), () => ( []))) {
4866
4796
  const param = Object.entries(effect.params).find(([, v]) => typeof v === "number");
4867
4797
  if (param) return { type, ...base, effect: effect.id, param: param[0], to: param[1] + 1 };
4868
4798
  }
@@ -4887,11 +4817,11 @@ function motionCommandRows(scene, shotId) {
4887
4817
  return scene.shots[index].run.map((command3, i) => {
4888
4818
  const t = timeline.commands.find((c) => c.shotIndex === index && c.command === i);
4889
4819
  const primitive = motionFlairPrimitive(command3);
4890
- return { index: i, command: command3, summary: motionCommandSummary(command3), start: _nullishCoalesce(_optionalChain([t, 'optionalAccess', _182 => _182.start]), () => ( 0)), end: _nullishCoalesce(_optionalChain([t, 'optionalAccess', _183 => _183.end]), () => ( 0)), ...primitive ? { flairPrimitive: primitive } : {} };
4820
+ return { index: i, command: command3, summary: motionCommandSummary(command3), start: _nullishCoalesce(_optionalChain([t, 'optionalAccess', _180 => _180.start]), () => ( 0)), end: _nullishCoalesce(_optionalChain([t, 'optionalAccess', _181 => _181.end]), () => ( 0)), ...primitive ? { flairPrimitive: primitive } : {} };
4891
4821
  });
4892
4822
  }
4893
4823
  function duplicateMotionCommandEdit(scene, shot, command3) {
4894
- const run = _nullishCoalesce(_optionalChain([scene, 'access', _184 => _184.shots, 'access', _185 => _185.find, 'call', _186 => _186((s) => s.id === shot), 'optionalAccess', _187 => _187.run]), () => ( []));
4824
+ const run = _nullishCoalesce(_optionalChain([scene, 'access', _182 => _182.shots, 'access', _183 => _183.find, 'call', _184 => _184((s) => s.id === shot), 'optionalAccess', _185 => _185.run]), () => ( []));
4895
4825
  return { op: "add_commands", shot, commands: run[command3] ? [structuredClone(run[command3])] : [], at: command3 + 1 };
4896
4826
  }
4897
4827
  var MOTION_EASE_CHOICES = [
@@ -4976,7 +4906,7 @@ function motionCueFromKey(key) {
4976
4906
  function motionCueChoices(scene, limit = 256) {
4977
4907
  const choices = [];
4978
4908
  const s = (ms) => `${(ms / 1e3).toFixed(2)} s`;
4979
- const end = Math.max(compileMotionScene(scene).duration, ..._nullishCoalesce(_optionalChain([scene, 'access', _188 => _188.narration, 'optionalAccess', _189 => _189.words, 'access', _190 => _190.map, 'call', _191 => _191((w) => _nullishCoalesce(w.end, () => ( w.start)))]), () => ( [0]))) + 2e3;
4909
+ const end = Math.max(compileMotionScene(scene).duration, ..._nullishCoalesce(_optionalChain([scene, 'access', _186 => _186.narration, 'optionalAccess', _187 => _187.words, 'access', _188 => _188.map, 'call', _189 => _189((w) => _nullishCoalesce(w.end, () => ( w.start)))]), () => ( [0]))) + 2e3;
4980
4910
  if (scene.beat && scene.beat.bpm > 0) {
4981
4911
  for (let beat = 0; choices.length < limit; beat++) {
4982
4912
  const time = motionBeatTime(scene.beat, beat);
@@ -4986,7 +4916,7 @@ function motionCueChoices(scene, limit = 256) {
4986
4916
  choices.push({ value: `beat:${beat}`, label: `Beat ${beat} (bar ${at.bar}.${at.beatInBar}) \xB7 ${s(time)}`, time });
4987
4917
  }
4988
4918
  }
4989
- _optionalChain([scene, 'access', _192 => _192.narration, 'optionalAccess', _193 => _193.words, 'access', _194 => _194.forEach, 'call', _195 => _195((w, i) => {
4919
+ _optionalChain([scene, 'access', _190 => _190.narration, 'optionalAccess', _191 => _191.words, 'access', _192 => _192.forEach, 'call', _193 => _193((w, i) => {
4990
4920
  if (choices.length < limit * 2) choices.push({ value: `word:${i}`, label: `Word ${i} \u201C${w.text}\u201D \xB7 ${s(w.start)}`, time: w.start });
4991
4921
  })]);
4992
4922
  return choices;
@@ -4995,7 +4925,7 @@ function motionShotCueTime(scene, cue) {
4995
4925
  return cue ? motionCueTime(scene, cue) : void 0;
4996
4926
  }
4997
4927
  function formatMotionNarration(narration) {
4998
- return (_nullishCoalesce(_optionalChain([narration, 'optionalAccess', _196 => _196.words]), () => ( []))).map((w) => `${w.start} ${w.text}`).join("\n");
4928
+ return (_nullishCoalesce(_optionalChain([narration, 'optionalAccess', _194 => _194.words]), () => ( []))).map((w) => `${w.start} ${w.text}`).join("\n");
4999
4929
  }
5000
4930
  function parseMotionNarration(text) {
5001
4931
  const lines = text.split("\n").map((l) => l.trim()).filter(Boolean);
@@ -5175,5 +5105,5 @@ function parseMotionDrivers(text) {
5175
5105
 
5176
5106
 
5177
5107
 
5178
- exports.ANIMATION_EDITOR_AGENT_INSTRUCTIONS = ANIMATION_EDITOR_AGENT_INSTRUCTIONS; exports.AnimationEditorController = AnimationEditorController; exports.FLAIR_EASES = FLAIR_EASES; exports.FLAIR_EXPORT_VERSION = FLAIR_EXPORT_VERSION; exports.MOTION_ADDITIVE_PROPERTIES = MOTION_ADDITIVE_PROPERTIES; exports.MOTION_BLENDS = MOTION_BLENDS; exports.MOTION_CAMERA_MS = MOTION_CAMERA_MS; exports.MOTION_CASCADES = MOTION_CASCADES; exports.MOTION_CLIP_TARGET = MOTION_CLIP_TARGET; exports.MOTION_COMMAND_SCHEMA = MOTION_COMMAND_SCHEMA; exports.MOTION_COMMAND_TYPES = MOTION_COMMAND_TYPES; exports.MOTION_DEFAULT_DURATIONS = MOTION_DEFAULT_DURATIONS; exports.MOTION_DEFAULT_HOLD = MOTION_DEFAULT_HOLD; exports.MOTION_DIRECTIONS = MOTION_DIRECTIONS; exports.MOTION_DRAW_EFFECT_ID = MOTION_DRAW_EFFECT_ID; exports.MOTION_DRAW_MS_PER_UNIT = MOTION_DRAW_MS_PER_UNIT; exports.MOTION_DRAW_RANGE = MOTION_DRAW_RANGE; exports.MOTION_DRIVEN_PROPERTIES = MOTION_DRIVEN_PROPERTIES; exports.MOTION_EASE_CHOICES = MOTION_EASE_CHOICES; exports.MOTION_EASE_IN_OUT = MOTION_EASE_IN_OUT; exports.MOTION_EASE_OUT = MOTION_EASE_OUT; exports.MOTION_EDIT_OPS = MOTION_EDIT_OPS; exports.MOTION_ENTER_STYLES = MOTION_ENTER_STYLES; exports.MOTION_EXIT_STYLES = MOTION_EXIT_STYLES; exports.MOTION_IRIS_SHAPES = MOTION_IRIS_SHAPES; exports.MOTION_ISSUE_CODES = MOTION_ISSUE_CODES; exports.MOTION_MIN_CHANGE_MS = MOTION_MIN_CHANGE_MS; exports.MOTION_REPEAT_MODES = MOTION_REPEAT_MODES; exports.MOTION_SPEED_RANGE = MOTION_SPEED_RANGE; exports.MOTION_SPLIT_ORIENTATIONS = MOTION_SPLIT_ORIENTATIONS; exports.MOTION_TEXT_STAGGER = MOTION_TEXT_STAGGER; exports.MOTION_TEXT_UNITS = MOTION_TEXT_UNITS; exports.MOTION_TRIGGERS = MOTION_TRIGGERS; exports.MotionSceneFormatError = MotionSceneFormatError; exports.activeSegment = activeSegment; exports.applyMotionControlValues = applyMotionControlValues; exports.applyMotionDrivers = applyMotionDrivers; exports.applyMotionEdits = applyMotionEdits; exports.checkMotionScene = checkMotionScene; exports.clipsShapeProblems = clipsShapeProblems; exports.commandShapeProblems = commandShapeProblems; exports.compileMotionScene = compileMotionScene; exports.createAnimationEditorToolProvider = createAnimationEditorToolProvider; exports.createMotionScene = createMotionScene; exports.defaultMotionCommand = defaultMotionCommand; exports.describeMotionElements = describeMotionElements; exports.describeMotionShots = describeMotionShots; exports.driversShapeProblems = driversShapeProblems; exports.duplicateMotionCommandEdit = duplicateMotionCommandEdit; exports.fitMotionRect = fitMotionRect; exports.fitMotionScene = fitMotionScene; exports.fitMotionSceneEdits = fitMotionSceneEdits; exports.flairAtLeast = flairAtLeast; exports.flairCurveFor = flairCurveFor; exports.flairEaseFor = flairEaseFor; exports.formatMotionDrivers = formatMotionDrivers; exports.formatMotionNarration = formatMotionNarration; exports.freshShotId = freshShotId; exports.fromFlairSvgMotion = fromFlairSvgMotion; exports.fromFlairVectorEffect = fromFlairVectorEffect; exports.fromPptxAnimation = fromPptxAnimation; exports.highlightMotionSvg = highlightMotionSvg; exports.indexMotionNodes = indexMotionNodes; exports.interpolateMotionValue = interpolateMotionValue; exports.isMotionCommand = isMotionCommand; exports.isMotionShot = isMotionShot; exports.matchMotionNodes = matchMotionNodes; exports.motionAddTrackKey = motionAddTrackKey; exports.motionBeatAt = motionBeatAt; exports.motionBeatTime = motionBeatTime; exports.motionBlurTimes = motionBlurTimes; exports.motionCascade = motionCascade; exports.motionClipAttrs = motionClipAttrs; exports.motionClipLayout = motionClipLayout; exports.motionCommandDuration = motionCommandDuration; exports.motionCommandFields = motionCommandFields; exports.motionCommandRepeat = motionCommandRepeat; exports.motionCommandRows = motionCommandRows; exports.motionCommandSlots = motionCommandSlots; exports.motionCommandSummary = motionCommandSummary; exports.motionContactSheetSvg = motionContactSheetSvg; exports.motionCueChoices = motionCueChoices; exports.motionCueFromKey = motionCueFromKey; exports.motionCueKey = motionCueKey; exports.motionCueTime = motionCueTime; exports.motionCycleDuration = motionCycleDuration; exports.motionDrivenNodes = motionDrivenNodes; exports.motionDriverSources = motionDriverSources; exports.motionEaseKey = motionEaseKey; exports.motionEasingCurve = motionEasingCurve; exports.motionEasingGuides = motionEasingGuides; exports.motionEasingPath = motionEasingPath; exports.motionFieldEdit = motionFieldEdit; exports.motionFieldLabel = motionFieldLabel; exports.motionFlairPrimitive = motionFlairPrimitive; exports.motionFollowRoute = motionFollowRoute; exports.motionFrameAt = motionFrameAt; exports.motionFrameToSvg = motionFrameToSvg; exports.motionGhosts = motionGhosts; exports.motionIssue = motionIssue; exports.motionIssueKey = motionIssueKey; exports.motionIssueLine = motionIssueLine; exports.motionMovingIds = motionMovingIds; exports.motionNodeAtElement = motionNodeAtElement; exports.motionNodeClips = motionNodeClips; exports.motionNodeOffset = motionNodeOffset; exports.motionPath = motionPath; exports.motionPathLength = motionPathLength; exports.motionPathsSvg = motionPathsSvg; exports.motionPropertyValue = motionPropertyValue; exports.motionRestValue = motionRestValue; exports.motionRevealClip = motionRevealClip; exports.motionRevealPadding = motionRevealPadding; exports.motionRulerTicks = motionRulerTicks; exports.motionSceneShapeProblems = motionSceneShapeProblems; exports.motionSceneToJson = motionSceneToJson; exports.motionShotAt = motionShotAt; exports.motionShotCueTime = motionShotCueTime; exports.motionShotTimeScale = motionShotTimeScale; exports.motionStageSvg = motionStageSvg; exports.motionTextLayout = motionTextLayout; exports.motionTextUnits = motionTextUnits; exports.motionTrackKey = motionTrackKey; exports.namedWithSuggestion = namedWithSuggestion; exports.parseMotionDrivers = parseMotionDrivers; exports.parseMotionFieldInput = parseMotionFieldInput; exports.parseMotionNarration = parseMotionNarration; exports.parseMotionScene = parseMotionScene; exports.resolveMotionCamera = resolveMotionCamera; exports.resolveMotionEditRefs = resolveMotionEditRefs; exports.segmentProgress = segmentProgress; exports.segmentValue = segmentValue; exports.shotShapeProblems = shotShapeProblems; exports.smoothMotionLegs = smoothMotionLegs; exports.smoothMotionTimes = smoothMotionTimes; exports.suggestName = suggestName; exports.toFlairEffectDocument = toFlairEffectDocument; exports.toFlairSvgMotion = toFlairSvgMotion; exports.toFlairVectorEffect = toFlairVectorEffect; exports.toLottie = toLottie; exports.trackValue = trackValue; exports.withMotionLayers = withMotionLayers; exports.withViewBox = withViewBox;
5108
+ exports.ANIMATION_EDITOR_AGENT_INSTRUCTIONS = ANIMATION_EDITOR_AGENT_INSTRUCTIONS; exports.AnimationEditorController = AnimationEditorController; exports.FLAIR_EASES = FLAIR_EASES; exports.FLAIR_EXPORT_VERSION = FLAIR_EXPORT_VERSION; exports.MOTION_ADDITIVE_PROPERTIES = MOTION_ADDITIVE_PROPERTIES; exports.MOTION_BLENDS = MOTION_BLENDS; exports.MOTION_CAMERA_MS = MOTION_CAMERA_MS; exports.MOTION_CASCADES = MOTION_CASCADES; exports.MOTION_CLIP_TARGET = MOTION_CLIP_TARGET; exports.MOTION_COMMAND_SCHEMA = MOTION_COMMAND_SCHEMA; exports.MOTION_COMMAND_TYPES = MOTION_COMMAND_TYPES; exports.MOTION_DEFAULT_DURATIONS = MOTION_DEFAULT_DURATIONS; exports.MOTION_DEFAULT_HOLD = MOTION_DEFAULT_HOLD; exports.MOTION_DIRECTIONS = MOTION_DIRECTIONS; exports.MOTION_DRAW_EFFECT_ID = MOTION_DRAW_EFFECT_ID; exports.MOTION_DRAW_MS_PER_UNIT = MOTION_DRAW_MS_PER_UNIT; exports.MOTION_DRAW_RANGE = MOTION_DRAW_RANGE; exports.MOTION_DRIVEN_PROPERTIES = MOTION_DRIVEN_PROPERTIES; exports.MOTION_EASE_CHOICES = MOTION_EASE_CHOICES; exports.MOTION_EASE_IN_OUT = MOTION_EASE_IN_OUT; exports.MOTION_EASE_OUT = MOTION_EASE_OUT; exports.MOTION_EDIT_OPS = MOTION_EDIT_OPS; exports.MOTION_ENTER_STYLES = MOTION_ENTER_STYLES; exports.MOTION_EXIT_STYLES = MOTION_EXIT_STYLES; exports.MOTION_IRIS_SHAPES = MOTION_IRIS_SHAPES; exports.MOTION_ISSUE_CODES = _chunkWAJQKWQUcjs.MOTION_ISSUE_CODES; exports.MOTION_MIN_CHANGE_MS = MOTION_MIN_CHANGE_MS; exports.MOTION_REPEAT_MODES = MOTION_REPEAT_MODES; exports.MOTION_SPEED_RANGE = MOTION_SPEED_RANGE; exports.MOTION_SPLIT_ORIENTATIONS = MOTION_SPLIT_ORIENTATIONS; exports.MOTION_TEXT_STAGGER = MOTION_TEXT_STAGGER; exports.MOTION_TEXT_UNITS = MOTION_TEXT_UNITS; exports.MOTION_TRIGGERS = MOTION_TRIGGERS; exports.MotionSceneFormatError = MotionSceneFormatError; exports.activeSegment = activeSegment; exports.applyMotionControlValues = applyMotionControlValues; exports.applyMotionDrivers = applyMotionDrivers; exports.applyMotionEdits = applyMotionEdits; exports.checkMotionScene = checkMotionScene; exports.clipsShapeProblems = clipsShapeProblems; exports.commandShapeProblems = commandShapeProblems; exports.compileMotionScene = compileMotionScene; exports.createAnimationEditorToolProvider = createAnimationEditorToolProvider; exports.createMotionScene = createMotionScene; exports.defaultMotionCommand = defaultMotionCommand; exports.describeMotionElements = describeMotionElements; exports.describeMotionShots = describeMotionShots; exports.driversShapeProblems = driversShapeProblems; exports.duplicateMotionCommandEdit = duplicateMotionCommandEdit; exports.fitMotionRect = fitMotionRect; exports.fitMotionScene = fitMotionScene; exports.fitMotionSceneEdits = fitMotionSceneEdits; exports.flairAtLeast = flairAtLeast; exports.flairCurveFor = flairCurveFor; exports.flairEaseFor = flairEaseFor; exports.formatMotionDrivers = formatMotionDrivers; exports.formatMotionNarration = formatMotionNarration; exports.freshShotId = freshShotId; exports.fromFlairSvgMotion = fromFlairSvgMotion; exports.fromFlairVectorEffect = fromFlairVectorEffect; exports.fromPptxAnimation = fromPptxAnimation; exports.highlightMotionSvg = highlightMotionSvg; exports.indexMotionNodes = indexMotionNodes; exports.interpolateMotionValue = interpolateMotionValue; exports.isMotionCommand = isMotionCommand; exports.isMotionShot = isMotionShot; exports.matchMotionNodes = matchMotionNodes; exports.motionAddTrackKey = motionAddTrackKey; exports.motionBeatAt = motionBeatAt; exports.motionBeatTime = motionBeatTime; exports.motionBlurTimes = motionBlurTimes; exports.motionCascade = motionCascade; exports.motionClipAttrs = motionClipAttrs; exports.motionClipLayout = motionClipLayout; exports.motionCommandDuration = motionCommandDuration; exports.motionCommandFields = motionCommandFields; exports.motionCommandRepeat = motionCommandRepeat; exports.motionCommandRows = motionCommandRows; exports.motionCommandSlots = motionCommandSlots; exports.motionCommandSummary = motionCommandSummary; exports.motionContactSheetSvg = motionContactSheetSvg; exports.motionCueChoices = motionCueChoices; exports.motionCueFromKey = motionCueFromKey; exports.motionCueKey = motionCueKey; exports.motionCueTime = motionCueTime; exports.motionCycleDuration = motionCycleDuration; exports.motionDrivenNodes = motionDrivenNodes; exports.motionDriverSources = motionDriverSources; exports.motionEaseKey = motionEaseKey; exports.motionEasingCurve = motionEasingCurve; exports.motionEasingGuides = motionEasingGuides; exports.motionEasingPath = motionEasingPath; exports.motionFieldEdit = motionFieldEdit; exports.motionFieldLabel = motionFieldLabel; exports.motionFlairPrimitive = motionFlairPrimitive; exports.motionFollowRoute = motionFollowRoute; exports.motionFrameAt = motionFrameAt; exports.motionFrameToSvg = motionFrameToSvg; exports.motionGhosts = motionGhosts; exports.motionIssue = _chunkWAJQKWQUcjs.motionIssue; exports.motionIssueKey = _chunkWAJQKWQUcjs.motionIssueKey; exports.motionIssueLine = _chunkWAJQKWQUcjs.motionIssueLine; exports.motionMovingIds = motionMovingIds; exports.motionNodeAtElement = motionNodeAtElement; exports.motionNodeClips = motionNodeClips; exports.motionNodeOffset = motionNodeOffset; exports.motionPath = motionPath; exports.motionPathLength = motionPathLength; exports.motionPathsSvg = motionPathsSvg; exports.motionPropertyValue = motionPropertyValue; exports.motionRestValue = motionRestValue; exports.motionRevealClip = motionRevealClip; exports.motionRevealPadding = motionRevealPadding; exports.motionRulerTicks = motionRulerTicks; exports.motionSceneShapeProblems = motionSceneShapeProblems; exports.motionSceneToJson = motionSceneToJson; exports.motionShotAt = motionShotAt; exports.motionShotCueTime = motionShotCueTime; exports.motionShotTimeScale = motionShotTimeScale; exports.motionStageSvg = motionStageSvg; exports.motionTextLayout = motionTextLayout; exports.motionTextUnits = motionTextUnits; exports.motionTrackKey = motionTrackKey; exports.namedWithSuggestion = _chunkWAJQKWQUcjs.namedWithSuggestion; exports.parseMotionDrivers = parseMotionDrivers; exports.parseMotionFieldInput = parseMotionFieldInput; exports.parseMotionNarration = parseMotionNarration; exports.parseMotionScene = parseMotionScene; exports.resolveMotionCamera = resolveMotionCamera; exports.resolveMotionEditRefs = resolveMotionEditRefs; exports.segmentProgress = segmentProgress; exports.segmentValue = segmentValue; exports.shotShapeProblems = shotShapeProblems; exports.smoothMotionLegs = smoothMotionLegs; exports.smoothMotionTimes = smoothMotionTimes; exports.suggestName = _chunkWAJQKWQUcjs.suggestName; exports.toFlairEffectDocument = toFlairEffectDocument; exports.toFlairSvgMotion = toFlairSvgMotion; exports.toFlairVectorEffect = toFlairVectorEffect; exports.toLottie = toLottie; exports.trackValue = trackValue; exports.withMotionLayers = withMotionLayers; exports.withViewBox = withViewBox;
5179
5109
  //# sourceMappingURL=index.cjs.map