@htmlbricks/hb-matrix-video 0.61.58 → 0.62.1

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,5 +1,5 @@
1
- (function(tr){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const lt=1,at=2,rr=4,vn=8,_n=16,pn=1,bn=2,nr="[",ft="[!",St="]",De={},D=Symbol(),gn="http://www.w3.org/1999/xhtml",ir=!1;var sr=Array.isArray,mn=Array.prototype.indexOf,Nt=Array.from,ut=Object.keys,ct=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,wn=Object.getOwnPropertyDescriptors,yn=Object.prototype,$n=Array.prototype,or=Object.getPrototypeOf,lr=Object.isExtensible;function xn(e){for(var t=0;t<e.length;t++)e[t]()}function ar(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const L=2,dt=4,Rt=8,ue=16,ce=32,be=64,ht=128,ee=512,I=1024,Y=2048,de=4096,W=8192,ge=16384,Ot=32768,Ie=65536,fr=1<<17,ur=1<<18,$e=1<<19,En=1<<20,Ke=32768,Mt=1<<21,Dt=1<<22,me=1<<23,Lt=Symbol("$state"),Tn=Symbol("legacy props"),kn=Symbol(""),Pe=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Cn=3,Fe=8;function An(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Sn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Nn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Rn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function On(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Mn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Dn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Pn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function vt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function jn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let E=!1;function te(e){E=e}let x;function re(e){if(e===null)throw vt(),De;return x=e}function _t(){return re(_e(x))}function pt(e){if(E){if(_e(x)!==null)throw vt(),De;x=e}}function cr(e=1){if(E){for(var t=e,r=x;t--;)r=_e(r);x=r}}function bt(e=!0){for(var t=0,r=x;;){if(r.nodeType===Fe){var n=r.data;if(n===St){if(t===0)return r;t-=1}else(n===nr||n===ft)&&(t+=1)}var i=_e(r);e&&r.remove(),r=i}}function dr(e){if(!e||e.nodeType!==Fe)throw vt(),De;return e.data}function hr(e){return e===this.v}function Hn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vr(e){return!Hn(e,this.v)}let qn=!1,V=null;function je(e){V=e}function _r(e,t=!1,r){V={p:V,i:!1,c:null,e:null,s:e,x:null,l:null}}function pr(e){var t=V,r=t.e;if(r!==null){t.e=null;for(var n of r)Ir(n)}return e!==void 0&&(t.x=e),t.i=!0,V=t.p,e??{}}function br(){return!0}let xe=[];function gr(){var e=xe;xe=[],xn(e)}function Xe(e){if(xe.length===0&&!Ze){var t=xe;queueMicrotask(()=>{t===xe&&gr()})}xe.push(e)}function Bn(){for(;xe.length>0;)gr()}function mr(e){var t=w;if(t===null)return m.f|=me,e;if((t.f&Ot)===0){if((t.f&ht)===0)throw e;t.b.error(e)}else He(e,t)}function He(e,t){for(;t!==null;){if((t.f&ht)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const gt=new Set;let N=null,z=null,se=[],mt=null,It=!1,Ze=!1;class ne{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#r=0;#n=0;#a=null;#o=[];#l=[];skipped_effects=new Set;is_fork=!1;process(t){se=[],this.apply();var r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)this.#i(n,r);this.is_fork||this.#f(),this.#n>0||this.is_fork?(this.#s(r.effects),this.#s(r.render_effects),this.#s(r.block_effects)):(N=null,yr(r.render_effects),yr(r.effects),this.#a?.resolve()),z=null}#i(t,r){t.f^=I;for(var n=t.first;n!==null;){var i=n.f,s=(i&(ce|be))!==0,o=s&&(i&I)!==0,l=o||(i&W)!==0||this.skipped_effects.has(n);if((n.f&ht)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[],block_effects:[]}),!l&&n.fn!==null){s?n.f^=I:(i&dt)!==0?r.effects.push(n):rt(n)&&((n.f&ue)!==0&&r.block_effects.push(n),nt(n));var a=n.first;if(a!==null){n=a;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)f===r.effect&&(this.#s(r.effects),this.#s(r.render_effects),this.#s(r.block_effects),r=r.parent),n=f.next,f=f.parent}}#s(t){for(const r of t)((r.f&Y)!==0?this.#o:this.#l).push(r),j(r,I)}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&me)===0&&(this.current.set(t,t.v),z?.set(t,t.v))}activate(){N=this,this.apply()}deactivate(){N=null,z=null}flush(){if(this.activate(),se.length>0){if(wr(),N!==null&&N!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#f(){if(this.#n===0){for(const t of this.#t)t();this.#t.clear()}this.#r===0&&this.#u()}#u(){if(gt.size>1){this.previous.clear();var t=z,r=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of gt){if(i===this){r=!1;continue}const s=[];for(const[l,a]of this.current){if(i.current.has(l))if(r&&a!==i.current.get(l))i.current.set(l,a);else continue;s.push(l)}if(s.length===0)continue;const o=[...i.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){const l=new Set,a=new Map;for(const f of s)$r(f,o,l,a);if(se.length>0){N=i,i.apply();for(const f of se)i.#i(f,n);se=[],i.deactivate()}}}N=null,z=t}this.committed=!0,gt.delete(this)}increment(t){this.#r+=1,t&&(this.#n+=1)}decrement(t){this.#r-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#o)j(t,Y),Ee(t);for(const t of this.#l)j(t,de),Ee(t);this.#o=[],this.#l=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=ar()).promise}static ensure(){if(N===null){const t=N=new ne;gt.add(N),Ze||ne.enqueue(()=>{N===t&&t.flush()})}return N}static enqueue(t){Xe(t)}apply(){}}function Pt(e){var t=Ze;Ze=!0;try{for(var r;;){if(Bn(),se.length===0&&(N?.flush(),se.length===0))return mt=null,r;wr()}}finally{Ze=t}}function wr(){var e=Ae;It=!0;try{var t=0;for(Yr(!0);se.length>0;){var r=ne.ensure();if(t++>1e3){var n,i;Un()}r.process(se),we.clear()}}finally{It=!1,Yr(e),mt=null}}function Un(){try{Mn()}catch(e){He(e,mt)}}let he=null;function yr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(ge|W))===0&&rt(n)&&(he=new Set,nt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?Hr(n):n.fn=null),he?.size>0)){we.clear();for(const i of he){if((i.f&(ge|W))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)he.has(o)&&(he.delete(o),s.push(o)),o=o.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(ge|W))===0&&nt(a)}}he.clear()}}he=null}}function $r(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&L)!==0?$r(i,t,r,n):(s&(Dt|ue))!==0&&(s&Y)===0&&xr(i,t,n)&&(j(i,Y),Ee(i))}}function xr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if((i.f&L)!==0&&xr(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Ee(e){for(var t=mt=e;t.parent!==null;){t=t.parent;var r=t.f;if(It&&t===w&&(r&ue)!==0&&(r&ur)===0)return;if((r&(be|ce))!==0){if((r&I)===0)return;t.f^=I}}se.push(t)}function Yn(e){let t=0,r=Te(0),n;return()=>{xt()&&(p(r),Pr(()=>(t===0&&(n=en(()=>e(()=>Qe(r)))),t+=1,()=>{Xe(()=>{t-=1,t===0&&(n?.(),n=void 0,Qe(r))})})))}}var Wn=Ie|$e|ht;function Vn(e,t,r){new zn(e,t,r)}class zn{parent;#t=!1;#e;#r=E?x:null;#n;#a;#o;#l=null;#i=null;#s=null;#f=null;#u=null;#h=0;#c=0;#v=!1;#d=null;#m=Yn(()=>(this.#d=Te(this.#h),()=>{this.#d=null}));constructor(t,r,n){this.#e=t,this.#n=r,this.#a=n,this.parent=w.b,this.#t=!!this.#n.pending,this.#o=Yt(()=>{if(w.b=this,E){const s=this.#r;_t(),s.nodeType===Fe&&s.data===ft?this.#y():this.#w()}else{var i=this.#b();try{this.#l=J(()=>n(i))}catch(s){this.error(s)}this.#c>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},Wn),E&&(this.#e=x)}#w(){try{this.#l=J(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#y(){const t=this.#n.pending;t&&(this.#i=J(()=>t(this.#e)),ne.enqueue(()=>{var r=this.#b();this.#l=this.#_(()=>(ne.ensure(),J(()=>this.#a(r)))),this.#c>0?this.#p():(Be(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=ve(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#_(t){var r=w,n=m,i=V;K(this.#o),F(this.#o),je(this.#o.ctx);try{return t()}catch(s){return mr(s),null}finally{K(r),F(n),je(i)}}#p(){const t=this.#n.pending;this.#l!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Ur(this.#l,this.#f)),this.#i===null&&(this.#i=J(()=>t(this.#e)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#c+=t,this.#c===0&&(this.#t=!1,this.#i&&Be(this.#i,()=>{this.#i=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#g(t),this.#h+=t,this.#d&&qe(this.#d,this.#h)}get_effect_pending(){return this.#m(),p(this.#d)}error(t){var r=this.#n.onerror;let n=this.#n.failed;if(this.#v||!r&&!n)throw t;this.#l&&(P(this.#l),this.#l=null),this.#i&&(P(this.#i),this.#i=null),this.#s&&(P(this.#s),this.#s=null),E&&(re(this.#r),cr(),re(bt()));var i=!1,s=!1;const o=()=>{if(i){jn();return}i=!0,s&&Fn(),ne.ensure(),this.#h=0,this.#s!==null&&Be(this.#s,()=>{this.#s=null}),this.#t=this.has_pending_snippet(),this.#l=this.#_(()=>(this.#v=!1,J(()=>this.#a(this.#e)))),this.#c>0?this.#p():this.#t=!1};var l=m;try{F(null),s=!0,r?.(t,o),s=!1}catch(a){He(a,this.#o&&this.#o.parent)}finally{F(l)}n&&Xe(()=>{this.#s=this.#_(()=>{ne.ensure(),this.#v=!0;try{return J(()=>{n(this.#e,()=>t,()=>o)})}catch(a){return He(a,this.#o.parent),null}finally{this.#v=!1}})})}}function Gn(e,t,r,n){const i=yt;if(r.length===0&&e.length===0){n(t.map(i));return}var s=N,o=w,l=Jn();function a(){Promise.all(r.map(f=>Kn(f))).then(f=>{l();try{n([...t.map(i),...f])}catch(c){(o.f&ge)===0&&He(c,o)}s?.deactivate(),wt()}).catch(f=>{He(f,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return a()}finally{s?.deactivate(),wt()}}):a()}function Jn(){var e=w,t=m,r=V,n=N;return function(s=!0){K(e),F(t),je(r),s&&n?.activate()}}function wt(){K(null),F(null),je(null)}function yt(e){var t=L|Y,r=m!==null&&(m.f&L)!==0?m:null;return w!==null&&(w.f|=$e),{ctx:V,deps:null,effects:null,equals:hr,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:r??w,ac:null}}function Kn(e,t){let r=w;r===null&&Sn();var n=r.b,i=void 0,s=Te(D),o=!m,l=new Map;return oi(()=>{var a=ar();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).then(()=>{f===N&&f.committed&&f.deactivate(),wt()})}catch(u){a.reject(u),wt()}var f=N;if(o){var c=!n.is_pending();n.update_pending_count(1),f.increment(c),l.get(f)?.reject(Pe),l.delete(f),l.set(f,a)}const h=(u,v=void 0)=>{if(f.activate(),v)v!==Pe&&(s.f|=me,qe(s,v));else{(s.f&me)!==0&&(s.f^=me),qe(s,u);for(const[_,y]of l){if(l.delete(_),_===f)break;y.reject(Pe)}}o&&(n.update_pending_count(-1),f.decrement(c))};a.promise.then(h,u=>h(null,u||"unknown"))}),Dr(()=>{for(const a of l.values())a.reject(Pe)}),new Promise(a=>{function f(c){function h(){c===i?a(s):f(i)}c.then(h,h)}f(i)})}function Xn(e){const t=yt(e);return Vr(t),t}function Zn(e){const t=yt(e);return t.equals=vr,t}function Er(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)P(t[r])}}function Qn(e){for(var t=e.parent;t!==null;){if((t.f&L)===0)return t;t=t.parent}return null}function Ft(e){var t,r=w;K(Qn(e));try{e.f&=~Ke,Er(e),t=Xr(e)}finally{K(r)}return t}function Tr(e){var t=Ft(e);if(e.equals(t)||(e.v=t,e.wv=Jr()),!Se)if(z!==null)xt()&&z.set(e,e.v);else{var r=(e.f&ee)===0?de:I;j(e,r)}}let jt=new Set;const we=new Map;let kr=!1;function Te(e,t){var r={f:0,v:e,reactions:null,equals:hr,rv:0,wv:0};return r}function q(e,t){const r=Te(e);return Vr(r),r}function Cr(e,t=!1,r=!0){const n=Te(e);return t||(n.equals=vr),n}function B(e,t,r=!1){m!==null&&(!le||(m.f&fr)!==0)&&br()&&(m.f&(L|ue|Dt|fr))!==0&&!pe?.includes(e)&&Pn();let n=r?ke(t):t;return qe(e,n)}function qe(e,t){if(!e.equals(t)){var r=e.v;Se?we.set(e,t):we.set(e,r),e.v=t;var n=ne.ensure();n.capture(e,r),(e.f&L)!==0&&((e.f&Y)!==0&&Ft(e),j(e,(e.f&ee)!==0?I:de)),e.wv=Jr(),Ar(e,Y),w!==null&&(w.f&I)!==0&&(w.f&(ce|be))===0&&(X===null?fi([e]):X.push(e)),!n.is_fork&&jt.size>0&&!kr&&ei()}return t}function ei(){kr=!1;const e=Array.from(jt);for(const t of e)(t.f&I)!==0&&j(t,de),rt(t)&&nt(t);jt.clear()}function Qe(e){B(e,e.v+1)}function Ar(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,l=(o&Y)===0;if(l&&j(s,t),(o&L)!==0){var a=s;z?.delete(a),(o&Ke)===0&&(o&ee&&(s.f|=Ke),Ar(a,de))}else l&&((o&ue)!==0&&he!==null&&he.add(s),Ee(s))}}function ke(e){if(typeof e!="object"||e===null||Lt in e)return e;const t=or(e);if(t!==yn&&t!==$n)return e;var r=new Map,n=sr(e),i=q(0),s=Ne,o=l=>{if(Ne===s)return l();var a=m,f=Ne;F(null),Gr(s);var c=l();return F(a),Gr(f),c};return n&&r.set("length",q(e.length)),new Proxy(e,{defineProperty(l,a,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ln();var c=r.get(a);return c===void 0?c=o(()=>{var h=q(f.value);return r.set(a,h),h}):B(c,f.value,!0),!0},deleteProperty(l,a){var f=r.get(a);if(f===void 0){if(a in l){const c=o(()=>q(D));r.set(a,c),Qe(i)}}else B(f,D),Qe(i);return!0},get(l,a,f){if(a===Lt)return e;var c=r.get(a),h=a in l;if(c===void 0&&(!h||Le(l,a)?.writable)&&(c=o(()=>{var v=ke(h?l[a]:D),_=q(v);return _}),r.set(a,c)),c!==void 0){var u=p(c);return u===D?void 0:u}return Reflect.get(l,a,f)},getOwnPropertyDescriptor(l,a){var f=Reflect.getOwnPropertyDescriptor(l,a);if(f&&"value"in f){var c=r.get(a);c&&(f.value=p(c))}else if(f===void 0){var h=r.get(a),u=h?.v;if(h!==void 0&&u!==D)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(l,a){if(a===Lt)return!0;var f=r.get(a),c=f!==void 0&&f.v!==D||Reflect.has(l,a);if(f!==void 0||w!==null&&(!c||Le(l,a)?.writable)){f===void 0&&(f=o(()=>{var u=c?ke(l[a]):D,v=q(u);return v}),r.set(a,f));var h=p(f);if(h===D)return!1}return c},set(l,a,f,c){var h=r.get(a),u=a in l;if(n&&a==="length")for(var v=f;v<h.v;v+=1){var _=r.get(v+"");_!==void 0?B(_,D):v in l&&(_=o(()=>q(D)),r.set(v+"",_))}if(h===void 0)(!u||Le(l,a)?.writable)&&(h=o(()=>q(void 0)),B(h,ke(f)),r.set(a,h));else{u=h.v!==D;var y=o(()=>ke(f));B(h,y)}var g=Reflect.getOwnPropertyDescriptor(l,a);if(g?.set&&g.set.call(c,f),!u){if(n&&typeof a=="string"){var A=r.get("length"),S=Number(a);Number.isInteger(S)&&S>=A.v&&B(A,S+1)}Qe(i)}return!0},ownKeys(l){p(i);var a=Reflect.ownKeys(l).filter(h=>{var u=r.get(h);return u===void 0||u.v!==D});for(var[f,c]of r)c.v!==D&&!(f in l)&&a.push(f);return a},setPrototypeOf(){In()}})}var Ht,Sr,Nr,Rr;function qt(){if(Ht===void 0){Ht=window,Sr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Nr=Le(t,"firstChild").get,Rr=Le(t,"nextSibling").get,lr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),lr(r)&&(r.__t=void 0)}}function ve(e=""){return document.createTextNode(e)}function Ce(e){return Nr.call(e)}function _e(e){return Rr.call(e)}function Bt(e,t){if(!E)return Ce(e);var r=Ce(x);return r===null&&(r=x.appendChild(ve())),re(r),r}function $t(e,t=!1){if(!E){var r=Ce(e);return r instanceof Comment&&r.data===""?_e(r):r}if(t&&x?.nodeType!==Cn){var n=ve();return x?.before(n),re(n),n}return x}function Or(e){e.textContent=""}function Mr(){return!1}function Ut(e){var t=m,r=w;F(null),K(null);try{return e()}finally{F(t),K(r)}}function ti(e){w===null&&(m===null&&On(),Rn()),Se&&Nn()}function ri(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function oe(e,t,r,n=!0){var i=w;i!==null&&(i.f&W)!==0&&(e|=W);var s={ctx:V,deps:null,nodes_start:null,nodes_end:null,f:e|Y|ee,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(r)try{nt(s),s.f|=Ot}catch(a){throw P(s),a}else t!==null&&Ee(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&$e)===0&&(o=o.first,(e&ue)!==0&&(e&Ie)!==0&&o!==null&&(o.f|=Ie)),o!==null&&(o.parent=i,i!==null&&ri(o,i),m!==null&&(m.f&L)!==0&&(e&be)===0)){var l=m;(l.effects??=[]).push(o)}}return s}function xt(){return m!==null&&!le}function Dr(e){const t=oe(Rt,null,!1);return j(t,I),t.teardown=e,t}function Lr(e){ti();var t=w.f,r=!m&&(t&ce)!==0&&(t&Ot)===0;if(r){var n=V;(n.e??=[]).push(e)}else return Ir(e)}function Ir(e){return oe(dt|En,e,!1)}function ni(e){ne.ensure();const t=oe(be|$e,e,!0);return()=>{P(t)}}function ii(e){ne.ensure();const t=oe(be|$e,e,!0);return(r={})=>new Promise(n=>{r.outro?Be(t,()=>{P(t),n(void 0)}):(P(t),n(void 0))})}function si(e){return oe(dt,e,!1)}function oi(e){return oe(Dt|$e,e,!0)}function Pr(e,t=0){return oe(Rt|t,e,!0)}function et(e,t=[],r=[],n=[],i=!1){Gn(n,t,r,s=>{oe(i?dt:Rt,()=>e(...s.map(p)),!0)})}function Yt(e,t=0){var r=oe(ue|t,e,!0);return r}function J(e,t=!0){return oe(ce|$e,e,!0,t)}function Fr(e){var t=e.teardown;if(t!==null){const r=Se,n=m;Wr(!0),F(null);try{t.call(null)}finally{Wr(r),F(n)}}}function jr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Ut(()=>{i.abort(Pe)});var n=r.next;(r.f&be)!==0?r.parent=null:P(r,t),r=n}}function li(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ce)===0&&P(t),t=r}}function P(e,t=!0){var r=!1;(t||(e.f&ur)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ai(e.nodes_start,e.nodes_end),r=!0),jr(e,t&&!r),Et(e,0),j(e,ge);var n=e.transitions;if(n!==null)for(const s of n)s.stop();Fr(e);var i=e.parent;i!==null&&i.first!==null&&Hr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function ai(e,t){for(;e!==null;){var r=e===t?null:_e(e);e.remove(),e=r}}function Hr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Be(e,t,r=!0){var n=[];Wt(e,n,!0),qr(n,()=>{r&&P(e),t&&t()})}function qr(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Wt(e,t,r){if((e.f&W)===0){if(e.f^=W,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Ie)!==0||(n.f&ce)!==0&&(e.f&ue)!==0;Wt(n,t,s?r:!1),n=i}}}function Vt(e){Br(e,!0)}function Br(e,t){if((e.f&W)!==0){e.f^=W,(e.f&I)===0&&(j(e,Y),Ee(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&Ie)!==0||(r.f&ce)!==0;Br(r,i?t:!1),r=n}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}function Ur(e,t){for(var r=e.nodes_start,n=e.nodes_end;r!==null;){var i=r===n?null:_e(r);t.append(r),r=i}}let Ae=!1;function Yr(e){Ae=e}let Se=!1;function Wr(e){Se=e}let m=null,le=!1;function F(e){m=e}let w=null;function K(e){w=e}let pe=null;function Vr(e){m!==null&&(pe===null?pe=[e]:pe.push(e))}let U=null,G=0,X=null;function fi(e){X=e}let zr=1,tt=0,Ne=tt;function Gr(e){Ne=e}function Jr(){return++zr}function rt(e){var t=e.f;if((t&Y)!==0)return!0;if(t&L&&(e.f&=~Ke),(t&de)!==0){var r=e.deps;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i];if(rt(s)&&Tr(s),s.wv>e.wv)return!0}(t&ee)!==0&&z===null&&j(e,I)}return!1}function Kr(e,t,r=!0){var n=e.reactions;if(n!==null&&!pe?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&L)!==0?Kr(s,t,!1):t===s&&(r?j(s,Y):(s.f&I)!==0&&j(s,de),Ee(s))}}function Xr(e){var t=U,r=G,n=X,i=m,s=pe,o=V,l=le,a=Ne,f=e.f;U=null,G=0,X=null,m=(f&(ce|be))===0?e:null,pe=null,je(e.ctx),le=!1,Ne=++tt,e.ac!==null&&(Ut(()=>{e.ac.abort(Pe)}),e.ac=null);try{e.f|=Mt;var c=e.fn,h=c(),u=e.deps;if(U!==null){var v;if(Et(e,G),u!==null&&G>0)for(u.length=G+U.length,v=0;v<U.length;v++)u[G+v]=U[v];else e.deps=u=U;if(Ae&&xt()&&(e.f&ee)!==0)for(v=G;v<u.length;v++)(u[v].reactions??=[]).push(e)}else u!==null&&G<u.length&&(Et(e,G),u.length=G);if(br()&&X!==null&&!le&&u!==null&&(e.f&(L|de|Y))===0)for(v=0;v<X.length;v++)Kr(X[v],e);return i!==null&&i!==e&&(tt++,X!==null&&(n===null?n=X:n.push(...X))),(e.f&me)!==0&&(e.f^=me),h}catch(_){return mr(_)}finally{e.f^=Mt,U=t,G=r,X=n,m=i,pe=s,je(o),le=l,Ne=a}}function ui(e,t){let r=t.reactions;if(r!==null){var n=mn.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&L)!==0&&(U===null||!U.includes(t))&&(j(t,de),(t.f&ee)!==0&&(t.f^=ee,t.f&=~Ke),Er(t),Et(t,0))}function Et(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)ui(e,r[n])}function nt(e){var t=e.f;if((t&ge)===0){j(e,I);var r=w,n=Ae;w=e,Ae=!0;try{(t&ue)!==0?li(e):jr(e),Fr(e);var i=Xr(e);e.teardown=typeof i=="function"?i:null,e.wv=zr;var s;ir&&qn&&(e.f&Y)!==0&&e.deps}finally{Ae=n,w=r}}}function p(e){var t=e.f,r=(t&L)!==0;if(m!==null&&!le){var n=w!==null&&(w.f&ge)!==0;if(!n&&!pe?.includes(e)){var i=m.deps;if((m.f&Mt)!==0)e.rv<tt&&(e.rv=tt,U===null&&i!==null&&i[G]===e?G++:U===null?U=[e]:U.includes(e)||U.push(e));else{(m.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[m]:s.includes(m)||s.push(m)}}}if(Se){if(we.has(e))return we.get(e);if(r){var o=e,l=o.v;return((o.f&I)===0&&o.reactions!==null||Qr(o))&&(l=Ft(o)),we.set(o,l),l}}else if(r){if(o=e,z?.has(o))return z.get(o);rt(o)&&Tr(o),Ae&&xt()&&(o.f&ee)===0&&Zr(o)}else if(z?.has(e))return z.get(e);if((e.f&me)!==0)throw e.v;return e.v}function Zr(e){if(e.deps!==null){e.f^=ee;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&L)!==0&&(t.f&ee)===0&&Zr(t)}}function Qr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(we.has(t)||(t.f&L)!==0&&Qr(t))return!0;return!1}function en(e){var t=le;try{return le=!0,e()}finally{le=t}}const ci=-7169;function j(e,t){e.f=e.f&ci|t}const di=new Set,tn=new Set;function hi(e){if(!E)return;e.removeAttribute("onload"),e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function vi(e,t,r,n={}){function i(s){if(n.capture||it.call(t,s),!s.cancelBubble)return Ut(()=>r?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Xe(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Tt(e,t,r,n,i){var s={capture:n,passive:i},o=vi(e,t,r,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Dr(()=>{t.removeEventListener(e,o,s)})}let rn=null;function it(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;rn=e;var o=0,l=rn===e&&e.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;a<=f&&(o=a)}if(s=i[o]||e.target,s!==t){ct(e,"currentTarget",{configurable:!0,get(){return s||r}});var c=m,h=w;F(null),K(null);try{for(var u,v=[];s!==null;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var y=s["__"+n];y!=null&&(!s.disabled||e.target===s)&&y.call(s,e)}catch(g){u?v.push(g):u=g}if(e.cancelBubble||_===t||_===null)break;s=_}if(u){for(let g of v)queueMicrotask(()=>{throw g});throw u}}finally{e.__root=t,delete e.currentTarget,F(c),K(h)}}}function _i(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ue(e,t){var r=w;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Re(e,t){var r=(t&pn)!==0,n=(t&bn)!==0,i,s=!e.startsWith("<!>");return()=>{if(E)return Ue(x,null),x;i===void 0&&(i=_i(s?e:"<!>"+e),r||(i=Ce(i)));var o=n||Sr?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=Ce(o),a=o.lastChild;Ue(l,a)}else Ue(o,o);return o}}function kt(){if(E)return Ue(x,null),x;var e=document.createDocumentFragment(),t=document.createComment(""),r=ve();return e.append(t,r),Ue(t,r),e}function Z(e,t){if(E){w.nodes_end=x,_t();return}e!==null&&e.before(t)}const pi=["touchstart","touchmove"];function bi(e){return pi.includes(e)}function nn(e,t){return sn(e,t)}function gi(e,t){qt(),t.intro=t.intro??!1;const r=t.target,n=E,i=x;try{for(var s=Ce(r);s&&(s.nodeType!==Fe||s.data!==nr);)s=_e(s);if(!s)throw De;te(!0),re(s);const o=sn(e,{...t,anchor:s});return te(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==De&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Dn(),qt(),Or(r),te(!1),nn(e,t)}finally{te(n),re(i)}}const Ye=new Map;function sn(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0}){qt();var l=new Set,a=h=>{for(var u=0;u<h.length;u++){var v=h[u];if(!l.has(v)){l.add(v);var _=bi(v);t.addEventListener(v,it,{passive:_});var y=Ye.get(v);y===void 0?(document.addEventListener(v,it,{passive:_}),Ye.set(v,1)):Ye.set(v,y+1)}}};a(Nt(di)),tn.add(a);var f=void 0,c=ii(()=>{var h=r??t.appendChild(ve());return Vn(h,{pending:()=>{}},u=>{if(s){_r({});var v=V;v.c=s}if(i&&(n.$$events=i),E&&Ue(u,null),f=e(u,n)||{},E&&(w.nodes_end=x,x===null||x.nodeType!==Fe||x.data!==St))throw vt(),De;s&&pr()}),()=>{for(var u of l){t.removeEventListener(u,it);var v=Ye.get(u);--v===0?(document.removeEventListener(u,it),Ye.delete(u)):Ye.set(u,v)}tn.delete(a),h!==r&&h.parentNode?.removeChild(h)}});return zt.set(f,c),f}let zt=new WeakMap;function mi(e,t){const r=zt.get(e);return r?(zt.delete(e),r(t)):Promise.resolve()}class wi{anchor;#t=new Map;#e=new Map;#r=new Map;#n=!0;constructor(t,r=!0){this.anchor=t,this.#n=r}#a=()=>{var t=N;if(this.#t.has(t)){var r=this.#t.get(t),n=this.#e.get(r);if(n)Vt(n);else{var i=this.#r.get(r);i&&(this.#e.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,o]of this.#t){if(this.#t.delete(s),s===t)break;const l=this.#r.get(o);l&&(P(l.effect),this.#r.delete(o))}for(const[s,o]of this.#e){if(s===r)continue;const l=()=>{if(Array.from(this.#t.values()).includes(s)){var f=document.createDocumentFragment();Ur(o,f),f.append(ve()),this.#r.set(s,{effect:o,fragment:f})}else P(o);this.#e.delete(s)};this.#n||!n?Be(o,l,!1):l()}}};#o=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[n,i]of this.#r)r.includes(n)||(P(i.effect),this.#r.delete(n))};ensure(t,r){var n=N,i=Mr();if(r&&!this.#e.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),o=ve();s.append(o),this.#r.set(t,{effect:J(()=>r(o)),fragment:s})}else this.#e.set(t,J(()=>r(this.anchor)));if(this.#t.set(n,t),i){for(const[l,a]of this.#e)l===t?n.skipped_effects.delete(a):n.skipped_effects.add(a);for(const[l,a]of this.#r)l===t?n.skipped_effects.delete(a.effect):n.skipped_effects.add(a.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=x),this.#a()}}function yi(e){V===null&&An(),Lr(()=>{const t=en(e);if(typeof t=="function")return t})}function st(e,t,r=!1){E&&_t();var n=new wi(e),i=r?Ie:0;function s(o,l){if(E){const f=dr(e)===ft;if(o===f){var a=bt();re(a),n.anchor=a,te(!1),n.ensure(o,l),te(!0);return}}n.ensure(o,l)}Yt(()=>{var o=!1;t((l,a=!0)=>{o=!0,s(a,l)}),o||s(!1,null)},i)}function $i(e,t,r){for(var n=e.items,i=[],s=t.length,o=0;o<s;o++)Wt(t[o].e,i,!0);var l=s>0&&i.length===0&&r!==null;if(l){var a=r.parentNode;Or(a),a.append(r),n.clear(),ae(e,t[0].prev,t[s-1].next)}qr(i,()=>{for(var f=0;f<s;f++){var c=t[f];l||(n.delete(c.k),ae(e,c.prev,c.next)),P(c.e,!l)}})}function on(e,t,r,n,i,s=null){var o=e,l={flags:t,items:new Map,first:null},a=(t&rr)!==0;if(a){var f=e;o=E?re(Ce(f)):f.appendChild(ve())}E&&_t();var c=null,h=!1,u=new Map,v=Zn(()=>{var A=r();return sr(A)?A:A==null?[]:Nt(A)}),_,y;function g(){xi(y,_,l,u,o,i,t,n,r),s!==null&&(_.length===0?c?Vt(c):c=J(()=>s(o)):c!==null&&Be(c,()=>{c=null}))}Yt(()=>{y??=w,_=p(v);var A=_.length;if(h&&A===0)return;h=A===0;let S=!1;if(E){var Q=dr(o)===ft;Q!==(A===0)&&(o=bt(),re(o),te(!1),S=!0)}if(E){for(var ie=null,R,d=0;d<A;d++){if(x.nodeType===Fe&&x.data===St){o=x,S=!0,te(!1);break}var b=_[d],T=n(b,d);R=Gt(x,l,ie,null,b,T,d,i,t,r),l.items.set(T,R),ie=R}A>0&&re(bt())}if(E)A===0&&s&&(c=J(()=>s(o)));else if(Mr()){var O=new Set,M=N;for(d=0;d<A;d+=1){b=_[d],T=n(b,d);var $=l.items.get(T)??u.get(T);$?(t&(lt|at))!==0&&ln($,b,d,t):(R=Gt(null,l,null,null,b,T,d,i,t,r,!0),u.set(T,R)),O.add(T)}for(const[C,k]of l.items)O.has(C)||M.skipped_effects.add(k.e);M.oncommit(g)}else g();S&&te(!0),p(v)}),E&&(o=x)}function xi(e,t,r,n,i,s,o,l,a){var f=(o&vn)!==0,c=(o&(lt|at))!==0,h=t.length,u=r.items,v=r.first,_=v,y,g=null,A,S=[],Q=[],ie,R,d,b;if(f)for(b=0;b<h;b+=1)ie=t[b],R=l(ie,b),d=u.get(R),d!==void 0&&(d.a?.measure(),(A??=new Set).add(d));for(b=0;b<h;b+=1){if(ie=t[b],R=l(ie,b),d=u.get(R),d===void 0){var T=n.get(R);if(T!==void 0){n.delete(R),u.set(R,T);var O=g?g.next:_;ae(r,g,T),ae(r,T,O),Jt(T,O,i),g=T}else{var M=_?_.e.nodes_start:i;g=Gt(M,r,g,g===null?r.first:g.next,ie,R,b,s,o,a)}u.set(R,g),S=[],Q=[],_=g.next;continue}if(c&&ln(d,ie,b,o),(d.e.f&W)!==0&&(Vt(d.e),f&&(d.a?.unfix(),(A??=new Set).delete(d))),d!==_){if(y!==void 0&&y.has(d)){if(S.length<Q.length){var $=Q[0],C;g=$.prev;var k=S[0],H=S[S.length-1];for(C=0;C<S.length;C+=1)Jt(S[C],$,i);for(C=0;C<Q.length;C+=1)y.delete(Q[C]);ae(r,k.prev,H.next),ae(r,g,k),ae(r,H,$),_=$,g=H,b-=1,S=[],Q=[]}else y.delete(d),Jt(d,_,i),ae(r,d.prev,d.next),ae(r,d,g===null?r.first:g.next),ae(r,g,d),g=d;continue}for(S=[],Q=[];_!==null&&_.k!==R;)(_.e.f&W)===0&&(y??=new Set).add(_),Q.push(_),_=_.next;if(_===null)continue;d=_}S.push(d),g=d,_=d.next}if(_!==null||y!==void 0){for(var Me=y===void 0?[]:Nt(y);_!==null;)(_.e.f&W)===0&&Me.push(_),_=_.next;var ot=Me.length;if(ot>0){var Xt=(o&rr)!==0&&h===0?i:null;if(f){for(b=0;b<ot;b+=1)Me[b].a?.measure();for(b=0;b<ot;b+=1)Me[b].a?.fix()}$i(r,Me,Xt)}}f&&Xe(()=>{if(A!==void 0)for(d of A)d.a?.apply()}),e.first=r.first&&r.first.e,e.last=g&&g.e;for(var fe of n.values())P(fe.e);n.clear()}function ln(e,t,r,n){(n&lt)!==0&&qe(e.v,t),(n&at)!==0?qe(e.i,r):e.i=r}function Gt(e,t,r,n,i,s,o,l,a,f,c){var h=(a&lt)!==0,u=(a&_n)===0,v=h?u?Cr(i,!1,!1):Te(i):i,_=(a&at)===0?o:Te(o),y={i:_,v,k:s,a:null,e:null,prev:r,next:n};try{if(e===null){var g=document.createDocumentFragment();g.append(e=ve())}return y.e=J(()=>l(e,v,_,f),E),y.e.prev=r&&r.e,y.e.next=n&&n.e,r===null?c||(t.first=y):(r.next=y,r.e.next=y.e),n!==null&&(n.prev=y,n.e.prev=y.e),y}finally{}}function Jt(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,s=e.e.nodes_start;s!==null&&s!==n;){var o=_e(s);i.before(s),s=o}}function ae(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function Ei(e,t){si(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}const Ti=Symbol("is custom element"),ki=Symbol("is html");function We(e,t,r,n){var i=Ci(e);E&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[kn]=r),r==null?e.removeAttribute(t):typeof r!="string"&&an(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Ct(e,t,r){var n=m,i=w;let s=E;E&&te(!1),F(null),K(null);try{t!=="style"&&(Kt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?an(e).includes(t):r&&typeof r=="object")?e[t]=r:We(e,t,r==null?r:String(r))}finally{F(n),K(i),s&&te(!0)}}function Ci(e){return e.__attributes??={[Ti]:e.nodeName.includes("-"),[ki]:e.namespaceURI===gn}}var Kt=new Map;function an(e){var t=e.getAttribute("is")||e.nodeName,r=Kt.get(t);if(r)return r;Kt.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=wn(i);for(var o in n)n[o].set&&r.push(o);i=or(i)}return r}function fn(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),l;l=e[t],l===void 0&&n!==void 0&&(l=o());var a;a=()=>{var u=e[t];return u===void 0?o():(s=!0,u)};var f=!1,c=yt(()=>(f=!1,a())),h=w;return(function(u,v){if(arguments.length>0){const _=v?p(c):u;return B(c,_),f=!0,i!==void 0&&(i=_),u}return Se&&f||(h.f&ge)!==0?c.v:p(c)})}function Ai(e){return new Si(e)}class Si{#t;#e;constructor(t){var r=new Map,n=(s,o)=>{var l=Cr(o,!1,!1);return r.set(s,l),l};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return p(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===Tn?!0:(p(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,l){return B(r.get(o)??n(o,l),l),Reflect.set(s,o,l)}});this.#e=(t.hydrate?gi:nn)(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)&&Pt(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||ct(this,s,{get(){return this.#e[s]},set(o){this.#e[s]=o},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{mi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$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,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),Z(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=Ni(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=At(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Ai({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ni(()=>{Pr(()=>{this.$$r=!0;for(const n of ut(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=At(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=At(e,r,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 ut(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function At(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 Ni(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Ri(e,t,r,n,i,s){let o=class extends un{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return ut(t).map(l=>(t[l].attribute||l).toLowerCase())}};return ut(t).forEach(l=>{ct(o.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(a){a=At(l,a,t),this.$$d[l]=a;var f=this.$$c;if(f){var c=Le(f,l)?.get;c?f[l]=a:f.$set({[l]:a})}}})}),n.forEach(l=>{ct(o.prototype,l,{get(){return this.$$c?.[l]}})}),e.element=o,o}const Oi={version:"0.61.58"};function Mi(e,t=100,r={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");if(typeof r=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");const{immediate:n}=r;let i,s,o,l,a;function f(){const u=i,v=s;return i=void 0,s=void 0,a=e.apply(u,v),a}function c(){const u=Date.now()-l;u<t&&u>=0?o=setTimeout(c,t-u):(o=void 0,n||(a=f()))}const h=function(...u){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,s=u,l=Date.now();const v=n&&!o;if(o||(o=setTimeout(c,t)),v)return a=f(),a};return Object.defineProperty(h,"isPending",{get(){return o!==void 0}}),h.clear=()=>{o&&(clearTimeout(o),o=void 0,i=void 0,s=void 0)},h.flush=()=>{o&&h.trigger()},h.trigger=()=>{a=f(),h.clear()},h}var Oe={},cn;function Di(){if(cn)return Oe;cn=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.LanguageTranslator=void 0,Oe.getChildStyleToPass=e,Oe.addComponent=t;function e(n,i){var s,o,l="";try{if(n&&i?.length&&(!((s=Object.keys(n))===null||s===void 0)&&s.length)&&(!((o=i?.filter(function(u){return Object.keys(n).includes(u.name)}))===null||o===void 0)&&o.length))for(var a=function(u){var v=i?.filter(function(_){return _.name===u&&_.defaultValue!==n[u]});v&&(l+="".concat(u,":").concat(n[u],";"))},f=0,c=Object.keys(n);f<c.length;f++){var h=c[f];a(h)}}catch(u){console.error("error getting child style to pass",u)}finally{return l}}function t(n){var i,s=((i=n?.repoName.split("/"))===null||i===void 0?void 0:i[1])||n?.repoName;if(!s)throw new Error("wrong componentPath "+n?.repoName);if(!n?.version)throw new Error("wrong version "+n?.version);var o=n?.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(n.repoName,"@").concat(n.version,"/").concat(o),n?.local)l.src="".concat(n.local);else if(location.href.includes("localhost:6006")){var a=s.split("-")[0];l.src="http://localhost:6006/webcomponents/".concat(s.replace(a+"-",""),"/").concat(o)}document.head.appendChild(l)}catch(f){console.warn(f)}}var r=(function(){function n(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return n.prototype.setLang=function(i){i||(i=n.getDefaultLang()),this.lang=i},n.prototype.translateWord=function(i,s){return n.getDictionaryWord(i,this.dictionary,s||this.lang)},n.prototype.translateDate=function(i,s,o){return n.formatDate(i,s,o||this.lang)},n.getDefaultLang=function(){var i,s,o,l="en";return navigator?.languages&&(!((o=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||o===void 0)&&o.length)&&(l=navigator.languages[0].split("-")[0].toLowerCase()),l},n.getDictionaryWord=function(i,s,o){var l;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(o&&(!((l=s[o])===null||l===void 0)&&l[i]))return s[o][i];var a="",f=n.getDefaultLang();if(!o||f!==o){var c=s?.[f];c?.[i]&&(a=c[i])}return a},n.formatDate=function(i,s,o){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var l=new Intl.DateTimeFormat(o||n.getDefaultLang(),s);return l.format(i)},n})();return Oe.LanguageTranslator=r,Oe}var Li=Di(),Ii=Re('<iframe class="svelte-1f6x0x7"></iframe>'),Pi=Re("<hb-player-live></hb-player-live>",2),Fi=Re("<hb-player-live-camera-ptz></hb-player-live-camera-ptz>",2),ji=Re('<video controls><source type="video/mp4"/> <track kind="captions" src="" srclang="en" label="English"/> Your browser does not support the video tag.</video>',2),Hi=Re('<div class="col svelte-1f6x0x7" style="padding-right:0px;padding-left:0px;--bs-gutter-x: 0px;"><!></div>'),qi=Re('<div class="row svelte-1f6x0x7"></div>'),Bi=Re('<div id="matrix" class="svelte-1f6x0x7"><!></div>');const Ui={hash:"svelte-1f6x0x7",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;width:100%;display:block;background-color:black;}#matrix.svelte-1f6x0x7 {display:grid;gap:5px;
1
+ (function(er){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const tr=1,rr=2,nr=4,dn=8,hn=16,vn=1,_n=2,ir="[",st="[!",At="]",De={},D=Symbol(),pn="http://www.w3.org/1999/xhtml",St=!1;var sr=Array.isArray,bn=Array.prototype.indexOf,Nt=Array.from,ot=Object.keys,lt=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,gn=Object.getOwnPropertyDescriptors,mn=Object.prototype,wn=Array.prototype,or=Object.getPrototypeOf,lr=Object.isExtensible;function yn(e){for(var t=0;t<e.length;t++)e[t]()}function ar(){var e,t,r=new Promise((n,s)=>{e=n,t=s});return{promise:r,resolve:e,reject:t}}const M=2,Rt=4,Ot=8,fe=16,ue=32,pe=64,at=128,ee=512,L=1024,U=2048,ce=4096,Y=8192,de=16384,ft=32768,Ie=65536,fr=1<<17,ur=1<<18,xe=1<<19,$n=1<<20,Ee=32768,Mt=1<<21,Dt=1<<22,be=1<<23,Lt=Symbol("$state"),xn=Symbol("legacy props"),En=Symbol(""),Pe=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},kn=3,Fe=8;function Tn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function On(){throw new Error("https://svelte.dev/e/hydration_failed")}function Mn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ln(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function In(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ut(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Pn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let $=!1;function te(e){$=e}let y;function re(e){if(e===null)throw ut(),De;return y=e}function ct(){return re(ve(y))}function dt(e){if($){if(ve(y)!==null)throw ut(),De;y=e}}function cr(e=1){if($){for(var t=e,r=y;t--;)r=ve(r);y=r}}function ht(e=!0){for(var t=0,r=y;;){if(r.nodeType===Fe){var n=r.data;if(n===At){if(t===0)return r;t-=1}else(n===ir||n===st)&&(t+=1)}var s=ve(r);e&&r.remove(),r=s}}function dr(e){if(!e||e.nodeType!==Fe)throw ut(),De;return e.data}function hr(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 vr(e){return!Fn(e,this.v)}let jn=!1,W=null;function je(e){W=e}function _r(e,t=!1,r){W={p:W,i:!1,c:null,e:null,s:e,x:null,l:null}}function pr(e){var t=W,r=t.e;if(r!==null){t.e=null;for(var n of r)Pr(n)}return e!==void 0&&(t.x=e),t.i=!0,W=t.p,e??{}}function br(){return!0}let ke=[];function gr(){var e=ke;ke=[],yn(e)}function Ke(e){if(ke.length===0&&!Xe){var t=ke;queueMicrotask(()=>{t===ke&&gr()})}ke.push(e)}function Hn(){for(;ke.length>0;)gr()}function mr(e){var t=g;if(t===null)return b.f|=be,e;if((t.f&ft)===0){if((t.f&at)===0)throw e;t.b.error(e)}else He(e,t)}function He(e,t){for(;t!==null;){if((t.f&at)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const vt=new Set;let A=null,G=null,J=[],_t=null,It=!1,Xe=!1;class ne{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#r=0;#n=0;#a=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(t){J=[],this.apply();var r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)this.#o(n,r);this.is_fork||this.#u(),this.is_deferred()?(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects)):(A=null,yr(r.render_effects),yr(r.effects),this.#a?.resolve()),G=null}#o(t,r){t.f^=L;for(var n=t.first;n!==null;){var s=n.f,i=(s&(ue|pe))!==0,o=i&&(s&L)!==0,a=o||(s&Y)!==0||this.skipped_effects.has(n);if((n.f&at)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[],block_effects:[]}),!a&&n.fn!==null){i?n.f^=L:(s&Rt)!==0?r.effects.push(n):tt(n)&&((n.f&fe)!==0&&r.block_effects.push(n),rt(n));var l=n.first;if(l!==null){n=l;continue}}var f=n.parent;for(n=n.next;n===null&&f!==null;)f===r.effect&&(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects),r=r.parent),n=f.next,f=f.parent}}#l(t){for(const r of t)((r.f&U)!==0?this.#s:this.#i).push(r),this.#f(r.deps),P(r,L)}#f(t){if(t!==null)for(const r of t)(r.f&M)===0||(r.f&Ee)===0||(r.f^=Ee,this.#f(r.deps))}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&be)===0&&(this.current.set(t,t.v),G?.set(t,t.v))}activate(){A=this,this.apply()}deactivate(){A===this&&(A=null,G=null)}flush(){if(this.activate(),J.length>0){if(wr(),A!==null&&A!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#n===0){for(const t of this.#t)t();this.#t.clear()}this.#r===0&&this.#c()}#c(){if(vt.size>1){this.previous.clear();var t=G,r=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const i of vt){if(i===this){r=!1;continue}const o=[];for(const[l,f]of this.current){if(i.current.has(l))if(r&&f!==i.current.get(l))i.current.set(l,f);else continue;o.push(l)}if(o.length===0)continue;const a=[...i.current.keys()].filter(l=>!this.current.has(l));if(a.length>0){var s=J;J=[];const l=new Set,f=new Map;for(const c of o)$r(c,a,l,f);if(J.length>0){A=i,i.apply();for(const c of J)i.#o(c,n);i.deactivate()}J=s}}A=null,G=t}this.committed=!0,vt.delete(this)}increment(t){this.#r+=1,t&&(this.#n+=1)}decrement(t){this.#r-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#s)P(t,U),Te(t);for(const t of this.#i)P(t,ce),Te(t);this.#s=[],this.#i=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=ar()).promise}static ensure(){if(A===null){const t=A=new ne;vt.add(A),Xe||ne.enqueue(()=>{A===t&&t.flush()})}return A}static enqueue(t){Ke(t)}apply(){}}function Pt(e){var t=Xe;Xe=!0;try{for(var r;;){if(Hn(),J.length===0&&(A?.flush(),J.length===0))return _t=null,r;wr()}}finally{Xe=t}}function wr(){var e=me;It=!0;var t=null;try{var r=0;for(wt(!0);J.length>0;){var n=ne.ensure();if(r++>1e3){var s,i;qn()}n.process(J),ge.clear()}}finally{It=!1,wt(e),_t=null}}function qn(){try{Rn()}catch(e){He(e,_t)}}let he=null;function yr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(de|Y))===0&&tt(n)&&(he=new Set,rt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?qr(n):n.fn=null),he?.size>0)){ge.clear();for(const s of he){if((s.f&(de|Y))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)he.has(o)&&(he.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(de|Y))===0&&rt(l)}}he.clear()}}he=null}}function $r(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&M)!==0?$r(s,t,r,n):(i&(Dt|fe))!==0&&(i&U)===0&&xr(s,t,n)&&(P(s,U),Te(s))}}function xr(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&M)!==0&&xr(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function Te(e){for(var t=_t=e;t.parent!==null;){t=t.parent;var r=t.f;if(It&&t===g&&(r&fe)!==0&&(r&ur)===0)return;if((r&(pe|ue))!==0){if((r&L)===0)return;t.f^=L}}J.push(t)}function Bn(e){let t=0,r=Ce(0),n;return()=>{mt()&&(v(r),Fr(()=>(t===0&&(n=en(()=>e(()=>Ze(r)))),t+=1,()=>{Ke(()=>{t-=1,t===0&&(n?.(),n=void 0,Ze(r))})})))}}var Un=Ie|xe|at;function Yn(e,t,r){new Wn(e,t,r)}class Wn{parent;#t=!1;#e;#r=$?y:null;#n;#a;#s;#i=null;#o=null;#l=null;#f=null;#u=null;#c=0;#d=0;#v=!1;#h=null;#m=Bn(()=>(this.#h=Ce(this.#c),()=>{this.#h=null}));constructor(t,r,n){this.#e=t,this.#n=r,this.#a=n,this.parent=g.b,this.#t=!!this.#n.pending,this.#s=Wt(()=>{if(g.b=this,$){const i=this.#r;ct(),i.nodeType===Fe&&i.data===st?this.#y():this.#w()}else{var s=this.#b();try{this.#i=K(()=>n(s))}catch(i){this.error(i)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#u?.remove()}},Un),$&&(this.#e=y)}#w(){try{this.#i=K(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#y(){const t=this.#n.pending;t&&(this.#o=K(()=>t(this.#e)),ne.enqueue(()=>{var r=this.#b();this.#i=this.#_(()=>(ne.ensure(),K(()=>this.#a(r)))),this.#d>0?this.#p():(Be(this.#o,()=>{this.#o=null}),this.#t=!1)}))}#b(){var t=this.#e;return this.#t&&(this.#u=se(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#_(t){var r=g,n=b,s=W;X(this.#s),I(this.#s),je(this.#s.ctx);try{return t()}catch(i){return mr(i),null}finally{X(r),I(n),je(s)}}#p(){const t=this.#n.pending;this.#i!==null&&(this.#f=document.createDocumentFragment(),this.#f.append(this.#u),Yr(this.#i,this.#f)),this.#o===null&&(this.#o=K(()=>t(this.#e)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#o&&Be(this.#o,()=>{this.#o=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t){this.#g(t),this.#c+=t,this.#h&&qe(this.#h,this.#c)}get_effect_pending(){return this.#m(),v(this.#h)}error(t){var r=this.#n.onerror;let n=this.#n.failed;if(this.#v||!r&&!n)throw t;this.#i&&(H(this.#i),this.#i=null),this.#o&&(H(this.#o),this.#o=null),this.#l&&(H(this.#l),this.#l=null),$&&(re(this.#r),cr(),re(ht()));var s=!1,i=!1;const o=()=>{if(s){Pn();return}s=!0,i&&In(),ne.ensure(),this.#c=0,this.#l!==null&&Be(this.#l,()=>{this.#l=null}),this.#t=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#v=!1,K(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var a=b;try{I(null),i=!0,r?.(t,o),i=!1}catch(l){He(l,this.#s&&this.#s.parent)}finally{I(a)}n&&Ke(()=>{this.#l=this.#_(()=>{ne.ensure(),this.#v=!0;try{return K(()=>{n(this.#e,()=>t,()=>o)})}catch(l){return He(l,this.#s.parent),null}finally{this.#v=!1}})})}}function Vn(e,t,r){for(var n=[],s=t.length,i=0;i<s;i++)Vt(t[i].e,n,!0);Br(n,()=>{var o=n.length===0&&r!==null;if(o){var a=r,l=a.parentNode;Mr(l),l.append(a),e.items.clear(),ie(e,t[0].prev,t[s-1].next)}for(var f=0;f<s;f++){var c=t[f];o||(e.items.delete(c.k),ie(e,c.prev,c.next)),H(c.e,!o)}e.first===t[0]&&(e.first=t[0].prev)})}function Er(e,t,r,n,s,i=null){var o=e,a=new Map,l=null,f=(t&nr)!==0,c=(t&tr)!==0,h=(t&rr)!==0;if(f){var u=e;o=$?re(Se(u)):u.appendChild(se())}$&&ct();var d=null,p=Qn(()=>{var S=r();return sr(S)?S:S==null?[]:Nt(S)}),T,_=!0;function x(){zn(we,T,o,t,n),d!==null&&(T.length===0?(d.fragment?(o.before(d.fragment),d.fragment=null):zt(d.effect),z.first=d.effect):Be(d.effect,()=>{d=null}))}var z=Wt(()=>{T=v(p);var S=T.length;let ye=!1;if($){var w=dr(o)===st;w!==(S===0)&&(o=ht(),re(o),te(!1),ye=!0)}for(var C=new Set,N=A,R=null,B=Dr(),m=0;m<S;m+=1){$&&y.nodeType===Fe&&y.data===At&&(o=y,ye=!0,te(!1));var O=T[m],E=n(O,m),k=_?null:a.get(E);k?(c&&qe(k.v,O),h?qe(k.i,m):k.i=m,B&&N.skipped_effects.delete(k.e)):(k=Gn(_?o:null,R,O,E,m,s,t,r),_&&(k.o=!0,R===null?l=k:R.next=k,R=k),a.set(E,k)),C.add(E)}if(S===0&&i&&!d)if(_)d={fragment:null,effect:K(()=>i(o))};else{var Tt=document.createDocumentFragment(),Ct=se();Tt.append(Ct),d={fragment:Tt,effect:K(()=>i(Ct))}}if($&&S>0&&re(ht()),!_)if(B){for(const[Kt,ae]of a)C.has(Kt)||N.skipped_effects.add(ae.e);N.oncommit(x),N.ondiscard(()=>{})}else x();ye&&te(!0),v(p)}),we={effect:z,items:a,first:l};_=!1,$&&(o=y)}function zn(e,t,r,n,s){var i=(n&dn)!==0,o=t.length,a=e.items,l=e.first,f,c=null,h,u=[],d=[],p,T,_,x;if(i)for(x=0;x<o;x+=1)p=t[x],T=s(p,x),_=a.get(T),_.a?.measure(),(h??=new Set).add(_);for(x=0;x<o;x+=1){if(p=t[x],T=s(p,x),_=a.get(T),e.first??=_,!_.o){_.o=!0;var z=c?c.next:l;ie(e,c,_),ie(e,_,z),Ft(_,z,r),c=_,u=[],d=[],l=c.next;continue}if((_.e.f&Y)!==0&&(zt(_.e),i&&(_.a?.unfix(),(h??=new Set).delete(_))),_!==l){if(f!==void 0&&f.has(_)){if(u.length<d.length){var we=d[0],S;c=we.prev;var ye=u[0],w=u[u.length-1];for(S=0;S<u.length;S+=1)Ft(u[S],we,r);for(S=0;S<d.length;S+=1)f.delete(d[S]);ie(e,ye.prev,w.next),ie(e,c,ye),ie(e,w,we),l=we,c=w,x-=1,u=[],d=[]}else f.delete(_),Ft(_,l,r),ie(e,_.prev,_.next),ie(e,_,c===null?e.first:c.next),ie(e,c,_),c=_;continue}for(u=[],d=[];l!==null&&l.k!==T;)(l.e.f&Y)===0&&(f??=new Set).add(l),d.push(l),l=l.next;if(l===null)continue;_=l}u.push(_),c=_,l=_.next}if(l!==null||f!==void 0){for(var C=f===void 0?[]:Nt(f);l!==null;)(l.e.f&Y)===0&&C.push(l),l=l.next;var N=C.length;if(N>0){var R=(n&nr)!==0&&o===0?r:null;if(i){for(x=0;x<N;x+=1)C[x].a?.measure();for(x=0;x<N;x+=1)C[x].a?.fix()}Vn(e,C,R)}}i&&Ke(()=>{if(h!==void 0)for(_ of h)_.a?.apply()})}function Gn(e,t,r,n,s,i,o,a){var l=(o&tr)!==0,f=(o&hn)===0,c=l?f?Ar(r,!1,!1):Ce(r):r,h=(o&rr)===0?s:Ce(s),u={i:h,v:c,k:n,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var d=document.createDocumentFragment();d.append(e=se())}return u.e=K(()=>i(e,c,h,a)),t!==null&&(t.next=u),u}finally{}}function Ft(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,s=t?t.e.nodes_start:r,i=e.e.nodes_start;i!==null&&i!==n;){var o=ve(i);s.before(i),i=o}}function ie(e,t,r){t===null?(e.first=r,e.effect.first=r&&r.e):(t.e.next&&(t.e.next.prev=null),t.next=r,t.e.next=r&&r.e),r===null?e.effect.last=t&&t.e:(r.e.prev&&(r.e.prev.next=null),r.prev=t,r.e.prev=t&&t.e)}function Jn(e,t,r,n){const s=bt;if(r.length===0&&e.length===0){n(t.map(s));return}var i=A,o=g,a=Kn();function l(){Promise.all(r.map(f=>Xn(f))).then(f=>{a();try{n([...t.map(s),...f])}catch(c){(o.f&de)===0&&He(c,o)}i?.deactivate(),pt()}).catch(f=>{He(f,o)})}e.length>0?Promise.all(e).then(()=>{a();try{return l()}finally{i?.deactivate(),pt()}}):l()}function Kn(){var e=g,t=b,r=W,n=A;return function(i=!0){X(e),I(t),je(r),i&&n?.activate()}}function pt(){X(null),I(null),je(null)}function bt(e){var t=M|U,r=b!==null&&(b.f&M)!==0?b:null;return g!==null&&(g.f|=xe),{ctx:W,deps:null,effects:null,equals:hr,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:r??g,ac:null}}function Xn(e,t){let r=g;r===null&&Cn();var n=r.b,s=void 0,i=Ce(D),o=!b,a=new Map;return li(()=>{var l=ar();s=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{f===A&&f.committed&&f.deactivate(),pt()})}catch(u){l.reject(u),pt()}var f=A;if(o){var c=!n.is_pending();n.update_pending_count(1),f.increment(c),a.get(f)?.reject(Pe),a.delete(f),a.set(f,l)}const h=(u,d=void 0)=>{if(f.activate(),d)d!==Pe&&(i.f|=be,qe(i,d));else{(i.f&be)!==0&&(i.f^=be),qe(i,u);for(const[p,T]of a){if(a.delete(p),p===f)break;T.reject(Pe)}}o&&(n.update_pending_count(-1),f.decrement(c))};l.promise.then(h,u=>h(null,u||"unknown"))}),Lr(()=>{for(const l of a.values())l.reject(Pe)}),new Promise(l=>{function f(c){function h(){c===s?l(i):f(s)}c.then(h,h)}f(s)})}function Zn(e){const t=bt(e);return Vr(t),t}function Qn(e){const t=bt(e);return t.equals=vr,t}function kr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)H(t[r])}}function ei(e){for(var t=e.parent;t!==null;){if((t.f&M)===0)return(t.f&de)===0?t:null;t=t.parent}return null}function jt(e){var t,r=g;X(ei(e));try{e.f&=~Ee,kr(e),t=Xr(e)}finally{X(r)}return t}function Tr(e){var t=jt(e);if(e.equals(t)||(A?.is_fork||(e.v=t),e.wv=Jr()),!Ne)if(G!==null)mt()&&G.set(e,t);else{var r=(e.f&ee)===0?ce:L;P(e,r)}}let Ht=new Set;const ge=new Map;let Cr=!1;function Ce(e,t){var r={f:0,v:e,reactions:null,equals:hr,rv:0,wv:0};return r}function F(e,t){const r=Ce(e);return Vr(r),r}function Ar(e,t=!1,r=!0){const n=Ce(e);return t||(n.equals=vr),n}function j(e,t,r=!1){b!==null&&(!le||(b.f&fr)!==0)&&br()&&(b.f&(M|fe|Dt|fr))!==0&&!_e?.includes(e)&&Ln();let n=r?Ae(t):t;return qe(e,n)}function qe(e,t){if(!e.equals(t)){var r=e.v;Ne?ge.set(e,t):ge.set(e,r),e.v=t;var n=ne.ensure();n.capture(e,r),(e.f&M)!==0&&((e.f&U)!==0&&jt(e),P(e,(e.f&ee)!==0?L:ce)),e.wv=Jr(),Sr(e,U),g!==null&&(g.f&L)!==0&&(g.f&(ue|pe))===0&&(Z===null?ui([e]):Z.push(e)),!n.is_fork&&Ht.size>0&&!Cr&&ti()}return t}function ti(){Cr=!1;var e=me;wt(!0);const t=Array.from(Ht);try{for(const r of t)(r.f&L)!==0&&P(r,ce),tt(r)&&rt(r)}finally{wt(e)}Ht.clear()}function Ze(e){j(e,e.v+1)}function Sr(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,s=0;s<n;s++){var i=r[s],o=i.f,a=(o&U)===0;if(a&&P(i,t),(o&M)!==0){var l=i;G?.delete(l),(o&Ee)===0&&(o&ee&&(i.f|=Ee),Sr(l,ce))}else a&&((o&fe)!==0&&he!==null&&he.add(i),Te(i))}}function Ae(e){if(typeof e!="object"||e===null||Lt in e)return e;const t=or(e);if(t!==mn&&t!==wn)return e;var r=new Map,n=sr(e),s=F(0),i=Re,o=a=>{if(Re===i)return a();var l=b,f=Re;I(null),Gr(i);var c=a();return I(l),Gr(f),c};return n&&r.set("length",F(e.length)),new Proxy(e,{defineProperty(a,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Mn();var c=r.get(l);return c===void 0?c=o(()=>{var h=F(f.value);return r.set(l,h),h}):j(c,f.value,!0),!0},deleteProperty(a,l){var f=r.get(l);if(f===void 0){if(l in a){const c=o(()=>F(D));r.set(l,c),Ze(s)}}else j(f,D),Ze(s);return!0},get(a,l,f){if(l===Lt)return e;var c=r.get(l),h=l in a;if(c===void 0&&(!h||Le(a,l)?.writable)&&(c=o(()=>{var d=Ae(h?a[l]:D),p=F(d);return p}),r.set(l,c)),c!==void 0){var u=v(c);return u===D?void 0:u}return Reflect.get(a,l,f)},getOwnPropertyDescriptor(a,l){var f=Reflect.getOwnPropertyDescriptor(a,l);if(f&&"value"in f){var c=r.get(l);c&&(f.value=v(c))}else if(f===void 0){var h=r.get(l),u=h?.v;if(h!==void 0&&u!==D)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(a,l){if(l===Lt)return!0;var f=r.get(l),c=f!==void 0&&f.v!==D||Reflect.has(a,l);if(f!==void 0||g!==null&&(!c||Le(a,l)?.writable)){f===void 0&&(f=o(()=>{var u=c?Ae(a[l]):D,d=F(u);return d}),r.set(l,f));var h=v(f);if(h===D)return!1}return c},set(a,l,f,c){var h=r.get(l),u=l in a;if(n&&l==="length")for(var d=f;d<h.v;d+=1){var p=r.get(d+"");p!==void 0?j(p,D):d in a&&(p=o(()=>F(D)),r.set(d+"",p))}if(h===void 0)(!u||Le(a,l)?.writable)&&(h=o(()=>F(void 0)),j(h,Ae(f)),r.set(l,h));else{u=h.v!==D;var T=o(()=>Ae(f));j(h,T)}var _=Reflect.getOwnPropertyDescriptor(a,l);if(_?.set&&_.set.call(c,f),!u){if(n&&typeof l=="string"){var x=r.get("length"),z=Number(l);Number.isInteger(z)&&z>=x.v&&j(x,z+1)}Ze(s)}return!0},ownKeys(a){v(s);var l=Reflect.ownKeys(a).filter(h=>{var u=r.get(h);return u===void 0||u.v!==D});for(var[f,c]of r)c.v!==D&&!(f in a)&&l.push(f);return l},setPrototypeOf(){Dn()}})}var qt,Nr,Rr,Or;function Bt(){if(qt===void 0){qt=window,Nr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Rr=Le(t,"firstChild").get,Or=Le(t,"nextSibling").get,lr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),lr(r)&&(r.__t=void 0)}}function se(e=""){return document.createTextNode(e)}function Se(e){return Rr.call(e)}function ve(e){return Or.call(e)}function Ut(e,t){if(!$)return Se(e);var r=Se(y);return r===null&&(r=y.appendChild(se())),re(r),r}function gt(e,t=!1){if(!$){var r=Se(e);return r instanceof Comment&&r.data===""?ve(r):r}if(t&&y?.nodeType!==kn){var n=se();return y?.before(n),re(n),n}return y}function Mr(e){e.textContent=""}function Dr(){return!1}function Yt(e){var t=b,r=g;I(null),X(null);try{return e()}finally{I(t),X(r)}}function ri(e){g===null&&(b===null&&Nn(),Sn()),Ne&&An()}function ni(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function oe(e,t,r){var n=g;n!==null&&(n.f&Y)!==0&&(e|=Y);var s={ctx:W,deps:null,nodes_start:null,nodes_end:null,f:e|U|ee,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{rt(s),s.f|=ft}catch(a){throw H(s),a}else t!==null&&Te(s);var i=s;if(r&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&xe)===0&&(i=i.first,(e&fe)!==0&&(e&Ie)!==0&&i!==null&&(i.f|=Ie)),i!==null&&(i.parent=n,n!==null&&ni(i,n),b!==null&&(b.f&M)!==0&&(e&pe)===0)){var o=b;(o.effects??=[]).push(i)}return s}function mt(){return b!==null&&!le}function Lr(e){const t=oe(Ot,null,!1);return P(t,L),t.teardown=e,t}function Ir(e){ri();var t=g.f,r=!b&&(t&ue)!==0&&(t&ft)===0;if(r){var n=W;(n.e??=[]).push(e)}else return Pr(e)}function Pr(e){return oe(Rt|$n,e,!1)}function ii(e){ne.ensure();const t=oe(pe|xe,e,!0);return()=>{H(t)}}function si(e){ne.ensure();const t=oe(pe|xe,e,!0);return(r={})=>new Promise(n=>{r.outro?Be(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function oi(e){return oe(Rt,e,!1)}function li(e){return oe(Dt|xe,e,!0)}function Fr(e,t=0){return oe(Ot|t,e,!0)}function Qe(e,t=[],r=[],n=[]){Jn(n,t,r,s=>{oe(Ot,()=>e(...s.map(v)),!0)})}function Wt(e,t=0){var r=oe(fe|t,e,!0);return r}function K(e){return oe(ue|xe,e,!0)}function jr(e){var t=e.teardown;if(t!==null){const r=Ne,n=b;Wr(!0),I(null);try{t.call(null)}finally{Wr(r),I(n)}}}function Hr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&Yt(()=>{s.abort(Pe)});var n=r.next;(r.f&pe)!==0?r.parent=null:H(r,t),r=n}}function ai(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ue)===0&&H(t),t=r}}function H(e,t=!0){var r=!1;(t||(e.f&ur)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(fi(e.nodes_start,e.nodes_end),r=!0),Hr(e,t&&!r),yt(e,0),P(e,de);var n=e.transitions;if(n!==null)for(const i of n)i.stop();jr(e);var s=e.parent;s!==null&&s.first!==null&&qr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function fi(e,t){for(;e!==null;){var r=e===t?null:ve(e);e.remove(),e=r}}function qr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Be(e,t,r=!0){var n=[];Vt(e,n,!0),Br(n,()=>{r&&H(e),t&&t()})}function Br(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var s of e)s.out(n)}else t()}function Vt(e,t,r){if((e.f&Y)===0){if(e.f^=Y,e.transitions!==null)for(const o of e.transitions)(o.is_global||r)&&t.push(o);for(var n=e.first;n!==null;){var s=n.next,i=(n.f&Ie)!==0||(n.f&ue)!==0&&(e.f&fe)!==0;Vt(n,t,i?r:!1),n=s}}}function zt(e){Ur(e,!0)}function Ur(e,t){if((e.f&Y)!==0){e.f^=Y,(e.f&L)===0&&(P(e,U),Te(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&Ie)!==0||(r.f&ue)!==0;Ur(r,s?t:!1),r=n}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function Yr(e,t){for(var r=e.nodes_start,n=e.nodes_end;r!==null;){var s=r===n?null:ve(r);t.append(r),r=s}}let me=!1;function wt(e){me=e}let Ne=!1;function Wr(e){Ne=e}let b=null,le=!1;function I(e){b=e}let g=null;function X(e){g=e}let _e=null;function Vr(e){b!==null&&(_e===null?_e=[e]:_e.push(e))}let q=null,V=0,Z=null;function ui(e){Z=e}let zr=1,et=0,Re=et;function Gr(e){Re=e}function Jr(){return++zr}function tt(e){var t=e.f;if((t&U)!==0)return!0;if(t&M&&(e.f&=~Ee),(t&ce)!==0){var r=e.deps;if(r!==null)for(var n=r.length,s=0;s<n;s++){var i=r[s];if(tt(i)&&Tr(i),i.wv>e.wv)return!0}(t&ee)!==0&&G===null&&P(e,L)}return!1}function Kr(e,t,r=!0){var n=e.reactions;if(n!==null&&!_e?.includes(e))for(var s=0;s<n.length;s++){var i=n[s];(i.f&M)!==0?Kr(i,t,!1):t===i&&(r?P(i,U):(i.f&L)!==0&&P(i,ce),Te(i))}}function Xr(e){var t=q,r=V,n=Z,s=b,i=_e,o=W,a=le,l=Re,f=e.f;q=null,V=0,Z=null,b=(f&(ue|pe))===0?e:null,_e=null,je(e.ctx),le=!1,Re=++et,e.ac!==null&&(Yt(()=>{e.ac.abort(Pe)}),e.ac=null);try{e.f|=Mt;var c=e.fn,h=c(),u=e.deps;if(q!==null){var d;if(yt(e,V),u!==null&&V>0)for(u.length=V+q.length,d=0;d<q.length;d++)u[V+d]=q[d];else e.deps=u=q;if(me&&mt()&&(e.f&ee)!==0)for(d=V;d<u.length;d++)(u[d].reactions??=[]).push(e)}else u!==null&&V<u.length&&(yt(e,V),u.length=V);if(br()&&Z!==null&&!le&&u!==null&&(e.f&(M|ce|U))===0)for(d=0;d<Z.length;d++)Kr(Z[d],e);return s!==null&&s!==e&&(et++,Z!==null&&(n===null?n=Z:n.push(...Z))),(e.f&be)!==0&&(e.f^=be),h}catch(p){return mr(p)}finally{e.f^=Mt,q=t,V=r,Z=n,b=s,_e=i,je(o),le=a,Re=l}}function ci(e,t){let r=t.reactions;if(r!==null){var n=bn.call(r,e);if(n!==-1){var s=r.length-1;s===0?r=t.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(t.f&M)!==0&&(q===null||!q.includes(t))&&(P(t,ce),(t.f&ee)!==0&&(t.f^=ee,t.f&=~Ee),kr(t),yt(t,0))}function yt(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)ci(e,r[n])}function rt(e){var t=e.f;if((t&de)===0){P(e,L);var r=g,n=me;g=e,me=!0;try{(t&fe)!==0?ai(e):Hr(e),jr(e);var s=Xr(e);e.teardown=typeof s=="function"?s:null,e.wv=zr;var i;St&&jn&&(e.f&U)!==0&&e.deps}finally{me=n,g=r}}}function v(e){var t=e.f,r=(t&M)!==0;if(b!==null&&!le){var n=g!==null&&(g.f&de)!==0;if(!n&&!_e?.includes(e)){var s=b.deps;if((b.f&Mt)!==0)e.rv<et&&(e.rv=et,q===null&&s!==null&&s[V]===e?V++:q===null?q=[e]:q.includes(e)||q.push(e));else{(b.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[b]:i.includes(b)||i.push(b)}}}if(Ne){if(ge.has(e))return ge.get(e);if(r){var o=e,a=o.v;return((o.f&L)===0&&o.reactions!==null||Qr(o))&&(a=jt(o)),ge.set(o,a),a}}else r&&!G?.has(e)&&(o=e,tt(o)&&Tr(o),me&&mt()&&(o.f&ee)===0&&Zr(o));if(G?.has(e))return G.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Zr(e){if(e.deps!==null){e.f^=ee;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&M)!==0&&(t.f&ee)===0&&Zr(t)}}function Qr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ge.has(t)||(t.f&M)!==0&&Qr(t))return!0;return!1}function en(e){var t=le;try{return le=!0,e()}finally{le=t}}const di=-7169;function P(e,t){e.f=e.f&di|t}const hi=new Set,tn=new Set;function vi(e){if(!$)return;e.removeAttribute("onload"),e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function _i(e,t,r,n={}){function s(i){if(n.capture||nt.call(t,i),!i.cancelBubble)return Yt(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Ke(()=>{t.addEventListener(e,s,n)}):t.addEventListener(e,s,n),s}function $t(e,t,r,n,s){var i={capture:n,passive:s},o=_i(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Lr(()=>{t.removeEventListener(e,o,i)})}let rn=null;function nt(e){var t=this,r=t.ownerDocument,n=e.type,s=e.composedPath?.()||[],i=s[0]||e.target;rn=e;var o=0,a=rn===e&&e.__root;if(a){var l=s.indexOf(a);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=s.indexOf(t);if(f===-1)return;l<=f&&(o=l)}if(i=s[o]||e.target,i!==t){lt(e,"currentTarget",{configurable:!0,get(){return i||r}});var c=b,h=g;I(null),X(null);try{for(var u,d=[];i!==null;){var p=i.assignedSlot||i.parentNode||i.host||null;try{var T=i["__"+n];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch(_){u?d.push(_):u=_}if(e.cancelBubble||p===t||p===null)break;i=p}if(u){for(let _ of d)queueMicrotask(()=>{throw _});throw u}}finally{e.__root=t,delete e.currentTarget,I(c),X(h)}}}function pi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ue(e,t){var r=g;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Oe(e,t){var r=(t&vn)!==0,n=(t&_n)!==0,s,i=!e.startsWith("<!>");return()=>{if($)return Ue(y,null),y;s===void 0&&(s=pi(i?e:"<!>"+e),r||(s=Se(s)));var o=n||Nr?document.importNode(s,!0):s.cloneNode(!0);if(r){var a=Se(o),l=o.lastChild;Ue(a,l)}else Ue(o,o);return o}}function xt(){if($)return Ue(y,null),y;var e=document.createDocumentFragment(),t=document.createComment(""),r=se();return e.append(t,r),Ue(t,r),e}function Q(e,t){if($){var r=g;((r.f&ft)===0||r.nodes_end===null)&&(r.nodes_end=y),ct();return}e!==null&&e.before(t)}const bi=["touchstart","touchmove"];function gi(e){return bi.includes(e)}function nn(e,t){return sn(e,t)}function mi(e,t){Bt(),t.intro=t.intro??!1;const r=t.target,n=$,s=y;try{for(var i=Se(r);i&&(i.nodeType!==Fe||i.data!==ir);)i=ve(i);if(!i)throw De;te(!0),re(i);const o=sn(e,{...t,anchor:i});return te(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==De&&console.warn("Failed to hydrate: ",o),t.recover===!1&&On(),Bt(),Mr(r),te(!1),nn(e,t)}finally{te(n),re(s)}}const Ye=new Map;function sn(e,{target:t,anchor:r,props:n={},events:s,context:i,intro:o=!0}){Bt();var a=new Set,l=h=>{for(var u=0;u<h.length;u++){var d=h[u];if(!a.has(d)){a.add(d);var p=gi(d);t.addEventListener(d,nt,{passive:p});var T=Ye.get(d);T===void 0?(document.addEventListener(d,nt,{passive:p}),Ye.set(d,1)):Ye.set(d,T+1)}}};l(Nt(hi)),tn.add(l);var f=void 0,c=si(()=>{var h=r??t.appendChild(se());return Yn(h,{pending:()=>{}},u=>{if(i){_r({});var d=W;d.c=i}if(s&&(n.$$events=s),$&&Ue(u,null),f=e(u,n)||{},$&&(g.nodes_end=y,y===null||y.nodeType!==Fe||y.data!==At))throw ut(),De;i&&pr()}),()=>{for(var u of a){t.removeEventListener(u,nt);var d=Ye.get(u);--d===0?(document.removeEventListener(u,nt),Ye.delete(u)):Ye.set(u,d)}tn.delete(l),h!==r&&h.parentNode?.removeChild(h)}});return Gt.set(f,c),f}let Gt=new WeakMap;function wi(e,t){const r=Gt.get(e);return r?(Gt.delete(e),r(t)):Promise.resolve()}class yi{anchor;#t=new Map;#e=new Map;#r=new Map;#n=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#s=()=>{var t=A;if(this.#t.has(t)){var r=this.#t.get(t),n=this.#e.get(r);if(n)zt(n),this.#n.delete(r);else{var s=this.#r.get(r);s&&(this.#e.set(r,s.effect),this.#r.delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[i,o]of this.#t){if(this.#t.delete(i),i===t)break;const a=this.#r.get(o);a&&(H(a.effect),this.#r.delete(o))}for(const[i,o]of this.#e){if(i===r||this.#n.has(i))continue;const a=()=>{if(Array.from(this.#t.values()).includes(i)){var f=document.createDocumentFragment();Yr(o,f),f.append(se()),this.#r.set(i,{effect:o,fragment:f})}else H(o);this.#n.delete(i),this.#e.delete(i)};this.#a||!n?(this.#n.add(i),Be(o,a,!1)):a()}}};#i=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[n,s]of this.#r)r.includes(n)||(H(s.effect),this.#r.delete(n))};ensure(t,r){var n=A,s=Dr();if(r&&!this.#e.has(t)&&!this.#r.has(t))if(s){var i=document.createDocumentFragment(),o=se();i.append(o),this.#r.set(t,{effect:K(()=>r(o)),fragment:i})}else this.#e.set(t,K(()=>r(this.anchor)));if(this.#t.set(n,t),s){for(const[a,l]of this.#e)a===t?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[a,l]of this.#r)a===t?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else $&&(this.anchor=y),this.#s()}}function $i(e){W===null&&Tn(),Ir(()=>{const t=en(e);if(typeof t=="function")return t})}function it(e,t,r=!1){$&&ct();var n=new yi(e),s=r?Ie:0;function i(o,a){if($){const f=dr(e)===st;if(o===f){var l=ht();re(l),n.anchor=l,te(!1),n.ensure(o,a),te(!0);return}}n.ensure(o,a)}Wt(()=>{var o=!1;t((a,l=!0)=>{o=!0,i(l,a)}),o||i(!1,null)},s)}function xi(e,t){oi(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const s=document.createElement("style");s.id=t.hash,s.textContent=t.code,n.appendChild(s)}})}const Ei=Symbol("is custom element"),ki=Symbol("is html");function We(e,t,r,n){var s=Ti(e);$&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=r)&&(t==="loading"&&(e[En]=r),r==null?e.removeAttribute(t):typeof r!="string"&&on(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Et(e,t,r){var n=b,s=g;let i=$;$&&te(!1),I(null),X(null);try{t!=="style"&&(Jt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.tagName.toLowerCase())?on(e).includes(t):r&&typeof r=="object")?e[t]=r:We(e,t,r==null?r:String(r))}finally{I(n),X(s),i&&te(!0)}}function Ti(e){return e.__attributes??={[Ei]:e.nodeName.includes("-"),[ki]:e.namespaceURI===pn}}var Jt=new Map;function on(e){var t=e.getAttribute("is")||e.nodeName,r=Jt.get(t);if(r)return r;Jt.set(t,r=[]);for(var n,s=e,i=Element.prototype;i!==s;){n=gn(s);for(var o in n)n[o].set&&r.push(o);s=or(s)}return r}function ln(e,t,r,n){var s=n,i=!0,o=()=>(i&&(i=!1,s=n),s),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var l;l=()=>{var u=e[t];return u===void 0?o():(i=!0,u)};var f=!1,c=bt(()=>(f=!1,l())),h=g;return(function(u,d){if(arguments.length>0){const p=d?v(c):u;return j(c,p),f=!0,s!==void 0&&(s=p),u}return Ne&&f||(h.f&de)!==0?c.v:v(c)})}function Ci(e){return new Ai(e)}class Ai{#t;#e;constructor(t){var r=new Map,n=(i,o)=>{var a=Ar(o,!1,!1);return r.set(i,a),a};const s=new Proxy({...t.props||{},$$events:{}},{get(i,o){return v(r.get(o)??n(o,Reflect.get(i,o)))},has(i,o){return o===xn?!0:(v(r.get(o)??n(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,a){return j(r.get(o)??n(o,a),a),Reflect.set(i,o,a)}});this.#e=(t.hydrate?mi:nn)(t.component,{target:t.target,anchor:t.anchor,props:s,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&Pt(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||lt(this,i,{get(){return this.#e[i]},set(o){this.#e[i]=o},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{wi(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...s)=>r.call(this,...s);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(s=>s!==n)}}$destroy(){this.#e.$destroy()}}let an;typeof HTMLElement=="function"&&(an=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return s=>{const i=document.createElement("slot");n!=="default"&&(i.name=n),Q(s,i)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=Si(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const s=this.$$g_p(n.name);s in this.$$d||(this.$$d[s]=kt(s,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Ci({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ii(()=>{Fr(()=>{this.$$r=!0;for(const n of ot(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const s=kt(n,this.$$d[n],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,s)}this.$$r=!1})});for(const n in this.$$l)for(const s of this.$$l[n]){const i=this.$$c.$on(n,s);this.$$l_u.set(s,i)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=kt(e,r,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 ot(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function kt(e,t,r,n){const s=r[e]?.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(s){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(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Si(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function Ni(e,t,r,n,s,i){let o=class extends an{constructor(){super(e,r,s),this.$$p_d=t}static get observedAttributes(){return ot(t).map(a=>(t[a].attribute||a).toLowerCase())}};return ot(t).forEach(a=>{lt(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(l){l=kt(a,l,t),this.$$d[a]=l;var f=this.$$c;if(f){var c=Le(f,a)?.get;c?f[a]=l:f.$set({[a]:l})}}})}),n.forEach(a=>{lt(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}const Ri={version:"0.62.1"};function Oi(e,t=100,r={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");if(typeof r=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");const{immediate:n}=r;let s,i,o,a,l;function f(){const u=s,d=i;return s=void 0,i=void 0,l=e.apply(u,d),l}function c(){const u=Date.now()-a;u<t&&u>=0?o=setTimeout(c,t-u):(o=void 0,n||(l=f()))}const h=function(...u){if(s&&this!==s&&Object.getPrototypeOf(this)===Object.getPrototypeOf(s))throw new Error("Debounced method called with different contexts of the same prototype.");s=this,i=u,a=Date.now();const d=n&&!o;if(o||(o=setTimeout(c,t)),d)return l=f(),l};return Object.defineProperty(h,"isPending",{get(){return o!==void 0}}),h.clear=()=>{o&&(clearTimeout(o),o=void 0,s=void 0,i=void 0)},h.flush=()=>{o&&h.trigger()},h.trigger=()=>{l=f(),h.clear()},h}var Me={},fn;function Mi(){if(fn)return Me;fn=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.LanguageTranslator=void 0,Me.getChildStyleToPass=e,Me.addComponent=t;function e(n,s){var i,o,a="";try{if(n&&s?.length&&(!((i=Object.keys(n))===null||i===void 0)&&i.length)&&(!((o=s?.filter(function(u){return Object.keys(n).includes(u.name)}))===null||o===void 0)&&o.length))for(var l=function(u){var d=s?.filter(function(p){return p.name===u&&p.defaultValue!==n[u]});d&&(a+="".concat(u,":").concat(n[u],";"))},f=0,c=Object.keys(n);f<c.length;f++){var h=c[f];l(h)}}catch(u){console.error("error getting child style to pass",u)}finally{return a}}function t(n){var s,i=((s=n?.repoName.split("/"))===null||s===void 0?void 0:s[1])||n?.repoName;if(!i)throw new Error("wrong componentPath "+n?.repoName);if(!n?.version)throw new Error("wrong version "+n?.version);var o=n?.iifePath||"main.iife.js";if(!document.getElementById(i+"-script"))try{var a=document.createElement("script");if(a.id=i+"-script",a.src="https://cdn.jsdelivr.net/npm/".concat(n.repoName,"@").concat(n.version,"/").concat(o),n?.local)a.src="".concat(n.local);else if(location.href.includes("localhost:6006")){var l=i.split("-")[0];a.src="http://localhost:6006/webcomponents/".concat(i.replace(l+"-",""),"/").concat(o)}document.head.appendChild(a)}catch(f){console.warn(f)}}var r=(function(){function n(s){if(this.lang="",!s?.dictionary)throw new Error("no dictionary provided");this.dictionary=s.dictionary,this.setLang(s?.lang)}return n.prototype.setLang=function(s){s||(s=n.getDefaultLang()),this.lang=s},n.prototype.translateWord=function(s,i){return n.getDictionaryWord(s,this.dictionary,i||this.lang)},n.prototype.translateDate=function(s,i,o){return n.formatDate(s,i,o||this.lang)},n.getDefaultLang=function(){var s,i,o,a="en";return navigator?.languages&&(!((o=(i=(s=navigator.languages[0])===null||s===void 0?void 0:s.split("-")[0])===null||i===void 0?void 0:i.toLowerCase())===null||o===void 0)&&o.length)&&(a=navigator.languages[0].split("-")[0].toLowerCase()),a},n.getDictionaryWord=function(s,i,o){var a;if(!s)throw new Error("no wordKey provided");if(!i)throw new Error("no dictionary provided");if(o&&(!((a=i[o])===null||a===void 0)&&a[s]))return i[o][s];var l="",f=n.getDefaultLang();if(!o||f!==o){var c=i?.[f];c?.[s]&&(l=c[s])}return l},n.formatDate=function(s,i,o){if(!s)throw new Error("no date provided");if(typeof s.getMonth!="function")throw new Error("wrong date format");var a=new Intl.DateTimeFormat(o||n.getDefaultLang(),i);return a.format(s)},n})();return Me.LanguageTranslator=r,Me}var Di=Mi(),Li=Oe('<iframe class="svelte-1f6x0x7"></iframe>'),Ii=Oe("<hb-player-live></hb-player-live>",2),Pi=Oe("<hb-player-live-camera-ptz></hb-player-live-camera-ptz>",2),Fi=Oe('<video controls><source type="video/mp4"/> <track kind="captions" src="" srclang="en" label="English"/> Your browser does not support the video tag.</video>',2),ji=Oe('<div class="col svelte-1f6x0x7" style="padding-right:0px;padding-left:0px;--bs-gutter-x: 0px;"><!></div>'),Hi=Oe('<div class="row svelte-1f6x0x7"></div>'),qi=Oe('<div id="matrix" class="svelte-1f6x0x7"><!></div>');const Bi={hash:"svelte-1f6x0x7",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;width:100%;display:block;background-color:black;}#matrix.svelte-1f6x0x7 {display:grid;gap:5px;
3
3
  /* Play with min-value */overflow:hidden;}.col.svelte-1f6x0x7 {margin:5px;}.row.svelte-1f6x0x7 {margin-top:5px !important;margin-left:5px !important;margin-right:5px !important;}iframe.svelte-1f6x0x7 {border:none;width:100%;height:100%;margin:0px;padding:0px;}
4
4
  /*!
5
5
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
@@ -16,5 +16,5 @@
16
16
  @media (min-width: 1200px) {
17
17
  }
18
18
  @media (min-width: 1400px) {
19
- }`};function dn(e,t){_r(t,!0),Ei(e,Ui);function r(d,b){t.$$host.dispatchEvent(new CustomEvent(d,{detail:b}))}const n=t.$$host;let i=fn(t,"id",7,""),s=fn(t,"items");ke({});let o=q(0),l=q(0),a=q(0),f=q(0),c=q(void 0),h=q(ke([]));function u(){if(p(l)&&p(o)){const d=1.7777777777777777,b=p(l)/p(o);let T=0,O=0;if(s().length===1)T=1,O=1;else if(p(l)<450)O=1,T=s().length;else if(s().length===2)b>d?(T=1,O=2):(T=2,O=1);else if(b>d){let M=1/0;for(let $=1;$<=s().length;$++){const C=Math.ceil(s().length/$),k=p(o)/$*d*C;if(k<=p(l)){const H=p(l)-k;H<M&&(M=H,T=$,O=C)}}}else{let M=1/0;for(let $=1;$<=s().length;$++){const C=Math.ceil(s().length/$),k=p(l)/$/d*C;if(k<=p(o)){const H=p(o)-k;H<M&&(M=H,O=$,T=C)}}}if(B(a,T,!0),B(f,O,!0),p(a)&&p(f)){const M=[];for(let $=0;$<p(a);$++)for(let C=0;C<p(f);C++){const k=s()[$*p(f)+C];k&&(M[$]||(M[$]={row:$,items:[]}),M[$].items[C]=k)}B(h,M,!0),console.log(p(h),p(a),p(f),"drawItems")}}}function v(){if(window.innerWidth&&window.innerHeight&&n?.shadowRoot){const b=n.shadowRoot.getElementById("matrix");b?.style&&(B(o,window.innerHeight-b.offsetTop),B(l,Number(b.clientWidth),!0),b.style.height=p(o)+"px",console.log(`setSize w:${p(l)} h:${p(o)}`),u())}}Lr(()=>{if(typeof s()=="string")try{s(JSON.parse(s())),u()}catch(d){console.error("error parsing items",d)}}),Li.addComponent({repoName:"@htmlbricks/hb-player-live",version:Oi.version}),yi(()=>{v()});function _(d){B(c,d,!0),r("hoverItem",{id:d,selected:!!p(c)})}function y(){p(c)?r("clickItem",{id:p(c)}):console.info("No video selected")}function g(d){const b=d;try{b.contentWindow?.document.addEventListener("click",()=>{y()})}catch(T){console.warn("error adding click event to iframe",T)}}var A={get id(){return i()},set id(d=""){i(d),Pt()},get items(){return s()},set items(d){s(d),Pt()}},S=Bi(),Q=Xn(()=>Mi(v,200));Tt("resize",Ht,function(...d){p(Q)?.apply(this,d)});var ie=Bt(S);{var R=d=>{var b=kt(),T=$t(b);on(T,17,()=>p(h),O=>O.row,(O,M)=>{var $=qi();on($,21,()=>p(M).items,C=>C.id,(C,k)=>{var H=Hi(),Me=Bt(H);{var ot=fe=>{var ye=Ii();et(()=>{We(ye,"title",p(k).title),We(ye,"src",p(k).uri)}),Tt("load",ye,Zt=>g(Zt.target)),hi(ye),Z(fe,ye)},Xt=fe=>{var ye=kt(),Zt=$t(ye);{var Yi=Ve=>{var ze=Pi();Ct(ze,"media_type","whep"),et(()=>Ct(ze,"mediauri",`${p(k).uri??""}/whep`)),Z(Ve,ze)},Wi=Ve=>{var ze=kt(),Vi=$t(ze);{var zi=Ge=>{var Je=Fi();Ct(Je,"media_type","whep"),et(()=>Ct(Je,"live_uri",`${p(k).uri??""}/whep`)),Z(Ge,Je)},Gi=Ge=>{var Je=kt(),Ji=$t(Je);{var Ki=Qt=>{var er=ji(),hn=Bt(er);cr(3),pt(er),et(()=>{We(hn,"title",p(k).title),We(hn,"src",p(k).uri)}),Z(Qt,er)};st(Ji,Qt=>{p(k).type==="video"&&Qt(Ki)},!0)}Z(Ge,Je)};st(Vi,Ge=>{p(k).type==="mediamtx-webrtc-ptz"?Ge(zi):Ge(Gi,!1)},!0)}Z(Ve,ze)};st(Zt,Ve=>{p(k).type==="mediamtx-webrtc"?Ve(Yi):Ve(Wi,!1)},!0)}Z(fe,ye)};st(Me,fe=>{p(k).type==="iframe"?fe(ot):fe(Xt,!1)})}pt(H),et(()=>We(H,"id",`select_${p(k).id??""}`)),Tt("mouseleave",H,fe=>_()),Tt("mouseenter",H,fe=>_(p(k).id)),Z(C,H)}),pt($),Z(O,$)}),Z(d,b)};st(ie,d=>{s()&&typeof s()=="object"&&d(R)})}return pt(S),Z(e,S),pr(A)}customElements.define("hb-matrix-video",Ri(dn,{id:{},items:{}},[],[],!0)),tr.Component=dn,Object.defineProperty(tr,Symbol.toStringTag,{value:"Module"})})(this["matrix-video"]=this["matrix-video"]||{});
19
+ }`};function un(e,t){_r(t,!0),xi(e,Bi);function r(w,C){t.$$host.dispatchEvent(new CustomEvent(w,{detail:C}))}const n=t.$$host;let s=ln(t,"id",7,""),i=ln(t,"items");Ae({});let o=F(0),a=F(0),l=F(0),f=F(0),c=F(void 0),h=F(Ae([]));function u(){if(v(a)&&v(o)){const w=1.7777777777777777,C=v(a)/v(o);let N=0,R=0;if(i().length===1)N=1,R=1;else if(v(a)<450)R=1,N=i().length;else if(i().length===2)C>w?(N=1,R=2):(N=2,R=1);else if(C>w){let B=1/0;for(let m=1;m<=i().length;m++){const O=Math.ceil(i().length/m),E=v(o)/m*w*O;if(E<=v(a)){const k=v(a)-E;k<B&&(B=k,N=m,R=O)}}}else{let B=1/0;for(let m=1;m<=i().length;m++){const O=Math.ceil(i().length/m),E=v(a)/m/w*O;if(E<=v(o)){const k=v(o)-E;k<B&&(B=k,R=m,N=O)}}}if(j(l,N,!0),j(f,R,!0),v(l)&&v(f)){const B=[];for(let m=0;m<v(l);m++)for(let O=0;O<v(f);O++){const E=i()[m*v(f)+O];E&&(B[m]||(B[m]={row:m,items:[]}),B[m].items[O]=E)}j(h,B,!0),console.log(v(h),v(l),v(f),"drawItems")}}}function d(){if(window.innerWidth&&window.innerHeight&&n?.shadowRoot){const C=n.shadowRoot.getElementById("matrix");C?.style&&(j(o,window.innerHeight-C.offsetTop),j(a,Number(C.clientWidth),!0),C.style.height=v(o)+"px",console.log(`setSize w:${v(a)} h:${v(o)}`),u())}}Ir(()=>{if(typeof i()=="string")try{i(JSON.parse(i())),u()}catch(w){console.error("error parsing items",w)}}),Di.addComponent({repoName:"@htmlbricks/hb-player-live",version:Ri.version}),$i(()=>{d()});function p(w){j(c,w,!0),r("hoverItem",{id:w,selected:!!v(c)})}function T(){v(c)?r("clickItem",{id:v(c)}):console.info("No video selected")}function _(w){const C=w;try{C.contentWindow?.document.addEventListener("click",()=>{T()})}catch(N){console.warn("error adding click event to iframe",N)}}var x={get id(){return s()},set id(w=""){s(w),Pt()},get items(){return i()},set items(w){i(w),Pt()}},z=qi(),we=Zn(()=>Oi(d,200));$t("resize",qt,function(...w){v(we)?.apply(this,w)});var S=Ut(z);{var ye=w=>{var C=xt(),N=gt(C);Er(N,17,()=>v(h),R=>R.row,(R,B)=>{var m=Hi();Er(m,21,()=>v(B).items,O=>O.id,(O,E)=>{var k=ji(),Tt=Ut(k);{var Ct=ae=>{var $e=Li();Qe(()=>{We($e,"title",v(E).title),We($e,"src",v(E).uri)}),$t("load",$e,Xt=>_(Xt.target)),vi($e),Q(ae,$e)},Kt=ae=>{var $e=xt(),Xt=gt($e);{var Ui=Ve=>{var ze=Ii();Et(ze,"media_type","whep"),Qe(()=>Et(ze,"mediauri",`${v(E).uri??""}/whep`)),Q(Ve,ze)},Yi=Ve=>{var ze=xt(),Wi=gt(ze);{var Vi=Ge=>{var Je=Pi();Et(Je,"media_type","whep"),Qe(()=>Et(Je,"live_uri",`${v(E).uri??""}/whep`)),Q(Ge,Je)},zi=Ge=>{var Je=xt(),Gi=gt(Je);{var Ji=Zt=>{var Qt=Fi(),cn=Ut(Qt);cr(3),dt(Qt),Qe(()=>{We(cn,"title",v(E).title),We(cn,"src",v(E).uri)}),Q(Zt,Qt)};it(Gi,Zt=>{v(E).type==="video"&&Zt(Ji)},!0)}Q(Ge,Je)};it(Wi,Ge=>{v(E).type==="mediamtx-webrtc-ptz"?Ge(Vi):Ge(zi,!1)},!0)}Q(Ve,ze)};it(Xt,Ve=>{v(E).type==="mediamtx-webrtc"?Ve(Ui):Ve(Yi,!1)},!0)}Q(ae,$e)};it(Tt,ae=>{v(E).type==="iframe"?ae(Ct):ae(Kt,!1)})}dt(k),Qe(()=>We(k,"id",`select_${v(E).id??""}`)),$t("mouseleave",k,ae=>p()),$t("mouseenter",k,ae=>p(v(E).id)),Q(O,k)}),dt(m),Q(R,m)}),Q(w,C)};it(S,w=>{i()&&typeof i()=="object"&&w(ye)})}return dt(z),Q(e,z),pr(x)}customElements.define("hb-matrix-video",Ni(un,{id:{},items:{}},[],[],!0)),er.Component=un,Object.defineProperty(er,Symbol.toStringTag,{value:"Module"})})(this["matrix-video"]=this["matrix-video"]||{});
20
20
  //# sourceMappingURL=main.iife.js.map