screenci 0.0.75 → 0.0.78

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 (226) hide show
  1. package/dist/cli.d.ts +62 -1
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +699 -229
  4. package/dist/cli.js.map +1 -1
  5. package/dist/docs/manifest.d.ts +277 -91
  6. package/dist/docs/manifest.d.ts.map +1 -1
  7. package/dist/docs/manifest.js +101 -30
  8. package/dist/docs/manifest.js.map +1 -1
  9. package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts +2 -0
  10. package/dist/docs/video-sources/camera-and-zooming.screenci.d.ts.map +1 -0
  11. package/dist/docs/video-sources/camera-and-zooming.screenci.js +57 -0
  12. package/dist/docs/video-sources/camera-and-zooming.screenci.js.map +1 -0
  13. package/dist/docs/video-sources/installation.screenci.js +19 -10
  14. package/dist/docs/video-sources/installation.screenci.js.map +1 -1
  15. package/dist/docs/video-sources/landing.screenci.js +6 -8
  16. package/dist/docs/video-sources/landing.screenci.js.map +1 -1
  17. package/dist/docs/video-sources/languages.screenci.d.ts +2 -0
  18. package/dist/docs/video-sources/languages.screenci.d.ts.map +1 -0
  19. package/dist/docs/video-sources/languages.screenci.js +68 -0
  20. package/dist/docs/video-sources/languages.screenci.js.map +1 -0
  21. package/dist/docs/video-sources/locator-highlight-animated.screenci.js +4 -5
  22. package/dist/docs/video-sources/locator-highlight-animated.screenci.js.map +1 -1
  23. package/dist/docs/video-sources/locator-highlight-still.screenci.js +3 -4
  24. package/dist/docs/video-sources/locator-highlight-still.screenci.js.map +1 -1
  25. package/dist/docs/video-sources/narration.screenci.d.ts +2 -0
  26. package/dist/docs/video-sources/narration.screenci.d.ts.map +1 -0
  27. package/dist/docs/video-sources/narration.screenci.js +71 -0
  28. package/dist/docs/video-sources/narration.screenci.js.map +1 -0
  29. package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts +2 -0
  30. package/dist/docs/video-sources/public-urls-and-embeds.screenci.d.ts.map +1 -0
  31. package/dist/docs/video-sources/public-urls-and-embeds.screenci.js +60 -0
  32. package/dist/docs/video-sources/public-urls-and-embeds.screenci.js.map +1 -0
  33. package/dist/docs/video-sources/speaking-style.screenci.d.ts +2 -0
  34. package/dist/docs/video-sources/speaking-style.screenci.d.ts.map +1 -0
  35. package/dist/docs/video-sources/speaking-style.screenci.js +76 -0
  36. package/dist/docs/video-sources/speaking-style.screenci.js.map +1 -0
  37. package/dist/docs/video-sources/studio.screenci.js +8 -10
  38. package/dist/docs/video-sources/studio.screenci.js.map +1 -1
  39. package/dist/docs/video-sources/vertical-video.screenci.d.ts +2 -0
  40. package/dist/docs/video-sources/vertical-video.screenci.d.ts.map +1 -0
  41. package/dist/docs/video-sources/vertical-video.screenci.js +58 -0
  42. package/dist/docs/video-sources/vertical-video.screenci.js.map +1 -0
  43. package/dist/docs/videos.d.ts +20 -0
  44. package/dist/docs/videos.d.ts.map +1 -1
  45. package/dist/docs/videos.js +25 -0
  46. package/dist/docs/videos.js.map +1 -1
  47. package/dist/e2e/instrument.e2e.js +60 -1
  48. package/dist/e2e/instrument.e2e.js.map +1 -1
  49. package/dist/e2e/redact.e2e.d.ts +2 -0
  50. package/dist/e2e/redact.e2e.d.ts.map +1 -0
  51. package/dist/e2e/redact.e2e.js +161 -0
  52. package/dist/e2e/redact.e2e.js.map +1 -0
  53. package/dist/index.d.ts +12 -6
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +8 -2
  56. package/dist/index.js.map +1 -1
  57. package/dist/src/asset.d.ts +174 -14
  58. package/dist/src/asset.d.ts.map +1 -1
  59. package/dist/src/asset.js +320 -39
  60. package/dist/src/asset.js.map +1 -1
  61. package/dist/src/assetHash.d.ts +27 -0
  62. package/dist/src/assetHash.d.ts.map +1 -0
  63. package/dist/src/assetHash.js +0 -0
  64. package/dist/src/assetHash.js.map +1 -0
  65. package/dist/src/audio.d.ts +20 -1
  66. package/dist/src/audio.d.ts.map +1 -1
  67. package/dist/src/audio.js +126 -24
  68. package/dist/src/audio.js.map +1 -1
  69. package/dist/src/autoZoom.d.ts.map +1 -1
  70. package/dist/src/autoZoom.js +3 -1
  71. package/dist/src/autoZoom.js.map +1 -1
  72. package/dist/src/browserLaunchOptions.d.ts +24 -2
  73. package/dist/src/browserLaunchOptions.d.ts.map +1 -1
  74. package/dist/src/browserLaunchOptions.js +57 -3
  75. package/dist/src/browserLaunchOptions.js.map +1 -1
  76. package/dist/src/builder.d.ts +229 -136
  77. package/dist/src/builder.d.ts.map +1 -1
  78. package/dist/src/builder.js +264 -77
  79. package/dist/src/builder.js.map +1 -1
  80. package/dist/src/callerFile.d.ts +12 -0
  81. package/dist/src/callerFile.d.ts.map +1 -0
  82. package/dist/src/callerFile.js +46 -0
  83. package/dist/src/callerFile.js.map +1 -0
  84. package/dist/src/changeFocus.d.ts.map +1 -1
  85. package/dist/src/changeFocus.js +109 -36
  86. package/dist/src/changeFocus.js.map +1 -1
  87. package/dist/src/config.d.ts.map +1 -1
  88. package/dist/src/config.js +15 -0
  89. package/dist/src/config.js.map +1 -1
  90. package/dist/src/cue.d.ts +29 -17
  91. package/dist/src/cue.d.ts.map +1 -1
  92. package/dist/src/cue.js +138 -61
  93. package/dist/src/cue.js.map +1 -1
  94. package/dist/src/declare.d.ts +63 -0
  95. package/dist/src/declare.d.ts.map +1 -0
  96. package/dist/src/declare.js +111 -0
  97. package/dist/src/declare.js.map +1 -0
  98. package/dist/src/defaults.d.ts +23 -0
  99. package/dist/src/defaults.d.ts.map +1 -1
  100. package/dist/src/defaults.js +27 -3
  101. package/dist/src/defaults.js.map +1 -1
  102. package/dist/src/events.d.ts +339 -25
  103. package/dist/src/events.d.ts.map +1 -1
  104. package/dist/src/events.js +250 -26
  105. package/dist/src/events.js.map +1 -1
  106. package/dist/src/htmlRasterizer.d.ts +10 -0
  107. package/dist/src/htmlRasterizer.d.ts.map +1 -1
  108. package/dist/src/htmlRasterizer.js +12 -2
  109. package/dist/src/htmlRasterizer.js.map +1 -1
  110. package/dist/src/init.d.ts +2 -0
  111. package/dist/src/init.d.ts.map +1 -1
  112. package/dist/src/init.js +81 -33
  113. package/dist/src/init.js.map +1 -1
  114. package/dist/src/instrument.d.ts.map +1 -1
  115. package/dist/src/instrument.js +164 -8
  116. package/dist/src/instrument.js.map +1 -1
  117. package/dist/src/locales.d.ts.map +1 -1
  118. package/dist/src/locales.js +1 -0
  119. package/dist/src/locales.js.map +1 -1
  120. package/dist/src/localize.d.ts +26 -17
  121. package/dist/src/localize.d.ts.map +1 -1
  122. package/dist/src/localize.js +19 -11
  123. package/dist/src/localize.js.map +1 -1
  124. package/dist/src/localizeRuntime.d.ts +29 -33
  125. package/dist/src/localizeRuntime.d.ts.map +1 -1
  126. package/dist/src/localizeRuntime.js +74 -49
  127. package/dist/src/localizeRuntime.js.map +1 -1
  128. package/dist/src/logger.d.ts +5 -0
  129. package/dist/src/logger.d.ts.map +1 -1
  130. package/dist/src/logger.js +7 -0
  131. package/dist/src/logger.js.map +1 -1
  132. package/dist/src/manualZoom.d.ts.map +1 -1
  133. package/dist/src/manualZoom.js +8 -5
  134. package/dist/src/manualZoom.js.map +1 -1
  135. package/dist/src/narrationVisibility.d.ts +19 -0
  136. package/dist/src/narrationVisibility.d.ts.map +1 -0
  137. package/dist/src/narrationVisibility.js +26 -0
  138. package/dist/src/narrationVisibility.js.map +1 -0
  139. package/dist/src/openBrowser.d.ts +34 -0
  140. package/dist/src/openBrowser.d.ts.map +1 -0
  141. package/dist/src/openBrowser.js +62 -0
  142. package/dist/src/openBrowser.js.map +1 -0
  143. package/dist/src/recordingData.d.ts +27 -0
  144. package/dist/src/recordingData.d.ts.map +1 -1
  145. package/dist/src/recordingSize.d.ts +32 -0
  146. package/dist/src/recordingSize.d.ts.map +1 -0
  147. package/dist/src/recordingSize.js +54 -0
  148. package/dist/src/recordingSize.js.map +1 -0
  149. package/dist/src/redact.d.ts +68 -0
  150. package/dist/src/redact.d.ts.map +1 -0
  151. package/dist/src/redact.js +138 -0
  152. package/dist/src/redact.js.map +1 -0
  153. package/dist/src/redactController.d.ts +61 -0
  154. package/dist/src/redactController.d.ts.map +1 -0
  155. package/dist/src/redactController.js +232 -0
  156. package/dist/src/redactController.js.map +1 -0
  157. package/dist/src/runtimeContext.d.ts +32 -0
  158. package/dist/src/runtimeContext.d.ts.map +1 -1
  159. package/dist/src/runtimeContext.js +21 -0
  160. package/dist/src/runtimeContext.js.map +1 -1
  161. package/dist/src/runtimeMode.d.ts +15 -7
  162. package/dist/src/runtimeMode.d.ts.map +1 -1
  163. package/dist/src/runtimeMode.js +17 -6
  164. package/dist/src/runtimeMode.js.map +1 -1
  165. package/dist/src/screenAudio.d.ts +88 -0
  166. package/dist/src/screenAudio.d.ts.map +1 -0
  167. package/dist/src/screenAudio.js +0 -0
  168. package/dist/src/screenAudio.js.map +1 -0
  169. package/dist/src/screenAudioSink.d.ts +46 -0
  170. package/dist/src/screenAudioSink.d.ts.map +1 -0
  171. package/dist/src/screenAudioSink.js +77 -0
  172. package/dist/src/screenAudioSink.js.map +1 -0
  173. package/dist/src/screenshot.d.ts +27 -29
  174. package/dist/src/screenshot.d.ts.map +1 -1
  175. package/dist/src/screenshot.js +39 -24
  176. package/dist/src/screenshot.js.map +1 -1
  177. package/dist/src/sourceTrim.d.ts +29 -0
  178. package/dist/src/sourceTrim.d.ts.map +1 -0
  179. package/dist/src/sourceTrim.js +76 -0
  180. package/dist/src/sourceTrim.js.map +1 -0
  181. package/dist/src/stillCapture.d.ts +5 -0
  182. package/dist/src/stillCapture.d.ts.map +1 -1
  183. package/dist/src/stillCapture.js +11 -1
  184. package/dist/src/stillCapture.js.map +1 -1
  185. package/dist/src/studio.d.ts +69 -57
  186. package/dist/src/studio.d.ts.map +1 -1
  187. package/dist/src/studio.js +16 -38
  188. package/dist/src/studio.js.map +1 -1
  189. package/dist/src/timelineOffset.d.ts +46 -0
  190. package/dist/src/timelineOffset.d.ts.map +1 -0
  191. package/dist/src/timelineOffset.js +66 -0
  192. package/dist/src/timelineOffset.js.map +1 -0
  193. package/dist/src/titleValidation.d.ts +38 -0
  194. package/dist/src/titleValidation.d.ts.map +1 -1
  195. package/dist/src/titleValidation.js +42 -0
  196. package/dist/src/titleValidation.js.map +1 -1
  197. package/dist/src/types.d.ts +218 -2
  198. package/dist/src/types.d.ts.map +1 -1
  199. package/dist/src/types.js +1 -1
  200. package/dist/src/types.js.map +1 -1
  201. package/dist/src/video.d.ts +74 -60
  202. package/dist/src/video.d.ts.map +1 -1
  203. package/dist/src/video.js +201 -39
  204. package/dist/src/video.js.map +1 -1
  205. package/dist/src/voiceSampleAudio.d.ts +34 -0
  206. package/dist/src/voiceSampleAudio.d.ts.map +1 -0
  207. package/dist/src/voiceSampleAudio.js +105 -0
  208. package/dist/src/voiceSampleAudio.js.map +1 -0
  209. package/dist/src/voices.d.ts +2 -2
  210. package/dist/src/voices.d.ts.map +1 -1
  211. package/dist/src/voices.js +8 -3
  212. package/dist/src/voices.js.map +1 -1
  213. package/dist/src/zoom.d.ts +1 -0
  214. package/dist/src/zoom.d.ts.map +1 -1
  215. package/dist/src/zoom.js +3 -0
  216. package/dist/src/zoom.js.map +1 -1
  217. package/dist/tsconfig.tsbuildinfo +1 -1
  218. package/package.json +3 -2
  219. package/skills/screenci/SKILL.md +2 -2
  220. package/skills/screenci/references/init.md +4 -3
  221. package/skills/screenci/references/record.md +1 -1
  222. package/templates/recordings/assets/logo.png +0 -0
  223. package/dist/docs/video-sources/public-urls.screenci.d.ts +0 -2
  224. package/dist/docs/video-sources/public-urls.screenci.d.ts.map +0 -1
  225. package/dist/docs/video-sources/public-urls.screenci.js +0 -41
  226. package/dist/docs/video-sources/public-urls.screenci.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"stillCapture.js","sourceRoot":"","sources":["../../src/stillCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,aAAa,CA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AE,IAAI,EAAE,CAAC;YACnC,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI;gBACjC,aAAa,EAAE,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE;aAC1D,CAAC;YACF,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,SAAS;YACT,aAAa;YACb,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,IAAI,EAAE;gBACJ,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;aACxE;SACF,CAAC,CAAA;IACJ,CAAC,CAEA;IAAC,IAAkD,CAAC,UAAU,GAAG,OAAO,CAAA;IAEzE,OAAO,GAAG,EAAE;QACV,CAAC;QAAC,IAAmD,CAAC,UAAU,GAAG,QAAQ,CAAA;IAC7E,CAAC,CAAA;AACH,CAAC"}
