@vocasync/astro 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +618 -80
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/components/AudioPlayer.astro +298 -1141
- package/dist/components/index.d.ts +10 -32
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/types.d.ts +117 -0
- package/dist/components/types.d.ts.map +1 -0
- package/dist/components/types.js +2 -0
- package/dist/components/types.js.map +1 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/config/schema.d.ts +124 -169
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +4 -4
- package/dist/config/schema.js.map +1 -1
- package/dist/core/content-loader.js +1 -1
- package/dist/core/content-loader.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/speech-builder.js.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/integration.d.ts +28 -2
- package/dist/integration.d.ts.map +1 -1
- package/dist/integration.js +40 -3
- package/dist/integration.js.map +1 -1
- package/dist/lib/latex-to-speech/index.d.ts.map +1 -1
- package/dist/lib/latex-to-speech/index.js.map +1 -1
- package/dist/player-core/boot.d.ts +9 -0
- package/dist/player-core/boot.d.ts.map +1 -0
- package/dist/player-core/boot.js +59 -0
- package/dist/player-core/boot.js.map +1 -0
- package/dist/player-core/highlighter.d.ts +31 -0
- package/dist/player-core/highlighter.d.ts.map +1 -0
- package/dist/player-core/highlighter.js +103 -0
- package/dist/player-core/highlighter.js.map +1 -0
- package/dist/player-core/index.d.ts +17 -0
- package/dist/player-core/index.d.ts.map +1 -0
- package/dist/player-core/index.js +24 -0
- package/dist/player-core/index.js.map +1 -0
- package/dist/player-core/media-url.d.ts +18 -0
- package/dist/player-core/media-url.d.ts.map +1 -0
- package/dist/player-core/media-url.js +33 -0
- package/dist/player-core/media-url.js.map +1 -0
- package/dist/player-core/player.d.ts +9 -0
- package/dist/player-core/player.d.ts.map +1 -0
- package/dist/player-core/player.js +622 -0
- package/dist/player-core/player.js.map +1 -0
- package/dist/player-core/registry.d.ts +20 -0
- package/dist/player-core/registry.d.ts.map +1 -0
- package/dist/player-core/registry.js +31 -0
- package/dist/player-core/registry.js.map +1 -0
- package/dist/player-core/seek-delegate.d.ts +24 -0
- package/dist/player-core/seek-delegate.d.ts.map +1 -0
- package/dist/player-core/seek-delegate.js +64 -0
- package/dist/player-core/seek-delegate.js.map +1 -0
- package/dist/player-core/storage.d.ts +38 -0
- package/dist/player-core/storage.d.ts.map +1 -0
- package/dist/player-core/storage.js +107 -0
- package/dist/player-core/storage.js.map +1 -0
- package/dist/player-core/strings.d.ts +53 -0
- package/dist/player-core/strings.d.ts.map +1 -0
- package/dist/player-core/strings.js +45 -0
- package/dist/player-core/strings.js.map +1 -0
- package/dist/player-core/timings.d.ts +56 -0
- package/dist/player-core/timings.d.ts.map +1 -0
- package/dist/player-core/timings.js +90 -0
- package/dist/player-core/timings.js.map +1 -0
- package/dist/rehype/audio-words.d.ts +9 -3
- package/dist/rehype/audio-words.d.ts.map +1 -1
- package/dist/rehype/audio-words.js +8 -8
- package/dist/rehype/audio-words.js.map +1 -1
- package/dist/rehype/index.d.ts +2 -2
- package/dist/rehype/index.d.ts.map +1 -1
- package/dist/rehype/index.js.map +1 -1
- package/dist/rehype/rehype-math-speech.d.ts.map +1 -1
- package/dist/rehype/rehype-math-speech.js +2 -0
- package/dist/rehype/rehype-math-speech.js.map +1 -1
- package/dist/styles/content.css +41 -0
- package/dist/styles/layers.css +13 -0
- package/dist/styles/player.css +517 -0
- package/dist/styles/preset-shadcn.css +31 -0
- package/dist/styles/tokens.css +266 -0
- package/dist/styles/vocasync.css +10 -0
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/orchestrator.d.ts.map +1 -1
- package/dist/sync/orchestrator.js.map +1 -1
- package/package.json +40 -17
- package/src/api/index.ts +4 -4
- package/src/components/AudioPlayer.astro +298 -1141
- package/src/components/index.ts +19 -34
- package/src/components/types.ts +140 -0
- package/src/config/index.ts +23 -24
- package/src/config/schema.ts +4 -4
- package/src/core/content-loader.ts +1 -1
- package/src/core/index.ts +7 -7
- package/src/env.d.ts +2 -0
- package/src/index.ts +23 -28
- package/src/integration.ts +66 -4
- package/src/player-core/boot.ts +62 -0
- package/src/player-core/highlighter.ts +159 -0
- package/src/player-core/index.ts +45 -0
- package/src/player-core/media-url.ts +35 -0
- package/src/player-core/player.ts +725 -0
- package/src/player-core/registry.ts +40 -0
- package/src/player-core/seek-delegate.ts +92 -0
- package/src/player-core/storage.ts +112 -0
- package/src/player-core/strings.ts +89 -0
- package/src/player-core/timings.ts +115 -0
- package/src/rehype/audio-words.ts +17 -11
- package/src/rehype/index.ts +2 -3
- package/src/rehype/rehype-math-speech.ts +3 -1
- package/src/styles/content.css +41 -0
- package/src/styles/layers.css +13 -0
- package/src/styles/player.css +517 -0
- package/src/styles/preset-shadcn.css +31 -0
- package/src/styles/tokens.css +266 -0
- package/src/styles/vocasync.css +10 -0
- package/src/sync/index.ts +1 -1
- package/src/sync/orchestrator.ts +1 -1
- package/dist/styles/variables.css +0 -164
- package/src/styles/variables.css +0 -164
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
end: number;
|
|
12
|
-
}[];
|
|
13
|
-
duration?: number;
|
|
14
|
-
publishableKey?: string;
|
|
15
|
-
};
|
|
16
|
-
/** Accessible label for the player */
|
|
17
|
-
label?: string;
|
|
18
|
-
/** Show placeholder when no audio available */
|
|
19
|
-
showPlaceholder?: boolean;
|
|
20
|
-
/** Additional CSS classes */
|
|
21
|
-
class?: string;
|
|
22
|
-
/** Selector for article body (for word highlighting) */
|
|
23
|
-
articleSelector?: string;
|
|
24
|
-
/** Enable floating mini player when main player scrolls out of view */
|
|
25
|
-
enableMiniPlayer?: boolean;
|
|
26
|
-
/** Enable word highlighting during playback */
|
|
27
|
-
enableHighlighting?: boolean;
|
|
28
|
-
/** Enable click on words to seek to that position */
|
|
29
|
-
enableClickToSeek?: boolean;
|
|
30
|
-
/** Number of trailing highlighted words */
|
|
31
|
-
trailLength?: number;
|
|
32
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Types for the AudioPlayer component.
|
|
3
|
+
*
|
|
4
|
+
* The component itself is an .astro file and cannot be re-exported from JavaScript;
|
|
5
|
+
* import it directly:
|
|
6
|
+
*
|
|
7
|
+
* import AudioPlayer from "@vocasync/astro/components/AudioPlayer.astro";
|
|
8
|
+
*/
|
|
9
|
+
export type { AudioEntry, AudioPlayerProps, AutoScrollMode, ControlName, DockOptions, HighlightOptions, PlayerSize, PlayerVariant, } from "./types.js";
|
|
10
|
+
export { DEFAULT_CONTROLS } from "./types.js";
|
|
33
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { SerializableStrings } from "../player-core/strings.js";
|
|
2
|
+
import type { AlignedWord } from "../types/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* The AudioPlayer's props, defined once.
|
|
5
|
+
*
|
|
6
|
+
* This file previously described a component that did not exist: it declared
|
|
7
|
+
* `publishableKey` and `alignmentUrl` while the component took `synthesisPublishableKey`
|
|
8
|
+
* and had no `alignmentUrl` at all, and it advertised a named `AudioPlayer` export that
|
|
9
|
+
* could not be imported. The .astro now imports this type rather than restating it, so
|
|
10
|
+
* the two cannot drift again.
|
|
11
|
+
*/
|
|
12
|
+
/** A control the player can render, in the order you list it. */
|
|
13
|
+
export type ControlName = "play"
|
|
14
|
+
/** Elapsed/total time above the seek bar; grows to fill the row. */
|
|
15
|
+
| "progress"
|
|
16
|
+
/** Elapsed/total time on its own. */
|
|
17
|
+
| "time" | "highlight" | "speed"
|
|
18
|
+
/** Mute button plus volume slider. */
|
|
19
|
+
| "volume"
|
|
20
|
+
/** Jump backwards by `skipSeconds`. */
|
|
21
|
+
| "skip-back"
|
|
22
|
+
/** Jump forwards by `skipSeconds`. */
|
|
23
|
+
| "skip-forward";
|
|
24
|
+
export declare const DEFAULT_CONTROLS: ControlName[];
|
|
25
|
+
/** Shape of the player. `bar` is the default horizontal strip. */
|
|
26
|
+
export type PlayerVariant = "bar" | "minimal" | "card";
|
|
27
|
+
export type PlayerSize = "sm" | "md" | "lg";
|
|
28
|
+
/** What follows the spoken word as it plays. */
|
|
29
|
+
export type AutoScrollMode = "off" | "paragraph";
|
|
30
|
+
export interface AudioEntry {
|
|
31
|
+
audioUrl: string;
|
|
32
|
+
words?: AlignedWord[];
|
|
33
|
+
duration?: number;
|
|
34
|
+
/** Publishable key for the synthesis stream (v3 audio-map). */
|
|
35
|
+
synthesisPublishableKey?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface HighlightOptions {
|
|
38
|
+
/** @default true */
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/** Words kept marked behind the active one. @default 4 */
|
|
41
|
+
trailLength?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Clicking a word seeks to it.
|
|
44
|
+
*
|
|
45
|
+
* Independent of `enabled`: it used to live inside the highlighting branch, so
|
|
46
|
+
* turning highlighting off silently disabled click-to-seek too.
|
|
47
|
+
*
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
clickToSeek?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface DockOptions {
|
|
53
|
+
/** Show a floating player once the main one scrolls out of view. @default true */
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface AudioPlayerProps {
|
|
57
|
+
/** Post slug, used to look up audio and to key saved playback position. */
|
|
58
|
+
slug: string;
|
|
59
|
+
/** Audio entry from audio-map.json. */
|
|
60
|
+
audioEntry?: AudioEntry;
|
|
61
|
+
/** Shape and scale. */
|
|
62
|
+
variant?: PlayerVariant;
|
|
63
|
+
size?: PlayerSize;
|
|
64
|
+
/** Which controls to render, and in what order. */
|
|
65
|
+
controls?: ControlName[];
|
|
66
|
+
/** Playback rates offered by the speed menu. */
|
|
67
|
+
speeds?: number[];
|
|
68
|
+
/** How far the skip controls and arrow keys jump. @default 15 */
|
|
69
|
+
skipSeconds?: number;
|
|
70
|
+
/** Overrides for any visible text or accessible label. */
|
|
71
|
+
strings?: Partial<SerializableStrings>;
|
|
72
|
+
/** Selector for the element containing the article's word spans. */
|
|
73
|
+
articleSelector?: string;
|
|
74
|
+
highlight?: HighlightOptions;
|
|
75
|
+
dock?: DockOptions;
|
|
76
|
+
/**
|
|
77
|
+
* Follow the spoken word by scrolling its paragraph into view.
|
|
78
|
+
*
|
|
79
|
+
* Defaults to off. It was previously forced on with no way to disable it, which
|
|
80
|
+
* takes over the reader's scroll position while they are reading something else.
|
|
81
|
+
*
|
|
82
|
+
* @default "off"
|
|
83
|
+
*/
|
|
84
|
+
autoScroll?: AutoScrollMode;
|
|
85
|
+
/** Pause other players on the page when this one starts. @default true */
|
|
86
|
+
exclusive?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Remember speed, volume, mute and highlighting across pages and visits.
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
rememberPreferences?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Resume where the reader left off, keyed by `slug`.
|
|
94
|
+
*
|
|
95
|
+
* Off by default: it is a pleasant surprise on a long article and a confusing one
|
|
96
|
+
* on a short post that someone expects to start from the beginning.
|
|
97
|
+
*
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
rememberPosition?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Publish title and artwork to the OS media controls (lock screen, media keys).
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
105
|
+
mediaSession?: boolean;
|
|
106
|
+
/** Title for the OS media controls. Falls back to the accessible label. */
|
|
107
|
+
title?: string;
|
|
108
|
+
/** Artwork URL for the OS media controls. */
|
|
109
|
+
artwork?: string;
|
|
110
|
+
/** Show a message when the article has no audio. @default true */
|
|
111
|
+
showPlaceholder?: boolean;
|
|
112
|
+
/** Extra classes on the player root. */
|
|
113
|
+
class?: string;
|
|
114
|
+
/** Overrides the generated element id. */
|
|
115
|
+
id?: string;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;GAQG;AAEH,iEAAiE;AACjE,MAAM,MAAM,WAAW,GACnB,MAAM;AACR,oEAAoE;GAClE,UAAU;AACZ,qCAAqC;GACnC,MAAM,GACN,WAAW,GACX,OAAO;AACT,sCAAsC;GACpC,QAAQ;AACV,uCAAuC;GACrC,WAAW;AACb,sCAAsC;GACpC,cAAc,CAAC;AAEnB,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAAyD,CAAC;AAEpG,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,gDAAgD;AAChD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,CAAC;AAEjD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC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,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VocaSyncConfigSchema, CollectionConfigSchema, SynthesisConfigSchema, MathConfigSchema, OutputConfigSchema, ProcessingConfigSchema, VoiceSchema, QualitySchema, FormatSchema, LanguageSchema, MathStyleSchema, validateConfig, defaultConfig, } from "./schema.js";
|
|
2
|
-
export type { VocaSyncConfig, VocaSyncUserConfig, CollectionConfig, SynthesisConfig, MathConfig, OutputConfig, ProcessingConfig, Voice, Quality, Format, Language, MathStyle, } from "./schema.js";
|
|
3
1
|
export { loadVocaSyncConfig } from "./loader.js";
|
|
2
|
+
export type { CollectionConfig, Format, Language, MathConfig, MathStyle, OutputConfig, ProcessingConfig, Quality, SynthesisConfig, VocaSyncConfig, VocaSyncUserConfig, Voice, } from "./schema.js";
|
|
3
|
+
export { CollectionConfigSchema, defaultConfig, FormatSchema, LanguageSchema, MathConfigSchema, MathStyleSchema, OutputConfigSchema, ProcessingConfigSchema, QualitySchema, SynthesisConfigSchema, VocaSyncConfigSchema, VoiceSchema, validateConfig, } from "./schema.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,YAAY,EACV,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,UAAU,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,KAAK,GACN,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,cAAc,GACf,MAAM,aAAa,CAAC"}
|
package/dist/config/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { VocaSyncConfigSchema, CollectionConfigSchema, SynthesisConfigSchema, MathConfigSchema, OutputConfigSchema, ProcessingConfigSchema, VoiceSchema, QualitySchema, FormatSchema, LanguageSchema, MathStyleSchema, validateConfig, defaultConfig, } from "./schema.js";
|
|
2
1
|
export { loadVocaSyncConfig } from "./loader.js";
|
|
2
|
+
export { CollectionConfigSchema, defaultConfig, FormatSchema, LanguageSchema, MathConfigSchema, MathStyleSchema, OutputConfigSchema, ProcessingConfigSchema, QualitySchema, SynthesisConfigSchema, VocaSyncConfigSchema, VoiceSchema, validateConfig, } from "./schema.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAgBjD,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,cAAc,GACf,MAAM,aAAa,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -2,241 +2,196 @@ import { z } from "zod";
|
|
|
2
2
|
/**
|
|
3
3
|
* Supported TTS voices (matches the platform's 9 OpenAI voices)
|
|
4
4
|
*/
|
|
5
|
-
export declare const VoiceSchema: z.ZodEnum<
|
|
5
|
+
export declare const VoiceSchema: z.ZodEnum<{
|
|
6
|
+
alloy: "alloy";
|
|
7
|
+
ash: "ash";
|
|
8
|
+
coral: "coral";
|
|
9
|
+
echo: "echo";
|
|
10
|
+
fable: "fable";
|
|
11
|
+
nova: "nova";
|
|
12
|
+
onyx: "onyx";
|
|
13
|
+
sage: "sage";
|
|
14
|
+
shimmer: "shimmer";
|
|
15
|
+
}>;
|
|
6
16
|
export type Voice = z.infer<typeof VoiceSchema>;
|
|
7
17
|
/**
|
|
8
18
|
* Supported audio qualities
|
|
9
19
|
*/
|
|
10
|
-
export declare const QualitySchema: z.ZodEnum<
|
|
20
|
+
export declare const QualitySchema: z.ZodEnum<{
|
|
21
|
+
hd: "hd";
|
|
22
|
+
sd: "sd";
|
|
23
|
+
}>;
|
|
11
24
|
export type Quality = z.infer<typeof QualitySchema>;
|
|
12
25
|
/**
|
|
13
26
|
* Supported audio output formats (matches the platform's OUTPUT_FORMATS).
|
|
14
27
|
* mp3 is the default for the broadest <audio> compatibility.
|
|
15
28
|
*/
|
|
16
|
-
export declare const FormatSchema: z.ZodEnum<
|
|
29
|
+
export declare const FormatSchema: z.ZodEnum<{
|
|
30
|
+
aac: "aac";
|
|
31
|
+
flac: "flac";
|
|
32
|
+
mp3: "mp3";
|
|
33
|
+
opus: "opus";
|
|
34
|
+
wav: "wav";
|
|
35
|
+
}>;
|
|
17
36
|
export type Format = z.infer<typeof FormatSchema>;
|
|
18
37
|
/**
|
|
19
38
|
* Supported languages for synthesis + alignment
|
|
20
39
|
* Uses short ISO 639-1 codes as expected by the VocaSync API
|
|
21
40
|
* Only languages where both OpenAI TTS synthesis and MFA forced alignment are available
|
|
22
41
|
*/
|
|
23
|
-
export declare const LanguageSchema: z.ZodEnum<
|
|
42
|
+
export declare const LanguageSchema: z.ZodEnum<{
|
|
43
|
+
cs: "cs";
|
|
44
|
+
de: "de";
|
|
45
|
+
en: "en";
|
|
46
|
+
es: "es";
|
|
47
|
+
fr: "fr";
|
|
48
|
+
ja: "ja";
|
|
49
|
+
ko: "ko";
|
|
50
|
+
pl: "pl";
|
|
51
|
+
pt: "pt";
|
|
52
|
+
ru: "ru";
|
|
53
|
+
sv: "sv";
|
|
54
|
+
tr: "tr";
|
|
55
|
+
uk: "uk";
|
|
56
|
+
zh: "zh";
|
|
57
|
+
}>;
|
|
24
58
|
export type Language = z.infer<typeof LanguageSchema>;
|
|
25
59
|
/**
|
|
26
60
|
* Math speech styles
|
|
27
61
|
*/
|
|
28
|
-
export declare const MathStyleSchema: z.ZodEnum<
|
|
62
|
+
export declare const MathStyleSchema: z.ZodEnum<{
|
|
63
|
+
clearspeak: "clearspeak";
|
|
64
|
+
mathspeak: "mathspeak";
|
|
65
|
+
}>;
|
|
29
66
|
export type MathStyle = z.infer<typeof MathStyleSchema>;
|
|
30
67
|
/**
|
|
31
68
|
* Collection configuration
|
|
32
69
|
*/
|
|
33
70
|
export declare const CollectionConfigSchema: z.ZodObject<{
|
|
34
|
-
/** Name of the Astro content collection */
|
|
35
71
|
name: z.ZodString;
|
|
36
|
-
/** Path to the content directory */
|
|
37
72
|
path: z.ZodString;
|
|
38
|
-
/** Field used for unique slug identification */
|
|
39
73
|
slugField: z.ZodDefault<z.ZodString>;
|
|
40
|
-
},
|
|
41
|
-
path: string;
|
|
42
|
-
name: string;
|
|
43
|
-
slugField: string;
|
|
44
|
-
}, {
|
|
45
|
-
path: string;
|
|
46
|
-
name: string;
|
|
47
|
-
slugField?: string | undefined;
|
|
48
|
-
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
49
75
|
export type CollectionConfig = z.infer<typeof CollectionConfigSchema>;
|
|
50
76
|
/**
|
|
51
77
|
* Synthesis options
|
|
52
78
|
*/
|
|
53
79
|
export declare const SynthesisConfigSchema: z.ZodObject<{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
80
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
81
|
+
alloy: "alloy";
|
|
82
|
+
ash: "ash";
|
|
83
|
+
coral: "coral";
|
|
84
|
+
echo: "echo";
|
|
85
|
+
fable: "fable";
|
|
86
|
+
nova: "nova";
|
|
87
|
+
onyx: "onyx";
|
|
88
|
+
sage: "sage";
|
|
89
|
+
shimmer: "shimmer";
|
|
90
|
+
}>>;
|
|
91
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
92
|
+
hd: "hd";
|
|
93
|
+
sd: "sd";
|
|
94
|
+
}>>;
|
|
95
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
96
|
+
aac: "aac";
|
|
97
|
+
flac: "flac";
|
|
98
|
+
mp3: "mp3";
|
|
99
|
+
opus: "opus";
|
|
100
|
+
wav: "wav";
|
|
101
|
+
}>>;
|
|
102
|
+
}, z.core.$strip>;
|
|
69
103
|
export type SynthesisConfig = z.infer<typeof SynthesisConfigSchema>;
|
|
70
104
|
/**
|
|
71
105
|
* Math/LaTeX configuration
|
|
72
106
|
*/
|
|
73
107
|
export declare const MathConfigSchema: z.ZodObject<{
|
|
74
|
-
/** Enable LaTeX to speech conversion */
|
|
75
108
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, {
|
|
82
|
-
enabled?: boolean | undefined;
|
|
83
|
-
style?: "clearspeak" | "mathspeak" | undefined;
|
|
84
|
-
}>;
|
|
109
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
110
|
+
clearspeak: "clearspeak";
|
|
111
|
+
mathspeak: "mathspeak";
|
|
112
|
+
}>>;
|
|
113
|
+
}, z.core.$strip>;
|
|
85
114
|
export type MathConfig = z.infer<typeof MathConfigSchema>;
|
|
86
115
|
/**
|
|
87
116
|
* Output configuration
|
|
88
117
|
*/
|
|
89
118
|
export declare const OutputConfigSchema: z.ZodObject<{
|
|
90
|
-
/** Path to store the audio-map.json artifact */
|
|
91
119
|
audioMapPath: z.ZodDefault<z.ZodString>;
|
|
92
|
-
},
|
|
93
|
-
audioMapPath: string;
|
|
94
|
-
}, {
|
|
95
|
-
audioMapPath?: string | undefined;
|
|
96
|
-
}>;
|
|
120
|
+
}, z.core.$strip>;
|
|
97
121
|
export type OutputConfig = z.infer<typeof OutputConfigSchema>;
|
|
98
122
|
/**
|
|
99
123
|
* Processing options
|
|
100
124
|
*/
|
|
101
125
|
export declare const ProcessingConfigSchema: z.ZodObject<{
|
|
102
|
-
/** Number of concurrent synthesis jobs */
|
|
103
126
|
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
104
|
-
/** Force reprocessing even if content hasn't changed */
|
|
105
127
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
-
},
|
|
107
|
-
concurrency: number;
|
|
108
|
-
force: boolean;
|
|
109
|
-
}, {
|
|
110
|
-
concurrency?: number | undefined;
|
|
111
|
-
force?: boolean | undefined;
|
|
112
|
-
}>;
|
|
128
|
+
}, z.core.$strip>;
|
|
113
129
|
export type ProcessingConfig = z.infer<typeof ProcessingConfigSchema>;
|
|
114
130
|
/**
|
|
115
131
|
* Main VocaSync configuration schema
|
|
116
132
|
*/
|
|
117
133
|
export declare const VocaSyncConfigSchema: z.ZodObject<{
|
|
118
|
-
/** Content collection settings */
|
|
119
134
|
collection: z.ZodObject<{
|
|
120
|
-
/** Name of the Astro content collection */
|
|
121
135
|
name: z.ZodString;
|
|
122
|
-
/** Path to the content directory */
|
|
123
136
|
path: z.ZodString;
|
|
124
|
-
/** Field used for unique slug identification */
|
|
125
137
|
slugField: z.ZodDefault<z.ZodString>;
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
quality: z.ZodDefault<z.ZodEnum<["sd", "hd"]>>;
|
|
143
|
-
/** Output format */
|
|
144
|
-
format: z.ZodDefault<z.ZodEnum<["mp3", "aac", "opus", "flac", "wav"]>>;
|
|
145
|
-
}, "strip", z.ZodTypeAny, {
|
|
146
|
-
voice: "alloy" | "ash" | "coral" | "echo" | "fable" | "onyx" | "nova" | "sage" | "shimmer";
|
|
147
|
-
quality: "sd" | "hd";
|
|
148
|
-
format: "mp3" | "aac" | "opus" | "flac" | "wav";
|
|
149
|
-
}, {
|
|
150
|
-
voice?: "alloy" | "ash" | "coral" | "echo" | "fable" | "onyx" | "nova" | "sage" | "shimmer" | undefined;
|
|
151
|
-
quality?: "sd" | "hd" | undefined;
|
|
152
|
-
format?: "mp3" | "aac" | "opus" | "flac" | "wav" | undefined;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
language: z.ZodDefault<z.ZodEnum<{
|
|
140
|
+
cs: "cs";
|
|
141
|
+
de: "de";
|
|
142
|
+
en: "en";
|
|
143
|
+
es: "es";
|
|
144
|
+
fr: "fr";
|
|
145
|
+
ja: "ja";
|
|
146
|
+
ko: "ko";
|
|
147
|
+
pl: "pl";
|
|
148
|
+
pt: "pt";
|
|
149
|
+
ru: "ru";
|
|
150
|
+
sv: "sv";
|
|
151
|
+
tr: "tr";
|
|
152
|
+
uk: "uk";
|
|
153
|
+
zh: "zh";
|
|
153
154
|
}>>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
synthesis: z.ZodPrefault<z.ZodObject<{
|
|
156
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
157
|
+
alloy: "alloy";
|
|
158
|
+
ash: "ash";
|
|
159
|
+
coral: "coral";
|
|
160
|
+
echo: "echo";
|
|
161
|
+
fable: "fable";
|
|
162
|
+
nova: "nova";
|
|
163
|
+
onyx: "onyx";
|
|
164
|
+
sage: "sage";
|
|
165
|
+
shimmer: "shimmer";
|
|
166
|
+
}>>;
|
|
167
|
+
quality: z.ZodDefault<z.ZodEnum<{
|
|
168
|
+
hd: "hd";
|
|
169
|
+
sd: "sd";
|
|
170
|
+
}>>;
|
|
171
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
172
|
+
aac: "aac";
|
|
173
|
+
flac: "flac";
|
|
174
|
+
mp3: "mp3";
|
|
175
|
+
opus: "opus";
|
|
176
|
+
wav: "wav";
|
|
177
|
+
}>>;
|
|
178
|
+
}, z.core.$strip>>;
|
|
179
|
+
math: z.ZodPrefault<z.ZodObject<{
|
|
157
180
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
enabled?: boolean | undefined;
|
|
165
|
-
style?: "clearspeak" | "mathspeak" | undefined;
|
|
166
|
-
}>>;
|
|
167
|
-
/** Output paths */
|
|
168
|
-
output: z.ZodDefault<z.ZodObject<{
|
|
169
|
-
/** Path to store the audio-map.json artifact */
|
|
181
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
182
|
+
clearspeak: "clearspeak";
|
|
183
|
+
mathspeak: "mathspeak";
|
|
184
|
+
}>>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
output: z.ZodPrefault<z.ZodObject<{
|
|
170
187
|
audioMapPath: z.ZodDefault<z.ZodString>;
|
|
171
|
-
},
|
|
172
|
-
audioMapPath: string;
|
|
173
|
-
}, {
|
|
174
|
-
audioMapPath?: string | undefined;
|
|
175
|
-
}>>;
|
|
176
|
-
/** Frontmatter field to check for audio opt-in/out (true/false) */
|
|
188
|
+
}, z.core.$strip>>;
|
|
177
189
|
frontmatterField: z.ZodOptional<z.ZodString>;
|
|
178
|
-
|
|
179
|
-
processing: z.ZodDefault<z.ZodObject<{
|
|
180
|
-
/** Number of concurrent synthesis jobs */
|
|
190
|
+
processing: z.ZodPrefault<z.ZodObject<{
|
|
181
191
|
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
182
|
-
/** Force reprocessing even if content hasn't changed */
|
|
183
192
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
force: boolean;
|
|
187
|
-
}, {
|
|
188
|
-
concurrency?: number | undefined;
|
|
189
|
-
force?: boolean | undefined;
|
|
190
|
-
}>>;
|
|
191
|
-
}, "strip", z.ZodTypeAny, {
|
|
192
|
-
collection: {
|
|
193
|
-
path: string;
|
|
194
|
-
name: string;
|
|
195
|
-
slugField: string;
|
|
196
|
-
};
|
|
197
|
-
language: "zh" | "cs" | "en" | "fr" | "de" | "ja" | "ko" | "pl" | "pt" | "ru" | "es" | "sv" | "tr" | "uk";
|
|
198
|
-
synthesis: {
|
|
199
|
-
voice: "alloy" | "ash" | "coral" | "echo" | "fable" | "onyx" | "nova" | "sage" | "shimmer";
|
|
200
|
-
quality: "sd" | "hd";
|
|
201
|
-
format: "mp3" | "aac" | "opus" | "flac" | "wav";
|
|
202
|
-
};
|
|
203
|
-
math: {
|
|
204
|
-
enabled: boolean;
|
|
205
|
-
style: "clearspeak" | "mathspeak";
|
|
206
|
-
};
|
|
207
|
-
output: {
|
|
208
|
-
audioMapPath: string;
|
|
209
|
-
};
|
|
210
|
-
processing: {
|
|
211
|
-
concurrency: number;
|
|
212
|
-
force: boolean;
|
|
213
|
-
};
|
|
214
|
-
frontmatterField?: string | undefined;
|
|
215
|
-
}, {
|
|
216
|
-
collection: {
|
|
217
|
-
path: string;
|
|
218
|
-
name: string;
|
|
219
|
-
slugField?: string | undefined;
|
|
220
|
-
};
|
|
221
|
-
language?: "zh" | "cs" | "en" | "fr" | "de" | "ja" | "ko" | "pl" | "pt" | "ru" | "es" | "sv" | "tr" | "uk" | undefined;
|
|
222
|
-
synthesis?: {
|
|
223
|
-
voice?: "alloy" | "ash" | "coral" | "echo" | "fable" | "onyx" | "nova" | "sage" | "shimmer" | undefined;
|
|
224
|
-
quality?: "sd" | "hd" | undefined;
|
|
225
|
-
format?: "mp3" | "aac" | "opus" | "flac" | "wav" | undefined;
|
|
226
|
-
} | undefined;
|
|
227
|
-
math?: {
|
|
228
|
-
enabled?: boolean | undefined;
|
|
229
|
-
style?: "clearspeak" | "mathspeak" | undefined;
|
|
230
|
-
} | undefined;
|
|
231
|
-
output?: {
|
|
232
|
-
audioMapPath?: string | undefined;
|
|
233
|
-
} | undefined;
|
|
234
|
-
frontmatterField?: string | undefined;
|
|
235
|
-
processing?: {
|
|
236
|
-
concurrency?: number | undefined;
|
|
237
|
-
force?: boolean | undefined;
|
|
238
|
-
} | undefined;
|
|
239
|
-
}>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
}, z.core.$strip>;
|
|
240
195
|
export type VocaSyncConfig = z.infer<typeof VocaSyncConfigSchema>;
|
|
241
196
|
/**
|
|
242
197
|
* User-facing config type (with optional defaults)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;EAUtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa;;;EAAuB,CAAC;AAClD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,YAAY;;;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c,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE;QACV,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,SAAS,CAAC;KACnB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,kBAAkB,GAAG,cAAc,CAE7E;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAkB5D,CAAC"}
|
package/dist/config/schema.js
CHANGED
|
@@ -103,15 +103,15 @@ export const VocaSyncConfigSchema = z.object({
|
|
|
103
103
|
/** Language for synthesis (e.g., "en", "fr", "de") */
|
|
104
104
|
language: LanguageSchema.default("en"),
|
|
105
105
|
/** Synthesis options */
|
|
106
|
-
synthesis: SynthesisConfigSchema.
|
|
106
|
+
synthesis: SynthesisConfigSchema.prefault({}),
|
|
107
107
|
/** Math/LaTeX support */
|
|
108
|
-
math: MathConfigSchema.
|
|
108
|
+
math: MathConfigSchema.prefault({}),
|
|
109
109
|
/** Output paths */
|
|
110
|
-
output: OutputConfigSchema.
|
|
110
|
+
output: OutputConfigSchema.prefault({}),
|
|
111
111
|
/** Frontmatter field to check for audio opt-in/out (true/false) */
|
|
112
112
|
frontmatterField: z.string().optional(),
|
|
113
113
|
/** Processing options */
|
|
114
|
-
processing: ProcessingConfigSchema.
|
|
114
|
+
processing: ProcessingConfigSchema.prefault({}),
|
|
115
115
|
});
|
|
116
116
|
/**
|
|
117
117
|
* Validate and normalize user configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;CACV,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAGlD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAG1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACnC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CA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