UNPKG

@ktt45678/vidstack

Version:

UI component library for building high-quality, accessible video and audio experiences on the web.

3 lines 80.3 kB
const P=Symbol(0);let z1=!1,$t=!1,N=null,l1=null,k=null,M=0,c1=[],gt={};const i3=()=>{},a1=0,Jt=1,U1=2,q1=3;function r3(){z1=!0,queueMicrotask(Qt)}function Qt(){if(!c1.length){z1=!1;return}$t=!0;for(let t=0;t<c1.length;t++)c1[t].$st!==a1&&s3(c1[t]);c1=[],z1=!1,$t=!1}function s3(t){let e=[t];for(;t=t[P];)t.$e&&t.$st!==a1&&e.push(t);for(let n=e.length-1;n>=0;n--)Lt(e[n])}function o3(t){const e=G1();return A1(e,t.length?t.bind(null,u1.bind(e)):t,null)}function l3(t){return A1(N,t,null)}function t6(t){return A1(null,t,null)}function c3(){$t||Qt()}function vt(){return N}function Z(t,e){try{return A1(e,t,null)}catch(n){mt(e,n);return}}function e6(t,e=N){return e?.$cx[t]}function a3(t,e,n=N){n&&(n.$cx={...n.$cx,[t]:e})}function w1(t){if(!t||!N)return t||i3;const e=N;return e.$d?Array.isArray(e.$d)?e.$d.push(t):e.$d=[e.$d,t]:e.$d=t,function(){e.$st!==q1&&(t.call(null),K1(e.$d)?e.$d=null:Array.isArray(e.$d)&&e.$d.splice(e.$d.indexOf(t),1))}}function u1(t=!0){if(this.$st!==q1){if(this.$h)if(Array.isArray(this.$h))for(let e=this.$h.length-1;e>=0;e--)u1.call(this.$h[e]);else u1.call(this.$h);if(t){const e=this[P];e&&(Array.isArray(e.$h)?e.$h.splice(e.$h.indexOf(this),1):e.$h=null),u3(this)}}}function u3(t){t.$st=q1,t.$d&&n6(t),t.$s&&xt(t,0),t[P]=null,t.$s=null,t.$o=null,t.$h=null,t.$cx=gt,t.$eh=null}function n6(t){try{if(Array.isArray(t.$d))for(let e=t.$d.length-1;e>=0;e--){const n=t.$d[e];n.call(n)}else t.$d.call(t.$d);t.$d=null}catch(e){mt(t,e)}}function A1(t,e,n){const i=N,r=l1;N=t,l1=n;try{return e.call(t)}finally{N=i,l1=r}}function mt(t,e){if(!t||!t.$eh)throw e;let n=0,i=t.$eh.length,r=e;for(n=0;n<i;n++)try{t.$eh[n](r);break}catch(s){r=s}if(n===i)throw r}function yt(){return this.$st===q1?this.$v:(l1&&!this.$e&&(!k&&l1.$s&&l1.$s[M]==this?M++:k?k.push(this):k=[this]),this.$c&&Lt(this),this.$v)}function i6(t){const e=K1(t)?t(this.$v):t;if(this.$ch(this.$v,e)&&(this.$v=e,this.$o))for(let n=0;n<this.$o.length;n++)l6(this.$o[n],U1);return this.$v}const bt=function(){this[P]=null,this.$h=null,N&&N.append(this)},J=bt.prototype;J.$cx=gt,J.$eh=null,J.$c=null,J.$d=null,J.append=function(t){t[P]=this,this.$h?Array.isArray(this.$h)?this.$h.push(t):this.$h=[this.$h,t]:this.$h=t,t.$cx=t.$cx===gt?this.$cx:{...this.$cx,...t.$cx},this.$eh&&(t.$eh=t.$eh?[...t.$eh,...this.$eh]:this.$eh)},J.dispose=function(){u1.call(this)};function G1(){return new bt}const r6=function(e,n,i){bt.call(this),this.$st=n?U1:a1,this.$i=!1,this.$e=!1,this.$s=null,this.$o=null,this.$v=e,n&&(this.$c=n),i&&i.dirty&&(this.$ch=i.dirty)},wt=r6.prototype;Object.setPrototypeOf(wt,J),wt.$ch=f3,wt.call=yt;function At(t,e,n){return new r6(t,e,n)}function f3(t,e){return t!==e}function K1(t){return typeof t=="function"}function Lt(t){if(t.$st===Jt)for(let e=0;e<t.$s.length&&(Lt(t.$s[e]),t.$st!==U1);e++);t.$st===U1?s6(t):t.$st=a1}function h3(t){t.$h&&u1.call(t,!1),t.$d&&n6(t),t.$eh=t[P]?t[P].$eh:null}function s6(t){let e=k,n=M;k=null,M=0;try{h3(t);const i=A1(t,t.$c,t);o6(t),!t.$e&&t.$i?i6.call(t,i):(t.$v=i,t.$i=!0)}catch(i){o6(t),mt(t,i)}finally{k=e,M=n,t.$st=a1}}function o6(t){if(k){if(t.$s&&xt(t,M),t.$s&&M>0){t.$s.length=M+k.length;for(let n=0;n<k.length;n++)t.$s[M+n]=k[n]}else t.$s=k;let e;for(let n=M;n<t.$s.length;n++)e=t.$s[n],e.$o?e.$o.push(t):e.$o=[t]}else t.$s&&M<t.$s.length&&(xt(t,M),t.$s.length=M)}function l6(t,e){if(!(t.$st>=e)&&(t.$e&&t.$st===a1&&(c1.push(t),z1||r3()),t.$st=e,t.$o))for(let n=0;n<t.$o.length;n++)l6(t.$o[n],Jt)}function xt(t,e){let n,i;for(let r=e;r<t.$s.length;r++)n=t.$s[r],n.$o&&(i=n.$o.indexOf(t),n.$o[i]=n.$o[n.$o.length-1],n.$o.pop())}function _t(...t){}function c6(t){return t===null}function Y1(t){return typeof t>"u"}function C3(t){return c6(t)||Y1(t)}function d3(t){return t?.constructor===Object}function p3(t){return typeof t=="number"&&!Number.isNaN(t)}function Ht(t){return typeof t=="string"}function $3(t){return typeof t=="boolean"}function X1(t){return typeof t=="function"}function Et(t){return Array.isArray(t)}var a6;const g3=Event,u6=Symbol("DOM_EVENT");class Vt extends g3{constructor(e,...n){super(e,n[0]),this[a6]=!0,this.triggers=new v3,this.detail=n[0]?.detail;const i=n[0]?.trigger;i&&this.triggers.add(i)}get trigger(){return this.triggers.source}get originEvent(){return this.triggers.origin}get isOriginTrusted(){return this.triggers.origin?.isTrusted??!1}}a6=u6;class v3{constructor(){this.chain=[]}get source(){return this.chain[0]}get origin(){return this.chain[this.chain.length-1]}add(e){this.chain.push(e),m3(e)&&this.chain.push(...e.triggers)}remove(e){return this.chain.splice(this.chain.indexOf(e),1)[0]}has(e){return this.chain.some(n=>n===e)}hasType(e){return!!this.findType(e)}findType(e){return this.chain.find(n=>n.type===e)}walk(e){for(const n of this.chain){const i=e(n);if(i)return[n,i]}}[Symbol.iterator](){return this.chain.values()}}function m3(t){return!!t?.[u6]}class y3 extends EventTarget{addEventListener(e,n,i){return super.addEventListener(e,n,i)}removeEventListener(e,n,i){return super.removeEventListener(e,n,i)}}function f6(t,e,n,i){return t.addEventListener(e,n,i),w1(()=>t.removeEventListener(e,n,i))}function b3(t){return!!t?.type.startsWith("pointer")}function w3(t){return!!t?.type.startsWith("touch")}function A3(t){return/^(click|mouse)/.test(t?.type??"")}function Mt(t){return!!t?.type.startsWith("key")}function L3(t){return Mt(t)&&t.key==="Enter"}function x3(t){return Mt(t)&&(t.key==="Enter"||t.key===" ")}function _3(t){return t instanceof Node}function Tt(t,e,n){if(t)if(!n&&n!==""&&n!==0)t.removeAttribute(e);else{const i=n===!0?"":n+"";t.getAttribute(e)!==i&&t.setAttribute(e,i)}else return}function St(t,e,n){if(t)!n&&n!==0?t.style.removeProperty(e):t.style.setProperty(e,n+"");else return}function H3(t,e,n){t.classList[n?"add":"remove"](e)}function J1(t,e){const n=At(t,null,e),i=yt.bind(n);return i[P]=!0,i.set=i6.bind(n),i}function E3(t){return K1(t)&&P in t}function h6(t,e){const n=At(e?.initial,t,e),i=yt.bind(n);return i[P]=!0,i}function V3(t,e){const n=At(null,function(){let r=t();return K1(r)&&w1(r),null},void 0);return n.$e=!0,s6(n),u1.bind(n,!0)}function M3(t){return E3(t)&&"set"in t}const Q1=V3;function T3(t){return{id:Symbol(),provide:t}}function C6(t,e,n=vt()){const i=!Y1(e);a3(t.id,i?e:t.provide?.(),n)}function d6(t){return e6(t.id)}function S3(t){return!Y1(e6(t.id))}const L1=Symbol(0),x1=Symbol(0),p6=Symbol(0);var $6;const kt={};class k3{constructor(e,n,i){this[$6]=null,this.$el=J1(null),this.a=null,this.d=null,this.f=null,this.g=null,this.e=null,this.o=!1,this.i=kt,this.b=null,this.c=null,this.l=[],this.m=[],this.j=[],this.n=[],this.d=n,i?.scope&&i.scope.append(n);let r=e.state,s=e.props;if(r&&(this.h=r.create(),this.k=new Proxy(this.h,{get:(o,a)=>this.h[a]()}),C6(r,this.h)),s&&(this.i=O3(s),i?.props))for(const o of Object.keys(i.props))this.i[o]?.set(i.props[o]);w1(this.p.bind(this))}w(){Z(()=>{for(const e of this.l)e()},this.d)}x(e){this.a||(this.a=e,this.$el.set(e),Z(()=>{this.f=G1(),Z(()=>{for(const n of this.m)n(this.a);this.q(),this.r()},this.f)},this.d),e.dispatchEvent(new Event("attached")))}s(){this.f?.dispose(),this.f=null,this.g=null,this.a=null,this.$el.set(null)}y(){!this.a||!this.f||!this.j.length||Z(()=>{this.g=G1(),Z(()=>{for(const e of this.j)e(this.a)},this.g)},this.f)}z(){this.g?.dispose(),this.g=null}p(){if(this.o)return;this.o=!0,Z(()=>{for(const n of this.n)n(this.a)},this.d);const e=this.a;this.s(),this.d.dispose(),this.l.length=0,this.m.length=0,this.j.length=0,this.n.length=0,this.e=null,this.b=null,this.c=null,this.i=kt,this.d=null,this.k=kt,this.h=null,e&&delete e.$}t(e){e.onSetup&&this.l.push(e.onSetup.bind(e)),e.onAttach&&this.m.push(e.onAttach.bind(e)),e.onConnect&&this.j.push(e.onConnect.bind(e)),e.onDestroy&&this.n.push(e.onDestroy.bind(e))}q(){if(this.b)for(const e of Object.keys(this.b))X1(this.b[e])?Q1(this.u.bind(this,e)):Tt(this.a,e,this.b[e])}r(){if(this.c)for(const e of Object.keys(this.c))X1(this.c[e])?Q1(this.v.bind(this,e)):St(this.a,e,this.c[e])}u(e){Tt(this.a,e,this.b[e].call(this.e))}v(e){St(this.a,e,this.c[e].call(this.e))}}$6=p6;function O3(t){const e={};for(const n of Object.keys(t)){const i=t[n];e[n]=J1(i,i)}return e}let _1={$$:null};function N3(t,e){return o3(()=>{_1.$$=new k3(t,vt(),e);const n=new t;return _1.$$.e=n,_1.$$=null,n})}class g6 extends EventTarget{constructor(){super(),_1.$$&&this.attach(_1)}get el(){return this.$$.a}get $el(){return this.$$.$el()}get scope(){return this.$$.d}get attachScope(){return this.$$.f}get connectScope(){return this.$$.g}get $props(){return this.$$.i}get $state(){return this.$$.h}get state(){return this.$$.k}attach({$$:e}){return this.$$=e,e.t(this),this}addEventListener(e,n,i){this.listen(e,n,i)}removeEventListener(e,n,i){this.el?.removeEventListener(e,n,i)}setAttributes(e){this.$$.b||(this.$$.b={}),Object.assign(this.$$.b,e)}setStyles(e){this.$$.c||(this.$$.c={}),Object.assign(this.$$.c,e)}setCSSVars(e){this.setStyles(e)}createEvent(e,...n){return new Vt(e,n[0])}dispatch(e,...n){if(!this.el)return!1;const i=e instanceof Event?e:new Vt(e,n[0]);return Object.defineProperty(i,"target",{get:()=>this.$$.e}),t6(()=>(this.$$[p6]?.(i),this.el.dispatchEvent(i)))}dispatchEvent(e){return this.dispatch(e)}listen(e,n,i){return this.el?f6(this.el,e,n,i):_t}}function R3(t,e){for(const n of t)n(e)}function v6(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function I3(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function P3(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Ot=t=>t===null?"":t+"",Z3=t=>t===null?null:t+"",F3=t=>t===null?0:Number(t),m6=t=>t!==null,D3=()=>null,B3=t=>t===null?[]:JSON.parse(t),W3=t=>t===null?{}:JSON.parse(t);function j3(t){if(t===null)return Z3;switch(typeof t){case"undefined":return Ot;case"string":return Ot;case"boolean":return m6;case"number":return F3;case"function":return D3;case"object":return Et(t)?B3:W3;default:return Ot}}const q=Symbol(0),y6=Symbol(0),Q=Symbol(0),f1=Symbol(0);function z3(t,e){var n,i,r;const s=class extends t{constructor(...l){if(super(...l),this[i]=0,this[r]=null,this.keepAlive=!1,this.forwardKeepAlive=!0,this.$=Z(()=>N3(e),null),this.$.$$.t(this),e.props){const c=this.$props,u=Object.getOwnPropertyDescriptors(this);for(const f of Object.keys(u))f in e.props&&(c[f].set(this[f]),delete this[f])}}static get observedAttributes(){if(!this[q]&&e.props){const l=new Map;for(const c of Object.keys(e.props)){let u=this.attrs?.[c],f=Ht(u)?u:u&&u?.attr;f!==!1&&(f||(f=v6(c)),l.set(f,{C:c,B:u&&!Ht(u)&&u?.converter||j3(e.props[c])}))}this[q]=l}return this[q]?Array.from(this[q].keys()):[]}get scope(){return this.$.$$.d}get attachScope(){return this.$.$$.f}get connectScope(){return this.$.$$.g}get $props(){return this.$.$$.i}get $state(){return this.$.$$.h}get state(){return this.$.state}attributeChangedCallback(l,c,u){const f=this.constructor;if(!f[q]){super.attributeChangedCallback?.(l,c,u);return}const h=f[q].get(l);h&&(this[h.C]=h.B(u))}connectedCallback(){const l=this.$?.$$;if(!l||l.o)return;if(this[Q]!==2){q3.call(this);return}if(!this.isConnected)return;this.hasAttribute("keep-alive")&&(this.keepAlive=!0),l.y(),Et(this[f1])&&R3(this[f1],this),this[f1]=null;const c=super.connectedCallback;c&&Z(()=>c.call(this),this.connectScope)}disconnectedCallback(){const l=this.$?.$$;if(!l||l.o)return;l.z();const c=super.disconnectedCallback;c&&c.call(this),!this.keepAlive&&!this.hasAttribute("keep-alive")&&setTimeout(()=>{requestAnimationFrame(()=>{this.isConnected||l.p()})},0)}[(n=q,i=Q,r=f1,y6)](){const l=this.$.$$,c=this.constructor;if(l.o)return;const u=c[q];if(u)for(const f of this.attributes){let h=u.get(f.name);h&&h.B&&l.i[h.C].set(h.B(this.getAttribute(f.name)))}l.w(),l.x(this),this[Q]=2,this.connectedCallback()}subscribe(l){return this.$.subscribe(l)}destroy(){this.disconnectedCallback(),this.$.destroy()}};s[n]=null;let o=s;return U3(o,e),o}function U3(t,e){const n=t.prototype,i=e.prototype;if(e.props)for(const r of Object.keys(e.props))Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get(){return this.$props[r]()},set(s){this.$props[r].set(s)}});if(i[L1])for(const r of i[L1])Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get(){return this.$[r]},set(s){this.$[r]=s}});if(i[x1])for(const r of i[x1])n[r]=function(...s){return this.$[r](...s)}}function q3(){if(this[Q]!==0)return;this[Q]=1;const t=K3(this),e=t&&window.customElements.get(t.localName),n=t&&t[Q]===2;if(t&&(!e||!n)){G3.call(this,t);return}b6.call(this,t)}async function G3(t){await window.customElements.whenDefined(t.localName),t[Q]!==2&&await new Promise(e=>(t[f1]??(t[f1]=[])).push(e)),b6.call(this,t)}function b6(t){if(this.isConnected){if(t){t.keepAlive&&t.forwardKeepAlive&&(this.keepAlive=!0,this.setAttribute("keep-alive",""));const e=this.$.$$.d;e&&t.$.$$.f.append(e)}this[y6]()}}function K3(t){let e=t.parentNode,n=t.localName.split("-",1)[0]+"-";for(;e;){if(e.nodeType===1&&e.localName.startsWith(n))return e;e=e.parentNode}return null}function Y3(t,e=!1){(e||!window.customElements.get(t.tagName))&&window.customElements.define(t.tagName,t)}class X3 extends g6{subscribe(e){return Z(()=>Q1(()=>e(this.state)),this.$$.d)}destroy(){this.$$.p()}}function J3(t,e,n){t[L1]||(t[L1]=new Set),t[L1].add(e)}function Q3(t,e,n){t[x1]||(t[x1]=new Set),t[x1].add(e)}class te{constructor(e){this.id=Symbol(0),this.record=e,this.A=Object.getOwnPropertyDescriptors(e)}create(){const e={},n=new Proxy(e,{get:(i,r)=>e[r]()});for(const i of Object.keys(this.record)){const r=this.A[i].get;e[i]=r?h6(r.bind(n)):J1(this.record[i])}return e}reset(e,n){for(const i of Object.keys(e))!this.A[i].get&&(!n||n(i))&&e[i].set(this.record[i])}}function ee(t){return d6(t)}function ne(t){return X1(t)?t():t}function ie(t){return t?"true":"false"}function w6(){const t=new Set;return{add(...e){for(const n of e)t.add(n)},empty(){for(const e of t)e();t.clear()}}}function re(){const t=w6();return w1(t.empty),t}function se(t){return Object.keys(t)}function oe(){let t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}function le(t){return new Promise(e=>setTimeout(e,t))}function ce(t){let e=-1,n;function i(...r){n=r,!(e>=0)&&(e=window.requestAnimationFrame(()=>{t.apply(this,n),e=-1,n=void 0}))}return i}const ae=typeof window<"u"?"requestIdleCallback"in window?window.requestIdleCallback:t=>window.setTimeout(t,1):_t;function ue(t,e){return new Promise(n=>{ae(i=>{t?.(i),n()},e)})}var T={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},A6=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],L6=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],x6=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],_=typeof window<"u"&&typeof window.document<"u"?window.document:{},O="fullscreenEnabled"in _&&Object.keys(T)||A6[0]in _&&A6||L6[0]in _&&L6||x6[0]in _&&x6||[],fe={requestFullscreen:function(t){return t[O[T.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[O[T.requestFullscreen]]},get exitFullscreen(){return _[O[T.exitFullscreen]].bind(_)},get fullscreenPseudoClass(){return":"+O[T.fullscreen]},addEventListener:function(t,e,n){return _.addEventListener(O[T[t]],e,n)},removeEventListener:function(t,e,n){return _.removeEventListener(O[T[t]],e,n)},get fullscreenEnabled(){return!!_[O[T.fullscreenEnabled]]},set fullscreenEnabled(t){},get fullscreenElement(){return _[O[T.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return _[("on"+O[T.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return _[("on"+O[T.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return _[("on"+O[T.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return _[("on"+O[T.fullscreenerror]).toLowerCase()]=t}};const tt=Math.min,t1=Math.max,et=Math.round,nt=Math.floor,G=t=>({x:t,y:t}),he={left:"right",right:"left",bottom:"top",top:"bottom"},Ce={start:"end",end:"start"};function _6(t,e,n){return t1(t,tt(e,n))}function Nt(t,e){return typeof t=="function"?t(e):t}function h1(t){return t.split("-")[0]}function Rt(t){return t.split("-")[1]}function H6(t){return t==="x"?"y":"x"}function E6(t){return t==="y"?"height":"width"}function H1(t){return["top","bottom"].includes(h1(t))?"y":"x"}function V6(t){return H6(H1(t))}function de(t,e,n){n===void 0&&(n=!1);const i=Rt(t),r=V6(t),s=E6(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=it(o)),[o,it(o)]}function pe(t){const e=it(t);return[It(t),e,It(e)]}function It(t){return t.replace(/start|end/g,e=>Ce[e])}function $e(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function ge(t,e,n,i){const r=Rt(t);let s=$e(h1(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(It)))),s}function it(t){return t.replace(/left|right|bottom|top/g,e=>he[e])}function ve(t){return{top:0,right:0,bottom:0,left:0,...t}}function me(t){return typeof t!="number"?ve(t):{top:t,right:t,bottom:t,left:t}}function rt(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function M6(t,e,n){let{reference:i,floating:r}=t;const s=H1(e),o=V6(e),a=E6(o),l=h1(e),c=s==="y",u=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let C;switch(l){case"top":C={x:u,y:i.y-r.height};break;case"bottom":C={x:u,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:f};break;case"left":C={x:i.x-r.width,y:f};break;default:C={x:i.x,y:i.y}}switch(Rt(e)){case"start":C[o]-=h*(n&&c?-1:1);break;case"end":C[o]+=h*(n&&c?-1:1);break}return C}const ye=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=M6(c,i,l),h=i,C={},d=0;for(let p=0;p<a.length;p++){const{name:g,fn:$}=a[p],{x:v,y,data:A,reset:w}=await $({x:u,y:f,initialPlacement:i,placement:h,strategy:r,middlewareData:C,rects:c,platform:o,elements:{reference:t,floating:e}});u=v??u,f=y??f,C={...C,[g]:{...C[g],...A}},w&&d<=50&&(d++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):w.rects),{x:u,y:f}=M6(c,h,l)),p=-1)}return{x:u,y:f,placement:h,strategy:r,middlewareData:C}};async function T6(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:C=0}=Nt(e,t),d=me(C),g=a[h?f==="floating"?"reference":"floating":f],$=rt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=f==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),A=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},w=rt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:($.top-w.top+d.top)/A.y,bottom:(w.bottom-$.bottom+d.bottom)/A.y,left:($.left-w.left+d.left)/A.x,right:(w.right-$.right+d.right)/A.x}}const be=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0,...g}=Nt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const $=h1(r),v=H1(a),y=h1(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(y||!p?[it(a)]:pe(a)),I=d!=="none";!h&&I&&w.push(...ge(a,p,d,A));const m1=[a,...w],W=await T6(e,g),X=[];let j=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&X.push(W[$]),f){const L=de(r,o,A);X.push(W[L[0]],W[L[1]])}if(j=[...j,{placement:r,overflows:X}],!X.every(L=>L<=0)){var y1,b1;const L=(((y1=s.flip)==null?void 0:y1.index)||0)+1,s1=m1[L];if(s1)return{data:{index:L,overflows:j},reset:{placement:s1}};let H=(b1=j.filter(m=>m.overflows[0]<=0).sort((m,E)=>m.overflows[1]-E.overflows[1])[0])==null?void 0:b1.placement;if(!H)switch(C){case"bestFit":{var x;const m=(x=j.filter(E=>{if(I){const V=H1(E.placement);return V===v||V==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(V=>V>0).reduce((V,o1)=>V+o1,0)]).sort((E,V)=>E[1]-V[1])[0])==null?void 0:x[0];m&&(H=m);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}},we=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:$,y:v}=g;return{x:$,y:v}}},...l}=Nt(t,e),c={x:n,y:i},u=await T6(e,l),f=H1(h1(r)),h=H6(f);let C=c[h],d=c[f];if(s){const g=h==="y"?"top":"left",$=h==="y"?"bottom":"right",v=C+u[g],y=C-u[$];C=_6(v,C,y)}if(o){const g=f==="y"?"top":"left",$=f==="y"?"bottom":"right",v=d+u[g],y=d-u[$];d=_6(v,d,y)}const p=a.fn({...e,[h]:C,[f]:d});return{...p,data:{x:p.x-n,y:p.y-i}}}}};function C1(t){return S6(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function B(t){var e;return(e=(S6(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function S6(t){return t instanceof Node||t instanceof S(t).Node}function F(t){return t instanceof Element||t instanceof S(t).Element}function D(t){return t instanceof HTMLElement||t instanceof S(t).HTMLElement}function k6(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof S(t).ShadowRoot}function E1(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function Ae(t){return["table","td","th"].includes(C1(t))}function st(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Pt(t){const e=Zt(),n=R(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Le(t){let e=K(t);for(;D(e)&&!d1(e);){if(st(e))return null;if(Pt(e))return e;e=K(e)}return null}function Zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function d1(t){return["html","body","#document"].includes(C1(t))}function R(t){return S(t).getComputedStyle(t)}function ot(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(C1(t)==="html")return t;const e=t.assignedSlot||t.parentNode||k6(t)&&t.host||B(t);return k6(e)?e.host:e}function O6(t){const e=K(t);return d1(e)?t.ownerDocument?t.ownerDocument.body:t.body:D(e)&&E1(e)?e:O6(e)}function V1(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=O6(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=S(r);return s?e.concat(o,o.visualViewport||[],E1(r)?r:[],o.frameElement&&n?V1(o.frameElement):[]):e.concat(r,V1(r,[],n))}function N6(t){const e=R(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=D(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=et(n)!==s||et(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Ft(t){return F(t)?t:t.contextElement}function p1(t){const e=Ft(t);if(!D(e))return G(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=N6(e);let o=(s?et(n.width):n.width)/i,a=(s?et(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const xe=G(0);function R6(t){const e=S(t);return!Zt()||!e.visualViewport?xe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==S(t)?!1:e}function e1(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Ft(t);let o=G(1);e&&(i?F(i)&&(o=p1(i)):o=p1(t));const a=_e(s,n,i)?R6(s):G(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,f=r.height/o.y;if(s){const h=S(s),C=i&&F(i)?S(i):i;let d=h,p=d.frameElement;for(;p&&i&&C!==d;){const g=p1(p),$=p.getBoundingClientRect(),v=R(p),y=$.left+(p.clientLeft+parseFloat(v.paddingLeft))*g.x,A=$.top+(p.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=y,c+=A,d=S(p),p=d.frameElement}}return rt({width:u,height:f,x:l,y:c})}function He(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=B(i),a=e?st(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=G(1);const u=G(0),f=D(i);if((f||!f&&!s)&&((C1(i)!=="body"||E1(o))&&(l=ot(i)),D(i))){const h=e1(i);c=p1(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Ee(t){return Array.from(t.getClientRects())}function I6(t){return e1(B(t)).left+ot(t).scrollLeft}function Ve(t){const e=B(t),n=ot(t),i=t.ownerDocument.body,r=t1(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=t1(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+I6(t);const a=-n.scrollTop;return R(i).direction==="rtl"&&(o+=t1(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function Me(t,e){const n=S(t),i=B(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=Zt();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function Te(t,e){const n=e1(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=D(t)?p1(t):G(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function P6(t,e,n){let i;if(e==="viewport")i=Me(t,n);else if(e==="document")i=Ve(B(t));else if(F(e))i=Te(e,n);else{const r=R6(t);i={...e,x:e.x-r.x,y:e.y-r.y}}return rt(i)}function Z6(t,e){const n=K(t);return n===e||!F(n)||d1(n)?!1:R(n).position==="fixed"||Z6(n,e)}function Se(t,e){const n=e.get(t);if(n)return n;let i=V1(t,[],!1).filter(a=>F(a)&&C1(a)!=="body"),r=null;const s=R(t).position==="fixed";let o=s?K(t):t;for(;F(o)&&!d1(o);){const a=R(o),l=Pt(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||E1(o)&&!l&&Z6(t,o))?i=i.filter(u=>u!==o):r=a,o=K(o)}return e.set(t,i),i}function ke(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?st(e)?[]:Se(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const f=P6(e,u,r);return c.top=t1(f.top,c.top),c.right=tt(f.right,c.right),c.bottom=tt(f.bottom,c.bottom),c.left=t1(f.left,c.left),c},P6(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Oe(t){const{width:e,height:n}=N6(t);return{width:e,height:n}}function Ne(t,e,n){const i=D(e),r=B(e),s=n==="fixed",o=e1(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=G(0);if(i||!i&&!s)if((C1(e)!=="body"||E1(r))&&(a=ot(e)),i){const f=e1(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&(l.x=I6(r));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function Dt(t){return R(t).position==="static"}function F6(t,e){return!D(t)||R(t).position==="fixed"?null:e?e(t):t.offsetParent}function D6(t,e){const n=S(t);if(st(t))return n;if(!D(t)){let r=K(t);for(;r&&!d1(r);){if(F(r)&&!Dt(r))return r;r=K(r)}return n}let i=F6(t,e);for(;i&&Ae(i)&&Dt(i);)i=F6(i,e);return i&&d1(i)&&Dt(i)&&!Pt(i)?n:i||Le(t)||n}const Re=async function(t){const e=this.getOffsetParent||D6,n=this.getDimensions,i=await n(t.floating);return{reference:Ne(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ie(t){return R(t).direction==="rtl"}const Pe={convertOffsetParentRelativeRectToViewportRelativeRect:He,getDocumentElement:B,getClippingRect:ke,getOffsetParent:D6,getElementRects:Re,getClientRects:Ee,getDimensions:Oe,getScale:p1,isElement:F,isRTL:Ie};function Ze(t,e){let n=null,i;const r=B(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const C=nt(u),d=nt(r.clientWidth-(c+f)),p=nt(r.clientHeight-(u+h)),g=nt(c),v={rootMargin:-C+"px "+-d+"px "+-p+"px "+-g+"px",threshold:t1(0,tt(1,l))||1};let y=!0;function A(w){const I=w[0].intersectionRatio;if(I!==l){if(!y)return o();I?o(!1,I):i=setTimeout(()=>{o(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(A,{...v,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,v)}n.observe(t)}return o(!0),s}function Fe(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Ft(t),u=r||s?[...c?V1(c):[],...V1(e)]:[];u.forEach($=>{r&&$.addEventListener("scroll",n,{passive:!0}),s&&$.addEventListener("resize",n)});const f=c&&a?Ze(c,n):null;let h=-1,C=null;o&&(C=new ResizeObserver($=>{let[v]=$;v&&v.target===c&&C&&(C.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=C)==null||y.observe(e)})),n()}),c&&!l&&C.observe(c),C.observe(e));let d,p=l?e1(t):null;l&&g();function g(){const $=e1(t);p&&($.x!==p.x||$.y!==p.y||$.width!==p.width||$.height!==p.height)&&n(),p=$,d=requestAnimationFrame(g)}return n(),()=>{var $;u.forEach(v=>{r&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f?.(),($=C)==null||$.disconnect(),C=null,l&&cancelAnimationFrame(d)}}const De=we,Be=be,We=(t,e,n)=>{const i=new Map,r={platform:Pe,...n},s={...r.platform,_c:i};return ye(t,e,{...r,platform:s})};var je=ze;function ze(t,e,n){var i=null,r=null,s=function(){i&&(clearTimeout(i),r=null,i=null)},o=function(){var l=r;s(),l&&l()},a=function(){if(!e)return t.apply(this,arguments);var l=this,c=arguments,u=n&&!i;if(s(),r=function(){t.apply(l,c)},i=setTimeout(function(){if(i=null,!u){var f=r;return r=null,f()}},e),u)return r()};return a.cancel=s,a.flush=o,a}var Ue=qe;function qe(t,e,n){var i=null,r=null,s=n&&n.leading,o=n&&n.trailing;s==null&&(s=!0),o==null&&(o=!s),s==!0&&(o=!1);var a=function(){i&&(clearTimeout(i),i=null)},l=function(){var u=r;a(),u&&u()},c=function(){var u=s&&!i,f=this,h=arguments;if(r=function(){return t.apply(f,h)},i||(i=setTimeout(function(){if(i=null,o)return r()},e)),u)return u=!1,r()};return c.cancel=a,c.flush=l,c}var Bt;const lt=window,$1=lt.trustedTypes,B6=$1?$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,Wt="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,W6="?"+Y,Ge=`<${W6}>`,n1=document,M1=()=>n1.createComment(""),T1=t=>t===null||typeof t!="object"&&typeof t!="function",j6=Array.isArray,Ke=t=>j6(t)||typeof t?.[Symbol.iterator]=="function",jt=`[ \f\r]`,S1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z6=/-->/g,U6=/>/g,i1=RegExp(`>|${jt}(?:([^\\s"'>=/]+)(${jt}*=${jt}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),q6=/'/g,G6=/"/g,K6=/^(?:script|style|textarea|title)$/i,Ye=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Xe=Ye(1),g1=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Y6=new WeakMap,r1=n1.createTreeWalker(n1,129,null,!1);function X6(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return B6!==void 0?B6.createHTML(e):e}const Je=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":"",o=S1;for(let a=0;a<n;a++){const l=t[a];let c,u,f=-1,h=0;for(;h<l.length&&(o.lastIndex=h,u=o.exec(l),u!==null);)h=o.lastIndex,o===S1?u[1]==="!--"?o=z6:u[1]!==void 0?o=U6:u[2]!==void 0?(K6.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=i1):u[3]!==void 0&&(o=i1):o===i1?u[0]===">"?(o=r??S1,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?i1:u[3]==='"'?G6:q6):o===G6||o===q6?o=i1:o===z6||o===U6?o=S1:(o=i1,r=void 0);const C=o===i1&&t[a+1].startsWith("/>")?" ":"";s+=o===S1?l+Ge:f>=0?(i.push(c),l.slice(0,f)+Wt+l.slice(f)+Y+C):l+Y+(f===-2?(i.push(void 0),a):C)}return[X6(t,s+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class N1{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[c,u]=Je(e,n);if(this.el=N1.createElement(c,i),r1.currentNode=this.el.content,n===2){const f=this.el.content,h=f.firstChild;h.remove(),f.append(...h.childNodes)}for(;(r=r1.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes()){const f=[];for(const h of r.getAttributeNames())if(h.endsWith(Wt)||h.startsWith(Y)){const C=u[o++];if(f.push(h),C!==void 0){const d=r.getAttribute(C.toLowerCase()+Wt).split(Y),p=/([.?@])?(.*)/.exec(C);l.push({type:1,index:s,name:p[2],strings:d,ctor:p[1]==="."?t2:p[1]==="?"?n2:p[1]==="@"?i2:ct})}else l.push({type:6,index:s})}for(const h of f)r.removeAttribute(h)}if(K6.test(r.tagName)){const f=r.textContent.split(Y),h=f.length-1;if(h>0){r.textContent=$1?$1.emptyScript:"";for(let C=0;C<h;C++)r.append(f[C],M1()),r1.nextNode(),l.push({type:2,index:++s});r.append(f[h],M1())}}}else if(r.nodeType===8)if(r.data===W6)l.push({type:2,index:s});else{let f=-1;for(;(f=r.data.indexOf(Y,f+1))!==-1;)l.push({type:7,index:s}),f+=Y.length-1}s++}}static createElement(e,n){const i=n1.createElement("template");return i.innerHTML=e,i}}function v1(t,e,n=t,i){var r,s,o,a;if(e===g1)return e;let l=i!==void 0?(r=n._$Co)===null||r===void 0?void 0:r[i]:n._$Cl;const c=T1(e)?void 0:e._$litDirective$;return l?.constructor!==c&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,n,i)),i!==void 0?((o=(a=n)._$Co)!==null&&o!==void 0?o:a._$Co=[])[i]=l:n._$Cl=l),l!==void 0&&(e=v1(t,l._$AS(t,e.values),l,i)),e}class Qe{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:i},parts:r}=this._$AD,s=((n=e?.creationScope)!==null&&n!==void 0?n:n1).importNode(i,!0);r1.currentNode=s;let o=r1.nextNode(),a=0,l=0,c=r[0];for(;c!==void 0;){if(a===c.index){let u;c.type===2?u=new R1(o,o.nextSibling,this,e):c.type===1?u=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(u=new r2(o,this,e)),this._$AV.push(u),c=r[++l]}a!==c?.index&&(o=r1.nextNode(),a++)}return r1.currentNode=n1,s}v(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class R1{constructor(e,n,i,r){var s;this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cp=(s=r?.isConnected)===null||s===void 0||s}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=v1(this,e,n),T1(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==g1&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Ke(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==b&&T1(this._$AH)?this._$AA.nextSibling.data=e:this.$(n1.createTextNode(e)),this._$AH=e}g(e){var n;const{values:i,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=N1.createElement(X6(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===s)this._$AH.v(i);else{const o=new Qe(s,this),a=o.u(this.options);o.v(i),this.$(a),this._$AH=o}}_$AC(e){let n=Y6.get(e.strings);return n===void 0&&Y6.set(e.strings,n=new N1(e)),n}T(e){j6(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new R1(this.k(M1()),this.k(M1()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class ct{constructor(e,n,i,r,s){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=b}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,i,r){const s=this.strings;let o=!1;if(s===void 0)e=v1(this,e,n,0),o=!T1(e)||e!==this._$AH&&e!==g1,o&&(this._$AH=e);else{const a=e;let l,c;for(e=s[0],l=0;l<s.length-1;l++)c=v1(this,a[i+l],n,l),c===g1&&(c=this._$AH[l]),o||(o=!T1(c)||c!==this._$AH[l]),c===b?e=b:e!==b&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!r&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class t2 extends ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}}const e2=$1?$1.emptyScript:"";class n2 extends ct{constructor(){super(...arguments),this.type=4}j(e){e&&e!==b?this.element.setAttribute(this.name,e2):this.element.removeAttribute(this.name)}}class i2 extends ct{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var i;if((e=(i=v1(this,e,n,0))!==null&&i!==void 0?i:b)===g1)return;const r=this._$AH,s=e===b&&r!==b||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==b&&(r===b||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class r2{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){v1(this,e)}}const J6=lt.litHtmlPolyfillSupport;J6?.(N1,R1),((Bt=lt.litHtmlVersions)!==null&&Bt!==void 0?Bt:lt.litHtmlVersions=[]).push("2.8.0");const s2=(t,e,n)=>{var i,r;const s=(i=n?.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const a=(r=n?.renderBefore)!==null&&r!==void 0?r:null;s._$litPart$=o=new R1(e.insertBefore(M1(),a),a,void 0,n??{})}return o._$AI(t),o};const o2=t=>t.strings===void 0,l2={},c2=(t,e=l2)=>t._$AH=e;const zt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},k1=t=>(...e)=>({_$litDirective$:t,values:e});let Ut=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const O1=(t,e)=>{var n,i;const r=t._$AN;if(r===void 0)return!1;for(const s of r)(i=(n=s)._$AO)===null||i===void 0||i.call(n,e,!1),O1(s,e);return!0},at=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while(n?.size===0)},Q6=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),f2(e)}};function a2(t){this._$AN!==void 0?(at(this),this._$AM=t,Q6(this)):this._$AM=t}function u2(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let s=n;s<i.length;s++)O1(i[s],!1),at(i[s]);else i!=null&&(O1(i,!1),at(i));else O1(this,t)}const f2=t=>{var e,n,i,r;t.type==zt.CHILD&&((e=(i=t)._$AP)!==null&&e!==void 0||(i._$AP=u2),(n=(r=t)._$AQ)!==null&&n!==void 0||(r._$AQ=a2))};let t3=class extends Ut{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),Q6(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)===null||i===void 0||i.call(this):(r=this.disconnected)===null||r===void 0||r.call(this)),n&&(O1(this,e),at(this))}setValue(e){if(o2(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}};const h2=t=>t??b,qt=new WeakMap,C2=k1(class extends t3{render(t){return b}update(t,[e]){var n;const i=e!==this.G;return i&&this.G!==void 0&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=e,this.dt=(n=t.options)===null||n===void 0?void 0:n.host,this.ot(this.lt=t.element)),b}ot(t){var e;if(typeof this.G=="function"){const n=(e=this.dt)!==null&&e!==void 0?e:globalThis;let i=qt.get(n);i===void 0&&(i=new WeakMap,qt.set(n,i)),i.get(this.G)!==void 0&&this.G.call(this.dt,void 0),i.set(this.G,t),t!==void 0&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,n;return typeof this.G=="function"?(e=qt.get((t=this.dt)!==null&&t!==void 0?t:globalThis))===null||e===void 0?void 0:e.get(this.G):(n=this.G)===null||n===void 0?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});let ut=class extends Ut{constructor(e){if(super(e),this.et=b,e.type!==zt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this.ft=void 0,this.et=e;if(e===g1)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const n=[e];return n.raw=n,this.ft={_$litType$:this.constructor.resultType,strings:n,values:[]}}};ut.directiveName="unsafeHTML",ut.resultType=1;const d2=k1(ut);let Gt=class extends ut{};Gt.directiveName="unsafeSVG",Gt.resultType=2;const p2=k1(Gt);const $2=k1(class extends Ut{constructor(){super(...arguments),this.key=b}render(t,e){return this.key=t,e}update(t,[e,n]){return e!==this.key&&(c2(t),this.key=e),n}}),e3=t=>typeof t=="object"&&t!=null&&t.nodeType===1,n3=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Kt=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return n3(n.overflowY,e)||n3(n.overflowX,e)||(i=>{const r=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(t)}return!1},ft=(t,e,n,i,r,s,o,a)=>s<t&&o>e||s>t&&o<e?0:s<=t&&a<=n||o>=e&&a>=n?s-t-i:o>e&&a<n||s<t&&a>n?o-e+r:0,g2=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},v2=(t,e)=>{var n,i,r,s;if(typeof document>"u")return[];const{scrollMode:o,block:a,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,f=typeof c=="function"?c:H=>H!==c;if(!e3(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,C=[];let d=t;for(;e3(d)&&f(d);){if(d=g2(d),d===h){C.push(d);break}d!=null&&d===document.body&&Kt(d)&&!Kt(document.documentElement)||d!=null&&Kt(d,u)&&C.push(d)}const p=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,g=(s=(r=window.visualViewport)==null?void 0:r.height)!=null?s:innerHeight,{scrollX:$,scrollY:v}=window,{height:y,width:A,top:w,right:I,bottom:m1,left:W}=t.getBoundingClientRect(),{top:X,right:j,bottom:y1,left:b1}=(H=>{const m=window.getComputedStyle(H);return{top:parseFloat(m.scrollMarginTop)||0,right:parseFloat(m.scrollMarginRight)||0,bottom:parseFloat(m.scrollMarginBottom)||0,left:parseFloat(m.scrollMarginLeft)||0}})(t);let x=a==="start"||a==="nearest"?w-X:a==="end"?m1+y1:w+y/2-X+y1,L=l==="center"?W+A/2-b1+j:l==="end"?I+j:W-b1;const s1=[];for(let H=0;H<C.length;H++){const m=C[H],{height:E,width:V,top:o1,right:ht,bottom:Ct,left:I1}=m.getBoundingClientRect();if(o==="if-needed"&&w>=0&&W>=0&&m1<=g&&I<=p&&w>=o1&&m1<=Ct&&W>=I1&&I<=ht)return s1;const P1=getComputedStyle(m),Z1=parseInt(P1.borderLeftWidth,10),F1=parseInt(P1.borderTopWidth,10),D1=parseInt(P1.borderRightWidth,10),B1=parseInt(P1.borderBottomWidth,10);let z=0,U=0;const W1="offsetWidth"in m?m.offsetWidth-m.clientWidth-Z1-D1:0,j1="offsetHeight"in m?m.offsetHeight-m.clientHeight-F1-B1:0,dt="offsetWidth"in m?m.offsetWidth===0?0:V/m.offsetWidth:0,pt="offsetHeight"in m?m.offsetHeight===0?0:E/m.offsetHeight:0;if(h===m)z=a==="start"?x:a==="end"?x-g:a==="nearest"?ft(v,v+g,g,F1,B1,v+x,v+x+y,y):x-g/2,U=l==="start"?L:l==="center"?L-p/2:l==="end"?L-p:ft($,$+p,p,Z1,D1,$+L,$+L+A,A),z=Math.max(0,z+v),U=Math.max(0,U+$);else{z=a==="start"?x-o1-F1:a==="end"?x-Ct+B1+j1:a==="nearest"?ft(o1,Ct,E,F1,B1+j1,x,x+y,y):x-(o1+E/2)+j1/2,U=l==="start"?L-I1-Z1:l==="center"?L-(I1+V/2)+W1/2:l==="end"?L-ht+D1+W1:ft(I1,ht,V,Z1,D1+W1,L,L+A,A);const{scrollLeft:Yt,scrollTop:Xt}=m;z=pt===0?0:Math.max(0,Math.min(Xt+z/pt,m.scrollHeight-E/pt+j1)),U=dt===0?0:Math.max(0,Math.min(Yt+U/dt,m.scrollWidth-V/dt+W1)),x+=Xt-z,L+=Yt-U}s1.push({el:m,top:z,left:U})}return s1};var m2='<path fill-rule="evenodd" clip-rule="evenodd" d="M6 7C5.63181 7 5.33333 7.29848 5.33333 7.66667V14.8667C5.33333 14.9403 5.39361 14.9999 5.46724 15.0009C10.8844 15.0719 15.2614 19.449 15.3325 24.8661C15.3334 24.9397 15.393 25 15.4667 25H26C26.3682 25 26.6667 24.7015 26.6667 24.3333V7.66667C26.6667 7.29848 26.3682 7 26 7H6ZM17.0119 22.2294C17.0263 22.29 17.0802 22.3333 17.1425 22.3333H23.3333C23.7015 22.3333 24 22.0349 24 21.6667V10.3333C24 9.96514 23.7015 9.66667 23.3333 9.66667H8.66667C8.29848 9.66667 8 9.96514 8 10.3333V13.1909C8 13.2531 8.04332 13.3071 8.10392 13.3214C12.5063 14.3618 15.9715 17.827 17.0119 22.2294Z" fill="currentColor"/> <path d="M13.2 25C13.2736 25 13.3334 24.9398 13.3322 24.8661C13.2615 20.5544 9.77889 17.0718 5.46718 17.0011C5.39356 16.9999 5.33333 17.0597 5.33333 17.1333V18.8667C5.33333 18.9403 5.39348 18.9999 5.4671 19.0015C8.67465 19.0716 11.2617 21.6587 11.3319 24.8662C11.3335 24.9399 11.393 25 11.4667 25H13.2Z" fill="currentColor"/> <path d="M5.33333 21.1333C5.33333 21.0597 5.39332 20.9998 5.46692 21.0022C7.57033 21.0712 9.26217 22.763 9.33114 24.8664C9.33356 24.94 9.27364 25 9.2 25H6C5.63181 25 5.33333 24.7015 5.33333 24.3333V21.1333Z" fill="currentColor"/>',y2='<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0007 28.7923C15.0007 29.0152 14.9774 29.096 14.9339 29.1775C14.8903 29.259 14.8263 29.323 14.7449 29.3665C14.6634 29.4101 14.5826 29.4333 14.3597 29.4333H12.575C12.3521 29.4333 12.2713 29.4101 12.1898 29.3665C12.1083 29.323 12.0443 29.259 12.0008 29.1775C11.9572 29.096 11.934 29.0152 11.934 28.7923V12.2993L5.97496 12.3C5.75208 12.3 5.67125 12.2768 5.58977 12.2332C5.50829 12.1896 5.44434 12.1257 5.40077 12.0442C5.35719 11.9627 5.33398 11.8819 5.33398 11.659V9.87429C5.33398 9.65141 5.35719 9.57059 5.40077 9.48911C5.44434 9.40762 5.50829 9.34368 5.58977 9.3001C5.67125 9.25652 5.75208 9.23332 5.97496 9.23332H26.0263C26.2492 9.23332 26.33 9.25652 26.4115 9.3001C26.493 9.34368 26.557 9.40762 26.6005 9.48911C26.6441 9.57059 26.6673 9.65141 26.6673 9.87429V11.659C26.6673 11.8819 26.6441 11.9627 26.6005 12.0442C26.557 12.1257 26.493 12.1896 26.4115 12.2332C26.33 12.2768 26.2492 12.3 26.0263 12.3L20.067 12.2993L20.0673 28.7923C20.0673 29.0152 20.0441 29.096 20.0005 29.1775C19.957 29.259 19.893 29.323 19.8115 29.3665C19.73 29.4101 19.6492 29.4333 19.4263 29.4333H17.6416C17.4187 29.4333 17.3379 29.4101 17.2564 29.3665C17.175 29.323 17.111 29.259 17.0674 29.1775C17.0239 29.096 17.0007 29.0152 17.0007 28.7923L17 22.7663H15L15.0007 28.7923Z" fill="currentColor"/> <path d="M16.0007 7.89998C17.4734 7.89998 18.6673 6.70608 18.6673 5.23332C18.6673 3.76056 17.4734 2.56665 16.0007 2.56665C14.5279 2.56665 13.334 3.76056 13.334 5.23332C13.334 6.70608 14.5279 7.89998 16.0007 7.89998Z" fill="currentColor"/>',b2='<path d="M5.33334 6.00001C5.33334 5.63182 5.63181 5.33334 6 5.33334H26C26.3682 5.33334 26.6667 5.63182 26.6667 6.00001V20.6667C26.6667 21.0349 26.3682 21.3333 26 21.3333H23.7072C23.4956 21.3333 23.2966 21.233 23.171 21.0628L22.1859 19.7295C21.8607 19.2894 22.1749 18.6667 22.7221 18.6667H23.3333C23.7015 18.6667 24 18.3682 24 18V8.66668C24 8.29849 23.7015 8.00001 23.3333 8.00001H8.66667C8.29848 8.00001 8 8.29849 8 8.66668V18C8 18.3682 8.29848 18.6667 8.66667 18.6667H9.29357C9.84072 18.6667 10.1549 19.2894 9.82976 19.7295L8.84467 21.0628C8.71898 21.233 8.52 21.3333 8.30848 21.3333H6C5.63181 21.3333 5.33334 21.0349 5.33334 20.6667V6.00001Z" fill="currentColor"/> <path d="M8.78528 25.6038C8.46013 26.0439 8.77431 26.6667 9.32147 26.6667L22.6785 26.6667C23.2256 26.6667 23.5398 26.0439 23.2146 25.6038L16.5358 16.5653C16.2693 16.2046 15.73 16.2047 15.4635 16.5653L8.78528 25.6038Z" fill="currentColor"/>',w2='<path d="M17.4853 18.9093C17.4853 19.0281 17.6289 19.0875 17.7129 19.0035L22.4185 14.2979C22.6788 14.0376 23.1009 14.0376 23.3613 14.2979L24.7755 15.7122C25.0359 15.9725 25.0359 16.3946 24.7755 16.655L16.2902 25.1403C16.0299 25.4006 15.6078 25.4006 15.3474 25.1403L13.9332 23.726L13.9319 23.7247L6.86189 16.6547C6.60154 16.3944 6.60154 15.9723 6.86189 15.7119L8.2761 14.2977C8.53645 14.0373 8.95856 14.0373 9.21891 14.2977L13.9243 19.0031C14.0083 19.0871 14.1519 19.0276 14.1519 18.9088L14.1519 6.00004C14.1519 5.63185 14.4504 5.33337 14.8186 5.33337L16.8186 5.33337C17.1868 5.33337 17.4853 5.63185 17.4853 6.00004L17.4853 18.9093Z" fill="currentColor"/>',A2='<path d="M13.0908 14.3334C12.972 14.3334 12.9125 14.1898 12.9965 14.1058L17.7021 9.40022C17.9625 9.13987 17.9625 8.71776 17.7021 8.45741L16.2879 7.04319C16.0275 6.78284 15.6054 6.78284 15.3451 7.04319L6.8598 15.5285C6.59945 15.7888 6.59945 16.2109 6.8598 16.4713L8.27401 17.8855L8.27536 17.8868L15.3453 24.9568C15.6057 25.2172 16.0278 25.2172 16.2881 24.9568L17.7024 23.5426C17.9627 23.2822 17.9627 22.860