@speechly/browser-ui
Advanced tools
Comparing version 1.3.12 to 3.13.0
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e}function a(t){return 0===Object.keys(t).length}function d(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const u="undefined"!=typeof window;let f=u?()=>window.performance.now():()=>Date.now(),h=u?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&h(p)}function m(t){let e;return 0===g.size&&h(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}let $=!1;const b=new Set;function y(t,e){$&&b.delete(e),e.parentNode!==t&&t.appendChild(e)}function w(t,e,n){$&&b.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function v(t){$?b.add(t):t.parentNode&&t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function _(){return C(" ")}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function E(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function N(t,e,n){t.classList[n?"add":"remove"](e)}function T(t){const e={};for(const n of t)e[n.name]=n.value;return e}const P=new Set;let R,z=0;function D(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const d=a+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${c}`,f=t.ownerDocument;P.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(x("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[u]||(g[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${u} ${o}ms linear ${i}ms 1 both`,z+=1,u}function B(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),z-=i,z||h((()=>{z||(P.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),P.clear())})))}function M(t){R=t}function A(){if(!R)throw new Error("Function called outside component initialization");return R}const F=[],I=[],O=[],j=[],L=Promise.resolve();let H=!1;function V(t){O.push(t)}let q=!1;const U=new Set;function W(){if(!q){q=!0;do{for(let t=0;t<F.length;t+=1){const e=F[t];M(e),G(e.$$)}for(M(null),F.length=0;I.length;)I.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];U.has(e)||(U.add(e),e())}O.length=0}while(F.length);for(;j.length;)j.pop()();H=!1,q=!1,U.clear()}}function G(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(V)}}let J;function K(){return J||(J=Promise.resolve(),J.then((()=>{J=null}))),J}function Q(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const X=new Set;let Y;function Z(t,e){t&&t.i&&(X.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(X.has(t))return;X.add(t),Y.c.push((()=>{X.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const et={duration:0};function nt(n,o,i){let r,c,l=o(n,i),a=!1,d=0;function u(){r&&B(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:g}=l||et;g&&(r=D(n,0,1,i,o,s,g,d++)),h(0,1);const p=f()+o,$=p+i;c&&c.abort(),a=!0,V((()=>Q(n,!0,"start"))),c=m((t=>{if(a){if(t>=$)return h(1,0),Q(n,!0,"end"),u(),a=!1;if(t>=p){const e=s((t-p)/i);h(e,1-e)}}return a}))}let g=!1;return{start(){g||(B(n),s(l)?(l=l(),K().then(h)):h())},invalidate(){g=!1},end(){a&&(u(),a=!1)}}}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function it(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:d}=t.$$;c&&c.m(e,n),i||V((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(V)}function rt(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(F.push(t),H||(H=!0,L.then(W)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(e,n,o,s,c,l,a=[-1]){const d=R;M(e);const u=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:i(),dirty:a,skip_bound:!1};let f=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&c(u.ctx[t],u.ctx[t]=i)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](i),f&&st(e,t)),n})):[],u.update(),f=!0,r(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){$=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);u.fragment&&u.fragment.l(t),t.forEach(v)}else u.fragment&&u.fragment.c();n.intro&&Z(e.$$.fragment),it(e,n.target,n.anchor,n.customElement),function(){$=!1;for(const t of b)t.parentNode.removeChild(t);b.clear()}(),W()}M(d)}let lt;"function"==typeof HTMLElement&&(lt=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){rt(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var at,dt,ut,ft,ht,gt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(at={exports:{}},at.exports),at.exports);function pt(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function mt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function $t(t,{delay:e=0,speed:n,duration:o,easing:i=mt}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(dt||(dt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(ut||(ut={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(ft||(ft={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(ht||(ht={})),gt.ClientState.Disconnected,ut.Poweron,ft.Click,ht.None,gt.ClientState.Disconnecting,ut.Poweron,ft.Noninteractive,ht.Connecting,gt.ClientState.Connecting,ut.Poweron,ft.Noninteractive,ht.Connecting,gt.ClientState.Connected,ut.Mic,ft.Hold,ht.None,gt.ClientState.Starting,ut.Mic,ft.Hold,ht.Connecting,gt.ClientState.Recording,ut.Mic,ft.Hold,ht.None,gt.ClientState.Stopping,ut.Mic,ft.Noninteractive,ht.Busy,gt.ClientState.Failed,ut.Error,ft.Click,ht.None,gt.ClientState.NoBrowserSupport,ut.Error,ft.Click,ht.None,gt.ClientState.NoAudioConsent,ut.Denied,ft.Click,ht.None,dt.Idle,ut.Poweron,ft.Click,ht.None,dt.Connecting,ut.Poweron,ft.Noninteractive,ht.Connecting,dt.Ready,ut.Mic,ft.Hold,ht.None,dt.Recording,ut.Mic,ft.Hold,ht.None,dt.Loading,ut.Mic,ft.Noninteractive,ht.Busy,dt.Failed,ut.Error,ft.Click,ht.None,dt.NoBrowserSupport,ut.Error,ft.Click,ht.None,dt.NoAudioConsent,ut.Denied,ft.Click,ht.None;const bt=[0,1];function yt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),l=r-s;return(1-l)*t[s]+l*t[c]}function wt(e){let n;return{c(){n=x("canvas"),E(n,"color",e[0]),E(n,"display","block"),E(n,"width","1.35rem"),E(n,"height","1.5rem"),E(n,"margin","0"),E(n,"padding","0 0.8rem 0 0rem"),E(n,"flex-grow","0"),E(n,"flex-shrink","0"),E(n,"flex-basis","1.35rem"),S(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&E(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function vt(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,l=[0,0];const a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return function(t){A().$$.on_mount.push(t)}((()=>{let t;const e=2*(l.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),u=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=u*i,r),n(1,r.height=f*i,r),Date.now()<c?l[0]=.15*s+.85*l[0]:l[0]=.0625+.75*l[0];let h=1;for(;h<l.length;)l[h]=.25*l[h-1]+.5*l[h]+.0625,h++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",h=0;h<l.length;h++){const t=l[h]*r.height;t*r.height>2*g?a(e,.5*r.width-g+h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*r.height>2*g?a(e,.5*r.width-g-h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return d(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){I[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class xt extends class{$destroy(){rt(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=x("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",y(document.head,e)),ct(this,t,vt,wt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const kt=[];function Ct(t){return"[object Date]"===Object.prototype.toString.call(t)}function _t(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>_t(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(Ct(t)&&Ct(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=_t(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function St(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!kt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),kt.push(n,e)}if(t){for(let t=0;t<kt.length;t+=2)kt[t][0](kt[t+1]);kt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const l=[s,c];return i.push(l),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(l);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,l=o;function a(t,c){if(null==o)return r.set(o=t),Promise.resolve();l=t;let a=s,d=!1,{delay:u=0,duration:h=400,easing:g=e,interpolate:p=_t}=n(n({},i),c);if(0===h)return a&&(a.abort(),a=null),r.set(o=l),Promise.resolve();const $=f()+u;let b;return s=m((e=>{if(e<$)return!0;d||(b=p(o,t),"function"==typeof h&&(h=h(o,t)),d=!0),a&&(a.abort(),a=null);const n=e-$;return n>h?(r.set(o=t),!1):(r.set(o=b(g(n/h))),!0)})),s.promise}return{set:a,update:(t,e)=>a(t(l,o),e),subscribe:r.subscribe}}const{window:Et}=ot;function Nt(t,e,n){const o=t.slice();return o[37]=e[n],o[39]=n,o}function Tt(n){let o,i,c,l,a,d,u,h,g,p,$,b,k=n[15]&&Pt(),C={color:n[5]};a=new xt({props:C}),n[29](a);let E=n[14]&&Rt(n),N=n[10],T=[];for(let t=0;t<N.length;t+=1)T[t]=Bt(Nt(n,N,t));let P=n[13]&&Mt(n);return{c(){var t;o=x("div"),i=x("div"),k&&k.c(),c=_(),l=x("div"),(t=a.$$.fragment)&&t.c(),d=_(),E&&E.c(),h=_();for(let t=0;t<T.length;t+=1)T[t].c();g=_(),P&&P.c(),S(l,"class","TransscriptItemContent"),S(i,"class","TranscriptItem"),S(o,"class","BigTranscript")},m(t,e){w(t,o,e),y(o,i),k&&k.m(i,null),y(i,c),y(i,l),it(a,l,null),y(l,d),E&&E.m(l,null),y(o,h);for(let t=0;t<T.length;t+=1)T[t].m(o,null);y(o,g),P&&P.m(o,null),b=!0},p(t,e){t[15]?k||(k=Pt(),k.c(),k.m(i,c)):k&&(k.d(1),k=null);const n={};if(32&e[0]&&(n.color=t[5]),a.$set(n),t[14]?E?16384&e[0]&&Z(E,1):(E=Rt(t),E.c(),Z(E,1),E.m(l,null)):E&&(E.d(1),E=null),4236288&e[0]){let n;for(N=t[10],n=0;n<N.length;n+=1){const i=Nt(t,N,n);T[n]?(T[n].p(i,e),Z(T[n],1)):(T[n]=Bt(i),T[n].c(),Z(T[n],1),T[n].m(o,g))}for(;n<T.length;n+=1)T[n].d(1);T.length=N.length}t[13]?P?(P.p(t,e),8192&e[0]&&Z(P,1)):(P=Mt(t),P.c(),Z(P,1),P.m(o,null)):P&&(P.d(1),P=null)},i(t){if(!b){Z(a.$$.fragment,t),Z(E),u||V((()=>{u=nt(i,n[20],{duration:200}),u.start()}));for(let t=0;t<N.length;t+=1)Z(T[t]);Z(P),V((()=>{$&&$.end(1),p||(p=nt(o,n[19],{})),p.start()})),b=!0}},o(i){tt(a.$$.fragment,i),p&&p.invalidate(),$=function(n,o,i){let c,l=o(n,i),a=!0;const d=Y;function u(){const{delay:o=0,duration:i=300,easing:s=e,tick:u=t,css:h}=l||et;h&&(c=D(n,1,0,i,o,s,h));const g=f()+o,p=g+i;V((()=>Q(n,!1,"start"))),m((t=>{if(a){if(t>=p)return u(0,1),Q(n,!1,"end"),--d.r||r(d.c),!1;if(t>=g){const e=s((t-g)/i);u(1-e,e)}}return a}))}return d.r+=1,s(l)?K().then((()=>{l=l(),u()})):u(),{end(t){t&&l.tick&&l.tick(1,0),a&&(c&&B(n,c),a=!1)}}}(o,n[19],{}),b=!1},d(t){t&&v(o),k&&k.d(),n[29](null),rt(a),E&&E.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),P&&P.d(),t&&$&&$.end()}}}function Pt(t){let e;return{c(){e=x("div"),S(e,"class","TransscriptItemBgDiv")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function Rt(e){let n,o;return{c(){n=x("div"),n.textContent="Listening...",S(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||V((()=>{o=nt(n,e[20],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function zt(e){let n,o;return{c(){n=x("div"),S(n,"class","TransscriptItemBgDiv")},m(t,e){w(t,n,e)},i(t){o||V((()=>{o=nt(n,e[20],{}),o.start()}))},o:t,d(t){t&&v(n)}}}function Dt(t){let e,n;return{c(){e=x("span"),S(e,"style",n=t[39]<t[10].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){9216&o[0]&&n!==(n=t[39]<t[10].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&S(e,"style",n)},d(t){t&&v(e)}}}function Bt(e){let n,o,i,r,s,c,l,a=e[37].word+"",d=e[15]&&zt(e),u=e[39]<e[10].length&&Dt(e);return{c(){n=x("div"),d&&d.c(),o=_(),i=x("div"),r=C(a),s=_(),u&&u.c(),S(i,"class","TransscriptItemContent"),S(n,"class",l="TranscriptItem "+e[22](e[37])),N(n,"Entity",null!==e[37].entityType),N(n,"Final",e[37].isFinal)},m(t,e){w(t,n,e),d&&d.m(n,null),y(n,o),y(n,i),y(i,r),y(i,s),u&&u.m(i,null)},p(t,e){t[15]?d?32768&e[0]&&Z(d,1):(d=zt(t),d.c(),Z(d,1),d.m(n,o)):d&&(d.d(1),d=null),1024&e[0]&&a!==(a=t[37].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,a),t[39]<t[10].length?u?u.p(t,e):(u=Dt(t),u.c(),u.m(i,null)):u&&(u.d(1),u=null),1024&e[0]&&l!==(l="TranscriptItem "+t[22](t[37]))&&S(n,"class",l),1024&e[0]&&N(n,"Entity",null!==t[37].entityType),1024&e[0]&&N(n,"Final",t[37].isFinal)},i(t){Z(d),c||V((()=>{c=nt(i,e[20],{}),c.start()}))},o:t,d(t){t&&v(n),d&&d.d(),u&&u.d()}}}function Mt(e){let n,o,i,r,s,c,l,a;return{c(){n=x("div"),o=x("div"),i=_(),r=x("div"),s=k("svg"),c=k("path"),S(o,"class","TransscriptItemBgDiv"),E(o,"background-color",e[5]),S(c,"stroke","currentColor"),S(c,"stroke-width","3"),S(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),S(c,"fill","none"),S(c,"fill-rule","evenodd"),E(s,"width","2rem"),E(s,"height","2rem"),E(s,"position","absolute"),E(s,"transform","translate(-0.6rem, -0.5rem)"),E(s,"stroke","#eee"),S(s,"viewBox","0 0 24 24"),S(s,"xmlns","http://www.w3.org/2000/svg"),E(r,"width","1.0rem"),E(r,"height","1rem"),E(r,"position","relative"),S(n,"class","TranscriptItem")},m(t,e){w(t,n,e),y(n,o),y(n,i),y(n,r),y(r,s),y(s,c)},p(t,e){32&e[0]&&E(o,"background-color",t[5])},i(t){l||V((()=>{l=nt(c,e[18],{duration:500}),l.start()})),a||V((()=>{a=nt(n,e[20],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function At(e){let n,o,i,s,c,l,a=e[11]&&Tt(e);return{c(){n=x("main"),a&&a.c(),o=_(),i=x("link"),this.c=t,E(n,"--voffset",e[1]),E(n,"--hoffset",e[2]),E(n,"--fontsize",e[3]),E(n,"--color",e[4]),E(n,"--highlight-color",e[5]),E(n,"--text-bg-color",e[6]),E(n,"--gradient-stop1",e[7]),E(n,"--gradient-stop2",e[8]),E(n,"--marginbottom",e[9]),E(n,"--transition",e[16].transition),N(n,"placementTop","top"===e[0]),S(i,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),S(i,"rel","stylesheet")},m(t,r){var d,u,f,h;w(t,n,r),a&&a.m(n,null),w(t,o,r),y(document.head,i),s=!0,c||(d=Et,u="message",f=e[21],d.addEventListener(u,f,h),l=()=>d.removeEventListener(u,f,h),c=!0)},p(t,e){t[11]?a?(a.p(t,e),2048&e[0]&&Z(a,1)):(a=Tt(t),a.c(),Z(a,1),a.m(n,null)):a&&(Y={r:0,c:[],p:Y},tt(a,1,1,(()=>{a=null})),Y.r||r(Y.c),Y=Y.p),(!s||2&e[0])&&E(n,"--voffset",t[1]),(!s||4&e[0])&&E(n,"--hoffset",t[2]),(!s||8&e[0])&&E(n,"--fontsize",t[3]),(!s||16&e[0])&&E(n,"--color",t[4]),(!s||32&e[0])&&E(n,"--highlight-color",t[5]),(!s||64&e[0])&&E(n,"--text-bg-color",t[6]),(!s||128&e[0])&&E(n,"--gradient-stop1",t[7]),(!s||256&e[0])&&E(n,"--gradient-stop2",t[8]),(!s||512&e[0])&&E(n,"--marginbottom",t[9]),(!s||65536&e[0])&&E(n,"--transition",t[16].transition),1&e[0]&&N(n,"placementTop","top"===t[0])},i(t){s||(Z(a),s=!0)},o(t){tt(a),s=!1},d(t){t&&v(n),a&&a.d(),t&&v(o),v(i),c=!1,l()}}}function Ft(t,e,n){let o,i,r,s,c,{placement:l}=e,{voffset:a="3rem"}=e,{hoffset:u="2rem"}=e,{fontsize:f="1.5rem"}=e,{color:h="#ffffff"}=e,{highlightcolor:g="#15e8b5"}=e,{backgroundcolor:p="#202020"}=e,{gradientstop1:m="#ffffff88"}=e,{gradientstop2:$="#ffffffcc"}=e,{marginbottom:b="0rem"}=e,{formattext:y}=e,w=[],v=null,x=null,k=gt.ClientState.Disconnected,C=!1,_=!1,S=!1,E=St({transition:0},{duration:200});d(t,E,(t=>n(16,s=t)));const N=A(),T=pt($t),P=pt(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:mt,css:t=>`\n opacity: ${yt(bt,t,0,1)};\n max-height: ${10*yt(bt,t,0,.6)}rem;\n `}))),R=pt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${yt(bt,t,0,1)*o}rem;\n `}))),z=t=>{n(13,S=S||t)},D=t=>{n(27,k=t),k===gt.ClientState.Recording&&(n(13,S=!1),n(10,w=[]),x=null)},B=t=>{if(void 0===t)return;c&&k===gt.ClientState.Recording&&c.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?M(w.length>0?2e3:0):w.length>0&&(C||n(28,C=!0),M(2e3));const e=`${t.contextId}/${t.id}`;null!==x?x!==e&&(n(13,S=!1),x=e):x=e,n(10,w=[]),t.words.forEach((t=>{n(10,w[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},w)})),r?t.entities.forEach((t=>{n(10,w[t.startPosition].word=t.value,w),n(10,w[t.startPosition].entityType=t.type,w),n(10,w[t.startPosition].isFinal=t.isFinal,w),n(10,w[t.startPosition].hide=!1,w);for(let e=t.startPosition+1;e<t.endPosition;e++)w[e]&&n(10,w[e].hide=!0,w)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)w[e]&&(n(10,w[e].entityType=t.type,w),n(10,w[e].isFinal=t.isFinal,w))})),n(10,w=w.filter((t=>!t.hide)))},M=(t=0)=>{F(),v=window.setTimeout((()=>{v=null,C&&n(28,C=!1)}),t)},F=()=>{null!==v&&(window.clearTimeout(v),v=null)};return t.$$set=t=>{"placement"in t&&n(0,l=t.placement),"voffset"in t&&n(1,a=t.voffset),"hoffset"in t&&n(2,u=t.hoffset),"fontsize"in t&&n(3,f=t.fontsize),"color"in t&&n(4,h=t.color),"highlightcolor"in t&&n(5,g=t.highlightcolor),"backgroundcolor"in t&&n(6,p=t.backgroundcolor),"gradientstop1"in t&&n(7,m=t.gradientstop1),"gradientstop2"in t&&n(8,$=t.gradientstop2),"marginbottom"in t&&n(9,b=t.marginbottom),"formattext"in t&&n(23,y=t.formattext)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&n(14,o=0===w.length),64&t.$$.dirty[0]&&n(15,i="none"!==p),8388608&t.$$.dirty[0]&&(r=void 0===y||"false"!==y),402655232&t.$$.dirty[0]){const t=k===gt.ClientState.Recording||C;t!==_&&(e="visibilitychanged",s=t,N.dispatchEvent(new CustomEvent(e,{detail:s,composed:!0}))),n(11,_=t),E.set({transition:_?1:0})}var e,s},[l,a,u,f,h,g,p,m,$,b,w,_,c,S,o,i,s,E,T,P,R,t=>{switch(t.data.type){case"speechsegment":B(t.data.segment);break;case"speechhandled":z(t.data.success);break;case"speechstate":D(t.data.state)}},t=>t.entityType||"",y,z,D,B,k,C,function(t){I[t?"unshift":"push"]((()=>{c=t,n(12,c)}))}]}class It extends lt{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",ct(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},Ft,At,l,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:23,speechhandled:24,speechstate:25,speechsegment:26},[-1,-1]),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),W()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),W()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),W()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),W()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),W()}get color(){return this.$$.ctx[4]}set color(t){this.$set({color:t}),W()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),W()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),W()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),W()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),W()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$set({marginbottom:t}),W()}get formattext(){return this.$$.ctx[23]}set formattext(t){this.$set({formattext:t}),W()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",It)}(); | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e}function a(t){return 0===Object.keys(t).length}function d(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const u="undefined"!=typeof window;let f=u?()=>window.performance.now():()=>Date.now(),h=u?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&h(p)}function m(t){let e;return 0===g.size&&h(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}let $=!1;const b=new Set;function y(t,e){$&&b.delete(e),e.parentNode!==t&&t.appendChild(e)}function w(t,e,n){$&&b.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function v(t){$?b.add(t):t.parentNode&&t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function C(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function k(t){return document.createTextNode(t)}function _(){return k(" ")}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function E(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function N(t,e,n){t.classList[n?"add":"remove"](e)}function T(t){const e={};for(const n of t)e[n.name]=n.value;return e}const P=new Set;let R,z=0;function D(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),z-=i,z||h((()=>{z||(P.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),P.clear())})))}function B(t){R=t}function M(){if(!R)throw new Error("Function called outside component initialization");return R}const A=[],F=[],I=[],O=[],j=Promise.resolve();let L=!1;function H(t){I.push(t)}let V=!1;const q=new Set;function U(){if(!V){V=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];B(e),W(e.$$)}for(B(null),A.length=0;F.length;)F.pop()();for(let t=0;t<I.length;t+=1){const e=I[t];q.has(e)||(q.add(e),e())}I.length=0}while(A.length);for(;O.length;)O.pop()();L=!1,V=!1,q.clear()}}function W(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(H)}}let G;function J(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const K=new Set;function Q(t,e){t&&t.i&&(K.delete(t),t.i(e))}const X={duration:0};function Y(n,o,i){let r,c,l=o(n,i),a=!1,d=0;function u(){r&&D(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:g}=l||X;g&&(r=function(t,e,n,o,i,r,s,c=0){const l=16.666/o;let a="{\n";for(let t=0;t<=1;t+=l){const o=e+(n-e)*r(t);a+=100*t+`%{${s(o,1-o)}}\n`}const d=a+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${c}`,f=t.ownerDocument;P.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(x("style")).sheet),g=f.__svelte_rules||(f.__svelte_rules={});g[u]||(g[u]=!0,h.insertRule(`@keyframes ${u} ${d}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${u} ${o}ms linear ${i}ms 1 both`,z+=1,u}(n,0,1,i,o,s,g,d++)),h(0,1);const p=f()+o,$=p+i;c&&c.abort(),a=!0,H((()=>J(n,!0,"start"))),c=m((t=>{if(a){if(t>=$)return h(1,0),J(n,!0,"end"),u(),a=!1;if(t>=p){const e=s((t-p)/i);h(e,1-e)}}return a}))}let g=!1;return{start(){g||(D(n),s(l)?(l=l(),(G||(G=Promise.resolve(),G.then((()=>{G=null}))),G).then(h)):h())},invalidate(){g=!1},end(){a&&(u(),a=!1)}}}const Z="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function tt(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:d}=t.$$;c&&c.m(e,n),i||H((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(H)}function et(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function nt(t,e){-1===t.$$.dirty[0]&&(A.push(t),L||(L=!0,j.then(U)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ot(e,n,o,s,c,l,a=[-1]){const d=R;B(e);const u=e.$$={fragment:null,ctx:null,props:l,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:i(),dirty:a,skip_bound:!1};let f=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&c(u.ctx[t],u.ctx[t]=i)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](i),f&&nt(e,t)),n})):[],u.update(),f=!0,r(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){$=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);u.fragment&&u.fragment.l(t),t.forEach(v)}else u.fragment&&u.fragment.c();n.intro&&Q(e.$$.fragment),tt(e,n.target,n.anchor,n.customElement),function(){$=!1;for(const t of b)t.parentNode.removeChild(t);b.clear()}(),U()}B(d)}let it;"function"==typeof HTMLElement&&(it=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){et(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var rt,st,ct,lt,at,dt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(rt={exports:{}},rt.exports),rt.exports);function ut(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function ft(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ht(t,{delay:e=0,speed:n,duration:o,easing:i=ft}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(st||(st={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(ct||(ct={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(lt||(lt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(at||(at={})),dt.ClientState.Disconnected,ct.Poweron,lt.Click,at.None,dt.ClientState.Disconnecting,ct.Poweron,lt.Noninteractive,at.Connecting,dt.ClientState.Connecting,ct.Poweron,lt.Noninteractive,at.Connecting,dt.ClientState.Connected,ct.Mic,lt.Hold,at.None,dt.ClientState.Starting,ct.Mic,lt.Hold,at.Connecting,dt.ClientState.Recording,ct.Mic,lt.Hold,at.None,dt.ClientState.Stopping,ct.Mic,lt.Noninteractive,at.Busy,dt.ClientState.Failed,ct.Error,lt.Click,at.None,dt.ClientState.NoBrowserSupport,ct.Error,lt.Click,at.None,dt.ClientState.NoAudioConsent,ct.Denied,lt.Click,at.None,st.Idle,ct.Poweron,lt.Click,at.None,st.Connecting,ct.Poweron,lt.Noninteractive,at.Connecting,st.Ready,ct.Mic,lt.Hold,at.None,st.Recording,ct.Mic,lt.Hold,at.None,st.Loading,ct.Mic,lt.Noninteractive,at.Busy,st.Failed,ct.Error,lt.Click,at.None,st.NoBrowserSupport,ct.Error,lt.Click,at.None,st.NoAudioConsent,ct.Denied,lt.Click,at.None;const gt=[0,1];function pt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),l=r-s;return(1-l)*t[s]+l*t[c]}function mt(e){let n;return{c(){n=x("canvas"),E(n,"color",e[0]),E(n,"display","block"),E(n,"width","1.35rem"),E(n,"height","1.5rem"),E(n,"margin","0"),E(n,"padding","0 0.8rem 0 0rem"),E(n,"flex-grow","0"),E(n,"flex-shrink","0"),E(n,"flex-basis","1.35rem"),S(n,"class","svelte-1fz8oog")},m(t,o){w(t,n,o),e[3](n)},p(t,[e]){1&e&&E(n,"color",t[0])},i:t,o:t,d(t){t&&v(n),e[3](null)}}}function $t(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,l=[0,0];const a=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return function(t){M().$$.on_mount.push(t)}((()=>{let t;const e=2*(l.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),u=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),f=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=u*i,r),n(1,r.height=f*i,r),Date.now()<c?l[0]=.15*s+.85*l[0]:l[0]=.0625+.75*l[0];let h=1;for(;h<l.length;)l[h]=.25*l[h-1]+.5*l[h]+.0625,h++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",h=0;h<l.length;h++){const t=l[h]*r.height;t*r.height>2*g?a(e,.5*r.width-g+h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),h>0&&(t*r.height>2*g?a(e,.5*r.width-g-h*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-h*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return d(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){F[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class bt extends class{$destroy(){et(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!a(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=x("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",y(document.head,e)),ot(this,t,$t,mt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const yt=[];function wt(t){return"[object Date]"===Object.prototype.toString.call(t)}function vt(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>vt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(wt(t)&&wt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=vt(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function xt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!yt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),yt.push(n,e)}if(t){for(let t=0;t<yt.length;t+=2)yt[t][0](yt[t+1]);yt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const l=[s,c];return i.push(l),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(l);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,l=o;function a(t,c){if(null==o)return r.set(o=t),Promise.resolve();l=t;let a=s,d=!1,{delay:u=0,duration:h=400,easing:g=e,interpolate:p=vt}=n(n({},i),c);if(0===h)return a&&(a.abort(),a=null),r.set(o=l),Promise.resolve();const $=f()+u;let b;return s=m((e=>{if(e<$)return!0;d||(b=p(o,t),"function"==typeof h&&(h=h(o,t)),d=!0),a&&(a.abort(),a=null);const n=e-$;return n>h?(r.set(o=t),!1):(r.set(o=b(g(n/h))),!0)})),s.promise}return{set:a,update:(t,e)=>a(t(l,o),e),subscribe:r.subscribe}}const{window:Ct}=Z;function kt(t,e,n){const o=t.slice();return o[39]=e[n],o[41]=n,o}function _t(t){let e;return{c(){e=x("div"),S(e,"class","TransscriptItemBgDiv")},m(t,n){w(t,e,n)},d(t){t&&v(e)}}}function St(e){let n,o;return{c(){n=x("div"),n.textContent="Listening...",S(n,"class","listening")},m(t,e){w(t,n,e)},i(t){o||H((()=>{o=Y(n,e[19],{duration:400}),o.start()}))},o:t,d(t){t&&v(n)}}}function Et(e){let n,o;return{c(){n=x("div"),S(n,"class","TransscriptItemBgDiv")},m(t,e){w(t,n,e)},p(t,n){e=t},i(t){o||H((()=>{o=Y(n,e[19],{duration:e[15]}),o.start()}))},o:t,d(t){t&&v(n)}}}function Nt(t){let e,n;return{c(){e=x("span"),S(e,"style",n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")},m(t,n){w(t,e,n)},p(t,o){5120&o[0]&&n!==(n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")&&S(e,"style",n)},d(t){t&&v(e)}}}function Tt(e){let n,o,i,r,s,c,l,a=e[39].word+"",d=e[14]&&Et(e),u=e[41]<e[10].length&&Nt(e);return{c(){n=x("div"),d&&d.c(),o=_(),i=x("div"),r=k(a),s=_(),u&&u.c(),S(i,"class","TransscriptItemContent"),S(n,"class",l="TranscriptItem "+e[21](e[39])),N(n,"Entity",null!==e[39].entityType),N(n,"Final",e[39].isFinal)},m(t,e){w(t,n,e),d&&d.m(n,null),y(n,o),y(n,i),y(i,r),y(i,s),u&&u.m(i,null)},p(t,s){(e=t)[14]?d?16384&s[0]&&Q(d,1):(d=Et(e),d.c(),Q(d,1),d.m(n,o)):d&&(d.d(1),d=null),1024&s[0]&&a!==(a=e[39].word+"")&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(r,a),e[41]<e[10].length?u?u.p(e,s):(u=Nt(e),u.c(),u.m(i,null)):u&&(u.d(1),u=null),1024&s[0]&&l!==(l="TranscriptItem "+e[21](e[39]))&&S(n,"class",l),1024&s[0]&&N(n,"Entity",null!==e[39].entityType),1024&s[0]&&N(n,"Final",e[39].isFinal)},i(t){Q(d),c||H((()=>{c=Y(i,e[19],{duration:e[15]}),c.start()}))},o:t,d(t){t&&v(n),d&&d.d(),u&&u.d()}}}function Pt(e){let n,o,i,r,s,c,l,a;return{c(){n=x("div"),o=x("div"),i=_(),r=x("div"),s=C("svg"),c=C("path"),S(o,"class","TransscriptItemBgDiv"),E(o,"background-color",e[5]),S(c,"stroke","currentColor"),S(c,"stroke-width","3"),S(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),S(c,"fill","none"),S(c,"fill-rule","evenodd"),E(s,"width","2rem"),E(s,"height","2rem"),E(s,"position","absolute"),E(s,"transform","translate(-0.6rem, -0.5rem)"),E(s,"stroke","#eee"),S(s,"viewBox","0 0 24 24"),S(s,"xmlns","http://www.w3.org/2000/svg"),E(r,"width","1.0rem"),E(r,"height","1rem"),E(r,"position","relative"),S(n,"class","TranscriptItem")},m(t,e){w(t,n,e),y(n,o),y(n,i),y(n,r),y(r,s),y(s,c)},p(t,e){32&e[0]&&E(o,"background-color",t[5])},i(t){l||H((()=>{l=Y(c,e[18],{duration:500}),l.start()})),a||H((()=>{a=Y(n,e[19],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&v(n)}}}function Rt(e){let n,o,i,r,s,c,l,a,d,u,f,h,g,p,m=e[14]&&_t(),$={color:e[5]};c=new bt({props:$}),e[31](c);let b=e[13]&&St(e),C=e[10],k=[];for(let t=0;t<C.length;t+=1)k[t]=Tt(kt(e,C,t));let T=e[12]&&Pt(e);return{c(){var h;n=x("main"),o=x("div"),i=x("div"),m&&m.c(),r=_(),s=x("div"),(h=c.$$.fragment)&&h.c(),l=_(),b&&b.c(),a=_();for(let t=0;t<k.length;t+=1)k[t].c();d=_(),T&&T.c(),u=_(),f=x("link"),this.c=t,S(s,"class","TransscriptItemContent"),S(i,"class","TranscriptItem"),S(o,"class","BigTranscript"),E(n,"--voffset",e[1]),E(n,"--hoffset",e[2]),E(n,"--fontsize",e[3]),E(n,"--color",e[4]),E(n,"--highlight-color",e[5]),E(n,"--text-bg-color",e[6]),E(n,"--gradient-stop1",e[7]),E(n,"--gradient-stop2",e[8]),E(n,"--marginbottom",e[9]),E(n,"--transition",e[16].transition),E(n,"opacity",e[16].transition),E(n,"max-height",10*pt(gt,e[16].transition,0,.6)+"rem"),E(n,"visibility",0!==e[16].transition?"visible":"hidden"),N(n,"placementTop","top"===e[0]),S(f,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),S(f,"rel","stylesheet")},m(t,$){w(t,n,$),y(n,o),y(o,i),m&&m.m(i,null),y(i,r),y(i,s),tt(c,s,null),y(s,l),b&&b.m(s,null),y(o,a);for(let t=0;t<k.length;t+=1)k[t].m(o,null);var v,x,C,_;y(o,d),T&&T.m(o,null),w(t,u,$),y(document.head,f),h=!0,g||(v=Ct,x="message",C=e[20],v.addEventListener(x,C,_),p=()=>v.removeEventListener(x,C,_),g=!0)},p(t,e){t[14]?m||(m=_t(),m.c(),m.m(i,r)):m&&(m.d(1),m=null);const l={};if(32&e[0]&&(l.color=t[5]),c.$set(l),t[13]?b?8192&e[0]&&Q(b,1):(b=St(t),b.c(),Q(b,1),b.m(s,null)):b&&(b.d(1),b=null),2118656&e[0]){let n;for(C=t[10],n=0;n<C.length;n+=1){const i=kt(t,C,n);k[n]?(k[n].p(i,e),Q(k[n],1)):(k[n]=Tt(i),k[n].c(),Q(k[n],1),k[n].m(o,d))}for(;n<k.length;n+=1)k[n].d(1);k.length=C.length}t[12]?T?(T.p(t,e),4096&e[0]&&Q(T,1)):(T=Pt(t),T.c(),Q(T,1),T.m(o,null)):T&&(T.d(1),T=null),(!h||2&e[0])&&E(n,"--voffset",t[1]),(!h||4&e[0])&&E(n,"--hoffset",t[2]),(!h||8&e[0])&&E(n,"--fontsize",t[3]),(!h||16&e[0])&&E(n,"--color",t[4]),(!h||32&e[0])&&E(n,"--highlight-color",t[5]),(!h||64&e[0])&&E(n,"--text-bg-color",t[6]),(!h||128&e[0])&&E(n,"--gradient-stop1",t[7]),(!h||256&e[0])&&E(n,"--gradient-stop2",t[8]),(!h||512&e[0])&&E(n,"--marginbottom",t[9]),(!h||65536&e[0])&&E(n,"--transition",t[16].transition),(!h||65536&e[0])&&E(n,"opacity",t[16].transition),(!h||65536&e[0])&&E(n,"max-height",10*pt(gt,t[16].transition,0,.6)+"rem"),(!h||65536&e[0])&&E(n,"visibility",0!==t[16].transition?"visible":"hidden"),1&e[0]&&N(n,"placementTop","top"===t[0])},i(t){if(!h){Q(c.$$.fragment,t),Q(b);for(let t=0;t<C.length;t+=1)Q(k[t]);Q(T),h=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(K.has(t))return;K.add(t),(void 0).c.push((()=>{K.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(c.$$.fragment,t),h=!1},d(t){t&&v(n),m&&m.d(),e[31](null),et(c),b&&b.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(k,t),T&&T.d(),t&&v(u),v(f),g=!1,p()}}}function zt(t,e,n){let o,i,r,s,c,l,a,{placement:u}=e,{voffset:f="3rem"}=e,{hoffset:h="2rem"}=e,{fontsize:g="1.5rem"}=e,{color:p="#ffffff"}=e,{highlightcolor:m="#15e8b5"}=e,{backgroundcolor:$="#202020"}=e,{gradientstop1:b="#ffffff88"}=e,{gradientstop2:y="#ffffffcc"}=e,{marginbottom:w="0rem"}=e,{formattext:v}=e,{demomode:x}=e,C=[],k=null,_=null,S=dt.ClientState.Disconnected,E=!1,N=!1,T=!1,P=xt({transition:0},{duration:200});d(t,P,(t=>n(16,l=t)));const R=M(),z=ut(ht),D=ut(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${pt(gt,t,0,1)*o}rem;\n `}))),B=t=>{n(12,T=T||t)},A=t=>{n(27,S=t),S===dt.ClientState.Recording&&(n(12,T=!1),n(10,C=[]),_=null)},I=t=>{if(void 0===t)return;a&&(s||S===dt.ClientState.Recording)&&a.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?O(C.length>0?s?3500:2e3:0):C.length>0&&(E||n(28,E=!0),O(2e3));const e=`${t.contextId}/${t.id}`;null!==_?_!==e&&(n(12,T=!1),_=e):_=e,n(10,C=[]),t.words.forEach((t=>{n(10,C[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},C)})),r?t.entities.forEach((t=>{n(10,C[t.startPosition].word=t.value,C),n(10,C[t.startPosition].entityType=t.type,C),n(10,C[t.startPosition].isFinal=t.isFinal,C),n(10,C[t.startPosition].hide=!1,C);for(let e=t.startPosition+1;e<t.endPosition;e++)C[e]&&n(10,C[e].hide=!0,C)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)C[e]&&(n(10,C[e].entityType=t.type,C),n(10,C[e].isFinal=t.isFinal,C))})),n(10,C=C.filter((t=>!t.hide)))},O=(t=0)=>{j(),k=window.setTimeout((()=>{k=null,E&&n(28,E=!1)}),t)},j=()=>{null!==k&&(window.clearTimeout(k),k=null)};return t.$$set=t=>{"placement"in t&&n(0,u=t.placement),"voffset"in t&&n(1,f=t.voffset),"hoffset"in t&&n(2,h=t.hoffset),"fontsize"in t&&n(3,g=t.fontsize),"color"in t&&n(4,p=t.color),"highlightcolor"in t&&n(5,m=t.highlightcolor),"backgroundcolor"in t&&n(6,$=t.backgroundcolor),"gradientstop1"in t&&n(7,b=t.gradientstop1),"gradientstop2"in t&&n(8,y=t.gradientstop2),"marginbottom"in t&&n(9,w=t.marginbottom),"formattext"in t&&n(22,v=t.formattext),"demomode"in t&&n(23,x=t.demomode)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&n(13,o=0===C.length),64&t.$$.dirty[0]&&n(14,i="none"!==$),4194304&t.$$.dirty[0]&&(r=void 0===v||"false"!==v),8388608&t.$$.dirty[0]&&n(30,s=void 0!==x&&"false"!==x),1073741824&t.$$.dirty[0]&&n(15,c=s?800:350),939524096&t.$$.dirty[0]){const t=S===dt.ClientState.Recording||E;t!==N&&(e="visibilitychanged",l=t,R.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(29,N=t),P.set({transition:N?1:0})}var e,l;1073741824&t.$$.dirty[0]&&(s||O(0))},[u,f,h,g,p,m,$,b,y,w,C,a,T,o,i,c,l,P,z,D,t=>{switch(t.data.type){case"speechsegment":I(t.data.segment);break;case"speechhandled":B(t.data.success);break;case"speechstate":A(t.data.state)}},t=>t.entityType||"",v,x,B,A,I,S,E,N,s,function(t){F[t?"unshift":"push"]((()=>{a=t,n(11,a)}))}]}class Dt extends it{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden;white-space:nowrap}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",ot(this,{target:this.shadowRoot,props:T(this.attributes),customElement:!0},zt,Rt,l,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:22,demomode:23,speechhandled:24,speechstate:25,speechsegment:26},[-1,-1]),t&&(t.target&&w(t.target,this,t.anchor),t.props&&(this.$set(t.props),U()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),U()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),U()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),U()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),U()}get color(){return this.$$.ctx[4]}set color(t){this.$set({color:t}),U()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),U()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),U()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),U()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),U()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$set({marginbottom:t}),U()}get formattext(){return this.$$.ctx[22]}set formattext(t){this.$set({formattext:t}),U()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$set({demomode:t}),U()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Dt)}(); | ||
//# sourceMappingURL=big-transcript.js.map |
{ | ||
"name": "@speechly/browser-ui", | ||
"version": "1.3.12", | ||
"version": "3.13.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "**/*" |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}function d(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const h="undefined"!=typeof window;let u=h?()=>window.performance.now():()=>Date.now(),f=h?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&f(p)}function m(t){let e;return 0===g.size&&f(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}let $=!1;const y=new Set;function b(t,e){$&&y.delete(e),e.parentNode!==t&&t.appendChild(e)}function x(t,e,n){$&&y.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function w(t){$?y.add(t):t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function S(){return C(" ")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:E(t,e,n)}function N(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function P(t,e,n){t.classList[n?"add":"remove"](e)}function R(t){const e={};for(const n of t)e[n.name]=n.value;return e}const M=new Set;let D,A=0;function B(t,e,n,o,i,r,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*r(t);l+=100*t+`%{${s(o,1-o)}}\n`}const d=l+`100% {${s(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${c}`,u=t.ownerDocument;M.add(u);const f=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(v("style")).sheet),g=u.__svelte_rules||(u.__svelte_rules={});g[h]||(g[h]=!0,f.insertRule(`@keyframes ${h} ${d}`,f.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${h} ${o}ms linear ${i}ms 1 both`,A+=1,h}function F(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),A-=i,A||f((()=>{A||(M.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),M.clear())})))}function I(t){D=t}function O(){if(!D)throw new Error("Function called outside component initialization");return D}const j=[],L=[],H=[],V=[],q=Promise.resolve();let U=!1;function W(t){H.push(t)}let J=!1;const G=new Set;function K(){if(!J){J=!0;do{for(let t=0;t<j.length;t+=1){const e=j[t];I(e),Q(e.$$)}for(I(null),j.length=0;L.length;)L.pop()();for(let t=0;t<H.length;t+=1){const e=H[t];G.has(e)||(G.add(e),e())}H.length=0}while(j.length);for(;V.length;)V.pop()();U=!1,J=!1,G.clear()}}function Q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(W)}}let X;function Y(){return X||(X=Promise.resolve(),X.then((()=>{X=null}))),X}function Z(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const tt=new Set;let et;function nt(t,e){t&&t.i&&(tt.delete(t),t.i(e))}function ot(t,e,n,o){if(t&&t.o){if(tt.has(t))return;tt.add(t),et.c.push((()=>{tt.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const it={duration:0};function rt(n,o,i){let r,c,a=o(n,i),l=!1,d=0;function h(){r&&F(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=a||it;g&&(r=B(n,0,1,i,o,s,g,d++)),f(0,1);const p=u()+o,$=p+i;c&&c.abort(),l=!0,W((()=>Z(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),Z(n,!0,"end"),h(),l=!1;if(t>=p){const e=s((t-p)/i);f(e,1-e)}}return l}))}let g=!1;return{start(){g||(F(n),s(a)?(a=a(),Y().then(f)):f())},invalidate(){g=!1},end(){l&&(h(),l=!1)}}}const st="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ct(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(e,n),i||W((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(W)}function at(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lt(t,e){-1===t.$$.dirty[0]&&(j.push(t),U||(U=!0,q.then(K)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function dt(e,n,o,s,c,a,l=[-1]){const d=D;I(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let u=!1;if(h.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&c(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),u&<(e,t)),n})):[],h.update(),u=!0,r(h.before_update),h.fragment=!!s&&s(h.ctx),n.target){if(n.hydrate){$=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(w)}else h.fragment&&h.fragment.c();n.intro&&nt(e.$$.fragment),ct(e,n.target,n.anchor,n.customElement),function(){$=!1;for(const t of y)t.parentNode.removeChild(t);y.clear()}(),K()}I(d)}let ht;"function"==typeof HTMLElement&&(ht=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){at(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function ut(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ft(t){return t*t*t}function gt(t){const e=t-1;return e*e*e+1}const pt=[];function mt(t){return"[object Date]"===Object.prototype.toString.call(t)}function $t(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>$t(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(mt(t)&&mt(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=$t(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function yt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!pt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),pt.push(n,e)}if(t){for(let t=0;t<pt.length;t+=2)pt[t][0](pt[t+1]);pt.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const a=[s,c];return i.push(a),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(a);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return r.set(o=t),Promise.resolve();a=t;let l=s,d=!1,{delay:h=0,duration:f=400,easing:g=e,interpolate:p=$t}=n(n({},i),c);if(0===f)return l&&(l.abort(),l=null),r.set(o=a),Promise.resolve();const $=u()+h;let y;return s=m((e=>{if(e<$)return!0;d||(y=p(o,t),"function"==typeof f&&(f=f(o,t)),d=!0),l&&(l.abort(),l=null);const n=e-$;return n>f?(r.set(o=t),!1):(r.set(o=y(g(n/f))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:r.subscribe}}var bt,xt,wt,vt,kt,Ct=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(bt={exports:{}},bt.exports),bt.exports);function St(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function _t(t,{delay:e=0,speed:n,duration:o,easing:i=ut}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(xt||(xt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(wt||(wt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(vt||(vt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(kt||(kt={})),Ct.ClientState.Disconnected,wt.Poweron,vt.Click,kt.None,Ct.ClientState.Disconnecting,wt.Poweron,vt.Noninteractive,kt.Connecting,Ct.ClientState.Connecting,wt.Poweron,vt.Noninteractive,kt.Connecting,Ct.ClientState.Connected,wt.Mic,vt.Hold,kt.None,Ct.ClientState.Starting,wt.Mic,vt.Hold,kt.Connecting,Ct.ClientState.Recording,wt.Mic,vt.Hold,kt.None,Ct.ClientState.Stopping,wt.Mic,vt.Noninteractive,kt.Busy,Ct.ClientState.Failed,wt.Error,vt.Click,kt.None,Ct.ClientState.NoBrowserSupport,wt.Error,vt.Click,kt.None,Ct.ClientState.NoAudioConsent,wt.Denied,vt.Click,kt.None,xt.Idle,wt.Poweron,vt.Click,kt.None,xt.Connecting,wt.Poweron,vt.Noninteractive,kt.Connecting,xt.Ready,wt.Mic,vt.Hold,kt.None,xt.Recording,wt.Mic,vt.Hold,kt.None,xt.Loading,wt.Mic,vt.Noninteractive,kt.Busy,xt.Failed,wt.Error,vt.Click,kt.None,xt.NoBrowserSupport,wt.Error,vt.Click,kt.None,xt.NoAudioConsent,wt.Denied,vt.Click,kt.None;const Et=[0,1];function zt(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),a=r-s;return(1-a)*t[s]+a*t[c]}function Nt(e){let n;return{c(){n=v("canvas"),T(n,"color",e[0]),T(n,"display","block"),T(n,"width","1.35rem"),T(n,"height","1.5rem"),T(n,"margin","0"),T(n,"padding","0 0.8rem 0 0rem"),T(n,"flex-grow","0"),T(n,"flex-shrink","0"),T(n,"flex-basis","1.35rem"),E(n,"class","svelte-1fz8oog")},m(t,o){x(t,n,o),e[3](n)},p(t,[e]){1&e&&T(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[3](null)}}}function Tt(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,a=[0,0];const l=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return function(t){O().$$.on_mount.push(t)}((()=>{let t;const e=2*(a.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),h=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),u=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=h*i,r),n(1,r.height=u*i,r),Date.now()<c?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let f=1;for(;f<a.length;)a[f]=.25*a[f-1]+.5*a[f]+.0625,f++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",f=0;f<a.length;f++){const t=a[f]*r.height;t*r.height>2*g?l(e,.5*r.width-g+f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),f>0&&(t*r.height>2*g?l(e,.5*r.width-g-f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return d(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){L[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class Pt extends class{$destroy(){at(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=v("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",b(document.head,e)),dt(this,t,Tt,Nt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const{window:Rt}=st;function Mt(t,e,n){const o=t.slice();return o[37]=e[n],o[39]=n,o}function Dt(n){let o,i,c,a,l,d,h,f,g,p,$,y,k=n[15]&&At(),C={color:n[5]};l=new Pt({props:C}),n[29](l);let _=n[14]&&Bt(n),z=n[10],N=[];for(let t=0;t<z.length;t+=1)N[t]=Ot(Mt(n,z,t));let T=n[13]&&jt(n);return{c(){var t;o=v("div"),i=v("div"),k&&k.c(),c=S(),a=v("div"),(t=l.$$.fragment)&&t.c(),d=S(),_&&_.c(),f=S();for(let t=0;t<N.length;t+=1)N[t].c();g=S(),T&&T.c(),E(a,"class","TransscriptItemContent"),E(i,"class","TranscriptItem"),E(o,"class","BigTranscript")},m(t,e){x(t,o,e),b(o,i),k&&k.m(i,null),b(i,c),b(i,a),ct(l,a,null),b(a,d),_&&_.m(a,null),b(o,f);for(let t=0;t<N.length;t+=1)N[t].m(o,null);b(o,g),T&&T.m(o,null),y=!0},p(t,e){t[15]?k||(k=At(),k.c(),k.m(i,c)):k&&(k.d(1),k=null);const n={};if(32&e[0]&&(n.color=t[5]),l.$set(n),t[14]?_?16384&e[0]&&nt(_,1):(_=Bt(t),_.c(),nt(_,1),_.m(a,null)):_&&(_.d(1),_=null),4236288&e[0]){let n;for(z=t[10],n=0;n<z.length;n+=1){const i=Mt(t,z,n);N[n]?(N[n].p(i,e),nt(N[n],1)):(N[n]=Ot(i),N[n].c(),nt(N[n],1),N[n].m(o,g))}for(;n<N.length;n+=1)N[n].d(1);N.length=z.length}t[13]?T?(T.p(t,e),8192&e[0]&&nt(T,1)):(T=jt(t),T.c(),nt(T,1),T.m(o,null)):T&&(T.d(1),T=null)},i(t){if(!y){nt(l.$$.fragment,t),nt(_),h||W((()=>{h=rt(i,n[20],{duration:200}),h.start()}));for(let t=0;t<z.length;t+=1)nt(N[t]);nt(T),W((()=>{$&&$.end(1),p||(p=rt(o,n[19],{})),p.start()})),y=!0}},o(i){ot(l.$$.fragment,i),p&&p.invalidate(),$=function(n,o,i){let c,a=o(n,i),l=!0;const d=et;function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:f}=a||it;f&&(c=B(n,1,0,i,o,s,f));const g=u()+o,p=g+i;W((()=>Z(n,!1,"start"))),m((t=>{if(l){if(t>=p)return h(0,1),Z(n,!1,"end"),--d.r||r(d.c),!1;if(t>=g){const e=s((t-g)/i);h(1-e,e)}}return l}))}return d.r+=1,s(a)?Y().then((()=>{a=a(),h()})):h(),{end(t){t&&a.tick&&a.tick(1,0),l&&(c&&F(n,c),l=!1)}}}(o,n[19],{}),y=!1},d(t){t&&w(o),k&&k.d(),n[29](null),at(l),_&&_.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(N,t),T&&T.d(),t&&$&&$.end()}}}function At(t){let e;return{c(){e=v("div"),E(e,"class","TransscriptItemBgDiv")},m(t,n){x(t,e,n)},d(t){t&&w(e)}}}function Bt(e){let n,o;return{c(){n=v("div"),n.textContent="Listening...",E(n,"class","listening")},m(t,e){x(t,n,e)},i(t){o||W((()=>{o=rt(n,e[20],{duration:400}),o.start()}))},o:t,d(t){t&&w(n)}}}function Ft(e){let n,o;return{c(){n=v("div"),E(n,"class","TransscriptItemBgDiv")},m(t,e){x(t,n,e)},i(t){o||W((()=>{o=rt(n,e[20],{}),o.start()}))},o:t,d(t){t&&w(n)}}}function It(t){let e,n;return{c(){e=v("span"),E(e,"style",n=t[39]<t[10].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")},m(t,n){x(t,e,n)},p(t,o){9216&o[0]&&n!==(n=t[39]<t[10].length-1?"width:0.25em;":t[13]?"width:1.2em;":"")&&E(e,"style",n)},d(t){t&&w(e)}}}function Ot(e){let n,o,i,r,s,c,a,l=e[37].word+"",d=e[15]&&Ft(e),h=e[39]<e[10].length&&It(e);return{c(){n=v("div"),d&&d.c(),o=S(),i=v("div"),r=C(l),s=S(),h&&h.c(),E(i,"class","TransscriptItemContent"),E(n,"class",a="TranscriptItem "+e[22](e[37])),P(n,"Entity",null!==e[37].entityType),P(n,"Final",e[37].isFinal)},m(t,e){x(t,n,e),d&&d.m(n,null),b(n,o),b(n,i),b(i,r),b(i,s),h&&h.m(i,null)},p(t,e){t[15]?d?32768&e[0]&&nt(d,1):(d=Ft(t),d.c(),nt(d,1),d.m(n,o)):d&&(d.d(1),d=null),1024&e[0]&&l!==(l=t[37].word+"")&&N(r,l),t[39]<t[10].length?h?h.p(t,e):(h=It(t),h.c(),h.m(i,null)):h&&(h.d(1),h=null),1024&e[0]&&a!==(a="TranscriptItem "+t[22](t[37]))&&E(n,"class",a),1024&e[0]&&P(n,"Entity",null!==t[37].entityType),1024&e[0]&&P(n,"Final",t[37].isFinal)},i(t){nt(d),c||W((()=>{c=rt(i,e[20],{}),c.start()}))},o:t,d(t){t&&w(n),d&&d.d(),h&&h.d()}}}function jt(e){let n,o,i,r,s,c,a,l;return{c(){n=v("div"),o=v("div"),i=S(),r=v("div"),s=k("svg"),c=k("path"),E(o,"class","TransscriptItemBgDiv"),T(o,"background-color",e[5]),E(c,"stroke","currentColor"),E(c,"stroke-width","3"),E(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),E(c,"fill","none"),E(c,"fill-rule","evenodd"),T(s,"width","2rem"),T(s,"height","2rem"),T(s,"position","absolute"),T(s,"transform","translate(-0.6rem, -0.5rem)"),T(s,"stroke","#eee"),E(s,"viewBox","0 0 24 24"),E(s,"xmlns","http://www.w3.org/2000/svg"),T(r,"width","1.0rem"),T(r,"height","1rem"),T(r,"position","relative"),E(n,"class","TranscriptItem")},m(t,e){x(t,n,e),b(n,o),b(n,i),b(n,r),b(r,s),b(s,c)},p(t,e){32&e[0]&&T(o,"background-color",t[5])},i(t){a||W((()=>{a=rt(c,e[18],{duration:500}),a.start()})),l||W((()=>{l=rt(n,e[20],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&w(n)}}}function Lt(e){let n,o,i,s,c,a,l=e[11]&&Dt(e);return{c(){n=v("main"),l&&l.c(),o=S(),i=v("link"),this.c=t,T(n,"--voffset",e[1]),T(n,"--hoffset",e[2]),T(n,"--fontsize",e[3]),T(n,"--color",e[4]),T(n,"--highlight-color",e[5]),T(n,"--text-bg-color",e[6]),T(n,"--gradient-stop1",e[7]),T(n,"--gradient-stop2",e[8]),T(n,"--marginbottom",e[9]),T(n,"--transition",e[16].transition),P(n,"placementTop","top"===e[0]),E(i,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),E(i,"rel","stylesheet")},m(t,r){x(t,n,r),l&&l.m(n,null),x(t,o,r),b(document.head,i),s=!0,c||(a=_(Rt,"message",e[21]),c=!0)},p(t,e){t[11]?l?(l.p(t,e),2048&e[0]&&nt(l,1)):(l=Dt(t),l.c(),nt(l,1),l.m(n,null)):l&&(et={r:0,c:[],p:et},ot(l,1,1,(()=>{l=null})),et.r||r(et.c),et=et.p),(!s||2&e[0])&&T(n,"--voffset",t[1]),(!s||4&e[0])&&T(n,"--hoffset",t[2]),(!s||8&e[0])&&T(n,"--fontsize",t[3]),(!s||16&e[0])&&T(n,"--color",t[4]),(!s||32&e[0])&&T(n,"--highlight-color",t[5]),(!s||64&e[0])&&T(n,"--text-bg-color",t[6]),(!s||128&e[0])&&T(n,"--gradient-stop1",t[7]),(!s||256&e[0])&&T(n,"--gradient-stop2",t[8]),(!s||512&e[0])&&T(n,"--marginbottom",t[9]),(!s||65536&e[0])&&T(n,"--transition",t[16].transition),1&e[0]&&P(n,"placementTop","top"===t[0])},i(t){s||(nt(l),s=!0)},o(t){ot(l),s=!1},d(t){t&&w(n),l&&l.d(),t&&w(o),w(i),c=!1,a()}}}function Ht(t,e,n){let o,i,r,s,c,{placement:a}=e,{voffset:l="3rem"}=e,{hoffset:h="2rem"}=e,{fontsize:u="1.5rem"}=e,{color:f="#ffffff"}=e,{highlightcolor:g="#15e8b5"}=e,{backgroundcolor:p="#202020"}=e,{gradientstop1:m="#ffffff88"}=e,{gradientstop2:$="#ffffffcc"}=e,{marginbottom:y="0rem"}=e,{formattext:b}=e,x=[],w=null,v=null,k=Ct.ClientState.Disconnected,C=!1,S=!1,_=!1,E=yt({transition:0},{duration:200});d(t,E,(t=>n(16,s=t)));const z=O(),N=St(_t),T=St(((t,{delay:e=0,duration:n=400})=>({delay:e,duration:n,easing:ut,css:t=>`\n opacity: ${zt(Et,t,0,1)};\n max-height: ${10*zt(Et,t,0,.6)}rem;\n `}))),P=St(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${zt(Et,t,0,1)*o}rem;\n `}))),R=t=>{n(13,_=_||t)},M=t=>{n(27,k=t),k===Ct.ClientState.Recording&&(n(13,_=!1),n(10,x=[]),v=null)},D=t=>{if(void 0===t)return;c&&k===Ct.ClientState.Recording&&c.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?A(x.length>0?2e3:0):x.length>0&&(C||n(28,C=!0),A(2e3));const e=`${t.contextId}/${t.id}`;null!==v?v!==e&&(n(13,_=!1),v=e):v=e,n(10,x=[]),t.words.forEach((t=>{n(10,x[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},x)})),r?t.entities.forEach((t=>{n(10,x[t.startPosition].word=t.value,x),n(10,x[t.startPosition].entityType=t.type,x),n(10,x[t.startPosition].isFinal=t.isFinal,x),n(10,x[t.startPosition].hide=!1,x);for(let e=t.startPosition+1;e<t.endPosition;e++)x[e]&&n(10,x[e].hide=!0,x)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)x[e]&&(n(10,x[e].entityType=t.type,x),n(10,x[e].isFinal=t.isFinal,x))})),n(10,x=x.filter((t=>!t.hide)))},A=(t=0)=>{B(),w=window.setTimeout((()=>{w=null,C&&n(28,C=!1)}),t)},B=()=>{null!==w&&(window.clearTimeout(w),w=null)};return t.$$set=t=>{"placement"in t&&n(0,a=t.placement),"voffset"in t&&n(1,l=t.voffset),"hoffset"in t&&n(2,h=t.hoffset),"fontsize"in t&&n(3,u=t.fontsize),"color"in t&&n(4,f=t.color),"highlightcolor"in t&&n(5,g=t.highlightcolor),"backgroundcolor"in t&&n(6,p=t.backgroundcolor),"gradientstop1"in t&&n(7,m=t.gradientstop1),"gradientstop2"in t&&n(8,$=t.gradientstop2),"marginbottom"in t&&n(9,y=t.marginbottom),"formattext"in t&&n(23,b=t.formattext)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&n(14,o=0===x.length),64&t.$$.dirty[0]&&n(15,i="none"!==p),8388608&t.$$.dirty[0]&&(r=void 0===b||"false"!==b),402655232&t.$$.dirty[0]){const t=k===Ct.ClientState.Recording||C;t!==S&&(e="visibilitychanged",s=t,z.dispatchEvent(new CustomEvent(e,{detail:s,composed:!0}))),n(11,S=t),E.set({transition:S?1:0})}var e,s},[a,l,h,u,f,g,p,m,$,y,x,S,c,_,o,i,s,E,N,T,P,t=>{switch(t.data.type){case"speechsegment":D(t.data.segment);break;case"speechhandled":R(t.data.success);break;case"speechstate":M(t.data.state)}},t=>t.entityType||"",b,R,M,D,k,C,function(t){L[t?"unshift":"push"]((()=>{c=t,n(12,c)}))}]}class Vt extends ht{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",dt(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},Ht,Lt,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:23,speechhandled:24,speechstate:25,speechsegment:26},[-1,-1]),t&&(t.target&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),K()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),K()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),K()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),K()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),K()}get color(){return this.$$.ctx[4]}set color(t){this.$set({color:t}),K()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),K()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),K()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),K()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),K()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$set({marginbottom:t}),K()}get formattext(){return this.$$.ctx[23]}set formattext(t){this.$set({formattext:t}),K()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}function qt(e){let n,o,i,s,c,a,l,d,h;return{c(){n=v("main"),o=v("div"),i=v("div"),s=v("big-transcript"),c=S(),a=v("div"),l=C(e[10]),this.c=t,z(s,"formattext",e[9]),z(s,"fontsize",e[1]),z(s,"color",e[3]),z(s,"backgroundcolor","none"),z(s,"highlightcolor",e[5]),z(s,"gradientstop1",e[7]),z(s,"gradientstop2",e[8]),E(a,"class","hint"),T(a,"opacity",e[14].opacity),E(i,"class","pad"),E(o,"class","drawer"),T(o,"background-color",e[6]),T(o,"opacity",e[12].opacity),T(o,"transform","translate(0px, "+e[13].y+"rem)"),E(n,"class","placementTop"),T(n,"--height",e[0]),T(n,"--smalltextcolor",e[4]),T(n,"--hintfontsize",e[2])},m(t,r){x(t,n,r),b(n,o),b(o,i),b(i,s),e[25](s),b(i,c),b(i,a),b(a,l),d||(h=[_(window,"message",e[19]),_(s,"visibilitychanged",e[18])],d=!0)},p(t,[e]){512&e&&z(s,"formattext",t[9]),2&e&&z(s,"fontsize",t[1]),8&e&&z(s,"color",t[3]),32&e&&z(s,"highlightcolor",t[5]),128&e&&z(s,"gradientstop1",t[7]),256&e&&z(s,"gradientstop2",t[8]),1024&e&&N(l,t[10]),16384&e&&T(a,"opacity",t[14].opacity),64&e&&T(o,"background-color",t[6]),4096&e&&T(o,"opacity",t[12].opacity),8192&e&&T(o,"transform","translate(0px, "+t[13].y+"rem)"),1&e&&T(n,"--height",t[0]),16&e&&T(n,"--smalltextcolor",t[4]),4&e&&T(n,"--hintfontsize",t[2])},i:t,o:t,d(t){t&&w(n),e[25](null),d=!1,r(h)}}}function Ut(t,n,o){let i,r,s,c,{height:a="8rem"}=n,{hint:l=""}=n,{fontsize:h="1.5rem"}=n,{hintfontsize:u="0.9rem"}=n,{color:f="#ffffff"}=n,{smalltextcolor:g="#ffffff70"}=n,{highlightcolor:p="#15e8b5"}=n,{backgroundcolor:m="#202020"}=n,{gradientstop1:$="#ffffff88"}=n,{gradientstop2:y="#ffffffcc"}=n,{formattext:b}=n,x=[],w=0,v="";const k=(t,e=!0)=>{E.set({opacity:0}),c&&e&&c.speechsegment(t),t.isFinal&&(w++,w<x.length?o(10,v=x[w]):o(10,v=x[Math.floor(Math.random()*x.length)]))},C=t=>{w=0,o(20,l=t),x=[];try{x=JSON.parse(l),("string"==typeof x||x instanceof String)&&(x=[x])}catch(t){x[0]=l||""}o(10,v=x[w])};let S=yt({y:-1},{duration:200});d(t,S,(t=>o(13,r=t)));let _=yt({opacity:0},{duration:200,easing:e});d(t,_,(t=>o(12,i=t)));let E=yt({opacity:0},{duration:200,delay:200,easing:e});d(t,E,(t=>o(14,s=t)));return t.$$set=t=>{"height"in t&&o(0,a=t.height),"hint"in t&&o(20,l=t.hint),"fontsize"in t&&o(1,h=t.fontsize),"hintfontsize"in t&&o(2,u=t.hintfontsize),"color"in t&&o(3,f=t.color),"smalltextcolor"in t&&o(4,g=t.smalltextcolor),"highlightcolor"in t&&o(5,p=t.highlightcolor),"backgroundcolor"in t&&o(6,m=t.backgroundcolor),"gradientstop1"in t&&o(7,$=t.gradientstop1),"gradientstop2"in t&&o(8,y=t.gradientstop2),"formattext"in t&&o(9,b=t.formattext)},t.$$.update=()=>{1048576&t.$$.dirty&&C(l)},[a,h,u,f,g,p,m,$,y,b,v,c,i,r,s,S,_,E,t=>{!1===t.detail?(S.set({y:-1},{easing:ft}),_.set({opacity:0}),E.set({opacity:0})):(S.set({y:0},{easing:gt}),_.set({opacity:1}),E.set({opacity:1}))},t=>{switch(t.data.type){case"speechsegment":k(t.data.segment,!1);break;case"hint":C(t.data.hint)}},l,t=>{c&&c.speechhandled(t)},t=>{c&&c.speechstate(t)},k,C,function(t){L[t?"unshift":"push"]((()=>{c=t,o(11,c)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Vt);class Wt extends ht{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--smalltextcolor);font-size:var(--hintfontsize);line-height:135%;margin-top:0.15rem}</style>",dt(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},Ut,qt,a,{height:0,hint:20,fontsize:1,hintfontsize:2,color:3,smalltextcolor:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,formattext:9,speechhandled:21,speechstate:22,speechsegment:23,sethint:24}),t&&(t.target&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),K()))}static get observedAttributes(){return["height","hint","fontsize","hintfontsize","color","smalltextcolor","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","formattext","speechhandled","speechstate","speechsegment","sethint"]}get height(){return this.$$.ctx[0]}set height(t){this.$set({height:t}),K()}get hint(){return this.$$.ctx[20]}set hint(t){this.$set({hint:t}),K()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$set({fontsize:t}),K()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$set({hintfontsize:t}),K()}get color(){return this.$$.ctx[3]}set color(t){this.$set({color:t}),K()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$set({smalltextcolor:t}),K()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),K()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),K()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),K()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),K()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$set({formattext:t}),K()}get speechhandled(){return this.$$.ctx[21]}get speechstate(){return this.$$.ctx[22]}get speechsegment(){return this.$$.ctx[23]}get sethint(){return this.$$.ctx[24]}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",Wt)}(); | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t,e){for(const n in e)t[n]=e[n];return t}function o(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(o)}function s(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e}function l(t){return 0===Object.keys(t).length}function d(e,n,o){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const o=e.subscribe(...n);return o.unsubscribe?()=>o.unsubscribe():o}(n,o))}const h="undefined"!=typeof window;let u=h?()=>window.performance.now():()=>Date.now(),f=h?t=>requestAnimationFrame(t):t;const g=new Set;function p(t){g.forEach((e=>{e.c(t)||(g.delete(e),e.f())})),0!==g.size&&f(p)}function m(t){let e;return 0===g.size&&f(p),{promise:new Promise((n=>{g.add(e={c:t,f:n})})),abort(){g.delete(e)}}}let $=!1;const y=new Set;function b(t,e){$&&y.delete(e),e.parentNode!==t&&t.appendChild(e)}function x(t,e,n){$&&y.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function w(t){$?y.add(t):t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function k(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function C(t){return document.createTextNode(t)}function S(){return C(" ")}function _(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:E(t,e,n)}function N(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function T(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function P(t,e,n){t.classList[n?"add":"remove"](e)}function R(t){const e={};for(const n of t)e[n.name]=n.value;return e}const M=new Set;let D,A=0;function B(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),i=n.length-o.length;i&&(t.style.animation=o.join(", "),A-=i,A||f((()=>{A||(M.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),M.clear())})))}function F(t){D=t}function I(){if(!D)throw new Error("Function called outside component initialization");return D}const O=[],j=[],L=[],H=[],V=Promise.resolve();let q=!1;function U(t){L.push(t)}let W=!1;const J=new Set;function G(){if(!W){W=!0;do{for(let t=0;t<O.length;t+=1){const e=O[t];F(e),K(e.$$)}for(F(null),O.length=0;j.length;)j.pop()();for(let t=0;t<L.length;t+=1){const e=L[t];J.has(e)||(J.add(e),e())}L.length=0}while(O.length);for(;H.length;)H.pop()();q=!1,W=!1,J.clear()}}function K(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(U)}}let Q;function X(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Y=new Set;function Z(t,e){t&&t.i&&(Y.delete(t),t.i(e))}const tt={duration:0};function et(n,o,i){let r,c,a=o(n,i),l=!1,d=0;function h(){r&&B(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=a||tt;g&&(r=function(t,e,n,o,i,r,s,c=0){const a=16.666/o;let l="{\n";for(let t=0;t<=1;t+=a){const o=e+(n-e)*r(t);l+=100*t+`%{${s(o,1-o)}}\n`}const d=l+`100% {${s(n,1-n)}}\n}`,h=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(d)}_${c}`,u=t.ownerDocument;M.add(u);const f=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(v("style")).sheet),g=u.__svelte_rules||(u.__svelte_rules={});g[h]||(g[h]=!0,f.insertRule(`@keyframes ${h} ${d}`,f.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${h} ${o}ms linear ${i}ms 1 both`,A+=1,h}(n,0,1,i,o,s,g,d++)),f(0,1);const p=u()+o,$=p+i;c&&c.abort(),l=!0,U((()=>X(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),X(n,!0,"end"),h(),l=!1;if(t>=p){const e=s((t-p)/i);f(e,1-e)}}return l}))}let g=!1;return{start(){g||(B(n),s(a)?(a=a(),(Q||(Q=Promise.resolve(),Q.then((()=>{Q=null}))),Q).then(f)):f())},invalidate(){g=!1},end(){l&&(h(),l=!1)}}}const nt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ot(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(e,n),i||U((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(U)}function it(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function rt(t,e){-1===t.$$.dirty[0]&&(O.push(t),q||(q=!0,V.then(G)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(e,n,o,s,c,a,l=[-1]){const d=D;F(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:c,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:i(),dirty:l,skip_bound:!1};let u=!1;if(h.ctx=o?o(e,n.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return h.ctx&&c(h.ctx[t],h.ctx[t]=i)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](i),u&&rt(e,t)),n})):[],h.update(),u=!0,r(h.before_update),h.fragment=!!s&&s(h.ctx),n.target){if(n.hydrate){$=!0;const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(w)}else h.fragment&&h.fragment.c();n.intro&&Z(e.$$.fragment),ot(e,n.target,n.anchor,n.customElement),function(){$=!1;for(const t of y)t.parentNode.removeChild(t);y.clear()}(),G()}F(d)}let ct;"function"==typeof HTMLElement&&(ct=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(o).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){it(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function at(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function lt(t){return t*t*t}function dt(t){const e=t-1;return e*e*e+1}const ht=[];function ut(t){return"[object Date]"===Object.prototype.toString.call(t)}function ft(t,e){if(t===e||t!=t)return()=>t;const n=typeof t;if(n!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map(((e,n)=>ft(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(ut(t)&&ut(e)){t=t.getTime();const n=(e=e.getTime())-t;return e=>new Date(t+e*n)}const n=Object.keys(e),o={};return n.forEach((n=>{o[n]=ft(t[n],e[n])})),t=>{const e={};return n.forEach((n=>{e[n]=o[n](t)})),e}}if("number"===n){const n=e-t;return e=>t+e*n}throw new Error(`Cannot interpolate ${n} values`)}function gt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!ht.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),ht.push(n,e)}if(t){for(let t=0;t<ht.length;t+=2)ht[t][0](ht[t+1]);ht.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(s,c=t){const a=[s,c];return i.push(a),1===i.length&&(o=n(r)||t),s(e),()=>{const t=i.indexOf(a);-1!==t&&i.splice(t,1),0===i.length&&(o(),o=null)}}}}(o);let s,a=o;function l(t,c){if(null==o)return r.set(o=t),Promise.resolve();a=t;let l=s,d=!1,{delay:h=0,duration:f=400,easing:g=e,interpolate:p=ft}=n(n({},i),c);if(0===f)return l&&(l.abort(),l=null),r.set(o=a),Promise.resolve();const $=u()+h;let y;return s=m((e=>{if(e<$)return!0;d||(y=p(o,t),"function"==typeof f&&(f=f(o,t)),d=!0),l&&(l.abort(),l=null);const n=e-$;return n>f?(r.set(o=t),!1):(r.set(o=y(g(n/f))),!0)})),s.promise}return{set:l,update:(t,e)=>l(t(a,o),e),subscribe:r.subscribe}}var pt,mt,$t,yt,bt,xt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),(n=e.ClientState||(e.ClientState={}))[n.Failed=0]="Failed",n[n.NoBrowserSupport=1]="NoBrowserSupport",n[n.NoAudioConsent=2]="NoAudioConsent",n[n.Disconnected=3]="Disconnected",n[n.Disconnecting=4]="Disconnecting",n[n.Connecting=5]="Connecting",n[n.Connected=6]="Connected",n[n.Starting=7]="Starting",n[n.Stopping=8]="Stopping",n[n.Recording=9]="Recording"}(pt={exports:{}},pt.exports),pt.exports);function wt(t){return function(e,n){if(!e.hasOwnProperty("ownerDocument")){Object.defineProperty(e,"ownerDocument",{get:function(){return e.parentElement}});let t=e;for(;t.parentElement;)t=t.parentElement;e.parentElement.head=t}return t(e,n)}}function vt(t,{delay:e=0,speed:n,duration:o,easing:i=at}={}){const r=t.getTotalLength();return void 0===o?o=void 0===n?800:r/n:"function"==typeof o&&(o=o(r)),{delay:e,duration:o,easing:i,css:(t,e)=>`stroke-dasharray: ${t*r} ${e*r}`}}!function(t){t.Failed="Failed",t.NoBrowserSupport="NoBrowserSupport",t.NoAudioConsent="NoAudioConsent",t.Idle="Idle",t.Connecting="Connecting",t.Ready="Ready",t.Recording="Recording",t.Loading="Loading"}(mt||(mt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}($t||($t={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(yt||(yt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(bt||(bt={})),xt.ClientState.Disconnected,$t.Poweron,yt.Click,bt.None,xt.ClientState.Disconnecting,$t.Poweron,yt.Noninteractive,bt.Connecting,xt.ClientState.Connecting,$t.Poweron,yt.Noninteractive,bt.Connecting,xt.ClientState.Connected,$t.Mic,yt.Hold,bt.None,xt.ClientState.Starting,$t.Mic,yt.Hold,bt.Connecting,xt.ClientState.Recording,$t.Mic,yt.Hold,bt.None,xt.ClientState.Stopping,$t.Mic,yt.Noninteractive,bt.Busy,xt.ClientState.Failed,$t.Error,yt.Click,bt.None,xt.ClientState.NoBrowserSupport,$t.Error,yt.Click,bt.None,xt.ClientState.NoAudioConsent,$t.Denied,yt.Click,bt.None,mt.Idle,$t.Poweron,yt.Click,bt.None,mt.Connecting,$t.Poweron,yt.Noninteractive,bt.Connecting,mt.Ready,$t.Mic,yt.Hold,bt.None,mt.Recording,$t.Mic,yt.Hold,bt.None,mt.Loading,$t.Mic,yt.Noninteractive,bt.Busy,mt.Failed,$t.Error,yt.Click,bt.None,mt.NoBrowserSupport,$t.Error,yt.Click,bt.None,mt.NoAudioConsent,$t.Denied,yt.Click,bt.None;const kt=[0,1];function Ct(t,e,n,o){if(e<n)return t[0];if(e>o)return t[t.length-1];let i=(o-n)/(t.length-1);if(i<=0)return t[0];let r=(e-n)/i,s=Math.floor(r),c=Math.ceil(r),a=r-s;return(1-a)*t[s]+a*t[c]}function St(e){let n;return{c(){n=v("canvas"),T(n,"color",e[0]),T(n,"display","block"),T(n,"width","1.35rem"),T(n,"height","1.5rem"),T(n,"margin","0"),T(n,"padding","0 0.8rem 0 0rem"),T(n,"flex-grow","0"),T(n,"flex-shrink","0"),T(n,"flex-basis","1.35rem"),E(n,"class","svelte-1fz8oog")},m(t,o){x(t,n,o),e[3](n)},p(t,[e]){1&e&&T(n,"color",t[0])},i:t,o:t,d(t){t&&w(n),e[3](null)}}}function _t(t,e,n){let{color:o="#60e0ff"}=e;const i=(t,e)=>{s=Date.now()>c?t:Math.max(s,t),c=Date.now()+e};let r,s=0,c=0,a=[0,0];const l=(t,e,n,o,i,r)=>{o<2*r&&(r=o/2),i<2*r&&(r=i/2),t.beginPath(),t.moveTo(e+r,n),t.arcTo(e+o,n,e+o,n+i,r),t.arcTo(e+o,n+i,e,n+i,r),t.arcTo(e,n+i,e,n,r),t.arcTo(e,n,e+o,n,r),t.closePath()};return function(t){I().$$.on_mount.push(t)}((()=>{let t;const e=2*(a.length-1)+1,o=3*e+1*(e-1),d=()=>{if(t=requestAnimationFrame(d),!r)return;const e=r.getContext("2d");if(!e)return;let i=(t=>{var e=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/e})(e),h=Number.parseInt(getComputedStyle(r).getPropertyValue("width").slice(0,-2)),u=Number.parseInt(getComputedStyle(r).getPropertyValue("height").slice(0,-2));n(1,r.width=h*i,r),n(1,r.height=u*i,r),Date.now()<c?a[0]=.15*s+.85*a[0]:a[0]=.0625+.75*a[0];let f=1;for(;f<a.length;)a[f]=.25*a[f-1]+.5*a[f]+.0625,f++;e.clearRect(0,0,r.width,r.height);const g=3/o*r.width*.5,p=4/o*r.width;for(e.fillStyle=r.style.color||"#000000",f=0;f<a.length;f++){const t=a[f]*r.height;t*r.height>2*g?l(e,.5*r.width-g+f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width+f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill(),f>0&&(t*r.height>2*g?l(e,.5*r.width-g-f*p,.5*(r.height-t),2*g,t,g):(e.beginPath(),e.arc(.5*r.width-f*p,.5*r.height,t*r.height*.5,0,2*Math.PI)),e.fill())}};return d(),i(1,500),()=>{cancelAnimationFrame(t)}})),t.$$set=t=>{"color"in t&&n(0,o=t.color)},[o,r,i,function(t){j[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class Et extends class{$destroy(){it(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){this.$$set&&!l(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){var e;super(),document.getElementById("svelte-1fz8oog-style")||((e=v("style")).id="svelte-1fz8oog-style",e.textContent="canvas.svelte-1fz8oog{display:block;width:1.35rem;height:1.5rem;margin:0;padding:0 0.8rem 0 0rem;flex-grow:0;flex-shrink:0;flex-basis:1.35rem}",b(document.head,e)),st(this,t,_t,St,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const{window:zt}=nt;function Nt(t,e,n){const o=t.slice();return o[39]=e[n],o[41]=n,o}function Tt(t){let e;return{c(){e=v("div"),E(e,"class","TransscriptItemBgDiv")},m(t,n){x(t,e,n)},d(t){t&&w(e)}}}function Pt(e){let n,o;return{c(){n=v("div"),n.textContent="Listening...",E(n,"class","listening")},m(t,e){x(t,n,e)},i(t){o||U((()=>{o=et(n,e[19],{duration:400}),o.start()}))},o:t,d(t){t&&w(n)}}}function Rt(e){let n,o;return{c(){n=v("div"),E(n,"class","TransscriptItemBgDiv")},m(t,e){x(t,n,e)},p(t,n){e=t},i(t){o||U((()=>{o=et(n,e[19],{duration:e[15]}),o.start()}))},o:t,d(t){t&&w(n)}}}function Mt(t){let e,n;return{c(){e=v("span"),E(e,"style",n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")},m(t,n){x(t,e,n)},p(t,o){5120&o[0]&&n!==(n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")&&E(e,"style",n)},d(t){t&&w(e)}}}function Dt(e){let n,o,i,r,s,c,a,l=e[39].word+"",d=e[14]&&Rt(e),h=e[41]<e[10].length&&Mt(e);return{c(){n=v("div"),d&&d.c(),o=S(),i=v("div"),r=C(l),s=S(),h&&h.c(),E(i,"class","TransscriptItemContent"),E(n,"class",a="TranscriptItem "+e[21](e[39])),P(n,"Entity",null!==e[39].entityType),P(n,"Final",e[39].isFinal)},m(t,e){x(t,n,e),d&&d.m(n,null),b(n,o),b(n,i),b(i,r),b(i,s),h&&h.m(i,null)},p(t,s){(e=t)[14]?d?16384&s[0]&&Z(d,1):(d=Rt(e),d.c(),Z(d,1),d.m(n,o)):d&&(d.d(1),d=null),1024&s[0]&&l!==(l=e[39].word+"")&&N(r,l),e[41]<e[10].length?h?h.p(e,s):(h=Mt(e),h.c(),h.m(i,null)):h&&(h.d(1),h=null),1024&s[0]&&a!==(a="TranscriptItem "+e[21](e[39]))&&E(n,"class",a),1024&s[0]&&P(n,"Entity",null!==e[39].entityType),1024&s[0]&&P(n,"Final",e[39].isFinal)},i(t){Z(d),c||U((()=>{c=et(i,e[19],{duration:e[15]}),c.start()}))},o:t,d(t){t&&w(n),d&&d.d(),h&&h.d()}}}function At(e){let n,o,i,r,s,c,a,l;return{c(){n=v("div"),o=v("div"),i=S(),r=v("div"),s=k("svg"),c=k("path"),E(o,"class","TransscriptItemBgDiv"),T(o,"background-color",e[5]),E(c,"stroke","currentColor"),E(c,"stroke-width","3"),E(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),E(c,"fill","none"),E(c,"fill-rule","evenodd"),T(s,"width","2rem"),T(s,"height","2rem"),T(s,"position","absolute"),T(s,"transform","translate(-0.6rem, -0.5rem)"),T(s,"stroke","#eee"),E(s,"viewBox","0 0 24 24"),E(s,"xmlns","http://www.w3.org/2000/svg"),T(r,"width","1.0rem"),T(r,"height","1rem"),T(r,"position","relative"),E(n,"class","TranscriptItem")},m(t,e){x(t,n,e),b(n,o),b(n,i),b(n,r),b(r,s),b(s,c)},p(t,e){32&e[0]&&T(o,"background-color",t[5])},i(t){a||U((()=>{a=et(c,e[18],{duration:500}),a.start()})),l||U((()=>{l=et(n,e[19],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&w(n)}}}function Bt(e){let n,o,i,r,s,c,a,l,d,h,u,f,g,p,m=e[14]&&Tt(),$={color:e[5]};c=new Et({props:$}),e[31](c);let y=e[13]&&Pt(e),k=e[10],C=[];for(let t=0;t<k.length;t+=1)C[t]=Dt(Nt(e,k,t));let z=e[12]&&At(e);return{c(){var f;n=v("main"),o=v("div"),i=v("div"),m&&m.c(),r=S(),s=v("div"),(f=c.$$.fragment)&&f.c(),a=S(),y&&y.c(),l=S();for(let t=0;t<C.length;t+=1)C[t].c();d=S(),z&&z.c(),h=S(),u=v("link"),this.c=t,E(s,"class","TransscriptItemContent"),E(i,"class","TranscriptItem"),E(o,"class","BigTranscript"),T(n,"--voffset",e[1]),T(n,"--hoffset",e[2]),T(n,"--fontsize",e[3]),T(n,"--color",e[4]),T(n,"--highlight-color",e[5]),T(n,"--text-bg-color",e[6]),T(n,"--gradient-stop1",e[7]),T(n,"--gradient-stop2",e[8]),T(n,"--marginbottom",e[9]),T(n,"--transition",e[16].transition),T(n,"opacity",e[16].transition),T(n,"max-height",10*Ct(kt,e[16].transition,0,.6)+"rem"),T(n,"visibility",0!==e[16].transition?"visible":"hidden"),P(n,"placementTop","top"===e[0]),E(u,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),E(u,"rel","stylesheet")},m(t,$){x(t,n,$),b(n,o),b(o,i),m&&m.m(i,null),b(i,r),b(i,s),ot(c,s,null),b(s,a),y&&y.m(s,null),b(o,l);for(let t=0;t<C.length;t+=1)C[t].m(o,null);b(o,d),z&&z.m(o,null),x(t,h,$),b(document.head,u),f=!0,g||(p=_(zt,"message",e[20]),g=!0)},p(t,e){t[14]?m||(m=Tt(),m.c(),m.m(i,r)):m&&(m.d(1),m=null);const a={};if(32&e[0]&&(a.color=t[5]),c.$set(a),t[13]?y?8192&e[0]&&Z(y,1):(y=Pt(t),y.c(),Z(y,1),y.m(s,null)):y&&(y.d(1),y=null),2118656&e[0]){let n;for(k=t[10],n=0;n<k.length;n+=1){const i=Nt(t,k,n);C[n]?(C[n].p(i,e),Z(C[n],1)):(C[n]=Dt(i),C[n].c(),Z(C[n],1),C[n].m(o,d))}for(;n<C.length;n+=1)C[n].d(1);C.length=k.length}t[12]?z?(z.p(t,e),4096&e[0]&&Z(z,1)):(z=At(t),z.c(),Z(z,1),z.m(o,null)):z&&(z.d(1),z=null),(!f||2&e[0])&&T(n,"--voffset",t[1]),(!f||4&e[0])&&T(n,"--hoffset",t[2]),(!f||8&e[0])&&T(n,"--fontsize",t[3]),(!f||16&e[0])&&T(n,"--color",t[4]),(!f||32&e[0])&&T(n,"--highlight-color",t[5]),(!f||64&e[0])&&T(n,"--text-bg-color",t[6]),(!f||128&e[0])&&T(n,"--gradient-stop1",t[7]),(!f||256&e[0])&&T(n,"--gradient-stop2",t[8]),(!f||512&e[0])&&T(n,"--marginbottom",t[9]),(!f||65536&e[0])&&T(n,"--transition",t[16].transition),(!f||65536&e[0])&&T(n,"opacity",t[16].transition),(!f||65536&e[0])&&T(n,"max-height",10*Ct(kt,t[16].transition,0,.6)+"rem"),(!f||65536&e[0])&&T(n,"visibility",0!==t[16].transition?"visible":"hidden"),1&e[0]&&P(n,"placementTop","top"===t[0])},i(t){if(!f){Z(c.$$.fragment,t),Z(y);for(let t=0;t<k.length;t+=1)Z(C[t]);Z(z),f=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(Y.has(t))return;Y.add(t),(void 0).c.push((()=>{Y.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(c.$$.fragment,t),f=!1},d(t){t&&w(n),m&&m.d(),e[31](null),it(c),y&&y.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(C,t),z&&z.d(),t&&w(h),w(u),g=!1,p()}}}function Ft(t,e,n){let o,i,r,s,c,a,l,{placement:h}=e,{voffset:u="3rem"}=e,{hoffset:f="2rem"}=e,{fontsize:g="1.5rem"}=e,{color:p="#ffffff"}=e,{highlightcolor:m="#15e8b5"}=e,{backgroundcolor:$="#202020"}=e,{gradientstop1:y="#ffffff88"}=e,{gradientstop2:b="#ffffffcc"}=e,{marginbottom:x="0rem"}=e,{formattext:w}=e,{demomode:v}=e,k=[],C=null,S=null,_=xt.ClientState.Disconnected,E=!1,z=!1,N=!1,T=gt({transition:0},{duration:200});d(t,T,(t=>n(16,a=t)));const P=I(),R=wt(vt),M=wt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${Ct(kt,t,0,1)*o}rem;\n `}))),D=t=>{n(12,N=N||t)},A=t=>{n(27,_=t),_===xt.ClientState.Recording&&(n(12,N=!1),n(10,k=[]),S=null)},B=t=>{if(void 0===t)return;l&&(s||_===xt.ClientState.Recording)&&l.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?F(k.length>0?s?3500:2e3:0):k.length>0&&(E||n(28,E=!0),F(2e3));const e=`${t.contextId}/${t.id}`;null!==S?S!==e&&(n(12,N=!1),S=e):S=e,n(10,k=[]),t.words.forEach((t=>{n(10,k[t.index]={word:t.value,serialNumber:t.index,entityType:null,isFinal:t.isFinal,hide:!1},k)})),r?t.entities.forEach((t=>{n(10,k[t.startPosition].word=t.value,k),n(10,k[t.startPosition].entityType=t.type,k),n(10,k[t.startPosition].isFinal=t.isFinal,k),n(10,k[t.startPosition].hide=!1,k);for(let e=t.startPosition+1;e<t.endPosition;e++)k[e]&&n(10,k[e].hide=!0,k)})):t.entities.forEach((t=>{for(let e=t.startPosition;e<t.endPosition;e++)k[e]&&(n(10,k[e].entityType=t.type,k),n(10,k[e].isFinal=t.isFinal,k))})),n(10,k=k.filter((t=>!t.hide)))},F=(t=0)=>{O(),C=window.setTimeout((()=>{C=null,E&&n(28,E=!1)}),t)},O=()=>{null!==C&&(window.clearTimeout(C),C=null)};return t.$$set=t=>{"placement"in t&&n(0,h=t.placement),"voffset"in t&&n(1,u=t.voffset),"hoffset"in t&&n(2,f=t.hoffset),"fontsize"in t&&n(3,g=t.fontsize),"color"in t&&n(4,p=t.color),"highlightcolor"in t&&n(5,m=t.highlightcolor),"backgroundcolor"in t&&n(6,$=t.backgroundcolor),"gradientstop1"in t&&n(7,y=t.gradientstop1),"gradientstop2"in t&&n(8,b=t.gradientstop2),"marginbottom"in t&&n(9,x=t.marginbottom),"formattext"in t&&n(22,w=t.formattext),"demomode"in t&&n(23,v=t.demomode)},t.$$.update=()=>{if(1024&t.$$.dirty[0]&&n(13,o=0===k.length),64&t.$$.dirty[0]&&n(14,i="none"!==$),4194304&t.$$.dirty[0]&&(r=void 0===w||"false"!==w),8388608&t.$$.dirty[0]&&n(30,s=void 0!==v&&"false"!==v),1073741824&t.$$.dirty[0]&&n(15,c=s?800:350),939524096&t.$$.dirty[0]){const t=_===xt.ClientState.Recording||E;t!==z&&(e="visibilitychanged",a=t,P.dispatchEvent(new CustomEvent(e,{detail:a,composed:!0}))),n(29,z=t),T.set({transition:z?1:0})}var e,a;1073741824&t.$$.dirty[0]&&(s||F(0))},[h,u,f,g,p,m,$,y,b,x,k,l,N,o,i,c,a,T,R,M,t=>{switch(t.data.type){case"speechsegment":B(t.data.segment);break;case"speechhandled":D(t.data.success);break;case"speechstate":A(t.data.state)}},t=>t.entityType||"",w,v,D,A,B,_,E,z,s,function(t){j[t?"unshift":"push"]((()=>{l=t,n(11,l)}))}]}class It extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>.BigTranscript{position:relative;user-select:none;font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--color);font-size:var(--fontsize);line-height:135%;display:flex;flex-direction:row;justify-content:start;flex-wrap:wrap;margin-bottom:calc(var(--marginbottom) * var(--transition))}.TranscriptItem{position:relative;display:flex;flex-direction:row;align-items:center}.Entity{color:var(--highlight-color)}.TransscriptItemContent{z-index:1;display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;overflow:hidden;white-space:nowrap}.TransscriptItemBgDiv{position:absolute;box-sizing:content-box;width:100%;height:100%;top:-0.2rem;left:-0.8rem;margin:0;padding:0.2rem 0.8rem;background-color:var(--text-bg-color);z-index:-1}.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;margin:var(--voffset) var(--hoffset) 0 var(--hoffset);z-index:50;pointer-events:none}.listening{animation:flow 1s linear infinite;background:linear-gradient(-60deg, var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1), var(--gradient-stop2), var(--gradient-stop1));background-size:200%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;-webkit-box-decoration-break:clone}@keyframes flow{0%{background-position:100% 50%}100%{background-position:0% 50%}}</style>",st(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},Ft,Bt,a,{placement:0,voffset:1,hoffset:2,fontsize:3,color:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,marginbottom:9,formattext:22,demomode:23,speechhandled:24,speechstate:25,speechsegment:26},[-1,-1]),t&&(t.target&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["placement","voffset","hoffset","fontsize","color","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","marginbottom","formattext","demomode","speechhandled","speechstate","speechsegment"]}get placement(){return this.$$.ctx[0]}set placement(t){this.$set({placement:t}),G()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),G()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),G()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),G()}get color(){return this.$$.ctx[4]}set color(t){this.$set({color:t}),G()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),G()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),G()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),G()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),G()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$set({marginbottom:t}),G()}get formattext(){return this.$$.ctx[22]}set formattext(t){this.$set({formattext:t}),G()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$set({demomode:t}),G()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}function Ot(e){let n,o,i,s,c,a,l,d,h;return{c(){n=v("main"),o=v("div"),i=v("div"),s=v("big-transcript"),c=S(),a=v("div"),l=C(e[11]),this.c=t,z(s,"formattext",e[9]),z(s,"fontsize",e[1]),z(s,"color",e[3]),z(s,"backgroundcolor","none"),z(s,"highlightcolor",e[5]),z(s,"gradientstop1",e[7]),z(s,"gradientstop2",e[8]),z(s,"demomode",e[10]),E(a,"class","hint"),T(a,"opacity",e[15].opacity),E(i,"class","pad"),E(o,"class","drawer"),T(o,"background-color",e[6]),T(o,"opacity",e[13].opacity),T(o,"transform","translate(0px, "+e[14].y+"rem)"),E(n,"class","placementTop"),T(n,"--height",e[0]),T(n,"--smalltextcolor",e[4]),T(n,"--hintfontsize",e[2])},m(t,r){x(t,n,r),b(n,o),b(o,i),b(i,s),e[26](s),b(i,c),b(i,a),b(a,l),d||(h=[_(window,"message",e[20]),_(s,"visibilitychanged",e[19])],d=!0)},p(t,[e]){512&e&&z(s,"formattext",t[9]),2&e&&z(s,"fontsize",t[1]),8&e&&z(s,"color",t[3]),32&e&&z(s,"highlightcolor",t[5]),128&e&&z(s,"gradientstop1",t[7]),256&e&&z(s,"gradientstop2",t[8]),1024&e&&z(s,"demomode",t[10]),2048&e&&N(l,t[11]),32768&e&&T(a,"opacity",t[15].opacity),64&e&&T(o,"background-color",t[6]),8192&e&&T(o,"opacity",t[13].opacity),16384&e&&T(o,"transform","translate(0px, "+t[14].y+"rem)"),1&e&&T(n,"--height",t[0]),16&e&&T(n,"--smalltextcolor",t[4]),4&e&&T(n,"--hintfontsize",t[2])},i:t,o:t,d(t){t&&w(n),e[26](null),d=!1,r(h)}}}function jt(t,n,o){let i,r,s,c,{height:a="8rem"}=n,{hint:l=""}=n,{fontsize:h="1.5rem"}=n,{hintfontsize:u="0.9rem"}=n,{color:f="#ffffff"}=n,{smalltextcolor:g="#ffffff70"}=n,{highlightcolor:p="#15e8b5"}=n,{backgroundcolor:m="#202020"}=n,{gradientstop1:$="#ffffff88"}=n,{gradientstop2:y="#ffffffcc"}=n,{formattext:b}=n,{demomode:x}=n,w=[],v=0,k="";const C=(t,e=!0)=>{z.set({opacity:0}),c&&e&&c.speechsegment(t),t.isFinal&&(v++,v<w.length?o(11,k=w[v]):o(11,k=w[Math.floor(Math.random()*w.length)]))},S=t=>{v=0,o(21,l=t),w=[];try{w=JSON.parse(l),("string"==typeof w||w instanceof String)&&(w=[w])}catch(t){w[0]=l||""}o(11,k=w[v])};let _=gt({y:-1},{duration:200});d(t,_,(t=>o(14,r=t)));let E=gt({opacity:0},{duration:200,easing:e});d(t,E,(t=>o(13,i=t)));let z=gt({opacity:0},{duration:200,delay:200,easing:e});d(t,z,(t=>o(15,s=t)));return t.$$set=t=>{"height"in t&&o(0,a=t.height),"hint"in t&&o(21,l=t.hint),"fontsize"in t&&o(1,h=t.fontsize),"hintfontsize"in t&&o(2,u=t.hintfontsize),"color"in t&&o(3,f=t.color),"smalltextcolor"in t&&o(4,g=t.smalltextcolor),"highlightcolor"in t&&o(5,p=t.highlightcolor),"backgroundcolor"in t&&o(6,m=t.backgroundcolor),"gradientstop1"in t&&o(7,$=t.gradientstop1),"gradientstop2"in t&&o(8,y=t.gradientstop2),"formattext"in t&&o(9,b=t.formattext),"demomode"in t&&o(10,x=t.demomode)},t.$$.update=()=>{2097152&t.$$.dirty&&S(l)},[a,h,u,f,g,p,m,$,y,b,x,k,c,i,r,s,_,E,z,t=>{!1===t.detail?(_.set({y:-1},{easing:lt}),E.set({opacity:0}),z.set({opacity:0})):(_.set({y:0},{easing:dt}),E.set({opacity:1}),z.set({opacity:1}))},t=>{switch(t.data.type){case"speechsegment":C(t.data.segment,!1);break;case"hint":S(t.data.hint)}},l,t=>{c&&c.speechhandled(t)},t=>{c&&c.speechstate(t)},C,S,function(t){j[t?"unshift":"push"]((()=>{c=t,o(12,c)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",It);class Lt extends ct{constructor(t){super(),this.shadowRoot.innerHTML="<style>.placementTop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:60;pointer-events:none}.drawer{width:100%;min-height:var(--height);display:flex;flex-direction:column;justify-content:flex-end;box-shadow:0 0 0.35rem #0004}.pad{position:relative;padding:2rem 2rem 0.65rem 1.5rem}.hint{font-family:'Saira Condensed', sans-serif;text-transform:uppercase;color:var(--smalltextcolor);font-size:var(--hintfontsize);line-height:135%;margin-top:0.15rem}</style>",st(this,{target:this.shadowRoot,props:R(this.attributes),customElement:!0},jt,Ot,a,{height:0,hint:21,fontsize:1,hintfontsize:2,color:3,smalltextcolor:4,highlightcolor:5,backgroundcolor:6,gradientstop1:7,gradientstop2:8,formattext:9,demomode:10,speechhandled:22,speechstate:23,speechsegment:24,sethint:25}),t&&(t.target&&x(t.target,this,t.anchor),t.props&&(this.$set(t.props),G()))}static get observedAttributes(){return["height","hint","fontsize","hintfontsize","color","smalltextcolor","highlightcolor","backgroundcolor","gradientstop1","gradientstop2","formattext","demomode","speechhandled","speechstate","speechsegment","sethint"]}get height(){return this.$$.ctx[0]}set height(t){this.$set({height:t}),G()}get hint(){return this.$$.ctx[21]}set hint(t){this.$set({hint:t}),G()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$set({fontsize:t}),G()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$set({hintfontsize:t}),G()}get color(){return this.$$.ctx[3]}set color(t){this.$set({color:t}),G()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$set({smalltextcolor:t}),G()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),G()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),G()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),G()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),G()}get formattext(){return this.$$.ctx[9]}set formattext(t){this.$set({formattext:t}),G()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$set({demomode:t}),G()}get speechhandled(){return this.$$.ctx[22]}get speechstate(){return this.$$.ctx[23]}get speechsegment(){return this.$$.ctx[24]}get sethint(){return this.$$.ctx[25]}}customElements.get("transcript-drawer")?console.warn("Skipping re-defining customElement transcript-drawer"):customElements.define("transcript-drawer",Lt)}(); | ||
//# sourceMappingURL=transcript-drawer.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
1007980
19
975
2