@htmlbricks/hb-player-input-streaming 0.61.51 → 0.61.52

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