@3mo/card 0.0.1 → 0.0.3

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.
@@ -1,6 +1,7 @@
1
1
  import { Component } from '@a11d/lit';
2
2
  import { SlotController } from '@3mo/slot-controller';
3
3
  import '@3mo/heading';
4
+ import '@3mo/flex';
4
5
  /**
5
6
  * @element mo-card
6
7
  *
@@ -17,6 +18,19 @@ import '@3mo/heading';
17
18
  * @slot media - Embedded media
18
19
  * @slot - Body / Content
19
20
  * @slot footer - Actions in the footer
21
+ *
22
+ * @cssprop --mo-card-header-padding - Padding of the header
23
+ * @cssprop --mo-card-avatar-background - Color of the avatar
24
+ * @cssprop --mo-card-avatar-color - Text color of the avatar
25
+ * @cssprop --mo-card-body-padding - Padding of the body
26
+ * @cssprop --mo-card-footer-padding - Padding of the footer
27
+ *
28
+ * @csspart media - Embedded media
29
+ * @csspart header - The header
30
+ * @csspart avatar - The avatar
31
+ * @csspart heading - The heading
32
+ * @csspart subHeading - The subHeading
33
+ * @csspart footer - The footer
20
34
  */
21
35
  export declare class Card extends Component {
22
36
  heading?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAuB,MAAM,WAAW,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,IAAK,SAAQ,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IAE1B,SAAS,CAAC,QAAQ,CAAC,cAAc,iBAA2B;IAE5D,WAAoB,MAAM,kCAEzB;IAED,cAAuB,QAAQ,yCAE9B;IAED,SAAS,KAAK,aAAa,0CAG1B;IAED,SAAS,KAAK,cAAc,0CAO3B;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,4BAA4B,yCAEzC;IAED,SAAS,KAAK,+BAA+B,yCAE5C;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,YAAY,yCAGzB;IAED,SAAS,KAAK,cAAc,0CAE3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,SAAS,EAAE,IAAI,CAAA;KACf;CACD"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAuB,MAAM,WAAW,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,cAAc,CAAA;AACrB,OAAO,WAAW,CAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBACa,IAAK,SAAQ,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IAE1B,SAAS,CAAC,QAAQ,CAAC,cAAc,iBAA2B;IAE5D,WAAoB,MAAM,kCAEzB;IAED,cAAuB,QAAQ,yCAE9B;IAED,SAAS,KAAK,aAAa,0CAG1B;IAED,SAAS,KAAK,cAAc,0CAO3B;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,4BAA4B,yCAEzC;IAED,SAAS,KAAK,+BAA+B,yCAE5C;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,YAAY,yCAGzB;IAED,SAAS,KAAK,cAAc,0CAE3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,SAAS,EAAE,IAAI,CAAA;KACf;CACD"}
@@ -1,4 +1,2 @@
1
- import '@3mo/flex';
2
- import '@3mo/heading';
3
1
  export * from './Card.js';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;AAClB,OAAO,cAAc,CAAA;AACrB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
package/dist/Card.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Component } from '@a11d/lit';
2
2
  import { SlotController } from '@3mo/slot-controller';
3
3
  import '@3mo/heading';
4
+ import '@3mo/flex';
4
5
  /**
5
6
  * @element mo-card
6
7
  *
@@ -17,6 +18,19 @@ import '@3mo/heading';
17
18
  * @slot media - Embedded media
18
19
  * @slot - Body / Content
19
20
  * @slot footer - Actions in the footer
21
+ *
22
+ * @cssprop --mo-card-header-padding - Padding of the header
23
+ * @cssprop --mo-card-avatar-background - Color of the avatar
24
+ * @cssprop --mo-card-avatar-color - Text color of the avatar
25
+ * @cssprop --mo-card-body-padding - Padding of the body
26
+ * @cssprop --mo-card-footer-padding - Padding of the footer
27
+ *
28
+ * @csspart media - Embedded media
29
+ * @csspart header - The header
30
+ * @csspart avatar - The avatar
31
+ * @csspart heading - The heading
32
+ * @csspart subHeading - The subHeading
33
+ * @csspart footer - The footer
20
34
  */
21
35
  export declare class Card extends Component {
22
36
  heading?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAuB,MAAM,WAAW,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,IAAK,SAAQ,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IAE1B,SAAS,CAAC,QAAQ,CAAC,cAAc,iBAA2B;IAE5D,WAAoB,MAAM,kCA+DzB;IAED,cAAuB,QAAQ,yCAS9B;IAED,SAAS,KAAK,aAAa,0CAO1B;IAED,SAAS,KAAK,cAAc,0CAgB3B;IAED,SAAS,KAAK,2BAA2B,yCAQxC;IAED,SAAS,KAAK,4BAA4B,yCAQzC;IAED,SAAS,KAAK,+BAA+B,yCAQ5C;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,YAAY,yCAGzB;IAED,SAAS,KAAK,cAAc,0CAE3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,SAAS,EAAE,IAAI,CAAA;KACf;CACD"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAuB,MAAM,WAAW,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,cAAc,CAAA;AACrB,OAAO,WAAW,CAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBACa,IAAK,SAAQ,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IAE1B,SAAS,CAAC,QAAQ,CAAC,cAAc,iBAA2B;IAE5D,WAAoB,MAAM,kCA+DzB;IAED,cAAuB,QAAQ,yCAS9B;IAED,SAAS,KAAK,aAAa,0CAO1B;IAED,SAAS,KAAK,cAAc,0CAgB3B;IAED,SAAS,KAAK,2BAA2B,yCAQxC;IAED,SAAS,KAAK,4BAA4B,yCAQzC;IAED,SAAS,KAAK,+BAA+B,yCAQ5C;IAED,SAAS,KAAK,2BAA2B,yCAExC;IAED,SAAS,KAAK,YAAY,yCAGzB;IAED,SAAS,KAAK,cAAc,0CAE3B;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,SAAS,EAAE,IAAI,CAAA;KACf;CACD"}
package/dist/Card.js CHANGED
@@ -2,6 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { component, html, property, Component, css, nothing, style } from '@a11d/lit';
3
3
  import { SlotController } from '@3mo/slot-controller';
4
4
  import '@3mo/heading';
5
+ import '@3mo/flex';
5
6
  /**
6
7
  * @element mo-card
7
8
  *
@@ -18,6 +19,19 @@ import '@3mo/heading';
18
19
  * @slot media - Embedded media
19
20
  * @slot - Body / Content
20
21
  * @slot footer - Actions in the footer
22
+ *
23
+ * @cssprop --mo-card-header-padding - Padding of the header
24
+ * @cssprop --mo-card-avatar-background - Color of the avatar
25
+ * @cssprop --mo-card-avatar-color - Text color of the avatar
26
+ * @cssprop --mo-card-body-padding - Padding of the body
27
+ * @cssprop --mo-card-footer-padding - Padding of the footer
28
+ *
29
+ * @csspart media - Embedded media
30
+ * @csspart header - The header
31
+ * @csspart avatar - The avatar
32
+ * @csspart heading - The heading
33
+ * @csspart subHeading - The subHeading
34
+ * @csspart footer - The footer
21
35
  */
