@fluid-topics/ft-wc-utils 0.1.17 → 0.1.18

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,16 +1,18 @@
1
1
  import { LitElement, PropertyValues } from "lit";
2
2
  import { CSSResultGroup } from "@lit/reactive-element/css-tag";
3
- export { ElementDefinitionsMap } from "@lit-labs/scoped-registry-mixin";
4
3
  declare const FtLitElement_base: typeof LitElement;
5
4
  export declare class FtLitElement extends FtLitElement_base {
6
- private readonly proto;
7
- private readonly constructorName;
8
- constructor();
5
+ /**
6
+ * @deprecated Unless inline styles are required for your use-case, prefer static styles member
7
+ */
9
8
  protected getStyles(): CSSResultGroup;
9
+ /**
10
+ * @deprecated Unless inline styles are required for your use-case, prefer default render method
11
+ */
10
12
  protected getTemplate(): unknown;
11
13
  protected render(): unknown;
12
- adoptedCallback(): void;
13
14
  protected updated(props: PropertyValues): void;
14
15
  protected contentAvailableCallback(props: PropertyValues): void;
15
16
  }
17
+ export {};
16
18
  //# sourceMappingURL=FtLitElement.d.ts.map
@@ -1,14 +1,15 @@
1
1
  import { html, LitElement } from "lit";
2
2
  import { ScopedRegistryHost } from "@lit-labs/scoped-registry-mixin";
