"use strict";const a=require("./lit-element-Bij_rEQt.js");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const m={attribute:!0,type:String,converter:a.u,reflect:!1,hasChanged:a.f},y=(t=m,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),i==="accessor"){const{name:c}=s;return{set(o){const h=e.get.call(this);e.set.call(this,o),this.requestUpdate(c,h,t)},init(o){return o!==void 0&&this.C(c,void 0,t,o),o}}}if(i==="setter"){const{name:c}=s;return function(o){const h=this[c];e.call(this,o),this.requestUpdate(c,h,t)}}throw Error("Unsupported decorator location: "+i)};function C(t){return(e,s)=>typeof s=="object"?y(t,e,s):((i,r,n)=>{const c=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),c?Object.getOwnPropertyDescriptor(r,n):void 0})(t,e,s)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function T(t){return C({...t,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const M=t=>t??a.E;/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const O=t=>t===null||typeof t!="object"&&typeof t!="function",P=t=>t.strings===void 0;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const A={ATTRIBUTE:1,CHILD:2},_=t=>(...e)=>({_$litDirective$:t,values:e});let v=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,i){this._$Ct=e,this._$AM=s,this._$Ci=i}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const u=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const r of s)(i=r._$AO)==null||i.call(r,e,!1),u(r,e);return!0},l=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},g=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),N(e)}};function U(t){this._$AN!==void 0?(l(this),this._$AM=t,g(this)):this._$AM=t}function j(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let n=s;n<i.length;n++)u(i[n],!1),l(i[n]);else i!=null&&(u(i,!1),l(i));else u(this,t)}const N=t=>{t.type==A.CHILD&&(t._$AP??(t._$AP=j),t._$AQ??(t._$AQ=U))};class w extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),g(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),s&&(u(this,e),l(this))}setValue(e){if(P(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
 * @license
 * Copyright 2021 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class E{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}}class I{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise(e=>this.Z=e))}resume(){var e;(e=this.Z)==null||e.call(this),this.Y=this.Z=void 0}}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const f=t=>!O(t)&&typeof t.then=="function",p=1073741823;class S extends w{constructor(){super(...arguments),this._$Cwt=p,this._$Cbt=[],this._$CK=new E(this),this._$CX=new I}render(...e){return e.find(s=>!f(s))??a.T}update(e,s){const i=this._$Cbt;let r=i.length;this._$Cbt=s;const n=this._$CK,c=this._$CX;this.isConnected||this.disconnected();for(let o=0;o<s.length&&!(o>this._$Cwt);o++){const h=s[o];if(!f(h))return this._$Cwt=o,h;o<r&&h===i[o]||(this._$Cwt=p,r=0,Promise.resolve(h).then(async b=>{for(;c.get();)await c.get();const d=n.deref();if(d!==void 0){const $=d._$Cbt.indexOf(h);$>-1&&$<d._$Cwt&&(d._$Cwt=$,d.setValue(b))}}))}return a.T}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const k=_(S);/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const x=_(class extends v{constructor(t){var e;if(super(t),t.type!==A.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var i,r;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in e)e[n]&&!((i=this.nt)!=null&&i.has(n))&&this.st.add(n);return this.render(e)}const s=t.element.classList;for(const n of this.st)n in e||(s.remove(n),this.st.delete(n));for(const n in e){const c=!!e[n];c===this.st.has(n)||(r=this.nt)!=null&&r.has(n)||(c?(s.add(n),this.st.add(n)):(s.remove(n),this.st.delete(n)))}return a.T}});exports.e=x;exports.e$1=_;exports.f=w;exports.m=k;exports.n=C;exports.o=M;exports.r=T;