22
36
  let Card = class Card extends Component {
23
37
  constructor() {
@@ -69,8 +83,8 @@ let Card = class Card extends Component {
69
83
  align-items: center;
70
84
  border-radius: 50%;
71
85
  font-size: 18px;
72
- background: var(--mo-card-avatar-color, var(--mo-color-accent, #0077c8));
73
- color: var(--mo-card-avatar-text-color, var(--mo-color-on-accent, #fff));
86
+ background: var(--mo-card-avatar-background, var(--mo-color-accent, #0077c8));
87
+ color: var(--mo-card-avatar-color, var(--mo-color-on-accent, #fff));
74
88
 
75
89
  }
76
90
 
package/dist/bundle.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";function t(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}const e=window,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.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,...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)},l=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,i))(e)})(t):t;var a;const h=window,d=h.trustedTypes,c=d?d.emptyScript:"",u=h.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?c: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}},v=(t,e)=>e!==t&&(e==e||t==t),f={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:v};class g 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=f){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)||f}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(l(t))}else void 0!==t&&e.push(l(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 i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{s?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((s=>{const i=document.createElement("style"),n=e.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=s.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}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=f){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:p).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:p;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||v)(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;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(a=h.reactiveElementVersions)&&void 0!==a?a:h.reactiveElementVersions=[]).push("1.4.1");const $=window,m=$.trustedTypes,_=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,b="?"+A,C=`<${b}>`,w=document,x=(t="")=>w.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,H=t=>S(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,T=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),M=/'/g,O=/"/g,U=/^(?:script|style|textarea|title)$/i,j=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=j(1),z=j(2),D=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),B=new WeakMap,I=(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 X(e.insertBefore(x(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o},K=w.createTreeWalker(w,129,null,!1),V=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":"",o=k;for(let e=0;e<s;e++){const s=t[e];let l,a,h=-1,d=0;for(;d<s.length&&(o.lastIndex=d,a=o.exec(s),null!==a);)d=o.lastIndex,o===k?"!--"===a[1]?o=P:void 0!==a[1]?o=T:void 0!==a[2]?(U.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=N):void 0!==a[3]&&(o=N):o===N?">"===a[0]?(o=null!=n?n:k,h=-1):void 0===a[1]?h=-2:(h=o.lastIndex-a[2].length,l=a[1],o=void 0===a[3]?N:'"'===a[3]?O:M):o===O||o===M?o=N:o===P||o===T?o=k:(o=N,n=void 0);const c=o===N&&t[e+1].startsWith("/>")?" ":"";r+=o===k?s+C:h>=0?(i.push(l),s.slice(0,h)+"$lit$"+s.slice(h)+A+c):s+A+(-2===h?(i.push(void 0),e):c)}const l=r+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(l):l,i]};class Y{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[a,h]=V(t,e);if(this.el=Y.createElement(a,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(A)){const s=h[r++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(A),e=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?F:"?"===e[1]?Q:"@"===e[1]?G:Z})}else l.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(U.test(i.tagName)){const t=i.textContent.split(A),e=t.length-1;if(e>0){i.textContent=m?m.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],x()),K.nextNode(),l.push({type:2,index:++n});i.append(t[e],x())}}}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(A,t+1));)l.push({type:7,index:n}),t+=A.length-1}n++}}static createElement(t,e){const s=w.createElement("template");return s.innerHTML=t,s}}function W(t,e,s=t,i){var n,r,o,l;if(e===D)return e;let a=void 0!==i?null===(n=s._$Cl)||void 0===n?void 0:n[i]:s._$Cu;const h=E(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,s,i)),void 0!==i?(null!==(o=(l=s)._$Cl)&&void 0!==o?o:l._$Cl=[])[i]=a:s._$Cu=a),void 0!==a&&(e=W(t,a._$AS(t,e.values),a,i)),e}class q{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,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new X(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new tt(r,this,t)),this.v.push(e),a=i[++l]}o!==(null==a?void 0:a.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 X{constructor(t,e,s,i){var n;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$C_=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._$C_}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=W(this,t,e),E(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==D&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):H(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==L&&E(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=Y.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 q(n,this),e=t.p(this.options);t.m(s),this.k(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new Y(t)),e}O(t){S(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 X(this.S(x()),this.S(x()),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._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,s,i,n){this.type=1,this._$AH=L,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=L}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=W(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==D,r&&(this._$AH=t);else{const i=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=W(this,i[s+o],e,o),l===D&&(l=this._$AH[o]),r||(r=!E(l)||l!==this._$AH[o]),l===L?t=L:t!==L&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!i&&this.P(t)}P(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends Z{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===L?void 0:t}}const J=m?m.emptyScript:"";class Q extends Z{constructor(){super(...arguments),this.type=4}P(t){t&&t!==L?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class G extends Z{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=W(this,t,e,0))&&void 0!==s?s:L)===D)return;const i=this._$AH,n=t===L&&i!==L||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==L&&(i===L||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){W(this,t)}}const et={A:"$lit$",M:A,C:b,L:1,R:V,D:q,V:H,I:W,H:X,N:Z,U:Q,B:G,F,W:tt},st=$.litHtmlPolyfillSupport;var it,nt;null==st||st(Y,X),(null!==(y=$.litHtmlVersions)&&void 0!==y?y:$.litHtmlVersions=[]).push("2.3.1");class rt extends g{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=I(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 D}}rt.finalized=!0,rt._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:rt});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:rt});(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.2");const lt=(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)}};var at;null===(at=window.HTMLSlotElement)||void 0===at||at.prototype.assignedElements;const ht=Symbol.for(""),dt=t=>{if((null==t?void 0:t.r)===ht)return null==t?void 0:t._$litStatic$},ct=new Map,ut=t=>(e,...s)=>{const i=s.length;let n,r;const o=[],l=[];let a,h=0,d=!1;for(;h<i;){for(a=e[h];h<i&&void 0!==(r=s[h],n=dt(r));)a+=n+e[++h],d=!0;l.push(r),o.push(a),h++}if(h===i&&o.push(e[i]),d){const t=o.join("$$lit$$");void 0===(e=ct.get(t))&&(o.raw=o,ct.set(t,e=o)),s=l}return t(e,...s)},pt=(ut(R),ut(z),1),vt=2,ft=3,gt=4,yt=6,$t=t=>(...e)=>({_$litDirective$:t,values:e});class mt{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{H:_t}=et,At=(t,e)=>void 0===e?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===e,bt=t=>void 0===t.strings,Ct=()=>document.createComment(""),wt=(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(Ct(),r),i=n.insertBefore(Ct(),r);s=new _t(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},xt=(t,e,s=t)=>(t._$AI(e,s),t),Et={},St=(t,e=Et)=>t._$AH=e,Ht=t=>t._$AH,kt=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}},Pt=t=>{t._$AR()},Tt=(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),Tt(t,e);return!0},Nt=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))},Mt=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 Ot(t){void 0!==this._$AN?(Nt(this),this._$AM=t,Mt(this)):this._$AM=t}function Ut(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++)Tt(i[t],!1),Nt(i[t]);else null!=i&&(Tt(i,!1),Nt(i));else Tt(this,t)}const jt=t=>{var e,s,i,n;t.type==vt&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Ut),null!==(s=(n=t)._$AQ)&&void 0!==s||(n._$AQ=Ot))};class Rt extends mt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Mt(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&&(Tt(this,t),Nt(this))}setValue(t){if(bt(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 zt{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class Dt{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 Lt extends Rt{constructor(){super(...arguments),this._$CK=new zt(this),this._$CX=new Dt}render(t,e){return D}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})),D}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}$t(Lt),$t(class extends Lt{constructor(t){if(super(t),t.type!==vt)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&&Pt(this._$Ctt);const s=wt(this._$Ctt);xt(s,t)}}),$t(class extends mt{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){if(At(this.it)&&(!At(e)||this.it.strings!==e.strings)){const e=Ht(t).pop();let s=this.et.get(this.it.strings);if(void 0===s){const t=document.createDocumentFragment();s=I(L,t),s.setConnected(!1),this.et.set(this.it.strings,s)}St(s,[e]),wt(s,void 0,e)}if(At(e)){if(!At(this.it)||this.it.strings!==e.strings){const s=this.et.get(e.strings);if(void 0!==s){const e=Ht(s).pop();Pt(t),wt(t,void 0,e),St(t,[e])}}this.it=e}else this.it=void 0;return this.render(e)}}),$t(class extends mt{constructor(t){var e;if(super(t),t.type!==pt||"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 D}});const Bt={};$t(class extends mt{constructor(){super(...arguments),this.ot=Bt}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 D}else if(this.ot===e)return D;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}}),$t(class extends mt{constructor(){super(...arguments),this.key=L}render(t,e){return this.key=t,e}update(t,[e,s]){return e!==this.key&&(St(t),this.key=e),s}}),$t(class extends mt{constructor(t){if(super(t),t.type!==ft&&t.type!==pt&&t.type!==gt)throw Error("The `live` directive is not allowed on child or event bindings");if(!bt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===D||e===L)return e;const s=t.element,i=t.name;if(t.type===ft){if(e===s[i])return D}else if(t.type===gt){if(!!e===s.hasAttribute(i))return D}else if(t.type===pt&&s.getAttribute(i)===e+"")return D;return St(t),e}});const It=new WeakMap,Kt=($t(class extends Rt{render(t){return L}update(t,[e]){var s;const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.dt)&&(this.Y=e,this.ct=null===(s=t.options)||void 0===s?void 0:s.host,this.rt(this.dt=t.element)),L}rt(t){var e;if("function"==typeof this.Y){const s=null!==(e=this.ct)&&void 0!==e?e:globalThis;let i=It.get(s);void 0===i&&(i=new WeakMap,It.set(s,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ct,void 0),i.set(this.Y,t),void 0!==t&&this.Y.call(this.ct,t)}else this.Y.value=t}get lt(){var t,e,s;return"function"==typeof this.Y?null===(e=It.get(null!==(t=this.ct)&&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.dt&&this.rt(void 0)}reconnected(){this.rt(this.dt)}}),(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i});$t(class extends mt{constructor(t){if(super(t),t.type!==vt)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=Ht(t),{values:o,keys:l}=this.ht(e,s,i);if(!Array.isArray(r))return this.ut=l,o;const a=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let d,c,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(a[u]===l[v])h[v]=xt(r[u],o[v]),u++,v++;else if(a[p]===l[f])h[f]=xt(r[p],o[f]),p--,f--;else if(a[u]===l[f])h[f]=xt(r[u],o[f]),wt(t,h[f+1],r[u]),u++,f--;else if(a[p]===l[v])h[v]=xt(r[p],o[v]),wt(t,r[u],r[p]),p--,v++;else if(void 0===d&&(d=Kt(l,v,f),c=Kt(a,u,p)),d.has(a[u]))if(d.has(a[p])){const e=c.get(l[v]),s=void 0!==e?r[e]:null;if(null===s){const e=wt(t,r[u]);xt(e,o[v]),h[v]=e}else h[v]=xt(s,o[v]),wt(t,r[u],s),r[e]=null;v++}else kt(r[p]),p--;else kt(r[u]),u++;for(;v<=f;){const e=wt(t,h[f+1]);xt(e,o[v]),h[v++]=e}for(;u<=p;){const t=r[u++];null!==t&&kt(t)}return this.ut=l,St(t,h),D}}),$t(class extends mt{constructor(t){var e;if(super(t),t.type!==pt||"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 D}}),$t(class extends mt{constructor(t){if(super(t),t.type!==vt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?D:(this.ft=t,document.importNode(t.content,!0))}});class Vt extends mt{constructor(t){if(super(t),this.it=L,t.type!==vt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===L||null==t)return this._t=void 0,this.it=t;if(t===D)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:[]}}}Vt.directiveName="unsafeHTML",Vt.resultType=1;$t(Vt);class Yt extends Vt{}Yt.directiveName="unsafeSVG",Yt.resultType=2;$t(Yt);const Wt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then;$t(class extends Rt{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CK=new zt(this),this._$CX=new Dt}render(...t){var e;return null!==(e=t.find((t=>!Wt(t))))&&void 0!==e?e:D}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(!Wt(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 D}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});const qt=L,Xt=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 Zt extends rt{initialized(){}connected(){}disconnected(){}get template(){return qt}render(){return this.template}firstUpdated(t){super.firstUpdated(t),this.initialized()}connectedCallback(){super.connectedCallback(),this.connected()}disconnectedCallback(){super.disconnectedCallback(),this.disconnected()}}const Ft=()=>t=>{const e=new t;Jt.handlers.add(e)};class Jt extends mt{constructor(t){if(super(t),t.type!==yt)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)){([...Jt.handlers].find((t=>t.handles(this.element,[e,s])))??Jt.defaultHandler).apply(this.element,[e,s])}}}Jt.handlers=new Set,Jt.defaultHandler=new class{handles(){return!0}apply(t,[e,s]){t.style[e]=null==s?"":s}};const Qt=$t(Jt);var Gt;let te=Gt=class{static getProportion(t){return Number(t.replace(Gt.regex,"$1")||1)}handles(t,[e,s]){return Gt.supportedKeys.has(e)&&Gt.regex.test(s)}apply(t,[,e]){const s=Gt.getProportion(e);t.style.flexGrow=String(s)}};te.supportedKeys=new Set(["width","height"]),te.regex=/^\s*(0|[1-9][0-9]*)?\s*\*\s*$/,te=Gt=t([Ft()],te);let ee=class{handles(t,[e]){return e.startsWith("--")}apply(t,[e,s]){t.style.setProperty(e,s)}};ee=t([Ft()],ee);const se=new Map([[Array,(t,e)=>[...e??[],...t]],[Set,(t,e)=>new Set([...e??[],...t])],[Map,(t,e)=>new Map([...e??[],...t])]]),ie=(t,e)=>e?Object.assign(t,e):t;const ne=({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 a=n??function(t){const e="constructor"in t?t.constructor:void 0;return se.get(e)??ie}(s),h=a(s,o[t]);Object.defineProperty(o,t,{value:h});for(const[t,e]of i??[]){const s=r[t];r[t]=function(...t){s.call(this,...t),e.call(this,h,...t)}}return h},re=Symbol("updatedObservers"),oe=t=>(e,s)=>{ne({prototype:e,constructorPropertyKey:re,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)},le=t=>(e,s)=>(t?.updated&&oe(t.updated)(e,s),function(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):lt(t,e)}(t)(e,s));const ae=Symbol("eventListeners"),he=rt.prototype.connectedCallback;rt.prototype.connectedCallback=function(){he.call(this);const t=ce(this);for(const{type:e,target:s,options:i,descriptor:n,propertyKey:r}of t?.values()??[])ve.call(this,r,n),ue.call(this,s)?.addEventListener(e,pe.call(this,r),i)};const de=rt.prototype.disconnectedCallback;function ce(t){return t.constructor[ae]}function ue(t){return"function"==typeof t?t.call(this):t??this}function pe(t){return Object.getOwnPropertyDescriptor(this,fe(t))?.value}function ve(t,e){const s=e?"function"==typeof e.get?e.get:e.value:Object.getOwnPropertyDescriptor(this,t)?.value;if(!1===ge(s))throw new TypeError(`${this.constructor}.${t} is not a function`);Object.defineProperty(this,fe(t),{value:s.bind(this),configurable:!0,enumerable:!1,writable:!1})}rt.prototype.disconnectedCallback=function(){de.call(this);const t=ce(this);for(const{type:e,target:s,options:i,propertyKey:n}of t?.values()??[])ue.call(this,s)?.removeEventListener(e,pe.call(this,n),i)};const fe=t=>`$BOUND_${t}$`,ge=t=>{const e="function"==typeof t,s="object"==typeof t&&null!==t&&"handleEvent"in t&&"function"==typeof t.handleEvent;return e||s};var ye;let $e=ye=class extends Zt{get direction(){var t;return(null===(t=[...ye.flexDirectionByDirections].find((([,t])=>this.style.flexDirection===t)))||void 0===t?void 0:t[0])||"vertical"}set direction(t){this.style.flexDirection=ye.flexDirectionByDirections.get(t)||"column"}get wrap(){return this.style.flexWrap}set wrap(t){this.style.flexWrap=t}get gap(){return this.style.gap}set gap(t){this.style.gap=t}get justifyItems(){return this.style.justifyItems}set justifyItems(t){this.style.justifyItems=t}get justifyContent(){return this.style.justifyContent}set justifyContent(t){this.style.justifyContent=t}get alignItems(){return this.style.alignItems}set alignItems(t){this.style.alignItems=t}get alignContent(){return this.style.alignContent}set alignContent(t){this.style.alignContent=t}static get styles(){return o`:host{display:flex;flex-direction:column;flex-wrap:nowrap}`}get template(){return R`<slot></slot>`}};$e.flexDirectionByDirections=new Map([["horizontal","row"],["horizontal-reversed","row-reverse"],["vertical","column"],["vertical-reversed","column-reverse"]]),t([le()],$e.prototype,"direction",null),t([le()],$e.prototype,"wrap",null),t([le()],$e.prototype,"gap",null),t([le()],$e.prototype,"justifyItems",null),t([le()],$e.prototype,"justifyContent",null),t([le()],$e.prototype,"alignItems",null),t([le()],$e.prototype,"alignContent",null),$e=ye=t([Xt("mo-flex")],$e);let me=class extends Zt{constructor(){super(...arguments),this.typography="heading3"}static get styles(){return o`:host{display:block}:host([typography=heading1]){font-size:min(2.5em,36px);letter-spacing:-.75px;font-weight:300}:host([typography=heading2]){font-size:min(2em,30px);letter-spacing:-.5px;font-weight:300}:host([typography=heading3]){font-size:min(1.8em,24px);letter-spacing:-.25px;font-weight:400}:host([typography=heading4]){font-size:min(1.5em,18px);font-weight:400}:host([typography=heading5]){font-size:min(1.17em,16px);font-weight:500}:host([typography=heading6]){font-size:min(1em,14px);letter-spacing:.15px;font-weight:500}:host([typography=subtitle1]){font-size:min(1.15em,18px);letter-spacing:.15px;font-weight:400}:host([typography=subtitle2]){font-size:min(1em,14px);letter-spacing:.1px;font-weight:400}`}get template(){return R`<slot></slot>`}};t([le({reflect:!0})],me.prototype,"typography",void 0),me=t([Xt("mo-heading")],me);class _e extends class{constructor(t){this.host=t,this.host.addController(this)}}{constructor(t,e){super(t),this.host=t,this.slotChangeCallback=e,this.mutationObserver=new MutationObserver(this.handleMutation.bind(this)).observe(this.host,{childList:!0,subtree:!0}),this.handleChange=()=>{var t;this.host.requestUpdate(),null===(t=this.slotChangeCallback)||void 0===t||t.call(this)}}getAssignedNodes(t){var e;const s=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(t?`slot[name="${t}"]`:"slot:not([name])");return s?this.extractNodesFromSlot(s):this.extractNodesFromChildren(t)}hasAssignedNodes(t){return this.getAssignedNodes(t).length>0}getAssignedElements(t){return this.getAssignedNodes(t).filter((t=>t instanceof Element))}hasAssignedElements(t){return this.getAssignedElements(t).length>0}extractNodesFromSlot(t){return t.assignedNodes().flatMap((t=>t instanceof HTMLSlotElement?this.extractNodesFromSlot(t):[t]))}extractNodesFromChildren(t){return[...this.host.childNodes].filter((t=>{var e;return t instanceof Element||t instanceof Text&&!!(null===(e=t.textContent)||void 0===e?void 0:e.trim())})).filter((e=>!t||e instanceof Element&&e.slot===t)).flatMap((t=>t instanceof HTMLSlotElement?t.assignedNodes():[t]))}hostConnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("slotchange",this.handleChange)}hostDisconnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.removeEventListener("slotchange",this.handleChange)}handleMutation(t){t.some((t=>"childList"===t.type))&&this.handleChange()}}let Ae=class extends Zt{constructor(){super(...arguments),this.slotController=new _e(this)}static get styles(){return o`:host{display:block;background:var(--mo-color-surface,#fff);box-shadow:var(--mo-shadow,rgba(95,81,78,.4) 0 1px 2px 0,rgba(95,81,78,.2) 0 1px 3px 1px);border-radius:var(--mo-border-radius,4px)}slot[name=header]{display:flex;gap:6px;padding:var(--mo-card-header-padding,16px)}slot[name=heading]{display:block;flex:1}slot[name=media]::slotted(:first-child),slot[name=media]>:first-child{border-radius:var(--mo-border-radius,4px) var(--mo-border-radius,4px) 0 0;display:block;background-size:cover;background-repeat:no-repeat;background-position:center center;width:100%;object-fit:cover}slot:not([name]){display:block;flex:1}div[part=avatar]{height:40px;width:40px;aspect-ratio:1/1;display:flex;user-select:none;justify-content:center;align-items:center;border-radius:50%;font-size:18px;background:var(--mo-card-avatar-color,var(--mo-color-accent,#0077c8));color:var(--mo-card-avatar-text-color,var(--mo-color-on-accent,#fff))}:host([hasBody]) slot:not([name]){padding:var(--mo-card-body-padding,16px)}:host([hasBody][hasHeader]) slot:not([name]){padding:var(--mo-card-body-padding,0 16px 16px 16px)}slot[name=footer]{display:block;padding:var(--mo-card-footer-padding,8px)}`}get template(){return R`<mo-flex ${Qt({width:"100%",height:"100%"})}>${this.mediaTemplate} ${this.headerTemplate} ${this.bodyTemplate} ${this.footerTemplate}</mo-flex>`}get mediaTemplate(){return!!this.image||this.slotController.hasAssignedElements("media")?R`<slot part="media" name="media">${this.image?R`<img part="media" src="${this.image}">`:qt}</slot>`:qt}get headerTemplate(){const t=this.slotController.hasAssignedElements("header")||!!this.avatar||!!this.heading||!!this.subHeading||this.slotController.hasAssignedElements("avatar")||this.slotController.hasAssignedElements("heading")||this.slotController.hasAssignedElements("subHeading")||this.slotController.hasAssignedElements("action");return t?this.setAttribute("hasHeader",""):this.removeAttribute("hasHeader"),t?R`<slot part="header" name="header">${this.defaultHeaderAvatarTemplate}<mo-flex justifyContent="space-around" ${Qt({width:"*"})}>${this.defaultHeaderHeadingTemplate} ${this.defaultHeaderSubHeadingTemplate}</mo-flex>${this.defaultHeaderActionTemplate}</slot>`:qt}get defaultHeaderAvatarTemplate(){return R`<slot name="avatar">${this.avatar?R`<div part="avatar" ${Qt({marginInlineEnd:"6px"})}>${this.avatar}</div>`:qt}</slot>`}get defaultHeaderHeadingTemplate(){return R`<slot name="heading">${this.heading?R`<mo-heading part="heading" typography="heading4" ${Qt({fontWeight:"500"})}>${this.heading}</mo-heading>`:qt}</slot>`}get defaultHeaderSubHeadingTemplate(){return R`<slot name="subHeading">${this.subHeading?R`<mo-heading part="subHeading" typography="heading6" ${Qt({fontWeight:"400",color:"rgb(121, 121, 121)"})}>${this.subHeading}</mo-heading>`:qt}</slot>`}get defaultHeaderActionTemplate(){return R`<slot name="action"></slot>`}get bodyTemplate(){return this.slotController.hasAssignedNodes("")?this.setAttribute("hasBody",""):this.removeAttribute("hasBody"),R`<slot></slot>`}get footerTemplate(){return this.slotController.hasAssignedElements("footer")?R`<slot part="footer" name="footer"></slot>`:qt}};t([le()],Ae.prototype,"heading",void 0),t([le()],Ae.prototype,"subHeading",void 0),t([le()],Ae.prototype,"avatar",void 0),t([le()],Ae.prototype,"image",void 0),Ae=t([Xt("mo-card")],Ae)})();
1
+ (()=>{"use strict";function t(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}const e=window,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.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,...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)},l=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,i))(e)})(t):t;var a;const h=window,d=h.trustedTypes,c=d?d.emptyScript:"",u=h.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?c: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}},v=(t,e)=>e!==t&&(e==e||t==t),f={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:v};class g 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=f){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)||f}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(l(t))}else void 0!==t&&e.push(l(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 i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{s?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((s=>{const i=document.createElement("style"),n=e.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=s.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}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=f){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:p).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:p;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||v)(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;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(a=h.reactiveElementVersions)&&void 0!==a?a:h.reactiveElementVersions=[]).push("1.4.1");const $=window,m=$.trustedTypes,_=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,b="?"+A,C=`<${b}>`,w=document,x=(t="")=>w.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,H=t=>S(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,T=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),M=/'/g,O=/"/g,U=/^(?:script|style|textarea|title)$/i,j=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=j(1),z=j(2),D=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),B=new WeakMap,I=(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 X(e.insertBefore(x(),t),t,void 0,null!=s?s:{})}return o._$AI(t),o},K=w.createTreeWalker(w,129,null,!1),V=(t,e)=>{const s=t.length-1,i=[];let n,r=2===e?"<svg>":"",o=k;for(let e=0;e<s;e++){const s=t[e];let l,a,h=-1,d=0;for(;d<s.length&&(o.lastIndex=d,a=o.exec(s),null!==a);)d=o.lastIndex,o===k?"!--"===a[1]?o=P:void 0!==a[1]?o=T:void 0!==a[2]?(U.test(a[2])&&(n=RegExp("</"+a[2],"g")),o=N):void 0!==a[3]&&(o=N):o===N?">"===a[0]?(o=null!=n?n:k,h=-1):void 0===a[1]?h=-2:(h=o.lastIndex-a[2].length,l=a[1],o=void 0===a[3]?N:'"'===a[3]?O:M):o===O||o===M?o=N:o===P||o===T?o=k:(o=N,n=void 0);const c=o===N&&t[e+1].startsWith("/>")?" ":"";r+=o===k?s+C:h>=0?(i.push(l),s.slice(0,h)+"$lit$"+s.slice(h)+A+c):s+A+(-2===h?(i.push(void 0),e):c)}const l=r+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(l):l,i]};class Y{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const o=t.length-1,l=this.parts,[a,h]=V(t,e);if(this.el=Y.createElement(a,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(A)){const s=h[r++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(A),e=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?F:"?"===e[1]?Q:"@"===e[1]?G:Z})}else l.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(U.test(i.tagName)){const t=i.textContent.split(A),e=t.length-1;if(e>0){i.textContent=m?m.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],x()),K.nextNode(),l.push({type:2,index:++n});i.append(t[e],x())}}}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(A,t+1));)l.push({type:7,index:n}),t+=A.length-1}n++}}static createElement(t,e){const s=w.createElement("template");return s.innerHTML=t,s}}function W(t,e,s=t,i){var n,r,o,l;if(e===D)return e;let a=void 0!==i?null===(n=s._$Cl)||void 0===n?void 0:n[i]:s._$Cu;const h=E(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,s,i)),void 0!==i?(null!==(o=(l=s)._$Cl)&&void 0!==o?o:l._$Cl=[])[i]=a:s._$Cu=a),void 0!==a&&(e=W(t,a._$AS(t,e.values),a,i)),e}class q{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,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new X(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new tt(r,this,t)),this.v.push(e),a=i[++l]}o!==(null==a?void 0:a.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 X{constructor(t,e,s,i){var n;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$C_=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._$C_}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=W(this,t,e),E(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==D&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):H(t)?this.O(t):this.$(t)}S(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}$(t){this._$AH!==L&&E(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=Y.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 q(n,this),e=t.p(this.options);t.m(s),this.k(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new Y(t)),e}O(t){S(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 X(this.S(x()),this.S(x()),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._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,s,i,n){this.type=1,this._$AH=L,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=L}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=W(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==D,r&&(this._$AH=t);else{const i=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=W(this,i[s+o],e,o),l===D&&(l=this._$AH[o]),r||(r=!E(l)||l!==this._$AH[o]),l===L?t=L:t!==L&&(t+=(null!=l?l:"")+n[o+1]),this._$AH[o]=l}r&&!i&&this.P(t)}P(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class F extends Z{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===L?void 0:t}}const J=m?m.emptyScript:"";class Q extends Z{constructor(){super(...arguments),this.type=4}P(t){t&&t!==L?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class G extends Z{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=W(this,t,e,0))&&void 0!==s?s:L)===D)return;const i=this._$AH,n=t===L&&i!==L||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==L&&(i===L||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){W(this,t)}}const et={A:"$lit$",M:A,C:b,L:1,R:V,D:q,V:H,I:W,H:X,N:Z,U:Q,B:G,F,W:tt},st=$.litHtmlPolyfillSupport;var it,nt;null==st||st(Y,X),(null!==(y=$.litHtmlVersions)&&void 0!==y?y:$.litHtmlVersions=[]).push("2.3.1");class rt extends g{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=I(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 D}}rt.finalized=!0,rt._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:rt});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:rt});(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.2.2");const lt=(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)}};var at;null===(at=window.HTMLSlotElement)||void 0===at||at.prototype.assignedElements;const ht=Symbol.for(""),dt=t=>{if((null==t?void 0:t.r)===ht)return null==t?void 0:t._$litStatic$},ct=new Map,ut=t=>(e,...s)=>{const i=s.length;let n,r;const o=[],l=[];let a,h=0,d=!1;for(;h<i;){for(a=e[h];h<i&&void 0!==(r=s[h],n=dt(r));)a+=n+e[++h],d=!0;l.push(r),o.push(a),h++}if(h===i&&o.push(e[i]),d){const t=o.join("$$lit$$");void 0===(e=ct.get(t))&&(o.raw=o,ct.set(t,e=o)),s=l}return t(e,...s)},pt=(ut(R),ut(z),1),vt=2,ft=3,gt=4,yt=6,$t=t=>(...e)=>({_$litDirective$:t,values:e});class mt{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{H:_t}=et,At=(t,e)=>void 0===e?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===e,bt=t=>void 0===t.strings,Ct=()=>document.createComment(""),wt=(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(Ct(),r),i=n.insertBefore(Ct(),r);s=new _t(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},xt=(t,e,s=t)=>(t._$AI(e,s),t),Et={},St=(t,e=Et)=>t._$AH=e,Ht=t=>t._$AH,kt=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}},Pt=t=>{t._$AR()},Tt=(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),Tt(t,e);return!0},Nt=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))},Mt=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 Ot(t){void 0!==this._$AN?(Nt(this),this._$AM=t,Mt(this)):this._$AM=t}function Ut(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++)Tt(i[t],!1),Nt(i[t]);else null!=i&&(Tt(i,!1),Nt(i));else Tt(this,t)}const jt=t=>{var e,s,i,n;t.type==vt&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Ut),null!==(s=(n=t)._$AQ)&&void 0!==s||(n._$AQ=Ot))};class Rt extends mt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Mt(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&&(Tt(this,t),Nt(this))}setValue(t){if(bt(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 zt{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}class Dt{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 Lt extends Rt{constructor(){super(...arguments),this._$CK=new zt(this),this._$CX=new Dt}render(t,e){return D}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})),D}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}$t(Lt),$t(class extends Lt{constructor(t){if(super(t),t.type!==vt)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&&Pt(this._$Ctt);const s=wt(this._$Ctt);xt(s,t)}}),$t(class extends mt{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){if(At(this.it)&&(!At(e)||this.it.strings!==e.strings)){const e=Ht(t).pop();let s=this.et.get(this.it.strings);if(void 0===s){const t=document.createDocumentFragment();s=I(L,t),s.setConnected(!1),this.et.set(this.it.strings,s)}St(s,[e]),wt(s,void 0,e)}if(At(e)){if(!At(this.it)||this.it.strings!==e.strings){const s=this.et.get(e.strings);if(void 0!==s){const e=Ht(s).pop();Pt(t),wt(t,void 0,e),St(t,[e])}}this.it=e}else this.it=void 0;return this.render(e)}}),$t(class extends mt{constructor(t){var e;if(super(t),t.type!==pt||"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 D}});const Bt={};$t(class extends mt{constructor(){super(...arguments),this.ot=Bt}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 D}else if(this.ot===e)return D;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}}),$t(class extends mt{constructor(){super(...arguments),this.key=L}render(t,e){return this.key=t,e}update(t,[e,s]){return e!==this.key&&(St(t),this.key=e),s}}),$t(class extends mt{constructor(t){if(super(t),t.type!==ft&&t.type!==pt&&t.type!==gt)throw Error("The `live` directive is not allowed on child or event bindings");if(!bt(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===D||e===L)return e;const s=t.element,i=t.name;if(t.type===ft){if(e===s[i])return D}else if(t.type===gt){if(!!e===s.hasAttribute(i))return D}else if(t.type===pt&&s.getAttribute(i)===e+"")return D;return St(t),e}});const It=new WeakMap,Kt=($t(class extends Rt{render(t){return L}update(t,[e]){var s;const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.dt)&&(this.Y=e,this.ct=null===(s=t.options)||void 0===s?void 0:s.host,this.rt(this.dt=t.element)),L}rt(t){var e;if("function"==typeof this.Y){const s=null!==(e=this.ct)&&void 0!==e?e:globalThis;let i=It.get(s);void 0===i&&(i=new WeakMap,It.set(s,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ct,void 0),i.set(this.Y,t),void 0!==t&&this.Y.call(this.ct,t)}else this.Y.value=t}get lt(){var t,e,s;return"function"==typeof this.Y?null===(e=It.get(null!==(t=this.ct)&&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.dt&&this.rt(void 0)}reconnected(){this.rt(this.dt)}}),(t,e,s)=>{const i=new Map;for(let n=e;n<=s;n++)i.set(t[n],n);return i});$t(class extends mt{constructor(t){if(super(t),t.type!==vt)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=Ht(t),{values:o,keys:l}=this.ht(e,s,i);if(!Array.isArray(r))return this.ut=l,o;const a=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let d,c,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(a[u]===l[v])h[v]=xt(r[u],o[v]),u++,v++;else if(a[p]===l[f])h[f]=xt(r[p],o[f]),p--,f--;else if(a[u]===l[f])h[f]=xt(r[u],o[f]),wt(t,h[f+1],r[u]),u++,f--;else if(a[p]===l[v])h[v]=xt(r[p],o[v]),wt(t,r[u],r[p]),p--,v++;else if(void 0===d&&(d=Kt(l,v,f),c=Kt(a,u,p)),d.has(a[u]))if(d.has(a[p])){const e=c.get(l[v]),s=void 0!==e?r[e]:null;if(null===s){const e=wt(t,r[u]);xt(e,o[v]),h[v]=e}else h[v]=xt(s,o[v]),wt(t,r[u],s),r[e]=null;v++}else kt(r[p]),p--;else kt(r[u]),u++;for(;v<=f;){const e=wt(t,h[f+1]);xt(e,o[v]),h[v++]=e}for(;u<=p;){const t=r[u++];null!==t&&kt(t)}return this.ut=l,St(t,h),D}}),$t(class extends mt{constructor(t){var e;if(super(t),t.type!==pt||"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 D}}),$t(class extends mt{constructor(t){if(super(t),t.type!==vt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?D:(this.ft=t,document.importNode(t.content,!0))}});class Vt extends mt{constructor(t){if(super(t),this.it=L,t.type!==vt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===L||null==t)return this._t=void 0,this.it=t;if(t===D)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:[]}}}Vt.directiveName="unsafeHTML",Vt.resultType=1;$t(Vt);class Yt extends Vt{}Yt.directiveName="unsafeSVG",Yt.resultType=2;$t(Yt);const Wt=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then;$t(class extends Rt{constructor(){super(...arguments),this._$Cwt=1073741823,this._$Cyt=[],this._$CK=new zt(this),this._$CX=new Dt}render(...t){var e;return null!==(e=t.find((t=>!Wt(t))))&&void 0!==e?e:D}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(!Wt(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 D}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}});const qt=L,Xt=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 Zt extends rt{initialized(){}connected(){}disconnected(){}get template(){return qt}render(){return this.template}firstUpdated(t){super.firstUpdated(t),this.initialized()}connectedCallback(){super.connectedCallback(),this.connected()}disconnectedCallback(){super.disconnectedCallback(),this.disconnected()}}const Ft=()=>t=>{const e=new t;Jt.handlers.add(e)};class Jt extends mt{constructor(t){if(super(t),t.type!==yt)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)){([...Jt.handlers].find((t=>t.handles(this.element,[e,s])))??Jt.defaultHandler).apply(this.element,[e,s])}}}Jt.handlers=new Set,Jt.defaultHandler=new class{handles(){return!0}apply(t,[e,s]){t.style[e]=null==s?"":s}};const Qt=$t(Jt);var Gt;let te=Gt=class{static getProportion(t){return Number(t.replace(Gt.regex,"$1")||1)}handles(t,[e,s]){return Gt.supportedKeys.has(e)&&Gt.regex.test(s)}apply(t,[,e]){const s=Gt.getProportion(e);t.style.flexGrow=String(s)}};te.supportedKeys=new Set(["width","height"]),te.regex=/^\s*(0|[1-9][0-9]*)?\s*\*\s*$/,te=Gt=t([Ft()],te);let ee=class{handles(t,[e]){return e.startsWith("--")}apply(t,[e,s]){t.style.setProperty(e,s)}};ee=t([Ft()],ee);const se=new Map([[Array,(t,e)=>[...e??[],...t]],[Set,(t,e)=>new Set([...e??[],...t])],[Map,(t,e)=>new Map([...e??[],...t])]]),ie=(t,e)=>e?Object.assign(t,e):t;const ne=({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 a=n??function(t){const e="constructor"in t?t.constructor:void 0;return se.get(e)??ie}(s),h=a(s,o[t]);Object.defineProperty(o,t,{value:h});for(const[t,e]of i??[]){const s=r[t];r[t]=function(...t){s.call(this,...t),e.call(this,h,...t)}}return h},re=Symbol("updatedObservers"),oe=t=>(e,s)=>{ne({prototype:e,constructorPropertyKey:re,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)},le=t=>(e,s)=>(t?.updated&&oe(t.updated)(e,s),function(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):lt(t,e)}(t)(e,s));const ae=Symbol("eventListeners"),he=rt.prototype.connectedCallback;rt.prototype.connectedCallback=function(){he.call(this);const t=ce(this);for(const{type:e,target:s,options:i,descriptor:n,propertyKey:r}of t?.values()??[])ve.call(this,r,n),ue.call(this,s)?.addEventListener(e,pe.call(this,r),i)};const de=rt.prototype.disconnectedCallback;function ce(t){return t.constructor[ae]}function ue(t){return"function"==typeof t?t.call(this):t??this}function pe(t){return Object.getOwnPropertyDescriptor(this,fe(t))?.value}function ve(t,e){const s=e?"function"==typeof e.get?e.get:e.value:Object.getOwnPropertyDescriptor(this,t)?.value;if(!1===ge(s))throw new TypeError(`${this.constructor}.${t} is not a function`);Object.defineProperty(this,fe(t),{value:s.bind(this),configurable:!0,enumerable:!1,writable:!1})}rt.prototype.disconnectedCallback=function(){de.call(this);const t=ce(this);for(const{type:e,target:s,options:i,propertyKey:n}of t?.values()??[])ue.call(this,s)?.removeEventListener(e,pe.call(this,n),i)};const fe=t=>`$BOUND_${t}$`,ge=t=>{const e="function"==typeof t,s="object"==typeof t&&null!==t&&"handleEvent"in t&&"function"==typeof t.handleEvent;return e||s};class ye extends class{constructor(t){this.host=t,this.host.addController(this)}}{constructor(t,e){super(t),this.host=t,this.slotChangeCallback=e,this.mutationObserver=new MutationObserver(this.handleMutation.bind(this)).observe(this.host,{childList:!0,subtree:!0}),this.handleChange=()=>{var t;this.host.requestUpdate(),null===(t=this.slotChangeCallback)||void 0===t||t.call(this)}}getAssignedNodes(t){var e;const s=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector(t?`slot[name="${t}"]`:"slot:not([name])");return s?this.extractNodesFromSlot(s):this.extractNodesFromChildren(t)}hasAssignedNodes(t){return this.getAssignedNodes(t).length>0}getAssignedElements(t){return this.getAssignedNodes(t).filter((t=>t instanceof Element))}hasAssignedElements(t){return this.getAssignedElements(t).length>0}extractNodesFromSlot(t){return t.assignedNodes().flatMap((t=>t instanceof HTMLSlotElement?this.extractNodesFromSlot(t):[t]))}extractNodesFromChildren(t){return[...this.host.childNodes].filter((t=>{var e;return t instanceof Element||t instanceof Text&&!!(null===(e=t.textContent)||void 0===e?void 0:e.trim())})).filter((e=>!t||e instanceof Element&&e.slot===t)).flatMap((t=>t instanceof HTMLSlotElement?t.assignedNodes():[t]))}hostConnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("slotchange",this.handleChange)}hostDisconnected(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.removeEventListener("slotchange",this.handleChange)}handleMutation(t){t.some((t=>"childList"===t.type))&&this.handleChange()}}let $e=class extends Zt{constructor(){super(...arguments),this.typography="heading3"}static get styles(){return o`:host{display:block}:host([typography=heading1]){font-size:min(2.5em,36px);letter-spacing:-.75px;font-weight:300}:host([typography=heading2]){font-size:min(2em,30px);letter-spacing:-.5px;font-weight:300}:host([typography=heading3]){font-size:min(1.8em,24px);letter-spacing:-.25px;font-weight:400}:host([typography=heading4]){font-size:min(1.5em,18px);font-weight:400}:host([typography=heading5]){font-size:min(1.17em,16px);font-weight:500}:host([typography=heading6]){font-size:min(1em,14px);letter-spacing:.15px;font-weight:500}:host([typography=subtitle1]){font-size:min(1.15em,18px);letter-spacing:.15px;font-weight:400}:host([typography=subtitle2]){font-size:min(1em,14px);letter-spacing:.1px;font-weight:400}`}get template(){return R`<slot></slot>`}};var me;t([le({reflect:!0})],$e.prototype,"typography",void 0),$e=t([Xt("mo-heading")],$e);let _e=me=class extends Zt{get direction(){var t;return(null===(t=[...me.flexDirectionByDirections].find((([,t])=>this.style.flexDirection===t)))||void 0===t?void 0:t[0])||"vertical"}set direction(t){this.style.flexDirection=me.flexDirectionByDirections.get(t)||"column"}get wrap(){return this.style.flexWrap}set wrap(t){this.style.flexWrap=t}get gap(){return this.style.gap}set gap(t){this.style.gap=t}get justifyItems(){return this.style.justifyItems}set justifyItems(t){this.style.justifyItems=t}get justifyContent(){return this.style.justifyContent}set justifyContent(t){this.style.justifyContent=t}get alignItems(){return this.style.alignItems}set alignItems(t){this.style.alignItems=t}get alignContent(){return this.style.alignContent}set alignContent(t){this.style.alignContent=t}static get styles(){return o`:host{display:flex;flex-direction:column;flex-wrap:nowrap}`}get template(){return R`<slot></slot>`}};_e.flexDirectionByDirections=new Map([["horizontal","row"],["horizontal-reversed","row-reverse"],["vertical","column"],["vertical-reversed","column-reverse"]]),t([le()],_e.prototype,"direction",null),t([le()],_e.prototype,"wrap",null),t([le()],_e.prototype,"gap",null),t([le()],_e.prototype,"justifyItems",null),t([le()],_e.prototype,"justifyContent",null),t([le()],_e.prototype,"alignItems",null),t([le()],_e.prototype,"alignContent",null),_e=me=t([Xt("mo-flex")],_e);let Ae=class extends Zt{constructor(){super(...arguments),this.slotController=new ye(this)}static get styles(){return o`:host{display:block;background:var(--mo-color-surface,#fff);box-shadow:var(--mo-shadow,rgba(95,81,78,.4) 0 1px 2px 0,rgba(95,81,78,.2) 0 1px 3px 1px);border-radius:var(--mo-border-radius,4px)}slot[name=header]{display:flex;gap:6px;padding:var(--mo-card-header-padding,16px)}slot[name=heading]{display:block;flex:1}slot[name=media]::slotted(:first-child),slot[name=media]>:first-child{border-radius:var(--mo-border-radius,4px) var(--mo-border-radius,4px) 0 0;display:block;background-size:cover;background-repeat:no-repeat;background-position:center center;width:100%;object-fit:cover}slot:not([name]){display:block;flex:1}div[part=avatar]{height:40px;width:40px;aspect-ratio:1/1;display:flex;user-select:none;justify-content:center;align-items:center;border-radius:50%;font-size:18px;background:var(--mo-card-avatar-background,var(--mo-color-accent,#0077c8));color:var(--mo-card-avatar-color,var(--mo-color-on-accent,#fff))}:host([hasBody]) slot:not([name]){padding:var(--mo-card-body-padding,16px)}:host([hasBody][hasHeader]) slot:not([name]){padding:var(--mo-card-body-padding,0 16px 16px 16px)}slot[name=footer]{display:block;padding:var(--mo-card-footer-padding,8px)}`}get template(){return R`<mo-flex ${Qt({width:"100%",height:"100%"})}>${this.mediaTemplate} ${this.headerTemplate} ${this.bodyTemplate} ${this.footerTemplate}</mo-flex>`}get mediaTemplate(){return!!this.image||this.slotController.hasAssignedElements("media")?R`<slot part="media" name="media">${this.image?R`<img part="media" src="${this.image}">`:qt}</slot>`:qt}get headerTemplate(){const t=this.slotController.hasAssignedElements("header")||!!this.avatar||!!this.heading||!!this.subHeading||this.slotController.hasAssignedElements("avatar")||this.slotController.hasAssignedElements("heading")||this.slotController.hasAssignedElements("subHeading")||this.slotController.hasAssignedElements("action");return t?this.setAttribute("hasHeader",""):this.removeAttribute("hasHeader"),t?R`<slot part="header" name="header">${this.defaultHeaderAvatarTemplate}<mo-flex justifyContent="space-around" ${Qt({width:"*"})}>${this.defaultHeaderHeadingTemplate} ${this.defaultHeaderSubHeadingTemplate}</mo-flex>${this.defaultHeaderActionTemplate}</slot>`:qt}get defaultHeaderAvatarTemplate(){return R`<slot name="avatar">${this.avatar?R`<div part="avatar" ${Qt({marginInlineEnd:"6px"})}>${this.avatar}</div>`:qt}</slot>`}get defaultHeaderHeadingTemplate(){return R`<slot name="heading">${this.heading?R`<mo-heading part="heading" typography="heading4" ${Qt({fontWeight:"500"})}>${this.heading}</mo-heading>`:qt}</slot>`}get defaultHeaderSubHeadingTemplate(){return R`<slot name="subHeading">${this.subHeading?R`<mo-heading part="subHeading" typography="heading6" ${Qt({fontWeight:"400",color:"rgb(121, 121, 121)"})}>${this.subHeading}</mo-heading>`:qt}</slot>`}get defaultHeaderActionTemplate(){return R`<slot name="action"></slot>`}get bodyTemplate(){return this.slotController.hasAssignedNodes("")?this.setAttribute("hasBody",""):this.removeAttribute("hasBody"),R`<slot></slot>`}get footerTemplate(){return this.slotController.hasAssignedElements("footer")?R`<slot part="footer" name="footer"></slot>`:qt}};t([le()],Ae.prototype,"heading",void 0),t([le()],Ae.prototype,"subHeading",void 0),t([le()],Ae.prototype,"avatar",void 0),t([le()],Ae.prototype,"image",void 0),Ae=t([Xt("mo-card")],Ae)})();
package/dist/index.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- import '@3mo/flex';
2
- import '@3mo/heading';
3
1
  export * from './Card.js';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;AAClB,OAAO,cAAc,CAAA;AACrB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1 @@
1
- import '@3mo/flex';
2
- import '@3mo/heading';
3
1
  export * from './Card.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3mo/card",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "A card web-component based on Material Design.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,6 +24,7 @@
24
24
  "dependencies": {
25
25
  "@a11d/lit": "x",
26
26
  "tslib": "x",
27
+ "@3mo/slot-controller": "x",
27
28
  "@3mo/flex": "x",
28
29
  "@3mo/heading": "x"
29
30
  }