@@ -1,66 +1,78 @@
1
+ import type { ContentMajor, LanguageMajor } from './declare.js';
1
2
  /**
2
- * Studio mode configure render/record options, narration, on-screen text,
3
- * overlays, and background audio from the ScreenCI web app instead of code.
4
- * Business tier only.
5
- *
6
- * Opt in with a single `video.studio({...})` (or `screenshot.studio({...})`)
7
- * declaration, chainable with `.localize()` / `.each()`:
8
- *
9
- * - `renderOptions: true` / `recordOptions: true` defer those option groups to
10
- * Studio. `recordOptions` (aspect ratio, quality, fps) changes the capture, so
11
- * it is fetched before recording; `renderOptions` is applied at render.
12
- * - `narration`, `text`, `overlays`, `audio` are name lists declaring the cues /
13
- * fields / overlays / tracks whose content is owned by Studio. The matching
14
- * `narration` / `text` / `overlays` / `audio` fixtures expose typed
15
- * controllers/values for them.
16
- *
17
- * On the first upload of a studio-mode video, rendering is held until the video
18
- * is configured in Studio (the CLI prints a direct link); later uploads reuse
19
- * the saved configuration automatically.
20
- *
21
- * @example
22
- * ```ts
23
- * import { video } from 'screenci'
24
- *
25
- * video
26
- * .studio({ renderOptions: true, narration: ['intro'], overlays: ['logo'] })
27
- * .localize({ languages: ['en', 'fi'] })(
28
- * 'Product demo',
29
- * async ({ page, narration, overlays }) => {
30
- * await overlays.logo()
31
- * await narration.intro()
32
- * }
33
- * )
34
- * ```
3
+ * The studio axes deferred to the ScreenCI web app, read by the recorder to
4
+ * stamp `metadata.studio`. `renderOptions`/`recordOptions` come from the
5
+ * matching `'studio'` sentinel; `languages` is set when the recording's
6
+ * language set is web-owned (`video.languages(studio())`).
35
7
  */
