@speechly/browser-ui
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -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)}}}function $(t,e){t.appendChild(e)}function b(t,e,n){t.insertBefore(e,n||null)}function y(t){t.parentNode.removeChild(t)}function w(t){return document.createElement(t)}function v(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function x(t){return document.createTextNode(t)}function C(){return x(" ")}function k(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function S(t,e,n){t.classList[n?"add":"remove"](e)}function E(t){const e={};for(const n of t)e[n.name]=n.value;return e}const T=new Set;let N,P=0;function R(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(", "),P-=i,P||h((()=>{P||(T.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),T.clear())})))}function z(t){N=t}function D(){if(!N)throw new Error("Function called outside component initialization");return N}const B=[],M=[],A=[],F=[],I=Promise.resolve();let O=!1;function j(t){A.push(t)}let L=!1;const H=new Set;function V(){if(!L){L=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];z(e),q(e.$$)}for(z(null),B.length=0;M.length;)M.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];H.has(e)||(H.add(e),e())}A.length=0}while(B.length);for(;F.length;)F.pop()();O=!1,L=!1,H.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(j)}}let U;function W(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 G=new Set;function J(t,e){t&&t.i&&(G.delete(t),t.i(e))}const K={duration:0};function Q(n,o,i){let r,c,l=o(n,i),a=!1,d=0;function u(){r&&R(n,r)}function h(){const{delay:o=0,duration:i=300,easing:s=e,tick:h=t,css:g}=l||K;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;T.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(w("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`,P+=1,u}(n,0,1,i,o,s,g,d++)),h(0,1);const p=f()+o,$=p+i;c&&c.abort(),a=!0,j((()=>W(n,!0,"start"))),c=m((t=>{if(a){if(t>=$)return h(1,0),W(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||(R(n),s(l)?(l=l(),(U||(U=Promise.resolve(),U.then((()=>{U=null}))),U).then(h)):h())},invalidate(){g=!1},end(){a&&(u(),a=!1)}}}const X="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Y(t,e,n,i){const{fragment:c,on_mount:l,on_destroy:a,after_update:d}=t.$$;c&&c.m(e,n),i||j((()=>{const e=l.map(o).filter(s);a?a.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(j)}function Z(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 tt(t,e){-1===t.$$.dirty[0]&&(B.push(t),O||(O=!0,I.then(V)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function et(e,n,o,s,c,l,a=[-1]){const d=N;z(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&&tt(e,t)),n})):[],u.update(),f=!0,r(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);u.fragment&&u.fragment.l(t),t.forEach(y)}else u.fragment&&u.fragment.c();n.intro&&J(e.$$.fragment),Y(e,n.target,n.anchor,n.customElement),V()}z(d)}let nt;"function"==typeof HTMLElement&&(nt=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(){Z(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 ot,it,rt,st,ct,lt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ClientState=void 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"}(ot={exports:{}},ot.exports),ot.exports);function at(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 dt(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ut(t,{delay:e=0,speed:n,duration:o,easing:i=dt}={}){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"}(it||(it={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(rt||(rt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(st||(st={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}(ct||(ct={})),lt.ClientState.Disconnected,rt.Poweron,st.Click,ct.None,lt.ClientState.Disconnecting,rt.Poweron,st.Noninteractive,ct.Connecting,lt.ClientState.Connecting,rt.Poweron,st.Noninteractive,ct.Connecting,lt.ClientState.Connected,rt.Mic,st.Hold,ct.None,lt.ClientState.Starting,rt.Mic,st.Hold,ct.Connecting,lt.ClientState.Recording,rt.Mic,st.Hold,ct.None,lt.ClientState.Stopping,rt.Mic,st.Noninteractive,ct.Busy,lt.ClientState.Failed,rt.Error,st.Click,ct.None,lt.ClientState.NoBrowserSupport,rt.Error,st.Click,ct.None,lt.ClientState.NoAudioConsent,rt.Denied,st.Click,ct.None,it.Idle,rt.Poweron,st.Click,ct.None,it.Connecting,rt.Poweron,st.Noninteractive,ct.Connecting,it.Ready,rt.Mic,st.Hold,ct.None,it.Recording,rt.Mic,st.Hold,ct.None,it.Loading,rt.Mic,st.Noninteractive,ct.Busy,it.Failed,rt.Error,st.Click,ct.None,it.NoBrowserSupport,rt.Error,st.Click,ct.None,it.NoAudioConsent,rt.Denied,st.Click,ct.None;const ft=[0,1];function ht(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 gt(e){let n;return{c(){n=w("canvas"),_(n,"color",e[0]),_(n,"display","block"),_(n,"width","1.35rem"),_(n,"height","1.5rem"),_(n,"margin","0"),_(n,"padding","0 0.8rem 0 0rem"),_(n,"flex-grow","0"),_(n,"flex-shrink","0"),_(n,"flex-basis","1.35rem"),k(n,"class","svelte-1fz8oog")},m(t,o){b(t,n,o),e[3](n)},p(t,[e]){1&e&&_(n,"color",t[0])},i:t,o:t,d(t){t&&y(n),e[3](null)}}}function pt(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){D().$$.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){M[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class mt extends class{$destroy(){Z(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=w("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}",$(document.head,e)),et(this,t,pt,gt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const $t=[];function bt(t){return"[object Date]"===Object.prototype.toString.call(t)}function yt(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)=>yt(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(bt(t)&&bt(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]=yt(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 wt(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!$t.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),$t.push(n,e)}if(t){for(let t=0;t<$t.length;t+=2)$t[t][0]($t[t+1]);$t.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=yt}=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:vt}=X;function xt(t,e,n){const o=t.slice();return o[39]=e[n],o[41]=n,o}function Ct(t){let e;return{c(){e=w("div"),k(e,"class","TransscriptItemBgDiv")},m(t,n){b(t,e,n)},d(t){t&&y(e)}}}function kt(e){let n,o;return{c(){n=w("div"),n.textContent="Listening...",k(n,"class","listening")},m(t,e){b(t,n,e)},i(t){o||j((()=>{o=Q(n,e[19],{duration:400}),o.start()}))},o:t,d(t){t&&y(n)}}}function _t(e){let n,o;return{c(){n=w("div"),k(n,"class","TransscriptItemBgDiv")},m(t,e){b(t,n,e)},p(t,n){e=t},i(t){o||j((()=>{o=Q(n,e[19],{duration:e[15]}),o.start()}))},o:t,d(t){t&&y(n)}}}function St(t){let e,n;return{c(){e=w("span"),k(e,"style",n=t[41]<t[10].length-1?"width:0.25em;":t[12]?"width:1.2em;":"")},m(t,n){b(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;":"")&&k(e,"style",n)},d(t){t&&y(e)}}}function Et(e){let n,o,i,r,s,c,l,a=e[39].word+"",d=e[14]&&_t(e),u=e[41]<e[10].length&&St(e);return{c(){n=w("div"),d&&d.c(),o=C(),i=w("div"),r=x(a),s=C(),u&&u.c(),k(i,"class","TransscriptItemContent"),k(n,"class",l="TranscriptItem "+e[21](e[39])),S(n,"Entity",null!==e[39].entityType),S(n,"Final",e[39].isFinal)},m(t,e){b(t,n,e),d&&d.m(n,null),$(n,o),$(n,i),$(i,r),$(i,s),u&&u.m(i,null)},p(t,s){(e=t)[14]?d?16384&s[0]&&J(d,1):(d=_t(e),d.c(),J(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=St(e),u.c(),u.m(i,null)):u&&(u.d(1),u=null),1024&s[0]&&l!==(l="TranscriptItem "+e[21](e[39]))&&k(n,"class",l),1024&s[0]&&S(n,"Entity",null!==e[39].entityType),1024&s[0]&&S(n,"Final",e[39].isFinal)},i(t){J(d),c||j((()=>{c=Q(i,e[19],{duration:e[15]}),c.start()}))},o:t,d(t){t&&y(n),d&&d.d(),u&&u.d()}}}function Tt(e){let n,o,i,r,s,c,l,a;return{c(){n=w("div"),o=w("div"),i=C(),r=w("div"),s=v("svg"),c=v("path"),k(o,"class","TransscriptItemBgDiv"),_(o,"background-color",e[5]),k(c,"stroke","currentColor"),k(c,"stroke-width","3"),k(c,"d","M7.191 11.444l4.059 6.107 7.376-12.949"),k(c,"fill","none"),k(c,"fill-rule","evenodd"),_(s,"width","2rem"),_(s,"height","2rem"),_(s,"position","absolute"),_(s,"transform","translate(-0.6rem, -0.5rem)"),_(s,"stroke","#eee"),k(s,"viewBox","0 0 24 24"),k(s,"xmlns","http://www.w3.org/2000/svg"),_(r,"width","1.0rem"),_(r,"height","1rem"),_(r,"position","relative"),k(n,"class","TranscriptItem")},m(t,e){b(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,c)},p(t,e){32&e[0]&&_(o,"background-color",t[5])},i(t){l||j((()=>{l=Q(c,e[18],{duration:500}),l.start()})),a||j((()=>{a=Q(n,e[19],{duration:200,maxWidth:3}),a.start()}))},o:t,d(t){t&&y(n)}}}function Nt(e){let n,o,i,r,s,c,l,a,d,u,f,h,g,p,m=e[14]&&Ct(),v={color:e[5]};c=new mt({props:v}),e[31](c);let x=e[13]&&kt(e),E=e[10],T=[];for(let t=0;t<E.length;t+=1)T[t]=Et(xt(e,E,t));let N=e[12]&&Tt(e);return{c(){var h;n=w("main"),o=w("div"),i=w("div"),m&&m.c(),r=C(),s=w("div"),(h=c.$$.fragment)&&h.c(),l=C(),x&&x.c(),a=C();for(let t=0;t<T.length;t+=1)T[t].c();d=C(),N&&N.c(),u=C(),f=w("link"),this.c=t,k(s,"class","TransscriptItemContent"),k(i,"class","TranscriptItem"),k(o,"class","BigTranscript"),_(n,"--voffset",e[1]),_(n,"--hoffset",e[2]),_(n,"--fontsize",e[3]),_(n,"--color",e[4]),_(n,"--highlight-color",e[5]),_(n,"--text-bg-color",e[6]),_(n,"--gradient-stop1",e[7]),_(n,"--gradient-stop2",e[8]),_(n,"--marginbottom",e[9]),_(n,"--transition",e[16].transition),_(n,"opacity",e[16].transition),_(n,"max-height",10*ht(ft,e[16].transition,0,.6)+"rem"),_(n,"visibility",0!==e[16].transition?"visible":"hidden"),S(n,"placementTop","top"===e[0]),k(f,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),k(f,"rel","stylesheet")},m(t,y){b(t,n,y),$(n,o),$(o,i),m&&m.m(i,null),$(i,r),$(i,s),Y(c,s,null),$(s,l),x&&x.m(s,null),$(o,a);for(let t=0;t<T.length;t+=1)T[t].m(o,null);var w,v,C,k;$(o,d),N&&N.m(o,null),b(t,u,y),$(document.head,f),h=!0,g||(w=vt,v="message",C=e[20],w.addEventListener(v,C,k),p=()=>w.removeEventListener(v,C,k),g=!0)},p(t,e){t[14]?m||(m=Ct(),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]?x?8192&e[0]&&J(x,1):(x=kt(t),x.c(),J(x,1),x.m(s,null)):x&&(x.d(1),x=null),2118656&e[0]){let n;for(E=t[10],n=0;n<E.length;n+=1){const i=xt(t,E,n);T[n]?(T[n].p(i,e),J(T[n],1)):(T[n]=Et(i),T[n].c(),J(T[n],1),T[n].m(o,d))}for(;n<T.length;n+=1)T[n].d(1);T.length=E.length}t[12]?N?(N.p(t,e),4096&e[0]&&J(N,1)):(N=Tt(t),N.c(),J(N,1),N.m(o,null)):N&&(N.d(1),N=null),(!h||2&e[0])&&_(n,"--voffset",t[1]),(!h||4&e[0])&&_(n,"--hoffset",t[2]),(!h||8&e[0])&&_(n,"--fontsize",t[3]),(!h||16&e[0])&&_(n,"--color",t[4]),(!h||32&e[0])&&_(n,"--highlight-color",t[5]),(!h||64&e[0])&&_(n,"--text-bg-color",t[6]),(!h||128&e[0])&&_(n,"--gradient-stop1",t[7]),(!h||256&e[0])&&_(n,"--gradient-stop2",t[8]),(!h||512&e[0])&&_(n,"--marginbottom",t[9]),(!h||65536&e[0])&&_(n,"--transition",t[16].transition),(!h||65536&e[0])&&_(n,"opacity",t[16].transition),(!h||65536&e[0])&&_(n,"max-height",10*ht(ft,t[16].transition,0,.6)+"rem"),(!h||65536&e[0])&&_(n,"visibility",0!==t[16].transition?"visible":"hidden"),1&e[0]&&S(n,"placementTop","top"===t[0])},i(t){if(!h){J(c.$$.fragment,t),J(x);for(let t=0;t<E.length;t+=1)J(T[t]);J(N),h=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(G.has(t))return;G.add(t),(void 0).c.push((()=>{G.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(c.$$.fragment,t),h=!1},d(t){t&&y(n),m&&m.d(),e[31](null),Z(c),x&&x.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(T,t),N&&N.d(),t&&y(u),y(f),g=!1,p()}}}function Pt(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=lt.ClientState.Disconnected,E=!1,T=!1,N=!1,P=wt({transition:0},{duration:200});d(t,P,(t=>n(16,l=t)));const R=D(),z=at(ut),B=at(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${ht(ft,t,0,1)*o}rem;\n `}))),A=t=>{n(12,N=N||t)},F=t=>{n(27,S=t),S===lt.ClientState.Recording&&(n(12,N=!1),n(10,C=[]),_=null)},I=t=>{if(void 0===t)return;a&&(s||S===lt.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,N=!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===lt.ClientState.Recording||E;t!==T&&(e="visibilitychanged",l=t,R.dispatchEvent(new CustomEvent(e,{detail:l,composed:!0}))),n(29,T=t),P.set({transition:T?1:0})}var e,l;1073741824&t.$$.dirty[0]&&(s||O(0))},[u,f,h,g,p,m,$,b,y,w,C,a,N,o,i,c,l,P,z,B,t=>{switch(t.data.type){case"speechsegment":I(t.data.segment);break;case"speechhandled":A(t.data.success);break;case"speechstate":F(t.data.state)}},t=>t.entityType||"",v,x,A,F,I,S,E,T,s,function(t){M[t?"unshift":"push"]((()=>{a=t,n(11,a)}))}]}class Rt extends nt{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>",et(this,{target:this.shadowRoot,props:E(this.attributes),customElement:!0},Pt,Nt,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&&b(t.target,this,t.anchor),t.props&&(this.$set(t.props),V()))}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}),V()}get voffset(){return this.$$.ctx[1]}set voffset(t){this.$set({voffset:t}),V()}get hoffset(){return this.$$.ctx[2]}set hoffset(t){this.$set({hoffset:t}),V()}get fontsize(){return this.$$.ctx[3]}set fontsize(t){this.$set({fontsize:t}),V()}get color(){return this.$$.ctx[4]}set color(t){this.$set({color:t}),V()}get highlightcolor(){return this.$$.ctx[5]}set highlightcolor(t){this.$set({highlightcolor:t}),V()}get backgroundcolor(){return this.$$.ctx[6]}set backgroundcolor(t){this.$set({backgroundcolor:t}),V()}get gradientstop1(){return this.$$.ctx[7]}set gradientstop1(t){this.$set({gradientstop1:t}),V()}get gradientstop2(){return this.$$.ctx[8]}set gradientstop2(t){this.$set({gradientstop2:t}),V()}get marginbottom(){return this.$$.ctx[9]}set marginbottom(t){this.$set({marginbottom:t}),V()}get formattext(){return this.$$.ctx[22]}set formattext(t){this.$set({formattext:t}),V()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$set({demomode:t}),V()}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",Rt)}(); | ||
!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}),e.ClientState=void 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 |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function s(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e}const a="undefined"!=typeof window;let c=a?()=>window.performance.now():()=>Date.now(),l=a?t=>requestAnimationFrame(t):t;const u=new Set;function d(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&l(d)}function f(t){let e;return 0===u.size&&l(d),{promise:new Promise((n=>{u.add(e={c:t,f:n})})),abort(){u.delete(e)}}}function h(t,e){t.appendChild(e)}function m(t,e,n){t.insertBefore(e,n||null)}function p(t){t.parentNode.removeChild(t)}function $(t){return document.createElement(t)}function g(){return t=" ",document.createTextNode(t);var t}function v(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function w(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function b(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function x(t){const e={};for(const n of t)e[n.name]=n.value;return e}const y=new Set;let _,k=0;function z(t,e,n,o,r,s,i,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);l+=100*t+`%{${i(o,1-o)}}\n`}const u=l+`100% {${i(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${a}`,f=t.ownerDocument;y.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild($("style")).sheet),m=f.__svelte_rules||(f.__svelte_rules={});m[d]||(m[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${r}ms 1 both`,k+=1,d}function E(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),k-=r,k||l((()=>{k||(y.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),y.clear())})))}function C(t){_=t}const D=[],S=[],A=[],T=[],L=Promise.resolve();let O=!1;function P(t){A.push(t)}let M=!1;const R=new Set;function j(){if(!M){M=!0;do{for(let t=0;t<D.length;t+=1){const e=D[t];C(e),H(e.$$)}for(C(null),D.length=0;S.length;)S.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];R.has(e)||(R.add(e),e())}A.length=0}while(D.length);for(;T.length;)T.pop()();O=!1,M=!1,R.clear()}}function H(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(P)}}let q;function N(){return q||(q=Promise.resolve(),q.then((()=>{q=null}))),q}function B(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 F=new Set;let G;function I(t,e){t&&t.i&&(F.delete(t),t.i(e))}function J(t,e,n,o){if(t&&t.o){if(F.has(t))return;F.add(t),G.c.push((()=>{F.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const K={duration:0};function Q(t,e){-1===t.$$.dirty[0]&&(D.push(t),O||(O=!0,L.then(j)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function U(e,i,a,c,l,u,d=[-1]){const f=_;C(e);const h=e.$$={fragment:null,ctx:null,props:u,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:i.context||[]),callbacks:o(),dirty:d,skip_bound:!1};let m=!1;if(h.ctx=a?a(e,i.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return h.ctx&&l(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),m&&Q(e,t)),n})):[],h.update(),m=!0,r(h.before_update),h.fragment=!!c&&c(h.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);h.fragment&&h.fragment.l(t),t.forEach(p)}else h.fragment&&h.fragment.c();i.intro&&I(e.$$.fragment),function(t,e,o,i){const{fragment:a,on_mount:c,on_destroy:l,after_update:u}=t.$$;a&&a.m(e,o),i||P((()=>{const e=c.map(n).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(P)}(e,i.target,i.anchor,i.customElement),j()}C(f)}let V;function W(n){let o,i,a,l,u,d,x,y,_,k;return{c(){o=$("div"),i=$("div"),i.innerHTML="<slot></slot>",a=g(),l=$("div"),u=g(),w(i,"class","CalloutDiv"),function(t,e,n){t.classList[n?"add":"remove"](e)}(i,"useShadow",Y),w(l,"class","ArrowDiv"),b(l,"--ax","50%"),b(l,"--ay","100%"),w(o,"class","CalloutContainerDiv")},m(t,e){m(t,o,e),h(o,i),h(o,a),h(o,l),h(o,u),y=!0,_||(k=[v(o,"mousedown",n[8]),v(o,"touchstart",n[8]),v(o,"dragstart",n[8])],_=!0)},p:t,i(r){y||(P((()=>{x&&x.end(1),d||(d=function(n,o,r){let i,a,l=o(n,r),u=!1,d=0;function h(){i&&E(n,i)}function m(){const{delay:o=0,duration:r=300,easing:s=e,tick:m=t,css:p}=l||K;p&&(i=z(n,0,1,r,o,s,p,d++)),m(0,1);const $=c()+o,g=$+r;a&&a.abort(),u=!0,P((()=>B(n,!0,"start"))),a=f((t=>{if(u){if(t>=g)return m(1,0),B(n,!0,"end"),h(),u=!1;if(t>=$){const e=s((t-$)/r);m(e,1-e)}}return u}))}let p=!1;return{start(){p||(E(n),s(l)?(l=l(),N().then(m)):m())},invalidate(){p=!1},end(){u&&(h(),u=!1)}}}(o,n[7],{})),d.start()})),y=!0)},o(i){d&&d.invalidate(),x=function(n,o,i){let a,l=o(n,i),u=!0;const d=G;function h(){const{delay:o=0,duration:s=300,easing:i=e,tick:h=t,css:m}=l||K;m&&(a=z(n,1,0,s,o,i,m));const p=c()+o,$=p+s;P((()=>B(n,!1,"start"))),f((t=>{if(u){if(t>=$)return h(0,1),B(n,!1,"end"),--d.r||r(d.c),!1;if(t>=p){const e=i((t-p)/s);h(1-e,e)}}return u}))}return d.r+=1,s(l)?N().then((()=>{l=l(),h()})):h(),{end(t){t&&l.tick&&l.tick(1,0),u&&(a&&E(n,a),u=!1)}}}(o,n[7],{}),y=!1},d(t){t&&p(o),t&&x&&x.end(),_=!1,r(k)}}}function X(e){let n,o,s,i,a=e[3]&&W(e);return{c(){n=$("main"),a&&a.c(),o=g(),s=$("link"),this.c=t,b(n,"--ax",e[4].x),b(n,"--ay",e[4].y),b(n,"--halign",e[5].x),b(n,"--valign",e[5].y),b(n,"--borderradius",Z),b(n,"--arrowpad",`${e[6].value}${e[6].unit}`),b(n,"--textcolor",e[1]),b(n,"--backgroundcolor",e[2]),b(n,"--size",`${e[6].value*Math.sqrt(2)}${e[6].unit}`),b(n,"--fontsize",e[0]),b(n,"--offsetx","0rem"),b(n,"--offsety",`${e[6].value}${e[6].unit}`),w(s,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),w(s,"rel","stylesheet")},m(t,e){m(t,n,e),a&&a.m(n,null),m(t,o,e),h(document.head,s),i=!0},p(t,[e]){t[3]?a?(a.p(t,e),8&e&&I(a,1)):(a=W(t),a.c(),I(a,1),a.m(n,null)):a&&(G={r:0,c:[],p:G},J(a,1,1,(()=>{a=null})),G.r||r(G.c),G=G.p),(!i||2&e)&&b(n,"--textcolor",t[1]),(!i||4&e)&&b(n,"--backgroundcolor",t[2]),(!i||1&e)&&b(n,"--fontsize",t[0])},i(t){i||(I(a),i=!0)},o(t){J(a),i=!1},d(t){t&&p(n),a&&a.d(),t&&p(o),p(s)}}}"function"==typeof HTMLElement&&(V=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).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(){!function(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=[])}(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});let Y=!1,Z="0rem";function tt(t,e,n){let{show:o}=e,{showtime:r=1e4}=e,{fontsize:s="1.2rem"}=e,{textcolor:i="#ffffff"}=e,{backgroundcolor:a="#202020"}=e,c=null,l=!1;const u=(d=(t,{duration:e=250})=>({duration:e,css:t=>`\n clip-path: circle(${100*t}% at center);\n `}),function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return d(t,e)});var d;return t.$$set=t=>{"show"in t&&n(9,o=t.show),"showtime"in t&&n(10,r=t.showtime),"fontsize"in t&&n(0,s=t.fontsize),"textcolor"in t&&n(1,i=t.textcolor),"backgroundcolor"in t&&n(2,a=t.backgroundcolor)},t.$$.update=()=>{512&t.$$.dirty&&(t=>{null!==c&&(window.clearTimeout(c),c=null),void 0!==t&&"false"!==t?c=window.setTimeout((()=>{n(3,l=!0),c=null,r>0&&(c=window.setTimeout((()=>{n(3,l=!1),c=null}),r))}),500):n(3,l=!1)})(o)},[s,i,a,l,{x:"50%",y:"10%"},{x:"50%",y:"100%"},{value:.55,unit:"rem"},u,t=>{t.preventDefault(),t.stopPropagation(),n(3,l=!1)},o,r]}class et extends V{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{margin:0;padding:0}.CalloutContainerDiv{position:absolute;left:var(--ax);top:var(--ay);transform:translate(calc(-1 * var(--halign)), calc(-1 * var(--valign)));padding:var(--arrowpad);z-index:10;pointer-events:auto}.CalloutDiv{position:relative;box-sizing:border-box;min-width:8rem;border-radius:var(--borderradius);padding:0.50rem 1rem;background-color:var(--backgroundcolor);text-align:center;user-select:none;z-index:10;color:var(--textcolor);font-family:'Saira Condensed', sans-serif;font-size:var(--fontsize);line-height:120%;text-transform:uppercase}.useShadow{box-shadow:0 0.2rem 0.5rem #00000040}.ArrowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);z-index:10}.ArrowShadowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);background-color:#00000000;box-shadow:0 0.2rem 0.5rem #00000040;z-index:9}</style>",U(this,{target:this.shadowRoot,props:x(this.attributes),customElement:!0},tt,X,i,{show:9,showtime:10,fontsize:0,textcolor:1,backgroundcolor:2}),t&&(t.target&&m(t.target,this,t.anchor),t.props&&(this.$set(t.props),j()))}static get observedAttributes(){return["show","showtime","fontsize","textcolor","backgroundcolor"]}get show(){return this.$$.ctx[9]}set show(t){this.$set({show:t}),j()}get showtime(){return this.$$.ctx[10]}set showtime(t){this.$set({showtime:t}),j()}get fontsize(){return this.$$.ctx[0]}set fontsize(t){this.$set({fontsize:t}),j()}get textcolor(){return this.$$.ctx[1]}set textcolor(t){this.$set({textcolor:t}),j()}get backgroundcolor(){return this.$$.ctx[2]}set backgroundcolor(t){this.$set({backgroundcolor:t}),j()}}customElements.get("call-out")?console.warn("Skipping re-defining customElement call-out"):customElements.define("call-out",et)}(); | ||
!function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(n)}function s(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e}const a="undefined"!=typeof window;let c=a?()=>window.performance.now():()=>Date.now(),l=a?t=>requestAnimationFrame(t):t;const u=new Set;function d(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&l(d)}function f(t){let e;return 0===u.size&&l(d),{promise:new Promise((n=>{u.add(e={c:t,f:n})})),abort(){u.delete(e)}}}let h=!1;const m=new Set;function p(t,e){h&&m.delete(e),e.parentNode!==t&&t.appendChild(e)}function $(t,e,n){h&&m.delete(e),(e.parentNode!==t||n&&e.nextSibling!==n)&&t.insertBefore(e,n||null)}function g(t){h?m.add(t):t.parentNode&&t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function w(){return t=" ",document.createTextNode(t);var t}function b(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function y(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function _(t){const e={};for(const n of t)e[n.name]=n.value;return e}const k=new Set;let z,E=0;function C(t,e,n,o,r,s,i,a=0){const c=16.666/o;let l="{\n";for(let t=0;t<=1;t+=c){const o=e+(n-e)*s(t);l+=100*t+`%{${i(o,1-o)}}\n`}const u=l+`100% {${i(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${a}`,f=t.ownerDocument;k.add(f);const h=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(v("style")).sheet),m=f.__svelte_rules||(f.__svelte_rules={});m[d]||(m[d]=!0,h.insertRule(`@keyframes ${d} ${u}`,h.cssRules.length));const p=t.style.animation||"";return t.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${r}ms 1 both`,E+=1,d}function S(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-o.length;r&&(t.style.animation=o.join(", "),E-=r,E||l((()=>{E||(k.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),k.clear())})))}function D(t){z=t}const A=[],T=[],L=[],N=[],O=Promise.resolve();let P=!1;function M(t){L.push(t)}let R=!1;const j=new Set;function H(){if(!R){R=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];D(e),q(e.$$)}for(D(null),A.length=0;T.length;)T.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(A.length);for(;N.length;)N.pop()();P=!1,R=!1,j.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(M)}}let B;function F(){return B||(B=Promise.resolve(),B.then((()=>{B=null}))),B}function G(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 I=new Set;let J;function K(t,e){t&&t.i&&(I.delete(t),t.i(e))}function Q(t,e,n,o){if(t&&t.o){if(I.has(t))return;I.add(t),J.c.push((()=>{I.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const U={duration:0};function V(t,e){-1===t.$$.dirty[0]&&(A.push(t),P||(P=!0,O.then(H)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function W(e,i,a,c,l,u,d=[-1]){const f=z;D(e);const p=e.$$={fragment:null,ctx:null,props:u,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:i.context||[]),callbacks:o(),dirty:d,skip_bound:!1};let $=!1;if(p.ctx=a?a(e,i.props||{},((t,n,...o)=>{const r=o.length?o[0]:n;return p.ctx&&l(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),$&&V(e,t)),n})):[],p.update(),$=!0,r(p.before_update),p.fragment=!!c&&c(p.ctx),i.target){if(i.hydrate){h=!0;const t=function(t){return Array.from(t.childNodes)}(i.target);p.fragment&&p.fragment.l(t),t.forEach(g)}else p.fragment&&p.fragment.c();i.intro&&K(e.$$.fragment),function(t,e,o,i){const{fragment:a,on_mount:c,on_destroy:l,after_update:u}=t.$$;a&&a.m(e,o),i||M((()=>{const e=c.map(n).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(M)}(e,i.target,i.anchor,i.customElement),function(){h=!1;for(const t of m)t.parentNode.removeChild(t);m.clear()}(),H()}D(f)}let X;function Y(n){let o,i,a,l,u,d,h,m,_,k;return{c(){o=v("div"),i=v("div"),i.innerHTML="<slot></slot>",a=w(),l=v("div"),u=w(),x(i,"class","CalloutDiv"),function(t,e,n){t.classList[n?"add":"remove"](e)}(i,"useShadow",tt),x(l,"class","ArrowDiv"),y(l,"--ax","50%"),y(l,"--ay","100%"),x(o,"class","CalloutContainerDiv")},m(t,e){$(t,o,e),p(o,i),p(o,a),p(o,l),p(o,u),m=!0,_||(k=[b(o,"mousedown",n[8]),b(o,"touchstart",n[8]),b(o,"dragstart",n[8])],_=!0)},p:t,i(r){m||(M((()=>{h&&h.end(1),d||(d=function(n,o,r){let i,a,l=o(n,r),u=!1,d=0;function h(){i&&S(n,i)}function m(){const{delay:o=0,duration:r=300,easing:s=e,tick:m=t,css:p}=l||U;p&&(i=C(n,0,1,r,o,s,p,d++)),m(0,1);const $=c()+o,g=$+r;a&&a.abort(),u=!0,M((()=>G(n,!0,"start"))),a=f((t=>{if(u){if(t>=g)return m(1,0),G(n,!0,"end"),h(),u=!1;if(t>=$){const e=s((t-$)/r);m(e,1-e)}}return u}))}let p=!1;return{start(){p||(S(n),s(l)?(l=l(),F().then(m)):m())},invalidate(){p=!1},end(){u&&(h(),u=!1)}}}(o,n[7],{})),d.start()})),m=!0)},o(i){d&&d.invalidate(),h=function(n,o,i){let a,l=o(n,i),u=!0;const d=J;function h(){const{delay:o=0,duration:s=300,easing:i=e,tick:h=t,css:m}=l||U;m&&(a=C(n,1,0,s,o,i,m));const p=c()+o,$=p+s;M((()=>G(n,!1,"start"))),f((t=>{if(u){if(t>=$)return h(0,1),G(n,!1,"end"),--d.r||r(d.c),!1;if(t>=p){const e=i((t-p)/s);h(1-e,e)}}return u}))}return d.r+=1,s(l)?F().then((()=>{l=l(),h()})):h(),{end(t){t&&l.tick&&l.tick(1,0),u&&(a&&S(n,a),u=!1)}}}(o,n[7],{}),m=!1},d(t){t&&g(o),t&&h&&h.end(),_=!1,r(k)}}}function Z(e){let n,o,s,i,a=e[3]&&Y(e);return{c(){n=v("main"),a&&a.c(),o=w(),s=v("link"),this.c=t,y(n,"--ax",e[4].x),y(n,"--ay",e[4].y),y(n,"--halign",e[5].x),y(n,"--valign",e[5].y),y(n,"--borderradius",et),y(n,"--arrowpad",`${e[6].value}${e[6].unit}`),y(n,"--textcolor",e[1]),y(n,"--backgroundcolor",e[2]),y(n,"--size",`${e[6].value*Math.sqrt(2)}${e[6].unit}`),y(n,"--fontsize",e[0]),y(n,"--offsetx","0rem"),y(n,"--offsety",`${e[6].value}${e[6].unit}`),x(s,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),x(s,"rel","stylesheet")},m(t,e){$(t,n,e),a&&a.m(n,null),$(t,o,e),p(document.head,s),i=!0},p(t,[e]){t[3]?a?(a.p(t,e),8&e&&K(a,1)):(a=Y(t),a.c(),K(a,1),a.m(n,null)):a&&(J={r:0,c:[],p:J},Q(a,1,1,(()=>{a=null})),J.r||r(J.c),J=J.p),(!i||2&e)&&y(n,"--textcolor",t[1]),(!i||4&e)&&y(n,"--backgroundcolor",t[2]),(!i||1&e)&&y(n,"--fontsize",t[0])},i(t){i||(K(a),i=!0)},o(t){Q(a),i=!1},d(t){t&&g(n),a&&a.d(),t&&g(o),g(s)}}}"function"==typeof HTMLElement&&(X=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).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(){!function(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=[])}(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){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});let tt=!1,et="0rem";function nt(t,e,n){let{show:o}=e,{showtime:r=1e4}=e,{fontsize:s="1.2rem"}=e,{textcolor:i="#ffffff"}=e,{backgroundcolor:a="#202020"}=e,c=null,l=!1;const u=(d=(t,{duration:e=250})=>({duration:e,css:t=>`\n clip-path: circle(${100*t}% at center);\n `}),function(t,e){if(!t.hasOwnProperty("ownerDocument")){Object.defineProperty(t,"ownerDocument",{get:function(){return t.parentElement}});let e=t;for(;e.parentElement;)e=e.parentElement;t.parentElement.head=e}return d(t,e)});var d;return t.$$set=t=>{"show"in t&&n(9,o=t.show),"showtime"in t&&n(10,r=t.showtime),"fontsize"in t&&n(0,s=t.fontsize),"textcolor"in t&&n(1,i=t.textcolor),"backgroundcolor"in t&&n(2,a=t.backgroundcolor)},t.$$.update=()=>{512&t.$$.dirty&&(t=>{null!==c&&(window.clearTimeout(c),c=null),void 0!==t&&"false"!==t?c=window.setTimeout((()=>{n(3,l=!0),c=null,r>0&&(c=window.setTimeout((()=>{n(3,l=!1),c=null}),r))}),500):n(3,l=!1)})(o)},[s,i,a,l,{x:"50%",y:"10%"},{x:"50%",y:"100%"},{value:.55,unit:"rem"},u,t=>{t.preventDefault(),t.stopPropagation(),n(3,l=!1)},o,r]}class ot extends X{constructor(t){super(),this.shadowRoot.innerHTML="<style>main{margin:0;padding:0}.CalloutContainerDiv{position:absolute;left:var(--ax);top:var(--ay);transform:translate(calc(-1 * var(--halign)), calc(-1 * var(--valign)));padding:var(--arrowpad);z-index:10;pointer-events:auto}.CalloutDiv{position:relative;box-sizing:border-box;min-width:8rem;border-radius:var(--borderradius);padding:0.50rem 1rem;background-color:var(--backgroundcolor);text-align:center;user-select:none;z-index:10;color:var(--textcolor);font-family:'Saira Condensed', sans-serif;font-size:var(--fontsize);line-height:120%;text-transform:uppercase}.useShadow{box-shadow:0 0.2rem 0.5rem #00000040}.ArrowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);z-index:10}.ArrowShadowDiv{position:absolute;left:calc(var(--ax) - var(--offsetx));top:calc(var(--ay) - var(--offsety));transform:translate(-50%, -50%) rotate(45deg);width:var(--size);height:var(--size);background-color:var(--backgroundcolor);background-color:#00000000;box-shadow:0 0.2rem 0.5rem #00000040;z-index:9}</style>",W(this,{target:this.shadowRoot,props:_(this.attributes),customElement:!0},nt,Z,i,{show:9,showtime:10,fontsize:0,textcolor:1,backgroundcolor:2}),t&&(t.target&&$(t.target,this,t.anchor),t.props&&(this.$set(t.props),H()))}static get observedAttributes(){return["show","showtime","fontsize","textcolor","backgroundcolor"]}get show(){return this.$$.ctx[9]}set show(t){this.$set({show:t}),H()}get showtime(){return this.$$.ctx[10]}set showtime(t){this.$set({showtime:t}),H()}get fontsize(){return this.$$.ctx[0]}set fontsize(t){this.$set({fontsize:t}),H()}get textcolor(){return this.$$.ctx[1]}set textcolor(t){this.$set({textcolor:t}),H()}get backgroundcolor(){return this.$$.ctx[2]}set backgroundcolor(t){this.$set({backgroundcolor:t}),H()}}customElements.get("call-out")?console.warn("Skipping re-defining customElement call-out"):customElements.define("call-out",ot)}(); | ||
//# sourceMappingURL=call-out.js.map |
@@ -0,1 +1,5 @@ | ||
## 4.1.2 | ||
- Added two Custom Events to Push-To-Talk Button: startcontext (triggered on just before starting listening. Allows changing <code>appid</code> to redirect audio to an alternative voice configuration and stopcontext (triggered on just after stopping listening) | ||
## 4.1.1 | ||
@@ -2,0 +6,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t}function c(e,t){e.appendChild(t)}function s(e,t,n){e.insertBefore(t,n||null)}function l(e){e.parentNode.removeChild(e)}function a(e){return document.createElement(e)}function d(e){return document.createTextNode(e)}function u(){return d(" ")}function p(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function f(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function h(e,t,n){e.classList[n?"add":"remove"](t)}function m(e){const t={};for(const n of e)t[n.name]=n.value;return t}let g;function C(e){g=e}const w=[],b=[],$=[],y=[],S=Promise.resolve();let x=!1;function N(e){$.push(e)}let v=!1;const k=new Set;function _(){if(!v){v=!0;do{for(let e=0;e<w.length;e+=1){const t=w[e];C(t),R(t.$$)}for(C(null),w.length=0;b.length;)b.pop()();for(let e=0;e<$.length;e+=1){const t=$[e];k.has(t)||(k.add(t),t())}$.length=0}while(w.length);for(;y.length;)y.pop()();x=!1,v=!1,k.clear()}}function R(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(N)}}const T=new Set;const E="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function A(e,t){-1===e.$$.dirty[0]&&(w.push(e),x||(x=!0,S.then(_)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function M(i,c,s,a,d,u,p=[-1]){const f=g;C(i);const h=i.$$={fragment:null,ctx:null,props:u,update:e,not_equal:d,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(f?f.$$.context:c.context||[]),callbacks:n(),dirty:p,skip_bound:!1};let m=!1;if(h.ctx=s?s(i,c.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return h.ctx&&d(h.ctx[e],h.ctx[e]=o)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](o),m&&A(i,e)),t})):[],h.update(),m=!0,o(h.before_update),h.fragment=!!a&&a(h.ctx),c.target){if(c.hydrate){const e=function(e){return Array.from(e.childNodes)}(c.target);h.fragment&&h.fragment.l(e),e.forEach(l)}else h.fragment&&h.fragment.c();c.intro&&((w=i.$$.fragment)&&w.i&&(T.delete(w),w.i(b))),function(e,n,i,c){const{fragment:s,on_mount:l,on_destroy:a,after_update:d}=e.$$;s&&s.m(n,i),c||N((()=>{const n=l.map(t).filter(r);a?a.push(...n):o(n),e.$$.on_mount=[]})),d.forEach(N)}(i,c.target,c.anchor,c.customElement),_()}var w,b;C(f)}let B;"function"==typeof HTMLElement&&(B=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});var H,L,P,D,I,F=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientState=void 0,(n=t.ClientState||(t.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"}(H={exports:{}},H.exports),H.exports);!function(e){e.Failed="Failed",e.NoBrowserSupport="NoBrowserSupport",e.NoAudioConsent="NoAudioConsent",e.Idle="Idle",e.Connecting="Connecting",e.Ready="Ready",e.Recording="Recording",e.Loading="Loading"}(L||(L={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(P||(P={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(D||(D={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(I||(I={})),F.ClientState.Disconnected,P.Poweron,D.Click,I.None,F.ClientState.Disconnecting,P.Poweron,D.Noninteractive,I.Connecting,F.ClientState.Connecting,P.Poweron,D.Noninteractive,I.Connecting,F.ClientState.Connected,P.Mic,D.Hold,I.None,F.ClientState.Starting,P.Mic,D.Hold,I.Connecting,F.ClientState.Recording,P.Mic,D.Hold,I.None,F.ClientState.Stopping,P.Mic,D.Noninteractive,I.Busy,F.ClientState.Failed,P.Error,D.Click,I.None,F.ClientState.NoBrowserSupport,P.Error,D.Click,I.None,F.ClientState.NoAudioConsent,P.Denied,D.Click,I.None,L.Idle,P.Poweron,D.Click,I.None,L.Connecting,P.Poweron,D.Noninteractive,I.Connecting,L.Ready,P.Mic,D.Hold,I.None,L.Recording,P.Mic,D.Hold,I.None,L.Loading,P.Mic,D.Noninteractive,I.Busy,L.Failed,P.Error,D.Click,I.None,L.NoBrowserSupport,P.Error,D.Click,I.None,L.NoAudioConsent,P.Denied,D.Click,I.None;const{window:q}=E;function z(e){let t,n,o,r,i,d,f,h,m=e[2]===K&&j(e),g=e[2]===F.ClientState.NoAudioConsent&&O(),C=e[2]===F.ClientState.NoBrowserSupport&&U(),w=e[2]===Q&&G();return{c(){t=a("errorDiv"),n=a("errorLeft"),n.textContent="×",o=u(),m&&m.c(),r=u(),g&&g.c(),i=u(),C&&C.c(),d=u(),w&&w.c()},m(l,a){s(l,t,a),c(t,n),c(t,o),m&&m.m(t,null),c(t,r),g&&g.m(t,null),c(t,i),C&&C.m(t,null),c(t,d),w&&w.m(t,null),f||(h=p(n,"click",e[4]),f=!0)},p(e,n){e[2]===K?m?m.p(e,n):(m=j(e),m.c(),m.m(t,r)):m&&(m.d(1),m=null),e[2]===F.ClientState.NoAudioConsent?g?g.p(e,n):(g=O(),g.c(),g.m(t,i)):g&&(g.d(1),g=null),e[2]===F.ClientState.NoBrowserSupport?C||(C=U(),C.c(),C.m(t,d)):C&&(C.d(1),C=null),e[2]===Q?w?w.p(e,n):(w=G(),w.c(),w.m(t,null)):w&&(w.d(1),w=null)},d(e){e&&l(t),m&&m.d(),g&&g.d(),C&&C.d(),w&&w.d(),f=!1,h()}}}function j(e){let t,n,o,r,i,p,h,m,g,C,w,b,$,y=e[1].appId+"";return{c(){t=a("errorRight"),n=a("h1"),n.textContent="Failed to connect Speechly",o=u(),r=a("p"),i=d("Please check that Speechly application id '"),p=d(y),h=d("' has been successfully deployed."),m=u(),g=a("p"),C=a("a"),C.textContent="Troubleshooting",w=d("\n \n "),b=a("a"),$=d("Reload"),f(C,"href","https://docs.speechly.com/faq/#error-invalid-app-id"),f(b,"href",window.location.href)},m(e,l){s(e,t,l),c(t,n),c(t,o),c(t,r),c(r,i),c(r,p),c(r,h),c(t,m),c(t,g),c(g,C),c(g,w),c(g,b),c(b,$)},p(e,t){2&t&&y!==(y=e[1].appId+"")&&function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(p,y)},d(e){e&&l(t)}}}function O(t){let n,o,r,i,p,h,m,g,C,w;return{c(){n=a("errorRight"),o=a("h1"),o.textContent="No Mic Permission",r=u(),i=a("p"),i.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",p=u(),h=a("p"),m=a("a"),m.textContent="Troubleshooting",g=d("\n \n "),C=a("a"),w=d("Reload"),f(m,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),f(C,"href",window.location.href)},m(e,t){s(e,n,t),c(n,o),c(n,r),c(n,i),c(n,p),c(n,h),c(h,m),c(h,g),c(h,C),c(C,w)},p:e,d(e){e&&l(n)}}}function U(e){let t;return{c(){t=a("errorRight"),t.innerHTML='<h1>Unsupported Browser</h1> \n <p>To use the voice interface, please visit this site using a supported\n browser.</p> \n <p><a href="https://docs.speechly.com/client-libraries/supported-browsers/#error-no-browser-support">Troubleshooting</a></p>'},m(e,n){s(e,t,n)},d(e){e&&l(t)}}}function G(t){let n,o,r,i,p,h,m,g,C,w;return{c(){n=a("errorRight"),o=a("h1"),o.textContent="HTTPS Required",r=u(),i=a("p"),i.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",p=u(),h=a("p"),m=a("a"),m.textContent="Troubleshooting",g=d("\n \n "),C=a("a"),w=d("Try with HTTPS"),f(m,"href","https://docs.speechly.com/faq/#error-https-required"),f(C,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(e,t){s(e,n,t),c(n,o),c(n,r),c(n,i),c(n,p),c(n,h),c(h,m),c(h,g),c(h,C),c(C,w)},p:e,d(e){e&&l(n)}}}function J(t){let n,o,r,i,d,m=t[2]&&z(t);return{c(){n=a("link"),o=u(),r=a("main"),m&&m.c(),this.c=e,f(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),f(n,"rel","stylesheet"),h(r,"bottom","bottom"===t[0])},m(e,l){c(document.head,n),s(e,o,l),s(e,r,l),m&&m.m(r,null),i||(d=p(q,"message",t[3]),i=!0)},p(e,[t]){e[2]?m?m.p(e,t):(m=z(e),m.c(),m.m(r,null)):m&&(m.d(1),m=null),1&t&&h(r,"bottom","bottom"===e[0])},i:e,o:e,d(e){l(n),e&&l(o),e&&l(r),m&&m.d(),i=!1,d()}}}const K="InvaldAppId",Q="HttpsRequired";function V(e,t,n){let{placement:o=null}=t,r={};let i=null;const c=(e,t)=>{n(1,r={appId:t})},s=e=>{var t,o;switch(e){case F.ClientState.Failed:n(2,i=K);break;case F.ClientState.NoAudioConsent:case F.ClientState.NoBrowserSupport:if("https:"!==(null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.protocol)&&("localhost"!==(o=window.location.hostname)&&"[::1]"!==o&&null===o.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))){n(2,i=Q);break}n(2,i=e)}};return e.$$set=e=>{"placement"in e&&n(0,o=e.placement)},[o,r,i,e=>{switch(e.data.type){case"holdstart":s(e.data.state);break;case"initialized":console.log(e.data),c(e.data.status,e.data.appId)}},()=>{n(2,i=null)}]}class W extends B{constructor(e){super(),this.shadowRoot.innerHTML="<style>main.bottom{position:fixed;bottom:0;left:0;right:0;min-height:10em;z-index:51;user-select:none;pointer-events:none}errorDiv{box-sizing:border-box;position:relative;width:100%;min-height:10em;background-color:white;user-select:text;pointer-events:all;color:black;display:flex;box-shadow:0 0 8px #00000040;flex-direction:row}errorLeft{box-sizing:border-box;width:2rem;background-color:red;padding:0.2rem 0.2rem;color:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:start;font-size:1.5rem;cursor:pointer}errorRight{background-color:white;padding:1rem 3rem 1rem 1rem;overflow:auto;flex-grow:1}h1{font-size:1.5rem;margin:0;padding:0 0 0.5rem 0;font-family:'Saira Condensed', sans-serif;text-transform:uppercase}p{margin:0;padding:0 0 0.5rem 0;color:#999}a{color:#000}</style>",M(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},V,J,i,{placement:0}),e&&(e.target&&s(e.target,this,e.anchor),e.props&&(this.$set(e.props),_()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(e){this.$set({placement:e}),_()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",W)}(); | ||
!function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function r(e){return"function"==typeof e}function i(e,t){return e!=e?t==t:e!==t}let c=!1;const l=new Set;function s(e,t){c&&l.delete(t),t.parentNode!==e&&e.appendChild(t)}function a(e,t,n){c&&l.delete(t),(t.parentNode!==e||n&&t.nextSibling!==n)&&e.insertBefore(t,n||null)}function d(e){c?l.add(e):e.parentNode&&e.parentNode.removeChild(e)}function u(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function f(){return p(" ")}function h(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function g(e,t,n){e.classList[n?"add":"remove"](t)}function C(e){const t={};for(const n of e)t[n.name]=n.value;return t}let w;function b(e){w=e}const $=[],y=[],S=[],x=[],N=Promise.resolve();let v=!1;function k(e){S.push(e)}let _=!1;const R=new Set;function T(){if(!_){_=!0;do{for(let e=0;e<$.length;e+=1){const t=$[e];b(t),E(t.$$)}for(b(null),$.length=0;y.length;)y.pop()();for(let e=0;e<S.length;e+=1){const t=S[e];R.has(t)||(R.add(t),t())}S.length=0}while($.length);for(;x.length;)x.pop()();v=!1,_=!1,R.clear()}}function E(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(k)}}const A=new Set;const M="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function B(e,t){-1===e.$$.dirty[0]&&($.push(e),v||(v=!0,N.then(T)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function H(i,s,a,u,p,f,h=[-1]){const m=w;b(i);const g=i.$$={fragment:null,ctx:null,props:f,update:e,not_equal:p,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(m?m.$$.context:s.context||[]),callbacks:n(),dirty:h,skip_bound:!1};let C=!1;if(g.ctx=a?a(i,s.props||{},((e,t,...n)=>{const o=n.length?n[0]:t;return g.ctx&&p(g.ctx[e],g.ctx[e]=o)&&(!g.skip_bound&&g.bound[e]&&g.bound[e](o),C&&B(i,e)),t})):[],g.update(),C=!0,o(g.before_update),g.fragment=!!u&&u(g.ctx),s.target){if(s.hydrate){c=!0;const e=function(e){return Array.from(e.childNodes)}(s.target);g.fragment&&g.fragment.l(e),e.forEach(d)}else g.fragment&&g.fragment.c();s.intro&&(($=i.$$.fragment)&&$.i&&(A.delete($),$.i(y))),function(e,n,i,c){const{fragment:l,on_mount:s,on_destroy:a,after_update:d}=e.$$;l&&l.m(n,i),c||k((()=>{const n=s.map(t).filter(r);a?a.push(...n):o(n),e.$$.on_mount=[]})),d.forEach(k)}(i,s.target,s.anchor,s.customElement),function(){c=!1;for(const e of l)e.parentNode.removeChild(e);l.clear()}(),T()}var $,y;b(m)}let L;"function"==typeof HTMLElement&&(L=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});var P,D,I,F,q,z=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientState=void 0,(n=t.ClientState||(t.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"}(P={exports:{}},P.exports),P.exports);!function(e){e.Failed="Failed",e.NoBrowserSupport="NoBrowserSupport",e.NoAudioConsent="NoAudioConsent",e.Idle="Idle",e.Connecting="Connecting",e.Ready="Ready",e.Recording="Recording",e.Loading="Loading"}(D||(D={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(I||(I={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(F||(F={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(q||(q={})),z.ClientState.Disconnected,I.Poweron,F.Click,q.None,z.ClientState.Disconnecting,I.Poweron,F.Noninteractive,q.Connecting,z.ClientState.Connecting,I.Poweron,F.Noninteractive,q.Connecting,z.ClientState.Connected,I.Mic,F.Hold,q.None,z.ClientState.Starting,I.Mic,F.Hold,q.Connecting,z.ClientState.Recording,I.Mic,F.Hold,q.None,z.ClientState.Stopping,I.Mic,F.Noninteractive,q.Busy,z.ClientState.Failed,I.Error,F.Click,q.None,z.ClientState.NoBrowserSupport,I.Error,F.Click,q.None,z.ClientState.NoAudioConsent,I.Denied,F.Click,q.None,D.Idle,I.Poweron,F.Click,q.None,D.Connecting,I.Poweron,F.Noninteractive,q.Connecting,D.Ready,I.Mic,F.Hold,q.None,D.Recording,I.Mic,F.Hold,q.None,D.Loading,I.Mic,F.Noninteractive,q.Busy,D.Failed,I.Error,F.Click,q.None,D.NoBrowserSupport,I.Error,F.Click,q.None,D.NoAudioConsent,I.Denied,F.Click,q.None;const{window:j}=M;function O(e){let t,n,o,r,i,c,l,p,m=e[2]===V&&U(e),g=e[2]===z.ClientState.NoAudioConsent&&G(),C=e[2]===z.ClientState.NoBrowserSupport&&J(),w=e[2]===W&&K();return{c(){t=u("errorDiv"),n=u("errorLeft"),n.textContent="×",o=f(),m&&m.c(),r=f(),g&&g.c(),i=f(),C&&C.c(),c=f(),w&&w.c()},m(d,u){a(d,t,u),s(t,n),s(t,o),m&&m.m(t,null),s(t,r),g&&g.m(t,null),s(t,i),C&&C.m(t,null),s(t,c),w&&w.m(t,null),l||(p=h(n,"click",e[4]),l=!0)},p(e,n){e[2]===V?m?m.p(e,n):(m=U(e),m.c(),m.m(t,r)):m&&(m.d(1),m=null),e[2]===z.ClientState.NoAudioConsent?g?g.p(e,n):(g=G(),g.c(),g.m(t,i)):g&&(g.d(1),g=null),e[2]===z.ClientState.NoBrowserSupport?C||(C=J(),C.c(),C.m(t,c)):C&&(C.d(1),C=null),e[2]===W?w?w.p(e,n):(w=K(),w.c(),w.m(t,null)):w&&(w.d(1),w=null)},d(e){e&&d(t),m&&m.d(),g&&g.d(),C&&C.d(),w&&w.d(),l=!1,p()}}}function U(e){let t,n,o,r,i,c,l,h,g,C,w,b,$,y=e[1].appId+"";return{c(){t=u("errorRight"),n=u("h1"),n.textContent="Failed to connect Speechly",o=f(),r=u("p"),i=p("Please check that Speechly application id '"),c=p(y),l=p("' has been successfully deployed."),h=f(),g=u("p"),C=u("a"),C.textContent="Troubleshooting",w=p("\n \n "),b=u("a"),$=p("Reload"),m(C,"href","https://docs.speechly.com/faq/#error-invalid-app-id"),m(b,"href",window.location.href)},m(e,d){a(e,t,d),s(t,n),s(t,o),s(t,r),s(r,i),s(r,c),s(r,l),s(t,h),s(t,g),s(g,C),s(g,w),s(g,b),s(b,$)},p(e,t){2&t&&y!==(y=e[1].appId+"")&&function(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}(c,y)},d(e){e&&d(t)}}}function G(t){let n,o,r,i,c,l,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="No Mic Permission",r=f(),i=u("p"),i.textContent="To use the voice interface, please allow your web browser access the\n microphone and reload.",c=f(),l=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Reload"),m(h,"href","https://docs.speechly.com/faq/#error-no-audio-consent"),m(C,"href",window.location.href)},m(e,t){a(e,n,t),s(n,o),s(n,r),s(n,i),s(n,c),s(n,l),s(l,h),s(l,g),s(l,C),s(C,w)},p:e,d(e){e&&d(n)}}}function J(e){let t;return{c(){t=u("errorRight"),t.innerHTML='<h1>Unsupported Browser</h1> \n <p>To use the voice interface, please visit this site using a supported\n browser.</p> \n <p><a href="https://docs.speechly.com/client-libraries/supported-browsers/#error-no-browser-support">Troubleshooting</a></p>'},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function K(t){let n,o,r,i,c,l,h,g,C,w;return{c(){n=u("errorRight"),o=u("h1"),o.textContent="HTTPS Required",r=f(),i=u("p"),i.textContent="To use the voice interface, please visit this site using the secure\n https:// protocol.",c=f(),l=u("p"),h=u("a"),h.textContent="Troubleshooting",g=p("\n \n "),C=u("a"),w=p("Try with HTTPS"),m(h,"href","https://docs.speechly.com/faq/#error-https-required"),m(C,"href",window.location.href.replace(/^http(?!s)/,"https"))},m(e,t){a(e,n,t),s(n,o),s(n,r),s(n,i),s(n,c),s(n,l),s(l,h),s(l,g),s(l,C),s(C,w)},p:e,d(e){e&&d(n)}}}function Q(t){let n,o,r,i,c,l=t[2]&&O(t);return{c(){n=u("link"),o=f(),r=u("main"),l&&l.c(),this.c=e,m(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),m(n,"rel","stylesheet"),g(r,"bottom","bottom"===t[0])},m(e,d){s(document.head,n),a(e,o,d),a(e,r,d),l&&l.m(r,null),i||(c=h(j,"message",t[3]),i=!0)},p(e,[t]){e[2]?l?l.p(e,t):(l=O(e),l.c(),l.m(r,null)):l&&(l.d(1),l=null),1&t&&g(r,"bottom","bottom"===e[0])},i:e,o:e,d(e){d(n),e&&d(o),e&&d(r),l&&l.d(),i=!1,c()}}}const V="InvaldAppId",W="HttpsRequired";function X(e,t,n){let{placement:o=null}=t,r={};let i=null;const c=(e,t)=>{n(1,r={appId:t})},l=e=>{var t,o;switch(e){case z.ClientState.Failed:n(2,i=V);break;case z.ClientState.NoAudioConsent:case z.ClientState.NoBrowserSupport:if("https:"!==(null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.protocol)&&("localhost"!==(o=window.location.hostname)&&"[::1]"!==o&&null===o.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))){n(2,i=W);break}n(2,i=e)}};return e.$$set=e=>{"placement"in e&&n(0,o=e.placement)},[o,r,i,e=>{switch(e.data.type){case"holdstart":l(e.data.state);break;case"initialized":console.log(e.data),c(e.data.status,e.data.appId)}},()=>{n(2,i=null)}]}class Y extends L{constructor(e){super(),this.shadowRoot.innerHTML="<style>main.bottom{position:fixed;bottom:0;left:0;right:0;min-height:10em;z-index:51;user-select:none;pointer-events:none}errorDiv{box-sizing:border-box;position:relative;width:100%;min-height:10em;background-color:white;user-select:text;pointer-events:all;color:black;display:flex;box-shadow:0 0 8px #00000040;flex-direction:row}errorLeft{box-sizing:border-box;width:2rem;background-color:red;padding:0.2rem 0.2rem;color:#ffffff;display:flex;flex-direction:column;align-items:center;justify-content:start;font-size:1.5rem;cursor:pointer}errorRight{background-color:white;padding:1rem 3rem 1rem 1rem;overflow:auto;flex-grow:1}h1{font-size:1.5rem;margin:0;padding:0 0 0.5rem 0;font-family:'Saira Condensed', sans-serif;text-transform:uppercase}p{margin:0;padding:0 0 0.5rem 0;color:#999}a{color:#000}</style>",H(this,{target:this.shadowRoot,props:C(this.attributes),customElement:!0},X,Q,i,{placement:0}),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),T()))}static get observedAttributes(){return["placement"]}get placement(){return this.$$.ctx[0]}set placement(e){this.$set({placement:e}),T()}}customElements.get("error-panel")?console.warn("Skipping re-defining customElement error-panel"):customElements.define("error-panel",Y)}(); | ||
//# sourceMappingURL=error-panel.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";function e(){}const t=e=>e;function n(e){return e()}function o(){return Object.create(null)}function i(e){e.forEach(n)}function r(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,t){return e!=e?t==t:e!==t}function a(e){return 0===Object.keys(e).length}const c="undefined"!=typeof window;let d=c?()=>window.performance.now():()=>Date.now(),u=c?e=>requestAnimationFrame(e):e;const m=new Set;function f(e){m.forEach((t=>{t.c(e)||(m.delete(t),t.f())})),0!==m.size&&u(f)}function p(e,t){e.appendChild(t)}function h(e,t,n){e.insertBefore(t,n||null)}function g(e){e.parentNode.removeChild(e)}function b(e){return document.createElement(e)}function C(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function x(e){return document.createTextNode(e)}function w(){return x(" ")}function v(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function y(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function V(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function $(e,t,n){e.classList[n?"add":"remove"](t)}function k(e){const t={};for(const n of e)t[n.name]=n.value;return t}const L=new Set;let z,_=0;function M(e,t,n,o,i,r,s,l=0){const a=16.666/o;let c="{\n";for(let e=0;e<=1;e+=a){const o=t+(n-t)*r(e);c+=100*e+`%{${s(o,1-o)}}\n`}const d=c+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d)}_${l}`,m=e.ownerDocument;L.add(m);const f=m.__svelte_stylesheet||(m.__svelte_stylesheet=m.head.appendChild(b("style")).sheet),p=m.__svelte_rules||(m.__svelte_rules={});p[u]||(p[u]=!0,f.insertRule(`@keyframes ${u} ${d}`,f.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${o}ms linear ${i}ms 1 both`,_+=1,u}function E(e,t){const n=(e.style.animation||"").split(", "),o=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-o.length;i&&(e.style.animation=o.join(", "),_-=i,_||u((()=>{_||(L.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),L.clear())})))}function S(e){z=e}function N(){if(!z)throw new Error("Function called outside component initialization");return z}const P=[],H=[],A=[],B=[],Z=Promise.resolve();let F=!1;function D(e){A.push(e)}let R=!1;const j=new Set;function T(){if(!R){R=!0;do{for(let e=0;e<P.length;e+=1){const t=P[e];S(t),O(t.$$)}for(S(null),P.length=0;H.length;)H.pop()();for(let e=0;e<A.length;e+=1){const t=A[e];j.has(t)||(j.add(t),t())}A.length=0}while(P.length);for(;B.length;)B.pop()();F=!1,R=!1,j.clear()}}function O(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(D)}}let I;function q(e,t,n){e.dispatchEvent(function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(`${t?"intro":"outro"}${n}`))}const G=new Set;let U;function Q(e,t){e&&e.i&&(G.delete(e),e.i(t))}function Y(e,t,n,o){if(e&&e.o){if(G.has(e))return;G.add(e),U.c.push((()=>{G.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}const J={duration:0};function K(n,o,s,l){let a=o(n,s),c=l?0:1,p=null,h=null,g=null;function b(){g&&E(n,g)}function C(e,t){const n=e.b-c;return t*=Math.abs(n),{a:c,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function x(o){const{delay:r=0,duration:s=300,easing:l=t,tick:x=e,css:w}=a||J,v={start:d()+r,b:o};o||(v.group=U,U.r+=1),p||h?h=v:(w&&(b(),g=M(n,c,o,s,r,l,w)),o&&x(0,1),p=C(v,s),D((()=>q(n,o,"start"))),function(e){let t;0===m.size&&u(f),new Promise((n=>{m.add(t={c:e,f:n})}))}((e=>{if(h&&e>h.start&&(p=C(h,s),h=null,q(n,p.b,"start"),w&&(b(),g=M(n,c,p.b,p.duration,0,l,a.css))),p)if(e>=p.end)x(c=p.b,1-c),q(n,p.b,"end"),h||(p.b?b():--p.group.r||i(p.group.c)),p=null;else if(e>=p.start){const t=e-p.start;c=p.a+p.d*l(t/p.duration),x(c,1-c)}return!(!p&&!h)})))}return{run(e){r(a)?(I||(I=Promise.resolve(),I.then((()=>{I=null}))),I).then((()=>{a=a(),x(e)})):x(e)},end(){b(),p=h=null}}}const W="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function X(e){e&&e.c()}function ee(e,t,o,s){const{fragment:l,on_mount:a,on_destroy:c,after_update:d}=e.$$;l&&l.m(t,o),s||D((()=>{const t=a.map(n).filter(r);c?c.push(...t):i(t),e.$$.on_mount=[]})),d.forEach(D)}function te(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ne(e,t){-1===e.$$.dirty[0]&&(P.push(e),F||(F=!0,Z.then(T)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function oe(t,n,r,s,l,a,c=[-1]){const d=z;S(t);const u=t.$$={fragment:null,ctx:null,props:a,update:e,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:o(),dirty:c,skip_bound:!1};let m=!1;if(u.ctx=r?r(t,n.props||{},((e,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&l(u.ctx[e],u.ctx[e]=i)&&(!u.skip_bound&&u.bound[e]&&u.bound[e](i),m&&ne(t,e)),n})):[],u.update(),m=!0,i(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);u.fragment&&u.fragment.l(e),e.forEach(g)}else u.fragment&&u.fragment.c();n.intro&&Q(t.$$.fragment),ee(t,n.target,n.anchor,n.customElement),T()}S(d)}let ie;"function"==typeof HTMLElement&&(ie=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){te(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!a(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class re{$destroy(){te(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!a(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function se(e,{delay:n=0,duration:o=400,easing:i=t}={}){const r=+getComputedStyle(e).opacity;return{delay:n,duration:o,easing:i,css:e=>"opacity: "+e*r}}var le,ae,ce,de,ue,me=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientState=void 0,(n=t.ClientState||(t.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"}(le={exports:{}},le.exports),le.exports);function fe(e){let t,n,o,i;return{c(){t=C("svg"),n=C("g"),o=C("path"),i=C("rect"),y(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),y(i,"x","20"),y(i,"y","1"),y(i,"width","16"),y(i,"height","37"),y(i,"rx","8"),y(n,"fill","#000"),y(n,"fill-rule","evenodd"),y(t,"class","buttonIconEl"),y(t,"viewBox","0 0 56 56"),y(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){h(e,t,r),p(t,n),p(n,o),p(n,i)},d(e){e&&g(t)}}}function pe(e){let t,n,o,i;return{c(){t=C("svg"),n=C("g"),o=C("path"),i=C("path"),y(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),y(o,"fill-rule","nonzero"),y(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),y(n,"fill","#000"),y(n,"fill-rule","evenodd"),y(t,"class","buttonIconEl"),y(t,"viewBox","0 0 56 56"),y(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){h(e,t,r),p(t,n),p(n,o),p(n,i)},d(e){e&&g(t)}}}function he(e){let t,n,o,i;return{c(){t=C("svg"),n=C("g"),o=C("path"),i=C("path"),y(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),y(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),y(n,"fill","#000"),y(n,"fill-rule","nonzero"),y(t,"class","buttonIconEl"),y(t,"viewBox","0 0 56 56"),y(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){h(e,t,r),p(t,n),p(n,o),p(n,i)},d(e){e&&g(t)}}}function ge(e){let t,n,o,i;return{c(){t=C("svg"),n=C("g"),o=C("path"),i=C("rect"),y(o,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),y(o,"fill-rule","nonzero"),y(i,"x","24"),y(i,"y","1"),y(i,"width","8"),y(i,"height","23"),y(i,"rx","4"),y(n,"fill","#000"),y(n,"fill-rule","evenodd"),y(t,"class","buttonIconEl"),y(t,"viewBox","0 0 56 56"),y(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){h(e,t,r),p(t,n),p(n,o),p(n,i)},d(e){e&&g(t)}}}function be(t){let n,o,i,r,s=t[0]===ce.Mic&&fe(),l=t[0]===ce.Error&&pe(),a=t[0]===ce.Denied&&he(),c=t[0]===ce.Poweron&&ge();return{c(){n=b("div"),s&&s.c(),o=w(),l&&l.c(),i=w(),a&&a.c(),r=w(),c&&c.c(),V(n,"position","absolute"),V(n,"width","60%"),V(n,"height","60%"),V(n,"top","50%"),V(n,"left","50%"),V(n,"transform","translate(-50%, -50%)"),V(n,"pointer-events","none"),V(n,"transition","0.25s"),V(n,"opacity","var(--icon-opacity)")},m(e,t){h(e,n,t),s&&s.m(n,null),p(n,o),l&&l.m(n,null),p(n,i),a&&a.m(n,null),p(n,r),c&&c.m(n,null)},p(e,[t]){e[0]===ce.Mic?s||(s=fe(),s.c(),s.m(n,o)):s&&(s.d(1),s=null),e[0]===ce.Error?l||(l=pe(),l.c(),l.m(n,i)):l&&(l.d(1),l=null),e[0]===ce.Denied?a||(a=he(),a.c(),a.m(n,r)):a&&(a.d(1),a=null),e[0]===ce.Poweron?c||(c=ge(),c.c(),c.m(n,null)):c&&(c.d(1),c=null)},i:e,o:e,d(e){e&&g(n),s&&s.d(),l&&l.d(),a&&a.d(),c&&c.d()}}}function Ce(e,t,n){let{icon:o=ce.Mic}=t;return e.$$set=e=>{"icon"in e&&n(0,o=e.icon)},[o]}!function(e){e.Failed="Failed",e.NoBrowserSupport="NoBrowserSupport",e.NoAudioConsent="NoAudioConsent",e.Idle="Idle",e.Connecting="Connecting",e.Ready="Ready",e.Recording="Recording",e.Loading="Loading"}(ae||(ae={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(ce||(ce={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(de||(de={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(ue||(ue={})),me.ClientState.Disconnected,ce.Poweron,de.Click,ue.None,me.ClientState.Disconnecting,ce.Poweron,de.Noninteractive,ue.Connecting,me.ClientState.Connecting,ce.Poweron,de.Noninteractive,ue.Connecting,me.ClientState.Connected,ce.Mic,de.Hold,ue.None,me.ClientState.Starting,ce.Mic,de.Hold,ue.Connecting,me.ClientState.Recording,ce.Mic,de.Hold,ue.None,me.ClientState.Stopping,ce.Mic,de.Noninteractive,ue.Busy,me.ClientState.Failed,ce.Error,de.Click,ue.None,me.ClientState.NoBrowserSupport,ce.Error,de.Click,ue.None,me.ClientState.NoAudioConsent,ce.Denied,de.Click,ue.None,ae.Idle,ce.Poweron,de.Click,ue.None,ae.Connecting,ce.Poweron,de.Noninteractive,ue.Connecting,ae.Ready,ce.Mic,de.Hold,ue.None,ae.Recording,ce.Mic,de.Hold,ue.None,ae.Loading,ce.Mic,de.Noninteractive,ue.Busy,ae.Failed,ce.Error,de.Click,ue.None,ae.NoBrowserSupport,ce.Error,de.Click,ue.None,ae.NoAudioConsent,ce.Denied,de.Click,ue.None;class xe extends re{constructor(e){super(),oe(this,e,Ce,be,s,{icon:0})}}function we(t){let n,o,i,r,s,l,a,c,d,u,m;return{c(){n=C("svg"),o=C("path"),i=C("path"),r=C("path"),s=C("defs"),l=C("linearGradient"),a=C("stop"),c=C("stop"),d=C("linearGradient"),u=C("stop"),m=C("stop"),y(o,"fill-rule","evenodd"),y(o,"clip-rule","evenodd"),y(o,"d","M134.88 10.0009H138.714L142.333 20.2854L145.864 10.0009H149.632L143.684 24.7084C142.626 27.3015 140.938 29.1472 138.621 30.2455L136.873 27.7812C138.476 27.0848 139.641 25.9476 140.367 24.3696L134.88 10.0009ZM133.172 4.84959V24.2862H129.552V4.84959H133.172ZM112.699 24.2862V4.84959H116.319V11.5625C117.81 10.5273 119.434 10.0106 121.191 10.0122C124.494 10.0122 126.145 11.7837 126.143 15.3267V24.2862H122.528V15.2828C122.528 13.7093 121.741 12.9218 120.166 12.9201C118.899 12.9201 117.617 13.522 116.319 14.7257V24.2862H112.699ZM110.314 23.8777C109.131 24.1521 107.811 24.2882 106.355 24.2861C101.077 24.2861 98.4392 21.8141 98.4401 16.87C98.4401 12.2889 101.078 9.99922 106.355 10.0009C107.813 10.0009 109.133 10.137 110.314 10.4093V13.2638C109.105 12.9918 107.869 12.8563 106.63 12.8598C103.578 12.8598 102.053 14.1965 102.055 16.87C102.055 19.9098 103.58 21.4289 106.63 21.4272C107.87 21.4318 109.106 21.2947 110.314 21.0188V23.8777ZM87.2328 15.9101H93.2092C93.3393 13.8636 92.3843 12.8389 90.3441 12.836C88.4345 12.8364 87.3974 13.8607 87.2328 15.9089V15.9101ZM96.6096 18.5451H87.2328C87.2328 20.4665 88.8071 21.4272 91.9555 21.4272C93.4107 21.4272 94.8627 21.2905 96.2922 21.0188V23.8777C95.0299 24.1521 93.4025 24.2882 91.4102 24.2861C86.2119 24.2861 83.6142 21.8511 83.6171 16.981C83.6171 12.3259 85.9959 9.99922 90.7534 10.0009C95.511 10.0026 97.463 12.8506 96.6096 18.5451ZM72.4099 15.9101H78.3863C78.5169 13.8636 77.5621 12.8389 75.5219 12.836C73.6122 12.8364 72.5749 13.8607 72.4099 15.9089V15.9101ZM81.7872 18.5451H72.4099C72.4099 20.4665 73.9841 21.4272 77.1325 21.4272C78.588 21.4272 80.0402 21.2905 81.4699 21.0188V23.8777C80.2071 24.1521 78.5798 24.2882 76.5879 24.2861C71.3891 24.2861 68.7912 21.8511 68.7942 16.981C68.7942 12.3259 71.1732 9.99922 75.9311 10.0009C80.689 10.0026 82.6411 12.8506 81.7872 18.5451ZM53.2787 10.5856C55.1791 10.1962 57.2814 10.0013 59.5856 10.0009C64.6353 10.0009 67.1602 12.2657 67.1602 16.7953C67.1602 21.7942 64.8482 24.2928 60.2241 24.2912C59.0807 24.2931 57.9489 24.0623 56.8981 23.613V29.4657H53.2787V10.5856ZM56.8981 20.5609C57.8905 21.0528 58.9943 21.2943 60.2102 21.2943C62.4599 21.2943 63.5839 19.7859 63.5822 16.7691C63.5822 14.2027 62.2998 12.9201 59.7348 12.9214C58.5239 12.9214 57.5781 12.9841 56.9012 13.1096L56.8981 20.5609ZM36.0182 23.4744V20.212C37.9744 20.936 40.1855 21.298 42.6514 21.298C45.6424 21.298 47.1394 20.3017 47.1423 18.3092C47.1423 16.8562 46.2198 16.1322 44.3843 16.1322H41.0507C37.0585 16.1322 35.0615 14.3191 35.0598 10.6929C35.0598 6.70661 37.9031 4.71261 43.5896 4.71094C45.7725 4.71094 47.8423 5.02797 49.799 5.66203V8.92436C47.8112 8.19474 45.708 7.8269 43.5896 7.83838C40.3152 7.83838 38.678 8.78969 38.678 10.6923C38.678 12.1403 39.4702 12.8693 41.0538 12.8693H44.3843C48.633 12.8693 50.7572 14.6824 50.7567 18.3086C50.7567 22.3878 48.0549 24.4267 42.6514 24.4255C40.1855 24.4255 37.9744 24.1084 36.0182 23.4744Z"),y(o,"fill","#302666"),y(i,"fill-rule","evenodd"),y(i,"clip-rule","evenodd"),y(i,"d","M14.7612 0C22.9132 0 29.5224 6.5874 29.5224 14.7068C29.5224 23.1268 22.7085 30.3284 14.8166 31.8717V29.4131C17.8347 28.4538 23.9585 25.3169 26.214 18.8632C26.4118 18.321 26.5705 17.7654 26.6888 17.2006L26.6982 17.1599L26.7058 17.1229L26.7134 17.0858L26.7203 17.0501L26.7272 17.0149L26.7341 16.9798L26.7411 16.9453V16.9415L26.7474 16.9077V16.9039L26.753 16.87V16.8656L26.7593 16.8324V16.8274L26.765 16.7954V16.7891L26.7707 16.7577V16.7508L26.7763 16.7201V16.7132L26.782 16.6824V16.6749L26.787 16.6448V16.6366L26.7921 16.6065V16.5984L26.7965 16.5689V16.5595L26.8003 16.5312V16.5212L26.804 16.493V16.4829L26.8078 16.4553V16.444L26.8122 16.4177V16.4058L26.816 16.3794V16.3675L26.8191 16.3418V16.3286L26.8223 16.3035V16.2903L26.8254 16.2659V16.2514L26.8286 16.227V16.2125V16.1893V16.1736V16.1511V16.1347L26.8317 16.1128V16.0958V16.0745V16.0576V16.0362V16.0187V15.998V15.9798V15.9597V15.9409V15.9208V15.9014V15.8825V15.8625V15.8443V15.8236V15.806V15.7847V15.7671V15.7451V15.7288V15.7056V15.6899V15.6667V15.6517V15.6272V15.6128V15.5883V15.5739V15.5488V15.5356V15.5093V15.4967V15.4704V15.4578V15.4308V15.4189V15.3913V15.3706V15.3424V15.3317V15.3028V15.2928V15.2633V15.2539V15.2238V15.215V15.1843V15.1761V15.1447V15.1372V15.1046V15.0977V15.0651V15.0588V15.0255V14.7062V14.6667C26.9262 7.96134 21.4523 2.54336 14.7222 2.56469C7.99203 2.58603 2.55277 8.04039 2.57417 14.7432C2.59621 21.4385 8.04807 26.8515 14.7612 26.8515H14.7895L14.8154 29.4162H14.7612C6.61175 29.4137 0 22.8288 0 14.7068C0 6.58489 6.61175 0 14.7612 0Z"),y(i,"fill","url(#paint0_linear)"),y(r,"fill-rule","evenodd"),y(r,"clip-rule","evenodd"),y(r,"d","M12.3985 8.87104V16.3368C12.3985 16.8506 11.9804 17.2672 11.4647 17.2672C10.9489 17.2672 10.5308 16.8506 10.5308 16.3368V8.87104C10.5308 8.3572 10.9489 7.94065 11.4647 7.94065C11.9804 7.94065 12.3985 8.3572 12.3985 8.87104ZM18.9914 13.5305V20.9962C18.9914 21.5101 18.5733 21.9266 18.0576 21.9266C17.5418 21.9266 17.1237 21.5101 17.1237 20.9962V13.5305C17.1237 13.0167 17.5418 12.6001 18.0576 12.6001C18.5733 12.6001 18.9914 13.0167 18.9914 13.5305ZM22.2909 16.4082V18.1216C22.2997 18.4596 22.1237 18.7758 21.8313 18.9474C21.5388 19.119 21.1759 19.119 20.8835 18.9474C20.591 18.7758 20.415 18.4596 20.4239 18.1216V16.4082C20.415 16.0702 20.591 15.754 20.8835 15.5824C21.1759 15.4108 21.5388 15.4108 21.8313 15.5824C22.1237 15.754 22.2997 16.0702 22.2909 16.4082ZM15.6949 5.94809V12.8542C15.6949 13.368 15.2768 13.7846 14.7611 13.7846C14.2454 13.7846 13.8273 13.368 13.8273 12.8542V5.94809C13.8273 5.43425 14.2454 5.0177 14.7611 5.0177C15.2768 5.0177 15.6949 5.43425 15.6949 5.94809ZM15.6949 16.5588V23.4637C15.6949 23.9775 15.2768 24.3941 14.7611 24.3941C14.2454 24.3941 13.8273 23.9775 13.8273 23.4637V16.5588C13.8273 16.045 14.2454 15.6284 14.7611 15.6284C15.2768 15.6284 15.6949 16.045 15.6949 16.5588ZM9.10148 11.7487V13.4615C9.11029 13.7995 8.93431 14.1157 8.64186 14.2873C8.3494 14.4589 7.98652 14.4589 7.69406 14.2873C7.40161 14.1157 7.22563 13.7995 7.23445 13.4615V11.7487C7.22563 11.4107 7.40161 11.0945 7.69406 10.9229C7.98652 10.7513 8.3494 10.7513 8.64186 10.9229C8.93431 11.0945 9.11029 11.4107 9.10148 11.7487Z"),y(r,"fill","url(#paint1_linear)"),y(a,"stop-color","#53A3F9"),y(c,"offset","1"),y(c,"stop-color","#15E8B5"),y(l,"id","paint0_linear"),y(l,"x1","17.4837"),y(l,"y1","24.6178"),y(l,"x2","23.4572"),y(l,"y2","12.6602"),y(l,"gradientUnits","userSpaceOnUse"),y(u,"stop-color","#53A3F9"),y(m,"offset","1"),y(m,"stop-color","#15E8B5"),y(d,"id","paint1_linear"),y(d,"x1","16.1513"),y(d,"y1","19.984"),y(d,"x2","20.1445"),y(d,"y2","13.2781"),y(d,"gradientUnits","userSpaceOnUse"),y(n,"width","150"),y(n,"height","32"),y(n,"viewBox","0 0 150 32"),y(n,"fill","none"),y(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){h(e,n,t),p(n,o),p(n,i),p(n,r),p(n,s),p(s,l),p(l,a),p(l,c),p(s,d),p(d,u),p(d,m)},p:e,i:e,o:e,d(e){e&&g(n)}}}class ve extends re{constructor(e){super(),oe(this,e,null,we,s,{})}}const{window:ye}=W;function Ve(e){let t,n,o,r,s,l,a,c,d,u,m,f,C,k,L,z,_,M,E,S,N,P,H,A,B,Z,F,R,j,T,O,I,q,G,U,J,W,ne,oe,ie,re,se,le,ae,ce,de,ue,me,fe,pe,he,ge,be,Ce,we,ye,Ve,$e,ke,Le,ze,_e,Me,Ee,Se,Ne,Pe,He;return j=new xe({}),ne=new ve({}),de=new xe({}),ye=new xe({}),{c(){t=b("modalbg"),o=w(),r=b("modalcontent"),s=b("div"),l=b("div"),a=b("button"),c=w(),d=b("div"),u=b("main"),m=b("div"),f=b("video"),C=b("source"),L=x("\n Your browser does not support the video tag."),z=w(),_=b("div"),M=b("h2"),M.textContent="Find your favourites faster with voice search",E=w(),S=b("p"),N=x("Search Evolve Clothing Gallery's "),P=b("b"),P.textContent="categories",H=x(", "),A=b("b"),A.textContent="designers",B=x(" and "),Z=b("b"),Z.textContent="colors",F=x(" by pressing and holding the\n "),R=b("span"),X(j.$$.fragment),T=w(),O=b("b"),O.textContent="push‑to‑talk button",I=x(".\n "),q=b("a"),q.textContent="More info",G=w(),U=b("div"),J=b("div"),W=b("div"),X(ne.$$.fragment),oe=w(),ie=b("h3"),ie.textContent="Voice Search Quick Start",re=w(),se=b("ul"),le=b("li"),ae=x("Press and hold the\n "),ce=b("span"),X(de.$$.fragment),ue=x("\n push‑to‑talk button."),me=w(),fe=b("li"),fe.textContent="Allow your browser to use the mic on the 1st time.",pe=w(),he=b("li"),he.innerHTML="Make your first search, e.g. <i>"Show me new arrivals"</i>",ge=w(),be=b("li"),Ce=x("Release the\n "),we=b("span"),X(ye.$$.fragment),Ve=x("\n push‑to‑talk button to stop listening."),$e=w(),ke=b("li"),ke.textContent="Speechly detects your voice command and your search results are shown.",Le=x("\n Learn more at "),ze=b("a"),ze.textContent="speechly.com",_e=w(),Me=b("div"),Ee=b("button"),Ee.textContent="Got it!",y(a,"class","close"),C.src!==(k=e[0])&&y(C,"src",k),y(C,"type","video/mp4"),y(f,"class","usageImage"),y(f,"width","100%"),y(f,"height","auto"),f.autoplay=!0,f.muted=!0,f.loop=!0,y(m,"class","imageContainer"),V(R,"width","1.75rem"),V(R,"height","1.75rem"),V(R,"vertical-align","middle"),V(R,"margin","-0.25rem -0.5rem 0 -0.5rem"),V(R,"position","relative"),V(R,"display","inline-block"),y(q,"class","more"),y(q,"href","#info"),y(_,"class","bodyTextContainer"),y(W,"class","sidePanelLogo"),V(ce,"width","1.5rem"),V(ce,"height","1.5rem"),V(ce,"vertical-align","middle"),V(ce,"margin","-0.20rem -0.35rem 0 -0.35rem"),V(ce,"position","relative"),V(ce,"display","inline-block"),V(we,"width","1.5rem"),V(we,"height","1.5rem"),V(we,"vertical-align","middle"),V(we,"margin","-0.20rem -0.35rem 0 -0.35rem"),V(we,"position","relative"),V(we,"display","inline-block"),y(se,"class","mt-l mb-l"),y(ze,"href","https://speechly.com/"),y(J,"class","sidePanelText"),y(U,"class","sidePanel"),$(U,"forceVisible",e[3]),y(d,"class","layout"),y(Ee,"class","wide"),y(Me,"class","buttonLayout"),y(l,"class","primaryLayout"),y(s,"class","page"),y(r,"class",e[2])},m(n,i){h(n,t,i),h(n,o,i),h(n,r,i),p(r,s),p(s,l),p(l,a),p(l,c),p(l,d),p(d,u),p(u,m),p(m,f),p(f,C),p(f,L),p(u,z),p(u,_),p(_,M),p(_,E),p(_,S),p(S,N),p(S,P),p(S,H),p(S,A),p(S,B),p(S,Z),p(S,F),p(S,R),ee(j,R,null),p(S,T),p(S,O),p(S,I),p(S,q),p(d,G),p(d,U),p(U,J),p(J,W),ee(ne,W,null),p(J,oe),p(J,ie),p(J,re),p(J,se),p(se,le),p(le,ae),p(le,ce),ee(de,ce,null),p(le,ue),p(se,me),p(se,fe),p(se,pe),p(se,he),p(se,ge),p(se,be),p(be,Ce),p(be,we),ee(ye,we,null),p(be,Ve),p(se,$e),p(se,ke),p(J,Le),p(J,ze),p(l,_e),p(l,Me),p(Me,Ee),Ne=!0,Pe||(He=[v(t,"click",e[6]),v(a,"click",e[6]),v(q,"click",e[11]),v(Ee,"click",e[6]),v(l,"click",e[7]),v(r,"click",e[6])],Pe=!0)},p(e,t){(!Ne||1&t&&C.src!==(k=e[0]))&&y(C,"src",k),8&t&&$(U,"forceVisible",e[3]),(!Ne||4&t)&&y(r,"class",e[2])},i(o){Ne||(D((()=>{n||(n=K(t,e[5],{},!0)),n.run(1)})),Q(j.$$.fragment,o),Q(ne.$$.fragment,o),Q(de.$$.fragment,o),Q(ye.$$.fragment,o),D((()=>{Se||(Se=K(r,e[5],{},!0)),Se.run(1)})),Ne=!0)},o(o){n||(n=K(t,e[5],{},!1)),n.run(0),Y(j.$$.fragment,o),Y(ne.$$.fragment,o),Y(de.$$.fragment,o),Y(ye.$$.fragment,o),Se||(Se=K(r,e[5],{},!1)),Se.run(0),Ne=!1},d(e){e&&g(t),e&&n&&n.end(),e&&g(o),e&&g(r),te(j),te(ne),te(de),te(ye),e&&Se&&Se.end(),Pe=!1,i(He)}}}function $e(t){let n,o,r,s,l,a,c=t[4]&&Ve(t);return{c(){n=b("link"),o=w(),r=b("modal"),c&&c.c(),this.c=e,y(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),y(n,"rel","stylesheet"),V(r,"--remsize",t[1])},m(e,i){p(document.head,n),h(e,o,i),h(e,r,i),c&&c.m(r,null),s=!0,l||(a=v(ye,"keydown",t[8]),l=!0)},p(e,[t]){e[4]?c?(c.p(e,t),16&t&&Q(c,1)):(c=Ve(e),c.c(),Q(c,1),c.m(r,null)):c&&(U={r:0,c:[],p:U},Y(c,1,1,(()=>{c=null})),U.r||i(U.c),U=U.p),(!s||2&t)&&V(r,"--remsize",e[1])},i(e){s||(Q(c),s=!0)},o(e){Y(c),s=!1},d(e){g(n),e&&g(o),e&&g(r),c&&c.d(),l=!1,a()}}}function ke(e,t,n){let o,{video:i=""}=t,{hide:r}=t,{remsize:s="1.0rem"}=t,{position:l="fixed"}=t;const a=(()=>{const e=N();return(t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,composed:!0}))}})(),c=(d=se,function(e,t){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 d(e,t)});var d;let u=!1,m=!1;!function(e){N().$$.on_mount.push(e)}((()=>{n(10,u=!0)}));const f=()=>{n(4,o=!1),a("speechlyintroclosed"),window.postMessage({type:"speechlyintroclosed"},"*")};return e.$$set=e=>{"video"in e&&n(0,i=e.video),"hide"in e&&n(9,r=e.hide),"remsize"in e&&n(1,s=e.remsize),"position"in e&&n(2,l=e.position)},e.$$.update=()=>{1536&e.$$.dirty&&n(4,o=u&&(void 0===r||"true"!==r))},[i,s,l,m,o,c,f,e=>{e.stopPropagation()},e=>{u&&"Escape"===e.key&&(e.preventDefault(),f())},r,u,()=>{n(3,m=!m)}]}class Le extends ie{constructor(e){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background:linear-gradient(180deg, #413783f0, #302865c0 80%)}modalcontent{z-index:2001;pointer-events:auto}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.page{box-sizing:border-box;width:100%;min-height:100%;padding:2rem 1rem;display:flex;flex-direction:row;align-items:center;justify-content:center}h2,h3{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#302865;line-height:120%}h2{font-size:135%}p{line-height:150%}b{color:#302865}ul{min-width:8rem;padding:0 1rem 0 0;list-style-type:none}li{border-left:2px solid #38E7B6;margin:0.75rem 0;padding-left:6px;line-height:135%}.primaryLayout{position:relative;box-sizing:border-box;width:100%;background-color:#ffffff;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;border-radius:1rem;box-shadow:0 0.25rem 1.25rem #0008}.layout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:flex-start;justify-content:flex-start}.buttonLayout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:center;justify-content:center;border-radius:0 0 1rem 1rem;background:linear-gradient(180deg, #d9e3eb, #F7FAFC 15%)}main{position:relative;box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-grow:1}button.wide{box-sizing:border-box;min-width:12rem;max-width:100%;padding:0.75rem;margin:1rem;background-color:#302865;border:none;border-radius:10rem;transition:0.3s;font-family:'Saira Condensed', sans-serif;font-size:120%;text-transform:uppercase;color:#fff;line-height:120%}button.wide:hover{background-color:#6251a5;transition:0.3s}a,a:visited{color:#302865}a:hover{color:#6251a5}.sidePanel{box-sizing:border-box;width:100%;background:#F7FAFC;color:#728195;font-size:85%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;max-height:0rem;transition:0.5s;overflow:hidden}.sidePanelText{padding:0.75rem 0.75rem 1.5rem 0.75rem}.more{white-space:nowrap}.forceVisible{max-height:50rem;transition:0.5s}.mt-m{margin-top:0.75em}.mb-m{margin-bottom:0.75em}.mx-m{margin-left:0.75em;margin-right:0.75em}.mt-l{margin-top:1.5em}.mb-l{margin-bottom:1.5em}.imageContainer{box-sizing:border-box;width:100%;padding:1.0rem}.bodyTextContainer{padding:0 2.25rem}.sidePanelLogo{width:85%;padding:0.75rem 0 0.75rem 0}.usageImage{box-sizing:border-box;width:100%;border-radius:0.5rem;overflow:hidden}@media(max-width: 480px){.page{font-size:88%}.imageContainer{padding:0 0 1rem 0}.sidePanelText{padding:1.5rem 2.25rem}.sidePanelLogo{display:none}.usageImage{border-radius:1rem 1rem 0 0}}@media(min-width: 480px) and (max-width: 688px){.page{font-size:100%;padding:2rem 2rem}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:11rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}@media(min-width: 688px){.page{padding:2rem 0;font-size:100%}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:12.5rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}.close{--button-size:1.5rem;display:block;box-sizing:border-box;position:absolute;z-index:1000;top:0.25rem;right:0.25rem;margin:0;padding:0;width:var(--button-size);height:var(--button-size);border:0;color:black;border-radius:1.5rem;background:transparent;box-shadow:0 0 0 1px transparent;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close:before,.close:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:calc(var(--button-size) - 0.5rem);height:1px;background:#728195;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close:hover{background:#6251a5}.close:hover:before,.close:hover:after{height:2px;background:white}.close:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close:active{transform:scale(0.9)}.close:hover,.close:focus,.close:active{outline:none}</style>",oe(this,{target:this.shadowRoot,props:k(this.attributes),customElement:!0},ke,$e,l,{video:0,hide:9,remsize:1,position:2}),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),T()))}static get observedAttributes(){return["video","hide","remsize","position"]}get video(){return this.$$.ctx[0]}set video(e){this.$set({video:e}),T()}get hide(){return this.$$.ctx[9]}set hide(e){this.$set({hide:e}),T()}get remsize(){return this.$$.ctx[1]}set remsize(e){this.$set({remsize:e}),T()}get position(){return this.$$.ctx[2]}set position(e){this.$set({position:e}),T()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",Le)}(); | ||
!function(){"use strict";function e(){}const t=e=>e;function n(e){return e()}function o(){return Object.create(null)}function i(e){e.forEach(n)}function r(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function l(e,t){return e!=e?t==t:e!==t}function a(e){return 0===Object.keys(e).length}const c="undefined"!=typeof window;let d=c?()=>window.performance.now():()=>Date.now(),u=c?e=>requestAnimationFrame(e):e;const m=new Set;function f(e){m.forEach((t=>{t.c(e)||(m.delete(t),t.f())})),0!==m.size&&u(f)}let p=!1;const h=new Set;function g(e,t){p&&h.delete(t),t.parentNode!==e&&e.appendChild(t)}function b(e,t,n){p&&h.delete(t),(t.parentNode!==e||n&&t.nextSibling!==n)&&e.insertBefore(t,n||null)}function C(e){p?h.add(e):e.parentNode&&e.parentNode.removeChild(e)}function x(e){return document.createElement(e)}function w(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function v(e){return document.createTextNode(e)}function y(){return v(" ")}function V(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function $(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function k(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}function L(e,t,n){e.classList[n?"add":"remove"](t)}function z(e){const t={};for(const n of e)t[n.name]=n.value;return t}const _=new Set;let M,S=0;function E(e,t,n,o,i,r,s,l=0){const a=16.666/o;let c="{\n";for(let e=0;e<=1;e+=a){const o=t+(n-t)*r(e);c+=100*e+`%{${s(o,1-o)}}\n`}const d=c+`100% {${s(n,1-n)}}\n}`,u=`__svelte_${function(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d)}_${l}`,m=e.ownerDocument;_.add(m);const f=m.__svelte_stylesheet||(m.__svelte_stylesheet=m.head.appendChild(x("style")).sheet),p=m.__svelte_rules||(m.__svelte_rules={});p[u]||(p[u]=!0,f.insertRule(`@keyframes ${u} ${d}`,f.cssRules.length));const h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${o}ms linear ${i}ms 1 both`,S+=1,u}function N(e,t){const n=(e.style.animation||"").split(", "),o=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-o.length;i&&(e.style.animation=o.join(", "),S-=i,S||u((()=>{S||(_.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),_.clear())})))}function P(e){M=e}function H(){if(!M)throw new Error("Function called outside component initialization");return M}const A=[],B=[],Z=[],F=[],D=Promise.resolve();let R=!1;function j(e){Z.push(e)}let T=!1;const O=new Set;function I(){if(!T){T=!0;do{for(let e=0;e<A.length;e+=1){const t=A[e];P(t),q(t.$$)}for(P(null),A.length=0;B.length;)B.pop()();for(let e=0;e<Z.length;e+=1){const t=Z[e];O.has(t)||(O.add(t),t())}Z.length=0}while(A.length);for(;F.length;)F.pop()();R=!1,T=!1,O.clear()}}function q(e){if(null!==e.fragment){e.update(),i(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(j)}}let G;function U(e,t,n){e.dispatchEvent(function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(`${t?"intro":"outro"}${n}`))}const Q=new Set;let Y;function J(e,t){e&&e.i&&(Q.delete(e),e.i(t))}function K(e,t,n,o){if(e&&e.o){if(Q.has(e))return;Q.add(e),Y.c.push((()=>{Q.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}const W={duration:0};function X(n,o,s,l){let a=o(n,s),c=l?0:1,p=null,h=null,g=null;function b(){g&&N(n,g)}function C(e,t){const n=e.b-c;return t*=Math.abs(n),{a:c,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function x(o){const{delay:r=0,duration:s=300,easing:l=t,tick:x=e,css:w}=a||W,v={start:d()+r,b:o};o||(v.group=Y,Y.r+=1),p||h?h=v:(w&&(b(),g=E(n,c,o,s,r,l,w)),o&&x(0,1),p=C(v,s),j((()=>U(n,o,"start"))),function(e){let t;0===m.size&&u(f),new Promise((n=>{m.add(t={c:e,f:n})}))}((e=>{if(h&&e>h.start&&(p=C(h,s),h=null,U(n,p.b,"start"),w&&(b(),g=E(n,c,p.b,p.duration,0,l,a.css))),p)if(e>=p.end)x(c=p.b,1-c),U(n,p.b,"end"),h||(p.b?b():--p.group.r||i(p.group.c)),p=null;else if(e>=p.start){const t=e-p.start;c=p.a+p.d*l(t/p.duration),x(c,1-c)}return!(!p&&!h)})))}return{run(e){r(a)?(G||(G=Promise.resolve(),G.then((()=>{G=null}))),G).then((()=>{a=a(),x(e)})):x(e)},end(){b(),p=h=null}}}const ee="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function te(e){e&&e.c()}function ne(e,t,o,s){const{fragment:l,on_mount:a,on_destroy:c,after_update:d}=e.$$;l&&l.m(t,o),s||j((()=>{const t=a.map(n).filter(r);c?c.push(...t):i(t),e.$$.on_mount=[]})),d.forEach(j)}function oe(e,t){const n=e.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ie(e,t){-1===e.$$.dirty[0]&&(A.push(e),R||(R=!0,D.then(I)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function re(t,n,r,s,l,a,c=[-1]){const d=M;P(t);const u=t.$$={fragment:null,ctx:null,props:a,update:e,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:n.context||[]),callbacks:o(),dirty:c,skip_bound:!1};let m=!1;if(u.ctx=r?r(t,n.props||{},((e,n,...o)=>{const i=o.length?o[0]:n;return u.ctx&&l(u.ctx[e],u.ctx[e]=i)&&(!u.skip_bound&&u.bound[e]&&u.bound[e](i),m&&ie(t,e)),n})):[],u.update(),m=!0,i(u.before_update),u.fragment=!!s&&s(u.ctx),n.target){if(n.hydrate){p=!0;const e=function(e){return Array.from(e.childNodes)}(n.target);u.fragment&&u.fragment.l(e),e.forEach(C)}else u.fragment&&u.fragment.c();n.intro&&J(t.$$.fragment),ne(t,n.target,n.anchor,n.customElement),function(){p=!1;for(const e of h)e.parentNode.removeChild(e);h.clear()}(),I()}P(d)}let se;"function"==typeof HTMLElement&&(se=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(n).filter(r);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){i(this.$$.on_disconnect)}$destroy(){oe(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!a(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class le{$destroy(){oe(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!a(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ae(e,{delay:n=0,duration:o=400,easing:i=t}={}){const r=+getComputedStyle(e).opacity;return{delay:n,duration:o,easing:i,css:e=>"opacity: "+e*r}}var ce,de,ue,me,fe,pe=(function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientState=void 0,(n=t.ClientState||(t.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"}(ce={exports:{}},ce.exports),ce.exports);function he(e){let t,n,o,i;return{c(){t=w("svg"),n=w("g"),o=w("path"),i=w("rect"),$(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(i,"x","20"),$(i,"y","1"),$(i,"width","16"),$(i,"height","37"),$(i,"rx","8"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(t,"class","buttonIconEl"),$(t,"viewBox","0 0 56 56"),$(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){b(e,t,r),g(t,n),g(n,o),g(n,i)},d(e){e&&C(t)}}}function ge(e){let t,n,o,i;return{c(){t=w("svg"),n=w("g"),o=w("path"),i=w("path"),$(o,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(o,"fill-rule","nonzero"),$(i,"d","M37 13.081V31a8 8 0 11-16 0v-1.919l16-16zM26 1a8 8 0 018 8v1.319L18 26.318V9a8 8 0 018-8zM37.969 7.932l3.74-7.35 3.018 2.625zM39.654 10.608l7.531-3.359.695 3.94z"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(t,"class","buttonIconEl"),$(t,"viewBox","0 0 56 56"),$(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){b(e,t,r),g(t,n),g(n,o),g(n,i)},d(e){e&&C(t)}}}function be(e){let t,n,o,i;return{c(){t=w("svg"),n=w("g"),o=w("path"),i=w("path"),$(o,"d","M36 14.828V30a8 8 0 01-15.961.79l15.96-15.962zM28 1a8 8 0 018 8v.172L20 25.173V9a8 8 0 018-8z"),$(i,"d","M42 26h4v4c0 9.265-7 16.895-16 17.89V55h-4v-7.11c-8.892-.982-15.833-8.444-15.997-17.56L10 30v-4h4v4c0 7.732 6.268 14 14 14 7.628 0 13.83-6.1 13.997-13.687L42 30v-4z"),$(n,"fill","#000"),$(n,"fill-rule","nonzero"),$(t,"class","buttonIconEl"),$(t,"viewBox","0 0 56 56"),$(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){b(e,t,r),g(t,n),g(n,o),g(n,i)},d(e){e&&C(t)}}}function Ce(e){let t,n,o,i;return{c(){t=w("svg"),n=w("g"),o=w("path"),i=w("rect"),$(o,"d","M52 28c0 13.255-10.745 24-24 24S4 41.255 4 28c0-8.921 4.867-16.705 12.091-20.842l1.984 3.474C12.055 14.08 8 20.566 8 28c0 11.046 8.954 20 20 20s20-8.954 20-20c0-7.434-4.056-13.92-10.075-17.368L39.91 7.16C47.133 11.296 52 19.079 52 28z"),$(o,"fill-rule","nonzero"),$(i,"x","24"),$(i,"y","1"),$(i,"width","8"),$(i,"height","23"),$(i,"rx","4"),$(n,"fill","#000"),$(n,"fill-rule","evenodd"),$(t,"class","buttonIconEl"),$(t,"viewBox","0 0 56 56"),$(t,"xmlns","http://www.w3.org/2000/svg")},m(e,r){b(e,t,r),g(t,n),g(n,o),g(n,i)},d(e){e&&C(t)}}}function xe(t){let n,o,i,r,s=t[0]===ue.Mic&&he(),l=t[0]===ue.Error&&ge(),a=t[0]===ue.Denied&&be(),c=t[0]===ue.Poweron&&Ce();return{c(){n=x("div"),s&&s.c(),o=y(),l&&l.c(),i=y(),a&&a.c(),r=y(),c&&c.c(),k(n,"position","absolute"),k(n,"width","60%"),k(n,"height","60%"),k(n,"top","50%"),k(n,"left","50%"),k(n,"transform","translate(-50%, -50%)"),k(n,"pointer-events","none"),k(n,"transition","0.25s"),k(n,"opacity","var(--icon-opacity)")},m(e,t){b(e,n,t),s&&s.m(n,null),g(n,o),l&&l.m(n,null),g(n,i),a&&a.m(n,null),g(n,r),c&&c.m(n,null)},p(e,[t]){e[0]===ue.Mic?s||(s=he(),s.c(),s.m(n,o)):s&&(s.d(1),s=null),e[0]===ue.Error?l||(l=ge(),l.c(),l.m(n,i)):l&&(l.d(1),l=null),e[0]===ue.Denied?a||(a=be(),a.c(),a.m(n,r)):a&&(a.d(1),a=null),e[0]===ue.Poweron?c||(c=Ce(),c.c(),c.m(n,null)):c&&(c.d(1),c=null)},i:e,o:e,d(e){e&&C(n),s&&s.d(),l&&l.d(),a&&a.d(),c&&c.d()}}}function we(e,t,n){let{icon:o=ue.Mic}=t;return e.$$set=e=>{"icon"in e&&n(0,o=e.icon)},[o]}!function(e){e.Failed="Failed",e.NoBrowserSupport="NoBrowserSupport",e.NoAudioConsent="NoAudioConsent",e.Idle="Idle",e.Connecting="Connecting",e.Ready="Ready",e.Recording="Recording",e.Loading="Loading"}(de||(de={})),function(e){e.Poweron="poweron",e.Mic="mic",e.Error="error",e.Denied="denied"}(ue||(ue={})),function(e){e.Hold="hold",e.Click="click",e.Noninteractive="noninteractive"}(me||(me={})),function(e){e.None="none",e.Connecting="connecting",e.Busy="busy"}(fe||(fe={})),pe.ClientState.Disconnected,ue.Poweron,me.Click,fe.None,pe.ClientState.Disconnecting,ue.Poweron,me.Noninteractive,fe.Connecting,pe.ClientState.Connecting,ue.Poweron,me.Noninteractive,fe.Connecting,pe.ClientState.Connected,ue.Mic,me.Hold,fe.None,pe.ClientState.Starting,ue.Mic,me.Hold,fe.Connecting,pe.ClientState.Recording,ue.Mic,me.Hold,fe.None,pe.ClientState.Stopping,ue.Mic,me.Noninteractive,fe.Busy,pe.ClientState.Failed,ue.Error,me.Click,fe.None,pe.ClientState.NoBrowserSupport,ue.Error,me.Click,fe.None,pe.ClientState.NoAudioConsent,ue.Denied,me.Click,fe.None,de.Idle,ue.Poweron,me.Click,fe.None,de.Connecting,ue.Poweron,me.Noninteractive,fe.Connecting,de.Ready,ue.Mic,me.Hold,fe.None,de.Recording,ue.Mic,me.Hold,fe.None,de.Loading,ue.Mic,me.Noninteractive,fe.Busy,de.Failed,ue.Error,me.Click,fe.None,de.NoBrowserSupport,ue.Error,me.Click,fe.None,de.NoAudioConsent,ue.Denied,me.Click,fe.None;class ve extends le{constructor(e){super(),re(this,e,we,xe,s,{icon:0})}}function ye(t){let n,o,i,r,s,l,a,c,d,u,m;return{c(){n=w("svg"),o=w("path"),i=w("path"),r=w("path"),s=w("defs"),l=w("linearGradient"),a=w("stop"),c=w("stop"),d=w("linearGradient"),u=w("stop"),m=w("stop"),$(o,"fill-rule","evenodd"),$(o,"clip-rule","evenodd"),$(o,"d","M134.88 10.0009H138.714L142.333 20.2854L145.864 10.0009H149.632L143.684 24.7084C142.626 27.3015 140.938 29.1472 138.621 30.2455L136.873 27.7812C138.476 27.0848 139.641 25.9476 140.367 24.3696L134.88 10.0009ZM133.172 4.84959V24.2862H129.552V4.84959H133.172ZM112.699 24.2862V4.84959H116.319V11.5625C117.81 10.5273 119.434 10.0106 121.191 10.0122C124.494 10.0122 126.145 11.7837 126.143 15.3267V24.2862H122.528V15.2828C122.528 13.7093 121.741 12.9218 120.166 12.9201C118.899 12.9201 117.617 13.522 116.319 14.7257V24.2862H112.699ZM110.314 23.8777C109.131 24.1521 107.811 24.2882 106.355 24.2861C101.077 24.2861 98.4392 21.8141 98.4401 16.87C98.4401 12.2889 101.078 9.99922 106.355 10.0009C107.813 10.0009 109.133 10.137 110.314 10.4093V13.2638C109.105 12.9918 107.869 12.8563 106.63 12.8598C103.578 12.8598 102.053 14.1965 102.055 16.87C102.055 19.9098 103.58 21.4289 106.63 21.4272C107.87 21.4318 109.106 21.2947 110.314 21.0188V23.8777ZM87.2328 15.9101H93.2092C93.3393 13.8636 92.3843 12.8389 90.3441 12.836C88.4345 12.8364 87.3974 13.8607 87.2328 15.9089V15.9101ZM96.6096 18.5451H87.2328C87.2328 20.4665 88.8071 21.4272 91.9555 21.4272C93.4107 21.4272 94.8627 21.2905 96.2922 21.0188V23.8777C95.0299 24.1521 93.4025 24.2882 91.4102 24.2861C86.2119 24.2861 83.6142 21.8511 83.6171 16.981C83.6171 12.3259 85.9959 9.99922 90.7534 10.0009C95.511 10.0026 97.463 12.8506 96.6096 18.5451ZM72.4099 15.9101H78.3863C78.5169 13.8636 77.5621 12.8389 75.5219 12.836C73.6122 12.8364 72.5749 13.8607 72.4099 15.9089V15.9101ZM81.7872 18.5451H72.4099C72.4099 20.4665 73.9841 21.4272 77.1325 21.4272C78.588 21.4272 80.0402 21.2905 81.4699 21.0188V23.8777C80.2071 24.1521 78.5798 24.2882 76.5879 24.2861C71.3891 24.2861 68.7912 21.8511 68.7942 16.981C68.7942 12.3259 71.1732 9.99922 75.9311 10.0009C80.689 10.0026 82.6411 12.8506 81.7872 18.5451ZM53.2787 10.5856C55.1791 10.1962 57.2814 10.0013 59.5856 10.0009C64.6353 10.0009 67.1602 12.2657 67.1602 16.7953C67.1602 21.7942 64.8482 24.2928 60.2241 24.2912C59.0807 24.2931 57.9489 24.0623 56.8981 23.613V29.4657H53.2787V10.5856ZM56.8981 20.5609C57.8905 21.0528 58.9943 21.2943 60.2102 21.2943C62.4599 21.2943 63.5839 19.7859 63.5822 16.7691C63.5822 14.2027 62.2998 12.9201 59.7348 12.9214C58.5239 12.9214 57.5781 12.9841 56.9012 13.1096L56.8981 20.5609ZM36.0182 23.4744V20.212C37.9744 20.936 40.1855 21.298 42.6514 21.298C45.6424 21.298 47.1394 20.3017 47.1423 18.3092C47.1423 16.8562 46.2198 16.1322 44.3843 16.1322H41.0507C37.0585 16.1322 35.0615 14.3191 35.0598 10.6929C35.0598 6.70661 37.9031 4.71261 43.5896 4.71094C45.7725 4.71094 47.8423 5.02797 49.799 5.66203V8.92436C47.8112 8.19474 45.708 7.8269 43.5896 7.83838C40.3152 7.83838 38.678 8.78969 38.678 10.6923C38.678 12.1403 39.4702 12.8693 41.0538 12.8693H44.3843C48.633 12.8693 50.7572 14.6824 50.7567 18.3086C50.7567 22.3878 48.0549 24.4267 42.6514 24.4255C40.1855 24.4255 37.9744 24.1084 36.0182 23.4744Z"),$(o,"fill","#302666"),$(i,"fill-rule","evenodd"),$(i,"clip-rule","evenodd"),$(i,"d","M14.7612 0C22.9132 0 29.5224 6.5874 29.5224 14.7068C29.5224 23.1268 22.7085 30.3284 14.8166 31.8717V29.4131C17.8347 28.4538 23.9585 25.3169 26.214 18.8632C26.4118 18.321 26.5705 17.7654 26.6888 17.2006L26.6982 17.1599L26.7058 17.1229L26.7134 17.0858L26.7203 17.0501L26.7272 17.0149L26.7341 16.9798L26.7411 16.9453V16.9415L26.7474 16.9077V16.9039L26.753 16.87V16.8656L26.7593 16.8324V16.8274L26.765 16.7954V16.7891L26.7707 16.7577V16.7508L26.7763 16.7201V16.7132L26.782 16.6824V16.6749L26.787 16.6448V16.6366L26.7921 16.6065V16.5984L26.7965 16.5689V16.5595L26.8003 16.5312V16.5212L26.804 16.493V16.4829L26.8078 16.4553V16.444L26.8122 16.4177V16.4058L26.816 16.3794V16.3675L26.8191 16.3418V16.3286L26.8223 16.3035V16.2903L26.8254 16.2659V16.2514L26.8286 16.227V16.2125V16.1893V16.1736V16.1511V16.1347L26.8317 16.1128V16.0958V16.0745V16.0576V16.0362V16.0187V15.998V15.9798V15.9597V15.9409V15.9208V15.9014V15.8825V15.8625V15.8443V15.8236V15.806V15.7847V15.7671V15.7451V15.7288V15.7056V15.6899V15.6667V15.6517V15.6272V15.6128V15.5883V15.5739V15.5488V15.5356V15.5093V15.4967V15.4704V15.4578V15.4308V15.4189V15.3913V15.3706V15.3424V15.3317V15.3028V15.2928V15.2633V15.2539V15.2238V15.215V15.1843V15.1761V15.1447V15.1372V15.1046V15.0977V15.0651V15.0588V15.0255V14.7062V14.6667C26.9262 7.96134 21.4523 2.54336 14.7222 2.56469C7.99203 2.58603 2.55277 8.04039 2.57417 14.7432C2.59621 21.4385 8.04807 26.8515 14.7612 26.8515H14.7895L14.8154 29.4162H14.7612C6.61175 29.4137 0 22.8288 0 14.7068C0 6.58489 6.61175 0 14.7612 0Z"),$(i,"fill","url(#paint0_linear)"),$(r,"fill-rule","evenodd"),$(r,"clip-rule","evenodd"),$(r,"d","M12.3985 8.87104V16.3368C12.3985 16.8506 11.9804 17.2672 11.4647 17.2672C10.9489 17.2672 10.5308 16.8506 10.5308 16.3368V8.87104C10.5308 8.3572 10.9489 7.94065 11.4647 7.94065C11.9804 7.94065 12.3985 8.3572 12.3985 8.87104ZM18.9914 13.5305V20.9962C18.9914 21.5101 18.5733 21.9266 18.0576 21.9266C17.5418 21.9266 17.1237 21.5101 17.1237 20.9962V13.5305C17.1237 13.0167 17.5418 12.6001 18.0576 12.6001C18.5733 12.6001 18.9914 13.0167 18.9914 13.5305ZM22.2909 16.4082V18.1216C22.2997 18.4596 22.1237 18.7758 21.8313 18.9474C21.5388 19.119 21.1759 19.119 20.8835 18.9474C20.591 18.7758 20.415 18.4596 20.4239 18.1216V16.4082C20.415 16.0702 20.591 15.754 20.8835 15.5824C21.1759 15.4108 21.5388 15.4108 21.8313 15.5824C22.1237 15.754 22.2997 16.0702 22.2909 16.4082ZM15.6949 5.94809V12.8542C15.6949 13.368 15.2768 13.7846 14.7611 13.7846C14.2454 13.7846 13.8273 13.368 13.8273 12.8542V5.94809C13.8273 5.43425 14.2454 5.0177 14.7611 5.0177C15.2768 5.0177 15.6949 5.43425 15.6949 5.94809ZM15.6949 16.5588V23.4637C15.6949 23.9775 15.2768 24.3941 14.7611 24.3941C14.2454 24.3941 13.8273 23.9775 13.8273 23.4637V16.5588C13.8273 16.045 14.2454 15.6284 14.7611 15.6284C15.2768 15.6284 15.6949 16.045 15.6949 16.5588ZM9.10148 11.7487V13.4615C9.11029 13.7995 8.93431 14.1157 8.64186 14.2873C8.3494 14.4589 7.98652 14.4589 7.69406 14.2873C7.40161 14.1157 7.22563 13.7995 7.23445 13.4615V11.7487C7.22563 11.4107 7.40161 11.0945 7.69406 10.9229C7.98652 10.7513 8.3494 10.7513 8.64186 10.9229C8.93431 11.0945 9.11029 11.4107 9.10148 11.7487Z"),$(r,"fill","url(#paint1_linear)"),$(a,"stop-color","#53A3F9"),$(c,"offset","1"),$(c,"stop-color","#15E8B5"),$(l,"id","paint0_linear"),$(l,"x1","17.4837"),$(l,"y1","24.6178"),$(l,"x2","23.4572"),$(l,"y2","12.6602"),$(l,"gradientUnits","userSpaceOnUse"),$(u,"stop-color","#53A3F9"),$(m,"offset","1"),$(m,"stop-color","#15E8B5"),$(d,"id","paint1_linear"),$(d,"x1","16.1513"),$(d,"y1","19.984"),$(d,"x2","20.1445"),$(d,"y2","13.2781"),$(d,"gradientUnits","userSpaceOnUse"),$(n,"width","150"),$(n,"height","32"),$(n,"viewBox","0 0 150 32"),$(n,"fill","none"),$(n,"xmlns","http://www.w3.org/2000/svg")},m(e,t){b(e,n,t),g(n,o),g(n,i),g(n,r),g(n,s),g(s,l),g(l,a),g(l,c),g(s,d),g(d,u),g(d,m)},p:e,i:e,o:e,d(e){e&&C(n)}}}class Ve extends le{constructor(e){super(),re(this,e,null,ye,s,{})}}const{window:$e}=ee;function ke(e){let t,n,o,r,s,l,a,c,d,u,m,f,p,h,w,z,_,M,S,E,N,P,H,A,B,Z,F,D,R,T,O,I,q,G,U,Q,Y,W,ee,ie,re,se,le,ae,ce,de,ue,me,fe,pe,he,ge,be,Ce,xe,we,ye,$e,ke,Le,ze,_e,Me,Se,Ee,Ne,Pe,He;return R=new ve({}),W=new Ve({}),de=new ve({}),we=new ve({}),{c(){t=x("modalbg"),o=y(),r=x("modalcontent"),s=x("div"),l=x("div"),a=x("button"),c=y(),d=x("div"),u=x("main"),m=x("div"),f=x("video"),p=x("source"),w=v("\n Your browser does not support the video tag."),z=y(),_=x("div"),M=x("h2"),M.textContent="Find your favourites faster with voice search",S=y(),E=x("p"),N=v("Search Evolve Clothing Gallery's "),P=x("b"),P.textContent="categories",H=v(", "),A=x("b"),A.textContent="designers",B=v(" and "),Z=x("b"),Z.textContent="colors",F=v(" by pressing and holding the\n "),D=x("span"),te(R.$$.fragment),T=y(),O=x("b"),O.textContent="push‑to‑talk button",I=v(".\n "),q=x("a"),q.textContent="More info",G=y(),U=x("div"),Q=x("div"),Y=x("div"),te(W.$$.fragment),ee=y(),ie=x("h3"),ie.textContent="Voice Search Quick Start",re=y(),se=x("ul"),le=x("li"),ae=v("Press and hold the\n "),ce=x("span"),te(de.$$.fragment),ue=v("\n push‑to‑talk button."),me=y(),fe=x("li"),fe.textContent="Allow your browser to use the mic on the 1st time.",pe=y(),he=x("li"),he.innerHTML="Make your first search, e.g. <i>"Show me new arrivals"</i>",ge=y(),be=x("li"),Ce=v("Release the\n "),xe=x("span"),te(we.$$.fragment),ye=v("\n push‑to‑talk button to stop listening."),$e=y(),ke=x("li"),ke.textContent="Speechly detects your voice command and your search results are shown.",Le=v("\n Learn more at "),ze=x("a"),ze.textContent="speechly.com",_e=y(),Me=x("div"),Se=x("button"),Se.textContent="Got it!",$(a,"class","close"),p.src!==(h=e[0])&&$(p,"src",h),$(p,"type","video/mp4"),$(f,"class","usageImage"),$(f,"width","100%"),$(f,"height","auto"),f.autoplay=!0,f.muted=!0,f.loop=!0,$(m,"class","imageContainer"),k(D,"width","1.75rem"),k(D,"height","1.75rem"),k(D,"vertical-align","middle"),k(D,"margin","-0.25rem -0.5rem 0 -0.5rem"),k(D,"position","relative"),k(D,"display","inline-block"),$(q,"class","more"),$(q,"href","#info"),$(_,"class","bodyTextContainer"),$(Y,"class","sidePanelLogo"),k(ce,"width","1.5rem"),k(ce,"height","1.5rem"),k(ce,"vertical-align","middle"),k(ce,"margin","-0.20rem -0.35rem 0 -0.35rem"),k(ce,"position","relative"),k(ce,"display","inline-block"),k(xe,"width","1.5rem"),k(xe,"height","1.5rem"),k(xe,"vertical-align","middle"),k(xe,"margin","-0.20rem -0.35rem 0 -0.35rem"),k(xe,"position","relative"),k(xe,"display","inline-block"),$(se,"class","mt-l mb-l"),$(ze,"href","https://speechly.com/"),$(Q,"class","sidePanelText"),$(U,"class","sidePanel"),L(U,"forceVisible",e[3]),$(d,"class","layout"),$(Se,"class","wide"),$(Me,"class","buttonLayout"),$(l,"class","primaryLayout"),$(s,"class","page"),$(r,"class",e[2])},m(n,i){b(n,t,i),b(n,o,i),b(n,r,i),g(r,s),g(s,l),g(l,a),g(l,c),g(l,d),g(d,u),g(u,m),g(m,f),g(f,p),g(f,w),g(u,z),g(u,_),g(_,M),g(_,S),g(_,E),g(E,N),g(E,P),g(E,H),g(E,A),g(E,B),g(E,Z),g(E,F),g(E,D),ne(R,D,null),g(E,T),g(E,O),g(E,I),g(E,q),g(d,G),g(d,U),g(U,Q),g(Q,Y),ne(W,Y,null),g(Q,ee),g(Q,ie),g(Q,re),g(Q,se),g(se,le),g(le,ae),g(le,ce),ne(de,ce,null),g(le,ue),g(se,me),g(se,fe),g(se,pe),g(se,he),g(se,ge),g(se,be),g(be,Ce),g(be,xe),ne(we,xe,null),g(be,ye),g(se,$e),g(se,ke),g(Q,Le),g(Q,ze),g(l,_e),g(l,Me),g(Me,Se),Ne=!0,Pe||(He=[V(t,"click",e[6]),V(a,"click",e[6]),V(q,"click",e[11]),V(Se,"click",e[6]),V(l,"click",e[7]),V(r,"click",e[6])],Pe=!0)},p(e,t){(!Ne||1&t&&p.src!==(h=e[0]))&&$(p,"src",h),8&t&&L(U,"forceVisible",e[3]),(!Ne||4&t)&&$(r,"class",e[2])},i(o){Ne||(j((()=>{n||(n=X(t,e[5],{},!0)),n.run(1)})),J(R.$$.fragment,o),J(W.$$.fragment,o),J(de.$$.fragment,o),J(we.$$.fragment,o),j((()=>{Ee||(Ee=X(r,e[5],{},!0)),Ee.run(1)})),Ne=!0)},o(o){n||(n=X(t,e[5],{},!1)),n.run(0),K(R.$$.fragment,o),K(W.$$.fragment,o),K(de.$$.fragment,o),K(we.$$.fragment,o),Ee||(Ee=X(r,e[5],{},!1)),Ee.run(0),Ne=!1},d(e){e&&C(t),e&&n&&n.end(),e&&C(o),e&&C(r),oe(R),oe(W),oe(de),oe(we),e&&Ee&&Ee.end(),Pe=!1,i(He)}}}function Le(t){let n,o,r,s,l,a,c=t[4]&&ke(t);return{c(){n=x("link"),o=y(),r=x("modal"),c&&c.c(),this.c=e,$(n,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),$(n,"rel","stylesheet"),k(r,"--remsize",t[1])},m(e,i){g(document.head,n),b(e,o,i),b(e,r,i),c&&c.m(r,null),s=!0,l||(a=V($e,"keydown",t[8]),l=!0)},p(e,[t]){e[4]?c?(c.p(e,t),16&t&&J(c,1)):(c=ke(e),c.c(),J(c,1),c.m(r,null)):c&&(Y={r:0,c:[],p:Y},K(c,1,1,(()=>{c=null})),Y.r||i(Y.c),Y=Y.p),(!s||2&t)&&k(r,"--remsize",e[1])},i(e){s||(J(c),s=!0)},o(e){K(c),s=!1},d(e){C(n),e&&C(o),e&&C(r),c&&c.d(),l=!1,a()}}}function ze(e,t,n){let o,{video:i=""}=t,{hide:r}=t,{remsize:s="1.0rem"}=t,{position:l="fixed"}=t;const a=(()=>{const e=H();return(t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,composed:!0}))}})(),c=(d=ae,function(e,t){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 d(e,t)});var d;let u=!1,m=!1;!function(e){H().$$.on_mount.push(e)}((()=>{n(10,u=!0)}));const f=()=>{n(4,o=!1),a("speechlyintroclosed"),window.postMessage({type:"speechlyintroclosed"},"*")};return e.$$set=e=>{"video"in e&&n(0,i=e.video),"hide"in e&&n(9,r=e.hide),"remsize"in e&&n(1,s=e.remsize),"position"in e&&n(2,l=e.position)},e.$$.update=()=>{1536&e.$$.dirty&&n(4,o=u&&(void 0===r||"true"!==r))},[i,s,l,m,o,c,f,e=>{e.stopPropagation()},e=>{u&&"Escape"===e.key&&(e.preventDefault(),f())},r,u,()=>{n(3,m=!m)}]}class _e extends se{constructor(e){super(),this.shadowRoot.innerHTML="<style>modal{font-size:var(--remsize);pointer-events:none;height:100%}modalbg{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;z-index:2000;pointer-events:auto;background:linear-gradient(180deg, #413783f0, #302865c0 80%)}modalcontent{z-index:2001;pointer-events:auto}modalcontent.fixed{position:fixed;top:0;left:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto}modalcontent.absolute{position:absolute;top:0;left:0;right:0;height:100vh}.page{box-sizing:border-box;width:100%;min-height:100%;padding:2rem 1rem;display:flex;flex-direction:row;align-items:center;justify-content:center}h2,h3{font-family:'Saira Condensed', sans-serif;padding:0;margin:0;text-transform:uppercase;color:#302865;line-height:120%}h2{font-size:135%}p{line-height:150%}b{color:#302865}ul{min-width:8rem;padding:0 1rem 0 0;list-style-type:none}li{border-left:2px solid #38E7B6;margin:0.75rem 0;padding-left:6px;line-height:135%}.primaryLayout{position:relative;box-sizing:border-box;width:100%;background-color:#ffffff;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;border-radius:1rem;box-shadow:0 0.25rem 1.25rem #0008}.layout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:flex-start;justify-content:flex-start}.buttonLayout{box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-self:stretch;align-items:center;justify-content:center;border-radius:0 0 1rem 1rem;background:linear-gradient(180deg, #d9e3eb, #F7FAFC 15%)}main{position:relative;box-sizing:border-box;width:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-grow:1}button.wide{box-sizing:border-box;min-width:12rem;max-width:100%;padding:0.75rem;margin:1rem;background-color:#302865;border:none;border-radius:10rem;transition:0.3s;font-family:'Saira Condensed', sans-serif;font-size:120%;text-transform:uppercase;color:#fff;line-height:120%}button.wide:hover{background-color:#6251a5;transition:0.3s}a,a:visited{color:#302865}a:hover{color:#6251a5}.sidePanel{box-sizing:border-box;width:100%;background:#F7FAFC;color:#728195;font-size:85%;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;max-height:0rem;transition:0.5s;overflow:hidden}.sidePanelText{padding:0.75rem 0.75rem 1.5rem 0.75rem}.more{white-space:nowrap}.forceVisible{max-height:50rem;transition:0.5s}.mt-m{margin-top:0.75em}.mb-m{margin-bottom:0.75em}.mx-m{margin-left:0.75em;margin-right:0.75em}.mt-l{margin-top:1.5em}.mb-l{margin-bottom:1.5em}.imageContainer{box-sizing:border-box;width:100%;padding:1.0rem}.bodyTextContainer{padding:0 2.25rem}.sidePanelLogo{width:85%;padding:0.75rem 0 0.75rem 0}.usageImage{box-sizing:border-box;width:100%;border-radius:0.5rem;overflow:hidden}@media(max-width: 480px){.page{font-size:88%}.imageContainer{padding:0 0 1rem 0}.sidePanelText{padding:1.5rem 2.25rem}.sidePanelLogo{display:none}.usageImage{border-radius:1rem 1rem 0 0}}@media(min-width: 480px) and (max-width: 688px){.page{font-size:100%;padding:2rem 2rem}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:11rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}@media(min-width: 688px){.page{padding:2rem 0;font-size:100%}.primaryLayout{width:600px}.layout{flex-direction:row;justify-content:flex-start}.more{display:none}.sidePanel{max-height:50rem;width:12.5rem;flex-shrink:0;min-height:100%;align-self:stretch;flex-direction:column;border-radius:0 1rem 0 0}}.close{--button-size:1.5rem;display:block;box-sizing:border-box;position:absolute;z-index:1000;top:0.25rem;right:0.25rem;margin:0;padding:0;width:var(--button-size);height:var(--button-size);border:0;color:black;border-radius:1.5rem;background:transparent;box-shadow:0 0 0 1px transparent;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close:before,.close:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:calc(var(--button-size) - 0.5rem);height:1px;background:#728195;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close:hover{background:#6251a5}.close:hover:before,.close:hover:after{height:2px;background:white}.close:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close:active{transform:scale(0.9)}.close:hover,.close:focus,.close:active{outline:none}</style>",re(this,{target:this.shadowRoot,props:z(this.attributes),customElement:!0},ze,Le,l,{video:0,hide:9,remsize:1,position:2}),e&&(e.target&&b(e.target,this,e.anchor),e.props&&(this.$set(e.props),I()))}static get observedAttributes(){return["video","hide","remsize","position"]}get video(){return this.$$.ctx[0]}set video(e){this.$set({video:e}),I()}get hide(){return this.$$.ctx[9]}set hide(e){this.$set({hide:e}),I()}get remsize(){return this.$$.ctx[1]}set remsize(e){this.$set({remsize:e}),I()}get position(){return this.$$.ctx[2]}set position(e){this.$set({position:e}),I()}}customElements.get("intro-popup")?console.warn("Skipping re-defining customElement intro-popup"):customElements.define("intro-popup",_e)}(); | ||
//# sourceMappingURL=intro-popup.js.map |
{ | ||
"name": "@speechly/browser-ui", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"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)}}}function $(t,e){t.appendChild(e)}function y(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode.removeChild(t)}function x(t){return document.createElement(t)}function w(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function v(t){return document.createTextNode(t)}function k(){return v(" ")}function C(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function _(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:S(t,e,n)}function E(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function z(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}function T(t,e,n){t.classList[n?"add":"remove"](e)}function N(t){const e={};for(const n of t)e[n.name]=n.value;return e}const P=new Set;let R,M=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(", "),M-=i,M||f((()=>{M||(P.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),P.clear())})))}function A(t){R=t}function B(){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];A(e),J(e.$$)}for(A(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 J(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 G;function K(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 Q=new Set;function X(t,e){t&&t.i&&(Q.delete(t),t.i(e))}const Y={duration:0};function Z(n,o,i){let r,c,a=o(n,i),l=!1,d=0;function h(){r&&D(n,r)}function f(){const{delay:o=0,duration:i=300,easing:s=e,tick:f=t,css:g}=a||Y;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;P.add(u);const f=u.__svelte_stylesheet||(u.__svelte_stylesheet=u.head.appendChild(x("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`,M+=1,h}(n,0,1,i,o,s,g,d++)),f(0,1);const p=u()+o,$=p+i;c&&c.abort(),l=!0,V((()=>K(n,!0,"start"))),c=m((t=>{if(l){if(t>=$)return f(1,0),K(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||(D(n),s(a)?(a=a(),(G||(G=Promise.resolve(),G.then((()=>{G=null}))),G).then(f)):f())},invalidate(){g=!1},end(){l&&(h(),l=!1)}}}const tt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function et(t,e,n,i){const{fragment:c,on_mount:a,on_destroy:l,after_update:d}=t.$$;c&&c.m(e,n),i||V((()=>{const e=a.map(o).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),d.forEach(V)}function nt(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 ot(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 it(e,n,o,s,c,a,l=[-1]){const d=R;A(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&&ot(e,t)),n})):[],h.update(),u=!0,r(h.before_update),h.fragment=!!s&&s(h.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);h.fragment&&h.fragment.l(t),t.forEach(b)}else h.fragment&&h.fragment.c();n.intro&&X(e.$$.fragment),et(e,n.target,n.anchor,n.customElement),W()}A(d)}let rt;"function"==typeof HTMLElement&&(rt=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(){nt(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 st(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function ct(t){return t*t*t}function at(t){const e=t-1;return e*e*e+1}const lt=[];function dt(t){return"[object Date]"===Object.prototype.toString.call(t)}function ht(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)=>ht(t[n],e)));return t=>n.map((e=>e(t)))}if("object"===n){if(!t||!e)throw new Error("Object cannot be null");if(dt(t)&&dt(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]=ht(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 ut(o,i={}){const r=function(e,n=t){let o;const i=[];function r(t){if(c(e,t)&&(e=t,o)){const t=!lt.length;for(let t=0;t<i.length;t+=1){const n=i[t];n[1](),lt.push(n,e)}if(t){for(let t=0;t<lt.length;t+=2)lt[t][0](lt[t+1]);lt.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=ht}=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 ft,gt,pt,mt,$t,yt=(function(t,e){var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ClientState=void 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"}(ft={exports:{}},ft.exports),ft.exports);function bt(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 xt(t,{delay:e=0,speed:n,duration:o,easing:i=st}={}){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"}(gt||(gt={})),function(t){t.Poweron="poweron",t.Mic="mic",t.Error="error",t.Denied="denied"}(pt||(pt={})),function(t){t.Hold="hold",t.Click="click",t.Noninteractive="noninteractive"}(mt||(mt={})),function(t){t.None="none",t.Connecting="connecting",t.Busy="busy"}($t||($t={})),yt.ClientState.Disconnected,pt.Poweron,mt.Click,$t.None,yt.ClientState.Disconnecting,pt.Poweron,mt.Noninteractive,$t.Connecting,yt.ClientState.Connecting,pt.Poweron,mt.Noninteractive,$t.Connecting,yt.ClientState.Connected,pt.Mic,mt.Hold,$t.None,yt.ClientState.Starting,pt.Mic,mt.Hold,$t.Connecting,yt.ClientState.Recording,pt.Mic,mt.Hold,$t.None,yt.ClientState.Stopping,pt.Mic,mt.Noninteractive,$t.Busy,yt.ClientState.Failed,pt.Error,mt.Click,$t.None,yt.ClientState.NoBrowserSupport,pt.Error,mt.Click,$t.None,yt.ClientState.NoAudioConsent,pt.Denied,mt.Click,$t.None,gt.Idle,pt.Poweron,mt.Click,$t.None,gt.Connecting,pt.Poweron,mt.Noninteractive,$t.Connecting,gt.Ready,pt.Mic,mt.Hold,$t.None,gt.Recording,pt.Mic,mt.Hold,$t.None,gt.Loading,pt.Mic,mt.Noninteractive,$t.Busy,gt.Failed,pt.Error,mt.Click,$t.None,gt.NoBrowserSupport,pt.Error,mt.Click,$t.None,gt.NoAudioConsent,pt.Denied,mt.Click,$t.None;const wt=[0,1];function vt(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 kt(e){let n;return{c(){n=x("canvas"),z(n,"color",e[0]),z(n,"display","block"),z(n,"width","1.35rem"),z(n,"height","1.5rem"),z(n,"margin","0"),z(n,"padding","0 0.8rem 0 0rem"),z(n,"flex-grow","0"),z(n,"flex-shrink","0"),z(n,"flex-basis","1.35rem"),S(n,"class","svelte-1fz8oog")},m(t,o){y(t,n,o),e[3](n)},p(t,[e]){1&e&&z(n,"color",t[0])},i:t,o:t,d(t){t&&b(n),e[3](null)}}}function Ct(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){B().$$.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){I[t?"unshift":"push"]((()=>{r=t,n(1,r)}))}]}class St extends class{$destroy(){nt(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=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}",$(document.head,e)),it(this,t,Ct,kt,c,{color:0,updateVU:2})}get updateVU(){return this.$$.ctx[2]}}const{window:_t}=tt;function Et(t,e,n){const o=t.slice();return o[39]=e[n],o[41]=n,o}function zt(t){let e;return{c(){e=x("div"),S(e,"class","TransscriptItemBgDiv")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Tt(e){let n,o;return{c(){n=x("div"),n.textContent="Listening...",S(n,"class","listening")},m(t,e){y(t,n,e)},i(t){o||V((()=>{o=Z(n,e[19],{duration:400}),o.start()}))},o:t,d(t){t&&b(n)}}}function Nt(e){let n,o;return{c(){n=x("div"),S(n,"class","TransscriptItemBgDiv")},m(t,e){y(t,n,e)},p(t,n){e=t},i(t){o||V((()=>{o=Z(n,e[19],{duration:e[15]}),o.start()}))},o:t,d(t){t&&b(n)}}}function Pt(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){y(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&&b(e)}}}function Rt(e){let n,o,i,r,s,c,a,l=e[39].word+"",d=e[14]&&Nt(e),h=e[41]<e[10].length&&Pt(e);return{c(){n=x("div"),d&&d.c(),o=k(),i=x("div"),r=v(l),s=k(),h&&h.c(),S(i,"class","TransscriptItemContent"),S(n,"class",a="TranscriptItem "+e[21](e[39])),T(n,"Entity",null!==e[39].entityType),T(n,"Final",e[39].isFinal)},m(t,e){y(t,n,e),d&&d.m(n,null),$(n,o),$(n,i),$(i,r),$(i,s),h&&h.m(i,null)},p(t,s){(e=t)[14]?d?16384&s[0]&&X(d,1):(d=Nt(e),d.c(),X(d,1),d.m(n,o)):d&&(d.d(1),d=null),1024&s[0]&&l!==(l=e[39].word+"")&&E(r,l),e[41]<e[10].length?h?h.p(e,s):(h=Pt(e),h.c(),h.m(i,null)):h&&(h.d(1),h=null),1024&s[0]&&a!==(a="TranscriptItem "+e[21](e[39]))&&S(n,"class",a),1024&s[0]&&T(n,"Entity",null!==e[39].entityType),1024&s[0]&&T(n,"Final",e[39].isFinal)},i(t){X(d),c||V((()=>{c=Z(i,e[19],{duration:e[15]}),c.start()}))},o:t,d(t){t&&b(n),d&&d.d(),h&&h.d()}}}function Mt(e){let n,o,i,r,s,c,a,l;return{c(){n=x("div"),o=x("div"),i=k(),r=x("div"),s=w("svg"),c=w("path"),S(o,"class","TransscriptItemBgDiv"),z(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"),z(s,"width","2rem"),z(s,"height","2rem"),z(s,"position","absolute"),z(s,"transform","translate(-0.6rem, -0.5rem)"),z(s,"stroke","#eee"),S(s,"viewBox","0 0 24 24"),S(s,"xmlns","http://www.w3.org/2000/svg"),z(r,"width","1.0rem"),z(r,"height","1rem"),z(r,"position","relative"),S(n,"class","TranscriptItem")},m(t,e){y(t,n,e),$(n,o),$(n,i),$(n,r),$(r,s),$(s,c)},p(t,e){32&e[0]&&z(o,"background-color",t[5])},i(t){a||V((()=>{a=Z(c,e[18],{duration:500}),a.start()})),l||V((()=>{l=Z(n,e[19],{duration:200,maxWidth:3}),l.start()}))},o:t,d(t){t&&b(n)}}}function Dt(e){let n,o,i,r,s,c,a,l,d,h,u,f,g,p,m=e[14]&&zt(),w={color:e[5]};c=new St({props:w}),e[31](c);let v=e[13]&&Tt(e),_=e[10],E=[];for(let t=0;t<_.length;t+=1)E[t]=Rt(Et(e,_,t));let N=e[12]&&Mt(e);return{c(){var f;n=x("main"),o=x("div"),i=x("div"),m&&m.c(),r=k(),s=x("div"),(f=c.$$.fragment)&&f.c(),a=k(),v&&v.c(),l=k();for(let t=0;t<E.length;t+=1)E[t].c();d=k(),N&&N.c(),h=k(),u=x("link"),this.c=t,S(s,"class","TransscriptItemContent"),S(i,"class","TranscriptItem"),S(o,"class","BigTranscript"),z(n,"--voffset",e[1]),z(n,"--hoffset",e[2]),z(n,"--fontsize",e[3]),z(n,"--color",e[4]),z(n,"--highlight-color",e[5]),z(n,"--text-bg-color",e[6]),z(n,"--gradient-stop1",e[7]),z(n,"--gradient-stop2",e[8]),z(n,"--marginbottom",e[9]),z(n,"--transition",e[16].transition),z(n,"opacity",e[16].transition),z(n,"max-height",10*vt(wt,e[16].transition,0,.6)+"rem"),z(n,"visibility",0!==e[16].transition?"visible":"hidden"),T(n,"placementTop","top"===e[0]),S(u,"href","https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@700&display=swap"),S(u,"rel","stylesheet")},m(t,b){y(t,n,b),$(n,o),$(o,i),m&&m.m(i,null),$(i,r),$(i,s),et(c,s,null),$(s,a),v&&v.m(s,null),$(o,l);for(let t=0;t<E.length;t+=1)E[t].m(o,null);$(o,d),N&&N.m(o,null),y(t,h,b),$(document.head,u),f=!0,g||(p=C(_t,"message",e[20]),g=!0)},p(t,e){t[14]?m||(m=zt(),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]?v?8192&e[0]&&X(v,1):(v=Tt(t),v.c(),X(v,1),v.m(s,null)):v&&(v.d(1),v=null),2118656&e[0]){let n;for(_=t[10],n=0;n<_.length;n+=1){const i=Et(t,_,n);E[n]?(E[n].p(i,e),X(E[n],1)):(E[n]=Rt(i),E[n].c(),X(E[n],1),E[n].m(o,d))}for(;n<E.length;n+=1)E[n].d(1);E.length=_.length}t[12]?N?(N.p(t,e),4096&e[0]&&X(N,1)):(N=Mt(t),N.c(),X(N,1),N.m(o,null)):N&&(N.d(1),N=null),(!f||2&e[0])&&z(n,"--voffset",t[1]),(!f||4&e[0])&&z(n,"--hoffset",t[2]),(!f||8&e[0])&&z(n,"--fontsize",t[3]),(!f||16&e[0])&&z(n,"--color",t[4]),(!f||32&e[0])&&z(n,"--highlight-color",t[5]),(!f||64&e[0])&&z(n,"--text-bg-color",t[6]),(!f||128&e[0])&&z(n,"--gradient-stop1",t[7]),(!f||256&e[0])&&z(n,"--gradient-stop2",t[8]),(!f||512&e[0])&&z(n,"--marginbottom",t[9]),(!f||65536&e[0])&&z(n,"--transition",t[16].transition),(!f||65536&e[0])&&z(n,"opacity",t[16].transition),(!f||65536&e[0])&&z(n,"max-height",10*vt(wt,t[16].transition,0,.6)+"rem"),(!f||65536&e[0])&&z(n,"visibility",0!==t[16].transition?"visible":"hidden"),1&e[0]&&T(n,"placementTop","top"===t[0])},i(t){if(!f){X(c.$$.fragment,t),X(v);for(let t=0;t<_.length;t+=1)X(E[t]);X(N),f=!0}},o(t){!function(t,e,n,o){if(t&&t.o){if(Q.has(t))return;Q.add(t),(void 0).c.push((()=>{Q.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}(c.$$.fragment,t),f=!1},d(t){t&&b(n),m&&m.d(),e[31](null),nt(c),v&&v.d(),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(E,t),N&&N.d(),t&&b(h),b(u),g=!1,p()}}}function At(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,_=yt.ClientState.Disconnected,E=!1,z=!1,T=!1,N=ut({transition:0},{duration:200});d(t,N,(t=>n(16,a=t)));const P=B(),R=bt(xt),M=bt(((t,{delay:e=0,duration:n=350,maxWidth:o=10})=>({delay:e,duration:n,css:t=>`\n max-width: ${vt(wt,t,0,1)*o}rem;\n `}))),D=t=>{n(12,T=T||t)},A=t=>{n(27,_=t),_===yt.ClientState.Recording&&(n(12,T=!1),n(10,k=[]),S=null)},F=t=>{if(void 0===t)return;l&&(s||_===yt.ClientState.Recording)&&l.updateVU(.5*Math.random()+.5,75*Math.random()+75),t.isFinal?O(k.length>0?s?3500:2e3:0):k.length>0&&(E||n(28,E=!0),O(2e3));const e=`${t.contextId}/${t.id}`;null!==S?S!==e&&(n(12,T=!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)))},O=(t=0)=>{j(),C=window.setTimeout((()=>{C=null,E&&n(28,E=!1)}),t)},j=()=>{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=_===yt.ClientState.Recording||E;t!==z&&(e="visibilitychanged",a=t,P.dispatchEvent(new CustomEvent(e,{detail:a,composed:!0}))),n(29,z=t),N.set({transition:z?1:0})}var e,a;1073741824&t.$$.dirty[0]&&(s||O(0))},[h,u,f,g,p,m,$,y,b,x,k,l,T,o,i,c,a,N,R,M,t=>{switch(t.data.type){case"speechsegment":F(t.data.segment);break;case"speechhandled":D(t.data.success);break;case"speechstate":A(t.data.state)}},t=>t.entityType||"",w,v,D,A,F,_,E,z,s,function(t){I[t?"unshift":"push"]((()=>{l=t,n(11,l)}))}]}class Bt extends rt{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>",it(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},At,Dt,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&&y(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","demomode","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[22]}set formattext(t){this.$set({formattext:t}),W()}get demomode(){return this.$$.ctx[23]}set demomode(t){this.$set({demomode:t}),W()}get speechhandled(){return this.$$.ctx[24]}get speechstate(){return this.$$.ctx[25]}get speechsegment(){return this.$$.ctx[26]}}function Ft(e){let n,o,i,s,c,a,l,d,h;return{c(){n=x("main"),o=x("div"),i=x("div"),s=x("big-transcript"),c=k(),a=x("div"),l=v(e[11]),this.c=t,_(s,"formattext",e[9]),_(s,"fontsize",e[1]),_(s,"color",e[3]),_(s,"backgroundcolor","none"),_(s,"highlightcolor",e[5]),_(s,"gradientstop1",e[7]),_(s,"gradientstop2",e[8]),_(s,"demomode",e[10]),S(a,"class","hint"),z(a,"opacity",e[15].opacity),S(i,"class","pad"),S(o,"class","drawer"),z(o,"background-color",e[6]),z(o,"opacity",e[13].opacity),z(o,"transform","translate(0px, "+e[14].y+"rem)"),S(n,"class","placementTop"),z(n,"--height",e[0]),z(n,"--smalltextcolor",e[4]),z(n,"--hintfontsize",e[2])},m(t,r){y(t,n,r),$(n,o),$(o,i),$(i,s),e[26](s),$(i,c),$(i,a),$(a,l),d||(h=[C(window,"message",e[20]),C(s,"visibilitychanged",e[19])],d=!0)},p(t,[e]){512&e&&_(s,"formattext",t[9]),2&e&&_(s,"fontsize",t[1]),8&e&&_(s,"color",t[3]),32&e&&_(s,"highlightcolor",t[5]),128&e&&_(s,"gradientstop1",t[7]),256&e&&_(s,"gradientstop2",t[8]),1024&e&&_(s,"demomode",t[10]),2048&e&&E(l,t[11]),32768&e&&z(a,"opacity",t[15].opacity),64&e&&z(o,"background-color",t[6]),8192&e&&z(o,"opacity",t[13].opacity),16384&e&&z(o,"transform","translate(0px, "+t[14].y+"rem)"),1&e&&z(n,"--height",t[0]),16&e&&z(n,"--smalltextcolor",t[4]),4&e&&z(n,"--hintfontsize",t[2])},i:t,o:t,d(t){t&&b(n),e[26](null),d=!1,r(h)}}}function It(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 _=ut({y:-1},{duration:200});d(t,_,(t=>o(14,r=t)));let E=ut({opacity:0},{duration:200,easing:e});d(t,E,(t=>o(13,i=t)));let z=ut({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:ct}),E.set({opacity:0}),z.set({opacity:0})):(_.set({y:0},{easing:at}),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){I[t?"unshift":"push"]((()=>{c=t,o(12,c)}))}]}customElements.get("big-transcript")?console.warn("Skipping re-defining customElement big-transcript"):customElements.define("big-transcript",Bt);class Ot extends rt{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>",it(this,{target:this.shadowRoot,props:N(this.attributes),customElement:!0},It,Ft,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&&y(t.target,this,t.anchor),t.props&&(this.$set(t.props),W()))}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}),W()}get hint(){return this.$$.ctx[21]}set hint(t){this.$set({hint:t}),W()}get fontsize(){return this.$$.ctx[1]}set fontsize(t){this.$set({fontsize:t}),W()}get hintfontsize(){return this.$$.ctx[2]}set hintfontsize(t){this.$set({hintfontsize:t}),W()}get color(){return this.$$.ctx[3]}set color(t){this.$set({color:t}),W()}get smalltextcolor(){return this.$$.ctx[4]}set smalltextcolor(t){this.$set({smalltextcolor: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 formattext(){return this.$$.ctx[9]}set formattext(t){this.$set({formattext:t}),W()}get demomode(){return this.$$.ctx[10]}set demomode(t){this.$set({demomode:t}),W()}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",Ot)}(); | ||
!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}),e.ClientState=void 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 too big to display
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37
1457
1513575