@vocalstack/payload 0.0.0-stage → 0.1.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.
@@ -0,0 +1,167 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Button, TextareaInput, useField, useForm, useFormFields } from '@payloadcms/ui';
4
+ import { memo, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
5
+ import { paragraphs, timedTokens, transcriptText } from '../text.js';
6
+ import { BrandStyles } from './Brand.js';
7
+ const styles = `
8
+ .vs-transcript { position: relative; max-height: 440px; overflow-y: auto; padding: 12px 16px; border: 1px solid var(--theme-elevation-150);
9
+ border-radius: var(--style-radius-s, 4px); background: var(--theme-input-bg, var(--theme-elevation-0)); font-size: 15px; line-height: 1.75; }
10
+ .vs-transcript p { margin: 0 0 .9em; }
11
+ .vs-transcript p:last-child { margin-bottom: 0; }
12
+ .vs-w { border-radius: 3px; margin: 0 -2px; padding: 0 2px; transition: background-color .12s, color .12s; }
13
+ .vs-transcript--seekable .vs-w { cursor: pointer; }
14
+ .vs-transcript--seekable .vs-w:hover { background: color-mix(in srgb, var(--vs-accent) 16%, transparent); }
15
+ .vs-w--draft { color: var(--theme-elevation-500); }
16
+ .vs-w--new { animation: vs-arrive 1.6s ease-out backwards; }
17
+ .vs-w.vs-w--now { background: var(--vs-accent); color: #fff; }
18
+ @keyframes vs-arrive {
19
+ 0% { opacity: 0; background: color-mix(in srgb, var(--vs-accent) 55%, transparent); }
20
+ 12% { opacity: 1; }
21
+ 100% { background: transparent; }
22
+ }
23
+ .vs-transcript-bar { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 8px; min-height: 28px; }
24
+ .vs-transcript-hint { color: var(--theme-elevation-500); font-size: 13px; }
25
+ .vs-live-dot { background: var(--vs-coral); border-radius: 50%; display: inline-block; height: 7px; margin-right: 6px; width: 7px; animation: vs-pulse 1.2s ease-in-out infinite; }
26
+ @keyframes vs-pulse { 50% { opacity: .3; } }
27
+ @media (prefers-reduced-motion: reduce) { .vs-w--new, .vs-live-dot { animation: none; } }
28
+ `;
29
+ /** One sentence as clickable, timed words. Re-renders only when VocalStack changes the sentence. */
30
+ const Sentence = memo(function Sentence({ freshAfter, sentence }) {
31
+ let fresh = 0;
32
+ return (_jsx(_Fragment, { children: timedTokens(sentence).map(([start, end, text], i) => {
33
+ const isNew = start >= freshAfter;
34
+ // New words arrive one after another, like they are being typed.
35
+ const delay = isNew ? Math.min(fresh++ * 35, 700) : 0;
36
+ return (_jsxs("span", { children: [_jsx("span", { className: `vs-w${sentence.draft ? ' vs-w--draft' : ''}${isNew ? ' vs-w--new' : ''}`, "data-e": end, "data-s": start, style: delay ? { animationDelay: `${delay}ms` } : undefined, children: text }), ' '] }, i));
37
+ }) }));
38
+ }, (a, b) => a.sentence === b.sentence);
39
+ /** The audio this transcript belongs to: the player in the same array row, else our own. */
40
+ function findAudio(box, own) {
41
+ return own ?? box.closest('.array-field__row')?.querySelector('audio') ?? null;
42
+ }
43
+ export const TranscriptField = ({ path }) => {
44
+ const base = path.replace(/transcript$/, '');
45
+ const { setValue, value } = useField({ path });
46
+ const { dispatchFields } = useForm();
47
+ const sentences = useFormFields(([fields]) => fields[`${base}sentences`]?.value);
48
+ const status = useFormFields(([fields]) => fields[`${base}status`]?.value);
49
+ // On an upload document the file is the audio; rows bring their own player.
50
+ const inRow = /\.\d+\./.test(path);
51
+ const fileURL = useFormFields(([fields]) => (inRow ? undefined : fields.url?.value));
52
+ const [editing, setEditing] = useState(false);
53
+ const [seekable, setSeekable] = useState(false);
54
+ const box = useRef(null);
55
+ const ownAudio = useRef(null);
56
+ const words = useRef([]);
57
+ const seenTo = useRef(null);
58
+ const userScrolledAt = useRef(0);
59
+ const processing = status === 'processing';
60
+ const list = sentences ?? [];
61
+ const generated = useMemo(() => transcriptText((sentences ?? []).filter((s) => !s.draft)), [sentences]);
62
+ // Edited by hand: the words no longer match the timings, so show the text as written.
63
+ const edited = !processing && Boolean(value) && value !== generated;
64
+ const timed = list.length > 0 && (processing || !edited);
65
+ // Words count as new (and animate) only past what was already on screen. On first
66
+ // render everything is old; at the start of a transcription the slate is clean.
67
+ if (!list.length)
68
+ seenTo.current = 0;
69
+ const freshAfter = seenTo.current ?? Number.POSITIVE_INFINITY;
70
+ const lastEnd = list.length ? list[list.length - 1].end : 0;
71
+ // Index the rendered words for the playhead, and keep a live transcript scrolled to its end.
72
+ useLayoutEffect(() => {
73
+ seenTo.current = Math.max(seenTo.current ?? 0, lastEnd);
74
+ const el = box.current;
75
+ if (!el)
76
+ return;
77
+ words.current = Array.from(el.querySelectorAll('.vs-w')).map((w) => ({ el: w, end: Number(w.dataset.e), start: Number(w.dataset.s) }));
78
+ if (processing && Date.now() - userScrolledAt.current > 4000)
79
+ el.scrollTop = el.scrollHeight;
80
+ });
81
+ // Follow the audio: highlight the word being spoken, without re-rendering React.
82
+ useEffect(() => {
83
+ const el = box.current;
84
+ if (!el || !timed)
85
+ return;
86
+ const audio = findAudio(el, ownAudio.current);
87
+ setSeekable(Boolean(audio));
88
+ if (!audio)
89
+ return;
90
+ let raf = 0;
91
+ let current = null;
92
+ const at = (t) => {
93
+ const list = words.current;
94
+ let lo = 0;
95
+ let hi = list.length - 1;
96
+ let found = -1;
97
+ while (lo <= hi) {
98
+ const mid = (lo + hi) >> 1;
99
+ if (list[mid].start <= t) {
100
+ found = mid;
101
+ lo = mid + 1;
102
+ }
103
+ else
104
+ hi = mid - 1;
105
+ }
106
+ return found >= 0 && t <= list[found].end + 0.35 ? list[found].el : null;
107
+ };
108
+ const tick = () => {
109
+ const word = at(audio.currentTime);
110
+ if (word !== current) {
111
+ current?.classList.remove('vs-w--now');
112
+ word?.classList.add('vs-w--now');
113
+ current = word;
114
+ // Keep the spoken word in view, unless the editor is reading elsewhere.
115
+ if (word && Date.now() - userScrolledAt.current > 4000) {
116
+ const top = word.offsetTop - el.offsetTop;
117
+ if (top < el.scrollTop || top > el.scrollTop + el.clientHeight - 40)
118
+ el.scrollTo({ behavior: 'smooth', top: top - el.clientHeight / 3 });
119
+ }
120
+ }
121
+ if (!audio.paused)
122
+ raf = requestAnimationFrame(tick);
123
+ };
124
+ const start = () => {
125
+ cancelAnimationFrame(raf);
126
+ raf = requestAnimationFrame(tick);
127
+ };
128
+ audio.addEventListener('play', start);
129
+ audio.addEventListener('seeked', tick);
130
+ audio.addEventListener('timeupdate', tick);
131
+ if (!audio.paused)
132
+ start();
133
+ return () => {
134
+ cancelAnimationFrame(raf);
135
+ current?.classList.remove('vs-w--now');
136
+ audio.removeEventListener('play', start);
137
+ audio.removeEventListener('seeked', tick);
138
+ audio.removeEventListener('timeupdate', tick);
139
+ };
140
+ }, [timed, editing, fileURL]);
141
+ /** Clear the transcript and its job, back to a fresh Transcribe. Saved with the document. */
142
+ const remove = () => {
143
+ if (!window.confirm('Delete this transcript? It is removed when you save.'))
144
+ return;
145
+ for (const name of ['sentences', 'language', 'error', 'recordingId', 'transcriptionId', 'transcribedAt']) {
146
+ dispatchFields({ type: 'UPDATE', path: `${base}${name}`, value: null });
147
+ }
148
+ dispatchFields({ type: 'UPDATE', path: `${base}status`, value: 'idle' });
149
+ setValue('');
150
+ setEditing(false);
151
+ };
152
+ const seek = (e) => {
153
+ const word = e.target.closest('.vs-w');
154
+ const audio = box.current && findAudio(box.current, ownAudio.current);
155
+ if (!word || !audio)
156
+ return;
157
+ audio.currentTime = Number(word.dataset.s);
158
+ void audio.play().catch(() => undefined);
159
+ };
160
+ const noteScroll = () => {
161
+ userScrolledAt.current = Date.now();
162
+ };
163
+ const hint = processing ? (_jsxs("span", { children: [_jsx("span", { className: "vs-live-dot" }), "Live from VocalStack"] })) : editing ? ('Editing. Transcribing again replaces your changes.') : edited ? ('Edited by hand, so words are no longer linked to the audio.') : timed && seekable ? ('Play the audio to follow along; click a word to jump there.') : null;
164
+ return (_jsxs("div", { className: "field-type vs-brand", children: [_jsx(BrandStyles, {}), _jsx("style", { children: styles }), fileURL && _jsx("audio", { controls: true, preload: "none", ref: ownAudio, src: fileURL, style: { marginBottom: 8, width: '100%' } }), _jsxs("div", { className: "vs-transcript-bar", children: [_jsx("span", { className: "vs-transcript-hint", children: hint }), !processing && (_jsxs("span", { style: { display: 'flex', gap: 8 }, children: [editing && (value || list.length > 0) && (_jsx(Button, { buttonStyle: "error", margin: false, onClick: remove, size: "small", children: "Delete transcript" })), _jsx(Button, { buttonStyle: "secondary", margin: false, onClick: () => setEditing(!editing), size: "small", children: editing ? 'Done' : value || list.length > 0 ? 'Edit' : 'Write transcript' })] }))] }), editing ? (_jsx(TextareaInput, { onChange: (e) => setValue(e.target.value), path: path, rows: 14, value: value ?? '' })) : timed ? (_jsx("div", { className: `vs-transcript${seekable ? ' vs-transcript--seekable' : ''}`, onClick: seek, onTouchMove: noteScroll, onWheel: noteScroll, ref: box, children: paragraphs(list).map((p) => (_jsx("p", { children: p.map((s) => (_jsx(Sentence, { freshAfter: freshAfter, sentence: s }, s.draft ? 'draft' : s.id))) }, `${p[0].id ?? 'draft'}`))) })) : processing ? (
165
+ // Not the previous transcript: that one is only replaced once this job is done.
166
+ _jsx("p", { className: "vs-transcript-hint", style: { margin: 0 }, children: "The transcript appears here as VocalStack hears it." })) : value ? (_jsx("div", { className: "vs-transcript", ref: box, children: value.split(/\n{2,}/).map((p, i) => (_jsx("p", { children: p }, i))) })) : (_jsx("p", { className: "vs-transcript-hint", style: { margin: 0 }, children: "No transcript yet. Transcribe the audio, or write one yourself." }))] }));
167
+ };
@@ -0,0 +1,11 @@
1
+ export declare const LOGO_LIGHT = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1051.6906 155.30641\"><g transform=\"matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)\"><path style=\"fill:#245B8F;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#245B8F;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g><path style=\"fill:#ec634d\" d=\"m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z\"/></svg>";
2
+ export declare const LOGO_DARK = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1051.6906 155.30641\"><g transform=\"matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)\"><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g><path style=\"fill:#ffffff\" d=\"m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z\"/></svg>";
3
+ export declare const MARK_LIGHT = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 46.955482 39.84531\"><g transform=\"translate(-80.9625,-128.5875)\"><g transform=\"matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)\"><path style=\"fill:#245b8f;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#245b8f;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#ec634d\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g></g></svg>";
4
+ export declare const MARK_DARK = "<svg aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 46.955482 39.84531\"><g transform=\"translate(-80.9625,-128.5875)\"><g transform=\"matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)\"><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z\"/><path style=\"fill:#55abe5;fill-opacity:1;stroke-width:0.372962\" d=\"m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z\"/><rect style=\"fill:#f78472\" width=\"11.26954\" height=\"42.097622\" x=\"164.88014\" y=\"176.25909\" ry=\"5.610496\"/><rect style=\"fill:#f78472\" width=\"11.62156\" height=\"87.038605\" x=\"142.15868\" y=\"153.7886\" ry=\"5.610496\"/><rect style=\"fill:#f78472\" width=\"11.26954\" height=\"42.097622\" x=\"119.78924\" y=\"176.25909\" ry=\"5.610496\"/></g></g></svg>";
5
+ export declare const BRAND: {
6
+ readonly blue: "#245B8F";
7
+ readonly coral: "#EC634D";
8
+ readonly lightBlue: "#55ABE5";
9
+ readonly lightCoral: "#F78472";
10
+ readonly night: "#131326";
11
+ };
@@ -0,0 +1,6 @@
1
+ // From https://vocalstack.com/branding/ (logo-*.svg, mark-*.svg). Regenerate rather than edit.
2
+ export const LOGO_LIGHT = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1051.6906 155.30641"><g transform="matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)"><path style="fill:#245B8F;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#245B8F;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g><path style="fill:#ec634d" d="m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z"/></svg>';
3
+ export const LOGO_DARK = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1051.6906 155.30641"><g transform="matrix(0.88734771,0,0,0.89118682,-42.71663,-123.85388)"><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g><path style="fill:#ffffff" d="m 222.25132,68.479897 q -12.79998,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.18666,0 11.73331,-2.13333 5.54666,-2.34667 10.02665,-6.82666 8.95999,-8.95999 8.95999,-21.546632 0,-12.799979 -8.95999,-21.759965 -9.38665,-8.959986 -21.75996,-8.959986 z m 0,-25.599959 q 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 7.67999,7.679987 11.94665,17.919971 4.47999,10.239984 4.47999,21.973298 0,11.519982 -4.47999,21.759962 -4.26666,10.23999 -11.94665,17.91997 -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 z M 383.3179,138.87978 q -7.67999,7.67999 -17.91997,12.15999 -10.23999,4.26666 -21.9733,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23998,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67999,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.9733,4.479993 10.23998,4.26666 17.91997,11.946648 l -18.13331,18.133304 q -8.95998,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.48,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 498.09114,45.653267 V 152.5331 H 472.49118 V 99.199848 q 0,-12.799979 -8.95998,-21.759965 -8.95999,-8.959986 -21.75997,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54665,2.346663 -9.81331,6.613323 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.26666,4.47999 9.81331,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73331,0 -21.75996,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05333,-10.23998 -4.05333,-21.759962 0,-11.733314 4.05333,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75996,-4.479993 10.45332,0 18.55997,3.199995 8.10666,3.199995 14.29331,8.106654 v -8.53332 z M 538.62446,152.5331 H 513.0245 V 3.2000015 h 25.59996 V 152.5331 Z m 120.10659,-42.6666 q 0,10.45331 -3.41333,18.98663 -3.41332,8.31999 -9.81331,14.29331 -6.18666,5.76 -15.14665,8.95999 -8.95998,3.2 -20.0533,3.2 -17.70664,0 -31.57328,-5.54666 -13.86664,-5.75999 -22.82663,-13.01332 l 17.70664,-17.70663 q 7.03999,6.39999 15.78664,9.81331 5.33332,2.13333 10.02665,2.77333 4.69333,0.64 7.67999,0.64 5.54666,0 10.02665,-1.28 4.69332,-1.49333 8.10665,-3.83999 7.25332,-5.33332 7.25332,-14.07998 0,-5.33332 -3.83999,-9.59998 -2.98666,-3.41333 -7.67999,-5.54666 -3.83999,-2.13333 -8.10665,-3.413328 -4.26666,-1.279998 -7.67999,-2.346663 -1.06666,-0.426666 -1.92,-0.426666 -0.85333,-0.213333 -1.49333,-0.639999 -0.42666,0 -1.27999,-0.426666 -4.48,-1.279997 -13.01332,-4.479992 -8.31998,-3.199995 -16.63997,-8.746653 -19.4133,-13.013313 -19.4133,-31.999949 0,-12.586647 4.26666,-21.119966 4.47999,-8.746653 11.51998,-14.079978 7.03999,-5.5466575 15.57331,-7.8933204 Q 591.53116,6.6375733e-6 599.85115,6.6375733e-6 q 15.35997,0 25.81329,3.6266608624267 10.45332,3.6266609 16.63997,7.2533215 3.2,1.919997 5.33333,3.839994 2.34666,1.706664 4.05332,3.199995 l -18.1333,18.346637 q -5.75999,-5.75999 -11.73332,-8.746652 -8.95998,-4.26666 -18.7733,-4.26666 -4.26666,0 -8.53332,1.066665 -4.26666,1.066665 -7.46665,2.773329 -9.38665,5.75999 -9.38665,15.146642 0,5.759991 3.83999,9.813318 2.77333,3.199995 7.67999,5.759991 4.05332,2.13333 8.53332,3.413328 4.47999,1.279997 8.31998,2.346662 l 2.56,0.639999 q 1.06666,0.426666 4.05333,1.279998 2.98666,0.853332 7.03998,2.559996 4.05333,1.706664 8.74666,4.053327 4.90666,2.346663 9.59998,5.546658 20.6933,13.653311 20.6933,32.213284 z m 69.11977,42.6666 h -23.46663 q -7.25332,0 -13.65331,-2.77333 -6.39999,-2.77333 -11.09332,-7.46666 -4.69332,-4.90666 -7.46665,-11.30665 -2.77333,-6.39999 -2.77333,-13.65331 V 24.319968 l 25.59996,-6.39999 V 58.66658 h 14.93331 l 6.39999,25.599959 h -21.3333 v 33.066611 q 0,4.05333 2.77333,6.82666 2.77333,2.77333 6.61332,2.77333 h 17.06664 z m 111.36,-106.879833 V 152.5331 H 813.61086 V 99.199848 q 0,-12.799979 -8.95999,-21.759965 -8.95998,-8.959986 -21.75996,-8.959986 -6.18666,0 -11.94665,2.346663 -5.54666,2.346663 -9.81332,6.613323 -8.95998,8.959986 -8.95998,21.759965 0,12.586642 8.95998,21.546632 4.26666,4.47999 9.81332,6.82666 5.75999,2.13333 11.94665,2.13333 6.39999,0 11.51998,-2.13333 l 9.17332,22.82663 q -9.81332,4.90666 -22.82663,4.90666 -11.73332,0 -21.75997,-4.26666 -9.81332,-4.48 -17.06664,-12.15999 -7.25332,-7.67998 -11.30665,-17.91997 -4.05332,-10.23998 -4.05332,-21.759962 0,-11.733314 4.05332,-21.973298 4.05333,-10.239984 11.30665,-17.919971 7.25332,-7.679988 17.06664,-11.946648 10.02665,-4.479993 21.75997,-4.479993 10.45331,0 18.55997,3.199995 8.10665,3.199995 14.29331,8.106654 v -8.53332 z m 107.94652,93.226513 q -7.67998,7.67999 -17.91997,12.15999 -10.23998,4.26666 -21.97329,4.26666 -11.73332,0 -21.9733,-4.26666 -10.23999,-4.48 -17.91997,-12.15999 -7.67999,-7.67998 -12.15998,-17.91997 -4.26666,-10.23998 -4.26666,-21.759962 0,-11.733314 4.26666,-21.973298 4.47999,-10.239984 12.15998,-17.919971 7.67998,-7.679988 17.91997,-11.946648 10.23998,-4.479993 21.9733,-4.479993 11.73331,0 21.97329,4.479993 10.23999,4.26666 17.91997,11.946648 l -18.1333,18.133304 q -8.95999,-8.959986 -21.75996,-8.959986 -12.37332,0 -21.75997,8.959986 -8.95999,8.959986 -8.95999,21.759965 0,12.586642 8.95999,21.546632 4.47999,4.47999 10.02665,6.82666 5.54666,2.13333 11.73332,2.13333 13.01331,0 21.75996,-8.95999 z M 1051.6907,45.8666 998.3574,99.199848 1051.6907,152.5331 h -36.0533 L 980.2241,117.11982 V 152.5331 H 954.62414 V 3.2000015 H 980.2241 V 81.066544 L 1015.424,45.8666 h 36.2667 z"/></svg>';
4
+ export const MARK_LIGHT = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.955482 39.84531"><g transform="translate(-80.9625,-128.5875)"><g transform="matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)"><path style="fill:#245b8f;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#245b8f;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#ec634d" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#ec634d" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g></g></svg>';
5
+ export const MARK_DARK = '<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.955482 39.84531"><g transform="translate(-80.9625,-128.5875)"><g transform="matrix(0.23477741,0,0,0.23579318,69.660392,94.668838)"><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 165.74369,312.34514 c -3.65904,-0.95861 -6.89131,-3.35348 -9.21494,-6.82759 -1.91226,-2.85908 -2.39705,-4.56971 -2.39705,-8.45836 0,-3.99254 0.0824,-4.2757 4.23012,-14.54553 4.00923,-9.92681 11.74597,-29.60804 14.17254,-36.05302 1.0555,-2.80344 4.63579,-12.0902 7.95619,-20.63725 3.3204,-8.54706 9.47265,-24.4912 13.67168,-35.43143 9.41163,-24.52125 12.15124,-31.39614 14.19222,-35.61455 1.33229,-2.75364 1.87867,-3.59258 3.34546,-5.13672 1.96822,-2.07203 4.0984,-3.56253 6.46687,-4.52493 1.27138,-0.5166 2.25763,-0.69302 4.82679,-0.8634 5.2183,-0.34607 24.57462,-0.55458 24.98508,-0.26914 0.43797,0.30456 1.13131,-1.50021 -15.15412,39.44678 -20.68842,52.01757 -28.96185,72.98265 -36.75181,93.13004 -8.40356,21.73434 -9.39495,24.20764 -10.76316,26.85165 -2.3545,4.55 -6.3824,7.78331 -11.27661,9.05207 -2.07259,0.53729 -6.00015,0.48109 -8.28926,-0.11862 z"/><path style="fill:#55abe5;fill-opacity:1;stroke-width:0.372962" d="m 122.4922,312.58916 c -4.07956,-0.73258 -8.65123,-3.9341 -11.23258,-7.86616 -0.73004,-1.11203 -1.85459,-3.48326 -2.84309,-5.99496 -0.89943,-2.2854 -4.76287,-12.1553 -8.585409,-21.93313 -3.82254,-9.77783 -8.479072,-21.63803 -10.347852,-26.35601 -1.86878,-4.71797 -7.404968,-18.81595 -12.302646,-31.32884 -4.897681,-12.51288 -10.861923,-27.72975 -13.253876,-33.81525 -2.391953,-6.0855 -5.665216,-14.47715 -7.273918,-18.64811 -1.608698,-4.17097 -4.23595,-10.84826 -5.838334,-14.83843 -2.072779,-5.16153 -2.836509,-7.33177 -2.646869,-7.5214 0.347903,-0.34791 20.828887,-0.35917 24.732874,-0.0136 4.649256,0.41154 7.012848,1.52811 10.517546,4.96852 1.450819,1.42421 2.398,2.60213 2.904375,3.6119 1.798693,3.58678 8.418103,20.02869 18.666279,46.36506 3.69839,9.50432 11.16067,28.41351 16.58285,42.02042 14.63433,36.72467 18.74753,47.13765 19.53975,49.46687 2.22981,6.55589 1.05533,12.70214 -3.30426,17.29176 -3.10359,3.26736 -6.22043,4.60845 -11.02178,4.7424 -1.64331,0.0458 -3.57518,-0.0221 -4.29306,-0.15103 z"/><rect style="fill:#f78472" width="11.26954" height="42.097622" x="164.88014" y="176.25909" ry="5.610496"/><rect style="fill:#f78472" width="11.62156" height="87.038605" x="142.15868" y="153.7886" ry="5.610496"/><rect style="fill:#f78472" width="11.26954" height="42.097622" x="119.78924" y="176.25909" ry="5.610496"/></g></g></svg>';
6
+ export const BRAND = { blue: '#245B8F', coral: '#EC634D', lightBlue: '#55ABE5', lightCoral: '#F78472', night: '#131326' };
@@ -0,0 +1,11 @@
1
+ import type { ConnectionResponse } from '../types.js';
2
+ export declare function useAPI(): <T>(path: string, init?: RequestInit) => Promise<T>;
3
+ /** The VocalStack connection, and the one-click flow that opens the dashboard in a new tab. */
4
+ export declare function useConnection(): {
5
+ call: <T>(path: string, init?: RequestInit) => Promise<T>;
6
+ connect: () => Promise<void>;
7
+ connecting: boolean;
8
+ connection: ConnectionResponse | undefined;
9
+ refresh: () => Promise<void>;
10
+ setConnection: import("react").Dispatch<import("react").SetStateAction<ConnectionResponse | undefined>>;
11
+ };
@@ -0,0 +1,59 @@
1
+ 'use client';
2
+ import { useConfig } from '@payloadcms/ui';
3
+ import { useCallback, useEffect, useState } from 'react';
4
+ export function useAPI() {
5
+ const { config: { routes: { api }, serverURL, }, } = useConfig();
6
+ const base = `${serverURL}${api}`;
7
+ return useCallback(async (path, init = {}) => {
8
+ const res = await fetch(`${base}${path}`, {
9
+ credentials: 'include',
10
+ ...init,
11
+ headers: { 'content-type': 'application/json', ...init.headers },
12
+ });
13
+ const body = await res.json().catch(() => ({}));
14
+ if (!res.ok)
15
+ throw Object.assign(new Error(body.error ?? `Request failed (${res.status})`), { code: body.code });
16
+ return body;
17
+ }, [base]);
18
+ }
19
+ /** The VocalStack connection, and the one-click flow that opens the dashboard in a new tab. */
20
+ export function useConnection() {
21
+ const call = useAPI();
22
+ const [connection, setConnection] = useState();
23
+ const [connecting, setConnecting] = useState(false);
24
+ const refresh = useCallback(() => call('/vocalstack/connection').then(setConnection, () => setConnection({ connected: false })), [call]);
25
+ useEffect(() => {
26
+ void refresh();
27
+ // The callback tab announces itself on this channel when it is done.
28
+ let channel;
29
+ try {
30
+ channel = new BroadcastChannel('vocalstack');
31
+ channel.onmessage = (e) => {
32
+ if (e.data?.type === 'connect') {
33
+ setConnecting(false);
34
+ void refresh();
35
+ }
36
+ };
37
+ }
38
+ catch { }
39
+ return () => channel?.close();
40
+ }, [refresh]);
41
+ const connect = useCallback(async () => {
42
+ // Open the tab inside the click, before any await, or the popup blocker eats it.
43
+ const tab = window.open('about:blank', '_blank');
44
+ setConnecting(true);
45
+ try {
46
+ const { url } = await call('/vocalstack/connect', { method: 'POST' });
47
+ if (tab)
48
+ tab.location.href = url;
49
+ else
50
+ window.location.href = url;
51
+ }
52
+ catch (err) {
53
+ tab?.close();
54
+ setConnecting(false);
55
+ throw err;
56
+ }
57
+ }, [call]);
58
+ return { call, connect, connecting, connection, refresh, setConnection };
59
+ }
@@ -0,0 +1,14 @@
1
+ import type { Endpoint } from 'payload';
2
+ import type { VocalStackPluginOptions } from '../types.js';
3
+ /**
4
+ * One-click connect, as OAuth 2.0 authorization code + PKCE (RFC 7636) whose
5
+ * token is a VocalStack API key:
6
+ *
7
+ * 1. POST /api/vocalstack/connect → state + verifier stored here; the admin opens
8
+ * {dashboard}/connect?response_type=code&redirect_uri=…&state=…&code_challenge=…
9
+ * 2. The person clicks Authenticate on the dashboard, which redirects to
10
+ * /api/vocalstack/callback?code=…&state=…
11
+ * 3. The callback redeems the code server-to-server at {api}/v1/connect/token with
12
+ * the verifier and stores the key it answers. The key never passes through a browser.
13
+ */
14
+ export declare function connectionEndpoints(options: VocalStackPluginOptions): Endpoint[];
@@ -0,0 +1,132 @@
1
+ import { createHash, randomBytes, timingSafeEqual } from 'node:crypto';
2
+ import { accountLabel, DEFAULT_API_URL, DEFAULT_DASHBOARD_URL, VocalStackAPI, VocalStackAPIError } from '../api.js';
3
+ import { readSettings, writeSettings } from '../settings.js';
4
+ const json = (body, status = 200) => Response.json(body, { status });
5
+ const base64url = (b) => b.toString('base64url');
6
+ const CONNECT_TTL_MS = 10 * 60 * 1000;
7
+ /**
8
+ * One-click connect, as OAuth 2.0 authorization code + PKCE (RFC 7636) whose
9
+ * token is a VocalStack API key:
10
+ *
11
+ * 1. POST /api/vocalstack/connect → state + verifier stored here; the admin opens
12
+ * {dashboard}/connect?response_type=code&redirect_uri=…&state=…&code_challenge=…
13
+ * 2. The person clicks Authenticate on the dashboard, which redirects to
14
+ * /api/vocalstack/callback?code=…&state=…
15
+ * 3. The callback redeems the code server-to-server at {api}/v1/connect/token with
16
+ * the verifier and stores the key it answers. The key never passes through a browser.
17
+ */
18
+ export function connectionEndpoints(options) {
19
+ const apiURL = options.apiURL ?? DEFAULT_API_URL;
20
+ const dashboardURL = options.dashboardURL ?? DEFAULT_DASHBOARD_URL;
21
+ const canManage = async (req) => Boolean(req.user) && (options.access ? await options.access({ req }) : true);
22
+ const callbackURL = (req) => `${req.payload.config.serverURL || req.origin}${req.payload.config.routes.api}/vocalstack/callback`;
23
+ return [
24
+ {
25
+ method: 'get',
26
+ path: '/vocalstack/connection',
27
+ handler: async (req) => {
28
+ if (!req.user)
29
+ return json({ error: 'Sign in first.' }, 401);
30
+ if (options.apiKey)
31
+ return json({ connected: true, source: 'options' });
32
+ const settings = await readSettings(req);
33
+ return json({ account: settings.account ?? undefined, connected: Boolean(settings.apiKey), source: settings.apiKey ? 'admin' : undefined });
34
+ },
35
+ },
36
+ {
37
+ // Paste a key (the fallback, and the way to connect until the dashboard ships /connect).
38
+ method: 'post',
39
+ path: '/vocalstack/key',
40
+ handler: async (req) => {
41
+ if (!(await canManage(req)))
42
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
43
+ const body = (await req.json?.().catch(() => ({})));
44
+ const apiKey = body.apiKey?.trim();
45
+ if (!apiKey?.startsWith('vs_key_'))
46
+ return json({ error: 'A VocalStack API key starts with vs_key_.' }, 400);
47
+ try {
48
+ const account = accountLabel(await new VocalStackAPI(apiKey, apiURL).me()) ?? null;
49
+ await writeSettings(req, { account, apiKey });
50
+ return json({ account: account ?? undefined, connected: true, source: 'admin' });
51
+ }
52
+ catch (err) {
53
+ const message = err instanceof VocalStackAPIError && err.status === 401 ? 'VocalStack refused that key.' : String(err.message);
54
+ return json({ error: message }, 400);
55
+ }
56
+ },
57
+ },
58
+ {
59
+ method: 'delete',
60
+ path: '/vocalstack/key',
61
+ handler: async (req) => {
62
+ if (!(await canManage(req)))
63
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
64
+ await writeSettings(req, { account: null, apiKey: null });
65
+ return json({ connected: Boolean(options.apiKey), source: options.apiKey ? 'options' : undefined });
66
+ },
67
+ },
68
+ {
69
+ method: 'post',
70
+ path: '/vocalstack/connect',
71
+ handler: async (req) => {
72
+ if (!(await canManage(req)))
73
+ return json({ error: 'You may not change the VocalStack connection.' }, 403);
74
+ const state = base64url(randomBytes(24));
75
+ const verifier = base64url(randomBytes(48));
76
+ const challenge = base64url(createHash('sha256').update(verifier).digest());
77
+ await writeSettings(req, { connectExpiresAt: new Date(Date.now() + CONNECT_TTL_MS).toISOString(), connectState: state, connectVerifier: verifier });
78
+ const site = new URL(req.payload.config.serverURL || req.origin);
79
+ const url = new URL('/connect', dashboardURL);
80
+ url.search = new URLSearchParams({
81
+ client_name: `${site.host} (Payload CMS)`,
82
+ code_challenge: challenge,
83
+ code_challenge_method: 'S256',
84
+ redirect_uri: callbackURL(req),
85
+ response_type: 'code',
86
+ scope: 'read write',
87
+ state,
88
+ }).toString();
89
+ return json({ url: url.toString() });
90
+ },
91
+ },
92
+ {
93
+ method: 'get',
94
+ path: '/vocalstack/callback',
95
+ handler: async (req) => {
96
+ const params = req.searchParams;
97
+ const settings = await readSettings(req);
98
+ const expected = settings.connectState ?? '';
99
+ const state = params.get('state') ?? '';
100
+ const fresh = settings.connectExpiresAt && new Date(settings.connectExpiresAt).getTime() > Date.now();
101
+ const matches = expected.length > 0 && state.length === expected.length && timingSafeEqual(Buffer.from(state), Buffer.from(expected));
102
+ if (!req.user)
103
+ return page('Sign in to the admin panel in this browser, then connect again.', false);
104
+ if (!matches || !fresh || !settings.connectVerifier)
105
+ return page('This connect link has expired. Start again from the admin panel.', false);
106
+ await writeSettings(req, { connectExpiresAt: null, connectState: null, connectVerifier: null });
107
+ if (params.get('error'))
108
+ return page(params.get('error') === 'access_denied' ? 'Connection cancelled.' : `VocalStack said: ${params.get('error_description') ?? params.get('error')}`, false);
109
+ const res = await fetch(`${apiURL}/v1/connect/token`, {
110
+ body: new URLSearchParams({ code: params.get('code') ?? '', code_verifier: settings.connectVerifier, grant_type: 'authorization_code', redirect_uri: callbackURL(req) }),
111
+ headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' },
112
+ method: 'POST',
113
+ });
114
+ const token = (await res.json().catch(() => ({})));
115
+ if (!res.ok || !token.access_token)
116
+ return page(`VocalStack did not issue a key: ${token.error_description ?? res.status}`, false);
117
+ const account = token.account?.name ?? accountLabel(await new VocalStackAPI(token.access_token, apiURL).me().catch(() => ({}))) ?? null;
118
+ await writeSettings(req, { account, apiKey: token.access_token });
119
+ return page(account ? `Connected to VocalStack as ${account}.` : 'Connected to VocalStack.', true);
120
+ },
121
+ },
122
+ ];
123
+ }
124
+ const escapeHTML = (s) => s.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
125
+ /** The tab the dashboard sends back to: tell the admin tab, then close. */
126
+ function page(message, ok) {
127
+ const html = `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>VocalStack</title>
128
+ <style>body{font:16px system-ui,sans-serif;display:grid;place-items:center;min-height:100vh;margin:0;background:#fafafa;color:#131326}@media(prefers-color-scheme:dark){body{background:#131326;color:#eee}}main{text-align:center;padding:0 16px}main img{height:28px;width:auto}p{max-width:28rem;margin:24px auto 0}</style></head>
129
+ <body><main><picture><source media="(prefers-color-scheme: dark)" srcset="https://vocalstack.com/assets/logo-dark.svg"><img alt="VocalStack" height="28" src="https://vocalstack.com/assets/logo-light.svg"></picture><p>${escapeHTML(message)}${ok ? '<br><br>You can close this tab.' : ''}</p></main>
130
+ <script>try{new BroadcastChannel('vocalstack').postMessage(${JSON.stringify({ ok, type: 'connect' })})}catch(e){}${ok ? 'setTimeout(function(){window.close()},1200)' : ''}</script></body></html>`;
131
+ return new Response(html, { headers: { 'content-type': 'text/html; charset=utf-8' }, status: ok ? 200 : 400 });
132
+ }
@@ -0,0 +1,14 @@
1
+ import type { CollectionSlug, Endpoint } from 'payload';
2
+ import type { AudioFieldConfig, VocalStackPluginOptions } from '../types.js';
3
+ /**
4
+ * GET /:id/vocalstack/stream: the job live, as Server-Sent Events. The server holds
5
+ * the VocalStack subscribe socket (the API key never reaches the browser) and sends
6
+ * progress { progress, phase, audio } as it changes
7
+ * snapshot { sentences } everything so far, once caught up
8
+ * sentence { sentence } | { id, removed } a settled sentence, new or rewritten
9
+ * draft { words } words heard after the last settled sentence
10
+ * done | failed | stopped (StatusResponse) once, saved on the document; then it closes
11
+ * Sentences carry their words as [start, end, text]. A dropped stream is resumed by
12
+ * EventSource: it reconnects and gets a fresh snapshot.
13
+ */
14
+ export declare function streamEndpoint(collection: CollectionSlug, options: VocalStackPluginOptions, rowFields: AudioFieldConfig[]): Endpoint;