36
- export type StudioDeclaration = {
37
- /** Defer render options to Studio. Applied at render time. */
38
- renderOptions?: boolean;
39
- /**
40
- * Defer record options (aspect ratio, quality, fps) to Studio. Fetched before
41
- * recording, since they change the captured viewport/encode.
42
- */
43
- recordOptions?: boolean;
44
- /** Studio-managed narration cue names (text and voice configured in Studio). */
45
- narration?: readonly string[];
46
- /** Studio-managed on-screen text field names (values configured in Studio). */
47
- text?: readonly string[];
48
- /** Studio-managed overlay names (file and placement configured in Studio). */
49
- overlays?: readonly string[];
50
- /** Studio-managed background-audio track names (file/volume configured in Studio). */
51
- audio?: readonly string[];
52
- };
53
- /** The studio option groups deferred to render/record. */
54
8
  export type StudioOptionFlags = {
55
9
  renderOptions: boolean;
56
10
  recordOptions: boolean;
11
+ /** Whether the language set is owned by the web app (`video.languages(studio())`). */
12
+ languages?: boolean;
57
13
  };
58
- /** Returns the render/record deferral flags for a (possibly absent) declaration. */
59
- export declare function studioOptionFlags(declaration: StudioDeclaration | undefined): StudioOptionFlags;
14
+ /** Brand marking a value produced by {@link studio}. */
15
+ export declare const STUDIO: unique symbol;
60
16
  /**
61
- * Validates a studio declaration against the seeded localize names: each name
62
- * list is unique and non-empty, and Studio-managed narration/text names are
63
- * disjoint from the names seeded in `localize()`. Pure; throws on violation.
17
+ * A Studio-owned declaration produced by {@link studio}: the content (or, for
18
+ * `languages`, the set) is owned by the ScreenCI web app. `names` lists the
19
+ * declared keys (cue / overlay / audio names, or language codes); `seed`, when
20
+ * present, supplies initial values the web app starts from but may override.
21
+ *
22
+ * `S` carries the seed shape so the consuming feature method validates seed
23
+ * values against its own value type (e.g. narration seeds are checked as
24
+ * narration cues). A blank declaration (`studio([...])`) has `seed` undefined.
64
25
  */
