@htmlbricks/hb-player-input-streaming 0.61.39 → 0.61.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/main.iife.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(de){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const hn=2,_n="[",pn="]",$t={},y=Symbol(),ve=!1;var he=Array.isArray,$n=Array.prototype.indexOf,gn=Array.from,At=Object.keys,lt=Object.defineProperty,at=Object.getOwnPropertyDescriptor,wn=Object.prototype,mn=Array.prototype,En=Object.getPrototypeOf,_e=Object.isExtensible;function pe(t){for(var e=0;e<t.length;e++)t[e]()}function yn(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const x=2,Ht=4,Ut=8,gt=16,U=32,B=64,$e=128,M=256,St=512,O=1024,j=2048,G=4096,ft=8192,J=16384,Bt=32768,bn=65536,ge=1<<17,Tn=1<<18,ot=1<<19,Rn=1<<20,Gt=1<<21,Wt=1<<22,Z=1<<23,Xt=Symbol("$state"),On=Symbol("legacy props"),Kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},we=3,me=8;function An(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Sn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function kn(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Cn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function zt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let q=!1;function kt(t){q=t}let A;function Q(t){if(t===null)throw zt(),$t;return A=t}function Ee(){return Q(yt(A))}function wt(t){if(q){if(yt(A)!==null)throw zt(),$t;A=t}}function ye(t){return t===this.v}function jn(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ln(t){return!jn(t,this.v)}let Fn=!1,L=null;function xt(t){L=t}function be(t,e=!1,n){L={p:L,c:null,e:null,s:t,x:null,l:null}}function Te(t){var e=L,n=e.e;if(n!==null){e.e=null;for(var r of n)Ye(r)}return t!==void 0&&(e.x=t),L=e.p,t??{}}function Re(){return!0}const qn=new WeakMap;function Vn(t){var e=p;if(e===null)return g.f|=Z,t;if((e.f&Bt)===0){if((e.f&$e)===0)throw!e.parent&&t instanceof Error&&Oe(t),t;e.b.error(t)}else Jt(t,e)}function Jt(t,e){for(;e!==null;){if((e.f&$e)!==0)try{e.b.error(t);return}catch(n){t=n}e=e.parent}throw t instanceof Error&&Oe(t),t}function Oe(t){const e=qn.get(t);e&&(lt(t,"message",{value:e.message}),lt(t,"stack",{value:e.stack}))}let mt=[],Zt=[];function Ae(){var t=mt;mt=[],pe(t)}function Yn(){var t=Zt;Zt=[],pe(t)}function Hn(t){mt.length===0&&queueMicrotask(Ae),mt.push(t)}function Un(){mt.length>0&&Ae(),Zt.length>0&&Yn()}function Bn(){const t=p.b;return t===null&&An(),t}function Se(t){var e=x|j,n=g!==null&&(g.f&x)!==0?g:null;return p===null||n!==null&&(n.f&M)!==0?e|=M:p.f|=ot,{ctx:L,deps:null,effects:null,equals:ye,f:e,fn:t,reactions:null,rv:0,v:y,wv:0,parent:n??p,ac:null}}function Gn(t,e){let n=p;n===null&&Sn();var r=n.b,i=void 0,s=ne(y),u=null,a=!g;return ur(()=>{try{var l=t();u&&Promise.resolve(l).catch(()=>{})}catch(d){l=Promise.reject(d)}var f=()=>l;i=u?.then(f,f)??Promise.resolve(l),u=i;var o=b,c=r.is_pending();a&&(r.update_pending_count(1),c||o.increment());const v=(d,h=void 0)=>{u=null,c||o.activate(),h?h!==Kt&&(s.f|=Z,re(s,h)):((s.f&Z)!==0&&(s.f^=Z),re(s,d)),a&&(r.update_pending_count(-1),c||o.decrement()),Ce()};if(i.then(v,d=>v(null,d||"unknown")),o)return()=>{queueMicrotask(()=>o.neuter())}}),new Promise(l=>{function f(o){function c(){o===i?l(s):f(i)}o.then(c,c)}f(i)})}function ke(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)X(e[n])}}function Wn(t){for(var e=t.parent;e!==null;){if((e.f&x)===0)return e;e=e.parent}return null}function Qt(t){var e,n=p;K(Wn(t));try{ke(t),e=Qe(t)}finally{K(n)}return e}function xe(t){var e=Qt(t);if(t.equals(e)||(t.v=e,t.wv=Je()),!rt){var n=(z||(t.f&M)!==0)&&t.deps!==null?G:O;P(t,n)}}function Xn(t,e,n){const r=Se;if(e.length===0){n(t.map(r));return}var i=b,s=p,u=Kn(),a=Bn();Promise.all(e.map(l=>Gn(l))).then(l=>{i?.activate(),u();try{n([...t.map(r),...l])}catch(f){(s.f&J)===0&&Jt(f,s)}i?.deactivate(),Ce()}).catch(l=>{a.error(l)})}function Kn(){var t=p,e=g,n=L,r=b;return function(){K(t),V(e),xt(n),r?.activate()}}function Ce(){K(null),V(null),xt(null)}const te=new Set;let b=null,Ne=new Set,Ct=[];function Pe(){const t=Ct.shift();Ct.length>0&&queueMicrotask(Pe),t()}let tt=[],Nt=null,ee=!1,Pt=!1;class et{current=new Map;#e=new Map;#t=new Set;#n=0;#f=null;#o=!1;#i=[];#u=[];#s=[];#r=[];#l=[];#c=[];#d=[];skipped_effects=new Set;process(e){tt=[];for(const i of e)this.#h(i);if(this.#i.length===0&&this.#n===0){this.#v();var n=this.#s,r=this.#r;this.#s=[],this.#r=[],this.#l=[],b=null,De(n),De(r),b===null?b=this:te.delete(this),this.#f?.resolve()}else this.#a(this.#s),this.#a(this.#r),this.#a(this.#l);for(const i of this.#i)vt(i);for(const i of this.#u)vt(i);this.#i=[],this.#u=[]}#h(e){e.f^=O;for(var n=e.first;n!==null;){var r=n.f,i=(r&(U|B))!==0,s=i&&(r&O)!==0,u=s||(r&ft)!==0||this.skipped_effects.has(n);if(!u&&n.fn!==null){if(i)n.f^=O;else if((r&Ht)!==0)this.#r.push(n);else if((r&O)===0)if((r&Wt)!==0){var a=n.b?.is_pending()?this.#u:this.#i;a.push(n)}else Dt(n)&&((n.f&gt)!==0&&this.#l.push(n),vt(n));var l=n.first;if(l!==null){n=l;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)n=f.next,f=f.parent}}#a(e){for(const n of e)((n.f&j)!==0?this.#c:this.#d).push(n),P(n,O);e.length=0}capture(e,n){this.#e.has(e)||this.#e.set(e,n),this.current.set(e,e.v)}activate(){b=this}deactivate(){b=null;for(const e of Ne)if(Ne.delete(e),e(),b!==null)break}neuter(){this.#o=!0}flush(){tt.length>0?Ie():this.#v(),b===this&&(this.#n===0&&te.delete(this),this.deactivate())}#v(){if(!this.#o)for(const e of this.#t)e();this.#t.clear()}increment(){this.#n+=1}decrement(){if(this.#n-=1,this.#n===0){for(const e of this.#c)P(e,j),Et(e);for(const e of this.#d)P(e,G),Et(e);this.#s=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#f??=yn()).promise}static ensure(){if(b===null){const e=b=new et;te.add(b),Pt||et.enqueue(()=>{b===e&&e.flush()})}return b}static enqueue(e){Ct.length===0&&queueMicrotask(Pe),Ct.unshift(e)}}function Me(t){var e=Pt;Pt=!0;try{for(var n;;){if(Un(),tt.length===0&&(b?.flush(),tt.length===0))return Nt=null,n;Ie()}}finally{Pt=e}}function Ie(){var t=dt;ee=!0;try{var e=0;for(We(!0);tt.length>0;){var n=et.ensure();if(e++>1e3){var r,i;zn()}n.process(tt),W.clear()}}finally{ee=!1,We(t),Nt=null}}function zn(){try{Nn()}catch(t){Jt(t,Nt)}}let nt=null;function De(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(J|ft))===0&&Dt(r)&&(nt=[],vt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Be(r):r.fn=null),nt?.length>0)){W.clear();for(const i of nt)vt(i);nt=[]}}nt=null}}function Et(t){for(var e=Nt=t;e.parent!==null;){e=e.parent;var n=e.f;if(ee&&e===p&&(n&gt)!==0)return;if((n&(B|U))!==0){if((n&O)===0)return;e.f^=O}}tt.push(e)}const W=new Map;function ne(t,e){var n={f:0,v:t,reactions:null,equals:ye,rv:0,wv:0};return n}function C(t,e){const n=ne(t);return hr(n),n}function Jn(t,e=!1,n=!0){const r=ne(t);return e||(r.equals=Ln),r}function k(t,e,n=!1){g!==null&&(!it||(g.f&ge)!==0)&&Re()&&(g.f&(x|gt|Wt|ge))!==0&&!H?.includes(t)&&Dn();let r=n?ct(e):e;return re(t,r)}function re(t,e){if(!t.equals(e)){var n=t.v;rt?W.set(t,e):W.set(t,n),t.v=e;var r=et.ensure();r.capture(t,n),(t.f&x)!==0&&((t.f&j)!==0&&Qt(t),P(t,(t.f&M)===0?O:G)),t.wv=Je(),je(t,j),p!==null&&(p.f&O)!==0&&(p.f&(U|B))===0&&(I===null?_r([t]):I.push(t))}return e}function ie(t){k(t,t.v+1)}function je(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],u=s.f,a=(u&j)===0;a&&P(s,e),(u&x)!==0?je(s,G):a&&((u&gt)!==0&&nt!==null&&nt.push(s),Et(s))}}function ct(t){if(typeof t!="object"||t===null||Xt in t)return t;const e=En(t);if(e!==wn&&e!==mn)return t;var n=new Map,r=he(t),i=C(0),s=st,u=a=>{if(st===s)return a();var l=g,f=st;V(null),ze(s);var o=a();return V(l),ze(f),o};return r&&n.set("length",C(t.length)),new Proxy(t,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Mn();var o=n.get(l);return o===void 0?o=u(()=>{var c=C(f.value);return n.set(l,c),c}):k(o,f.value,!0),!0},deleteProperty(a,l){var f=n.get(l);if(f===void 0){if(l in a){const o=u(()=>C(y));n.set(l,o),ie(i)}}else k(f,y),ie(i);return!0},get(a,l,f){if(l===Xt)return t;var o=n.get(l),c=l in a;if(o===void 0&&(!c||at(a,l)?.writable)&&(o=u(()=>{var d=ct(c?a[l]:y),h=C(d);return h}),n.set(l,o)),o!==void 0){var v=T(o);return v===y?void 0:v}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var o=n.get(l);o&&(f.value=T(o))}else if(f===void 0){var c=n.get(l),v=c?.v;if(c!==void 0&&v!==y)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(a,l){if(l===Xt)return!0;var f=n.get(l),o=f!==void 0&&f.v!==y||Reflect.has(a,l);if(f!==void 0||p!==null&&(!o||at(a,l)?.writable)){f===void 0&&(f=u(()=>{var v=o?ct(a[l]):y,d=C(v);return d}),n.set(l,f));var c=T(f);if(c===y)return!1}return o},set(a,l,f,o){var c=n.get(l),v=l in a;if(r&&l==="length")for(var d=f;d<c.v;d+=1){var h=n.get(d+"");h!==void 0?k(h,y):d in a&&(h=u(()=>C(y)),n.set(d+"",h))}if(c===void 0)(!v||at(a,l)?.writable)&&(c=u(()=>C(void 0)),k(c,ct(f)),n.set(l,c));else{v=c.v!==y;var $=u(()=>ct(f));k(c,$)}var R=Reflect.getOwnPropertyDescriptor(a,l);if(R?.set&&R.set.call(o,f),!v){if(r&&typeof l=="string"){var D=n.get("length"),E=Number(l);Number.isInteger(E)&&E>=D.v&&k(D,E+1)}ie(i)}return!0},ownKeys(a){T(i);var l=Reflect.ownKeys(a).filter(c=>{var v=n.get(c);return v===void 0||v.v!==y});for(var[f,o]of n)o.v!==y&&!(f in a)&&l.push(f);return l},setPrototypeOf(){In()}})}var Le,Fe,qe,Ve;function se(){if(Le===void 0){Le=window,Fe=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;qe=at(e,"firstChild").get,Ve=at(e,"nextSibling").get,_e(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),_e(n)&&(n.__t=void 0)}}function Mt(t=""){return document.createTextNode(t)}function It(t){return qe.call(t)}function yt(t){return Ve.call(t)}function bt(t,e){if(!q)return It(t);var n=It(A);if(n===null)n=A.appendChild(Mt());else if(e&&n.nodeType!==we){var r=Mt();return n?.before(r),Q(r),r}return Q(n),n}function Tt(t,e=1,n=!1){let r=q?A:t;for(var i;e--;)i=r,r=yt(r);if(!q)return r;if(n&&r?.nodeType!==we){var s=Mt();return r===null?i?.after(s):r.before(s),Q(s),s}return Q(r),r}function Zn(t){t.textContent=""}function ue(t){var e=g,n=p;V(null),K(null);try{return t()}finally{V(e),K(n)}}function Qn(t){p===null&&g===null&&Cn(),g!==null&&(g.f&M)!==0&&p===null&&xn(),rt&&kn()}function tr(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function Y(t,e,n,r=!0){var i=p;i!==null&&(i.f&ft)!==0&&(t|=ft);var s={ctx:L,deps:null,nodes_start:null,nodes_end:null,f:t|j,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{vt(s),s.f|=Bt}catch(l){throw X(s),l}else e!==null&&Et(s);if(r){var u=s;if(n&&u.deps===null&&u.teardown===null&&u.nodes_start===null&&u.first===u.last&&(u.f&ot)===0&&(u=u.first),u!==null&&(u.parent=i,i!==null&&tr(u,i),g!==null&&(g.f&x)!==0&&(t&B)===0)){var a=g;(a.effects??=[]).push(u)}}return s}function er(t){const e=Y(Ut,null,!1);return P(e,O),e.teardown=t,e}function nr(t){Qn();var e=p.f,n=!g&&(e&U)!==0&&(e&Bt)===0;if(n){var r=L;(r.e??=[]).push(t)}else return Ye(t)}function Ye(t){return Y(Ht|Rn,t,!1)}function rr(t){et.ensure();const e=Y(B|ot,t,!0);return()=>{X(e)}}function ir(t){et.ensure();const e=Y(B|ot,t,!0);return(n={})=>new Promise(r=>{n.outro?dr(e,()=>{X(e),r(void 0)}):(X(e),r(void 0))})}function sr(t){return Y(Ht,t,!1)}function ur(t){return Y(Wt|ot,t,!0)}function lr(t,e=0){return Y(Ut|e,t,!0)}function ar(t,e=[],n=[]){Xn(e,n,r=>{Y(Ut,()=>t(...r.map(T)),!0)})}function fr(t,e=!0){return Y(U|ot,t,!0,e)}function He(t){var e=t.teardown;if(e!==null){const n=rt,r=g;Xe(!0),V(null);try{e.call(null)}finally{Xe(n),V(r)}}}function Ue(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&ue(()=>{i.abort(Kt)});var r=n.next;(n.f&B)!==0?n.parent=null:X(n,e),n=r}}function or(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&U)===0&&X(e),e=n}}function X(t,e=!0){var n=!1;(e||(t.f&Tn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(cr(t.nodes_start,t.nodes_end),n=!0),Ue(t,e&&!n),jt(t,0),P(t,J);var r=t.transitions;if(r!==null)for(const s of r)s.stop();He(t);var i=t.parent;i!==null&&i.first!==null&&Be(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function cr(t,e){for(;t!==null;){var n=t===e?null:yt(t);t.remove(),t=n}}function Be(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function dr(t,e){var n=[];Ge(t,n,!0),vr(n,()=>{X(t),e&&e()})}function vr(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var i of t)i.out(r)}else e()}function Ge(t,e,n){if((t.f&ft)===0){if(t.f^=ft,t.transitions!==null)for(const u of t.transitions)(u.is_global||n)&&e.push(u);for(var r=t.first;r!==null;){var i=r.next,s=(r.f&bn)!==0||(r.f&U)!==0;Ge(r,e,s?n:!1),r=i}}}let dt=!1;function We(t){dt=t}let rt=!1;function Xe(t){rt=t}let g=null,it=!1;function V(t){g=t}let p=null;function K(t){p=t}let H=null;function hr(t){g!==null&&(H===null?H=[t]:H.push(t))}let S=null,N=0,I=null;function _r(t){I=t}let Ke=1,Rt=0,st=Rt;function ze(t){st=t}let z=!1;function Je(){return++Ke}function Dt(t){var e=t.f;if((e&j)!==0)return!0;if((e&G)!==0){var n=t.deps,r=(e&M)!==0;if(n!==null){var i,s,u=(e&St)!==0,a=r&&p!==null&&!z,l=n.length;if((u||a)&&(p===null||(p.f&J)===0)){var f=t,o=f.parent;for(i=0;i<l;i++)s=n[i],(u||!s?.reactions?.includes(f))&&(s.reactions??=[]).push(f);u&&(f.f^=St),a&&o!==null&&(o.f&M)===0&&(f.f^=M)}for(i=0;i<l;i++)if(s=n[i],Dt(s)&&xe(s),s.wv>t.wv)return!0}(!r||p!==null&&!z)&&P(t,O)}return!1}function Ze(t,e,n=!0){var r=t.reactions;if(r!==null&&!H?.includes(t))for(var i=0;i<r.length;i++){var s=r[i];(s.f&x)!==0?Ze(s,e,!1):e===s&&(n?P(s,j):(s.f&O)!==0&&P(s,G),Et(s))}}function Qe(t){var e=S,n=N,r=I,i=g,s=z,u=H,a=L,l=it,f=st,o=t.f;S=null,N=0,I=null,z=(o&M)!==0&&(it||!dt||g===null),g=(o&(U|B))===0?t:null,H=null,xt(t.ctx),it=!1,st=++Rt,t.ac!==null&&(ue(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Gt;var c=t.fn,v=c(),d=t.deps;if(S!==null){var h;if(jt(t,N),d!==null&&N>0)for(d.length=N+S.length,h=0;h<S.length;h++)d[N+h]=S[h];else t.deps=d=S;if(!z||(o&x)!==0&&t.reactions!==null)for(h=N;h<d.length;h++)(d[h].reactions??=[]).push(t)}else d!==null&&N<d.length&&(jt(t,N),d.length=N);if(Re()&&I!==null&&!it&&d!==null&&(t.f&(x|G|j))===0)for(h=0;h<I.length;h++)Ze(I[h],t);return i!==null&&i!==t&&(Rt++,I!==null&&(r===null?r=I:r.push(...I))),(t.f&Z)!==0&&(t.f^=Z),v}catch($){return Vn($)}finally{t.f^=Gt,S=e,N=n,I=r,g=i,z=s,H=u,xt(a),it=l,st=f}}function pr(t,e){let n=e.reactions;if(n!==null){var r=$n.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(e.f&x)!==0&&(S===null||!S.includes(e))&&(P(e,G),(e.f&(M|St))===0&&(e.f^=St),ke(e),jt(e,0))}function jt(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)pr(t,n[r])}function vt(t){var e=t.f;if((e&J)===0){P(t,O);var n=p,r=dt;p=t,dt=!0;try{(e&gt)!==0?or(t):Ue(t),He(t);var i=Qe(t);t.teardown=typeof i=="function"?i:null,t.wv=Ke;var s;ve&&Fn&&(t.f&j)!==0&&t.deps}finally{dt=r,p=n}}}function T(t){var e=t.f,n=(e&x)!==0;if(g!==null&&!it){var r=p!==null&&(p.f&J)!==0;if(!r&&!H?.includes(t)){var i=g.deps;if((g.f&Gt)!==0)t.rv<Rt&&(t.rv=Rt,S===null&&i!==null&&i[N]===t?N++:S===null?S=[t]:(!z||!S.includes(t))&&S.push(t));else{(g.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[g]:s.includes(g)||s.push(g)}}}else if(n&&t.deps===null&&t.effects===null){var u=t,a=u.parent;a!==null&&(a.f&M)===0&&(u.f^=M)}if(rt){if(W.has(t))return W.get(t);if(n){u=t;var l=u.v;return((u.f&O)===0&&u.reactions!==null||tn(u))&&(l=Qt(u)),W.set(u,l),l}}else n&&(u=t,Dt(u)&&xe(u));if((t.f&Z)!==0)throw t.v;return t.v}function tn(t){if(t.v===y)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(W.has(e)||(e.f&x)!==0&&tn(e))return!0;return!1}const $r=-7169;function P(t,e){t.f=t.f&$r|e}const en=new Set,le=new Set;function gr(t,e,n,r={}){function i(s){if(r.capture||Ot.call(e,s),!s.cancelBubble)return ue(()=>n?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Hn(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function ae(t,e,n,r,i){var s={capture:r,passive:i},u=gr(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&er(()=>{e.removeEventListener(t,u,s)})}function wr(t){for(var e=0;e<t.length;e++)en.add(t[e]);for(var n of le)n(t)}let nn=null;function Ot(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;nn=t;var u=0,a=nn===t&&t.__root;if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var f=i.indexOf(e);if(f===-1)return;l<=f&&(u=l)}if(s=i[u]||t.target,s!==e){lt(t,"currentTarget",{configurable:!0,get(){return s||n}});var o=g,c=p;V(null),K(null);try{for(var v,d=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var $=s["__"+r];if($!=null&&(!s.disabled||t.target===s))if(he($)){var[R,...D]=$;R.apply(s,[t,...D])}else $.call(s,t)}catch(E){v?d.push(E):v=E}if(t.cancelBubble||h===e||h===null)break;s=h}if(v){for(let E of d)queueMicrotask(()=>{throw E});throw v}}finally{t.__root=e,delete t.currentTarget,V(o),K(c)}}}function mr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fe(t,e){var n=p;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function Er(t,e){var n=(e&hn)!==0,r,i=!t.startsWith("<!>");return()=>{if(q)return fe(A,null),A;r===void 0&&(r=mr(i?t:"<!>"+t),r=It(r));var s=n||Fe?document.importNode(r,!0):r.cloneNode(!0);return fe(s,s),s}}function rn(t,e){if(q){p.nodes_end=A,Ee();return}t!==null&&t.before(e)}const yr=["touchstart","touchmove"];function br(t){return yr.includes(t)}function Lt(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??=t.nodeValue)&&(t.__t=n,t.nodeValue=n+"")}function sn(t,e){return un(t,e)}function Tr(t,e){se(),e.intro=e.intro??!1;const n=e.target,r=q,i=A;try{for(var s=It(n);s&&(s.nodeType!==me||s.data!==_n);)s=yt(s);if(!s)throw $t;kt(!0),Q(s),Ee();const u=un(t,{...e,anchor:s});if(A===null||A.nodeType!==me||A.data!==pn)throw zt(),$t;return kt(!1),u}catch(u){if(u instanceof Error&&u.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw u;return u!==$t&&console.warn("Failed to hydrate: ",u),e.recover===!1&&Pn(),se(),Zn(n),kt(!1),sn(t,e)}finally{kt(r),Q(i)}}const ht=new Map;function un(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:u=!0}){se();var a=new Set,l=c=>{for(var v=0;v<c.length;v++){var d=c[v];if(!a.has(d)){a.add(d);var h=br(d);e.addEventListener(d,Ot,{passive:h});var $=ht.get(d);$===void 0?(document.addEventListener(d,Ot,{passive:h}),ht.set(d,1)):ht.set(d,$+1)}}};l(gn(en)),le.add(l);var f=void 0,o=ir(()=>{var c=n??e.appendChild(Mt());return fr(()=>{if(s){be({});var v=L;v.c=s}i&&(r.$$events=i),q&&fe(c,null),f=t(c,r)||{},q&&(p.nodes_end=A),s&&Te()}),()=>{for(var v of a){e.removeEventListener(v,Ot);var d=ht.get(v);--d===0?(document.removeEventListener(v,Ot),ht.delete(v)):ht.set(v,d)}le.delete(l),c!==n&&c.parentNode?.removeChild(c)}});return oe.set(f,o),f}let oe=new WeakMap;function Rr(t,e){const n=oe.get(t);return n?(oe.delete(t),n(e)):Promise.resolve()}function Or(t,e){sr(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=document.createElement("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}function Ar(t,e,n,r){var i=r,s=!0,u=()=>(s&&(s=!1,i=r),i),a;a=t[e],a===void 0&&r!==void 0&&(a=u());var l;l=()=>{var v=t[e];return v===void 0?u():(s=!0,v)};var f=!1,o=Se(()=>(f=!1,l())),c=p;return(function(v,d){if(arguments.length>0){const h=d?T(o):v;return k(o,h),f=!0,i!==void 0&&(i=h),v}return rt&&f||(c.f&J)!==0?o.v:T(o)})}function Sr(t){return new kr(t)}class kr{#e;#t;constructor(e){var n=new Map,r=(s,u)=>{var a=Jn(u,!1,!1);return n.set(s,a),a};const i=new Proxy({...e.props||{},$$events:{}},{get(s,u){return T(n.get(u)??r(u,Reflect.get(s,u)))},has(s,u){return u===On?!0:(T(n.get(u)??r(u,Reflect.get(s,u))),Reflect.has(s,u))},set(s,u,a){return k(n.get(u)??r(u,a),a),Reflect.set(s,u,a)}});this.#t=(e.hydrate?Tr:sn)(e.component,{target:e.target,anchor:e.anchor,props:i,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&Me(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||lt(this,s,{get(){return this.#t[s]},set(u){this.#t[s]=u},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{Rr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,n){this.#e[e]=this.#e[e]||[];const r=(...i)=>n.call(this,...i);return this.#e[e].push(r),()=>{this.#e[e]=this.#e[e].filter(i=>i!==r)}}$destroy(){this.#t.$destroy()}}let ln;typeof HTMLElement=="function"&&(ln=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return i=>{const s=document.createElement("slot");r!=="default"&&(s.name=r),rn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},n=xr(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Ft(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Sr({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=rr(()=>{lr(()=>{this.$$r=!0;for(const r of At(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Ft(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Ft(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return At(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Ft(t,e,n,r){const i=n[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function xr(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function Cr(t,e,n,r,i,s){let u=class extends ln{constructor(){super(t,n,i),this.$$p_d=e}static get observedAttributes(){return At(e).map(a=>(e[a].attribute||a).toLowerCase())}};return At(e).forEach(a=>{lt(u.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=Ft(a,l,e),this.$$d[a]=l;var f=this.$$c;if(f){var o=at(f,a)?.get;o?f[a]=l:f.$set({[a]:l})}}})}),r.forEach(a=>{lt(u.prototype,a,{get(){return this.$$c?.[a]}})}),t.element=u,u}function Nr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _t={},ce,an;function Pr(){if(an)return ce;an=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
3
- `,f="/",o="*",c="",v="comment",d="declaration";ce=function($,R){if(typeof $!="string")throw new TypeError("First argument must be a string");if(!$)return[];R=R||{};var D=1,E=1;function ut(w){var _=w.match(e);_&&(D+=_.length);var F=w.lastIndexOf(l);E=~F?w.length-F:E+w.length}function qt(){var w={line:D,column:E};return function(_){return _.position=new pt(w),Yt(),_}}function pt(w){this.start=w,this.end={line:D,column:E},this.source=R.source}pt.prototype.content=$;function Vt(w){var _=new Error(R.source+":"+D+":"+E+": "+w);if(_.reason=w,_.filename=R.source,_.line=D,_.column=E,_.source=$,!R.silent)throw _}function m(w){var _=w.exec($);if(_){var F=_[0];return ut(F),$=$.slice(F.length),_}}function Yt(){m(n)}function dn(w){var _;for(w=w||[];_=vn();)_!==!1&&w.push(_);return w}function vn(){var w=qt();if(!(f!=$.charAt(0)||o!=$.charAt(1))){for(var _=2;c!=$.charAt(_)&&(o!=$.charAt(_)||f!=$.charAt(_+1));)++_;if(_+=2,c===$.charAt(_-1))return Vt("End of comment missing");var F=$.slice(2,_-2);return E+=2,ut(F),$=$.slice(_),E+=2,w({type:v,comment:F})}}function Lr(){var w=qt(),_=m(r);if(_){if(vn(),!m(i))return Vt("property missing ':'");var F=m(s),qr=w({type:d,property:h(_[0].replace(t,c)),value:F?h(F[0].replace(t,c)):c});return m(u),qr}}function Fr(){var w=[];dn(w);for(var _;_=Lr();)_!==!1&&(w.push(_),dn(w));return w}return Yt(),Fr()};function h($){return $?$.replace(a,c):c}return ce}var fn;function Mr(){if(fn)return _t;fn=1;var t=_t&&_t.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.default=n;var e=t(Pr());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var u=(0,e.default)(r),a=typeof i=="function";return u.forEach(function(l){if(l.type==="declaration"){var f=l.property,o=l.value;a?i(f,o,l):o&&(s=s||{},s[f]=o)}}),s}return _t}var Ir=Mr();const on=Nr(Ir);on.default;var Dr=Er('<div class="container svelte-1roi8v"><video id="video"><track kind="captions"/></video> <div> <button> </button> <button>FH</button> <button> </button> <button> </button></div></div>',2);const jr={hash:"svelte-1roi8v",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}.container.svelte-1roi8v {position:relative;}'};function cn(t,e){be(e,!0),Or(t,jr);function n(m,Yt){e.$$host.dispatchEvent(new CustomEvent(m,{detail:Yt}))}let r=Ar(e,"id",7,""),i,s=C(!1),u=C(!0),a=C(!0),l=C(0);ct({});const f=e.$$host;nr(()=>{});async function o(){try{const m=await navigator.mediaDevices.getUserMedia({video:!0,audio:!0});console.info("access to camera granted"),n("AudioVideoAccess",{granted:!0,id:r()}),i=f.shadowRoot?.querySelector("video"),i.srcObject=m,i.play(),n("VideoInitialized",{videoElement:i,id:r()})}catch(m){throw console.error("error on garantAccessToCamera",m),n("AudioVideoAccess",{granted:!1,id:r()}),new Error("camera access denied")}}o().then(()=>{console.log("camera initialized")}).catch(m=>{console.log("camera access denied",m)});var c={get id(){return r()},set id(m=""){r(m),Me()}},v=Dr(),d=bt(v),h=Tt(d,2),$=bt(h,!0),R=Tt($);R.__click=()=>{T(s)?i.pause():i.play()};var D=bt(R,!0);wt(R);var E=Tt(R,2);E.__click=()=>{i.requestFullscreen()};var ut=Tt(E,2);ut.__click=()=>{i.srcObject.getTracks().filter(m=>m.kind==="video").forEach(m=>{k(u,!m.enabled),m.enabled=T(u)})};var qt=bt(ut);wt(ut);var pt=Tt(ut,2);pt.__click=()=>{i.srcObject.getTracks().filter(m=>m.kind==="audio").forEach(m=>{k(a,!m.enabled),m.enabled=T(a)})};var Vt=bt(pt);return wt(pt),wt(h),wt(v),ar(()=>{Lt($,T(l)),Lt(D,T(s)?"pause":"play"),Lt(qt,`${T(u)?"remove":"add"} video`),Lt(Vt,`${T(a)?"remove":"add"} audio`)}),ae("play",d,()=>{k(s,!0)}),ae("pause",d,()=>{k(s,!1)}),ae("timeupdate",d,()=>{k(l,i.currentTime,!0)}),rn(t,v),Te(c)}wr(["click"]),customElements.define("hb-player-input-streaming",Cr(cn,{id:{}},[],[],!0)),de.Component=cn,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})})(this["player-input-streaming"]=this["player-input-streaming"]||{});
1
+ (function(vt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const pn=2,gn="[",$n="]",$e={},y=Symbol(),ht=!1;var _t=Array.isArray,mn=Array.prototype.indexOf,wn=Array.from,Ae=Object.keys,ue=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,En=Object.prototype,yn=Array.prototype,bn=Object.getPrototypeOf,pt=Object.isExtensible;function gt(e){for(var t=0;t<e.length;t++)e[t]()}function Tn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const k=2,Be=4,He=8,me=16,B=32,H=64,$t=128,D=256,Ne=512,O=1024,j=2048,U=4096,fe=8192,K=16384,Ue=32768,Rn=65536,mt=1<<17,On=1<<18,ce=1<<19,Cn=1<<20,Ge=1<<21,Xe=1<<22,Z=1<<23,ze=Symbol("$state"),An=Symbol("legacy props"),Je=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},wt=3,Et=8;function Nn(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function kn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function xn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ln(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function jn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function In(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ke(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let q=!1;function ke(e){q=e}let C;function Q(e){if(e===null)throw Ke(),$e;return C=e}function yt(){return Q(be(C))}function we(e){if(q){if(be(C)!==null)throw Ke(),$e;C=e}}function bt(e){return e===this.v}function Fn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function qn(e){return!Fn(e,this.v)}let Vn=!1,I=null;function xe(e){I=e}function Tt(e,t=!1,n){I={p:I,c:null,e:null,s:e,x:null,l:null}}function Rt(e){var t=I,n=t.e;if(n!==null){t.e=null;for(var r of n)Wt(r)}return e!==void 0&&(t.x=e),I=t.p,e??{}}function Ot(){return!0}const Yn=new WeakMap;function Wn(e){var t=p;if(t===null)return $.f|=Z,e;if((t.f&Ue)===0){if((t.f&$t)===0)throw!t.parent&&e instanceof Error&&Ct(e),e;t.b.error(e)}else Ze(e,t)}function Ze(e,t){for(;t!==null;){if((t.f&$t)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e instanceof Error&&Ct(e),e}function Ct(e){const t=Yn.get(e);t&&(ue(e,"message",{value:t.message}),ue(e,"stack",{value:t.stack}))}let Ee=[],Qe=[];function At(){var e=Ee;Ee=[],gt(e)}function Bn(){var e=Qe;Qe=[],gt(e)}function Hn(e){Ee.length===0&&queueMicrotask(At),Ee.push(e)}function Un(){Ee.length>0&&At(),Qe.length>0&&Bn()}function Gn(){const e=p.b;return e===null&&Nn(),e}function Nt(e){var t=k|j,n=$!==null&&($.f&k)!==0?$:null;return p===null||n!==null&&(n.f&D)!==0?t|=D:p.f|=ce,{ctx:I,deps:null,effects:null,equals:bt,f:t,fn:e,reactions:null,rv:0,v:y,wv:0,parent:n??p,ac:null}}function Xn(e,t){let n=p;n===null&&kn();var r=n.b,i=void 0,s=rt(y),a=null,l=!$;return ur(()=>{try{var u=e();a&&Promise.resolve(u).catch(()=>{})}catch(v){u=Promise.reject(v)}var o=()=>u;i=a?.then(o,o)??Promise.resolve(u),a=i;var f=b,d=r.is_pending();l&&(r.update_pending_count(1),d||f.increment());const c=(v,h=void 0)=>{a=null,d||f.activate(),h?h!==Je&&(s.f|=Z,it(s,h)):((s.f&Z)!==0&&(s.f^=Z),it(s,v)),l&&(r.update_pending_count(-1),d||f.decrement()),Pt()};if(i.then(c,v=>c(null,v||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(u=>{function o(f){function d(){f===i?u(s):o(i)}f.then(d,d)}o(i)})}function kt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)X(t[n])}}function zn(e){for(var t=e.parent;t!==null;){if((t.f&k)===0)return t;t=t.parent}return null}function et(e){var t,n=p;z(zn(e));try{kt(e),t=en(e)}finally{z(n)}return t}function xt(e){var t=et(e);if(e.equals(t)||(e.v=t,e.wv=Zt()),!re){var n=(J||(e.f&D)!==0)&&e.deps!==null?U:O;S(e,n)}}function Jn(e,t,n){const r=Nt;if(t.length===0){n(e.map(r));return}var i=b,s=p,a=Kn(),l=Gn();Promise.all(t.map(u=>Xn(u))).then(u=>{i?.activate(),a();try{n([...e.map(r),...u])}catch(o){(s.f&K)===0&&Ze(o,s)}i?.deactivate(),Pt()}).catch(u=>{l.error(u)})}function Kn(){var e=p,t=$,n=I,r=b;return function(){z(e),V(t),xe(n),r?.activate()}}function Pt(){z(null),V(null),xe(null)}const tt=new Set;let b=null,St=new Set,Pe=[];function Dt(){const e=Pe.shift();Pe.length>0&&queueMicrotask(Dt),e()}let ee=[],Se=null,nt=!1,De=!1;class te{current=new Map;#t=new Map;#e=new Set;#n=0;#o=null;#f=!1;#i=[];#a=[];#s=[];#r=[];#l=[];#c=[];#d=[];skipped_effects=new Set;process(t){ee=[];for(const i of t)this.#h(i);if(this.#i.length===0&&this.#n===0){this.#v();var n=this.#s,r=this.#r;this.#s=[],this.#r=[],this.#l=[],b=null,jt(n),jt(r),b===null?b=this:tt.delete(this),this.#o?.resolve()}else this.#u(this.#s),this.#u(this.#r),this.#u(this.#l);for(const i of this.#i)he(i);for(const i of this.#a)he(i);this.#i=[],this.#a=[]}#h(t){t.f^=O;for(var n=t.first;n!==null;){var r=n.f,i=(r&(B|H))!==0,s=i&&(r&O)!==0,a=s||(r&fe)!==0||this.skipped_effects.has(n);if(!a&&n.fn!==null){if(i)n.f^=O;else if((r&Be)!==0)this.#r.push(n);else if((r&O)===0)if((r&Xe)!==0){var l=n.b?.is_pending()?this.#a:this.#i;l.push(n)}else je(n)&&((n.f&me)!==0&&this.#l.push(n),he(n));var u=n.first;if(u!==null){n=u;continue}}var o=n.parent;for(n=n.next;n===null&&o!==null;)n=o.next,o=o.parent}}#u(t){for(const n of t)((n.f&j)!==0?this.#c:this.#d).push(n),S(n,O);t.length=0}capture(t,n){this.#t.has(t)||this.#t.set(t,n),this.current.set(t,t.v)}activate(){b=this}deactivate(){b=null;for(const t of St)if(St.delete(t),t(),b!==null)break}neuter(){this.#f=!0}flush(){ee.length>0?Mt():this.#v(),b===this&&(this.#n===0&&tt.delete(this),this.deactivate())}#v(){if(!this.#f)for(const t of this.#e)t();this.#e.clear()}increment(){this.#n+=1}decrement(){if(this.#n-=1,this.#n===0){for(const t of this.#c)S(t,j),ye(t);for(const t of this.#d)S(t,U),ye(t);this.#s=[],this.#r=[],this.flush()}else this.deactivate()}add_callback(t){this.#e.add(t)}settled(){return(this.#o??=Tn()).promise}static ensure(){if(b===null){const t=b=new te;tt.add(b),De||te.enqueue(()=>{b===t&&t.flush()})}return b}static enqueue(t){Pe.length===0&&queueMicrotask(Dt),Pe.unshift(t)}}function Lt(e){var t=De;De=!0;try{for(var n;;){if(Un(),ee.length===0&&(b?.flush(),ee.length===0))return Se=null,n;Mt()}}finally{De=t}}function Mt(){var e=ve;nt=!0;try{var t=0;for(Xt(!0);ee.length>0;){var n=te.ensure();if(t++>1e3){var r,i;Zn()}n.process(ee),G.clear()}}finally{nt=!1,Xt(e),Se=null}}function Zn(){try{Dn()}catch(e){Ze(e,Se)}}let ne=null;function jt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(K|fe))===0&&je(r)&&(ne=[],he(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?Ut(r):r.fn=null),ne?.length>0)){G.clear();for(const i of ne)he(i);ne=[]}}ne=null}}function ye(e){for(var t=Se=e;t.parent!==null;){t=t.parent;var n=t.f;if(nt&&t===p&&(n&me)!==0)return;if((n&(H|B))!==0){if((n&O)===0)return;t.f^=O}}ee.push(t)}const G=new Map;function rt(e,t){var n={f:0,v:e,reactions:null,equals:bt,rv:0,wv:0};return n}function x(e,t){const n=rt(e);return pr(n),n}function Qn(e,t=!1,n=!0){const r=rt(e);return t||(r.equals=qn),r}function N(e,t,n=!1){$!==null&&(!ie||($.f&mt)!==0)&&Ot()&&($.f&(k|me|Xe|mt))!==0&&!W?.includes(e)&&In();let r=n?de(t):t;return it(e,r)}function it(e,t){if(!e.equals(t)){var n=e.v;re?G.set(e,t):G.set(e,n),e.v=t;var r=te.ensure();r.capture(e,n),(e.f&k)!==0&&((e.f&j)!==0&&et(e),S(e,(e.f&D)===0?O:U)),e.wv=Zt(),It(e,j),p!==null&&(p.f&O)!==0&&(p.f&(B|H))===0&&(L===null?gr([e]):L.push(e))}return t}function st(e){N(e,e.v+1)}function It(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],a=s.f,l=(a&j)===0;l&&S(s,t),(a&k)!==0?It(s,U):l&&((a&me)!==0&&ne!==null&&ne.push(s),ye(s))}}function de(e){if(typeof e!="object"||e===null||ze in e)return e;const t=bn(e);if(t!==En&&t!==yn)return e;var n=new Map,r=_t(e),i=x(0),s=se,a=l=>{if(se===s)return l();var u=$,o=se;V(null),Kt(s);var f=l();return V(u),Kt(o),f};return r&&n.set("length",x(e.length)),new Proxy(e,{defineProperty(l,u,o){(!("value"in o)||o.configurable===!1||o.enumerable===!1||o.writable===!1)&&Mn();var f=n.get(u);return f===void 0?f=a(()=>{var d=x(o.value);return n.set(u,d),d}):N(f,o.value,!0),!0},deleteProperty(l,u){var o=n.get(u);if(o===void 0){if(u in l){const f=a(()=>x(y));n.set(u,f),st(i)}}else N(o,y),st(i);return!0},get(l,u,o){if(u===ze)return e;var f=n.get(u),d=u in l;if(f===void 0&&(!d||oe(l,u)?.writable)&&(f=a(()=>{var v=de(d?l[u]:y),h=x(v);return h}),n.set(u,f)),f!==void 0){var c=T(f);return c===y?void 0:c}return Reflect.get(l,u,o)},getOwnPropertyDescriptor(l,u){var o=Reflect.getOwnPropertyDescriptor(l,u);if(o&&"value"in o){var f=n.get(u);f&&(o.value=T(f))}else if(o===void 0){var d=n.get(u),c=d?.v;if(d!==void 0&&c!==y)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return o},has(l,u){if(u===ze)return!0;var o=n.get(u),f=o!==void 0&&o.v!==y||Reflect.has(l,u);if(o!==void 0||p!==null&&(!f||oe(l,u)?.writable)){o===void 0&&(o=a(()=>{var c=f?de(l[u]):y,v=x(c);return v}),n.set(u,o));var d=T(o);if(d===y)return!1}return f},set(l,u,o,f){var d=n.get(u),c=u in l;if(r&&u==="length")for(var v=o;v<d.v;v+=1){var h=n.get(v+"");h!==void 0?N(h,y):v in l&&(h=a(()=>x(y)),n.set(v+"",h))}if(d===void 0)(!c||oe(l,u)?.writable)&&(d=a(()=>x(void 0)),N(d,de(o)),n.set(u,d));else{c=d.v!==y;var g=a(()=>de(o));N(d,g)}var R=Reflect.getOwnPropertyDescriptor(l,u);if(R?.set&&R.set.call(f,o),!c){if(r&&typeof u=="string"){var M=n.get("length"),E=Number(u);Number.isInteger(E)&&E>=M.v&&N(M,E+1)}st(i)}return!0},ownKeys(l){T(i);var u=Reflect.ownKeys(l).filter(d=>{var c=n.get(d);return c===void 0||c.v!==y});for(var[o,f]of n)f.v!==y&&!(o in l)&&u.push(o);return u},setPrototypeOf(){jn()}})}var Ft,qt,Vt,Yt;function at(){if(Ft===void 0){Ft=window,qt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Vt=oe(t,"firstChild").get,Yt=oe(t,"nextSibling").get,pt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),pt(n)&&(n.__t=void 0)}}function Le(e=""){return document.createTextNode(e)}function Me(e){return Vt.call(e)}function be(e){return Yt.call(e)}function Te(e,t){if(!q)return Me(e);var n=Me(C);if(n===null)n=C.appendChild(Le());else if(t&&n.nodeType!==wt){var r=Le();return n?.before(r),Q(r),r}return Q(n),n}function Re(e,t=1,n=!1){let r=q?C:e;for(var i;t--;)i=r,r=be(r);if(!q)return r;if(n&&r?.nodeType!==wt){var s=Le();return r===null?i?.after(s):r.before(s),Q(s),s}return Q(r),r}function er(e){e.textContent=""}function lt(e){var t=$,n=p;V(null),z(null);try{return e()}finally{V(t),z(n)}}function tr(e){p===null&&$===null&&Sn(),$!==null&&($.f&D)!==0&&p===null&&Pn(),re&&xn()}function nr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Y(e,t,n,r=!0){var i=p;i!==null&&(i.f&fe)!==0&&(e|=fe);var s={ctx:I,deps:null,nodes_start:null,nodes_end:null,f:e|j,first:null,fn:t,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{he(s),s.f|=Ue}catch(u){throw X(s),u}else t!==null&&ye(s);if(r){var a=s;if(n&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&ce)===0&&(a=a.first),a!==null&&(a.parent=i,i!==null&&nr(a,i),$!==null&&($.f&k)!==0&&(e&H)===0)){var l=$;(l.effects??=[]).push(a)}}return s}function rr(e){const t=Y(He,null,!1);return S(t,O),t.teardown=e,t}function ir(e){tr();var t=p.f,n=!$&&(t&B)!==0&&(t&Ue)===0;if(n){var r=I;(r.e??=[]).push(e)}else return Wt(e)}function Wt(e){return Y(Be|Cn,e,!1)}function sr(e){te.ensure();const t=Y(H|ce,e,!0);return()=>{X(t)}}function ar(e){te.ensure();const t=Y(H|ce,e,!0);return(n={})=>new Promise(r=>{n.outro?hr(t,()=>{X(t),r(void 0)}):(X(t),r(void 0))})}function lr(e){return Y(Be,e,!1)}function ur(e){return Y(Xe|ce,e,!0)}function or(e,t=0){return Y(He|t,e,!0)}function fr(e,t=[],n=[]){Jn(t,n,r=>{Y(He,()=>e(...r.map(T)),!0)})}function cr(e,t=!0){return Y(B|ce,e,!0,t)}function Bt(e){var t=e.teardown;if(t!==null){const n=re,r=$;zt(!0),V(null);try{t.call(null)}finally{zt(n),V(r)}}}function Ht(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&lt(()=>{i.abort(Je)});var r=n.next;(n.f&H)!==0?n.parent=null:X(n,t),n=r}}function dr(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&B)===0&&X(t),t=n}}function X(e,t=!0){var n=!1;(t||(e.f&On)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(vr(e.nodes_start,e.nodes_end),n=!0),Ht(e,t&&!n),Ie(e,0),S(e,K);var r=e.transitions;if(r!==null)for(const s of r)s.stop();Bt(e);var i=e.parent;i!==null&&i.first!==null&&Ut(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function vr(e,t){for(;e!==null;){var n=e===t?null:be(e);e.remove(),e=n}}function Ut(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function hr(e,t){var n=[];Gt(e,n,!0),_r(n,()=>{X(e),t&&t()})}function _r(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var i of e)i.out(r)}else t()}function Gt(e,t,n){if((e.f&fe)===0){if(e.f^=fe,e.transitions!==null)for(const a of e.transitions)(a.is_global||n)&&t.push(a);for(var r=e.first;r!==null;){var i=r.next,s=(r.f&Rn)!==0||(r.f&B)!==0;Gt(r,t,s?n:!1),r=i}}}let ve=!1;function Xt(e){ve=e}let re=!1;function zt(e){re=e}let $=null,ie=!1;function V(e){$=e}let p=null;function z(e){p=e}let W=null;function pr(e){$!==null&&(W===null?W=[e]:W.push(e))}let A=null,P=0,L=null;function gr(e){L=e}let Jt=1,Oe=0,se=Oe;function Kt(e){se=e}let J=!1;function Zt(){return++Jt}function je(e){var t=e.f;if((t&j)!==0)return!0;if((t&U)!==0){var n=e.deps,r=(t&D)!==0;if(n!==null){var i,s,a=(t&Ne)!==0,l=r&&p!==null&&!J,u=n.length;if((a||l)&&(p===null||(p.f&K)===0)){var o=e,f=o.parent;for(i=0;i<u;i++)s=n[i],(a||!s?.reactions?.includes(o))&&(s.reactions??=[]).push(o);a&&(o.f^=Ne),l&&f!==null&&(f.f&D)===0&&(o.f^=D)}for(i=0;i<u;i++)if(s=n[i],je(s)&&xt(s),s.wv>e.wv)return!0}(!r||p!==null&&!J)&&S(e,O)}return!1}function Qt(e,t,n=!0){var r=e.reactions;if(r!==null&&!W?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];(s.f&k)!==0?Qt(s,t,!1):t===s&&(n?S(s,j):(s.f&O)!==0&&S(s,U),ye(s))}}function en(e){var t=A,n=P,r=L,i=$,s=J,a=W,l=I,u=ie,o=se,f=e.f;A=null,P=0,L=null,J=(f&D)!==0&&(ie||!ve||$===null),$=(f&(B|H))===0?e:null,W=null,xe(e.ctx),ie=!1,se=++Oe,e.ac!==null&&(lt(()=>{e.ac.abort(Je)}),e.ac=null);try{e.f|=Ge;var d=e.fn,c=d(),v=e.deps;if(A!==null){var h;if(Ie(e,P),v!==null&&P>0)for(v.length=P+A.length,h=0;h<A.length;h++)v[P+h]=A[h];else e.deps=v=A;if(!J||(f&k)!==0&&e.reactions!==null)for(h=P;h<v.length;h++)(v[h].reactions??=[]).push(e)}else v!==null&&P<v.length&&(Ie(e,P),v.length=P);if(Ot()&&L!==null&&!ie&&v!==null&&(e.f&(k|U|j))===0)for(h=0;h<L.length;h++)Qt(L[h],e);return i!==null&&i!==e&&(Oe++,L!==null&&(r===null?r=L:r.push(...L))),(e.f&Z)!==0&&(e.f^=Z),c}catch(g){return Wn(g)}finally{e.f^=Ge,A=t,P=n,L=r,$=i,J=s,W=a,xe(l),ie=u,se=o}}function $r(e,t){let n=t.reactions;if(n!==null){var r=mn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}n===null&&(t.f&k)!==0&&(A===null||!A.includes(t))&&(S(t,U),(t.f&(D|Ne))===0&&(t.f^=Ne),kt(t),Ie(t,0))}function Ie(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$r(e,n[r])}function he(e){var t=e.f;if((t&K)===0){S(e,O);var n=p,r=ve;p=e,ve=!0;try{(t&me)!==0?dr(e):Ht(e),Bt(e);var i=en(e);e.teardown=typeof i=="function"?i:null,e.wv=Jt;var s;ht&&Vn&&(e.f&j)!==0&&e.deps}finally{ve=r,p=n}}}function T(e){var t=e.f,n=(t&k)!==0;if($!==null&&!ie){var r=p!==null&&(p.f&K)!==0;if(!r&&!W?.includes(e)){var i=$.deps;if(($.f&Ge)!==0)e.rv<Oe&&(e.rv=Oe,A===null&&i!==null&&i[P]===e?P++:A===null?A=[e]:(!J||!A.includes(e))&&A.push(e));else{($.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[$]:s.includes($)||s.push($)}}}else if(n&&e.deps===null&&e.effects===null){var a=e,l=a.parent;l!==null&&(l.f&D)===0&&(a.f^=D)}if(re){if(G.has(e))return G.get(e);if(n){a=e;var u=a.v;return((a.f&O)===0&&a.reactions!==null||tn(a))&&(u=et(a)),G.set(a,u),u}}else n&&(a=e,je(a)&&xt(a));if((e.f&Z)!==0)throw e.v;return e.v}function tn(e){if(e.v===y)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(G.has(t)||(t.f&k)!==0&&tn(t))return!0;return!1}const mr=-7169;function S(e,t){e.f=e.f&mr|t}const nn=new Set,ut=new Set;function wr(e,t,n,r={}){function i(s){if(r.capture||Ce.call(t,s),!s.cancelBubble)return lt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Hn(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ot(e,t,n,r,i){var s={capture:r,passive:i},a=wr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&rr(()=>{t.removeEventListener(e,a,s)})}function Er(e){for(var t=0;t<e.length;t++)nn.add(e[t]);for(var n of ut)n(e)}let rn=null;function Ce(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;rn=e;var a=0,l=rn===e&&e.__root;if(l){var u=i.indexOf(l);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var o=i.indexOf(t);if(o===-1)return;u<=o&&(a=u)}if(s=i[a]||e.target,s!==t){ue(e,"currentTarget",{configurable:!0,get(){return s||n}});var f=$,d=p;V(null),z(null);try{for(var c,v=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+r];if(g!=null&&(!s.disabled||e.target===s))if(_t(g)){var[R,...M]=g;R.apply(s,[e,...M])}else g.call(s,e)}catch(E){c?v.push(E):c=E}if(e.cancelBubble||h===t||h===null)break;s=h}if(c){for(let E of v)queueMicrotask(()=>{throw E});throw c}}finally{e.__root=t,delete e.currentTarget,V(f),z(d)}}}function yr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ft(e,t){var n=p;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function br(e,t){var n=(t&pn)!==0,r,i=!e.startsWith("<!>");return()=>{if(q)return ft(C,null),C;r===void 0&&(r=yr(i?e:"<!>"+e),r=Me(r));var s=n||qt?document.importNode(r,!0):r.cloneNode(!0);return ft(s,s),s}}function sn(e,t){if(q){p.nodes_end=C,yt();return}e!==null&&e.before(t)}const Tr=["touchstart","touchmove"];function Rr(e){return Tr.includes(e)}function Fe(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function an(e,t){return ln(e,t)}function Or(e,t){at(),t.intro=t.intro??!1;const n=t.target,r=q,i=C;try{for(var s=Me(n);s&&(s.nodeType!==Et||s.data!==gn);)s=be(s);if(!s)throw $e;ke(!0),Q(s),yt();const a=ln(e,{...t,anchor:s});if(C===null||C.nodeType!==Et||C.data!==$n)throw Ke(),$e;return ke(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==$e&&console.warn("Failed to hydrate: ",a),t.recover===!1&&Ln(),at(),er(n),ke(!1),an(e,t)}finally{ke(r),Q(i)}}const _e=new Map;function ln(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0}){at();var l=new Set,u=d=>{for(var c=0;c<d.length;c++){var v=d[c];if(!l.has(v)){l.add(v);var h=Rr(v);t.addEventListener(v,Ce,{passive:h});var g=_e.get(v);g===void 0?(document.addEventListener(v,Ce,{passive:h}),_e.set(v,1)):_e.set(v,g+1)}}};u(wn(nn)),ut.add(u);var o=void 0,f=ar(()=>{var d=n??t.appendChild(Le());return cr(()=>{if(s){Tt({});var c=I;c.c=s}i&&(r.$$events=i),q&&ft(d,null),o=e(d,r)||{},q&&(p.nodes_end=C),s&&Rt()}),()=>{for(var c of l){t.removeEventListener(c,Ce);var v=_e.get(c);--v===0?(document.removeEventListener(c,Ce),_e.delete(c)):_e.set(c,v)}ut.delete(u),d!==n&&d.parentNode?.removeChild(d)}});return ct.set(o,f),o}let ct=new WeakMap;function Cr(e,t){const n=ct.get(e);return n?(ct.delete(e),n(t)):Promise.resolve()}function Ar(e,t){lr(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Nr(e,t,n,r){var i=r,s=!0,a=()=>(s&&(s=!1,i=r),i),l;l=e[t],l===void 0&&r!==void 0&&(l=a());var u;u=()=>{var c=e[t];return c===void 0?a():(s=!0,c)};var o=!1,f=Nt(()=>(o=!1,u())),d=p;return(function(c,v){if(arguments.length>0){const h=v?T(f):c;return N(f,h),o=!0,i!==void 0&&(i=h),c}return re&&o||(d.f&K)!==0?f.v:T(f)})}function kr(e){return new xr(e)}class xr{#t;#e;constructor(t){var n=new Map,r=(s,a)=>{var l=Qn(a,!1,!1);return n.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return T(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===An?!0:(T(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,l){return N(n.get(a)??r(a,l),l),Reflect.set(s,a,l)}});this.#e=(t.hydrate?Or:an)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Lt(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||ue(this,s,{get(){return this.#e[s]},set(a){this.#e[s]=a},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{Cr(this.#e)}}$set(t){this.#e.$set(t)}$on(t,n){this.#t[t]=this.#t[t]||[];const r=(...i)=>n.call(this,...i);return this.#t[t].push(r),()=>{this.#t[t]=this.#t[t].filter(i=>i!==r)}}$destroy(){this.#e.$destroy()}}let un;typeof HTMLElement=="function"&&(un=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=document.createElement("slot");r!=="default"&&(s.name=r),sn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Pr(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=qe(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=kr({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=sr(()=>{or(()=>{this.$$r=!0;for(const r of Ae(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=qe(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=qe(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Ae(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function qe(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Pr(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Sr(e,t,n,r,i,s){let a=class extends un{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Ae(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Ae(t).forEach(l=>{ue(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(u){u=qe(l,u,t),this.$$d[l]=u;var o=this.$$c;if(o){var f=oe(o,l)?.get;f?o[l]=u:o.$set({[l]:u})}}})}),r.forEach(l=>{ue(a.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=a,a}function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pe={},dt,on;function Lr(){if(on)return dt;on=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
3
+ `,o="/",f="*",d="",c="comment",v="declaration";dt=function(g,R){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];R=R||{};var M=1,E=1;function le(m){var _=m.match(t);_&&(M+=_.length);var F=m.lastIndexOf(u);E=~F?m.length-F:E+m.length}function Ve(){var m={line:M,column:E};return function(_){return _.position=new ge(m),We(),_}}function ge(m){this.start=m,this.end={line:M,column:E},this.source=R.source}ge.prototype.content=g;function Ye(m){var _=new Error(R.source+":"+M+":"+E+": "+m);if(_.reason=m,_.filename=R.source,_.line=M,_.column=E,_.source=g,!R.silent)throw _}function w(m){var _=m.exec(g);if(_){var F=_[0];return le(F),g=g.slice(F.length),_}}function We(){w(n)}function hn(m){var _;for(m=m||[];_=_n();)_!==!1&&m.push(_);return m}function _n(){var m=Ve();if(!(o!=g.charAt(0)||f!=g.charAt(1))){for(var _=2;d!=g.charAt(_)&&(f!=g.charAt(_)||o!=g.charAt(_+1));)++_;if(_+=2,d===g.charAt(_-1))return Ye("End of comment missing");var F=g.slice(2,_-2);return E+=2,le(F),g=g.slice(_),E+=2,m({type:c,comment:F})}}function Vr(){var m=Ve(),_=w(r);if(_){if(_n(),!w(i))return Ye("property missing ':'");var F=w(s),Wr=m({type:v,property:h(_[0].replace(e,d)),value:F?h(F[0].replace(e,d)):d});return w(a),Wr}}function Yr(){var m=[];hn(m);for(var _;_=Vr();)_!==!1&&(m.push(_),hn(m));return m}return We(),Yr()};function h(g){return g?g.replace(l,d):d}return dt}var fn;function Mr(){if(fn)return pe;fn=1;var e=pe&&pe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pe,"__esModule",{value:!0}),pe.default=n;var t=e(Lr());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),l=typeof i=="function";return a.forEach(function(u){if(u.type==="declaration"){var o=u.property,f=u.value;l?i(o,f,u):f&&(s=s||{},s[o]=f)}}),s}return pe}var jr=Mr();const cn=Dr(jr);cn.default;var ae={},dn;function Ir(){if(dn)return ae;dn=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.LanguageTranslator=void 0,ae.getChildStyleToPass=e,ae.addComponent=t;function e(r,i){var s,a,l="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((a=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||a===void 0)&&a.length))for(var u=function(c){var v=i?.filter(function(h){return h.name===c&&h.defaultValue!==r[c]});v&&(l+="".concat(c,":").concat(r[c],";"))},o=0,f=Object.keys(r);o<f.length;o++){var d=f[o];u(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return l}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var a=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var l=document.createElement("script");if(l.id=s+"-script",l.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(a),r?.local)l.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var u=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(u+"-",""),"/").concat(a)}document.head.appendChild(l)}catch(o){console.warn(o)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,a){return r.formatDate(i,s,a||this.lang)},r.getDefaultLang=function(){var i,s,a,l,u,o="en";return navigator?.languages&&(!((a=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||a===void 0)&&a.length)&&(o=(u=(l=navigator.languages[0])===null||l===void 0?void 0:l.split("-")[0])===null||u===void 0?void 0:u.toLowerCase()),o},r.getDictionaryWord=function(i,s,a){var l;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(a&&(!((l=s[a])===null||l===void 0)&&l[i]))return s[a][i];var u="",o=r.getDefaultLang();if(!a||o!==a){var f=s?.[o];f?.[i]&&(u=f[i])}return u},r.formatDate=function(i,s,a){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(a||r.getDefaultLang(),s);return l.format(i)},r})();return ae.LanguageTranslator=n,ae}Ir();var Fr=br('<div class="container svelte-1roi8v"><video id="video"><track kind="captions"/></video> <div> <button> </button> <button>FH</button> <button> </button> <button> </button></div></div>',2);const qr={hash:"svelte-1roi8v",code:'@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;}.container.svelte-1roi8v {position:relative;}'};function vn(e,t){Tt(t,!0),Ar(e,qr);function n(w,We){t.$$host.dispatchEvent(new CustomEvent(w,{detail:We}))}let r=Nr(t,"id",7,""),i,s=x(!1),a=x(!0),l=x(!0),u=x(0);de({});const o=t.$$host;ir(()=>{});async function f(){try{const w=await navigator.mediaDevices.getUserMedia({video:!0,audio:!0});console.info("access to camera granted"),n("AudioVideoAccess",{granted:!0,id:r()}),i=o.shadowRoot?.querySelector("video"),i.srcObject=w,i.play(),n("VideoInitialized",{videoElement:i,id:r()})}catch(w){throw console.error("error on garantAccessToCamera",w),n("AudioVideoAccess",{granted:!1,id:r()}),new Error("camera access denied")}}f().then(()=>{console.log("camera initialized")}).catch(w=>{console.log("camera access denied",w)});var d={get id(){return r()},set id(w=""){r(w),Lt()}},c=Fr(),v=Te(c),h=Re(v,2),g=Te(h,!0),R=Re(g);R.__click=()=>{T(s)?i.pause():i.play()};var M=Te(R,!0);we(R);var E=Re(R,2);E.__click=()=>{i.requestFullscreen()};var le=Re(E,2);le.__click=()=>{i.srcObject.getTracks().filter(w=>w.kind==="video").forEach(w=>{N(a,!w.enabled),w.enabled=T(a)})};var Ve=Te(le);we(le);var ge=Re(le,2);ge.__click=()=>{i.srcObject.getTracks().filter(w=>w.kind==="audio").forEach(w=>{N(l,!w.enabled),w.enabled=T(l)})};var Ye=Te(ge);return we(ge),we(h),we(c),fr(()=>{Fe(g,T(u)),Fe(M,T(s)?"pause":"play"),Fe(Ve,`${T(a)?"remove":"add"} video`),Fe(Ye,`${T(l)?"remove":"add"} audio`)}),ot("play",v,()=>{N(s,!0)}),ot("pause",v,()=>{N(s,!1)}),ot("timeupdate",v,()=>{N(u,i.currentTime,!0)}),sn(e,c),Rt(d)}Er(["click"]),customElements.define("hb-player-input-streaming",Sr(vn,{id:{}},[],[],!0)),vt.Component=vn,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})})(this["player-input-streaming"]=this["player-input-streaming"]||{});
4
4
  //# sourceMappingURL=main.iife.js.map