3
3
  export class FtLitElement extends ScopedRegistryHost(LitElement) {
4
- constructor() {
5
- super();
6
- this.constructorName = this.constructor.name;
7
- this.proto = this.constructor.prototype;
8
- }
4
+ /**
5
+ * @deprecated Unless inline styles are required for your use-case, prefer static styles member
6
+ */
9
7
  getStyles() {
10
8
  return [];
11
9
  }
10
+ /**
11
+ * @deprecated Unless inline styles are required for your use-case, prefer default render method
12
+ */
12
13
  getTemplate() {
13
14
  return null;
14
15
  }
@@ -24,11 +25,6 @@ export class FtLitElement extends ScopedRegistryHost(LitElement) {
24
25
  ${this.getTemplate()}
25
26
  `;
26
27
  }
27
- adoptedCallback() {
28
- if (Object.getPrototypeOf(this) !== this.constructorName) {
29
- Object.setPrototypeOf(this, this.proto);
30
- }
31
- }
32
28
  updated(props) {
33
29
  super.updated(props);
34
30
  setTimeout(() => this.contentAvailableCallback(props), 0);
@@ -0,0 +1,5 @@
1
+ import { LitElement } from "lit";
2
+ declare type Constructor<T = {}> = new (...args: Array<any>) => T;
3
+ export declare function InlineStyles<T extends Constructor<LitElement>>(superClass: T): T;
4
+ export {};
5
+ //# sourceMappingURL=InlineStyles.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { html } from "lit";
2
+ export function InlineStyles(superClass) {
3
+ var _a;
4
+ let elementDefinitions;
5
+ if ("elementDefinitions" in superClass) {
6
+ elementDefinitions = {};
7
+ const superElementDefinitions = superClass.elementDefinitions;
8
+ for (let tagName in superElementDefinitions) {
9
+ elementDefinitions[tagName] = InlineStyles(superElementDefinitions[tagName]);
10
+ }
11
+ }
12
+ return _a = class ClassWithInlineStyles extends superClass {
13
+ constructor(...args) {
14
+ super(args);
15
+ this._constructor = this.constructor;
16
+ }
17
+ render() {
18
+ var _a;
19
+ let styles = (_a = superClass.styles) !== null && _a !== void 0 ? _a : [];
20
+ if (!Array.isArray(styles)) {
21
+ styles = [styles];
22
+ }
23
+ return html `
24
+ ${styles.map(s => html `
25
+ <style>${s}</style>
26
+ `)}
27
+ ${super.render()}
28
+ `;
29
+ }
30
+ },
31
+ _a.styles = undefined,
32
+ _a.elementDefinitions = elementDefinitions,
33
+ _a;
34
+ }
35
+ //# sourceMappingURL=InlineStyles.js.map
@@ -1,37 +1,37 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={})}(this,(function(t){
1
+ var t,e;t=this,e=function(t){
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new Map;class i{constructor(t,e){if(this._$cssResult$=!0,e!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return e&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=t=>new i("string"==typeof t?t:t+"",n),s=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,n,r)=>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.")})(n)+t[r+1]),t[0]);return new i(r,n)},u=(t,n)=>{e?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t
7
+ const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new Map;class i{constructor(t,e){if(this._$cssResult$=!0,e!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return e&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const o=t=>new i("string"==typeof t?t:t+"",n),s=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,n,r)=>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.")})(n)+t[r+1]),t[0]);return new i(r,n)},c=(t,n)=>{e?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),r=window.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)}))},u=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return o(e)})(t):t
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */;var a;const l=window.trustedTypes,f=l?l.emptyScript:"",h=window.reactiveElementPolyfillSupport,d={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},v=(t,e)=>e!==t&&(e==e||t==t),p={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:v};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const r=this._$Eh(n,e);void 0!==r&&(this._$Eu.set(r,n),t.push(r))})),t}static createProperty(t,e=p){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}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._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eh(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.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 u(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||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._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ES(t,e,n=p){var r,i;const o=this.constructor._$Eh(t,n);if(void 0!==o&&!0===n.reflect){const s=(null!==(i=null===(r=n.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==i?i:d.toAttribute)(e,n.type);this._$Ei=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Ei=null}}_$AK(t,e){var n,r,i;const o=this.constructor,s=o._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=o.getPropertyOptions(s),u=t.converter,c=null!==(i=null!==(r=null===(n=u)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof u?u:null)&&void 0!==i?i:d.fromAttribute;this._$Ei=s,this[s]=c(e,t.type),this._$Ei=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
12
+ */;var a;const l=window.trustedTypes,f=l?l.emptyScript:"",h=window.reactiveElementPolyfillSupport,d={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},v=(t,e)=>e!==t&&(e==e||t==t),p={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:v};class b extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const r=this._$Eh(n,e);void 0!==r&&(this._$Eu.set(r,n),t.push(r))})),t}static createProperty(t,e=p){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}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._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Eh(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.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._$Eg)||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._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ES(t,e,n=p){var r,i;const o=this.constructor._$Eh(t,n);if(void 0!==o&&!0===n.reflect){const s=(null!==(i=null===(r=n.converter)||void 0===r?void 0:r.toAttribute)&&void 0!==i?i:d.toAttribute)(e,n.type);this._$Ei=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Ei=null}}_$AK(t,e){var n,r,i;const o=this.constructor,s=o._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=o.getPropertyOptions(s),c=t.converter,u=null!==(i=null!==(r=null===(n=c)||void 0===n?void 0:n.fromAttribute)&&void 0!==r?r:"function"==typeof c?c:null)&&void 0!==i?i:d.fromAttribute;this._$Ei=s,this[s]=u(e,t.type),this._$Ei=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||v)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- var y;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:b}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.2.2");const w=globalThis.trustedTypes,m=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=`lit$${(Math.random()+"").slice(9)}$`,g="?"+O,x=`<${g}>`,S=document,j=(t="")=>S.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,N=t=>{var e;return R(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,_=/>/g,A=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,$=/'/g,U=/"/g,P=/^(?:script|style|textarea|title)$/i,F=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),k=F(1),L=F(2),T=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),D=new WeakMap,W=(t,e,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let s=o._$litPart$;if(void 0===s){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new q(e.insertBefore(j(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s},H=S.createTreeWalker(S,129,null,!1),K=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":"",s=C;for(let e=0;e<n;e++){const n=t[e];let u,c,a=-1,l=0;for(;l<n.length&&(s.lastIndex=l,c=s.exec(n),null!==c);)l=s.lastIndex,s===C?"!--"===c[1]?s=M:void 0!==c[1]?s=_:void 0!==c[2]?(P.test(c[2])&&(i=RegExp("</"+c[2],"g")),s=A):void 0!==c[3]&&(s=A):s===A?">"===c[0]?(s=null!=i?i:C,a=-1):void 0===c[1]?a=-2:(a=s.lastIndex-c[2].length,u=c[1],s=void 0===c[3]?A:'"'===c[3]?U:$):s===U||s===$?s=A:s===M||s===_?s=C:(s=A,i=void 0);const f=s===A&&t[e+1].startsWith("/>")?" ":"";o+=s===C?n+x:a>=0?(r.push(u),n.slice(0,a)+"$lit$"+n.slice(a)+O+f):n+O+(-2===a?(r.push(void 0),e):f)}const u=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(u):u,r]};class I{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,u=this.parts,[c,a]=K(t,e);if(this.el=I.createElement(c,n),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=H.nextNode())&&u.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(O)){const n=a[o++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+"$lit$").split(O),e=/([.?@])?(.*)/.exec(n);u.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?J:"?"===e[1]?G:"@"===e[1]?Q:Z})}else u.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(P.test(r.tagName)){const t=r.textContent.split(O),e=t.length-1;if(e>0){r.textContent=w?w.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],j()),H.nextNode(),u.push({type:2,index:++i});r.append(t[e],j())}}}else if(8===r.nodeType)if(r.data===g)u.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(O,t+1));)u.push({type:7,index:i}),t+=O.length-1}i++}}static createElement(t,e){const n=S.createElement("template");return n.innerHTML=t,n}}function V(t,e,n=t,r){var i,o,s,u;if(e===T)return e;let c=void 0!==r?null===(i=n._$Cl)||void 0===i?void 0:i[r]:n._$Cu;const a=E(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==a&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===a?c=void 0:(c=new a(t),c._$AT(t,n,r)),void 0!==r?(null!==(s=(u=n)._$Cl)&&void 0!==s?s:u._$Cl=[])[r]=c:n._$Cu=c),void 0!==c&&(e=V(t,c._$AS(t,e.values),c,r)),e}class z{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:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(n,!0);H.currentNode=i;let o=H.nextNode(),s=0,u=0,c=r[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new q(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new Y(o,this,t)),this.v.push(e),c=r[++u]}s!==(null==c?void 0:c.index)&&(o=H.nextNode(),s++)}return i}m(t){let e=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class q{constructor(t,e,n,r){var i;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cg=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}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=V(this,t,e),E(t)?t===B||null==t||""===t?(this._$AH!==B&&this._$AR(),this._$AH=B):t!==this._$AH&&t!==T&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):N(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==B&&E(this._$AH)?this._$AA.nextSibling.data=t:this.S(S.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=I.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{const t=new z(i,this),e=t.p(this.options);t.m(n),this.S(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new I(t)),e}A(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new q(this.M(j()),this.M(j()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.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 Z{constructor(t,e,n,r,i){this.type=1,this._$AH=B,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=V(this,t,e,0),o=!E(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const r=t;let s,u;for(t=i[0],s=0;s<i.length-1;s++)u=V(this,r[n+s],e,s),u===T&&(u=this._$AH[s]),o||(o=!E(u)||u!==this._$AH[s]),u===B?t=B:t!==B&&(t+=(null!=u?u:"")+i[s+1]),this._$AH[s]=u}o&&!r&&this.k(t)}k(t){t===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends Z{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===B?void 0:t}}const X=w?w.emptyScript:"";class G extends Z{constructor(){super(...arguments),this.type=4}k(t){t&&t!==B?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class Q extends Z{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=V(this,t,e,0))&&void 0!==n?n:B)===T)return;const r=this._$AH,i=t===B&&r!==B||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==B&&(r===B||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class Y{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const tt={P:"$lit$",V:O,L:g,I:1,N:K,R:z,D:N,j:V,H:q,O:Z,F:G,B:Q,W:J,Z:Y},et=window.litHtmlPolyfillSupport;
18
+ var y;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:b}),(null!==(a=globalThis.reactiveElementVersions)&&void 0!==a?a:globalThis.reactiveElementVersions=[]).push("1.2.2");const m=globalThis.trustedTypes,w=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=`lit$${(Math.random()+"").slice(9)}$`,g="?"+O,x=`<${g}>`,S=document,E=(t="")=>S.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,C=t=>{var e;return R(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,_=/>/g,A=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,$=/'/g,U=/"/g,P=/^(?:script|style|textarea|title)$/i,k=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),F=k(1),L=k(2),T=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),B=new WeakMap,W=(t,e,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let s=o._$litPart$;if(void 0===s){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new q(e.insertBefore(E(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s},H=S.createTreeWalker(S,129,null,!1),I=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":"",s=N;for(let e=0;e<n;e++){const n=t[e];let c,u,a=-1,l=0;for(;l<n.length&&(s.lastIndex=l,u=s.exec(n),null!==u);)l=s.lastIndex,s===N?"!--"===u[1]?s=M:void 0!==u[1]?s=_:void 0!==u[2]?(P.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=A):void 0!==u[3]&&(s=A):s===A?">"===u[0]?(s=null!=i?i:N,a=-1):void 0===u[1]?a=-2:(a=s.lastIndex-u[2].length,c=u[1],s=void 0===u[3]?A:'"'===u[3]?U:$):s===U||s===$?s=A:s===M||s===_?s=N:(s=A,i=void 0);const f=s===A&&t[e+1].startsWith("/>")?" ":"";o+=s===N?n+x:a>=0?(r.push(c),n.slice(0,a)+"$lit$"+n.slice(a)+O+f):n+O+(-2===a?(r.push(void 0),e):f)}const c=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(c):c,r]};class K{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,c=this.parts,[u,a]=I(t,e);if(this.el=K.createElement(u,n),H.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=H.nextNode())&&c.length<s;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(O)){const n=a[o++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+"$lit$").split(O),e=/([.?@])?(.*)/.exec(n);c.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?J:"?"===e[1]?G:"@"===e[1]?Q:Z})}else c.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(P.test(r.tagName)){const t=r.textContent.split(O),e=t.length-1;if(e>0){r.textContent=m?m.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],E()),H.nextNode(),c.push({type:2,index:++i});r.append(t[e],E())}}}else if(8===r.nodeType)if(r.data===g)c.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(O,t+1));)c.push({type:7,index:i}),t+=O.length-1}i++}}static createElement(t,e){const n=S.createElement("template");return n.innerHTML=t,n}}function V(t,e,n=t,r){var i,o,s,c;if(e===T)return e;let u=void 0!==r?null===(i=n._$Cl)||void 0===i?void 0:i[r]:n._$Cu;const a=j(e)?void 0:e._$litDirective$;return(null==u?void 0:u.constructor)!==a&&(null===(o=null==u?void 0:u._$AO)||void 0===o||o.call(u,!1),void 0===a?u=void 0:(u=new a(t),u._$AT(t,n,r)),void 0!==r?(null!==(s=(c=n)._$Cl)&&void 0!==s?s:c._$Cl=[])[r]=u:n._$Cu=u),void 0!==u&&(e=V(t,u._$AS(t,e.values),u,r)),e}class z{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:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(n,!0);H.currentNode=i;let o=H.nextNode(),s=0,c=0,u=r[0];for(;void 0!==u;){if(s===u.index){let e;2===u.type?e=new q(o,o.nextSibling,this,t):1===u.type?e=new u.ctor(o,u.name,u.strings,this,t):6===u.type&&(e=new Y(o,this,t)),this.v.push(e),u=r[++c]}s!==(null==u?void 0:u.index)&&(o=H.nextNode(),s++)}return i}m(t){let e=0;for(const n of this.v)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class q{constructor(t,e,n,r){var i;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cg=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}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=V(this,t,e),j(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==T&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):C(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==D&&j(this._$AH)?this._$AA.nextSibling.data=t:this.S(S.createTextNode(t)),this._$AH=t}T(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=K.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.m(n);else{const t=new z(i,this),e=t.p(this.options);t.m(n),this.S(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new K(t)),e}A(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new q(this.M(E()),this.M(E()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.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 Z{constructor(t,e,n,r,i){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=V(this,t,e,0),o=!j(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const r=t;let s,c;for(t=i[0],s=0;s<i.length-1;s++)c=V(this,r[n+s],e,s),c===T&&(c=this._$AH[s]),o||(o=!j(c)||c!==this._$AH[s]),c===D?t=D:t!==D&&(t+=(null!=c?c:"")+i[s+1]),this._$AH[s]=c}o&&!r&&this.k(t)}k(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends Z{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===D?void 0:t}}const X=m?m.emptyScript:"";class G extends Z{constructor(){super(...arguments),this.type=4}k(t){t&&t!==D?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class Q extends Z{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=V(this,t,e,0))&&void 0!==n?n:D)===T)return;const r=this._$AH,i=t===D&&r!==D||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==D&&(r===D||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class Y{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const tt={P:"$lit$",V:O,L:g,I:1,N:I,R:z,D:C,j:V,H:q,O:Z,F:G,B:Q,W:J,Z:Y},et=window.litHtmlPolyfillSupport;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
23
  */
24
- var nt,rt;null==et||et(I,q),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.1.3");const it=b;class ot extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=W(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return T}}ot.finalized=!0,ot._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:ot});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:ot});(null!==(rt=globalThis.litElementVersions)&&void 0!==rt?rt:globalThis.litElementVersions=[]).push("3.1.2");var ut=Object.freeze({__proto__:null,CSSResult:i,adoptStyles:u,css:s,getCompatibleStyle:c,supportsAdoptingStyleSheets:e,unsafeCSS:o,ReactiveElement:b,defaultConverter:d,notEqual:v,_$LH:tt,html:k,noChange:T,nothing:B,render:W,svg:L,LitElement:ot,UpdatingElement:it,_$LE:{_$AK:(t,e,n)=>{t._$AK(e,n)},_$AL:t=>t._$AL}});
24
+ var nt,rt;null==et||et(K,q),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.1.3");const it=b;class ot extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=W(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return T}}ot.finalized=!0,ot._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:ot});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:ot}),(null!==(rt=globalThis.litElementVersions)&&void 0!==rt?rt:globalThis.litElementVersions=[]).push("3.1.2");var ct=Object.freeze({__proto__:null,CSSResult:i,adoptStyles:c,css:s,getCompatibleStyle:u,supportsAdoptingStyleSheets:e,unsafeCSS:o,ReactiveElement:b,defaultConverter:d,notEqual:v,_$LH:tt,html:F,noChange:T,nothing:D,render:W,svg:L,LitElement:ot,UpdatingElement:it,_$LE:{_$AK:(t,e,n)=>{t._$AK(e,n)},_$AL:t=>t._$AL}});
25
25
  /**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */const ct=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.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(n){n.createProperty(e.key,t)}};
29
+ */const ut=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.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(n){n.createProperty(e.key,t)}};
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */function at(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):ct(t,e)
34
+ */function at(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):ut(t,e)
35
35
  /**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
@@ -78,42 +78,57 @@ var ft;const ht=null!=(null===(ft=window.HTMLSlotElement)||void 0===ft?void 0:ft
78
78
  * @license
79
79
  * Copyright 2017 Google LLC
80
80
  * SPDX-License-Identifier: BSD-3-Clause
81
- */const pt=1,bt=2,yt=t=>(...e)=>({_$litDirective$:t,values:e});class wt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
81
+ */const pt=1,bt=2,yt=t=>(...e)=>({_$litDirective$:t,values:e});class mt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
82
82
  /**
83
83
  * @license
84
84
  * Copyright 2020 Google LLC
85
85
  * SPDX-License-Identifier: BSD-3-Clause
86
- */const{H:mt}=tt,Ot=()=>document.createComment(""),gt=(t,e,n)=>{var r;const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=i.insertBefore(Ot(),o),r=i.insertBefore(Ot(),o);n=new mt(e,r,t,t.options)}else{const e=n._$AB.nextSibling,s=n._$AM,u=s!==t;if(u){let e;null===(r=n._$AQ)||void 0===r||r.call(n,t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==s._$AU&&n._$AP(e)}if(e!==o||u){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return n},xt=(t,e,n=t)=>(t._$AI(e,n),t),St={},jt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let n=t._$AA;const r=t._$AB.nextSibling;for(;n!==r;){const t=n.nextSibling;n.remove(),n=t}},Et=(t,e,n)=>{const r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},Rt=yt(class extends wt{constructor(t){if(super(t),t.type!==bt)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);const i=[],o=[];let s=0;for(const e of t)i[s]=r?r(e,s):s,o[s]=n(e,s),s++;return{values:o,keys:i}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,r]){var i;const o=(t=>t._$AH)(t),{values:s,keys:u}=this.dt(e,n,r);if(!Array.isArray(o))return this.at=u,s;const c=null!==(i=this.at)&&void 0!==i?i:this.at=[],a=[];let l,f,h=0,d=o.length-1,v=0,p=s.length-1;for(;h<=d&&v<=p;)if(null===o[h])h++;else if(null===o[d])d--;else if(c[h]===u[v])a[v]=xt(o[h],s[v]),h++,v++;else if(c[d]===u[p])a[p]=xt(o[d],s[p]),d--,p--;else if(c[h]===u[p])a[p]=xt(o[h],s[p]),gt(t,a[p+1],o[h]),h++,p--;else if(c[d]===u[v])a[v]=xt(o[d],s[v]),gt(t,o[h],o[d]),d--,v++;else if(void 0===l&&(l=Et(u,v,p),f=Et(c,h,d)),l.has(c[h]))if(l.has(c[d])){const e=f.get(u[v]),n=void 0!==e?o[e]:null;if(null===n){const e=gt(t,o[h]);xt(e,s[v]),a[v]=e}else a[v]=xt(n,s[v]),gt(t,o[h],n),o[e]=null;v++}else jt(o[d]),d--;else jt(o[h]),h++;for(;v<=p;){const e=gt(t,a[p+1]);xt(e,s[v]),a[v++]=e}for(;h<=d;){const t=o[h++];null!==t&&jt(t)}return this.at=u,((t,e=St)=>{t._$AH=e})(t,a),T}});
86
+ */const{H:wt}=tt,Ot=()=>document.createComment(""),gt=(t,e,n)=>{var r;const i=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=i.insertBefore(Ot(),o),r=i.insertBefore(Ot(),o);n=new wt(e,r,t,t.options)}else{const e=n._$AB.nextSibling,s=n._$AM,c=s!==t;if(c){let e;null===(r=n._$AQ)||void 0===r||r.call(n,t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==s._$AU&&n._$AP(e)}if(e!==o||c){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,o),t=e}}}return n},xt=(t,e,n=t)=>(t._$AI(e,n),t),St={},Et=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let n=t._$AA;const r=t._$AB.nextSibling;for(;n!==r;){const t=n.nextSibling;n.remove(),n=t}},jt=(t,e,n)=>{const r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},Rt=yt(class extends mt{constructor(t){if(super(t),t.type!==bt)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);const i=[],o=[];let s=0;for(const e of t)i[s]=r?r(e,s):s,o[s]=n(e,s),s++;return{values:o,keys:i}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,r]){var i;const o=(t=>t._$AH)(t),{values:s,keys:c}=this.dt(e,n,r);if(!Array.isArray(o))return this.at=c,s;const u=null!==(i=this.at)&&void 0!==i?i:this.at=[],a=[];let l,f,h=0,d=o.length-1,v=0,p=s.length-1;for(;h<=d&&v<=p;)if(null===o[h])h++;else if(null===o[d])d--;else if(u[h]===c[v])a[v]=xt(o[h],s[v]),h++,v++;else if(u[d]===c[p])a[p]=xt(o[d],s[p]),d--,p--;else if(u[h]===c[p])a[p]=xt(o[h],s[p]),gt(t,a[p+1],o[h]),h++,p--;else if(u[d]===c[v])a[v]=xt(o[d],s[v]),gt(t,o[h],o[d]),d--,v++;else if(void 0===l&&(l=jt(c,v,p),f=jt(u,h,d)),l.has(u[h]))if(l.has(u[d])){const e=f.get(c[v]),n=void 0!==e?o[e]:null;if(null===n){const e=gt(t,o[h]);xt(e,s[v]),a[v]=e}else a[v]=xt(n,s[v]),gt(t,o[h],n),o[e]=null;v++}else Et(o[d]),d--;else Et(o[h]),h++;for(;v<=p;){const e=gt(t,a[p+1]);xt(e,s[v]),a[v++]=e}for(;h<=d;){const t=o[h++];null!==t&&Et(t)}return this.at=c,((t,e=St)=>{t._$AH=e})(t,a),T}});
87
87
  /**
88
88
  * @license
89
89
  * Copyright 2017 Google LLC
90
90
  * SPDX-License-Identifier: BSD-3-Clause
91
- */var Nt=Object.freeze({__proto__:null,repeat:Rt});
91
+ */var Ct=Object.freeze({__proto__:null,repeat:Rt});
92
92
  /**
93
93
  * @license
94
94
  * Copyright 2018 Google LLC
95
95
  * SPDX-License-Identifier: BSD-3-Clause
96
- */const Ct=yt(class extends wt{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 n,r;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(n=this.et)||void 0===n?void 0:n.has(t))&&this.st.add(t);return this.render(e)}const i=t.element.classList;this.st.forEach((t=>{t in e||(i.remove(t),this.st.delete(t))}));for(const t in e){const n=!!e[t];n===this.st.has(t)||(null===(r=this.et)||void 0===r?void 0:r.has(t))||(n?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return T}});var Mt=Object.freeze({__proto__:null,classMap:Ct});
96
+ */const Nt=yt(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 n,r;if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.et=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(n=this.et)||void 0===n?void 0:n.has(t))&&this.st.add(t);return this.render(e)}const i=t.element.classList;this.st.forEach((t=>{t in e||(i.remove(t),this.st.delete(t))}));for(const t in e){const n=!!e[t];n===this.st.has(t)||(null===(r=this.et)||void 0===r?void 0:r.has(t))||(n?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return T}});var Mt=Object.freeze({__proto__:null,classMap:Nt});
97
97
  /**
98
98
  * @license
99
99
  * Copyright 2018 Google LLC
100
100
  * SPDX-License-Identifier: BSD-3-Clause
101
- */const _t=yt(class extends wt{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,n)=>{const r=t[n];return null==r?e:e+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:n}=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("-")?n.removeProperty(t):n[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?n.setProperty(t,r):n[t]=r)}return T}});var At=Object.freeze({__proto__:null,styleMap:_t});
101
+ */const _t=yt(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,n)=>{const r=t[n];return null==r?e:e+`${n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:n}=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("-")?n.removeProperty(t):n[t]="")}));for(const t in e){const r=e[t];null!=r&&(this.ct.add(t),t.includes("-")?n.setProperty(t,r):n[t]=r)}return T}});var At=Object.freeze({__proto__:null,styleMap:_t});
102
102
  /**
103
103
  * @license
104
104
  * Copyright 2017 Google LLC
105
105
  * SPDX-License-Identifier: BSD-3-Clause
106
- */class $t extends wt{constructor(t){if(super(t),this.it=B,t.type!==bt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===B||null==t)return this.vt=void 0,this.it=t;if(t===T)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}$t.directiveName="unsafeHTML",$t.resultType=1;const Ut=yt($t);var Pt=Object.freeze({__proto__:null,UnsafeHTMLDirective:$t,unsafeHTML:Ut});(function(){function t(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function e(e){var n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return n?n.call(e):{next:t(e)}}function n(t){if(!(t instanceof Array)){t=e(t);for(var n,r=[];!(n=t.next()).done;)r.push(n.value);t=r}return t}var r="function"==typeof Object.create?Object.create:function(t){function e(){}return e.prototype=t,new e};var i,o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var e=0;e<t.length;++e){var n=t[e];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this),s=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(e,n,r){return e=t(e,n),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(t,e,n){return void 0===n&&(n=t),n=r(n.prototype||Object.prototype),Function.prototype.apply.call(t,n,e)||n}}();if("function"==typeof Object.setPrototypeOf)i=Object.setPrototypeOf;else{var u;t:{var c={};try{c.__proto__={a:!0},u=c.a;break t}catch(t){}u=!1}i=u?function(t,e){if(t.__proto__=e,t.__proto__!==e)throw new TypeError(t+" is not extensible");return t}:null}var a=i;if(!ShadowRoot.prototype.createElement){var l,f=window.HTMLElement,h=window.customElements.define,d=window.customElements.get,v=window.customElements,p=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,n){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var r=n.prototype.attributeChangedCallback,i=new Set(n.observedAttributes||[]);if(O(n,i,r),r={g:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:i},this.l.set(t,r),this.o.set(n,r),(i=d.call(v,t))||(i=m(t),h.call(v,t,i)),this===window.customElements&&(y.set(n,r),r.s=i),i=this.h.get(t)){this.h.delete(t);for(var o=(i=e(i)).next();!o.done;o=i.next())o=o.value,b.delete(o),x(o,r,!0)}return void 0!==(r=this.i.get(t))&&(r.resolve(n),this.i.delete(t)),n},window.CustomElementRegistry.prototype.upgrade=function(){j.push(this),v.upgrade.apply(v,arguments),j.pop()},window.CustomElementRegistry.prototype.get=function(t){var e;return null==(e=this.l.get(t))?void 0:e.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var e=this.j(t);if(void 0!==e)return Promise.resolve(e.g);var n=this.i.get(t);return void 0===n&&((n={}).promise=new Promise((function(t){return n.resolve=t})),this.i.set(t,n)),n.promise},window.CustomElementRegistry.prototype.m=function(t,e,n){var r=this.h.get(e);r||this.h.set(e,r=new Set),n?r.add(t):r.delete(t)},window.HTMLElement=function(){var t=l;if(t)return l=void 0,t;var e=y.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(f,[],e.s),Object.setPrototypeOf(t,this.constructor.prototype),p.set(t,e),t},window.HTMLElement.prototype=f.prototype;var m=function(t){function e(){var e=Reflect.construct(f,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);t:{var n=e.getRootNode();if(!(n===document||n instanceof ShadowRoot)){if((n=j[j.length-1])instanceof CustomElementRegistry){var r=n;break t}(n=n.getRootNode())===document||n instanceof ShadowRoot||(n=(null==(r=w.get(n))?void 0:r.getRootNode())||document)}r=n.customElements}return(n=(r=r||window.customElements).j(t))?x(e,n):b.set(e,r),e}return o.Object.defineProperty(e,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),e.prototype.connectedCallback=function(){var e=p.get(this);e?e.connectedCallback&&e.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},e.prototype.disconnectedCallback=function(){var e=p.get(this);e?e.disconnectedCallback&&e.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},e.prototype.adoptedCallback=function(){var t,e;null==(t=p.get(this))||null==(e=t.adoptedCallback)||e.apply(this,arguments)},e.prototype.formAssociatedCallback=function(){var t,e=p.get(this);e&&e.formAssociated&&(null==e||null==(t=e.formAssociatedCallback)||t.apply(this,arguments))},e.prototype.formDisabledCallback=function(){var t,e=p.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formDisabledCallback)||t.apply(this,arguments))},e.prototype.formResetCallback=function(){var t,e=p.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formResetCallback)||t.apply(this,arguments))},e.prototype.formStateRestoreCallback=function(){var t,e=p.get(this);null!=e&&e.formAssociated&&(null==e||null==(t=e.formStateRestoreCallback)||t.apply(this,arguments))},e},O=function(t,e,n){if(0!==e.size&&void 0!==n){var r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){if(t=t.toLowerCase(),e.has(t)){var o=this.getAttribute(t);r.call(this,t,i),n.call(this,t,o,i)}else r.call(this,t,i)});var i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),e.has(t)){var r=this.getAttribute(t);i.call(this,t),n.call(this,t,r,null)}else i.call(this,t)})}},g=function(t){var e=Object.getPrototypeOf(t);if(e!==window.HTMLElement)return e===f?Object.setPrototypeOf(t,window.HTMLElement):g(e)},x=function(t,e,n){n=void 0!==n&&n,Object.setPrototypeOf(t,e.g.prototype),p.set(t,e),l=t;try{new e.g}catch(t){g(e.g),new e.g}e.observedAttributes.forEach((function(n){t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},S=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var e=S.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};var j=[document],E=function(t,e,n){var r=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){j.push(this);var t=r.apply(n||this,arguments);return void 0!==t&&w.set(t,this),j.pop(),t}};E(ShadowRoot,"createElement",document),E(ShadowRoot,"importNode",document),E(Element,"insertAdjacentHTML");var R=function(t){var e=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},e,{set:function(t){j.push(this),e.set.call(this,t),j.pop()}}))};if(R(Element),R(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var N=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var e=[],r=0;r<arguments.length;++r)e[r]=arguments[r];return e=C.call.apply(C,[this].concat(n(e))),N.set(e,this),e},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var e=window.ElementInternals.prototype,r=e[t];e[t]=function(t){for(var e=[],i=0;i<arguments.length;++i)e[i]=arguments[i];if(i=N.get(this),!0!==p.get(i).formAssociated)throw new DOMException("Failed to execute "+r+" on 'ElementInternals': The target element is not a form-associated custom element.");null==r||r.call.apply(r,[this].concat(n(e)))}}));var M=function(t){var e=s(Array,[].concat(n(t)),this.constructor);return e.h=t,e},_=M,A=Array;if(_.prototype=r(A.prototype),_.prototype.constructor=_,a)a(_,A);else for(var $ in A)if("prototype"!=$)if(Object.defineProperties){var U=Object.getOwnPropertyDescriptor(A,$);U&&Object.defineProperty(_,$,U)}else _[$]=A[$];_.u=A.prototype,o.Object.defineProperty(M.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var P=function(t){var e=this,n=new Map;t.forEach((function(t,r){var i=t.getAttribute("name"),o=n.get(i)||[];e[+r]=t,o.push(t),n.set(i,o)})),this.length=t.length,n.forEach((function(t,n){t&&(e[n]=1===t.length?t[0]:new M(t))}))};P.prototype.namedItem=function(t){return this[t]};var F=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=F.get.call(this,[]),n=[],r=(t=e(t)).next();!r.done;r=t.next()){r=r.value;var i=p.get(r);i&&!0!==i.formAssociated||n.push(r)}return new P(n)}})}}}).call("object"==typeof globalThis?globalThis:window);try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,n,r)=>{try{e.bind(window.customElements)(t,n,r)}catch(e){console.warn(t,n,r,e)}}}class Ft{constructor(t,e,n,r,i){this.name=t,this.category=e,this.fallbackVariable=n,this.defaultValue=r,this.context=i,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,n){return new Ft(t,e,void 0,n)}static extend(t,e,n){return new Ft(t,e.category,e,n)}static external(t,e){return new Ft(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return s`var(${o(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):o(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}const kt={colorPrimary:Ft.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:Ft.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:Ft.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:Ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:Ft.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:Ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:Ft.create("--ft-color-error","COLOR","#B00020"),colorOutline:Ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:Ft.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:Ft.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:Ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:Ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:Ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:Ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:Ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:Ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:Ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:Ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:Ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:Ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:Ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:Ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:Ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:Ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:Ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:Ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:Ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:Ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:Ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:Ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:Ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:Ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:Ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:Ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:Ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:Ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:Ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:Ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:Ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:Ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:Ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:Ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:Ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:Ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:Ft.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:Ft.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:Ft.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:Ft.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:Ft.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:Ft.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:Ft.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:Ft.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:Ft.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:Ft.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:Ft.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:Ft.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:Ft.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:Ft.create("--ft-border-radius-XL","SIZE","16px"),titleFont:Ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:Ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:Ft.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:Ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
106
+ */class $t extends mt{constructor(t){if(super(t),this.it=D,t.type!==bt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||null==t)return this.vt=void 0,this.it=t;if(t===T)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}$t.directiveName="unsafeHTML",$t.resultType=1;const Ut=yt($t);var Pt=Object.freeze({__proto__:null,UnsafeHTMLDirective:$t,unsafeHTML:Ut});
107
+ /**
108
+ * @license
109
+ * Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
110
+ * This code may only be used under the BSD style license found at
111
+ * http://polymer.github.io/LICENSE.txt
112
+ * The complete set of authors may be found at
113
+ * http://polymer.github.io/AUTHORS.txt
114
+ * The complete set of contributors may be found at
115
+ * http://polymer.github.io/CONTRIBUTORS.txt
116
+ * Code distributed by Google as part of the polymer project is also
117
+ * subject to an additional IP rights grant found at
118
+ * http://polymer.github.io/PATENTS.txt
119
+ *
120
+ * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
121
+ */if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,r=window.customElements,i=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap;let u;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,i){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const c=i.prototype.attributeChangedCallback,u=new Set(i.observedAttributes||[]);h(i,u,c);const a={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:c,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:u};this._definitionsByTag.set(t,a),this._definitionsByClass.set(i,a);let l=n.call(r,t);l||(l=f(t),e.call(r,t,l)),this===window.customElements&&(s.set(i,a),a.standInClass=l);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)o.delete(t),v(t,a,!0)}const p=this._whenDefinedPromises.get(t);return void 0!==p&&(p.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){b.push(this),r.upgrade.apply(r,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let r=this._awaitingUpgrade.get(e);r||this._awaitingUpgrade.set(e,r=new Set),n?r.add(t):r.delete(t)}},window.HTMLElement=function(){let e=u;if(e)return u=void 0,e;const n=s.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),i.set(e,n),e},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,l=t=>{let e=t.getRootNode();if(!a(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),a(e)||(e=c.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const r=l(n)||window.customElements,i=r._getDefinition(e);return i?v(n,i):o.set(n,r),n}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){i.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,n)=>{if(0===e.size||void 0===n)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o,i),n.call(this,o,t,i)}else r.call(this,o,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);i.call(this,r),n.call(this,r,t,null)}else i.call(this,r)})},d=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(n)},v=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),i.set(t,e),u=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=p.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const y=(t,e,n)=>{const r=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=r.apply(n||this,arguments);return void 0!==t&&c.set(t,this),b.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const m=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const r=e.call(this,...n);return t.set(r,this),r},n.forEach((e=>{const n=window.ElementInternals.prototype,r=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==i.get(n).formAssociated)throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`);r?.call(this,...e)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const e=new Map;t.forEach(((t,n)=>{const r=t.getAttribute("name"),i=e.get(r)||[];this[+n]=t,i.push(t),e.set(r,i)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new r(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const n of t){const t=i.get(n);t&&!0!==t.formAssociated||e.push(n)}return new o(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,n,r)=>{try{e.bind(window.customElements)(t,n,r)}catch(e){console.warn(t,n,r,e)}}}class kt{constructor(t,e,n,r,i){this.name=t,this.category=e,this.fallbackVariable=n,this.defaultValue=r,this.context=i,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,e,n){return new kt(t,e,void 0,n)}static extend(t,e,n){return new kt(t,e.category,e,n)}static external(t,e){return new kt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return s`var(${o(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):o(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,e;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(e=this.fallbackVariable)||void 0===e?void 0:e.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}const Ft={colorPrimary:kt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:kt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:kt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:kt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:kt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:kt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:kt.create("--ft-color-error","COLOR","#B00020"),colorOutline:kt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:kt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:kt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:kt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:kt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:kt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:kt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:kt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:kt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:kt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:kt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:kt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:kt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:kt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:kt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:kt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:kt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:kt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:kt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:kt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:kt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:kt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:kt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:kt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:kt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:kt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:kt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:kt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:kt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:kt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:kt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:kt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:kt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:kt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:kt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:kt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:kt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:kt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:kt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:kt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:kt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:kt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:kt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:kt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:kt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:kt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:kt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:kt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:kt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:kt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:kt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:kt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:kt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:kt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:kt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
107
122
  /**
108
123
  * @license
109
124
  * Copyright 2021 Google LLC
110
125
  * SPDX-License-Identifier: BSD-3-Clause
111
- */class Lt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:n,shadowRootOptions:r}=t;n&&!e&&(t.registry=new CustomElementRegistry,Object.entries(n).forEach((([e,n])=>t.registry.define(e,n))));const i=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return u(i,this.constructor.elementStyles),i}}}(ot)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),k`
112
- ${t.map((t=>k`
126
+ */class Lt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:n,shadowRootOptions:r}=t;n&&!e&&(t.registry=new CustomElementRegistry,Object.entries(n).forEach((([e,n])=>t.registry.define(e,n))));const i=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return c(i,this.constructor.elementStyles),i}}}(ot)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),F`
127
+ ${t.map((t=>F`
113
128
  <style>${t}</style>
114
129
  `))}
115
130
  ${this.getTemplate()}
116
- `}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const Tt=s`
131
+ `}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const Tt=s`
117
132
  .ft-no-text-select {
118
133
  -webkit-touch-callout: none;
119
134
  -webkit-user-select: none;
@@ -122,4 +137,9 @@ var ft;const ht=null!=(null===(ft=window.HTMLSlotElement)||void 0===ft?void 0:ft
122
137
  -ms-user-select: none;
123
138
  user-select: none;
124
139
  }
125
- `;function Bt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Dt(t){return!!t&&!!t[Re]}function Wt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Ne}(t)||Array.isArray(t)||!!t[Ee]||!!t.constructor[Ee]||qt(t)||Zt(t))}function Ht(t,e,n){void 0===n&&(n=!1),0===Kt(t)?(n?Object.keys:Ce)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function Kt(t){var e=t[Re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:qt(t)?2:Zt(t)?3:0}function It(t,e){return 2===Kt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Vt(t,e,n){var r=Kt(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function zt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function qt(t){return ge&&t instanceof Map}function Zt(t){return xe&&t instanceof Set}function Jt(t){return t.o||t.t}function Xt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Me(t);delete e[Re];for(var n=Ce(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Gt(t,e){return void 0===e&&(e=!1),Yt(t)||Dt(t)||!Wt(t)||(Kt(t)>1&&(t.set=t.add=t.clear=t.delete=Qt),Object.freeze(t),e&&Ht(t,(function(t,e){return Gt(e,!0)}),!0)),t}function Qt(){Bt(2)}function Yt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function te(t){var e=_e[t];return e||Bt(18,t),e}function ee(){return me}function ne(t,e){e&&(te("Patches"),t.u=[],t.s=[],t.v=e)}function re(t){ie(t),t.p.forEach(se),t.p=null}function ie(t){t===me&&(me=t.l)}function oe(t){return me={p:[],l:me,h:t,m:!0,_:0}}function se(t){var e=t[Re];0===e.i||1===e.i?e.j():e.O=!0}function ue(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||te("ES5").S(e,t,r),r?(n[Re].P&&(re(e),Bt(4)),Wt(t)&&(t=ce(e,t),e.l||le(e,t)),e.u&&te("Patches").M(n[Re].t,t,e.u,e.s)):t=ce(e,n,[]),re(e),e.u&&e.v(e.u,e.s),t!==je?t:void 0}function ce(t,e,n){if(Yt(e))return e;var r=e[Re];if(!r)return Ht(e,(function(i,o){return ae(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return le(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=Xt(r.k):r.o;Ht(3===r.i?new Set(i):i,(function(e,o){return ae(t,r,i,e,o,n)})),le(t,i,!1),n&&t.u&&te("Patches").R(r,n,t.u,t.s)}return r.o}function ae(t,e,n,r,i,o){if(Dt(i)){var s=ce(t,i,o&&e&&3!==e.i&&!It(e.D,r)?o.concat(r):void 0);if(Vt(n,r,s),!Dt(s))return;t.m=!1}if(Wt(i)&&!Yt(i)){if(!t.h.F&&t._<1)return;ce(t,i),e&&e.A.l||le(t,i)}}function le(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&Gt(e,n)}function fe(t,e){var n=t[Re];return(n?Jt(n):t)[e]}function he(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function de(t){t.P||(t.P=!0,t.l&&de(t.l))}function ve(t){t.o||(t.o=Xt(t.t))}function pe(t,e,n){var r=qt(e)?te("MapSet").N(e,n):Zt(e)?te("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:ee(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=Ae;n&&(i=[r],o=$e);var s=Proxy.revocable(i,o),u=s.revoke,c=s.proxy;return r.k=c,r.j=u,c}(e,n):te("ES5").J(e,n);return(n?n.A:ee()).p.push(r),r}function be(t){return Dt(t)||Bt(22,t),function t(e){if(!Wt(e))return e;var n,r=e[Re],i=Kt(e);if(r){if(!r.P&&(r.i<4||!te("ES5").K(r)))return r.t;r.I=!0,n=ye(e,i),r.I=!1}else n=ye(e,i);return Ht(n,(function(e,i){r&&function(t,e){return 2===Kt(t)?t.get(e):t[e]}(r.t,e)===i||Vt(n,e,t(i))})),3===i?new Set(n):n}(t)}function ye(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Xt(t)}var we,me,Oe="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ge="undefined"!=typeof Map,xe="undefined"!=typeof Set,Se="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,je=Oe?Symbol.for("immer-nothing"):((we={})["immer-nothing"]=!0,we),Ee=Oe?Symbol.for("immer-draftable"):"__$immer_draftable",Re=Oe?Symbol.for("immer-state"):"__$immer_state",Ne=""+Object.prototype.constructor,Ce="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Me=Object.getOwnPropertyDescriptors||function(t){var e={};return Ce(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},_e={},Ae={get:function(t,e){if(e===Re)return t;var n=Jt(t);if(!It(n,e))return function(t,e,n){var r,i=he(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!Wt(r)?r:r===fe(t.t,e)?(ve(t),t.o[e]=pe(t.A.h,r,t)):r},has:function(t,e){return e in Jt(t)},ownKeys:function(t){return Reflect.ownKeys(Jt(t))},set:function(t,e,n){var r=he(Jt(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=fe(Jt(t),e),o=null==i?void 0:i[Re];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(zt(n,i)&&(void 0!==n||It(t.t,e)))return!0;ve(t),de(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==fe(t.t,e)||e in t.t?(t.D[e]=!1,ve(t),de(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Jt(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Bt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Bt(12)}},$e={};Ht(Ae,(function(t,e){$e[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),$e.deleteProperty=function(t,e){return $e.set.call(this,t,e,void 0)},$e.set=function(t,e,n){return Ae.set.call(this,t[0],e,n,t[0])};var Ue=function(){function t(t){var e=this;this.g=Se,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Bt(6),void 0!==r&&"function"!=typeof r&&Bt(7),Wt(t)){var u=oe(e),c=pe(e,t,void 0),a=!0;try{s=n(c),a=!1}finally{a?re(u):ie(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ne(u,r),ue(t,u)}),(function(t){throw re(u),t})):(ne(u,r),ue(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===je&&(s=void 0),e.F&&Gt(s,!0),r){var l=[],f=[];te("Patches").M(t,s,l,f),r(l,f)}return s}Bt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Wt(t)||Bt(8),Dt(t)&&(t=be(t));var e=oe(this),n=pe(this,t,void 0);return n[Re].C=!0,ie(e),n},e.finishDraft=function(t,e){var n=(t&&t[Re]).A;return ne(n,e),ue(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Se&&Bt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=te("Patches").$;return Dt(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Pe=new Ue;function Fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ke(Object(n),!0).forEach((function(e){Fe(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Te(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Pe.produce,Pe.produceWithPatches.bind(Pe),Pe.setAutoFreeze.bind(Pe),Pe.setUseProxies.bind(Pe),Pe.applyPatches.bind(Pe),Pe.createDraft.bind(Pe),Pe.finishDraft.bind(Pe);var Be="function"==typeof Symbol&&Symbol.observable||"@@observable",De=function(){return Math.random().toString(36).substring(7).split("").join(".")},We={INIT:"@@redux/INIT"+De(),REPLACE:"@@redux/REPLACE"+De(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+De()}};function He(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ke(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Te(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Te(1));return n(Ke)(t,e)}if("function"!=typeof t)throw new Error(Te(2));var i=t,o=e,s=[],u=s,c=!1;function a(){u===s&&(u=s.slice())}function l(){if(c)throw new Error(Te(3));return o}function f(t){if("function"!=typeof t)throw new Error(Te(4));if(c)throw new Error(Te(5));var e=!0;return a(),u.push(t),function(){if(e){if(c)throw new Error(Te(6));e=!1,a();var n=u.indexOf(t);u.splice(n,1),s=null}}}function h(t){if(!He(t))throw new Error(Te(7));if(void 0===t.type)throw new Error(Te(8));if(c)throw new Error(Te(9));try{c=!0,o=i(o,t)}finally{c=!1}for(var e=s=u,n=0;n<e.length;n++){(0,e[n])()}return t}function d(t){if("function"!=typeof t)throw new Error(Te(10));i=t,h({type:We.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Te(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[Be]=function(){return this},t}return h({type:We.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[Be]=v,r}function Ie(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:We.INIT}))throw new Error(Te(12));if(void 0===n(void 0,{type:We.PROBE_UNKNOWN_ACTION()}))throw new Error(Te(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},u=0;u<s.length;u++){var c=s[u],a=n[c],l=t[c],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Te(14));i[c]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function Ve(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function ze(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Te(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=Ve.apply(void 0,o)(n.dispatch),Le(Le({},n),{},{dispatch:r})}}}function qe(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var Ze=qe();Ze.withExtraArgument=qe;var Je,Xe=Ze,Ge=(Je=function(t,e){return Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Je(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Je(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Qe=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},Ye=Object.defineProperty,tn=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,rn=function(t,e,n){return e in t?Ye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},on="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ve:Ve.apply(null,arguments)};var sn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return Ge(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Qe([void 0],t[0].concat(this)))):new(e.bind.apply(e,Qe([void 0],t.concat(this))))},e}(Array);function un(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new sn;n&&(!function(t){return"boolean"==typeof t}(n)?r.push(Xe.withExtraArgument(n.extraArgument)):r.push(Xe));return r}(t)}}function cn(t){var e,n=un(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,u=void 0===s?n():s,c=r.devTools,a=void 0===c||c,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Ie(o)}var v=u;"function"==typeof v&&(v=v(n));var p=ze.apply(void 0,v),b=Ve;a&&(b=on(function(t,e){for(var n in e||(e={}))en.call(e,n)&&rn(t,n,e[n]);if(tn)for(var r=0,i=tn(e);r<i.length;r++)n=i[r],nn.call(e,n)&&rn(t,n,e[n]);return t}({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=Qe([p],d):"function"==typeof d&&(y=d(y)),Ke(e,f,b.apply(void 0,y))}!function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Re];return Ae.get(e,t)},set:function(e){var n=this[Re];Ae.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Re];if(!i.P)switch(i.i){case 5:r(i)&&de(i);break;case 4:n(i)&&de(i)}}}function n(t){for(var e=t.t,n=t.k,r=Ce(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Re){var s=e[o];if(void 0===s&&!It(e,o))return!0;var u=n[o],c=u&&u[Re];if(c?c.t!==s:!zt(u,s))return!0}}var a=!!e[Re];return r.length!==Ce(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){_e[t]||(_e[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=Me(n);delete o[Re];for(var s=Ce(o),u=0;u<s.length;u++){var c=s[u];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:ee(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Re,{value:o,writable:!0}),i},S:function(t,n,i){i?Dt(n)&&n[Re].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Re];if(n){var i=n.t,o=n.k,s=n.D,u=n.i;if(4===u)Ht(o,(function(e){e!==Re&&(void 0!==i[e]||It(i,e)?s[e]||t(o[e]):(s[e]=!0,de(n)))})),Ht(i,(function(t){void 0!==o[t]||It(o,t)||(s[t]=!1,de(n))}));else if(5===u){if(r(n)&&(de(n),s.length=!0),o.length<i.length)for(var c=o.length;c<i.length;c++)s[c]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();var an,ln,fn;const hn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(fn=null===(ln=null===(an=window.safari)||void 0===an?void 0:an.pushNotification)||void 0===ln?void 0:ln.toString())&&void 0!==fn?fn:"");var dn=Object.freeze({__proto__:null,isSafari:hn,Debouncer:class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:function(t,e){const n=()=>JSON.parse(JSON.stringify(t));return at({type:Object,converter:{fromAttribute:t=>{if(null==t)return n();try{return JSON.parse(t)}catch{return n()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})},designSystemVariables:kt,FtCssVariable:Ft,setVariable:function(t,e){return o(`${t.name}: ${e}`)},FtLitElement:Lt,noTextSelect:Tt,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>(n,r)=>{n.constructor.createProperty(r,{attribute:!1,hasChanged:e});const i=n;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(r,t)},FtLitElementRedux:class extends Lt{updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,n)=>{this[n]=e(t)}))}connectedCallback(){super.connectedCallback(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()}))}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}},getStore:function(t){window.ftReduxStores||(window.ftReduxStores={});const e=t.name;return window.ftReduxStores[e]||(window.ftReduxStores[e]=cn({reducer:t.reducer})),window.ftReduxStores[e]}});t.lit=ut,t.litClassMap=Mt,t.litDecorators=vt,t.litRepeat=Nt,t.litStyleMap=At,t.litUnsafeHTML=Pt,t.wcUtils=dn,Object.defineProperty(t,"U",{value:!0})}));
140
+ `;function Dt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Bt(t){return!!t&&!!t[Re]}function Wt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Ce}(t)||Array.isArray(t)||!!t[je]||!!t.constructor[je]||qt(t)||Zt(t))}function Ht(t,e,n){void 0===n&&(n=!1),0===It(t)?(n?Object.keys:Ne)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function It(t){var e=t[Re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:qt(t)?2:Zt(t)?3:0}function Kt(t,e){return 2===It(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Vt(t,e,n){var r=It(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function zt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function qt(t){return ge&&t instanceof Map}function Zt(t){return xe&&t instanceof Set}function Jt(t){return t.o||t.t}function Xt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Me(t);delete e[Re];for(var n=Ne(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Gt(t,e){return void 0===e&&(e=!1),Yt(t)||Bt(t)||!Wt(t)||(It(t)>1&&(t.set=t.add=t.clear=t.delete=Qt),Object.freeze(t),e&&Ht(t,(function(t,e){return Gt(e,!0)}),!0)),t}function Qt(){Dt(2)}function Yt(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function te(t){var e=_e[t];return e||Dt(18,t),e}function ee(){return we}function ne(t,e){e&&(te("Patches"),t.u=[],t.s=[],t.v=e)}function re(t){ie(t),t.p.forEach(se),t.p=null}function ie(t){t===we&&(we=t.l)}function oe(t){return we={p:[],l:we,h:t,m:!0,_:0}}function se(t){var e=t[Re];0===e.i||1===e.i?e.j():e.O=!0}function ce(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||te("ES5").S(e,t,r),r?(n[Re].P&&(re(e),Dt(4)),Wt(t)&&(t=ue(e,t),e.l||le(e,t)),e.u&&te("Patches").M(n[Re].t,t,e.u,e.s)):t=ue(e,n,[]),re(e),e.u&&e.v(e.u,e.s),t!==Ee?t:void 0}function ue(t,e,n){if(Yt(e))return e;var r=e[Re];if(!r)return Ht(e,(function(i,o){return ae(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return le(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=Xt(r.k):r.o;Ht(3===r.i?new Set(i):i,(function(e,o){return ae(t,r,i,e,o,n)})),le(t,i,!1),n&&t.u&&te("Patches").R(r,n,t.u,t.s)}return r.o}function ae(t,e,n,r,i,o){if(Bt(i)){var s=ue(t,i,o&&e&&3!==e.i&&!Kt(e.D,r)?o.concat(r):void 0);if(Vt(n,r,s),!Bt(s))return;t.m=!1}if(Wt(i)&&!Yt(i)){if(!t.h.F&&t._<1)return;ue(t,i),e&&e.A.l||le(t,i)}}function le(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&Gt(e,n)}function fe(t,e){var n=t[Re];return(n?Jt(n):t)[e]}function he(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function de(t){t.P||(t.P=!0,t.l&&de(t.l))}function ve(t){t.o||(t.o=Xt(t.t))}function pe(t,e,n){var r=qt(e)?te("MapSet").N(e,n):Zt(e)?te("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:ee(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=Ae;n&&(i=[r],o=$e);var s=Proxy.revocable(i,o),c=s.revoke,u=s.proxy;return r.k=u,r.j=c,u}(e,n):te("ES5").J(e,n);return(n?n.A:ee()).p.push(r),r}function be(t){return Bt(t)||Dt(22,t),function t(e){if(!Wt(e))return e;var n,r=e[Re],i=It(e);if(r){if(!r.P&&(r.i<4||!te("ES5").K(r)))return r.t;r.I=!0,n=ye(e,i),r.I=!1}else n=ye(e,i);return Ht(n,(function(e,i){r&&function(t,e){return 2===It(t)?t.get(e):t[e]}(r.t,e)===i||Vt(n,e,t(i))})),3===i?new Set(n):n}(t)}function ye(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Xt(t)}var me,we,Oe="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ge="undefined"!=typeof Map,xe="undefined"!=typeof Set,Se="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ee=Oe?Symbol.for("immer-nothing"):((me={})["immer-nothing"]=!0,me),je=Oe?Symbol.for("immer-draftable"):"__$immer_draftable",Re=Oe?Symbol.for("immer-state"):"__$immer_state",Ce=""+Object.prototype.constructor,Ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Me=Object.getOwnPropertyDescriptors||function(t){var e={};return Ne(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},_e={},Ae={get:function(t,e){if(e===Re)return t;var n=Jt(t);if(!Kt(n,e))return function(t,e,n){var r,i=he(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!Wt(r)?r:r===fe(t.t,e)?(ve(t),t.o[e]=pe(t.A.h,r,t)):r},has:function(t,e){return e in Jt(t)},ownKeys:function(t){return Reflect.ownKeys(Jt(t))},set:function(t,e,n){var r=he(Jt(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=fe(Jt(t),e),o=null==i?void 0:i[Re];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(zt(n,i)&&(void 0!==n||Kt(t.t,e)))return!0;ve(t),de(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==fe(t.t,e)||e in t.t?(t.D[e]=!1,ve(t),de(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Jt(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Dt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Dt(12)}},$e={};Ht(Ae,(function(t,e){$e[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),$e.deleteProperty=function(t,e){return $e.set.call(this,t,e,void 0)},$e.set=function(t,e,n){return Ae.set.call(this,t[0],e,n,t[0])};var Ue=function(){function t(t){var e=this;this.g=Se,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Dt(6),void 0!==r&&"function"!=typeof r&&Dt(7),Wt(t)){var c=oe(e),u=pe(e,t,void 0),a=!0;try{s=n(u),a=!1}finally{a?re(c):ie(c)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ne(c,r),ce(t,c)}),(function(t){throw re(c),t})):(ne(c,r),ce(s,c))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===Ee&&(s=void 0),e.F&&Gt(s,!0),r){var l=[],f=[];te("Patches").M(t,s,l,f),r(l,f)}return s}Dt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Wt(t)||Dt(8),Bt(t)&&(t=be(t));var e=oe(this),n=pe(this,t,void 0);return n[Re].C=!0,ie(e),n},e.finishDraft=function(t,e){var n=(t&&t[Re]).A;return ne(n,e),ce(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Se&&Dt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=te("Patches").$;return Bt(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Pe=new Ue;function ke(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fe(Object(n),!0).forEach((function(e){ke(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Te(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Pe.produce,Pe.produceWithPatches.bind(Pe),Pe.setAutoFreeze.bind(Pe),Pe.setUseProxies.bind(Pe),Pe.applyPatches.bind(Pe),Pe.createDraft.bind(Pe),Pe.finishDraft.bind(Pe);var De="function"==typeof Symbol&&Symbol.observable||"@@observable",Be=function(){return Math.random().toString(36).substring(7).split("").join(".")},We={INIT:"@@redux/INIT"+Be(),REPLACE:"@@redux/REPLACE"+Be(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Be()}};function He(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ie(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Te(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Te(1));return n(Ie)(t,e)}if("function"!=typeof t)throw new Error(Te(2));var i=t,o=e,s=[],c=s,u=!1;function a(){c===s&&(c=s.slice())}function l(){if(u)throw new Error(Te(3));return o}function f(t){if("function"!=typeof t)throw new Error(Te(4));if(u)throw new Error(Te(5));var e=!0;return a(),c.push(t),function(){if(e){if(u)throw new Error(Te(6));e=!1,a();var n=c.indexOf(t);c.splice(n,1),s=null}}}function h(t){if(!He(t))throw new Error(Te(7));if(void 0===t.type)throw new Error(Te(8));if(u)throw new Error(Te(9));try{u=!0,o=i(o,t)}finally{u=!1}for(var e=s=c,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(Te(10));i=t,h({type:We.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Te(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[De]=function(){return this},t}return h({type:We.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[De]=v,r}function Ke(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:We.INIT}))throw new Error(Te(12));if(void 0===n(void 0,{type:We.PROBE_UNKNOWN_ACTION()}))throw new Error(Te(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},c=0;c<s.length;c++){var u=s[c],a=n[u],l=t[u],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Te(14));i[u]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function Ve(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function ze(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Te(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=Ve.apply(void 0,o)(n.dispatch),Le(Le({},n),{},{dispatch:r})}}}function qe(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var Ze=qe();Ze.withExtraArgument=qe;var Je,Xe,Ge,Qe,Ye=Ze,tn=(Je=function(t,e){return Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Je(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Je(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),en=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},nn=Object.defineProperty,rn=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,cn=function(t,e,n){return e in t?nn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},un="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Ve:Ve.apply(null,arguments)},an=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return tn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,en([void 0],t[0].concat(this)))):new(e.bind.apply(e,en([void 0],t.concat(this))))},e}(Array);function ln(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new an;return n&&(function(t){return"boolean"==typeof t}(n)?r.push(Ye):r.push(Ye.withExtraArgument(n.extraArgument))),r}(t)}}function fn(t){var e,n=ln(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,c=void 0===s?n():s,u=r.devTools,a=void 0===u||u,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Ke(o)}var v=c;"function"==typeof v&&(v=v(n));var p=ze.apply(void 0,v),b=Ve;a&&(b=un(function(t,e){for(var n in e||(e={}))on.call(e,n)&&cn(t,n,e[n]);if(rn)for(var r=0,i=rn(e);r<i.length;r++)n=i[r],sn.call(e,n)&&cn(t,n,e[n]);return t}({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=en([p],d):"function"==typeof d&&(y=d(y)),Ie(e,f,b.apply(void 0,y))}!function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Re];return Ae.get(e,t)},set:function(e){var n=this[Re];Ae.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Re];if(!i.P)switch(i.i){case 5:r(i)&&de(i);break;case 4:n(i)&&de(i)}}}function n(t){for(var e=t.t,n=t.k,r=Ne(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Re){var s=e[o];if(void 0===s&&!Kt(e,o))return!0;var c=n[o],u=c&&c[Re];if(u?u.t!==s:!zt(c,s))return!0}}var a=!!e[Re];return r.length!==Ne(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){_e[t]||(_e[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=Me(n);delete o[Re];for(var s=Ne(o),c=0;c<s.length;c++){var u=s[c];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:ee(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Re,{value:o,writable:!0}),i},S:function(t,n,i){i?Bt(n)&&n[Re].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Re];if(n){var i=n.t,o=n.k,s=n.D,c=n.i;if(4===c)Ht(o,(function(e){e!==Re&&(void 0!==i[e]||Kt(i,e)?s[e]||t(o[e]):(s[e]=!0,de(n)))})),Ht(i,(function(t){void 0!==o[t]||Kt(o,t)||(s[t]=!1,de(n))}));else if(5===c){if(r(n)&&(de(n),s.length=!0),o.length<i.length)for(var u=o.length;u<i.length;u++)s[u]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();const hn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Qe=null===(Ge=null===(Xe=window.safari)||void 0===Xe?void 0:Xe.pushNotification)||void 0===Ge?void 0:Ge.toString())&&void 0!==Qe?Qe:"");var dn=Object.freeze({__proto__:null,isSafari:hn,Debouncer:class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:function(t,e){const n=()=>JSON.parse(JSON.stringify(t));return at({type:Object,converter:{fromAttribute:t=>{if(null==t)return n();try{return JSON.parse(t)}catch{return n()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})},designSystemVariables:Ft,FtCssVariable:kt,setVariable:function(t,e){return o(`${t.name}: ${e}`)},FtLitElement:Lt,noTextSelect:Tt,InlineStyles:function t(e){var n;let r;if("elementDefinitions"in e){r={};const n=e.elementDefinitions;for(let e in n)r[e]=t(n[e])}return n=class extends e{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let n=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(n)||(n=[n]),F`
141
+ ${n.map((t=>F`
142
+ <style>${t}</style>
143
+ `))}
144
+ ${super.render()}
145
+ `}},n.styles=void 0,n.elementDefinitions=r,n},ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>(n,r)=>{n.constructor.createProperty(r,{attribute:!1,hasChanged:e});const i=n;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(r,t)},FtLitElementRedux:class extends Lt{updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,n)=>{this[n]=e(t)}))}connectedCallback(){super.connectedCallback(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()}))}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}},getStore:function(t){window.ftReduxStores||(window.ftReduxStores={});const e=t.name;return window.ftReduxStores[e]||(window.ftReduxStores[e]=fn({reducer:t.reducer})),window.ftReduxStores[e]}});t.lit=ct,t.litClassMap=Mt,t.litDecorators=vt,t.litRepeat=Ct,t.litStyleMap=At,t.litUnsafeHTML=Pt,t.wcUtils=dn,Object.defineProperty(t,"U",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={});
package/build/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export * from "./designSystemVariables";
6
6
  export * from "./FtCssVariables";
7
7
  export * from "./FtLitElement";
8
8
  export * from "./mixins";
9
+ export * from "./InlineStyles";
9
10
  export * from "./ParametrizedLabelResolver";
10
11
  export * from "./redux";
12
+ export { ElementDefinitionsMap } from "@lit-labs/scoped-registry-mixin";
11
13
  //# sourceMappingURL=index.d.ts.map
package/build/index.js CHANGED
@@ -8,6 +8,7 @@ export * from "./designSystemVariables";
8
8
  export * from "./FtCssVariables";
9
9
  export * from "./FtLitElement";
10
10
  export * from "./mixins";
11
+ export * from "./InlineStyles";
11
12
  export * from "./ParametrizedLabelResolver";
12
13
  export * from "./redux";
13
14
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import "@webcomponents/scoped-custom-element-registry";
1
+ import "../lib/scoped-custom-element-registry.js";
2
2
  //# sourceMappingURL=silent-define.d.ts.map
@@ -1,4 +1,4 @@
1
- import "@webcomponents/scoped-custom-element-registry";
1
+ import "../lib/scoped-custom-element-registry.js";
2
2
  try {
3
3
  // Throws expected error to replace default window.customElements.define
4
4
  //@ts-ignore
@@ -1 +1,17 @@
1
- !function(){(function(){function t(t){var n=0;return function(){return n<t.length?{done:!1,value:t[n++]}:{done:!0}}}function n(n){var e="undefined"!=typeof Symbol&&Symbol.iterator&&n[Symbol.iterator];return e?e.call(n):{next:t(n)}}function e(t){if(!(t instanceof Array)){t=n(t);for(var e,i=[];!(e=t.next()).done;)i.push(e.value);t=i}return t}var i="function"==typeof Object.create?Object.create:function(t){function n(){}return n.prototype=t,new n};var o,r=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<t.length;++n){var e=t[n];if(e&&e.Math==Math)return e}throw Error("Cannot find global object")}(this),a=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(n,e,i){return n=t(n,e),i&&Reflect.setPrototypeOf(n,i.prototype),n}}return function(t,n,e){return void 0===e&&(e=t),e=i(e.prototype||Object.prototype),Function.prototype.apply.call(t,e,n)||e}}();if("function"==typeof Object.setPrototypeOf)o=Object.setPrototypeOf;else{var c;t:{var u={};try{u.__proto__={a:!0},c=u.a;break t}catch(t){}c=!1}o=c?function(t,n){if(t.__proto__=n,t.__proto__!==n)throw new TypeError(t+" is not extensible");return t}:null}var l=o;if(!ShadowRoot.prototype.createElement){var s,f=window.HTMLElement,h=window.customElements.define,w=window.customElements.get,d=window.customElements,v=new WeakMap,b=new WeakMap,m=new WeakMap,y=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,e){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(e))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var i=e.prototype.attributeChangedCallback,o=new Set(e.observedAttributes||[]);if(j(e,o,i),i={g:e,connectedCallback:e.prototype.connectedCallback,disconnectedCallback:e.prototype.disconnectedCallback,adoptedCallback:e.prototype.adoptedCallback,attributeChangedCallback:i,formAssociated:e.formAssociated,formAssociatedCallback:e.prototype.formAssociatedCallback,formDisabledCallback:e.prototype.formDisabledCallback,formResetCallback:e.prototype.formResetCallback,formStateRestoreCallback:e.prototype.formStateRestoreCallback,observedAttributes:o},this.l.set(t,i),this.o.set(e,i),(o=w.call(d,t))||(o=p(t),h.call(d,t,o)),this===window.customElements&&(m.set(e,i),i.s=o),o=this.h.get(t)){this.h.delete(t);for(var r=(o=n(o)).next();!r.done;r=o.next())r=r.value,b.delete(r),E(r,i,!0)}return void 0!==(i=this.i.get(t))&&(i.resolve(e),this.i.delete(t)),e},window.CustomElementRegistry.prototype.upgrade=function(){M.push(this),d.upgrade.apply(d,arguments),M.pop()},window.CustomElementRegistry.prototype.get=function(t){var n;return null==(n=this.l.get(t))?void 0:n.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var n=this.j(t);if(void 0!==n)return Promise.resolve(n.g);var e=this.i.get(t);return void 0===e&&((e={}).promise=new Promise((function(t){return e.resolve=t})),this.i.set(t,e)),e.promise},window.CustomElementRegistry.prototype.m=function(t,n,e){var i=this.h.get(n);i||this.h.set(n,i=new Set),e?i.add(t):i.delete(t)},window.HTMLElement=function(){var t=s;if(t)return s=void 0,t;var n=m.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(f,[],n.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,n),t},window.HTMLElement.prototype=f.prototype;var p=function(t){function n(){var n=Reflect.construct(f,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);t:{var e=n.getRootNode();if(!(e===document||e instanceof ShadowRoot)){if((e=M[M.length-1])instanceof CustomElementRegistry){var i=e;break t}(e=e.getRootNode())===document||e instanceof ShadowRoot||(e=(null==(i=y.get(e))?void 0:i.getRootNode())||document)}i=e.customElements}return(e=(i=i||window.customElements).j(t))?E(n,e):b.set(n,i),n}return r.Object.defineProperty(n,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),n.prototype.connectedCallback=function(){var n=v.get(this);n?n.connectedCallback&&n.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},n.prototype.disconnectedCallback=function(){var n=v.get(this);n?n.disconnectedCallback&&n.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},n.prototype.adoptedCallback=function(){var t,n;null==(t=v.get(this))||null==(n=t.adoptedCallback)||n.apply(this,arguments)},n.prototype.formAssociatedCallback=function(){var t,n=v.get(this);n&&n.formAssociated&&(null==n||null==(t=n.formAssociatedCallback)||t.apply(this,arguments))},n.prototype.formDisabledCallback=function(){var t,n=v.get(this);null!=n&&n.formAssociated&&(null==n||null==(t=n.formDisabledCallback)||t.apply(this,arguments))},n.prototype.formResetCallback=function(){var t,n=v.get(this);null!=n&&n.formAssociated&&(null==n||null==(t=n.formResetCallback)||t.apply(this,arguments))},n.prototype.formStateRestoreCallback=function(){var t,n=v.get(this);null!=n&&n.formAssociated&&(null==n||null==(t=n.formStateRestoreCallback)||t.apply(this,arguments))},n},j=function(t,n,e){if(0!==n.size&&void 0!==e){var i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,o){if(t=t.toLowerCase(),n.has(t)){var r=this.getAttribute(t);i.call(this,t,o),e.call(this,t,r,o)}else i.call(this,t,o)});var o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),n.has(t)){var i=this.getAttribute(t);o.call(this,t),e.call(this,t,i,null)}else o.call(this,t)})}},g=function(t){var n=Object.getPrototypeOf(t);if(n!==window.HTMLElement)return n===f?Object.setPrototypeOf(t,window.HTMLElement):g(n)},E=function(t,n,e){e=void 0!==e&&e,Object.setPrototypeOf(t,n.g.prototype),v.set(t,n),s=t;try{new n.g}catch(t){g(n.g),new n.g}n.observedAttributes.forEach((function(e){t.hasAttribute(e)&&n.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&n.connectedCallback&&t.isConnected&&n.connectedCallback.call(t)},O=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var n=O.apply(this,arguments);return t.customElements&&(n.customElements=t.customElements),n};var M=[document],R=function(t,n,e){var i=(e?Object.getPrototypeOf(e):t.prototype)[n];t.prototype[n]=function(){M.push(this);var t=i.apply(e||this,arguments);return void 0!==t&&y.set(t,this),M.pop(),t}};R(ShadowRoot,"createElement",document),R(ShadowRoot,"importNode",document),R(Element,"insertAdjacentHTML");var k=function(t){var n=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},n,{set:function(t){M.push(this),n.set.call(this,t),M.pop()}}))};if(k(Element),k(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var T=new WeakMap,C=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var n=[],i=0;i<arguments.length;++i)n[i]=arguments[i];return n=C.call.apply(C,[this].concat(e(n))),T.set(n,this),n},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var n=window.ElementInternals.prototype,i=n[t];n[t]=function(t){for(var n=[],o=0;o<arguments.length;++o)n[o]=arguments[o];if(o=T.get(this),!0!==v.get(o).formAssociated)throw new DOMException("Failed to execute "+i+" on 'ElementInternals': The target element is not a form-associated custom element.");null==i||i.call.apply(i,[this].concat(e(n)))}}));var S=function(t){var n=a(Array,[].concat(e(t)),this.constructor);return n.h=t,n},x=S,A=Array;if(x.prototype=i(A.prototype),x.prototype.constructor=x,l)l(x,A);else for(var H in A)if("prototype"!=H)if(Object.defineProperties){var L=Object.getOwnPropertyDescriptor(A,H);L&&Object.defineProperty(x,H,L)}else x[H]=A[H];x.u=A.prototype,r.Object.defineProperty(S.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var F=function(t){var n=this,e=new Map;t.forEach((function(t,i){var o=t.getAttribute("name"),r=e.get(o)||[];n[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach((function(t,e){t&&(n[e]=1===t.length?t[0]:new S(t))}))};F.prototype.namedItem=function(t){return this[t]};var W=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=W.get.call(this,[]),e=[],i=(t=n(t)).next();!i.done;i=t.next()){i=i.value;var o=v.get(i);o&&!0!==o.formAssociated||e.push(i)}return new F(e)}})}}}).call("object"==typeof globalThis?globalThis:window);try{window.customElements.define("custom-element",null)}catch(t){const n=window.customElements.define;window.customElements.define=(t,e,i)=>{try{n.bind(window.customElements)(t,e,i)}catch(n){console.warn(t,e,i,n)}}}}();
1
+ !function(){
2
+ /**
3
+ * @license
4
+ * Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
5
+ * This code may only be used under the BSD style license found at
6
+ * http://polymer.github.io/LICENSE.txt
7
+ * The complete set of authors may be found at
8
+ * http://polymer.github.io/AUTHORS.txt
9
+ * The complete set of contributors may be found at
10
+ * http://polymer.github.io/CONTRIBUTORS.txt
11
+ * Code distributed by Google as part of the polymer project is also
12
+ * subject to an additional IP rights grant found at
13
+ * http://polymer.github.io/PATENTS.txt
14
+ *
15
+ * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
16
+ */
17
+ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,s=window.customElements,o=new WeakMap,i=new WeakMap,c=new WeakMap,r=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const r=o.prototype.attributeChangedCallback,a=new Set(o.observedAttributes||[]);w(o,a,r);const l={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:r,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,l),this._definitionsByClass.set(o,l);let h=n.call(s,t);h||(h=d(t),e.call(s,t,h)),this===window.customElements&&(c.set(o,l),l.standInClass=h);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)i.delete(t),m(t,l,!0)}const f=this._whenDefinedPromises.get(t);return void 0!==f&&(f.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){b.push(this),s.upgrade.apply(s,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let n=this._whenDefinedPromises.get(t);return void 0===n&&(n={},n.promise=new Promise((t=>n.resolve=t)),this._whenDefinedPromises.set(t,n)),n.promise}_upgradeWhenDefined(t,e,n){let s=this._awaitingUpgrade.get(e);s||this._awaitingUpgrade.set(e,s=new Set),n?s.add(t):s.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const n=c.get(this.constructor);if(!n)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],n.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),o.set(e,n),e},window.HTMLElement.prototype=t.prototype;const l=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!l(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),l(e)||(e=r.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const n=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(n,HTMLElement.prototype);const s=h(n)||window.customElements,o=s._getDefinition(e);return o?m(n,o):i.set(n,s),n}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},w=(t,e,n)=>{if(0===e.size||void 0===n)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);s.call(this,i,o),n.call(this,i,t,o)}else s.call(this,i,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s),n.call(this,s,t,null)}else o.call(this,s)})},u=e=>{const n=Object.getPrototypeOf(e);if(n!==window.HTMLElement)return n===t||"HTMLElement"===n?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):u(n)},m=(t,e,n=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),o.set(t,e),a=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.observedAttributes.forEach((n=>{t.hasAttribute(n)&&e.attributeChangedCallback.call(t,n,null,t.getAttribute(n))})),n&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=f.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const E=(t,e,n)=>{const s=(n?Object.getPrototypeOf(n):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=s.apply(n||this,arguments);return void 0!==t&&r.set(t,this),b.pop(),t}};E(ShadowRoot,"createElement",document),E(ShadowRoot,"importNode",document),E(Element,"insertAdjacentHTML");const M=(t,e)=>{const n=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...n,set(t){b.push(this),n.set.call(this,t),b.pop()}})};if(M(Element,"innerHTML"),M(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,n=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...n){const s=e.call(this,...n);return t.set(s,this),s},n.forEach((e=>{const n=window.ElementInternals.prototype,s=n[e];n[e]=function(...e){const n=t.get(this);if(!0!==o.get(n).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...e)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class i{constructor(t){const e=new Map;t.forEach(((t,n)=>{const s=t.getAttribute("name"),o=e.get(s)||[];this[+n]=t,o.push(t),e.set(s,o)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new s(t))}))}namedItem(t){return this[t]}}const c=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=c.get.call(this,[]),e=[];for(const n of t){const t=o.get(n);t&&!0!==t.formAssociated||e.push(n)}return new i(e)}})}}try{window.customElements.define("custom-element",null)}catch(t){const e=window.customElements.define;window.customElements.define=(t,n,s)=>{try{e.bind(window.customElements)(t,n,s)}catch(e){console.warn(t,n,s,e)}}}}();
@@ -0,0 +1,553 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
4
+ * This code may only be used under the BSD style license found at
5
+ * http://polymer.github.io/LICENSE.txt
6
+ * The complete set of authors may be found at
7
+ * http://polymer.github.io/AUTHORS.txt
8
+ * The complete set of contributors may be found at
9
+ * http://polymer.github.io/CONTRIBUTORS.txt
10
+ * Code distributed by Google as part of the polymer project is also
11
+ * subject to an additional IP rights grant found at
12
+ * http://polymer.github.io/PATENTS.txt
13
+ *
14
+ * @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
15
+ */
16
+ if (!ShadowRoot.prototype.createElement) {
17
+ const NativeHTMLElement = window.HTMLElement;
18
+ const nativeDefine = window.customElements.define;
19
+ const nativeGet = window.customElements.get;
20
+ const nativeRegistry = window.customElements;
21
+
22
+ const definitionForElement = new WeakMap();
23
+ const pendingRegistryForElement = new WeakMap();
24
+ const globalDefinitionForConstructor = new WeakMap();
25
+ // TBD: This part of the spec proposal is unclear:
26
+ // > Another option for looking up registries is to store an element's
27
+ // > originating registry with the element. The Chrome DOM team was concerned
28
+ // > about the small additional memory overhead on all elements. Looking up the
29
+ // > root avoids this.
30
+ const scopeForElement = new WeakMap();
31
+
32
+ // Constructable CE registry class, which uses the native CE registry to
33
+ // register stand-in elements that can delegate out to CE classes registered
34
+ // in scoped registries
35
+ window.CustomElementRegistry = class {
36
+ constructor() {
37
+ this._definitionsByTag = new Map();
38
+ this._definitionsByClass = new Map();
39
+ this._whenDefinedPromises = new Map();
40
+ this._awaitingUpgrade = new Map();
41
+ }
42
+
43
+ define(tagName, elementClass) {
44
+ tagName = tagName.toLowerCase();
45
+ if (this._getDefinition(tagName) !== undefined) {
46
+ throw new DOMException(
47
+ `Failed to execute 'define' on 'CustomElementRegistry': the name "${tagName}" has already been used with this registry`
48
+ );
49
+ }
50
+ if (this._definitionsByClass.get(elementClass) !== undefined) {
51
+ throw new DOMException(
52
+ `Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry`
53
+ );
54
+ }
55
+ // Since observedAttributes can't change, we approximate it by patching
56
+ // set/removeAttribute on the user's class
57
+ const attributeChangedCallback =
58
+ elementClass.prototype.attributeChangedCallback;
59
+ const observedAttributes = new Set(elementClass.observedAttributes || []);
60
+ patchAttributes(
61
+ elementClass,
62
+ observedAttributes,
63
+ attributeChangedCallback
64
+ );
65
+ // Register the definition
66
+ const definition = {
67
+ elementClass,
68
+ connectedCallback: elementClass.prototype.connectedCallback,
69
+ disconnectedCallback: elementClass.prototype.disconnectedCallback,
70
+ adoptedCallback: elementClass.prototype.adoptedCallback,
71
+ attributeChangedCallback,
72
+ 'formAssociated': elementClass['formAssociated'],
73
+ 'formAssociatedCallback':
74
+ elementClass.prototype['formAssociatedCallback'],
75
+ 'formDisabledCallback': elementClass.prototype['formDisabledCallback'],
76
+ 'formResetCallback': elementClass.prototype['formResetCallback'],
77
+ 'formStateRestoreCallback':
78
+ elementClass.prototype['formStateRestoreCallback'],
79
+ observedAttributes,
80
+ };
81
+ this._definitionsByTag.set(tagName, definition);
82
+ this._definitionsByClass.set(elementClass, definition);
83
+ // Register a stand-in class which will handle the registry lookup & delegation
84
+ let standInClass = nativeGet.call(nativeRegistry, tagName);
85
+ if (!standInClass) {
86
+ standInClass = createStandInElement(tagName);
87
+ nativeDefine.call(nativeRegistry, tagName, standInClass);
88
+ }
89
+ if (this === window.customElements) {
90
+ globalDefinitionForConstructor.set(elementClass, definition);
91
+ definition.standInClass = standInClass;
92
+ }
93
+ // Upgrade any elements created in this scope before define was called
94
+ const awaiting = this._awaitingUpgrade.get(tagName);
95
+ if (awaiting) {
96
+ this._awaitingUpgrade.delete(tagName);
97
+ for (const element of awaiting) {
98
+ pendingRegistryForElement.delete(element);
99
+ customize(element, definition, true);
100
+ }
101
+ }
102
+ // Flush whenDefined callbacks
103
+ const info = this._whenDefinedPromises.get(tagName);
104
+ if (info !== undefined) {
105
+ info.resolve(elementClass);
106
+ this._whenDefinedPromises.delete(tagName);
107
+ }
108
+ return elementClass;
109
+ }
110
+
111
+ upgrade() {
112
+ creationContext.push(this);
113
+ nativeRegistry.upgrade.apply(nativeRegistry, arguments);
114
+ creationContext.pop();
115
+ }
116
+
117
+ get(tagName) {
118
+ const definition = this._definitionsByTag.get(tagName);
119
+ return definition?.elementClass;
120
+ }
121
+
122
+ _getDefinition(tagName) {
123
+ return this._definitionsByTag.get(tagName);
124
+ }
125
+
126
+ whenDefined(tagName) {
127
+ const definition = this._getDefinition(tagName);
128
+ if (definition !== undefined) {
129
+ return Promise.resolve(definition.elementClass);
130
+ }
131
+ let info = this._whenDefinedPromises.get(tagName);
132
+ if (info === undefined) {
133
+ info = {};
134
+ info.promise = new Promise((r) => (info.resolve = r));
135
+ this._whenDefinedPromises.set(tagName, info);
136
+ }
137
+ return info.promise;
138
+ }
139
+
140
+ _upgradeWhenDefined(element, tagName, shouldUpgrade) {
141
+ let awaiting = this._awaitingUpgrade.get(tagName);
142
+ if (!awaiting) {
143
+ this._awaitingUpgrade.set(tagName, (awaiting = new Set()));
144
+ }
145
+ if (shouldUpgrade) {
146
+ awaiting.add(element);
147
+ } else {
148
+ awaiting.delete(element);
149
+ }
150
+ }
151
+ };
152
+
153
+ // User extends this HTMLElement, which returns the CE being upgraded
154
+ let upgradingInstance;
155
+ window.HTMLElement = function HTMLElement() {
156
+ // Upgrading case: the StandInElement constructor was run by the browser's
157
+ // native custom elements and we're in the process of running the
158
+ // "constructor-call trick" on the natively constructed instance, so just
159
+ // return that here
160
+ let instance = upgradingInstance;
161
+ if (instance) {
162
+ upgradingInstance = undefined;
163
+ return instance;
164
+ }
165
+ // Construction case: we need to construct the StandInElement and return
166
+ // it; note the current spec proposal only allows new'ing the constructor
167
+ // of elements registered with the global registry
168
+ const definition = globalDefinitionForConstructor.get(this.constructor);
169
+ if (!definition) {
170
+ throw new TypeError(
171
+ 'Illegal constructor (custom element class must be registered with global customElements registry to be newable)'
172
+ );
173
+ }
174
+ instance = Reflect.construct(
175
+ NativeHTMLElement,
176
+ [],
177
+ definition.standInClass
178
+ );
179
+ Object.setPrototypeOf(instance, this.constructor.prototype);
180
+ definitionForElement.set(instance, definition);
181
+ return instance;
182
+ };
183
+ window.HTMLElement.prototype = NativeHTMLElement.prototype;
184
+
185
+ // Helpers to return the scope for a node where its registry would be located
186
+ const isValidScope = (node) =>
187
+ node === document || node instanceof ShadowRoot;
188
+ const registryForNode = (node) => {
189
+ // TODO: the algorithm for finding the scope is a bit up in the air; assigning
190
+ // a one-time scope at creation time would require walking every tree ever
191
+ // created, which is avoided for now
192
+ let scope = node.getRootNode();
193
+ // If we're not attached to the document (i.e. in a disconnected tree or
194
+ // fragment), we need to get the scope from the creation context; that should
195
+ // be a Document or ShadowRoot, unless it was created via innerHTML
196
+ if (!isValidScope(scope)) {
197
+ const context = creationContext[creationContext.length - 1];
198
+ // When upgrading via registry.upgrade(), the registry itself is put on the
199
+ // creationContext stack
200
+ if (context instanceof CustomElementRegistry) {
201
+ return context;
202
+ }
203
+ // Otherwise, get the root node of the element this was created from
204
+ scope = context.getRootNode();
205
+ // The creation context wasn't a Document or ShadowRoot or in one; this
206
+ // means we're being innerHTML'ed into a disconnected element; for now, we
207
+ // hope that root node was created imperatively, where we stash _its_
208
+ // scopeForElement. Beyond that, we'd need more costly tracking.
209
+ if (!isValidScope(scope)) {
210
+ scope = scopeForElement.get(scope)?.getRootNode() || document;
211
+ }
212
+ }
213
+ return scope.customElements;
214
+ };
215
+
216
+ // Helper to create stand-in element for each tagName registered that delegates
217
+ // out to the registry for the given element
218
+ const createStandInElement = (tagName) => {
219
+ return class ScopedCustomElementBase {
220
+ static get ['formAssociated']() {
221
+ return true;
222
+ }
223
+ constructor() {
224
+ // Create a raw HTMLElement first
225
+ const instance = Reflect.construct(
226
+ NativeHTMLElement,
227
+ [],
228
+ this.constructor
229
+ );
230
+ // We need to install the minimum HTMLElement prototype so that
231
+ // scopeForNode can use DOM API to determine our construction scope;
232
+ // upgrade will eventually install the full CE prototype
233
+ Object.setPrototypeOf(instance, HTMLElement.prototype);
234
+ // Get the node's scope, and its registry (falls back to global registry)
235
+ const registry = registryForNode(instance) || window.customElements;
236
+ const definition = registry._getDefinition(tagName);
237
+ if (definition) {
238
+ customize(instance, definition);
239
+ } else {
240
+ pendingRegistryForElement.set(instance, registry);
241
+ }
242
+ return instance;
243
+ }
244
+
245
+ connectedCallback() {
246
+ const definition = definitionForElement.get(this);
247
+ if (definition) {
248
+ // Delegate out to user callback
249
+ definition.connectedCallback &&
250
+ definition.connectedCallback.apply(this, arguments);
251
+ } else {
252
+ // Register for upgrade when defined (only when connected, so we don't leak)
253
+ pendingRegistryForElement
254
+ .get(this)
255
+ ._upgradeWhenDefined(this, tagName, true);
256
+ }
257
+ }
258
+
259
+ disconnectedCallback() {
260
+ const definition = definitionForElement.get(this);
261
+ if (definition) {
262
+ // Delegate out to user callback
263
+ definition.disconnectedCallback &&
264
+ definition.disconnectedCallback.apply(this, arguments);
265
+ } else {
266
+ // Un-register for upgrade when defined (so we don't leak)
267
+ pendingRegistryForElement
268
+ .get(this)
269
+ ._upgradeWhenDefined(this, tagName, false);
270
+ }
271
+ }
272
+
273
+ adoptedCallback() {
274
+ const definition = definitionForElement.get(this);
275
+ definition?.adoptedCallback?.apply(this, arguments);
276
+ }
277
+
278
+ // Form-associated custom elements lifecycle methods
279
+ ['formAssociatedCallback']() {
280
+ const definition = definitionForElement.get(this);
281
+ if (definition && definition['formAssociated']) {
282
+ definition?.['formAssociatedCallback']?.apply(this, arguments);
283
+ }
284
+ }
285
+
286
+ ['formDisabledCallback']() {
287
+ const definition = definitionForElement.get(this);
288
+ if (definition?.['formAssociated']) {
289
+ definition?.['formDisabledCallback']?.apply(this, arguments);
290
+ }
291
+ }
292
+
293
+ ['formResetCallback']() {
294
+ const definition = definitionForElement.get(this);
295
+ if (definition?.['formAssociated']) {
296
+ definition?.['formResetCallback']?.apply(this, arguments);
297
+ }
298
+ }
299
+
300
+ ['formStateRestoreCallback']() {
301
+ const definition = definitionForElement.get(this);
302
+ if (definition?.['formAssociated']) {
303
+ definition?.['formStateRestoreCallback']?.apply(this, arguments);
304
+ }
305
+ }
306
+
307
+ // no attributeChangedCallback or observedAttributes since these
308
+ // are simulated via setAttribute/removeAttribute patches
309
+ };
310
+ };
311
+
312
+ // Helper to patch CE class setAttribute/getAttribute to implement
313
+ // attributeChangedCallback
314
+ const patchAttributes = (
315
+ elementClass,
316
+ observedAttributes,
317
+ attributeChangedCallback
318
+ ) => {
319
+ if (
320
+ observedAttributes.size === 0 ||
321
+ attributeChangedCallback === undefined
322
+ ) {
323
+ return;
324
+ }
325
+ const setAttribute = elementClass.prototype.setAttribute;
326
+ if (setAttribute) {
327
+ elementClass.prototype.setAttribute = function (n, value) {
328
+ const name = n.toLowerCase();
329
+ if (observedAttributes.has(name)) {
330
+ const old = this.getAttribute(name);
331
+ setAttribute.call(this, name, value);
332
+ attributeChangedCallback.call(this, name, old, value);
333
+ } else {
334
+ setAttribute.call(this, name, value);
335
+ }
336
+ };
337
+ }
338
+ const removeAttribute = elementClass.prototype.removeAttribute;
339
+ if (removeAttribute) {
340
+ elementClass.prototype.removeAttribute = function (n) {
341
+ const name = n.toLowerCase();
342
+ if (observedAttributes.has(name)) {
343
+ const old = this.getAttribute(name);
344
+ removeAttribute.call(this, name);
345
+ attributeChangedCallback.call(this, name, old, null);
346
+ } else {
347
+ removeAttribute.call(this, name);
348
+ }
349
+ };
350
+ }
351
+ };
352
+
353
+ // Helper to patch CE class hierarchy changing those CE classes created before applying the polyfill
354
+ // to make them work with the new patched CustomElementsRegistry
355
+ const patchHTMLElement = (elementClass) => {
356
+ const parentClass = Object.getPrototypeOf(elementClass);
357
+
358
+ if (parentClass !== window.HTMLElement) {
359
+ if (parentClass === NativeHTMLElement || parentClass?.prototype?.constructor?.name === "HTMLElement") {
360
+ return Object.setPrototypeOf(elementClass, window.HTMLElement);
361
+ }
362
+
363
+ return patchHTMLElement(parentClass);
364
+ }
365
+ };
366
+
367
+ // Helper to upgrade an instance with a CE definition using "constructor call trick"
368
+ const customize = (instance, definition, isUpgrade = false) => {
369
+ Object.setPrototypeOf(instance, definition.elementClass.prototype);
370
+ definitionForElement.set(instance, definition);
371
+ upgradingInstance = instance;
372
+ try {
373
+ new definition.elementClass();
374
+ } catch (_) {
375
+ patchHTMLElement(definition.elementClass);
376
+ new definition.elementClass();
377
+ }
378
+ // Approximate observedAttributes from the user class, since the stand-in element had none
379
+ definition.observedAttributes.forEach((attr) => {
380
+ if (instance.hasAttribute(attr)) {
381
+ definition.attributeChangedCallback.call(
382
+ instance,
383
+ attr,
384
+ null,
385
+ instance.getAttribute(attr)
386
+ );
387
+ }
388
+ });
389
+ if (isUpgrade && definition.connectedCallback && instance.isConnected) {
390
+ definition.connectedCallback.call(instance);
391
+ }
392
+ };
393
+
394
+ // Patch attachShadow to set customElements on shadowRoot when provided
395
+ const nativeAttachShadow = Element.prototype.attachShadow;
396
+ Element.prototype.attachShadow = function (init) {
397
+ const shadowRoot = nativeAttachShadow.apply(this, arguments);
398
+ if (init.customElements) {
399
+ shadowRoot.customElements = init.customElements;
400
+ }
401
+ return shadowRoot;
402
+ };
403
+
404
+ // Install scoped creation API on Element & ShadowRoot
405
+ let creationContext = [document];
406
+ const installScopedCreationMethod = (ctor, method, from = undefined) => {
407
+ const native = (from ? Object.getPrototypeOf(from) : ctor.prototype)[
408
+ method
409
+ ];
410
+ ctor.prototype[method] = function () {
411
+ creationContext.push(this);
412
+ const ret = native.apply(from || this, arguments);
413
+ // For disconnected elements, note their creation scope so that e.g.
414
+ // innerHTML into them will use the correct scope; note that
415
+ // insertAdjacentHTML doesn't return an element, but that's fine since
416
+ // it will have a parent that should have a scope
417
+ if (ret !== undefined) {
418
+ scopeForElement.set(ret, this);
419
+ }
420
+ creationContext.pop();
421
+ return ret;
422
+ };
423
+ };
424
+ installScopedCreationMethod(ShadowRoot, 'createElement', document);
425
+ installScopedCreationMethod(ShadowRoot, 'importNode', document);
426
+ installScopedCreationMethod(Element, 'insertAdjacentHTML');
427
+
428
+ // Install scoped innerHTML on Element & ShadowRoot
429
+ const installScopedCreationSetter = (ctor, name) => {
430
+ const descriptor = Object.getOwnPropertyDescriptor(ctor.prototype, name);
431
+ Object.defineProperty(ctor.prototype, name, {
432
+ ...descriptor,
433
+ set(value) {
434
+ creationContext.push(this);
435
+ descriptor.set.call(this, value);
436
+ creationContext.pop();
437
+ },
438
+ });
439
+ };
440
+ installScopedCreationSetter(Element, 'innerHTML');
441
+ installScopedCreationSetter(ShadowRoot, 'innerHTML');
442
+
443
+ // Install global registry
444
+ Object.defineProperty(window, 'customElements', {
445
+ value: new CustomElementRegistry(),
446
+ configurable: true,
447
+ writable: true,
448
+ });
449
+
450
+ if (
451
+ !!window['ElementInternals'] &&
452
+ !!window['ElementInternals'].prototype['setFormValue']
453
+ ) {
454
+ const internalsToHostMap = new WeakMap();
455
+ const attachInternals = HTMLElement.prototype['attachInternals'];
456
+ const methods = [
457
+ 'setFormValue',
458
+ 'setValidity',
459
+ 'checkValidity',
460
+ 'reportValidity',
461
+ ];
462
+
463
+ HTMLElement.prototype['attachInternals'] = function (...args) {
464
+ const internals = attachInternals.call(this, ...args);
465
+ internalsToHostMap.set(internals, this);
466
+ return internals;
467
+ };
468
+
469
+ methods.forEach((method) => {
470
+ const proto = window['ElementInternals'].prototype;
471
+ const originalMethod = proto[method];
472
+
473
+ proto[method] = function (...args) {
474
+ const host = internalsToHostMap.get(this);
475
+ const definition = definitionForElement.get(host);
476
+ if (definition['formAssociated'] === true) {
477
+ originalMethod?.call(this, ...args);
478
+ } else {
479
+ throw new DOMException(
480
+ `Failed to execute ${originalMethod} on 'ElementInternals': The target element is not a form-associated custom element.`
481
+ );
482
+ }
483
+ };
484
+ });
485
+
486
+ // Emulate the native RadioNodeList object
487
+ class RadioNodeList extends Array {
488
+ constructor(elements) {
489
+ super(...elements);
490
+ this._elements = elements;
491
+ }
492
+
493
+ get ['value']() {
494
+ return (
495
+ this._elements.find((element) => element['checked'] === true)
496
+ ?.value || ''
497
+ );
498
+ }
499
+ }
500
+
501
+ // Emulate the native HTMLFormControlsCollection object
502
+ class HTMLFormControlsCollection {
503
+ constructor(elements) {
504
+ const entries = new Map();
505
+ elements.forEach((element, index) => {
506
+ const name = element.getAttribute('name');
507
+ const nameReference = entries.get(name) || [];
508
+ this[+index] = element;
509
+ nameReference.push(element);
510
+ entries.set(name, nameReference);
511
+ });
512
+ this['length'] = elements.length;
513
+ entries.forEach((value, key) => {
514
+ if (!value) return;
515
+ if (value.length === 1) {
516
+ this[key] = value[0];
517
+ } else {
518
+ this[key] = new RadioNodeList(value);
519
+ }
520
+ });
521
+ }
522
+
523
+ ['namedItem'](key) {
524
+ return this[key];
525
+ }
526
+ }
527
+
528
+ // Override the built-in HTMLFormElements.prototype.elements getter
529
+ const formElementsDescriptor = Object.getOwnPropertyDescriptor(
530
+ HTMLFormElement.prototype,
531
+ 'elements'
532
+ );
533
+
534
+ Object.defineProperty(HTMLFormElement.prototype, 'elements', {
535
+ get: function () {
536
+ const nativeElements = formElementsDescriptor.get.call(this, []);
537
+
538
+ const include = [];
539
+
540
+ for (const element of nativeElements) {
541
+ const definition = definitionForElement.get(element);
542
+
543
+ // Only purposefully formAssociated elements or built-ins will feature in elements
544
+ if (!definition || definition['formAssociated'] === true) {
545
+ include.push(element);
546
+ }
547
+ }
548
+
549
+ return new HTMLFormControlsCollection(include);
550
+ },
551
+ });
552
+ }
553
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-wc-utils",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Internal web components tools",
5
5
  "author": "Fluid Topics <devtopics@antidot.net>",
6
6
  "license": "ISC",
@@ -8,15 +8,15 @@
8
8
  "typings": "build/index",
9
9
  "files": [
10
10
  "build/*.ts",
11
- "build/*.js"
11
+ "build/*.js",
12
+ "lib/*"
12
13
  ],
13
14
  "dependencies": {
14
15
  "@lit-labs/scoped-registry-mixin": "1.0.0",
15
- "@reduxjs/toolkit": "^1.6.2",
16
- "@webcomponents/scoped-custom-element-registry": "0.0.5"
16
+ "@reduxjs/toolkit": "^1.6.2"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "lit": "2.1.3"
20
20
  },
21
- "gitHead": "59fc7ad4bb79bb7a36b5edc8217d1279abf471f3"
21
+ "gitHead": "cb05ea190a9302378594a08d3a62a7002e461433"
22
22
  }