65
- export declare function validateStudioDeclaration(declaration: StudioDeclaration | null, seededNarrationNames: readonly string[], seededTextNames: readonly string[]): void;
26
+ export type StudioMarker<S = unknown> = {
27
+ readonly [STUDIO]: true;
28
+ readonly names: readonly string[];
29
+ readonly seed?: S;
30
+ };
31
+ /** A blank Studio declaration: names only, no seed. */
32
+ export type StudioNames = StudioMarker<undefined> & {
33
+ readonly seed?: undefined;
34
+ /** Phantom guard: keeps the keyless form ({@link StudioPending}) out of feature args. */
35
+ readonly languagesOnly?: never;
36
+ };
37
+ /** A seeded Studio declaration: the web app starts from `seed` but may override it. */
38
+ export type StudioSeeded<S> = StudioMarker<S> & {
39
+ readonly seed: S;
40
+ readonly languagesOnly?: never;
41
+ };
42
+ /**
43
+ * The keyless form, `studio()`: the web app owns the entire set. Only
44
+ * `video.languages(studio())` accepts it (a content feature has no keys to
45
+ * defer, so its keyless form is rejected by {@link FeatureArg}). The
46
+ * `languagesOnly` brand is what makes it unassignable to {@link StudioNames}.
47
+ */
48
+ export type StudioPending = StudioMarker<undefined> & {
49
+ readonly names: readonly [];
50
+ readonly seed?: undefined;
51
+ readonly languagesOnly: true;
52
+ };
53
+ /** Whether a value was produced by {@link studio}. */
54
+ export declare function isStudioMarker(value: unknown): value is StudioMarker;
55
+ /**
56
+ * Declare something Studio-owned: its content is configured in the ScreenCI web
57
+ * app, and code only declares that it exists. Three forms:
58
+ *
59
+ * - `studio(['intro', 'cta'])`: blank names. The keys exist in code (so the test
60
+ * body can reference `narration.intro`), but the web app owns their content.
61
+ * - `studio({ intro: 'Welcome' })`: seeded. The web app starts from these values
62
+ * but owns them: once edited in Studio, the Studio value wins (a seed never
63
+ * clobbers an existing Studio edit).
64
+ * - `studio()`: keyless. Only `video.languages(studio())` accepts it: the web app
65
+ * owns the entire language set. Content features have keys to declare, so their
66
+ * keyless form does not type-check.
67
+ *
68
+ * For `video.languages`, the names are language codes: `studio(['en', 'fi'])`
69
+ * seeds the initial set (web-owned, but starts with those languages).
70
+ */
71
+ export declare function studio(): StudioPending;
72
+ export declare function studio<const N extends readonly string[]>(names: N): StudioNames & {
73
+ readonly names: N;
74
+ };
75
+ export declare function studio<const S extends ContentMajor<unknown> | LanguageMajor<unknown>>(seed: S): StudioSeeded<S> & {
76
+ readonly names: readonly (keyof S & string)[];
77
+ };
66
78
  //# sourceMappingURL=studio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/studio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8DAA8D;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gFAAgF;IAChF,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5B,sFAAsF;IACtF,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED,0DAA0D;AAC1D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,OAAO,CAAA;IACtB,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,iBAAiB,GAAG,SAAS,GACzC,iBAAiB,CAKnB;AAmCD;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,iBAAiB,GAAG,IAAI,EACrC,oBAAoB,EAAE,SAAS,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,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAA;CAC7B,CAAA;AAED,sDAAsD;AACtD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAMpE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,IAAI,aAAa,CAAA;AACvC,wBAAgB,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,EACtD,KAAK,EAAE,CAAC,GACP,WAAW,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAA;AACtC,wBAAgB,MAAM,CACpB,KAAK,CAAC,CAAC,SAAS,YAAY,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,EAC9D,IAAI,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAA;CAAE,CAAA"}
