speechflow 1.6.0 → 1.6.2
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/etc/claude.md +9 -4
- package/etc/keyfiles.txt +19 -0
- package/etc/speechflow.yaml +4 -4
- package/package.json +3 -3
- package/speechflow-cli/dst/speechflow-main-api.d.ts +12 -0
- package/speechflow-cli/dst/speechflow-main-api.js +319 -0
- package/speechflow-cli/dst/speechflow-main-api.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main-cli.d.ts +28 -0
- package/speechflow-cli/dst/speechflow-main-cli.js +271 -0
- package/speechflow-cli/dst/speechflow-main-cli.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main-config.d.ts +9 -0
- package/speechflow-cli/dst/speechflow-main-config.js +27 -0
- package/speechflow-cli/dst/speechflow-main-config.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main-graph.d.ts +34 -0
- package/speechflow-cli/dst/speechflow-main-graph.js +365 -0
- package/speechflow-cli/dst/speechflow-main-graph.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main-nodes.d.ts +10 -0
- package/speechflow-cli/dst/speechflow-main-nodes.js +60 -0
- package/speechflow-cli/dst/speechflow-main-nodes.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main-status.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-main-status.js +60 -0
- package/speechflow-cli/dst/speechflow-main-status.js.map +1 -0
- package/speechflow-cli/dst/speechflow-main.d.ts +7 -0
- package/speechflow-cli/dst/speechflow-main.js +127 -0
- package/speechflow-cli/dst/speechflow-main.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-compressor-wt.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2a-compressor-wt.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-compressor.js +5 -6
- package/speechflow-cli/dst/speechflow-node-a2a-compressor.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-expander-wt.js +5 -5
- package/speechflow-cli/dst/speechflow-node-a2a-expander-wt.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-expander.js +5 -6
- package/speechflow-cli/dst/speechflow-node-a2a-expander.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-ffmpeg.js +5 -5
- package/speechflow-cli/dst/speechflow-node-a2a-ffmpeg.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-filler.js +3 -3
- package/speechflow-cli/dst/speechflow-node-a2a-filler.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-gain.js +2 -2
- package/speechflow-cli/dst/speechflow-node-a2a-gain.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-gender.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2a-gender.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-meter.js +2 -2
- package/speechflow-cli/dst/speechflow-node-a2a-meter.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-rnnoise.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2a-rnnoise.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-speex.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2a-speex.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2a-vad.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2a-vad.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2t-amazon.js +6 -6
- package/speechflow-cli/dst/speechflow-node-a2t-amazon.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2t-deepgram.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2t-deepgram.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-a2t-openai.js +4 -4
- package/speechflow-cli/dst/speechflow-node-a2t-openai.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2a-amazon.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2a-amazon.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2a-kokoro.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2a-kokoro.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-amazon.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-amazon.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-deepl.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-deepl.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-google.js +5 -5
- package/speechflow-cli/dst/speechflow-node-t2t-google.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-modify.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-modify.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-ollama.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-ollama.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-openai.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-openai.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-sentence.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-sentence.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-subtitle.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-subtitle.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-t2t-transformers.js +2 -2
- package/speechflow-cli/dst/speechflow-node-t2t-transformers.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-x2x-filter.js +2 -2
- package/speechflow-cli/dst/speechflow-node-x2x-filter.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-xio-device.js +5 -5
- package/speechflow-cli/dst/speechflow-node-xio-device.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-xio-file.js +27 -27
- package/speechflow-cli/dst/speechflow-node-xio-file.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-xio-mqtt.js +4 -4
- package/speechflow-cli/dst/speechflow-node-xio-mqtt.js.map +1 -1
- package/speechflow-cli/dst/speechflow-node-xio-websocket.js +7 -7
- package/speechflow-cli/dst/speechflow-node-xio-websocket.js.map +1 -1
- package/speechflow-cli/dst/{speechflow-utils-audio-wt.js → speechflow-util-audio-wt.js} +1 -1
- package/speechflow-cli/dst/speechflow-util-audio-wt.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util-audio.d.ts +22 -0
- package/speechflow-cli/dst/speechflow-util-audio.js +251 -0
- package/speechflow-cli/dst/speechflow-util-audio.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util-error.d.ts +14 -0
- package/speechflow-cli/dst/speechflow-util-error.js +131 -0
- package/speechflow-cli/dst/speechflow-util-error.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util-queue.d.ts +68 -0
- package/speechflow-cli/dst/speechflow-util-queue.js +338 -0
- package/speechflow-cli/dst/speechflow-util-queue.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util-stream.d.ts +18 -0
- package/speechflow-cli/dst/speechflow-util-stream.js +219 -0
- package/speechflow-cli/dst/speechflow-util-stream.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util-webaudio-wt.js +124 -0
- package/speechflow-cli/dst/speechflow-util-webaudio-wt.js.map +1 -0
- package/speechflow-cli/dst/{speechflow-utils-audio.js → speechflow-util-webaudio.js} +2 -2
- package/speechflow-cli/dst/speechflow-util-webaudio.js.map +1 -0
- package/speechflow-cli/dst/speechflow-util.d.ts +4 -0
- package/speechflow-cli/dst/speechflow-util.js +26 -0
- package/speechflow-cli/dst/speechflow-util.js.map +1 -0
- package/speechflow-cli/dst/speechflow.js +3 -912
- package/speechflow-cli/dst/speechflow.js.map +1 -1
- package/speechflow-cli/etc/oxlint.jsonc +4 -1
- package/speechflow-cli/package.json +1 -0
- package/speechflow-cli/src/lib.d.ts +2 -0
- package/speechflow-cli/src/speechflow-main-api.ts +315 -0
- package/speechflow-cli/src/speechflow-main-cli.ts +259 -0
- package/speechflow-cli/src/speechflow-main-config.ts +17 -0
- package/speechflow-cli/src/speechflow-main-graph.ts +370 -0
- package/speechflow-cli/src/speechflow-main-nodes.ts +61 -0
- package/speechflow-cli/src/speechflow-main-status.ts +70 -0
- package/speechflow-cli/src/speechflow-main.ts +106 -0
- package/speechflow-cli/src/speechflow-node-a2a-compressor-wt.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2a-compressor.ts +5 -6
- package/speechflow-cli/src/speechflow-node-a2a-expander-wt.ts +5 -5
- package/speechflow-cli/src/speechflow-node-a2a-expander.ts +5 -6
- package/speechflow-cli/src/speechflow-node-a2a-ffmpeg.ts +5 -5
- package/speechflow-cli/src/speechflow-node-a2a-filler.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2a-gain.ts +2 -2
- package/speechflow-cli/src/speechflow-node-a2a-gender.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2a-meter.ts +2 -2
- package/speechflow-cli/src/speechflow-node-a2a-rnnoise.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2a-speex.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2a-vad.ts +4 -4
- package/speechflow-cli/src/speechflow-node-a2t-amazon.ts +7 -7
- package/speechflow-cli/src/speechflow-node-a2t-deepgram.ts +5 -5
- package/speechflow-cli/src/speechflow-node-a2t-openai.ts +5 -5
- package/speechflow-cli/src/speechflow-node-t2a-amazon.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2a-kokoro.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-amazon.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-deepl.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-google.ts +5 -5
- package/speechflow-cli/src/speechflow-node-t2t-modify.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-ollama.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-openai.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-sentence.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-subtitle.ts +2 -2
- package/speechflow-cli/src/speechflow-node-t2t-transformers.ts +2 -2
- package/speechflow-cli/src/speechflow-node-x2x-filter.ts +2 -2
- package/speechflow-cli/src/speechflow-node-xio-device.ts +5 -5
- package/speechflow-cli/src/speechflow-node-xio-file.ts +9 -10
- package/speechflow-cli/src/speechflow-node-xio-mqtt.ts +5 -5
- package/speechflow-cli/src/speechflow-node-xio-websocket.ts +7 -7
- package/speechflow-cli/src/{speechflow-utils-audio.ts → speechflow-util-audio.ts} +131 -1
- package/speechflow-cli/src/speechflow-util-error.ts +184 -0
- package/speechflow-cli/src/speechflow-util-queue.ts +320 -0
- package/speechflow-cli/src/speechflow-util-stream.ts +197 -0
- package/speechflow-cli/src/speechflow-util.ts +10 -0
- package/speechflow-cli/src/speechflow.ts +3 -953
- package/speechflow-ui-db/dst/index.js +1 -1
- package/speechflow-ui-db/etc/vite-client.mts +0 -2
- package/speechflow-ui-db/src/app.vue +20 -19
- package/speechflow-ui-st/dst/index.js +1 -1
- package/speechflow-ui-st/etc/vite-client.mts +0 -2
- package/speechflow-ui-st/src/app.vue +10 -6
- package/speechflow-cli/dst/speechflow-node-a2a-dynamics-wt.js +0 -208
- package/speechflow-cli/dst/speechflow-node-a2a-dynamics-wt.js.map +0 -1
- package/speechflow-cli/dst/speechflow-node-a2a-dynamics.d.ts +0 -15
- package/speechflow-cli/dst/speechflow-node-a2a-dynamics.js +0 -312
- package/speechflow-cli/dst/speechflow-node-a2a-dynamics.js.map +0 -1
- package/speechflow-cli/dst/speechflow-node-a2t-awstranscribe.d.ts +0 -18
- package/speechflow-cli/dst/speechflow-node-a2t-awstranscribe.js +0 -312
- package/speechflow-cli/dst/speechflow-node-a2t-awstranscribe.js.map +0 -1
- package/speechflow-cli/dst/speechflow-node-a2t-openaitranscribe.d.ts +0 -19
- package/speechflow-cli/dst/speechflow-node-a2t-openaitranscribe.js +0 -351
- package/speechflow-cli/dst/speechflow-node-a2t-openaitranscribe.js.map +0 -1
- package/speechflow-cli/dst/speechflow-node-t2a-awspolly.d.ts +0 -16
- package/speechflow-cli/dst/speechflow-node-t2a-awspolly.js +0 -204
- package/speechflow-cli/dst/speechflow-node-t2a-awspolly.js.map +0 -1
- package/speechflow-cli/dst/speechflow-node-t2t-awstranslate.d.ts +0 -13
- package/speechflow-cli/dst/speechflow-node-t2t-awstranslate.js +0 -175
- package/speechflow-cli/dst/speechflow-node-t2t-awstranslate.js.map +0 -1
- package/speechflow-cli/dst/speechflow-utils-audio-wt.js.map +0 -1
- package/speechflow-cli/dst/speechflow-utils-audio.js.map +0 -1
- package/speechflow-cli/dst/speechflow-utils.d.ts +0 -108
- package/speechflow-cli/dst/speechflow-utils.js +0 -746
- package/speechflow-cli/dst/speechflow-utils.js.map +0 -1
- package/speechflow-cli/src/speechflow-utils.ts +0 -810
- /package/speechflow-cli/dst/{speechflow-node-a2a-dynamics-wt.d.ts → speechflow-util-audio-wt.d.ts} +0 -0
- /package/speechflow-cli/dst/{speechflow-utils-audio-wt.d.ts → speechflow-util-webaudio-wt.d.ts} +0 -0
- /package/speechflow-cli/dst/{speechflow-utils-audio.d.ts → speechflow-util-webaudio.d.ts} +0 -0
- /package/speechflow-cli/src/{speechflow-utils-audio-wt.ts → speechflow-util-audio-wt.ts} +0 -0
|
@@ -612,4 +612,4 @@ and limitations under the License.
|
|
|
612
612
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(l){return l instanceof this?l:new this(l)}static concat(l,...e){const s=new this(l);return e.forEach(t=>s.set(t)),s}static accessor(l){const s=(this[$7]=this[$7]={accessors:{}}).accessors,t=this.prototype;function r(n){const o=U3(n);s[o]||(Zo(t,n),s[o]=!0)}return E.isArray(l)?l.forEach(r):r(l),this}};h2.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);E.reduceDescriptors(h2.prototype,({value:c},l)=>{let e=l[0].toUpperCase()+l.slice(1);return{get:()=>c,set(s){this[e]=s}}});E.freezeMethods(h2);function a5(c,l){const e=this||M0,s=l||e,t=h2.from(s.headers);let r=s.data;return E.forEach(c,function(o){r=o.call(e,r,t.normalize(),l?l.status:void 0)}),t.normalize(),r}function yl(c){return!!(c&&c.__CANCEL__)}function E3(c,l,e){L1.call(this,c??"canceled",L1.ERR_CANCELED,l,e),this.name="CanceledError"}E.inherits(E3,L1,{__CANCEL__:!0});function wl(c,l,e){const s=e.config.validateStatus;!e.status||!s||s(e.status)?c(e):l(new L1("Request failed with status code "+e.status,[L1.ERR_BAD_REQUEST,L1.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Xo(c){const l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(c);return l&&l[1]||""}function Qo(c,l){c=c||10;const e=new Array(c),s=new Array(c);let t=0,r=0,n;return l=l!==void 0?l:1e3,function(u){const M=Date.now(),z=s[r];n||(n=M),e[t]=u,s[t]=M;let C=r,O=0;for(;C!==t;)O+=e[C++],C=C%c;if(t=(t+1)%c,t===r&&(r=(r+1)%c),M-n<l)return;const T=z&&M-z;return T?Math.round(O*1e3/T):void 0}}function cf(c,l){let e=0,s=1e3/l,t,r;const n=(M,z=Date.now())=>{e=z,t=null,r&&(clearTimeout(r),r=null),c(...M)};return[(...M)=>{const z=Date.now(),C=z-e;C>=s?n(M,z):(t=M,r||(r=setTimeout(()=>{r=null,n(t)},s-C)))},()=>t&&n(t)]}const K0=(c,l,e=3)=>{let s=0;const t=Qo(50,250);return cf(r=>{const n=r.loaded,o=r.lengthComputable?r.total:void 0,u=n-s,M=t(u),z=n<=o;s=n;const C={loaded:n,total:o,progress:o?n/o:void 0,bytes:u,rate:M||void 0,estimated:M&&o&&z?(o-n)/M:void 0,event:r,lengthComputable:o!=null,[l?"download":"upload"]:!0};c(C)},e)},V7=(c,l)=>{const e=c!=null;return[s=>l[0]({lengthComputable:e,total:c,loaded:s}),l[1]]},G7=c=>(...l)=>E.asap(()=>c(...l)),lf=s2.hasStandardBrowserEnv?((c,l)=>e=>(e=new URL(e,s2.origin),c.protocol===e.protocol&&c.host===e.host&&(l||c.port===e.port)))(new URL(s2.origin),s2.navigator&&/(msie|trident)/i.test(s2.navigator.userAgent)):()=>!0,ef=s2.hasStandardBrowserEnv?{write(c,l,e,s,t,r){const n=[c+"="+encodeURIComponent(l)];E.isNumber(e)&&n.push("expires="+new Date(e).toGMTString()),E.isString(s)&&n.push("path="+s),E.isString(t)&&n.push("domain="+t),r===!0&&n.push("secure"),document.cookie=n.join("; ")},read(c){const l=document.cookie.match(new RegExp("(^|;\\s*)("+c+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove(c){this.write(c,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sf(c){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function tf(c,l){return l?c.replace(/\/?\/$/,"")+"/"+l.replace(/^\/+/,""):c}function Sl(c,l,e){let s=!sf(l);return c&&(s||e==!1)?tf(c,l):l}const J7=c=>c instanceof h2?{...c}:c;function l3(c,l){l=l||{};const e={};function s(M,z,C,O){return E.isPlainObject(M)&&E.isPlainObject(z)?E.merge.call({caseless:O},M,z):E.isPlainObject(z)?E.merge({},z):E.isArray(z)?z.slice():z}function t(M,z,C,O){if(E.isUndefined(z)){if(!E.isUndefined(M))return s(void 0,M,C,O)}else return s(M,z,C,O)}function r(M,z){if(!E.isUndefined(z))return s(void 0,z)}function n(M,z){if(E.isUndefined(z)){if(!E.isUndefined(M))return s(void 0,M)}else return s(void 0,z)}function o(M,z,C){if(C in l)return s(M,z);if(C in c)return s(void 0,M)}const u={url:r,method:r,data:r,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:o,headers:(M,z,C)=>t(J7(M),J7(z),C,!0)};return E.forEach(Object.keys({...c,...l}),function(z){const C=u[z]||t,O=C(c[z],l[z],z);E.isUndefined(O)&&C!==o||(e[z]=O)}),e}const vl=c=>{const l=l3({},c);let{data:e,withXSRFToken:s,xsrfHeaderName:t,xsrfCookieName:r,headers:n,auth:o}=l;l.headers=n=h2.from(n),l.url=gl(Sl(l.baseURL,l.url,l.allowAbsoluteUrls),c.params,c.paramsSerializer),o&&n.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let u;if(E.isFormData(e)){if(s2.hasStandardBrowserEnv||s2.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if((u=n.getContentType())!==!1){const[M,...z]=u?u.split(";").map(C=>C.trim()).filter(Boolean):[];n.setContentType([M||"multipart/form-data",...z].join("; "))}}if(s2.hasStandardBrowserEnv&&(s&&E.isFunction(s)&&(s=s(l)),s||s!==!1&&lf(l.url))){const M=t&&r&&ef.read(r);M&&n.set(t,M)}return l},rf=typeof XMLHttpRequest<"u",nf=rf&&function(c){return new Promise(function(e,s){const t=vl(c);let r=t.data;const n=h2.from(t.headers).normalize();let{responseType:o,onUploadProgress:u,onDownloadProgress:M}=t,z,C,O,T,F;function B(){T&&T(),F&&F(),t.cancelToken&&t.cancelToken.unsubscribe(z),t.signal&&t.signal.removeEventListener("abort",z)}let J=new XMLHttpRequest;J.open(t.method.toUpperCase(),t.url,!0),J.timeout=t.timeout;function Y(){if(!J)return;const s1=h2.from("getAllResponseHeaders"in J&&J.getAllResponseHeaders()),f1={data:!o||o==="text"||o==="json"?J.responseText:J.response,status:J.status,statusText:J.statusText,headers:s1,config:c,request:J};wl(function(k1){e(k1),B()},function(k1){s(k1),B()},f1),J=null}"onloadend"in J?J.onloadend=Y:J.onreadystatechange=function(){!J||J.readyState!==4||J.status===0&&!(J.responseURL&&J.responseURL.indexOf("file:")===0)||setTimeout(Y)},J.onabort=function(){J&&(s(new L1("Request aborted",L1.ECONNABORTED,c,J)),J=null)},J.onerror=function(){s(new L1("Network Error",L1.ERR_NETWORK,c,J)),J=null},J.ontimeout=function(){let $=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const f1=t.transitional||bl;t.timeoutErrorMessage&&($=t.timeoutErrorMessage),s(new L1($,f1.clarifyTimeoutError?L1.ETIMEDOUT:L1.ECONNABORTED,c,J)),J=null},r===void 0&&n.setContentType(null),"setRequestHeader"in J&&E.forEach(n.toJSON(),function($,f1){J.setRequestHeader(f1,$)}),E.isUndefined(t.withCredentials)||(J.withCredentials=!!t.withCredentials),o&&o!=="json"&&(J.responseType=t.responseType),M&&([O,F]=K0(M,!0),J.addEventListener("progress",O)),u&&J.upload&&([C,T]=K0(u),J.upload.addEventListener("progress",C),J.upload.addEventListener("loadend",T)),(t.cancelToken||t.signal)&&(z=s1=>{J&&(s(!s1||s1.type?new E3(null,c,J):s1),J.abort(),J=null)},t.cancelToken&&t.cancelToken.subscribe(z),t.signal&&(t.signal.aborted?z():t.signal.addEventListener("abort",z)));const a1=Xo(t.url);if(a1&&s2.protocols.indexOf(a1)===-1){s(new L1("Unsupported protocol "+a1+":",L1.ERR_BAD_REQUEST,c));return}J.send(r||null)})},af=(c,l)=>{const{length:e}=c=c?c.filter(Boolean):[];if(l||e){let s=new AbortController,t;const r=function(M){if(!t){t=!0,o();const z=M instanceof Error?M:this.reason;s.abort(z instanceof L1?z:new E3(z instanceof Error?z.message:z))}};let n=l&&setTimeout(()=>{n=null,r(new L1(`timeout ${l} of ms exceeded`,L1.ETIMEDOUT))},l);const o=()=>{c&&(n&&clearTimeout(n),n=null,c.forEach(M=>{M.unsubscribe?M.unsubscribe(r):M.removeEventListener("abort",r)}),c=null)};c.forEach(M=>M.addEventListener("abort",r));const{signal:u}=s;return u.unsubscribe=()=>E.asap(o),u}},of=function*(c,l){let e=c.byteLength;if(e<l){yield c;return}let s=0,t;for(;s<e;)t=s+l,yield c.slice(s,t),s=t},ff=async function*(c,l){for await(const e of zf(c))yield*of(e,l)},zf=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}const l=c.getReader();try{for(;;){const{done:e,value:s}=await l.read();if(e)break;yield s}}finally{await l.cancel()}},K7=(c,l,e,s)=>{const t=ff(c,l);let r=0,n,o=u=>{n||(n=!0,s&&s(u))};return new ReadableStream({async pull(u){try{const{done:M,value:z}=await t.next();if(M){o(),u.close();return}let C=z.byteLength;if(e){let O=r+=C;e(O)}u.enqueue(new Uint8Array(z))}catch(M){throw o(M),M}},cancel(u){return o(u),t.return()}},{highWaterMark:2})},v6=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_l=v6&&typeof ReadableStream=="function",uf=v6&&(typeof TextEncoder=="function"?(c=>l=>c.encode(l))(new TextEncoder):async c=>new Uint8Array(await new Response(c).arrayBuffer())),kl=(c,...l)=>{try{return!!c(...l)}catch{return!1}},df=_l&&kl(()=>{let c=!1;const l=new Request(s2.origin,{body:new ReadableStream,method:"POST",get duplex(){return c=!0,"half"}}).headers.has("Content-Type");return c&&!l}),Z7=64*1024,A5=_l&&kl(()=>E.isReadableStream(new Response("").body)),Z0={stream:A5&&(c=>c.body)};v6&&(c=>{["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!Z0[l]&&(Z0[l]=E.isFunction(c[l])?e=>e[l]():(e,s)=>{throw new L1(`Response type '${l}' is not supported`,L1.ERR_NOT_SUPPORT,s)})})})(new Response);const mf=async c=>{if(c==null)return 0;if(E.isBlob(c))return c.size;if(E.isSpecCompliantForm(c))return(await new Request(s2.origin,{method:"POST",body:c}).arrayBuffer()).byteLength;if(E.isArrayBufferView(c)||E.isArrayBuffer(c))return c.byteLength;if(E.isURLSearchParams(c)&&(c=c+""),E.isString(c))return(await uf(c)).byteLength},Mf=async(c,l)=>{const e=E.toFiniteNumber(c.getContentLength());return e??mf(l)},hf=v6&&(async c=>{let{url:l,method:e,data:s,signal:t,cancelToken:r,timeout:n,onDownloadProgress:o,onUploadProgress:u,responseType:M,headers:z,withCredentials:C="same-origin",fetchOptions:O}=vl(c);M=M?(M+"").toLowerCase():"text";let T=af([t,r&&r.toAbortSignal()],n),F;const B=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let J;try{if(u&&df&&e!=="get"&&e!=="head"&&(J=await Mf(z,s))!==0){let f1=new Request(l,{method:"POST",body:s,duplex:"half"}),y1;if(E.isFormData(s)&&(y1=f1.headers.get("content-type"))&&z.setContentType(y1),f1.body){const[k1,k]=V7(J,K0(G7(u)));s=K7(f1.body,Z7,k1,k)}}E.isString(C)||(C=C?"include":"omit");const Y="credentials"in Request.prototype;F=new Request(l,{...O,signal:T,method:e.toUpperCase(),headers:z.normalize().toJSON(),body:s,duplex:"half",credentials:Y?C:void 0});let a1=await fetch(F,O);const s1=A5&&(M==="stream"||M==="response");if(A5&&(o||s1&&B)){const f1={};["status","statusText","headers"].forEach(_=>{f1[_]=a1[_]});const y1=E.toFiniteNumber(a1.headers.get("content-length")),[k1,k]=o&&V7(y1,K0(G7(o),!0))||[];a1=new Response(K7(a1.body,Z7,k1,()=>{k&&k(),B&&B()}),f1)}M=M||"text";let $=await Z0[E.findKey(Z0,M)||"text"](a1,c);return!s1&&B&&B(),await new Promise((f1,y1)=>{wl(f1,y1,{data:$,headers:h2.from(a1.headers),status:a1.status,statusText:a1.statusText,config:c,request:F})})}catch(Y){throw B&&B(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new L1("Network Error",L1.ERR_NETWORK,c,F),{cause:Y.cause||Y}):L1.from(Y,Y&&Y.code,c,F)}}),P5={http:Oo,xhr:nf,fetch:hf};E.forEach(P5,(c,l)=>{if(c){try{Object.defineProperty(c,"name",{value:l})}catch{}Object.defineProperty(c,"adapterName",{value:l})}});const X7=c=>`- ${c}`,Lf=c=>E.isFunction(c)||c===null||c===!1,xl={getAdapter:c=>{c=E.isArray(c)?c:[c];const{length:l}=c;let e,s;const t={};for(let r=0;r<l;r++){e=c[r];let n;if(s=e,!Lf(e)&&(s=P5[(n=String(e)).toLowerCase()],s===void 0))throw new L1(`Unknown adapter '${n}'`);if(s)break;t[n||"#"+r]=s}if(!s){const r=Object.entries(t).map(([o,u])=>`adapter ${o} `+(u===!1?"is not supported by the environment":"is not available in the build"));let n=l?r.length>1?`since :
|
|
613
613
|
`+r.map(X7).join(`
|
|
614
614
|
`):" "+X7(r[0]):"as no adapter specified";throw new L1("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return s},adapters:P5};function i5(c){if(c.cancelToken&&c.cancelToken.throwIfRequested(),c.signal&&c.signal.aborted)throw new E3(null,c)}function Q7(c){return i5(c),c.headers=h2.from(c.headers),c.data=a5.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1&&c.headers.setContentType("application/x-www-form-urlencoded",!1),xl.getAdapter(c.adapter||M0.adapter)(c).then(function(s){return i5(c),s.data=a5.call(c,c.transformResponse,s),s.headers=h2.from(s.headers),s},function(s){return yl(s)||(i5(c),s&&s.response&&(s.response.data=a5.call(c,c.transformResponse,s.response),s.response.headers=h2.from(s.response.headers))),Promise.reject(s)})}const El="1.11.0",_6={};["object","boolean","number","function","string","symbol"].forEach((c,l)=>{_6[c]=function(s){return typeof s===c||"a"+(l<1?"n ":" ")+c}});const c9={};_6.transitional=function(l,e,s){function t(r,n){return"[Axios v"+El+"] Transitional option '"+r+"'"+n+(s?". "+s:"")}return(r,n,o)=>{if(l===!1)throw new L1(t(n," has been removed"+(e?" in "+e:"")),L1.ERR_DEPRECATED);return e&&!c9[n]&&(c9[n]=!0,console.warn(t(n," has been deprecated since v"+e+" and will be removed in the near future"))),l?l(r,n,o):!0}};_6.spelling=function(l){return(e,s)=>(console.warn(`${s} is likely a misspelling of ${l}`),!0)};function pf(c,l,e){if(typeof c!="object")throw new L1("options must be an object",L1.ERR_BAD_OPTION_VALUE);const s=Object.keys(c);let t=s.length;for(;t-- >0;){const r=s[t],n=l[r];if(n){const o=c[r],u=o===void 0||n(o,r,c);if(u!==!0)throw new L1("option "+r+" must be "+u,L1.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new L1("Unknown option "+r,L1.ERR_BAD_OPTION)}}const F0={assertOptions:pf,validators:_6},Y2=F0.validators;let Q4=class{constructor(l){this.defaults=l||{},this.interceptors={request:new H7,response:new H7}}async request(l,e){try{return await this._request(l,e)}catch(s){if(s instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{s.stack?r&&!String(s.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
615
|
-
`+r):s.stack=r}catch{}}throw s}}_request(l,e){typeof l=="string"?(e=e||{},e.url=l):e=l||{},e=l3(this.defaults,e);const{transitional:s,paramsSerializer:t,headers:r}=e;s!==void 0&&F0.assertOptions(s,{silentJSONParsing:Y2.transitional(Y2.boolean),forcedJSONParsing:Y2.transitional(Y2.boolean),clarifyTimeoutError:Y2.transitional(Y2.boolean)},!1),t!=null&&(E.isFunction(t)?e.paramsSerializer={serialize:t}:F0.assertOptions(t,{encode:Y2.function,serialize:Y2.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),F0.assertOptions(e,{baseUrl:Y2.spelling("baseURL"),withXsrfToken:Y2.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let n=r&&E.merge(r.common,r[e.method]);r&&E.forEach(["delete","get","head","post","put","patch","common"],F=>{delete r[F]}),e.headers=h2.concat(n,r);const o=[];let u=!0;this.interceptors.request.forEach(function(B){typeof B.runWhen=="function"&&B.runWhen(e)===!1||(u=u&&B.synchronous,o.unshift(B.fulfilled,B.rejected))});const M=[];this.interceptors.response.forEach(function(B){M.push(B.fulfilled,B.rejected)});let z,C=0,O;if(!u){const F=[Q7.bind(this),void 0];for(F.unshift(...o),F.push(...M),O=F.length,z=Promise.resolve(e);C<O;)z=z.then(F[C++],F[C++]);return z}O=o.length;let T=e;for(C=0;C<O;){const F=o[C++],B=o[C++];try{T=F(T)}catch(J){B.call(this,J);break}}try{z=Q7.call(this,T)}catch(F){return Promise.reject(F)}for(C=0,O=M.length;C<O;)z=z.then(M[C++],M[C++]);return z}getUri(l){l=l3(this.defaults,l);const e=Sl(l.baseURL,l.url,l.allowAbsoluteUrls);return gl(e,l.params,l.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(l){Q4.prototype[l]=function(e,s){return this.request(l3(s||{},{method:l,url:e,data:(s||{}).data}))}});E.forEach(["post","put","patch"],function(l){function e(s){return function(r,n,o){return this.request(l3(o||{},{method:l,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Q4.prototype[l]=e(),Q4.prototype[l+"Form"]=e(!0)});let gf=class Ol{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const s=this;this.promise.then(t=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](t);s._listeners=null}),this.promise.then=t=>{let r;const n=new Promise(o=>{s.subscribe(o),r=o}).then(t);return n.cancel=function(){s.unsubscribe(r)},n},l(function(r,n,o){s.reason||(s.reason=new E3(r,n,o),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const e=this._listeners.indexOf(l);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const l=new AbortController,e=s=>{l.abort(s)};return this.subscribe(e),l.signal.unsubscribe=()=>this.unsubscribe(e),l.signal}static source(){let l;return{token:new Ol(function(t){l=t}),cancel:l}}};function bf(c){return function(e){return c.apply(null,e)}}function Cf(c){return E.isObject(c)&&c.isAxiosError===!0}const j5={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(j5).forEach(([c,l])=>{j5[l]=c});function Tl(c){const l=new Q4(c),e=rl(Q4.prototype.request,l);return E.extend(e,Q4.prototype,l,{allOwnKeys:!0}),E.extend(e,l,null,{allOwnKeys:!0}),e.create=function(t){return Tl(l3(c,t))},e}const J1=Tl(M0);J1.Axios=Q4;J1.CanceledError=E3;J1.CancelToken=gf;J1.isCancel=yl;J1.VERSION=El;J1.toFormData=S6;J1.AxiosError=L1;J1.Cancel=J1.CanceledError;J1.all=function(l){return Promise.all(l)};J1.spread=bf;J1.isAxiosError=Cf;J1.mergeConfig=l3;J1.AxiosHeaders=h2;J1.formToJSON=c=>Cl(E.isHTMLForm(c)?new FormData(c):c);J1.getAdapter=xl.getAdapter;J1.HttpStatusCode=j5;J1.default=J1;const{Axios:jf,AxiosError:Ff,CanceledError:Rf,isCancel:Nf,CancelToken:If,VERSION:Uf,all:Bf,Cancel:Yf,isAxiosError:qf,spread:Wf,toFormData:Hf,AxiosHeaders:$f,HttpStatusCode:Vf,formToJSON:Gf,getAdapter:Jf,mergeConfig:Kf}=J1,yf={class:"app"},wf={class:"dashboard"},Sf={class:"block-content"},vf={key:0,class:"audio-col"},_f={class:"audio-value"},kf={class:"block-name"},xf=A9({name:"app",
|
|
615
|
+
`+r):s.stack=r}catch{}}throw s}}_request(l,e){typeof l=="string"?(e=e||{},e.url=l):e=l||{},e=l3(this.defaults,e);const{transitional:s,paramsSerializer:t,headers:r}=e;s!==void 0&&F0.assertOptions(s,{silentJSONParsing:Y2.transitional(Y2.boolean),forcedJSONParsing:Y2.transitional(Y2.boolean),clarifyTimeoutError:Y2.transitional(Y2.boolean)},!1),t!=null&&(E.isFunction(t)?e.paramsSerializer={serialize:t}:F0.assertOptions(t,{encode:Y2.function,serialize:Y2.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),F0.assertOptions(e,{baseUrl:Y2.spelling("baseURL"),withXsrfToken:Y2.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let n=r&&E.merge(r.common,r[e.method]);r&&E.forEach(["delete","get","head","post","put","patch","common"],F=>{delete r[F]}),e.headers=h2.concat(n,r);const o=[];let u=!0;this.interceptors.request.forEach(function(B){typeof B.runWhen=="function"&&B.runWhen(e)===!1||(u=u&&B.synchronous,o.unshift(B.fulfilled,B.rejected))});const M=[];this.interceptors.response.forEach(function(B){M.push(B.fulfilled,B.rejected)});let z,C=0,O;if(!u){const F=[Q7.bind(this),void 0];for(F.unshift(...o),F.push(...M),O=F.length,z=Promise.resolve(e);C<O;)z=z.then(F[C++],F[C++]);return z}O=o.length;let T=e;for(C=0;C<O;){const F=o[C++],B=o[C++];try{T=F(T)}catch(J){B.call(this,J);break}}try{z=Q7.call(this,T)}catch(F){return Promise.reject(F)}for(C=0,O=M.length;C<O;)z=z.then(M[C++],M[C++]);return z}getUri(l){l=l3(this.defaults,l);const e=Sl(l.baseURL,l.url,l.allowAbsoluteUrls);return gl(e,l.params,l.paramsSerializer)}};E.forEach(["delete","get","head","options"],function(l){Q4.prototype[l]=function(e,s){return this.request(l3(s||{},{method:l,url:e,data:(s||{}).data}))}});E.forEach(["post","put","patch"],function(l){function e(s){return function(r,n,o){return this.request(l3(o||{},{method:l,headers:s?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Q4.prototype[l]=e(),Q4.prototype[l+"Form"]=e(!0)});let gf=class Ol{constructor(l){if(typeof l!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(r){e=r});const s=this;this.promise.then(t=>{if(!s._listeners)return;let r=s._listeners.length;for(;r-- >0;)s._listeners[r](t);s._listeners=null}),this.promise.then=t=>{let r;const n=new Promise(o=>{s.subscribe(o),r=o}).then(t);return n.cancel=function(){s.unsubscribe(r)},n},l(function(r,n,o){s.reason||(s.reason=new E3(r,n,o),e(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(l){if(this.reason){l(this.reason);return}this._listeners?this._listeners.push(l):this._listeners=[l]}unsubscribe(l){if(!this._listeners)return;const e=this._listeners.indexOf(l);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const l=new AbortController,e=s=>{l.abort(s)};return this.subscribe(e),l.signal.unsubscribe=()=>this.unsubscribe(e),l.signal}static source(){let l;return{token:new Ol(function(t){l=t}),cancel:l}}};function bf(c){return function(e){return c.apply(null,e)}}function Cf(c){return E.isObject(c)&&c.isAxiosError===!0}const j5={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(j5).forEach(([c,l])=>{j5[l]=c});function Tl(c){const l=new Q4(c),e=rl(Q4.prototype.request,l);return E.extend(e,Q4.prototype,l,{allOwnKeys:!0}),E.extend(e,l,null,{allOwnKeys:!0}),e.create=function(t){return Tl(l3(c,t))},e}const J1=Tl(M0);J1.Axios=Q4;J1.CanceledError=E3;J1.CancelToken=gf;J1.isCancel=yl;J1.VERSION=El;J1.toFormData=S6;J1.AxiosError=L1;J1.Cancel=J1.CanceledError;J1.all=function(l){return Promise.all(l)};J1.spread=bf;J1.isAxiosError=Cf;J1.mergeConfig=l3;J1.AxiosHeaders=h2;J1.formToJSON=c=>Cl(E.isHTMLForm(c)?new FormData(c):c);J1.getAdapter=xl.getAdapter;J1.HttpStatusCode=j5;J1.default=J1;const{Axios:jf,AxiosError:Ff,CanceledError:Rf,isCancel:Nf,CancelToken:If,VERSION:Uf,all:Bf,Cancel:Yf,isAxiosError:qf,spread:Wf,toFormData:Hf,AxiosHeaders:$f,HttpStatusCode:Vf,formToJSON:Gf,getAdapter:Jf,mergeConfig:Kf}=J1,yf={class:"app"},wf={class:"dashboard"},Sf={class:"block-content"},vf={key:0,class:"audio-col"},_f={class:"audio-value"},kf={class:"block-name"},xf=A9({name:"app",data:()=>({info:[],ws:null}),async mounted(){const c=new URL("/api",document.location.href).toString(),l=await J1.get(`${c}/dashboard`);for(const e of l.data)e.type==="audio"?this.info.push({type:e.type,id:e.id,name:e.name,value:0,lastKind:""}):e.type==="text"&&this.info.push({type:e.type,id:e.id,name:e.name,value:[],lastKind:""});this.ws=new Oi(c,[],{reconnectionDelayGrowFactor:1.3,maxReconnectionDelay:4e3,minReconnectionDelay:1e3,connectionTimeout:4e3,minUptime:5e3}),this.ws.addEventListener("open",e=>{}),this.ws.addEventListener("message",e=>{let s;try{s=JSON.parse(e.data)}catch(u){this.log("ERROR","Failed to parse WebSocket message",{error:u,data:e.data});return}if(s.response!=="DASHBOARD")return;const[t,r,n,o]=s.args;for(const u of this.info)if(u.type===t&&u.id===r)if(u.type==="audio")n==="final"&&typeof o=="number"&&(u.value=o);else{if(typeof o=="string"){const M=u.value;u.lastKind==="intermediate"?M[M.length-1]=o:(M.push(o),u.value=M.slice(-20))}u.lastKind=n,this.$nextTick(()=>{for(const M of this.$refs.textCol)M.scrollTop=M.scrollHeight})}})},beforeUnmount(){this.ws&&(this.ws.close(),this.ws=null)},methods:{log(c,l,e=null){let t=`${l1().format("YYYY-MM-DD hh:mm:ss.SSS")} [${c}]: ${l}`;e!==null&&(t+=` (${Object.keys(e).map(r=>r+": "+JSON.stringify(e[r])).join(", ")})`),console.log(t)}}}),Ef=A9({...xf,setup(c){return(l,e)=>(k4(),q4("div",yf,[E4("div",wf,[(k4(!0),q4(T2,null,o7(l.info,s=>(k4(),q4("div",{key:s.id,class:"block"},[E4("div",Sf,[s.type==="audio"?(k4(),q4("div",vf,[E4("div",{class:"audio-meter",style:e6({height:100*(1-s.value/-60)+"%"})},[E4("div",_f,[tc(_0(s.value.toFixed(1))+" ",1),e[0]||(e[0]=E4("div",{class:"audio-unit"},"LUFS-S",-1))])],4)])):g7("",!0),s.type==="text"?(k4(),q4("div",{key:1,ref_for:!0,ref:"textCol",class:s6(["text-col",{intermediate:s.lastKind==="intermediate"}])},[(k4(!0),q4(T2,null,o7(s.value,t=>(k4(),q4("div",{key:t,class:"text-value"},_0(t),1))),128))],2)):g7("",!0)]),E4("div",kf,_0(s.name),1)]))),128))])]))}});document.addEventListener("DOMContentLoaded",c=>{(async()=>{bt(Ef).mount("#app")})().catch(l=>{console.error(`app: ERROR: top-level: ${l}`)})})});export default Of();
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import path from "node:path"
|
|
8
7
|
import * as Vite from "vite"
|
|
9
8
|
import VuePlugin from "@vitejs/plugin-vue"
|
|
10
9
|
import YAMLPlugin from "@rollup/plugin-yaml"
|
|
11
10
|
import { nodePolyfills } from "vite-plugin-node-polyfills"
|
|
12
11
|
import SvgLoader from "vite-svg-loader"
|
|
13
|
-
import { mkdirp } from "mkdirp"
|
|
14
12
|
|
|
15
13
|
export default Vite.defineConfig(({ command, mode }) => ({
|
|
16
14
|
logLevel: "info",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div v-bind:key="value"
|
|
29
29
|
v-for="value of block.value"
|
|
30
30
|
class="text-value">
|
|
31
|
-
{{ value
|
|
31
|
+
{{ value }}
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
@@ -149,22 +149,21 @@ type Info = {
|
|
|
149
149
|
value: number | string[],
|
|
150
150
|
lastKind: string
|
|
151
151
|
}
|
|
152
|
+
|
|
153
|
+
interface WebSocketEvent {
|
|
154
|
+
response: string,
|
|
155
|
+
args: [ string, string, string, number | string ]
|
|
156
|
+
}
|
|
157
|
+
|
|
152
158
|
export default defineComponent({
|
|
153
159
|
name: "app",
|
|
154
|
-
components: {
|
|
155
|
-
},
|
|
156
160
|
data: () => ({
|
|
157
161
|
info: [] as Info[],
|
|
158
|
-
ws:
|
|
162
|
+
ws: null as ReconnectingWebSocket | null
|
|
159
163
|
}),
|
|
160
|
-
created () {
|
|
161
|
-
},
|
|
162
164
|
async mounted () {
|
|
163
165
|
/* determine API URL */
|
|
164
|
-
|
|
165
|
-
url = url.replace(/#.+$/, "")
|
|
166
|
-
url = url.replace(/\/[^/]*$/, "")
|
|
167
|
-
url = url + "/api"
|
|
166
|
+
const url = new URL("/api", document.location.href).toString()
|
|
168
167
|
|
|
169
168
|
/* load dashboard configuration */
|
|
170
169
|
const response = await axios.get(`${url}/dashboard`)
|
|
@@ -186,7 +185,7 @@ export default defineComponent({
|
|
|
186
185
|
this.ws.addEventListener("open", (ev) => {
|
|
187
186
|
})
|
|
188
187
|
this.ws.addEventListener("message", (ev) => {
|
|
189
|
-
let event
|
|
188
|
+
let event: WebSocketEvent
|
|
190
189
|
try {
|
|
191
190
|
event = JSON.parse(ev.data)
|
|
192
191
|
}
|
|
@@ -196,22 +195,24 @@ export default defineComponent({
|
|
|
196
195
|
}
|
|
197
196
|
if (event.response !== "DASHBOARD")
|
|
198
197
|
return
|
|
198
|
+
|
|
199
|
+
/* extract dashboard update parameters: [ type, id, kind, value ] */
|
|
199
200
|
const [ type, id, kind, value ] = event.args
|
|
200
201
|
for (const block of this.info) {
|
|
201
202
|
if (block.type === type && block.id === id) {
|
|
202
203
|
if (block.type === "audio") {
|
|
203
|
-
if (kind === "final")
|
|
204
|
+
if (kind === "final" && typeof value === "number")
|
|
204
205
|
block.value = value
|
|
205
206
|
}
|
|
206
207
|
else {
|
|
207
|
-
if (
|
|
208
|
-
const arr = block.value as string[]
|
|
209
|
-
arr[arr.length - 1] = value
|
|
210
|
-
}
|
|
211
|
-
else {
|
|
208
|
+
if (typeof value === "string") {
|
|
212
209
|
const arr = block.value as string[]
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
if (block.lastKind === "intermediate")
|
|
211
|
+
arr[arr.length - 1] = value
|
|
212
|
+
else {
|
|
213
|
+
arr.push(value)
|
|
214
|
+
block.value = arr.slice(-20)
|
|
215
|
+
}
|
|
215
216
|
}
|
|
216
217
|
block.lastKind = kind
|
|
217
218
|
this.$nextTick(() => {
|
|
@@ -606,4 +606,4 @@ and limitations under the License.
|
|
|
606
606
|
* https://github.com/pladaria/reconnecting-websocket
|
|
607
607
|
* https://github.com/opensumi/reconnecting-websocket
|
|
608
608
|
* License MIT
|
|
609
|
-
*/var ai=function(){if(typeof WebSocket<"u")return WebSocket},ri=function(c){return typeof c<"u"&&!!c&&c.CLOSING===2},k4={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},ni=(function(){function c(l,e,s){var t=this;s===void 0&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(a){t._debug("open event");var r=t._options.minUptime,i=r===void 0?k4.minUptime:r;clearTimeout(t._connectTimeout),t._uptimeTimeout=setTimeout(function(){return t._acceptOpen()},i),t._ws.binaryType=t._binaryType,t._messageQueue.forEach(function(f){var M;return(M=t._ws)===null||M===void 0?void 0:M.send(f)}),t._messageQueue=[],t.onopen&&t.onopen(a),t._listeners.open.forEach(function(f){return t._callEventListener(a,f)})},this._handleMessage=function(a){t._debug("message event"),t.onmessage&&t.onmessage(a),t._listeners.message.forEach(function(r){return t._callEventListener(a,r)})},this._handleError=function(a){t._debug("error event",a.message),t._disconnect(void 0,a.message==="TIMEOUT"?"timeout":void 0),t.onerror&&t.onerror(a),t._debug("exec error listeners"),t._listeners.error.forEach(function(r){return t._callEventListener(a,r)}),t._connect()},this._handleClose=function(a){t._debug("close event"),t._clearTimeouts(),t._shouldReconnect&&t._connect(),t.onclose&&t.onclose(a),t._listeners.close.forEach(function(r){return t._callEventListener(a,r)})},this._url=l,this._protocols=e,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),s.logger?this._logger=s.logger:this._logger=console,this._connect()}return Object.defineProperty(c,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(c,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(c,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(c,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CONNECTING",{get:function(){return c.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"OPEN",{get:function(){return c.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CLOSING",{get:function(){return c.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CLOSED",{get:function(){return c.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(l){this._binaryType=l,this._ws&&(this._ws.binaryType=l)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"bufferedAmount",{get:function(){var l=this._messageQueue.reduce(function(e,s){return typeof s=="string"?e+=s.length:s instanceof Blob?e+=s.size:e+=s.byteLength,e},0);return l+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?c.CLOSED:c.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),c.prototype.close=function(l,e){if(l===void 0&&(l=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(l,e)},c.prototype.reconnect=function(l,e){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(l,e),this._connect())},c.prototype.send=function(l){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",l),this._ws.send(l);else{var e=this._options.maxEnqueuedMessages,s=e===void 0?k4.maxEnqueuedMessages:e;this._messageQueue.length<s&&(this._debug("enqueue",l),this._messageQueue.push(l))}},c.prototype.addEventListener=function(l,e){this._listeners[l]&&this._listeners[l].push(e)},c.prototype.dispatchEvent=function(l){var e,s,t=this._listeners[l.type];if(t)try{for(var a=li(t),r=a.next();!r.done;r=a.next()){var i=r.value;this._callEventListener(l,i)}}catch(f){e={error:f}}finally{try{r&&!r.done&&(s=a.return)&&s.call(a)}finally{if(e)throw e.error}}return!0},c.prototype.removeEventListener=function(l,e){this._listeners[l]&&(this._listeners[l]=this._listeners[l].filter(function(s){return s!==e}))},c.prototype._debug=function(){for(var l,e=[],s=0;s<arguments.length;s++)e[s]=arguments[s];this._options.debug&&(l=this._logger).log.apply(l,si(["RWS>"],e))},c.prototype._getNextDelay=function(){var l=this._options,e=l.reconnectionDelayGrowFactor,s=e===void 0?k4.reconnectionDelayGrowFactor:e,t=l.minReconnectionDelay,a=t===void 0?k4.minReconnectionDelay:t,r=l.maxReconnectionDelay,i=r===void 0?k4.maxReconnectionDelay:r,f=0;return this._retryCount>0&&(f=a*Math.pow(s,this._retryCount-1),f>i&&(f=i)),this._debug("next delay",f),f},c.prototype._wait=function(){var l=this;return new Promise(function(e){setTimeout(e,l._getNextDelay())})},c.prototype._getNextUrl=function(l){if(typeof l=="string")return Promise.resolve(l);if(typeof l=="function"){var e=l();if(typeof e=="string")return Promise.resolve(e);if(e.then)return e}throw Error("Invalid URL")},c.prototype._connect=function(){var l=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var e=this._options,s=e.maxRetries,t=s===void 0?k4.maxRetries:s,a=e.connectionTimeout,r=a===void 0?k4.connectionTimeout:a,i=e.WebSocket,f=i===void 0?ai():i;if(this._retryCount>=t){this._debug("max retries reached",this._retryCount,">=",t);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!ri(f))throw Error("No valid WebSocket class provided");this._wait().then(function(){return l._getNextUrl(l._url)}).then(function(M){if(l._closeCalled){l._connectLock=!1;return}l._debug("connect",{url:M,protocols:l._protocols,options:l._options}),l._ws=l._protocols?new f(M,l._protocols,l._options.WebSocketOptions):new f(M,l._options.WebSocketOptions),l._ws.binaryType=l._binaryType,l._connectLock=!1,l._addListeners(),l._connectTimeout=setTimeout(function(){return l._handleTimeout()},r)}).catch(function(M){l._connectLock=!1,l._handleError(new f7(Error(M.message),l))})}},c.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new f7(Error("TIMEOUT"),this))},c.prototype._disconnect=function(l,e){if(l===void 0&&(l=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(l,e),this._handleClose(new ti(l,e,this))}catch{}}},c.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},c.prototype._callEventListener=function(l,e){"handleEvent"in e?e.handleEvent(l):e(l)},c.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},c.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},c.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},c})();const ii={class:"app"},oi={class:"block"},fi={key:0,class:"cursor"},ui=P1({name:"app",components:{"spinner-grid":Ys},data:()=>({text:[],lastTextBlockKind:""}),async mounted(){
|
|
609
|
+
*/var ai=function(){if(typeof WebSocket<"u")return WebSocket},ri=function(c){return typeof c<"u"&&!!c&&c.CLOSING===2},k4={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},ni=(function(){function c(l,e,s){var t=this;s===void 0&&(s={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(a){t._debug("open event");var r=t._options.minUptime,i=r===void 0?k4.minUptime:r;clearTimeout(t._connectTimeout),t._uptimeTimeout=setTimeout(function(){return t._acceptOpen()},i),t._ws.binaryType=t._binaryType,t._messageQueue.forEach(function(f){var M;return(M=t._ws)===null||M===void 0?void 0:M.send(f)}),t._messageQueue=[],t.onopen&&t.onopen(a),t._listeners.open.forEach(function(f){return t._callEventListener(a,f)})},this._handleMessage=function(a){t._debug("message event"),t.onmessage&&t.onmessage(a),t._listeners.message.forEach(function(r){return t._callEventListener(a,r)})},this._handleError=function(a){t._debug("error event",a.message),t._disconnect(void 0,a.message==="TIMEOUT"?"timeout":void 0),t.onerror&&t.onerror(a),t._debug("exec error listeners"),t._listeners.error.forEach(function(r){return t._callEventListener(a,r)}),t._connect()},this._handleClose=function(a){t._debug("close event"),t._clearTimeouts(),t._shouldReconnect&&t._connect(),t.onclose&&t.onclose(a),t._listeners.close.forEach(function(r){return t._callEventListener(a,r)})},this._url=l,this._protocols=e,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),s.logger?this._logger=s.logger:this._logger=console,this._connect()}return Object.defineProperty(c,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(c,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(c,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(c,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CONNECTING",{get:function(){return c.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"OPEN",{get:function(){return c.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CLOSING",{get:function(){return c.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"CLOSED",{get:function(){return c.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(l){this._binaryType=l,this._ws&&(this._ws.binaryType=l)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"bufferedAmount",{get:function(){var l=this._messageQueue.reduce(function(e,s){return typeof s=="string"?e+=s.length:s instanceof Blob?e+=s.size:e+=s.byteLength,e},0);return l+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?c.CLOSED:c.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),c.prototype.close=function(l,e){if(l===void 0&&(l=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(l,e)},c.prototype.reconnect=function(l,e){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(l,e),this._connect())},c.prototype.send=function(l){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",l),this._ws.send(l);else{var e=this._options.maxEnqueuedMessages,s=e===void 0?k4.maxEnqueuedMessages:e;this._messageQueue.length<s&&(this._debug("enqueue",l),this._messageQueue.push(l))}},c.prototype.addEventListener=function(l,e){this._listeners[l]&&this._listeners[l].push(e)},c.prototype.dispatchEvent=function(l){var e,s,t=this._listeners[l.type];if(t)try{for(var a=li(t),r=a.next();!r.done;r=a.next()){var i=r.value;this._callEventListener(l,i)}}catch(f){e={error:f}}finally{try{r&&!r.done&&(s=a.return)&&s.call(a)}finally{if(e)throw e.error}}return!0},c.prototype.removeEventListener=function(l,e){this._listeners[l]&&(this._listeners[l]=this._listeners[l].filter(function(s){return s!==e}))},c.prototype._debug=function(){for(var l,e=[],s=0;s<arguments.length;s++)e[s]=arguments[s];this._options.debug&&(l=this._logger).log.apply(l,si(["RWS>"],e))},c.prototype._getNextDelay=function(){var l=this._options,e=l.reconnectionDelayGrowFactor,s=e===void 0?k4.reconnectionDelayGrowFactor:e,t=l.minReconnectionDelay,a=t===void 0?k4.minReconnectionDelay:t,r=l.maxReconnectionDelay,i=r===void 0?k4.maxReconnectionDelay:r,f=0;return this._retryCount>0&&(f=a*Math.pow(s,this._retryCount-1),f>i&&(f=i)),this._debug("next delay",f),f},c.prototype._wait=function(){var l=this;return new Promise(function(e){setTimeout(e,l._getNextDelay())})},c.prototype._getNextUrl=function(l){if(typeof l=="string")return Promise.resolve(l);if(typeof l=="function"){var e=l();if(typeof e=="string")return Promise.resolve(e);if(e.then)return e}throw Error("Invalid URL")},c.prototype._connect=function(){var l=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var e=this._options,s=e.maxRetries,t=s===void 0?k4.maxRetries:s,a=e.connectionTimeout,r=a===void 0?k4.connectionTimeout:a,i=e.WebSocket,f=i===void 0?ai():i;if(this._retryCount>=t){this._debug("max retries reached",this._retryCount,">=",t);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!ri(f))throw Error("No valid WebSocket class provided");this._wait().then(function(){return l._getNextUrl(l._url)}).then(function(M){if(l._closeCalled){l._connectLock=!1;return}l._debug("connect",{url:M,protocols:l._protocols,options:l._options}),l._ws=l._protocols?new f(M,l._protocols,l._options.WebSocketOptions):new f(M,l._options.WebSocketOptions),l._ws.binaryType=l._binaryType,l._connectLock=!1,l._addListeners(),l._connectTimeout=setTimeout(function(){return l._handleTimeout()},r)}).catch(function(M){l._connectLock=!1,l._handleError(new f7(Error(M.message),l))})}},c.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new f7(Error("TIMEOUT"),this))},c.prototype._disconnect=function(l,e){if(l===void 0&&(l=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(l,e),this._handleClose(new ti(l,e,this))}catch{}}},c.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},c.prototype._callEventListener=function(l,e){"handleEvent"in e?e.handleEvent(l):e(l)},c.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},c.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},c.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},c})();const ii={class:"app"},oi={class:"block"},fi={key:0,class:"cursor"},ui=P1({name:"app",components:{"spinner-grid":Ys},data:()=>({text:[],lastTextBlockKind:""}),async mounted(){const c=new URL("/api",document.location.href).toString();new ni(c,[],{reconnectionDelayGrowFactor:1.3,maxReconnectionDelay:4e3,minReconnectionDelay:1e3,connectionTimeout:4e3,minUptime:5e3}).addEventListener("message",e=>{let s;try{s=JSON.parse(e.data)}catch(t){this.log("ERROR","Failed to parse WebSocket message",{error:t,data:e.data});return}this.lastTextBlockKind==="intermediate"?this.text[this.text.length-1]=s.payload:(this.text.push(s.payload),this.text=this.text.slice(-2)),this.lastTextBlockKind=s.kind})},methods:{log(c,l,e=null){let t=`${H().format("YYYY-MM-DD hh:mm:ss.SSS")} [${c}]: ${l}`;e!==null&&(t+=` (${Object.keys(e).map(a=>a+": "+JSON.stringify(e[a])).join(", ")})`),console.log(t)}}}),zi=P1({...ui,setup(c){return(l,e)=>{const s=Gl("spinner-grid");return p3(),X3("div",ii,[b0("div",oi,[b0("div",{class:A0(["text-col",{intermediate:l.lastTextBlockKind==="intermediate"}])},[(p3(!0),X3(p2,null,Zl(l.text,(t,a)=>(p3(),X3("div",{key:t,class:"text-value"},[m9(p7(t)+" ",1),a===l.text.length-1&&l.lastTextBlockKind==="intermediate"?(p3(),X3("span",fi,[S2(s,{class:"spinner-grid",size:"32"})])):Oe("",!0)]))),128))],2)])])}}});document.addEventListener("DOMContentLoaded",c=>{(async()=>{us(zi).mount("#app")})().catch(l=>{console.error(`app: ERROR: top-level: ${l}`)})})});export default mi();
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import path from "node:path"
|
|
8
7
|
import * as Vite from "vite"
|
|
9
8
|
import VuePlugin from "@vitejs/plugin-vue"
|
|
10
9
|
import YAMLPlugin from "@rollup/plugin-yaml"
|
|
11
10
|
import { nodePolyfills } from "vite-plugin-node-polyfills"
|
|
12
11
|
import SvgLoader from "vite-svg-loader"
|
|
13
|
-
import { mkdirp } from "mkdirp"
|
|
14
12
|
|
|
15
13
|
export default Vite.defineConfig(({ command, mode }) => ({
|
|
16
14
|
logLevel: "info",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div v-bind:key="value"
|
|
15
15
|
v-for="(value, idx) of text"
|
|
16
16
|
class="text-value">
|
|
17
|
-
{{ value
|
|
17
|
+
{{ value }}
|
|
18
18
|
<span class="cursor" v-if="idx === (text.length - 1) && lastTextBlockKind === 'intermediate'">
|
|
19
19
|
<spinner-grid class="spinner-grid" size="32"/>
|
|
20
20
|
</span>
|
|
@@ -94,10 +94,7 @@ export default defineComponent({
|
|
|
94
94
|
}),
|
|
95
95
|
async mounted () {
|
|
96
96
|
/* determine API URL */
|
|
97
|
-
|
|
98
|
-
url = url.replace(/#.+$/, "")
|
|
99
|
-
url = url.replace(/\/[^/]*$/, "")
|
|
100
|
-
url = url + "/api"
|
|
97
|
+
const url = new URL("/api", document.location.href).toString()
|
|
101
98
|
|
|
102
99
|
/* connect to WebSocket API for receiving dashboard information */
|
|
103
100
|
const ws = new ReconnectingWebSocket(url, [], {
|
|
@@ -108,7 +105,14 @@ export default defineComponent({
|
|
|
108
105
|
minUptime: 5000
|
|
109
106
|
})
|
|
110
107
|
ws.addEventListener("message", (ev) => {
|
|
111
|
-
|
|
108
|
+
let chunk: SpeechFlowChunk
|
|
109
|
+
try {
|
|
110
|
+
chunk = JSON.parse(ev.data)
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
this.log("ERROR", "Failed to parse WebSocket message", { error, data: ev.data })
|
|
114
|
+
return
|
|
115
|
+
}
|
|
112
116
|
if (this.lastTextBlockKind === "intermediate")
|
|
113
117
|
this.text[this.text.length - 1] = chunk.payload
|
|
114
118
|
else {
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
** SpeechFlow - Speech Processing Flow Graph
|
|
4
|
-
** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
5
|
-
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
-
}) : function(o, v) {
|
|
21
|
-
o["default"] = v;
|
|
22
|
-
});
|
|
23
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
-
var ownKeys = function(o) {
|
|
25
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
-
var ar = [];
|
|
27
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
-
return ar;
|
|
29
|
-
};
|
|
30
|
-
return ownKeys(o);
|
|
31
|
-
};
|
|
32
|
-
return function (mod) {
|
|
33
|
-
if (mod && mod.__esModule) return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
-
__setModuleDefault(result, mod);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
})();
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
const utils = __importStar(require("./speechflow-utils"));
|
|
42
|
-
/* unified dynamics processor with compression and expansion */
|
|
43
|
-
class DynamicsProcessor extends AudioWorkletProcessor {
|
|
44
|
-
/* internal state */
|
|
45
|
-
env = [];
|
|
46
|
-
sampleRate;
|
|
47
|
-
reduction = 0;
|
|
48
|
-
/* eslint no-undef: off */
|
|
49
|
-
static get parameterDescriptors() {
|
|
50
|
-
return [
|
|
51
|
-
{ name: "mode", defaultValue: 0, minValue: 0, maxValue: 2, automationRate: "k-rate" }, // 0=compress, 1=expand, 2=both
|
|
52
|
-
{ name: "threshold", defaultValue: -23, minValue: -100, maxValue: 0, automationRate: "k-rate" }, // dBFS
|
|
53
|
-
{ name: "ratio", defaultValue: 4.0, minValue: 1.0, maxValue: 20, automationRate: "k-rate" }, // compression/expansion ratio
|
|
54
|
-
{ name: "attack", defaultValue: 0.010, minValue: 0.0, maxValue: 1, automationRate: "k-rate" }, // seconds
|
|
55
|
-
{ name: "release", defaultValue: 0.050, minValue: 0.0, maxValue: 1, automationRate: "k-rate" }, // seconds
|
|
56
|
-
{ name: "knee", defaultValue: 6.0, minValue: 0.0, maxValue: 40, automationRate: "k-rate" }, // dB
|
|
57
|
-
{ name: "makeup", defaultValue: 0.0, minValue: -24, maxValue: 24, automationRate: "k-rate" }, // dB
|
|
58
|
-
{ name: "expandThreshold", defaultValue: -45, minValue: -100, maxValue: 0, automationRate: "k-rate" }, // dBFS for expansion
|
|
59
|
-
{ name: "expandRatio", defaultValue: 4.0, minValue: 1.0, maxValue: 20, automationRate: "k-rate" }, // expansion ratio
|
|
60
|
-
{ name: "floor", defaultValue: -64, minValue: -100, maxValue: 0, automationRate: "k-rate" } // dBFS minimum output level
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
/* class constructor for custom option processing */
|
|
64
|
-
constructor(options) {
|
|
65
|
-
super();
|
|
66
|
-
const { sampleRate } = options.processorOptions;
|
|
67
|
-
this.sampleRate = sampleRate;
|
|
68
|
-
}
|
|
69
|
-
/* determine compression gain difference */
|
|
70
|
-
compressGainDBFor(levelDB, thresholdDB, ratio, kneeDB) {
|
|
71
|
-
/* short-circuit for unreasonable ratio */
|
|
72
|
-
if (ratio <= 1.0)
|
|
73
|
-
return 0;
|
|
74
|
-
/* determine thresholds */
|
|
75
|
-
const halfKnee = kneeDB * 0.5;
|
|
76
|
-
const belowThr = levelDB < thresholdDB;
|
|
77
|
-
const aboveKnee = levelDB >= (thresholdDB + halfKnee);
|
|
78
|
-
/* short-circuit for no compression (below threshold) */
|
|
79
|
-
if (belowThr)
|
|
80
|
-
return 0;
|
|
81
|
-
/* apply soft-knee */
|
|
82
|
-
if (kneeDB > 0 && !aboveKnee) {
|
|
83
|
-
const x = (levelDB - thresholdDB) / kneeDB;
|
|
84
|
-
const idealGainDB = (thresholdDB + (levelDB - thresholdDB) / ratio) - levelDB;
|
|
85
|
-
return idealGainDB * x * x;
|
|
86
|
-
}
|
|
87
|
-
/* determine target level */
|
|
88
|
-
const targetOut = thresholdDB + (levelDB - thresholdDB) / ratio;
|
|
89
|
-
/* return gain difference */
|
|
90
|
-
return targetOut - levelDB;
|
|
91
|
-
}
|
|
92
|
-
/* determine expansion gain difference */
|
|
93
|
-
expandGainDBFor(levelDB, thresholdDB, ratio, kneeDB) {
|
|
94
|
-
/* short-circuit for unreasonable ratio */
|
|
95
|
-
if (ratio <= 1.0)
|
|
96
|
-
return 0;
|
|
97
|
-
/* determine thresholds */
|
|
98
|
-
const halfKnee = kneeDB * 0.5;
|
|
99
|
-
const belowKnee = levelDB < (thresholdDB - halfKnee);
|
|
100
|
-
const aboveThr = levelDB >= thresholdDB;
|
|
101
|
-
/* short-circuit for no expansion (above threshold) */
|
|
102
|
-
if (aboveThr)
|
|
103
|
-
return 0;
|
|
104
|
-
/* apply soft-knee */
|
|
105
|
-
if (kneeDB > 0 && !belowKnee) {
|
|
106
|
-
const x = (levelDB - (thresholdDB - halfKnee)) / kneeDB;
|
|
107
|
-
const idealGainDB = (thresholdDB + (levelDB - thresholdDB) * ratio) - levelDB;
|
|
108
|
-
return idealGainDB * x * x;
|
|
109
|
-
}
|
|
110
|
-
/* determine target level */
|
|
111
|
-
const targetOut = thresholdDB + (levelDB - thresholdDB) / ratio;
|
|
112
|
-
/* return gain difference */
|
|
113
|
-
return targetOut - levelDB;
|
|
114
|
-
}
|
|
115
|
-
/* update envelope (smoothed amplitude contour) for single channel */
|
|
116
|
-
updateEnvelopeForChannel(chan, samples, attack, release) {
|
|
117
|
-
/* fetch old envelope value */
|
|
118
|
-
if (this.env[chan] === undefined)
|
|
119
|
-
this.env[chan] = 1e-12;
|
|
120
|
-
let env = this.env[chan];
|
|
121
|
-
/* calculate attack/release alpha values */
|
|
122
|
-
const alphaA = Math.exp(-1 / (attack * this.sampleRate));
|
|
123
|
-
const alphaR = Math.exp(-1 / (release * this.sampleRate));
|
|
124
|
-
/* iterate over all samples and calculate RMS */
|
|
125
|
-
for (const s of samples) {
|
|
126
|
-
const x = Math.abs(s);
|
|
127
|
-
const det = x * x;
|
|
128
|
-
if (det > env)
|
|
129
|
-
env = alphaA * env + (1 - alphaA) * det;
|
|
130
|
-
else
|
|
131
|
-
env = alphaR * env + (1 - alphaR) * det;
|
|
132
|
-
}
|
|
133
|
-
this.env[chan] = Math.sqrt(Math.max(env, 1e-12));
|
|
134
|
-
}
|
|
135
|
-
/* process a single sample frame */
|
|
136
|
-
process(inputs, outputs, parameters) {
|
|
137
|
-
/* sanity check */
|
|
138
|
-
const input = inputs[0];
|
|
139
|
-
const output = outputs[0];
|
|
140
|
-
if (!input || input.length === 0 || !output)
|
|
141
|
-
return true;
|
|
142
|
-
/* determine number of channels */
|
|
143
|
-
const nCh = input.length;
|
|
144
|
-
/* reset envelope array if channel count changed */
|
|
145
|
-
if (nCh !== this.env.length)
|
|
146
|
-
this.env = [];
|
|
147
|
-
/* initially just copy input to output (pass-through) */
|
|
148
|
-
for (let c = 0; c < output.length; c++) {
|
|
149
|
-
if (!output[c] || !input[c])
|
|
150
|
-
continue;
|
|
151
|
-
output[c].set(input[c]);
|
|
152
|
-
}
|
|
153
|
-
/* fetch parameters */
|
|
154
|
-
const mode = Math.round(parameters["mode"][0]);
|
|
155
|
-
const thresholdDB = parameters["threshold"][0];
|
|
156
|
-
const ratio = parameters["ratio"][0];
|
|
157
|
-
const kneeDB = parameters["knee"][0];
|
|
158
|
-
const attackS = Math.max(parameters["attack"][0], 1 / this.sampleRate);
|
|
159
|
-
const releaseS = Math.max(parameters["release"][0], 1 / this.sampleRate);
|
|
160
|
-
const makeupDB = parameters["makeup"][0];
|
|
161
|
-
const expandThresholdDB = parameters["expandThreshold"][0];
|
|
162
|
-
const expandRatio = parameters["expandRatio"][0];
|
|
163
|
-
const floorDB = parameters["floor"][0];
|
|
164
|
-
/* update envelope per channel */
|
|
165
|
-
for (let ch = 0; ch < nCh; ch++)
|
|
166
|
-
this.updateEnvelopeForChannel(ch, input[ch], attackS, releaseS);
|
|
167
|
-
/* determine linear value from decibel makeup value */
|
|
168
|
-
const makeUpLin = utils.dB2lin(makeupDB);
|
|
169
|
-
/* iterate over all channels */
|
|
170
|
-
this.reduction = 0;
|
|
171
|
-
for (let ch = 0; ch < nCh; ch++) {
|
|
172
|
-
const levelDB = utils.lin2dB(this.env[ch]);
|
|
173
|
-
let totalGainDB = 0;
|
|
174
|
-
/* apply compression if needed */
|
|
175
|
-
if (mode === 0 || mode === 2) {
|
|
176
|
-
const compressGainDB = this.compressGainDBFor(levelDB, thresholdDB, ratio, kneeDB);
|
|
177
|
-
totalGainDB += compressGainDB;
|
|
178
|
-
/* on first channel, calculate reduction for compression */
|
|
179
|
-
if (ch === 0)
|
|
180
|
-
this.reduction = Math.min(0, compressGainDB);
|
|
181
|
-
}
|
|
182
|
-
/* apply expansion if needed */
|
|
183
|
-
if (mode === 1 || mode === 2) {
|
|
184
|
-
const expandGainDB = this.expandGainDBFor(levelDB, expandThresholdDB, expandRatio, kneeDB);
|
|
185
|
-
totalGainDB += expandGainDB;
|
|
186
|
-
}
|
|
187
|
-
/* calculate total gain with makeup */
|
|
188
|
-
let gainLin = utils.dB2lin(totalGainDB) * makeUpLin;
|
|
189
|
-
/* do not attenuate below floor (for expansion) */
|
|
190
|
-
if (mode === 1 || mode === 2) {
|
|
191
|
-
const expectedOutLevelDB = levelDB + totalGainDB + makeupDB;
|
|
192
|
-
if (expectedOutLevelDB < floorDB) {
|
|
193
|
-
const neededLiftDB = floorDB - expectedOutLevelDB;
|
|
194
|
-
gainLin /= utils.dB2lin(neededLiftDB);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
/* apply gain change to channel */
|
|
198
|
-
const inp = input[ch];
|
|
199
|
-
const out = output[ch];
|
|
200
|
-
for (let i = 0; i < inp.length; i++)
|
|
201
|
-
out[i] = inp[i] * gainLin;
|
|
202
|
-
}
|
|
203
|
-
return true;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
/* register the new audio nodes */
|
|
207
|
-
registerProcessor("dynamics", DynamicsProcessor);
|
|
208
|
-
//# sourceMappingURL=speechflow-node-a2a-dynamics-wt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"speechflow-node-a2a-dynamics-wt.js","sourceRoot":"","sources":["../src/speechflow-node-a2a-dynamics-wt.ts"],"names":[],"mappings":";AAAA;;;;EAIE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,0DAA2C;AAE3C,iEAAiE;AACjE,MAAM,iBAAkB,SAAQ,qBAAqB;IACjD,sBAAsB;IACd,GAAG,GAAa,EAAE,CAAA;IAClB,UAAU,CAAQ;IACnB,SAAS,GAAG,CAAC,CAAA;IAEpB,2BAA2B;IAC3B,MAAM,KAAK,oBAAoB;QAC3B,OAAO;YACH,EAAE,IAAI,EAAE,MAAM,EAAY,YAAY,EAAE,CAAC,EAAM,QAAQ,EAAE,CAAC,EAAO,QAAQ,EAAE,CAAC,EAAI,cAAc,EAAE,QAAQ,EAAE,EAAE,+BAA+B;YAC3I,EAAE,IAAI,EAAE,WAAW,EAAO,YAAY,EAAE,CAAC,EAAE,EAAI,QAAQ,EAAE,CAAC,GAAG,EAAI,QAAQ,E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,MAAM,kBAAkB,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAA;gBAC3D,IAAI,kBAAkB,GAAG,OAAO,EAAE,CAAC;oBAC/B,MAAM,YAAY,GAAG,OAAO,GAAG,kBAAkB,CAAA;oBACjD,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;gBACzC,CAAC;YACL,CAAC;YAED,oCAAoC;YACpC,MAAM,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,CAAA;YACrB,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAA;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE;gBAC/B,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;QACjC,CAAC;QACD,OAAO,IAAI,CAAA;IACf,CAAC;CACJ;AAED,oCAAoC;AACpC,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import SpeechFlowNode from "./speechflow-node";
|
|
2
|
-
export default class SpeechFlowNodeDynamics extends SpeechFlowNode {
|
|
3
|
-
static name: string;
|
|
4
|
-
private destroyed;
|
|
5
|
-
private dynamics;
|
|
6
|
-
private bus;
|
|
7
|
-
private intervalId;
|
|
8
|
-
constructor(id: string, cfg: {
|
|
9
|
-
[id: string]: any;
|
|
10
|
-
}, opts: {
|
|
11
|
-
[id: string]: any;
|
|
12
|
-
}, args: any[]);
|
|
13
|
-
open(): Promise<void>;
|
|
14
|
-
close(): Promise<void>;
|
|
15
|
-
}
|