@a11d/lit 0.0.37 → 0.0.38
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/dist/bundle.js +1 -1
- package/dist/decorateReactiveElement.d.ts +10 -0
- package/dist/event/EventDispatcher.d.ts +1 -1
- package/dist/eventListener/eventListener.d.ts +6 -6
- package/dist/query/query.d.ts +2 -2
- package/dist/query/queryAll.d.ts +2 -2
- package/dist/style/style.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/updated/property.d.ts +2 -2
- package/dist/updated/state.d.ts +2 -2
- package/dist/updated/updated.d.ts +3 -3
- package/package.json +1 -1
- package/dist/Component/Component.js +0 -35
- package/dist/Component/index.js +0 -2
- package/dist/Component/nothing.js +0 -2
- package/dist/Controller/Controller.js +0 -6
- package/dist/Controller/index.js +0 -1
- package/dist/decorateLitElement.d.ts +0 -10
- package/dist/decorateLitElement.js +0 -30
- package/dist/event/EventDispatcher.js +0 -1
- package/dist/event/HTMLElementEventDispatcher.js +0 -23
- package/dist/event/PureEventDispatcher.js +0 -16
- package/dist/event/event.js +0 -20
- package/dist/event/index.js +0 -4
- package/dist/eventListener/eventListener.js +0 -20
- package/dist/eventListener/eventListenerExtension.js +0 -54
- package/dist/eventListener/extractEventHandler.js +0 -9
- package/dist/eventListener/index.js +0 -3
- package/dist/index.js +0 -36
- package/dist/query/index.js +0 -3
- package/dist/query/query.js +0 -9
- package/dist/query/queryAll.js +0 -9
- package/dist/query/queryAllAsNodeList.js +0 -2
- package/dist/style/AsteriskSyntaxStyleHandler.js +0 -21
- package/dist/style/CustomPropertyStyleHandler.js +0 -14
- package/dist/style/index.js +0 -3
- package/dist/style/style.js +0 -32
- package/dist/types.js +0 -1
- package/dist/updated/index.js +0 -3
- package/dist/updated/property.js +0 -10
- package/dist/updated/state.js +0 -10
- package/dist/updated/updated.js +0 -22
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AsteriskSyntaxStyleHandler:()=>Ie,AsyncDirective:()=>Zt,AsyncReplaceDirective:()=>Ft,CSSResult:()=>r,Component:()=>Oe,Controller:()=>Me,CustomPropertyStyleHandler:()=>Ve,Directive:()=>Kt,HTMLElementEventDispatcher:()=>cs,LitElement:()=>ot,PartType:()=>It,PureEventDispatcher:()=>ls,ReactiveElement:()=>y,StyleDirective:()=>Le,TemplateResultType:()=>Pt,UnsafeHTMLDirective:()=>me,UntilDirective:()=>Se,UpdatingElement:()=>rt,_$LE:()=>ct,_$LH:()=>et,adoptStyles:()=>c,asyncAppend:()=>ee,asyncReplace:()=>te,cache:()=>se,choose:()=>ie,classMap:()=>ne,clearPart:()=>Bt,component:()=>xe,createRef:()=>pe,css:()=>l,defaultConverter:()=>v,directive:()=>Vt,event:()=>as,eventListener:()=>Qe,eventListenersSymbol:()=>Ze,eventOptions:()=>ut,extractEventHandler:()=>Xe,getCommittedValue:()=>Dt,getCompatibleStyle:()=>a,getDirectiveClass:()=>Ot,guard:()=>oe,html:()=>L,ifDefined:()=>le,insertPart:()=>kt,isDirectiveResult:()=>xt,isPrimitive:()=>Tt,isSingleExpression:()=>Mt,isTemplateResult:()=>Ut,join:()=>ce,keyed:()=>ae,literal:()=>mt,live:()=>he,map:()=>de,noChange:()=>j,notEqual:()=>f,nothing:()=>Ue,property:()=>Ye,query:()=>He,queryAll:()=>ke,queryAllAsNodeList:()=>Ne,queryAssignedElements:()=>$t,queryAssignedNodes:()=>yt,queryAsync:()=>pt,range:()=>ue,ref:()=>$e,removePart:()=>jt,render:()=>V,repeat:()=>_e,setChildPartValue:()=>Nt,setCommittedValue:()=>Lt,state:()=>Je,staticHtml:()=>wt,staticSvg:()=>Ct,style:()=>De,styleHandler:()=>Re,styleMap:()=>ge,supportsAdoptingStyleSheets:()=>s,svg:()=>D,templateContent:()=>Ae,unsafeCSS:()=>o,unsafeHTML:()=>be,unsafeSVG:()=>we,unsafeStatic:()=>At,until:()=>Te,updated:()=>We,updatedObserversSymbol:()=>Ge,when:()=>Pe,withStatic:()=>Et});const s=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),n=new WeakMap;class r{constructor(t,e,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&n.set(e,t))}return t}toString(){return this.cssText}}const o=t=>new r("string"==typeof t?t:t+"",void 0,i),l=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new r(s,t,i)},c=(t,e)=>{s?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const s=document.createElement("style"),i=window.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=e.cssText,t.appendChild(s)}))},a=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return o(e)})(t):t;var h;const d=window.trustedTypes,u=d?d.emptyScript:"",p=window.reactiveElementPolyfillSupport,v={toAttribute(t,e){switch(e){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},f=(t,e)=>e!==t&&(e==e||t==t),$={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:f};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||$}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=$){var i,n;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(null!==(n=null===(i=s.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==n?n:v.toAttribute)(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s,i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),o=t.converter,l=null!==(i=null!==(s=null==o?void 0:o.fromAttribute)&&void 0!==s?s:"function"==typeof o?o:null)&&void 0!==i?i:v.fromAttribute;this._$El=r,this[r]=l(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||f)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var _;y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==p||p({ReactiveElement:y}),(null!==(h=globalThis.reactiveElementVersions)&&void 0!==h?h:globalThis.reactiveElementVersions=[]).push("1.3.3");const g=globalThis.trustedTypes,A=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,b="?"+m,E=`<${b}>`,w=document,C=(t="")=>w.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,P=t=>{var e;return T(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,x=/-->/g,O=/>/g,M=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,H=/'/g,k=/"/g,N=/^(?:script|style|textarea|title)$/i,R=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),L=R(1),D=R(2),j=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),I=new WeakMap,V=(t,e,s)=>{var i,n;const r=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new Y(e.insertBefore(C(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o},K=w.createTreeWalker(w,129,null,!1),z=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":"",o=U;for(let e=0;e<s;e++){const s=t[e];let l,c,a=-1,h=0;for(;h<s.length&&(o.lastIndex=h,c=o.exec(s),null!==c);)h=o.lastIndex,o===U?"!--"===c[1]?o=x:void 0!==c[1]?o=O:void 0!==c[2]?(N.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=M):void 0!==c[3]&&(o=M):o===M?">"===c[0]?(o=null!=n?n:U,a=-1):void 0===c[1]?a=-2:(a=o.lastIndex-c[2].length,l=c[1],o=void 0===c[3]?M:'"'===c[3]?k:H):o===k||o===H?o=M:o===x||o===O?o=U:(o=M,n=void 0);const d=o===M&&t[e+1].startsWith("/>")?" ":"";r+=o===U?s+E:a>=0?(i.push(l),s.slice(0,a)+"$lit$"+s.slice(a)+m+d):s+m+(-2===a?(i.push(void 0),e):d)}const l=r+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==A?A.createHTML(l):l,i]};class q{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[c,a]=z(t,e);if(this.el=q.createElement(c,s),K.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=K.nextNode())&&l.length<o;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const s=a[r++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?X:"@"===e[1]?F:J})}else l.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(N.test(i.tagName)){const t=i.textContent.split(m),e=t.length-1;if(e>0){i.textContent=g?g.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],C()),K.nextNode(),l.push({type:2,index:++n});i.append(t[e],C())}}}else if(8===i.nodeType)if(i.data===b)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(m,t+1));)l.push({type:7,index:n}),t+=m.length-1}n++}}static createElement(t,e){const s=w.createElement("template");return s.innerHTML=t,s}}function G(t,e,s=t,i){var n,r,o,l;if(e===j)return e;let c=void 0!==i?null===(n=s._$Cl)||void 0===n?void 0:n[i]:s._$Cu;const a=S(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(r=null==c?void 0:c._$AO)||void 0===r||r.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,s,i)),void 0!==i?(null!==(o=(l=s)._$Cl)&&void 0!==o?o:l._$Cl=[])[i]=c:s._$Cu=c),void 0!==c&&(e=G(t,c._$AS(t,e.values),c,i)),e}class W{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:s},parts:i}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:w).importNode(s,!0);K.currentNode=n;let r=K.nextNode(),o=0,l=0,c=i[0];for(;void 0!==c;){if(o===c.index){let e;2===c.type?e=new Y(r,r.nextSibling,this,t):1===c.type?e=new c.ctor(r,c.name,c.strings,this,t):6===c.type&&(e=new tt(r,this,t)),this.v.push(e),c=i[++l]}o!==(null==c?void 0:c.index)&&(r=K.nextNode(),o++)}return n}m(t){let e=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Y{constructor(t,e,s,i){var n;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cg=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),S(t)?t===B||null==t||""===t?(this._$AH!==B&&this._$AR(),this._$AH=B):t!==this._$AH&&t!==j&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):P(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==B&&S(this._$AH)?this._$AA.nextSibling.data=t:this.k(w.createTextNode(t)),this._$AH=t}T(t){var e;const{values:s,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=q.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(s);else{const t=new W(n,this),e=t.p(this.options);t.m(s),this.k(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new q(t)),e}S(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new Y(this.M(C()),this.M(C()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class J{constructor(t,e,s,i,n){this.type=1,this._$AH=B,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=G(this,t,e,0),r=!S(t)||t!==this._$AH&&t!==j,r&&(this._$AH=t);else{const i=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=G(this,i[s+o],e,o),l===j&&(l=this._$AH[o]),r||(r=!S(l)||l!==this._$AH[o]),l===B?t=B:t!==B&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!i&&this.C(t)}C(t){t===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends J{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===B?void 0:t}}const Q=g?g.emptyScript:"";class X extends J{constructor(){super(...arguments),this.type=4}C(t){t&&t!==B?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class F extends J{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=G(this,t,e,0))&&void 0!==s?s:B)===j)return;const i=this._$AH,n=t===B&&i!==B||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==B&&(i===B||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class tt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const et={L:"$lit$",P:m,V:b,I:1,N:z,R:W,j:P,D:G,H:Y,F:J,O:X,W:F,B:Z,Z:tt},st=window.litHtmlPolyfillSupport;var it,nt;null==st||st(q,Y),(null!==(_=globalThis.litHtmlVersions)&&void 0!==_?_:globalThis.litHtmlVersions=[]).push("2.2.6");const rt=y;class ot extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=V(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return j}}ot.finalized=!0,ot._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:ot});const lt=globalThis.litElementPolyfillSupport;null==lt||lt({LitElement:ot});const ct={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.1");const at=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(s){s.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function ht(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):at(t,e)}const dt=({finisher:t,descriptor:e})=>(s,i)=>{var n;if(void 0===i){const i=null!==(n=s.originalKey)&&void 0!==n?n:s.key,r=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(s.key)}:{...s,key:i};return null!=t&&(r.finisher=function(e){t(e,i)}),r}{const n=s.constructor;void 0!==e&&Object.defineProperty(s,i,e(i)),null==t||t(n,i)}};function ut(t){return dt({finisher:(e,s)=>{Object.assign(e.prototype[s],t)}})}function pt(t){return dt({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}var vt;const ft=null!=(null===(vt=window.HTMLSlotElement)||void 0===vt?void 0:vt.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function $t(t){const{slot:e,selector:s}=null!=t?t:{};return dt({descriptor:i=>({get(){var i;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(n),o=null!=r?ft(r,t):[];return s?o.filter((t=>t.matches(s))):o},enumerable:!0,configurable:!0})})}function yt(t,e,s){let i,n=t;return"object"==typeof t?(n=t.slot,i=t):i={flatten:e},s?$t({slot:n,flatten:e,selector:s}):dt({descriptor:t=>({get(){var t,e;const s="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==r?void 0:r.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}const _t=Symbol.for(""),gt=t=>{var e,s;if((null===(e=t)||void 0===e?void 0:e.r)===_t)return null===(s=t)||void 0===s?void 0:s._$litStatic$},At=t=>({_$litStatic$:t,r:_t}),mt=(t,...e)=>({_$litStatic$:e.reduce(((e,s,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[i+1]),t[0]),r:_t}),bt=new Map,Et=t=>(e,...s)=>{const i=s.length;let n,r;const o=[],l=[];let c,a=0,h=!1;for(;a<i;){for(c=e[a];a<i&&void 0!==(r=s[a],n=gt(r));)c+=n+e[++a],h=!0;l.push(r),o.push(c),a++}if(a===i&&o.push(e[i]),h){const t=o.join("$$lit$$");void 0===(e=bt.get(t))&&(o.raw=o,bt.set(t,e=o)),s=l}return t(e,...s)},wt=Et(L),Ct=Et(D),{H:St}=et,Tt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Pt={HTML:1,SVG:2},Ut=(t,e)=>{var s,i;return void 0===e?void 0!==(null===(s=t)||void 0===s?void 0:s._$litType$):(null===(i=t)||void 0===i?void 0:i._$litType$)===e},xt=t=>{var e;return void 0!==(null===(e=t)||void 0===e?void 0:e._$litDirective$)},Ot=t=>{var e;return null===(e=t)||void 0===e?void 0:e._$litDirective$},Mt=t=>void 0===t.strings,Ht=()=>document.createComment(""),kt=(t,e,s)=>{var i;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=n.insertBefore(Ht(),r),i=n.insertBefore(Ht(),r);s=new St(e,i,t,t.options)}else{const e=s._$AB.nextSibling,o=s._$AM,l=o!==t;if(l){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==o._$AU&&s._$AP(e)}if(e!==r||l){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return s},Nt=(t,e,s=t)=>(t._$AI(e,s),t),Rt={},Lt=(t,e=Rt)=>t._$AH=e,Dt=t=>t._$AH,jt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Bt=t=>{t._$AR()},It={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Vt=t=>(...e)=>({_$litDirective$:t,values:e});class Kt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const zt=(t,e)=>{var s,i;const n=t._$AN;if(void 0===n)return!1;for(const t of n)null===(i=(s=t)._$AO)||void 0===i||i.call(s,e,!1),zt(t,e);return!0},qt=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Gt=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Jt(e)}};function Wt(t){void 0!==this._$AN?(qt(this),this._$AM=t,Gt(this)):this._$AM=t}function Yt(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)zt(i[t],!1),qt(i[t]);else null!=i&&(zt(i,!1),qt(i));else zt(this,t)}const Jt=t=>{var e,s,i,n;t.type==It.CHILD&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Yt),null!==(s=(n=t)._$AQ)&&void 0!==s||(n._$AQ=Wt))};class Zt extends Kt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Gt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(zt(this,t),qt(this))}setValue(t){if(Mt(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Qt{constructor(t){this.U=t}disconnect(){this.U=void 0}reconnect(t){this.U=t}deref(){return this.U}}class Xt{constructor(){this.Y=void 0,this.q=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Y=this.q=void 0}}class Ft extends Zt{constructor(){super(...arguments),this._$CG=new Qt(this),this._$CK=new Xt}render(t,e){return j}update(t,[e,s]){if(this.isConnected||this.disconnected(),e===this._$CX)return;this._$CX=e;let i=0;const{_$CG:n,_$CK:r}=this;return(async(t,e)=>{for await(const s of t)if(!1===await e(s))return})(e,(async t=>{for(;r.get();)await r.get();const o=n.deref();if(void 0!==o){if(o._$CX!==e)return!1;void 0!==s&&(t=s(t,i)),o.commitValue(t,i),i++}return!0})),j}commitValue(t,e){this.setValue(t)}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const te=Vt(Ft),ee=Vt(class extends Ft{constructor(t){if(super(t),t.type!==It.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$CJ=t,super.update(t,e)}commitValue(t,e){0===e&&Bt(this._$CJ);const s=kt(this._$CJ);Nt(s,t)}}),se=Vt(class extends Kt{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(t,[e]){if(Ut(this.it)&&(!Ut(e)||this.it.strings!==e.strings)){const e=Dt(t).pop();let s=this.tt.get(this.it.strings);if(void 0===s){const t=document.createDocumentFragment();s=V(B,t),s.setConnected(!1),this.tt.set(this.it.strings,s)}Lt(s,[e]),kt(s,void 0,e)}if(Ut(e)){if(!Ut(this.it)||this.it.strings!==e.strings){const s=this.tt.get(e.strings);if(void 0!==s){const e=Dt(s).pop();Bt(t),kt(t,void 0,e),Lt(t,[e])}}this.it=e}else this.it=void 0;return this.render(e)}}),ie=(t,e,s)=>{for(const s of e)if(s[0]===t)return(0,s[1])();return null==s?void 0:s()},ne=Vt(class extends Kt{constructor(t){var e;if(super(t),t.type!==It.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?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 s,i;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.et.add(t);return this.render(e)}const n=t.element.classList;this.et.forEach((t=>{t in e||(n.remove(t),this.et.delete(t))}));for(const t in e){const s=!!e[t];s===this.et.has(t)||(null===(i=this.st)||void 0===i?void 0:i.has(t))||(s?(n.add(t),this.et.add(t)):(n.remove(t),this.et.delete(t)))}return j}}),re={},oe=Vt(class extends Kt{constructor(){super(...arguments),this.nt=re}render(t,e){return e()}update(t,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.nt)&&this.nt.length===e.length&&e.every(((t,e)=>t===this.nt[e])))return j}else if(this.nt===e)return j;return this.nt=Array.isArray(e)?Array.from(e):e,this.render(e,s)}}),le=t=>null!=t?t:B;function*ce(t,e){const s="function"==typeof e;if(void 0!==t){let i=-1;for(const n of t)i>-1&&(yield s?e(i):e),i++,yield n}}const ae=Vt(class extends Kt{constructor(){super(...arguments),this.key=B}render(t,e){return this.key=t,e}update(t,[e,s]){return e!==this.key&&(Lt(t),this.key=e),s}}),he=Vt(class extends Kt{constructor(t){if(super(t),t.type!==It.PROPERTY&&t.type!==It.ATTRIBUTE&&t.type!==It.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Mt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===j||e===B)return e;const s=t.element,i=t.name;if(t.type===It.PROPERTY){if(e===s[i])return j}else if(t.type===It.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(i))return j}else if(t.type===It.ATTRIBUTE&&s.getAttribute(i)===e+"")return j;return Lt(t),e}});function*de(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}function*ue(t,e,s=1){const i=void 0===e?0:t;null!=e||(e=t);for(let t=i;s>0?t<e:e<t;t+=s)yield t}const pe=()=>new ve;class ve{}const fe=new WeakMap,$e=Vt(class extends Zt{render(t){return B}update(t,[e]){var s;const i=e!==this.U;return i&&void 0!==this.U&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.U=e,this.ht=null===(s=t.options)||void 0===s?void 0:s.host,this.ot(this.lt=t.element)),B}ot(t){var e;if("function"==typeof this.U){const s=null!==(e=this.ht)&&void 0!==e?e:globalThis;let i=fe.get(s);void 0===i&&(i=new WeakMap,fe.set(s,i)),void 0!==i.get(this.U)&&this.U.call(this.ht,void 0),i.set(this.U,t),void 0!==t&&this.U.call(this.ht,t)}else this.U.value=t}get rt(){var t,e,s;return"function"==typeof this.U?null===(e=fe.get(null!==(t=this.ht)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.U):null===(s=this.U)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),ye=(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i},_e=Vt(class extends Kt{constructor(t){if(super(t),t.type!==It.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const n=[],r=[];let o=0;for(const e of t)n[o]=i?i(e,o):o,r[o]=s(e,o),o++;return{values:r,keys:n}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){var n;const r=Dt(t),{values:o,keys:l}=this.dt(e,s,i);if(!Array.isArray(r))return this.ut=l,o;const c=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],a=[];let h,d,u=0,p=r.length-1,v=0,f=o.length-1;for(;u<=p&&v<=f;)if(null===r[u])u++;else if(null===r[p])p--;else if(c[u]===l[v])a[v]=Nt(r[u],o[v]),u++,v++;else if(c[p]===l[f])a[f]=Nt(r[p],o[f]),p--,f--;else if(c[u]===l[f])a[f]=Nt(r[u],o[f]),kt(t,a[f+1],r[u]),u++,f--;else if(c[p]===l[v])a[v]=Nt(r[p],o[v]),kt(t,r[u],r[p]),p--,v++;else if(void 0===h&&(h=ye(l,v,f),d=ye(c,u,p)),h.has(c[u]))if(h.has(c[p])){const e=d.get(l[v]),s=void 0!==e?r[e]:null;if(null===s){const e=kt(t,r[u]);Nt(e,o[v]),a[v]=e}else a[v]=Nt(s,o[v]),kt(t,r[u],s),r[e]=null;v++}else jt(r[p]),p--;else jt(r[u]),u++;for(;v<=f;){const e=kt(t,a[f+1]);Nt(e,o[v]),a[v++]=e}for(;u<=p;){const t=r[u++];null!==t&&jt(t)}return this.ut=l,Lt(t,a),j}}),ge=Vt(class extends Kt{constructor(t){var e;if(super(t),t.type!==It.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ct){this.ct=new Set;for(const t in e)this.ct.add(t);return this.render(e)}this.ct.forEach((t=>{null==e[t]&&(this.ct.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in e){const i=e[t];null!=i&&(this.ct.add(t),t.includes("-")?s.setProperty(t,i):s[t]=i)}return j}}),Ae=Vt(class extends Kt{constructor(t){if(super(t),t.type!==It.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?j:(this.vt=t,document.importNode(t.content,!0))}});class me extends Kt{constructor(t){if(super(t),this.it=B,t.type!==It.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===B||null==t)return this.ft=void 0,this.it=t;if(t===j)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}me.directiveName="unsafeHTML",me.resultType=1;const be=Vt(me);class Ee extends me{}Ee.directiveName="unsafeSVG",Ee.resultType=2;const we=Vt(Ee),Ce=t=>!Tt(t)&&"function"==typeof t.then;class Se extends Zt{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CG=new Qt(this),this._$CK=new Xt}render(...t){var e;return null!==(e=t.find((t=>!Ce(t))))&&void 0!==e?e:j}update(t,e){const s=this._$Cyt;let i=s.length;this._$Cyt=e;const n=this._$CG,r=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!Ce(o))return this._$Cwt=t,o;t<i&&o===s[t]||(this._$Cwt=1073741823,i=0,Promise.resolve(o).then((async t=>{for(;r.get();)await r.get();const e=n.deref();if(void 0!==e){const s=e._$Cyt.indexOf(o);s>-1&&s<e._$Cwt&&(e._$Cwt=s,e.setValue(t))}})))}return j}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}}const Te=Vt(Se);function Pe(t,e,s){return t?e():null==s?void 0:s()}const Ue=B,xe=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:s,elements:i}=e;return{kind:s,elements:i,finisher(e){window.customElements.define(t,e)}}})(t,e);class Oe extends ot{initialized(){}connected(){}disconnected(){}get template(){return Ue}render(){return this.template}firstUpdated(t){super.firstUpdated(t),this.initialized()}connectedCallback(){super.connectedCallback(),this.connected()}disconnectedCallback(){super.disconnectedCallback(),this.disconnected()}}class Me{constructor(t){this.host=t,this.host.addController(this)}}const He=t=>(e,s)=>{Object.defineProperty(e,s,{get(){return this.renderRoot?.querySelector(t)??void 0}})},ke=t=>(e,s)=>{Object.defineProperty(e,s,{get(){return[...this.renderRoot?.querySelectorAll(t)??[]]}})},Ne=function(t){return dt({descriptor:e=>({get(){var e,s;return null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==s?s:[]},enumerable:!0,configurable:!0})})},Re=()=>t=>{const e=new t;Le.handlers.add(e)};class Le extends Kt{constructor(t){if(super(t),t.type!==It.ELEMENT)throw new Error("observeMutation can only be used on an element");const e=t;this.element=e.element}render(t){for(const[e,s]of Object.entries(t)){([...Le.handlers].find((t=>t.handles(this.element,[e,s])))??Le.defaultHandler).apply(this.element,[e,s])}}}Le.handlers=new Set,Le.defaultHandler=new class{handles(){return!0}apply(t,[e,s]){t.style[e]=null==s?"":s}};const De=Vt(Le);var je;function Be(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}let Ie=je=class{static getProportion(t){return Number(t.replace(je.regex,"$1")||1)}handles(t,[e,s]){return je.supportedKeys.has(e)&&je.regex.test(s)}apply(t,[,e]){const s=je.getProportion(e);t.style.flexGrow=String(s)}};Ie.supportedKeys=new Set(["width","height"]),Ie.regex=/^\s*(0|[1-9][0-9]*)?\s*\*\s*$/,Ie=je=Be([Re()],Ie);let Ve=class{handles(t,[e]){return e.startsWith("--")}apply(t,[e,s]){t.style.setProperty(e,s)}};Ve=Be([Re()],Ve);const Ke=new Map([[Array,(t,e)=>[...e??[],...t]],[Set,(t,e)=>new Set([...e??[],...t])],[Map,(t,e)=>new Map([...e??[],...t])]]),ze=(t,e)=>e?Object.assign(t,e):t;const qe=({constructorPropertyKey:t,prototype:e,initialValue:s,lifecycleHooks:i,inheritanceHandler:n})=>{const r=e,o=e.constructor,l=Object.getOwnPropertyDescriptor(o,t)?.value;if(l)return l;const c=n??function(t){const e="constructor"in t?t.constructor:void 0;return Ke.get(e)??ze}(s),a=c(s,o[t]);Object.defineProperty(o,t,{value:a});for(const[t,e]of i??[]){const s=r[t];r[t]=function(...t){s.call(this,...t),e.call(this,a,...t)}}return a},Ge=Symbol("updatedObservers"),We=t=>(e,s)=>{qe({prototype:e,constructorPropertyKey:Ge,initialValue:new Map,lifecycleHooks:new Map([["updated",function(t,e){for(const[s,i]of e){const e=s,n=t?.get(e);void 0!==n&&n.call(this,this[e],i)}}]])}).set(s,t)},Ye=t=>(e,s)=>(t?.updated&&We(t.updated)(e,s),ht(t)(e,s)),Je=t=>(e,s)=>(t?.updated&&We(t.updated)(e,s),function(t){return ht({...t,state:!0})}(t)(e,s));const Ze=Symbol("eventListeners"),Qe=(...t)=>(e,s,i)=>{const n=function(t){const e=(t=>"string"==typeof t[0])(t);return{type:e?t[0]:t[0].type,target:e?void 0:t[0].target,options:e?t[1]:t[0].options}}(t);qe({prototype:e,constructorPropertyKey:Ze,initialValue:new Map}).set(`${n.type}.${s}`,{descriptor:i,propertyKey:s,...n})},Xe=t=>5===t.type?t._$committedValue.bind(t.element):"function"==typeof t?t:t.handleEvent,Fe=ot.prototype.connectedCallback;ot.prototype.connectedCallback=function(){Fe.call(this);const t=es(this);for(const{type:e,target:s,options:i,descriptor:n,propertyKey:r}of t?.values()??[])ns.call(this,r,n),ss.call(this,s)?.addEventListener(e,is.call(this,r),i)};const ts=ot.prototype.disconnectedCallback;function es(t){return t.constructor[Ze]}function ss(t){return"function"==typeof t?t.call(this):t??this}function is(t){return Object.getOwnPropertyDescriptor(this,rs(t))?.value}function ns(t,e){const s=e?"function"==typeof e.get?e.get:e.value:Object.getOwnPropertyDescriptor(this,t)?.value;if(!1===os(s))throw new TypeError(`${this.constructor}.${t} is not a function`);Object.defineProperty(this,rs(t),{value:s.bind(this),configurable:!0,enumerable:!1,writable:!1})}ot.prototype.disconnectedCallback=function(){ts.call(this);const t=es(this);for(const{type:e,target:s,options:i,propertyKey:n}of t?.values()??[])ss.call(this,s)?.removeEventListener(e,is.call(this,n),i)};const rs=t=>`$BOUND_${t}$`,os=t=>{const e="function"==typeof t,s="object"==typeof t&&null!==t&&"handleEvent"in t&&"function"==typeof t.handleEvent;return e||s};class ls{constructor(){this.handlers=new Set}subscribe(t){this.handlers.add(t)}unsubscribe(t){this.handlers.delete(t)}dispatch(t){for(const e of this.handlers)e(t)}}class cs{constructor(t,e,s){this.element=t,this.type=e,this.options=s,this.handlersMap=new Map}dispatch(t){this.element.dispatchEvent(new CustomEvent(this.type,{detail:t,...this.options}))}subscribe(t){const e=e=>t(e.detail);this.element.addEventListener(this.type,e),this.handlersMap.set(t,e)}unsubscribe(t){const e=this.handlersMap.get(t);e&&this.element.removeEventListener(this.type,e),this.handlersMap.delete(t)}}function as(t){return(e,s)=>{if(void 0===s)return;const i=`$${s}Event$`;Object.defineProperty(e,s,{get(){return this[i]||(this[i]=this instanceof HTMLElement?new cs(this,s,t):new ls),this[i]}})}}self.Lit=e})();
|
|
1
|
+
(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AsteriskSyntaxStyleHandler:()=>qe,AsyncDirective:()=>te,AsyncReplaceDirective:()=>ie,CSSResult:()=>o,Component:()=>Re,Controller:()=>Ne,CustomPropertyStyleHandler:()=>Ye,Directive:()=>Wt,HTMLElementEventDispatcher:()=>us,LitElement:()=>at,PartType:()=>qt,PureEventDispatcher:()=>ds,ReactiveElement:()=>A,StyleDirective:()=>Ie,TemplateResultType:()=>Ht,UnsafeHTMLDirective:()=>Se,UntilDirective:()=>xe,UpdatingElement:()=>ct,_$LE:()=>dt,_$LH:()=>it,adoptStyles:()=>a,asyncAppend:()=>re,asyncReplace:()=>ne,cache:()=>oe,choose:()=>le,classMap:()=>ce,clearPart:()=>Kt,component:()=>ke,createRef:()=>ye,css:()=>c,defaultConverter:()=>$,directive:()=>Yt,event:()=>ps,eventListener:()=>es,eventListenersSymbol:()=>ts,eventOptions:()=>$t,extractEventHandler:()=>ss,getCommittedValue:()=>Vt,getCompatibleStyle:()=>h,getDirectiveClass:()=>Rt,guard:()=>he,html:()=>B,ifDefined:()=>de,insertPart:()=>jt,isDirectiveResult:()=>kt,isPrimitive:()=>Mt,isServer:()=>ut,isSingleExpression:()=>Nt,isTemplateResult:()=>Ut,join:()=>ue,keyed:()=>pe,literal:()=>St,live:()=>ve,map:()=>fe,noChange:()=>V,notEqual:()=>y,nothing:()=>Ue,property:()=>Qe,query:()=>Le,queryAll:()=>je,queryAllAsNodeList:()=>De,queryAssignedElements:()=>gt,queryAssignedNodes:()=>mt,queryAsync:()=>yt,range:()=>$e,ref:()=>ge,removePart:()=>zt,render:()=>rt,repeat:()=>be,setChildPartValue:()=>Dt,setCommittedValue:()=>It,state:()=>Fe,staticHtml:()=>Pt,staticSvg:()=>Ot,style:()=>Ve,styleHandler:()=>Be,styleMap:()=>Ee,supportsAdoptingStyleSheets:()=>i,svg:()=>I,templateContent:()=>Ce,unsafeCSS:()=>l,unsafeHTML:()=>we,unsafeSVG:()=>Pe,unsafeStatic:()=>Ct,until:()=>Me,updated:()=>Ge,updatedObserversSymbol:()=>Je,when:()=>He,withStatic:()=>Tt});const s=window,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;class o{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}}const l=t=>new o("string"==typeof t?t:t+"",void 0,n),c=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new o(s,t,n)},a=(t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=s.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},h=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return l(e)})(t):t;var d;const u=window,p=u.trustedTypes,v=p?p.emptyScript:"",f=u.reactiveElementPolyfillSupport,$={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},y=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:y};class A extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return a(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=_){var i;const n=this.constructor._$Ep(t,s);if(void 0!==n&&!0===s.reflect){const r=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:$).toAttribute(e,s.type);this._$El=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=i.getPropertyOptions(n),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:$;this._$El=n,this[n]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var g;A.finalized=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:A}),(null!==(d=u.reactiveElementVersions)&&void 0!==d?d:u.reactiveElementVersions=[]).push("1.5.0");const m=window,b=m.trustedTypes,E=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,C=`lit$${(Math.random()+"").slice(9)}$`,S="?"+C,w=`<${S}>`,T=document,P=(t="")=>T.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,x=Array.isArray,M=t=>x(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,k=/>/g,R=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),N=/'/g,L=/"/g,j=/^(?:script|style|textarea|title)$/i,D=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),B=D(1),I=D(2),V=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),K=new WeakMap,q=T.createTreeWalker(T,129,null,!1),Y=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":"",o=H;for(let e=0;e<s;e++){const s=t[e];let l,c,a=-1,h=0;for(;h<s.length&&(o.lastIndex=h,c=o.exec(s),null!==c);)h=o.lastIndex,o===H?"!--"===c[1]?o=U:void 0!==c[1]?o=k:void 0!==c[2]?(j.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=R):void 0!==c[3]&&(o=R):o===R?">"===c[0]?(o=null!=n?n:H,a=-1):void 0===c[1]?a=-2:(a=o.lastIndex-c[2].length,l=c[1],o=void 0===c[3]?R:'"'===c[3]?L:N):o===L||o===N?o=R:o===U||o===k?o=H:(o=R,n=void 0);const d=o===R&&t[e+1].startsWith("/>")?" ":"";r+=o===H?s+w:a>=0?(i.push(l),s.slice(0,a)+"$lit$"+s.slice(a)+C+d):s+C+(-2===a?(i.push(void 0),e):d)}const l=r+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==E?E.createHTML(l):l,i]};class W{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[c,a]=Y(t,e);if(this.el=W.createElement(c,s),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=q.nextNode())&&l.length<o;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(C)){const s=a[r++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(C),e=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?tt:"@"===e[1]?et:G})}else l.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(j.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=b?b.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],P()),q.nextNode(),l.push({type:2,index:++n});i.append(t[e],P())}}}else if(8===i.nodeType)if(i.data===S)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)l.push({type:7,index:n}),t+=C.length-1}n++}}static createElement(t,e){const s=T.createElement("template");return s.innerHTML=t,s}}function X(t,e,s=t,i){var n,r,o,l;if(e===V)return e;let c=void 0!==i?null===(n=s._$Co)||void 0===n?void 0:n[i]:s._$Cl;const a=O(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(r=null==c?void 0:c._$AO)||void 0===r||r.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,s,i)),void 0!==i?(null!==(o=(l=s)._$Co)&&void 0!==o?o:l._$Co=[])[i]=c:s._$Cl=c),void 0!==c&&(e=X(t,c._$AS(t,e.values),c,i)),e}class Z{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:T).importNode(s,!0);q.currentNode=n;let r=q.nextNode(),o=0,l=0,c=i[0];for(;void 0!==c;){if(o===c.index){let e;2===c.type?e=new J(r,r.nextSibling,this,t):1===c.type?e=new c.ctor(r,c.name,c.strings,this,t):6===c.type&&(e=new st(r,this,t)),this.u.push(e),c=i[++l]}o!==(null==c?void 0:c.index)&&(r=q.nextNode(),o++)}return n}p(t){let e=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class J{constructor(t,e,s,i){var n;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),O(t)?t===z||null==t||""===t?(this._$AH!==z&&this._$AR(),this._$AH=z):t!==this._$AH&&t!==V&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):M(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==z&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=W.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(s);else{const t=new Z(n,this),e=t.v(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new W(t)),e}k(t){x(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new J(this.O(P()),this.O(P()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class G{constructor(t,e,s,i,n){this.type=1,this._$AH=z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(void 0===n)t=X(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==V,r&&(this._$AH=t);else{const i=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=X(this,i[s+o],e,o),l===V&&(l=this._$AH[o]),r||(r=!O(l)||l!==this._$AH[o]),l===z?t=z:t!==z&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!i&&this.j(t)}j(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===z?void 0:t}}const F=b?b.emptyScript:"";class tt extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==z?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class et extends G{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=X(this,t,e,0))&&void 0!==s?s:z)===V)return;const i=this._$AH,n=t===z&&i!==z||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==z&&(i===z||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const it={P:"$lit$",A:C,M:S,C:1,L:Y,R:Z,D:M,V:X,I:J,H:G,N:tt,U:et,B:Q,F:st},nt=m.litHtmlPolyfillSupport;null==nt||nt(W,J),(null!==(g=m.litHtmlVersions)&&void 0!==g?g:m.litHtmlVersions=[]).push("2.5.0");const rt=(t,e,s)=>{var i,n;const r=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let o=r._$litPart$;if(void 0===o){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;r._$litPart$=o=new J(e.insertBefore(P(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o};var ot,lt;const ct=A;class at extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return V}}at.finalized=!0,at._$litElement$=!0,null===(ot=globalThis.litElementHydrateSupport)||void 0===ot||ot.call(globalThis,{LitElement:at});const ht=globalThis.litElementPolyfillSupport;null==ht||ht({LitElement:at});const dt={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(null!==(lt=globalThis.litElementVersions)&&void 0!==lt?lt:globalThis.litElementVersions=[]).push("3.2.2");const ut=!1,pt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(s){s.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function vt(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):pt(t,e)}const ft=({finisher:t,descriptor:e})=>(s,i)=>{var n;if(void 0===i){const i=null!==(n=s.originalKey)&&void 0!==n?n:s.key,r=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(s.key)}:{...s,key:i};return null!=t&&(r.finisher=function(e){t(e,i)}),r}{const n=s.constructor;void 0!==e&&Object.defineProperty(s,i,e(i)),null==t||t(n,i)}};function $t(t){return ft({finisher:(e,s)=>{Object.assign(e.prototype[s],t)}})}function yt(t){return ft({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}var _t;const At=null!=(null===(_t=window.HTMLSlotElement)||void 0===_t?void 0:_t.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function gt(t){const{slot:e,selector:s}=null!=t?t:{};return ft({descriptor:i=>({get(){var i;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(n),o=null!=r?At(r,t):[];return s?o.filter((t=>t.matches(s))):o},enumerable:!0,configurable:!0})})}function mt(t,e,s){let i,n=t;return"object"==typeof t?(n=t.slot,i=t):i={flatten:e},s?gt({slot:n,flatten:e,selector:s}):ft({descriptor:t=>({get(){var t,e;const s="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==r?void 0:r.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}const bt=Symbol.for(""),Et=t=>{if((null==t?void 0:t.r)===bt)return null==t?void 0:t._$litStatic$},Ct=t=>({_$litStatic$:t,r:bt}),St=(t,...e)=>({_$litStatic$:e.reduce(((e,s,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[i+1]),t[0]),r:bt}),wt=new Map,Tt=t=>(e,...s)=>{const i=s.length;let n,r;const o=[],l=[];let c,a=0,h=!1;for(;a<i;){for(c=e[a];a<i&&void 0!==(r=s[a],n=Et(r));)c+=n+e[++a],h=!0;l.push(r),o.push(c),a++}if(a===i&&o.push(e[i]),h){const t=o.join("$$lit$$");void 0===(e=wt.get(t))&&(o.raw=o,wt.set(t,e=o)),s=l}return t(e,...s)},Pt=Tt(B),Ot=Tt(I),{I:xt}=it,Mt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ht={HTML:1,SVG:2},Ut=(t,e)=>void 0===e?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===e,kt=t=>void 0!==(null==t?void 0:t._$litDirective$),Rt=t=>null==t?void 0:t._$litDirective$,Nt=t=>void 0===t.strings,Lt=()=>document.createComment(""),jt=(t,e,s)=>{var i;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=n.insertBefore(Lt(),r),i=n.insertBefore(Lt(),r);s=new xt(e,i,t,t.options)}else{const e=s._$AB.nextSibling,o=s._$AM,l=o!==t;if(l){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==o._$AU&&s._$AP(e)}if(e!==r||l){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return s},Dt=(t,e,s=t)=>(t._$AI(e,s),t),Bt={},It=(t,e=Bt)=>t._$AH=e,Vt=t=>t._$AH,zt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Kt=t=>{t._$AR()},qt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Yt=t=>(...e)=>({_$litDirective$:t,values:e});class Wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Xt=(t,e)=>{var s,i;const n=t._$AN;if(void 0===n)return!1;for(const t of n)null===(i=(s=t)._$AO)||void 0===i||i.call(s,e,!1),Xt(t,e);return!0},Zt=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Jt=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Ft(e)}};function Gt(t){void 0!==this._$AN?(Zt(this),this._$AM=t,Jt(this)):this._$AM=t}function Qt(t,e=!1,s=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=s;t<i.length;t++)Xt(i[t],!1),Zt(i[t]);else null!=i&&(Xt(i,!1),Zt(i));else Xt(this,t)}const Ft=t=>{var e,s,i,n;t.type==qt.CHILD&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Qt),null!==(s=(n=t)._$AQ)&&void 0!==s||(n._$AQ=Gt))};class te extends Wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Jt(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(Xt(this,t),Zt(this))}setValue(t){if(Nt(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class ee{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class se{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){var t;null!==(t=this.Z)&&void 0!==t||(this.Z=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Z=this.q=void 0}}class ie extends te{constructor(){super(...arguments),this._$CK=new ee(this),this._$CX=new se}render(t,e){return V}update(t,[e,s]){if(this.isConnected||this.disconnected(),e===this._$CJ)return;this._$CJ=e;let i=0;const{_$CK:n,_$CX:r}=this;return(async(t,e)=>{for await(const s of t)if(!1===await e(s))return})(e,(async t=>{for(;r.get();)await r.get();const o=n.deref();if(void 0!==o){if(o._$CJ!==e)return!1;void 0!==s&&(t=s(t,i)),o.commitValue(t,i),i++}return!0})),V}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const ne=Yt(ie),re=Yt(class extends ie{constructor(t){if(super(t),t.type!==qt.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$Ctt=t,super.update(t,e)}commitValue(t,e){0===e&&Kt(this._$Ctt);const s=jt(this._$Ctt);Dt(s,t)}}),oe=Yt(class extends Wt{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){if(Ut(this.it)&&(!Ut(e)||this.it.strings!==e.strings)){const e=Vt(t).pop();let s=this.et.get(this.it.strings);if(void 0===s){const t=document.createDocumentFragment();s=rt(z,t),s.setConnected(!1),this.et.set(this.it.strings,s)}It(s,[e]),jt(s,void 0,e)}if(Ut(e)){if(!Ut(this.it)||this.it.strings!==e.strings){const s=this.et.get(e.strings);if(void 0!==s){const e=Vt(s).pop();Kt(t),jt(t,void 0,e),It(t,[e])}}this.it=e}else this.it=void 0;return this.render(e)}}),le=(t,e,s)=>{for(const s of e)if(s[0]===t)return(0,s[1])();return null==s?void 0:s()},ce=Yt(class extends Wt{constructor(t){var e;if(super(t),t.type!==qt.ATTRIBUTE||"class"!==t.name||(null===(e=t.strings)||void 0===e?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 s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const s=!!e[t];s===this.nt.has(t)||(null===(i=this.st)||void 0===i?void 0:i.has(t))||(s?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return V}}),ae={},he=Yt(class extends Wt{constructor(){super(...arguments),this.ot=ae}render(t,e){return e()}update(t,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every(((t,e)=>t===this.ot[e])))return V}else if(this.ot===e)return V;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}}),de=t=>null!=t?t:z;function*ue(t,e){const s="function"==typeof e;if(void 0!==t){let i=-1;for(const n of t)i>-1&&(yield s?e(i):e),i++,yield n}}const pe=Yt(class extends Wt{constructor(){super(...arguments),this.key=z}render(t,e){return this.key=t,e}update(t,[e,s]){return e!==this.key&&(It(t),this.key=e),s}}),ve=Yt(class extends Wt{constructor(t){if(super(t),t.type!==qt.PROPERTY&&t.type!==qt.ATTRIBUTE&&t.type!==qt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Nt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===V||e===z)return e;const s=t.element,i=t.name;if(t.type===qt.PROPERTY){if(e===s[i])return V}else if(t.type===qt.BOOLEAN_ATTRIBUTE){if(!!e===s.hasAttribute(i))return V}else if(t.type===qt.ATTRIBUTE&&s.getAttribute(i)===e+"")return V;return It(t),e}});function*fe(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}function*$e(t,e,s=1){const i=void 0===e?0:t;null!=e||(e=t);for(let t=i;s>0?t<e:e<t;t+=s)yield t}const ye=()=>new _e;class _e{}const Ae=new WeakMap,ge=Yt(class extends te{render(t){return z}update(t,[e]){var s;const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=e,this.dt=null===(s=t.options)||void 0===s?void 0:s.host,this.rt(this.ct=t.element)),z}rt(t){var e;if("function"==typeof this.Y){const s=null!==(e=this.dt)&&void 0!==e?e:globalThis;let i=Ae.get(s);void 0===i&&(i=new WeakMap,Ae.set(s,i)),void 0!==i.get(this.Y)&&this.Y.call(this.dt,void 0),i.set(this.Y,t),void 0!==t&&this.Y.call(this.dt,t)}else this.Y.value=t}get lt(){var t,e,s;return"function"==typeof this.Y?null===(e=Ae.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.Y):null===(s=this.Y)||void 0===s?void 0:s.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),me=(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i},be=Yt(class extends Wt{constructor(t){if(super(t),t.type!==qt.CHILD)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const n=[],r=[];let o=0;for(const e of t)n[o]=i?i(e,o):o,r[o]=s(e,o),o++;return{values:r,keys:n}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){var n;const r=Vt(t),{values:o,keys:l}=this.ht(e,s,i);if(!Array.isArray(r))return this.ut=l,o;const c=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],a=[];let h,d,u=0,p=r.length-1,v=0,f=o.length-1;for(;u<=p&&v<=f;)if(null===r[u])u++;else if(null===r[p])p--;else if(c[u]===l[v])a[v]=Dt(r[u],o[v]),u++,v++;else if(c[p]===l[f])a[f]=Dt(r[p],o[f]),p--,f--;else if(c[u]===l[f])a[f]=Dt(r[u],o[f]),jt(t,a[f+1],r[u]),u++,f--;else if(c[p]===l[v])a[v]=Dt(r[p],o[v]),jt(t,r[u],r[p]),p--,v++;else if(void 0===h&&(h=me(l,v,f),d=me(c,u,p)),h.has(c[u]))if(h.has(c[p])){const e=d.get(l[v]),s=void 0!==e?r[e]:null;if(null===s){const e=jt(t,r[u]);Dt(e,o[v]),a[v]=e}else a[v]=Dt(s,o[v]),jt(t,r[u],s),r[e]=null;v++}else zt(r[p]),p--;else zt(r[u]),u++;for(;v<=f;){const e=jt(t,a[f+1]);Dt(e,o[v]),a[v++]=e}for(;u<=p;){const t=r[u++];null!==t&&zt(t)}return this.ut=l,It(t,a),V}}),Ee=Yt(class extends Wt{constructor(t){var e;if(super(t),t.type!==qt.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in e){const i=e[t];null!=i&&(this.vt.add(t),t.includes("-")?s.setProperty(t,i):s[t]=i)}return V}}),Ce=Yt(class extends Wt{constructor(t){if(super(t),t.type!==qt.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?V:(this.ft=t,document.importNode(t.content,!0))}});class Se extends Wt{constructor(t){if(super(t),this.it=z,t.type!==qt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===z||null==t)return this._t=void 0,this.it=t;if(t===V)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Se.directiveName="unsafeHTML",Se.resultType=1;const we=Yt(Se);class Te extends Se{}Te.directiveName="unsafeSVG",Te.resultType=2;const Pe=Yt(Te),Oe=t=>!Mt(t)&&"function"==typeof t.then;class xe extends te{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CK=new ee(this),this._$CX=new se}render(...t){var e;return null!==(e=t.find((t=>!Oe(t))))&&void 0!==e?e:V}update(t,e){const s=this._$Cyt;let i=s.length;this._$Cyt=e;const n=this._$CK,r=this._$CX;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!Oe(o))return this._$Cwt=t,o;t<i&&o===s[t]||(this._$Cwt=1073741823,i=0,Promise.resolve(o).then((async t=>{for(;r.get();)await r.get();const e=n.deref();if(void 0!==e){const s=e._$Cyt.indexOf(o);s>-1&&s<e._$Cwt&&(e._$Cwt=s,e.setValue(t))}})))}return V}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const Me=Yt(xe);function He(t,e,s){return t?e():null==s?void 0:s()}const Ue=z,ke=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:s,elements:i}=e;return{kind:s,elements:i,finisher(e){customElements.define(t,e)}}})(t,e);class Re extends at{initialized(){}connected(){}disconnected(){}get template(){return Ue}render(){return this.template}firstUpdated(t){super.firstUpdated(t),this.initialized()}connectedCallback(){super.connectedCallback(),this.connected()}disconnectedCallback(){super.disconnectedCallback(),this.disconnected()}}class Ne{constructor(t){this.host=t,this.host.addController(this)}}const Le=t=>(e,s)=>{Object.defineProperty(e,s,{get(){return this.renderRoot?.querySelector(t)??void 0}})},je=t=>(e,s)=>{Object.defineProperty(e,s,{get(){return[...this.renderRoot?.querySelectorAll(t)??[]]}})},De=function(t){return ft({descriptor:e=>({get(){var e,s;return null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==s?s:[]},enumerable:!0,configurable:!0})})},Be=()=>t=>{const e=new t;Ie.handlers.add(e)};class Ie extends Wt{constructor(t){if(super(t),t.type!==qt.ELEMENT)throw new Error("observeMutation can only be used on an element");const e=t;this.element=e.element}render(t){for(const[e,s]of Object.entries(t)){([...Ie.handlers].find((t=>t.handles(this.element,[e,s])))??Ie.defaultHandler).apply(this.element,[e,s])}}}Ie.handlers=new Set,Ie.defaultHandler=new class{handles(){return!0}apply(t,[e,s]){t.style[e]=null==s?"":s}};const Ve=Yt(Ie);var ze;function Ke(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}let qe=ze=class{static getProportion(t){return Number(t.replace(ze.regex,"$1")||1)}handles(t,[e,s]){return ze.supportedKeys.has(e)&&ze.regex.test(s)}apply(t,[,e]){const s=ze.getProportion(e);t.style.flexGrow=String(s)}};qe.supportedKeys=new Set(["width","height"]),qe.regex=/^\s*(0|[1-9][0-9]*)?\s*\*\s*$/,qe=ze=Ke([Be()],qe);let Ye=class{handles(t,[e]){return e.startsWith("--")}apply(t,[e,s]){t.style.setProperty(e,s)}};Ye=Ke([Be()],Ye);const We=new Map([[Array,(t,e)=>[...e??[],...t]],[Set,(t,e)=>new Set([...e??[],...t])],[Map,(t,e)=>new Map([...e??[],...t])]]),Xe=(t,e)=>e?Object.assign(t,e):t;const Ze=({constructorPropertyKey:t,prototype:e,initialValue:s,lifecycleHooks:i,inheritanceHandler:n})=>{const r=e,o=e.constructor,l=Object.getOwnPropertyDescriptor(o,t)?.value;if(l)return l;const c=n??function(t){const e=null!==t&&"object"==typeof t&&"constructor"in t?t.constructor:void 0;return We.get(e)??Xe}(s),a=c(s,o[t]);Object.defineProperty(o,t,{value:a});for(const[t,e]of i??[]){const s=r[t];r[t]=function(...t){s.call(this,...t),e.call(this,a,...t)}}return a},Je=Symbol("updatedObservers"),Ge=t=>(e,s)=>{Ze({prototype:e,constructorPropertyKey:Je,initialValue:new Map,lifecycleHooks:new Map([["updated",function(t,e){for(const[s,i]of e){const e=s,n=t?.get(e);void 0!==n&&n.call(this,this[e],i)}}]])}).set(s,t)},Qe=t=>(e,s)=>(t?.updated&&Ge(t.updated)(e,s),vt(t)(e,s)),Fe=t=>(e,s)=>(t?.updated&&Ge(t.updated)(e,s),function(t){return vt({...t,state:!0})}(t)(e,s));const ts=Symbol("eventListeners"),es=(...t)=>(e,s,i)=>{const n=function(t){const e=(t=>"string"==typeof t[0])(t);return{type:e?t[0]:t[0].type,target:e?void 0:t[0].target,options:e?t[1]:t[0].options}}(t);Ze({prototype:e,constructorPropertyKey:ts,initialValue:new Map}).set(`${n.type}.${s}`,{descriptor:i,propertyKey:s,...n})},ss=t=>5===t.type?t._$committedValue.bind(t.element):"function"==typeof t?t:t.handleEvent,is=A.prototype.connectedCallback;A.prototype.connectedCallback=function(){is.call(this);const t=rs(this);for(const{type:e,target:s,options:i,descriptor:n,propertyKey:r}of t?.values()??[])cs.call(this,r,n),os.call(this,s)?.addEventListener(e,ls.call(this,r),i)};const ns=A.prototype.disconnectedCallback;function rs(t){return t.constructor[ts]}function os(t){return"function"==typeof t?t.call(this):t??this}function ls(t){return Object.getOwnPropertyDescriptor(this,as(t))?.value}function cs(t,e){const s=e?"function"==typeof e.get?e.get:e.value:Object.getOwnPropertyDescriptor(this,t)?.value;if(!1===hs(s))throw new TypeError(`${this.constructor}.${t} is not a function`);Object.defineProperty(this,as(t),{value:s.bind(this),configurable:!0,enumerable:!1,writable:!1})}A.prototype.disconnectedCallback=function(){ns.call(this);const t=rs(this);for(const{type:e,target:s,options:i,propertyKey:n}of t?.values()??[])os.call(this,s)?.removeEventListener(e,ls.call(this,n),i)};const as=t=>`$BOUND_${t}$`,hs=t=>{const e="function"==typeof t,s="object"==typeof t&&null!==t&&"handleEvent"in t&&"function"==typeof t.handleEvent;return e||s};class ds{constructor(){this.handlers=new Set}subscribe(t){this.handlers.add(t)}unsubscribe(t){this.handlers.delete(t)}dispatch(t){for(const e of this.handlers)e(t)}}class us{constructor(t,e,s){this.element=t,this.type=e,this.options=s,this.handlersMap=new Map}dispatch(t){this.element.dispatchEvent(new CustomEvent(this.type,{detail:t,...this.options}))}subscribe(t){const e=e=>t(e.detail);this.element.addEventListener(this.type,e),this.handlersMap.set(t,e)}unsubscribe(t){const e=this.handlersMap.get(t);e&&this.element.removeEventListener(this.type,e),this.handlersMap.delete(t)}}function ps(t){return(e,s)=>{if(void 0===s)return;const i=`$${s}Event$`;Object.defineProperty(e,s,{get(){return this[i]||(this[i]=this instanceof HTMLElement?new us(this,s,t):new ds),this[i]}})}}self.Lit=e})();
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
type InheritanceHandler<T> = (own: T, inherited?: T) => T;
|
|
3
|
+
export declare const decorateReactiveElement: <T>({ constructorPropertyKey, prototype, initialValue, lifecycleHooks, inheritanceHandler }: {
|
|
4
|
+
constructorPropertyKey: symbol | string;
|
|
5
|
+
prototype: ReactiveElement;
|
|
6
|
+
initialValue: T;
|
|
7
|
+
inheritanceHandler?: InheritanceHandler<T> | undefined;
|
|
8
|
+
lifecycleHooks?: Map<string, (this: ReactiveElement, data: T, ...args: Array<any>) => any> | undefined;
|
|
9
|
+
}) => T;
|
|
10
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export type ShorthandEventListenerDecoratorOptions = [type: string, options?: EventListenerOptions | boolean];
|
|
3
|
+
export type FullEventListenerDecoratorOptions = [
|
|
4
4
|
{
|
|
5
5
|
type: string;
|
|
6
6
|
target?: EventTarget | ((this: any) => EventTarget);
|
|
7
7
|
options?: EventListenerOptions | boolean;
|
|
8
8
|
}
|
|
9
9
|
];
|
|
10
|
-
export
|
|
10
|
+
export type EventListenerDecoratorOptions = ShorthandEventListenerDecoratorOptions | FullEventListenerDecoratorOptions;
|
|
11
11
|
declare function extractArguments(args: EventListenerDecoratorOptions): {
|
|
12
12
|
type: string;
|
|
13
13
|
target: EventTarget | ((this: any) => EventTarget) | undefined;
|
|
14
14
|
options: boolean | EventListenerOptions | undefined;
|
|
15
15
|
};
|
|
16
16
|
export declare const eventListenersSymbol: unique symbol;
|
|
17
|
-
export
|
|
17
|
+
export type EventListenerMetadata = ReturnType<typeof extractArguments> & {
|
|
18
18
|
descriptor?: PropertyDescriptor;
|
|
19
19
|
propertyKey: string;
|
|
20
20
|
};
|
|
21
|
-
export declare const eventListener: (...eventListenerOptions: EventListenerDecoratorOptions) => (prototype:
|
|
21
|
+
export declare const eventListener: (...eventListenerOptions: EventListenerDecoratorOptions) => (prototype: ReactiveElement, propertyKey: string, descriptor?: PropertyDescriptor) => void;
|
|
22
22
|
export {};
|
package/dist/query/query.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const query: (selector: string) => (prototype:
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export declare const query: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
package/dist/query/queryAll.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const queryAll: (selector: string) => (prototype:
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export declare const queryAll: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
package/dist/style/style.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Directive, PartInfo } from '..';
|
|
2
2
|
import type { StandardProperties } from 'csstype';
|
|
3
|
-
export
|
|
3
|
+
export type StyleEntry = [key: string, value: string];
|
|
4
4
|
export interface StyleHandler {
|
|
5
5
|
handles(element: HTMLElement, entry: StyleEntry): boolean;
|
|
6
6
|
apply(element: HTMLElement, entry: StyleEntry): void;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type AbstractConstructor<T> = abstract new (...args: Array<any>) => T;
|
|
2
|
+
type Constructor<T> = new (...args: Array<any>) => T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropertyDeclaration,
|
|
1
|
+
import type { PropertyDeclaration, ReactiveElement } from 'lit';
|
|
2
2
|
import { updated, UpdatedCallback } from './updated';
|
|
3
3
|
export declare const property: <T>(options?: (PropertyDeclaration<unknown, unknown> & {
|
|
4
4
|
updated?: UpdatedCallback<T> | undefined;
|
|
5
|
-
}) | undefined) => (prototype:
|
|
5
|
+
}) | undefined) => (prototype: ReactiveElement, propertyKey: PropertyKey) => any;
|
package/dist/updated/state.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
2
|
import { InternalPropertyDeclaration } from 'lit/decorators.js';
|
|
3
3
|
import { updated, UpdatedCallback } from './updated';
|
|
4
4
|
export declare const state: <T>(options?: (InternalPropertyDeclaration<unknown> & {
|
|
5
5
|
updated?: UpdatedCallback<T> | undefined;
|
|
6
|
-
}) | undefined) => (prototype:
|
|
6
|
+
}) | undefined) => (prototype: ReactiveElement, propertyKey: PropertyKey) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export type UpdatedCallback<T> = (value: T, oldValue: T) => void;
|
|
3
3
|
export declare const updatedObserversSymbol: unique symbol;
|
|
4
|
-
export declare const updated: <T>(callback: UpdatedCallback<T>) => (prototype:
|
|
4
|
+
export declare const updated: <T>(callback: UpdatedCallback<T>) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { customElement } from 'lit/decorators.js';
|
|
3
|
-
import { nothing } from '.';
|
|
4
|
-
export const component = customElement;
|
|
5
|
-
export class Component extends LitElement {
|
|
6
|
-
/** Invoked after first update i.e. render is completed */
|
|
7
|
-
initialized() { }
|
|
8
|
-
/** Invoked every time the component is connected to the Document Object Model (DOM) */
|
|
9
|
-
connected() { }
|
|
10
|
-
/** Invoked every time the component is disconnected from the Document Object Model (DOM) */
|
|
11
|
-
disconnected() { }
|
|
12
|
-
/** The template rendered into renderRoot. Invoked on each update to perform rendering tasks. */
|
|
13
|
-
get template() {
|
|
14
|
-
return nothing;
|
|
15
|
-
}
|
|
16
|
-
/** @final */
|
|
17
|
-
render() {
|
|
18
|
-
return this.template;
|
|
19
|
-
}
|
|
20
|
-
/** @final */
|
|
21
|
-
firstUpdated(props) {
|
|
22
|
-
super.firstUpdated(props);
|
|
23
|
-
this.initialized();
|
|
24
|
-
}
|
|
25
|
-
/** @final */
|
|
26
|
-
connectedCallback() {
|
|
27
|
-
super.connectedCallback();
|
|
28
|
-
this.connected();
|
|
29
|
-
}
|
|
30
|
-
/** @final */
|
|
31
|
-
disconnectedCallback() {
|
|
32
|
-
super.disconnectedCallback();
|
|
33
|
-
this.disconnected();
|
|
34
|
-
}
|
|
35
|
-
}
|
package/dist/Component/index.js
DELETED
package/dist/Controller/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Controller';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
declare type InheritanceHandler<T> = (own: T, inherited?: T) => T;
|
|
3
|
-
export declare const decorateLitElement: <T>({ constructorPropertyKey, prototype, initialValue, lifecycleHooks, inheritanceHandler }: {
|
|
4
|
-
constructorPropertyKey: symbol | string;
|
|
5
|
-
prototype: LitElement;
|
|
6
|
-
initialValue: T;
|
|
7
|
-
inheritanceHandler?: InheritanceHandler<T> | undefined;
|
|
8
|
-
lifecycleHooks?: Map<string, (this: LitElement, data: T, ...args: Array<any>) => any> | undefined;
|
|
9
|
-
}) => T;
|
|
10
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const defaultInheritanceHandlersByType = new Map([
|
|
2
|
-
[Array, (own, inherited) => [...(inherited ?? []), ...own]],
|
|
3
|
-
[Set, (own, inherited) => new Set([...(inherited ?? []), ...own])],
|
|
4
|
-
[Map, (own, inherited) => new Map([...(inherited ?? []), ...own])],
|
|
5
|
-
]);
|
|
6
|
-
const defaultInheritanceHandler = (own, inherited) => inherited ? Object.assign(own, inherited) : own;
|
|
7
|
-
function getDefaultInheritanceHandler(value) {
|
|
8
|
-
const type = 'constructor' in value ? value.constructor : undefined;
|
|
9
|
-
return (defaultInheritanceHandlersByType.get(type) ?? defaultInheritanceHandler);
|
|
10
|
-
}
|
|
11
|
-
export const decorateLitElement = ({ constructorPropertyKey, prototype, initialValue, lifecycleHooks, inheritanceHandler }) => {
|
|
12
|
-
const p = prototype;
|
|
13
|
-
const constructor = prototype.constructor;
|
|
14
|
-
const existingValue = Object.getOwnPropertyDescriptor(constructor, constructorPropertyKey)?.value;
|
|
15
|
-
if (existingValue) {
|
|
16
|
-
return existingValue;
|
|
17
|
-
}
|
|
18
|
-
const inherit = inheritanceHandler ?? getDefaultInheritanceHandler(initialValue);
|
|
19
|
-
const inheritedValue = constructor[constructorPropertyKey];
|
|
20
|
-
const value = inherit(initialValue, inheritedValue);
|
|
21
|
-
Object.defineProperty(constructor, constructorPropertyKey, { value });
|
|
22
|
-
for (const [lifecycleName, lifecycleFunction] of lifecycleHooks ?? []) {
|
|
23
|
-
const originalFunction = p[lifecycleName];
|
|
24
|
-
p[lifecycleName] = function (...args) {
|
|
25
|
-
originalFunction.call(this, ...args);
|
|
26
|
-
lifecycleFunction.call(this, value, ...args);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export class HTMLElementEventDispatcher {
|
|
2
|
-
constructor(element, type, options) {
|
|
3
|
-
this.element = element;
|
|
4
|
-
this.type = type;
|
|
5
|
-
this.options = options;
|
|
6
|
-
this.handlersMap = new Map();
|
|
7
|
-
}
|
|
8
|
-
dispatch(value) {
|
|
9
|
-
this.element.dispatchEvent(new CustomEvent(this.type, { detail: value, ...this.options }));
|
|
10
|
-
}
|
|
11
|
-
subscribe(handler) {
|
|
12
|
-
const nativeHandler = (event) => handler(event.detail);
|
|
13
|
-
this.element.addEventListener(this.type, nativeHandler);
|
|
14
|
-
this.handlersMap.set(handler, nativeHandler);
|
|
15
|
-
}
|
|
16
|
-
unsubscribe(handler) {
|
|
17
|
-
const nativeHandler = this.handlersMap.get(handler);
|
|
18
|
-
if (nativeHandler) {
|
|
19
|
-
this.element.removeEventListener(this.type, nativeHandler);
|
|
20
|
-
}
|
|
21
|
-
this.handlersMap.delete(handler);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export class PureEventDispatcher {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.handlers = new Set();
|
|
4
|
-
}
|
|
5
|
-
subscribe(handler) {
|
|
6
|
-
this.handlers.add(handler);
|
|
7
|
-
}
|
|
8
|
-
unsubscribe(handler) {
|
|
9
|
-
this.handlers.delete(handler);
|
|
10
|
-
}
|
|
11
|
-
dispatch(data) {
|
|
12
|
-
for (const handler of this.handlers) {
|
|
13
|
-
handler(data);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
package/dist/event/event.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HTMLElementEventDispatcher } from './HTMLElementEventDispatcher';
|
|
2
|
-
import { PureEventDispatcher } from './PureEventDispatcher';
|
|
3
|
-
export function event(options) {
|
|
4
|
-
return (prototype, propertyKey) => {
|
|
5
|
-
if (propertyKey === undefined) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
const eventFieldName = `$${propertyKey}Event$`;
|
|
9
|
-
Object.defineProperty(prototype, propertyKey, {
|
|
10
|
-
get() {
|
|
11
|
-
if (!this[eventFieldName]) {
|
|
12
|
-
this[eventFieldName] = this instanceof HTMLElement
|
|
13
|
-
? new HTMLElementEventDispatcher(this, propertyKey, options)
|
|
14
|
-
: new PureEventDispatcher();
|
|
15
|
-
}
|
|
16
|
-
return this[eventFieldName];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
}
|
package/dist/event/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { decorateLitElement } from '../decorateLitElement';
|
|
2
|
-
function extractArguments(args) {
|
|
3
|
-
const short = ((args) => typeof args[0] === 'string')(args);
|
|
4
|
-
return {
|
|
5
|
-
type: short ? args[0] : args[0].type,
|
|
6
|
-
target: short ? undefined : args[0].target,
|
|
7
|
-
options: short ? args[1] : args[0].options,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const eventListenersSymbol = Symbol('eventListeners');
|
|
11
|
-
export const eventListener = (...eventListenerOptions) => {
|
|
12
|
-
return (prototype, propertyKey, descriptor) => {
|
|
13
|
-
const extractedArguments = extractArguments(eventListenerOptions);
|
|
14
|
-
decorateLitElement({
|
|
15
|
-
prototype,
|
|
16
|
-
constructorPropertyKey: eventListenersSymbol,
|
|
17
|
-
initialValue: new Map,
|
|
18
|
-
}).set(`${extractedArguments.type}.${propertyKey}`, { descriptor, propertyKey, ...extractedArguments });
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { eventListenersSymbol } from './eventListener';
|
|
3
|
-
const originalLitElementConnectedCallback = LitElement.prototype.connectedCallback;
|
|
4
|
-
LitElement.prototype.connectedCallback = function () {
|
|
5
|
-
originalLitElementConnectedCallback.call(this);
|
|
6
|
-
const eventListeners = getEventHandlers(this);
|
|
7
|
-
for (const { type, target, options, descriptor, propertyKey } of eventListeners?.values() ?? []) {
|
|
8
|
-
defineBoundListener.call(this, propertyKey, descriptor);
|
|
9
|
-
extractEventTarget.call(this, target)
|
|
10
|
-
?.addEventListener(type, getBoundListener.call(this, propertyKey), options);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const originalLitElementDisconnectedCallback = LitElement.prototype.disconnectedCallback;
|
|
14
|
-
LitElement.prototype.disconnectedCallback = function () {
|
|
15
|
-
originalLitElementDisconnectedCallback.call(this);
|
|
16
|
-
const eventListeners = getEventHandlers(this);
|
|
17
|
-
for (const { type, target, options, propertyKey } of eventListeners?.values() ?? []) {
|
|
18
|
-
extractEventTarget.call(this, target)
|
|
19
|
-
?.removeEventListener(type, getBoundListener.call(this, propertyKey), options);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function getEventHandlers(element) {
|
|
23
|
-
return element.constructor[eventListenersSymbol];
|
|
24
|
-
}
|
|
25
|
-
function extractEventTarget(target) {
|
|
26
|
-
return typeof target === 'function' ? target.call(this) : target ?? this;
|
|
27
|
-
}
|
|
28
|
-
function getBoundListener(propertyKey) {
|
|
29
|
-
return Object.getOwnPropertyDescriptor(this, getBoundMethodKey(propertyKey))?.value;
|
|
30
|
-
}
|
|
31
|
-
function defineBoundListener(propertyKey, descriptor) {
|
|
32
|
-
const unboundFunction = !descriptor
|
|
33
|
-
? Object.getOwnPropertyDescriptor(this, propertyKey)?.value
|
|
34
|
-
: typeof descriptor.get === 'function'
|
|
35
|
-
? descriptor.get
|
|
36
|
-
: descriptor.value;
|
|
37
|
-
if (isEventListenerOrEventListenerObject(unboundFunction) === false) {
|
|
38
|
-
throw new TypeError(`${this.constructor}.${propertyKey} is not a function`);
|
|
39
|
-
}
|
|
40
|
-
Object.defineProperty(this, getBoundMethodKey(propertyKey), {
|
|
41
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
42
|
-
value: unboundFunction.bind(this),
|
|
43
|
-
configurable: true,
|
|
44
|
-
enumerable: false,
|
|
45
|
-
writable: false,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
const getBoundMethodKey = (method) => `$BOUND_${method}$`;
|
|
49
|
-
const isEventListenerOrEventListenerObject = (listener) => {
|
|
50
|
-
const isListener = typeof listener === 'function';
|
|
51
|
-
// @ts-expect-error 'in' operator seemingly does not narrow down the type
|
|
52
|
-
const isListenerObject = typeof listener === 'object' && listener !== null && 'handleEvent' in listener && typeof listener.handleEvent === 'function';
|
|
53
|
-
return isListener || isListenerObject;
|
|
54
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const extractEventHandler = (eventListener) => {
|
|
2
|
-
return eventListener.type === 5
|
|
3
|
-
// @ts-expect-error - _$committedValue does actually exist on EventPart
|
|
4
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
5
|
-
? eventListener._$committedValue.bind(eventListener.element)
|
|
6
|
-
: typeof eventListener === 'function'
|
|
7
|
-
? eventListener
|
|
8
|
-
: eventListener.handleEvent;
|
|
9
|
-
};
|
package/dist/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/export */
|
|
2
|
-
export * from 'lit';
|
|
3
|
-
export { eventOptions, queryAssignedElements, queryAssignedNodes, queryAsync } from 'lit/decorators.js';
|
|
4
|
-
export { withStatic, literal, unsafeStatic, html as staticHtml, svg as staticSvg } from 'lit/static-html.js';
|
|
5
|
-
export * from 'lit-html';
|
|
6
|
-
export * from 'lit-html/directive-helpers.js';
|
|
7
|
-
export * from 'lit-html/directive.js';
|
|
8
|
-
export * from 'lit-html/async-directive.js';
|
|
9
|
-
export * from 'lit-html/directives/async-append.js';
|
|
10
|
-
export * from 'lit-html/directives/async-replace.js';
|
|
11
|
-
export * from 'lit-html/directives/cache.js';
|
|
12
|
-
export * from 'lit-html/directives/choose.js';
|
|
13
|
-
export * from 'lit-html/directives/class-map.js';
|
|
14
|
-
export * from 'lit-html/directives/guard.js';
|
|
15
|
-
export * from 'lit-html/directives/if-defined.js';
|
|
16
|
-
export * from 'lit-html/directives/join.js';
|
|
17
|
-
export * from 'lit-html/directives/keyed.js';
|
|
18
|
-
export * from 'lit-html/directives/live.js';
|
|
19
|
-
export * from 'lit-html/directives/map.js';
|
|
20
|
-
export * from 'lit-html/directives/range.js';
|
|
21
|
-
export * from 'lit-html/directives/ref.js';
|
|
22
|
-
export * from 'lit-html/directives/repeat.js';
|
|
23
|
-
export * from 'lit-html/directives/style-map.js';
|
|
24
|
-
export * from 'lit-html/directives/template-content.js';
|
|
25
|
-
export * from 'lit-html/directives/unsafe-html.js';
|
|
26
|
-
export * from 'lit-html/directives/unsafe-svg.js';
|
|
27
|
-
export * from 'lit-html/directives/until.js';
|
|
28
|
-
export * from 'lit-html/directives/when.js';
|
|
29
|
-
import './types';
|
|
30
|
-
export { Component, nothing, component } from './Component';
|
|
31
|
-
export * from './Controller';
|
|
32
|
-
export * from './query';
|
|
33
|
-
export * from './style';
|
|
34
|
-
export * from './updated';
|
|
35
|
-
export * from './eventListener';
|
|
36
|
-
export * from './event';
|
package/dist/query/index.js
DELETED
package/dist/query/query.js
DELETED
package/dist/query/queryAll.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var AsteriskSyntaxStyleHandler_1;
|
|
2
|
-
import { __decorate } from "tslib";
|
|
3
|
-
import { styleHandler } from './style';
|
|
4
|
-
let AsteriskSyntaxStyleHandler = AsteriskSyntaxStyleHandler_1 = class AsteriskSyntaxStyleHandler {
|
|
5
|
-
static getProportion(value) {
|
|
6
|
-
return Number(value.replace(AsteriskSyntaxStyleHandler_1.regex, '$1') || 1);
|
|
7
|
-
}
|
|
8
|
-
handles(_, [key, value]) {
|
|
9
|
-
return AsteriskSyntaxStyleHandler_1.supportedKeys.has(key) && AsteriskSyntaxStyleHandler_1.regex.test(value);
|
|
10
|
-
}
|
|
11
|
-
apply(element, [, value]) {
|
|
12
|
-
const proportion = AsteriskSyntaxStyleHandler_1.getProportion(value);
|
|
13
|
-
element.style.flexGrow = String(proportion);
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
AsteriskSyntaxStyleHandler.supportedKeys = new Set(['width', 'height']);
|
|
17
|
-
AsteriskSyntaxStyleHandler.regex = /^\s*(0|[1-9][0-9]*)?\s*\*\s*$/;
|
|
18
|
-
AsteriskSyntaxStyleHandler = AsteriskSyntaxStyleHandler_1 = __decorate([
|
|
19
|
-
styleHandler()
|
|
20
|
-
], AsteriskSyntaxStyleHandler);
|
|
21
|
-
export { AsteriskSyntaxStyleHandler };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { styleHandler } from './style';
|
|
3
|
-
let CustomPropertyStyleHandler = class CustomPropertyStyleHandler {
|
|
4
|
-
handles(_, [key]) {
|
|
5
|
-
return key.startsWith('--');
|
|
6
|
-
}
|
|
7
|
-
apply(element, [key, value]) {
|
|
8
|
-
element.style.setProperty(key, value);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
CustomPropertyStyleHandler = __decorate([
|
|
12
|
-
styleHandler()
|
|
13
|
-
], CustomPropertyStyleHandler);
|
|
14
|
-
export { CustomPropertyStyleHandler };
|
package/dist/style/index.js
DELETED
package/dist/style/style.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Directive, directive, PartType } from '..';
|
|
2
|
-
export const styleHandler = () => {
|
|
3
|
-
return (Constructor) => {
|
|
4
|
-
const handler = new Constructor();
|
|
5
|
-
StyleDirective.handlers.add(handler);
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export class StyleDirective extends Directive {
|
|
9
|
-
constructor(partInfo) {
|
|
10
|
-
super(partInfo);
|
|
11
|
-
if (partInfo.type !== PartType.ELEMENT) {
|
|
12
|
-
throw new Error('observeMutation can only be used on an element');
|
|
13
|
-
}
|
|
14
|
-
const part = partInfo;
|
|
15
|
-
this.element = part.element;
|
|
16
|
-
}
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
18
|
-
render(styles) {
|
|
19
|
-
for (const [key, value] of Object.entries(styles)) {
|
|
20
|
-
const handler = [...StyleDirective.handlers].find(handler => handler.handles(this.element, [key, value])) ?? StyleDirective.defaultHandler;
|
|
21
|
-
handler.apply(this.element, [key, value]);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
StyleDirective.handlers = new Set();
|
|
26
|
-
StyleDirective.defaultHandler = new class {
|
|
27
|
-
handles() { return true; }
|
|
28
|
-
apply(element, [key, value]) {
|
|
29
|
-
element.style[key] = value === null || value === undefined ? '' : value;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
export const style = directive(StyleDirective);
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/dist/updated/index.js
DELETED
package/dist/updated/property.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { property as litProperty } from 'lit/decorators.js';
|
|
2
|
-
import { updated } from './updated';
|
|
3
|
-
export const property = (options) => {
|
|
4
|
-
return (prototype, propertyKey) => {
|
|
5
|
-
if (options?.updated) {
|
|
6
|
-
updated(options.updated)(prototype, propertyKey);
|
|
7
|
-
}
|
|
8
|
-
return litProperty(options)(prototype, propertyKey);
|
|
9
|
-
};
|
|
10
|
-
};
|
package/dist/updated/state.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { state as litState } from 'lit/decorators.js';
|
|
2
|
-
import { updated } from './updated';
|
|
3
|
-
export const state = (options) => {
|
|
4
|
-
return (prototype, propertyKey) => {
|
|
5
|
-
if (options?.updated) {
|
|
6
|
-
updated(options.updated)(prototype, propertyKey);
|
|
7
|
-
}
|
|
8
|
-
return litState(options)(prototype, propertyKey);
|
|
9
|
-
};
|
|
10
|
-
};
|
package/dist/updated/updated.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { decorateLitElement } from '../decorateLitElement';
|
|
2
|
-
export const updatedObserversSymbol = Symbol('updatedObservers');
|
|
3
|
-
export const updated = (callback) => {
|
|
4
|
-
return (prototype, propertyKey) => {
|
|
5
|
-
decorateLitElement({
|
|
6
|
-
prototype,
|
|
7
|
-
constructorPropertyKey: updatedObserversSymbol,
|
|
8
|
-
initialValue: new Map,
|
|
9
|
-
lifecycleHooks: new Map([
|
|
10
|
-
['updated', function (observers, changedProperties) {
|
|
11
|
-
for (const [propertyKey, value] of changedProperties) {
|
|
12
|
-
const key = propertyKey;
|
|
13
|
-
const observer = observers?.get(key);
|
|
14
|
-
if (observer !== undefined) {
|
|
15
|
-
observer.call(this, this[key], value);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}]
|
|
19
|
-
])
|
|
20
|
-
}).set(propertyKey, callback);
|
|
21
|
-
};
|
|
22
|
-
};
|