@@ -1,42 +1,20 @@
1
- /** Returns the render/record deferral flags for a (possibly absent) declaration. */
2
- export function studioOptionFlags(declaration) {
1
+ /** Brand marking a value produced by {@link studio}. */
2
+ export const STUDIO = Symbol.for('screenci.studio');
3
+ /** Whether a value was produced by {@link studio}. */
4
+ export function isStudioMarker(value) {
5
+ return (typeof value === 'object' &&
6
+ value !== null &&
7
+ value[STUDIO] === true);
8
+ }
9
+ export function studio(arg) {
10
+ if (arg === undefined)
11
+ return { [STUDIO]: true, names: [] };
12
+ if (Array.isArray(arg))
13
+ return { [STUDIO]: true, names: [...arg] };
3
14
  return {
4
- renderOptions: declaration?.renderOptions === true,
5
- recordOptions: declaration?.recordOptions === true,
15
+ [STUDIO]: true,
16
+ names: Object.keys(arg),
17
+ seed: arg,
6
18
  };
7
19
  }
8
- function assertUniqueStudioNames(label, names) {
9
- const seen = new Set();
10
- for (const name of names) {
11
- if (typeof name !== 'string' || name.length === 0) {
12
- throw new Error(`video.studio(): ${label} names must be non-empty strings.`);
13
- }
14
- if (seen.has(name)) {
15
- throw new Error(`video.studio(): duplicate ${label} name "${name}".`);
16
- }
17
- seen.add(name);
18
- }
19
- }
20
- function assertDisjointFromSeeded(label, studioNames, seededNames) {
21
- const seeded = new Set(seededNames);
22
- const overlap = studioNames.filter((name) => seeded.has(name));
23
- if (overlap.length === 0)
24
- return;
25
- throw new Error(`video.studio(): ${label} name(s) ${overlap.join(', ')} are both seeded in localize() and declared as Studio-managed. A name must be one or the other.`);
26
- }
27
- /**
28
- * Validates a studio declaration against the seeded localize names: each name
29
- * list is unique and non-empty, and Studio-managed narration/text names are
30
- * disjoint from the names seeded in `localize()`. Pure; throws on violation.
31
- */
32
- export function validateStudioDeclaration(declaration, seededNarrationNames, seededTextNames) {
33
- if (declaration === null)
34
- return;
35
- assertUniqueStudioNames('narration', declaration.narration ?? []);
36
- assertUniqueStudioNames('text', declaration.text ?? []);
37
- assertUniqueStudioNames('overlays', declaration.overlays ?? []);
38
- assertUniqueStudioNames('audio', declaration.audio ?? []);
39
- assertDisjointFromSeeded('narration', declaration.narration ?? [], seededNarrationNames);
40
- assertDisjointFromSeeded('text', declaration.text ?? [], seededTextNames);
41
- }
42
20
  //# sourceMappingURL=studio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/studio.ts"],"names":[],"mappings":"AA2DA,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAC/B,WAA0C;IAE1C,OAAO;QACL,aAAa,EAAE,WAAW,EAAE,aAAa,KAAK,IAAI;QAClD,aAAa,EAAE,WAAW,EAAE,aAAa,KAAK,IAAI;KACnD,CAAA;AACH,CAAC;AAED,SAAS,uBAAuB,CAC9B,KAAa,EACb,KAAwB;IAExB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAA;IAC9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,OAAO,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X,WAAW,CAAC,SAAS,IAAI,EAAE,EAC3B,oBAAoB,CACrB,CAAA;IACD,wBAAwB,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,IAAI,EAAE,EAAE,eAAe,CAAC,CAAA;AAC3E,CAAC"}
1
+ {"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/studio.ts"],"names":[],"mappings":"AAeA,wDAAwD;AACxD,MAAM,CAAC,MAAM,MAAM,GAAkB,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;AA2ClE,sDAAsD;AACtD,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACb,KAAsC,CAAC,MAAM,CAAC,KAAK,IAAI,CACzD,CAAA;AACH,CAAC;AAyBD,MAAM,UAAU,MAAM,CACpB,GAAiD;IAEjD,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IAC3D,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAA;IAClE,OAAO;QACL,CAAC,MAAM,CAAC,EAAE,IAAI;QACd,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QACvB,IAAI,EAAE,GAA4B;KACnC,CAAA;AACH,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Parsing for the string position arguments accepted by the narration and
3
+ * overlay controllers, e.g. `narration.intro('0:02')` or `overlays.tip('56%')`.
4
+ *
5
+ * A controller called with a NUMBER keeps its existing meaning (a relative
6
+ * duration in milliseconds). A controller called with a STRING means an absolute
7
+ * position in the final video: "this cue/overlay window should reach this point."
8
+ * Only strings flow through this module; numbers never do.
9
+ *
10
+ * Absolute positions are resolved against the finished render, so a percentage
11
+ * cannot be turned into milliseconds here (the total length is not known until
12
+ * render time). The parser therefore returns a discriminated union: concrete
13
+ * `'<n>s'`/timecode forms resolve to milliseconds, while `'<n>%'` surfaces a
14
+ * fraction the renderer multiplies by the final total.
15
+ */
16
+ /**
17
+ * A position within the final video. Strings only (numbers are the existing
18
+ * duration path on each controller). Accepts:
19
+ * - `'<n>s'` seconds, e.g. `'2s'` or `'5.51s'`
20
+ * - `'m:ss(.f)'` timecode minutes:seconds, e.g. `'0:05.51'` (= 5.51s)
21
+ * - `'h:mm:ss(.f)'` timecode hours:minutes:seconds, e.g. `'1:02:03.5'`
22
+ * - `'<n>%'` percentage of the total video, e.g. `'56.1%'`
23
+ *
24
+ * The template-literal members give editor hints for the common forms; the
25
+ * trailing `string` keeps timecodes (which the type system cannot express)
26
+ * assignable. Validation happens at runtime in {@link parseTimelineOffset}.
27
+ */
28
+ export type TimelineOffset = `${number}s` | `${number}%` | string;
29
+ /** Result of parsing a {@link TimelineOffset} string. */
30
+ export type ParsedTimelineOffset =
31
+ /** From `'<n>s'` or a timecode: a concrete absolute position in milliseconds. */
32
+ {
33
+ kind: 'absolute';
34
+ ms: number;
35
+ }
36
+ /** From `'<n>%'`: a fraction (0.561 for `'56.1%'`), resolved against the total at render. */
37
+ | {
38
+ kind: 'percent';
39
+ fraction: number;
40
+ };
41
+ /**
42
+ * Parses a string position into a {@link ParsedTimelineOffset}. Throws on any
43
+ * unrecognized or malformed input. Pure: no I/O, no globals.
44
+ */
45
+ export declare function parseTimelineOffset(value: string): ParsedTimelineOffset;
46
+ //# sourceMappingURL=timelineOffset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineOffset.d.ts","sourceRoot":"","sources":["../../src/timelineOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,GAAG,MAAM,CAAA;AAEjE,yDAAyD;AACzD,MAAM,MAAM,oBAAoB;AAC9B,iFAAiF;AAC/E;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE;AAClC,6FAA6F;GAC3F;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAmBzC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAqCvE"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Parsing for the string position arguments accepted by the narration and
3
+ * overlay controllers, e.g. `narration.intro('0:02')` or `overlays.tip('56%')`.
4
+ *
5
+ * A controller called with a NUMBER keeps its existing meaning (a relative
6
+ * duration in milliseconds). A controller called with a STRING means an absolute
7
+ * position in the final video: "this cue/overlay window should reach this point."
8
+ * Only strings flow through this module; numbers never do.
9
+ *
10
+ * Absolute positions are resolved against the finished render, so a percentage
11
+ * cannot be turned into milliseconds here (the total length is not known until
12
+ * render time). The parser therefore returns a discriminated union: concrete
13
+ * `'<n>s'`/timecode forms resolve to milliseconds, while `'<n>%'` surfaces a
14
+ * fraction the renderer multiplies by the final total.
15
+ */
16
+ const SECONDS_RE = /^(\d+(?:\.\d+)?)s$/;
17
+ const PERCENT_RE = /^(\d+(?:\.\d+)?)%$/;
18
+ const TIMECODE_MIN_RE = /^(\d+):(\d{2}(?:\.\d+)?)$/;
19
+ const TIMECODE_HOUR_RE = /^(\d+):(\d{2}):(\d{2}(?:\.\d+)?)$/;
20
+ function invalidTimecode(value) {
21
+ throw new Error(`invalid timecode '${value}'; expected m:ss(.f) or h:mm:ss(.f) with mm/ss < 60`);
22
+ }
23
+ function invalidPosition(value) {
24
+ throw new Error(`invalid position '${value}'; expected '<n>s', a timecode 'm:ss(.f)'/'h:mm:ss(.f)', or '<n>%'`);
25
+ }
26
+ /**
27
+ * Parses a string position into a {@link ParsedTimelineOffset}. Throws on any
28
+ * unrecognized or malformed input. Pure: no I/O, no globals.
29
+ */
30
+ export function parseTimelineOffset(value) {
31
+ const trimmed = value.trim();
32
+ if (trimmed.length === 0)
33
+ invalidPosition(value);
34
+ const percent = PERCENT_RE.exec(trimmed);
35
+ if (percent !== null) {
36
+ return { kind: 'percent', fraction: Number(percent[1]) / 100 };
37
+ }
38
+ const seconds = SECONDS_RE.exec(trimmed);
39
+ if (seconds !== null) {
40
+ return { kind: 'absolute', ms: Number(seconds[1]) * 1000 };
41
+ }
42
+ const hour = TIMECODE_HOUR_RE.exec(trimmed);
43
+ if (hour !== null) {
44
+ const hours = Number(hour[1]);
45
+ const minutes = Number(hour[2]);
46
+ const secs = Number(hour[3]);
47
+ if (minutes >= 60 || secs >= 60)
48
+ invalidTimecode(value);
49
+ return { kind: 'absolute', ms: (hours * 3600 + minutes * 60 + secs) * 1000 };
50
+ }
51
+ const min = TIMECODE_MIN_RE.exec(trimmed);
52
+ if (min !== null) {
53
+ const minutes = Number(min[1]);
54
+ const secs = Number(min[2]);
55
+ if (secs >= 60)
56
+ invalidTimecode(value);
57
+ return { kind: 'absolute', ms: (minutes * 60 + secs) * 1000 };
58
+ }
59
+ // A bare `h:mm:ss`-shaped string that failed the strict patterns above (for
60
+ // example two-digit seconds were not supplied) is reported as a timecode error
61
+ // so the message points at the right fix.
62
+ if (/^\d+:\d/.test(trimmed))
63
+ invalidTimecode(value);
64
+ invalidPosition(value);
65
+ }
66
+ //# sourceMappingURL=timelineOffset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineOffset.js","sourceRoot":"","sources":["../../src/timelineOffset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuBH,MAAM,UAAU,GAAG,oBAAoB,CAAA;AACvC,MAAM,UAAU,GAAG,oBAAoB,CAAA;AACvC,MAAM,eAAe,GAAG,2BAA2B,CAAA;AACnD,MAAM,gBAAgB,GAAG,mCAAmC,CAAA;AAE5D,SAAS,eAAe,CAAC,K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EAAE;YAAE,eAAe,CAAC,KAAK,CAAC,CAAA;QACvD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAA;IAC9E,CAAC;IAED,MAAM,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAC3B,IAAI,IAAI,IAAI,EAAE;YAAE,eAAe,CAAC,KAAK,CAAC,CAAA;QACtC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAA;IAC/D,CAAC;IAED,4EAA4E;IAC5E,+EAA+E;IAC/E,0CAA0C;IAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,eAAe,CAAC,KAAK,CAAC,CAAA;IAEnD,eAAe,CAAC,KAAK,CAAC,CAAA;AACxB,CAAC"}
@@ -1,3 +1,41 @@
1
+ /**
2
+ * A render dependency declared via `selected(name)`: the `from` render embeds the
3
+ * `to` render's output as an overlay. Used for best-effort registration-time
4
+ * warnings; the authoritative existence/one-level/medium checks run on the
5
+ * backend at upload (it sees every file and language).
6
+ */
7
+ export type DependencyReference = {
8
+ /** Name of the dependent video/screenshot (the one declaring `selected`). */
9
+ from: string;
10
+ /** Name referenced via `selected(name)` (the embedded target). */
11
+ to: string;
12
+ };
13
+ /**
14
+ * Videos and screenshots share a single name namespace within a run (both are
15
+ * rows in the same table, addressed by `selected(name)`). Titles must therefore
16
+ * be unique across BOTH mediums, not just within one. {@link findDuplicateTitles}
17
+ * already enforces this because every video and screenshot title is collected
18
+ * into the same list before checking, so a name reused across mediums surfaces as
19
+ * a duplicate.
20
+ */
1
21
  export declare function findDuplicateTitles(titles: readonly string[]): string[];
2
22
  export declare function formatDuplicateTitlesMessage(duplicates: readonly string[]): string;
23
+ /**
24
+ * Returns the dependency references that point at themselves (`from === to`). A
25
+ * render cannot embed its own output, so these are always a mistake.
26
+ */
27
+ export declare function findSelfReferences(references: readonly DependencyReference[]): DependencyReference[];
28
+ /**
29
+ * Returns the dependency references whose target (`to`) is not among the
30
+ * `knownTitles` discovered in the run. This is a best-effort warning: a target
31
+ * may legitimately live in another file not part of this discovery, so the
32
+ * authoritative existence check runs on the backend at upload.
33
+ */
34
+ export declare function findMissingReferences(references: readonly DependencyReference[], knownTitles: readonly string[]): DependencyReference[];
35
+ /**
36
+ * Formats best-effort registration-time warnings for self-references and
37
+ * obviously missing dependency targets. Returns an empty string when there is
38
+ * nothing to warn about, so callers can skip emitting anything.
39
+ */
40
+ export declare function formatDependencyWarnings(selfReferences: readonly DependencyReference[], missingReferences: readonly DependencyReference[]): string;
3
41
  //# sourceMappingURL=titleValidation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"titleValidation.d.ts","sourceRoot":"","sources":["../../src/titleValidation.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAUvE;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,CAUR"}
1
+ {"version":3,"file":"titleValidation.d.ts","sourceRoot":"","sources":["../../src/titleValidation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAA;IACZ,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAUvE;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,CAUR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,SAAS,mBAAmB,EAAE,GACzC,mBAAmB,EAAE,CAEvB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,SAAS,mBAAmB,EAAE,EAC1C,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,mBAAmB,EAAE,CAGvB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,SAAS,mBAAmB,EAAE,EAC9C,iBAAiB,EAAE,SAAS,mBAAmB,EAAE,GAChD,MAAM,CAcR"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Videos and screenshots share a single name namespace within a run (both are
3
+ * rows in the same table, addressed by `selected(name)`). Titles must therefore
4
+ * be unique across BOTH mediums, not just within one. {@link findDuplicateTitles}
5
+ * already enforces this because every video and screenshot title is collected
6
+ * into the same list before checking, so a name reused across mediums surfaces as
7
+ * a duplicate.
8
+ */
1
9
  export function findDuplicateTitles(titles) {
2
10
  const counts = new Map();
3
11
  for (const title of titles) {
@@ -16,4 +24,38 @@ export function formatDuplicateTitlesMessage(duplicates) {
16
24
  }
17
25
  return lines.join('\n');
18
26
  }
27
+ /**
28
+ * Returns the dependency references that point at themselves (`from === to`). A
29
+ * render cannot embed its own output, so these are always a mistake.
30
+ */
31
+ export function findSelfReferences(references) {
32
+ return references.filter((ref) => ref.from === ref.to);
33
+ }
34
+ /**
35
+ * Returns the dependency references whose target (`to`) is not among the
36
+ * `knownTitles` discovered in the run. This is a best-effort warning: a target
37
+ * may legitimately live in another file not part of this discovery, so the
38
+ * authoritative existence check runs on the backend at upload.
39
+ */
40
+ export function findMissingReferences(references, knownTitles) {
41
+ const known = new Set(knownTitles);
42
+ return references.filter((ref) => !known.has(ref.to));
43
+ }
44
+ /**
45
+ * Formats best-effort registration-time warnings for self-references and
46
+ * obviously missing dependency targets. Returns an empty string when there is
47
+ * nothing to warn about, so callers can skip emitting anything.
48
+ */
49
+ export function formatDependencyWarnings(selfReferences, missingReferences) {
50
+ const lines = [];
51
+ for (const ref of selfReferences) {
52
+ lines.push(` - "${ref.from}" uses selected("${ref.to}"), which references itself. A render cannot embed its own output.`);
53
+ }
54
+ for (const ref of missingReferences) {
55
+ lines.push(` - "${ref.from}" uses selected("${ref.to}"), but no video or screenshot named "${ref.to}" was found in this run.`);
56
+ }
57
+ if (lines.length === 0)
58
+ return '';
59
+ return ['Dependency warnings:', ...lines].join('\n');
60
+ }
19
61
  //# sourceMappingURL=titleValidation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"titleValidation.js","sourceRoot":"","sources":["../../src/titleValidation.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB,CAAC,MAAyB;IAC3D,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAA;IAExC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;SAChC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,UAA6B;IAE7B,MAAM,KAAK,GAAG;QACZ,gEAAgE;KACjE,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC/B,KAA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