@fluid-topics/ft-filterable-table 0.1.15 → 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.
@@ -0,0 +1,1175 @@
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,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,l=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,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,a=new Set(n.observedAttributes||[]);h(n,a,l);const p={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,p),this._definitionsByClass.set(n,p);let c=i.call(o,t);c||(c=d(t),e.call(o,t,c)),this===window.customElements&&(r.set(n,p),p.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,p,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.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 i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const p=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!p(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),p(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),a=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const y=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),v.pop(),t}};y(ShadowRoot,"createElement",document),y(ShadowRoot,"importNode",document),y(Element,"insertAdjacentHTML");const g=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(g(Element,"innerHTML"),g(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,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ft){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class t{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=[]}}
18
+ /**
19
+ * @license
20
+ * Copyright 2017 Google LLC
21
+ * SPDX-License-Identifier: BSD-3-Clause
22
+ */const e=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.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(i){i.createProperty(e.key,t)}};
23
+ /**
24
+ * @license
25
+ * Copyright 2017 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */function i(t){return(i,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,i,o):e(t,i)
28
+ /**
29
+ * @license
30
+ * Copyright 2017 Google LLC
31
+ * SPDX-License-Identifier: BSD-3-Clause
32
+ */}function o(t){return i({...t,state:!0})}
33
+ /**
34
+ * @license
35
+ * Copyright 2017 Google LLC
36
+ * SPDX-License-Identifier: BSD-3-Clause
37
+ */const n=({finisher:t,descriptor:e})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,s=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(s.finisher=function(e){t(e,o)}),s}{const n=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(n,o)}}
38
+ /**
39
+ * @license
40
+ * Copyright 2017 Google LLC
41
+ * SPDX-License-Identifier: BSD-3-Clause
42
+ */;function s(t,e){return n({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
43
+ /**
44
+ * @license
45
+ * Copyright 2021 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */var r;const l=null!=(null===(r=window.HTMLSlotElement)||void 0===r?void 0:r.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));const a=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)}
48
+ /**
49
+ * @license
50
+ * Copyright 2019 Google LLC
51
+ * SPDX-License-Identifier: BSD-3-Clause
52
+ */,p=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),d=new Map;class h{constructor(t,e){if(this._$cssResult$=!0,e!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=d.get(this.cssText);return p&&void 0===t&&(d.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const f=t=>new h("string"==typeof t?t:t+"",c),u=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>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.")})(i)+t[o+1]),t[0]);return new h(i,c)},b=(t,e)=>{p?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=window.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},v=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(t):t
53
+ /**
54
+ * @license
55
+ * Copyright 2017 Google LLC
56
+ * SPDX-License-Identifier: BSD-3-Clause
57
+ */;var y;const g=window.trustedTypes,x=g?g.emptyScript:"",m=window.reactiveElementPolyfillSupport,$={toAttribute(t,e){switch(e){case Boolean:t=t?x:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},w=(t,e)=>e!==t&&(e==e||t==t),O={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:w};class S 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,i)=>{const o=this._$Eh(i,e);void 0!==o&&(this._$Eu.set(o,i),t.push(o))})),t}static createProperty(t,e=O){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||O}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 i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(v(t))}else void 0!==t&&e.push(v(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"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,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.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 b(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,i){this._$AK(t,i)}_$ES(t,e,i=O){var o,n;const s=this.constructor._$Eh(t,i);if(void 0!==s&&!0===i.reflect){const r=(null!==(n=null===(o=i.converter)||void 0===o?void 0:o.toAttribute)&&void 0!==n?n:$.toAttribute)(e,i.type);this._$Ei=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Ei=null}}_$AK(t,e){var i,o,n;const s=this.constructor,r=s._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=s.getPropertyOptions(r),l=t.converter,a=null!==(n=null!==(o=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==o?o:"function"==typeof l?l:null)&&void 0!==n?n:$.fromAttribute;this._$Ei=r,this[r]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,i))):o=!1),!this.isUpdatePending&&o&&(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 i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),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(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}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){}}
58
+ /**
59
+ * @license
60
+ * Copyright 2017 Google LLC
61
+ * SPDX-License-Identifier: BSD-3-Clause
62
+ */
63
+ var k;S.finalized=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==m||m({ReactiveElement:S}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.2.2");const C=globalThis.trustedTypes,E=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,N="?"+R,z=`<${N}>`,M=document,F=(t="")=>M.createComment(t),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,B=t=>{var e;return D(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,T=/>/g,j=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,I=/'/g,P=/"/g,_=/^(?:script|style|textarea|title)$/i,H=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),W=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),K=new WeakMap,V=M.createTreeWalker(M,129,null,!1),X=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=L;for(let e=0;e<i;e++){const i=t[e];let l,a,p=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===L?"!--"===a[1]?r=A:void 0!==a[1]?r=T:void 0!==a[2]?(_.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=j):void 0!==a[3]&&(r=j):r===j?">"===a[0]?(r=null!=n?n:L,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?j:'"'===a[3]?P:I):r===P||r===I?r=j:r===A||r===T?r=L:(r=j,n=void 0);const d=r===j&&t[e+1].startsWith("/>")?" ":"";s+=r===L?i+z:p>=0?(o.push(l),i.slice(0,p)+"$lit$"+i.slice(p)+R+d):i+R+(-2===p?(o.push(void 0),e):d)}const l=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==E?E.createHTML(l):l,o]};class q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,p]=X(t,e);if(this.el=q.createElement(a,i),V.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=V.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(R)){const i=p[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(R),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?tt:"?"===e[1]?it:"@"===e[1]?ot:Q})}else l.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(_.test(o.tagName)){const t=o.textContent.split(R),e=t.length-1;if(e>0){o.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],F()),V.nextNode(),l.push({type:2,index:++n});o.append(t[e],F())}}}else if(8===o.nodeType)if(o.data===N)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(R,t+1));)l.push({type:7,index:n}),t+=R.length-1}n++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function J(t,e,i=t,o){var n,s,r,l;if(e===W)return e;let a=void 0!==o?null===(n=i._$Cl)||void 0===n?void 0:n[o]:i._$Cu;const p=U(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(r=(l=i)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:i._$Cu=a),void 0!==a&&(e=J(t,a._$AS(t,e.values),a,o)),e}class Y{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:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);V.currentNode=n;let s=V.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new G(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new nt(s,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=V.nextNode(),r++)}return n}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class G{constructor(t,e,i,o){var n;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=J(this,t,e),U(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==W&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):B(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!==Z&&U(this._$AH)?this._$AA.nextSibling.data=t:this.S(M.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=q.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new Y(n,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new q(t)),e}A(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new G(this.M(F()),this.M(F()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.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 Q{constructor(t,e,i,o,n){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=J(this,t,e,0),s=!U(t)||t!==this._$AH&&t!==W,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=J(this,o[i+r],e,r),l===W&&(l=this._$AH[r]),s||(s=!U(l)||l!==this._$AH[r]),l===Z?t=Z:t!==Z&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.k(t)}k(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===Z?void 0:t}}const et=C?C.emptyScript:"";class it extends Q{constructor(){super(...arguments),this.type=4}k(t){t&&t!==Z?this.element.setAttribute(this.name,et):this.element.removeAttribute(this.name)}}class ot extends Q{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=J(this,t,e,0))&&void 0!==i?i:Z)===W)return;const o=this._$AH,n=t===Z&&o!==Z||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==Z&&(o===Z||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){J(this,t)}}const st={P:"$lit$",V:R,L:N,I:1,N:X,R:Y,D:B,j:J,H:G,O:Q,F:it,B:ot,W:tt,Z:nt},rt=window.litHtmlPolyfillSupport;
64
+ /**
65
+ * @license
66
+ * Copyright 2017 Google LLC
67
+ * SPDX-License-Identifier: BSD-3-Clause
68
+ */
69
+ var lt,at;null==rt||rt(q,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k:globalThis.litHtmlVersions=[]).push("2.1.3");class pt extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var o,n;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new G(e.insertBefore(F(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(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 W}}pt.finalized=!0,pt._$litElement$=!0,null===(lt=globalThis.litElementHydrateSupport)||void 0===lt||lt.call(globalThis,{LitElement:pt});const ct=globalThis.litElementPolyfillSupport;null==ct||ct({LitElement:pt}),(null!==(at=globalThis.litElementVersions)&&void 0!==at?at:globalThis.litElementVersions=[]).push("3.1.2");class dt{constructor(t,e,i,o,n){this.name=t,this.category=e,this.fallbackVariable=i,this.defaultValue=o,this.context=n,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,i){return new dt(t,e,void 0,i)}static extend(t,e,i){return new dt(t,e.category,e,i)}static external(t,e){return new dt(t.name,t.category,t.fallbackVariable,t.defaultValue,e)}get(t){return u`var(${f(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):f(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()]:[]}}function ht(t,e){return f(`${t.name}: ${e}`)}const ft={colorPrimary:dt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:dt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:dt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:dt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:dt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:dt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:dt.create("--ft-color-error","COLOR","#B00020"),colorOutline:dt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:dt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:dt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:dt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:dt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:dt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:dt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:dt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:dt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:dt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:dt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:dt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:dt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:dt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:dt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:dt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:dt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:dt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:dt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:dt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:dt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:dt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:dt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:dt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:dt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:dt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:dt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:dt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:dt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:dt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:dt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:dt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:dt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:dt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:dt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:dt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:dt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.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:dt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:dt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:dt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:dt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:dt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:dt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:dt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:dt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
70
+ /**
71
+ * @license
72
+ * Copyright 2021 Google LLC
73
+ * SPDX-License-Identifier: BSD-3-Clause
74
+ */class ut extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return b(n,this.constructor.elementStyles),n}}}(pt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),H`
75
+ ${t.map((t=>H`
76
+ <style>${t}</style>
77
+ `))}
78
+ ${this.getTemplate()}
79
+ `}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const bt=u`
80
+ .ft-no-text-select {
81
+ -webkit-touch-callout: none;
82
+ -webkit-user-select: none;
83
+ -khtml-user-select: none;
84
+ -moz-user-select: none;
85
+ -ms-user-select: none;
86
+ user-select: none;
87
+ }
88
+ `;var vt,yt,gt;const xt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(gt=null===(yt=null===(vt=window.safari)||void 0===vt?void 0:vt.pushNotification)||void 0===yt?void 0:yt.toString())&&void 0!==gt?gt:""),mt=1,$t=2,wt=t=>(...e)=>({_$litDirective$:t,values:e});
89
+ /**
90
+ * @license
91
+ * Copyright 2017 Google LLC
92
+ * SPDX-License-Identifier: BSD-3-Clause
93
+ */class Ot{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
94
+ /**
95
+ * @license
96
+ * Copyright 2020 Google LLC
97
+ * SPDX-License-Identifier: BSD-3-Clause
98
+ */const{H:St}=st,kt=()=>document.createComment(""),Ct=(t,e,i)=>{var o;const n=t._$AA.parentNode,s=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(kt(),s),o=n.insertBefore(kt(),s);i=new St(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,l=r!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==s||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,s),t=e}}}return i},Et=(t,e,i=t)=>(t._$AI(e,i),t),Rt={},Nt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},zt=(t,e,i)=>{const o=new Map;for(let n=e;n<=i;n++)o.set(t[n],n);return o},Mt=wt(class extends Ot{constructor(t){if(super(t),t.type!==$t)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const n=[],s=[];let r=0;for(const e of t)n[r]=o?o(e,r):r,s[r]=i(e,r),r++;return{values:s,keys:n}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var n;const s=(t=>t._$AH)(t),{values:r,keys:l}=this.dt(e,i,o);if(!Array.isArray(s))return this.at=l,r;const a=null!==(n=this.at)&&void 0!==n?n:this.at=[],p=[];let c,d,h=0,f=s.length-1,u=0,b=r.length-1;for(;h<=f&&u<=b;)if(null===s[h])h++;else if(null===s[f])f--;else if(a[h]===l[u])p[u]=Et(s[h],r[u]),h++,u++;else if(a[f]===l[b])p[b]=Et(s[f],r[b]),f--,b--;else if(a[h]===l[b])p[b]=Et(s[h],r[b]),Ct(t,p[b+1],s[h]),h++,b--;else if(a[f]===l[u])p[u]=Et(s[f],r[u]),Ct(t,s[h],s[f]),f--,u++;else if(void 0===c&&(c=zt(l,u,b),d=zt(a,h,f)),c.has(a[h]))if(c.has(a[f])){const e=d.get(l[u]),i=void 0!==e?s[e]:null;if(null===i){const e=Ct(t,s[h]);Et(e,r[u]),p[u]=e}else p[u]=Et(i,r[u]),Ct(t,s[h],i),s[e]=null;u++}else Nt(s[f]),f--;else Nt(s[h]),h++;for(;u<=b;){const e=Ct(t,p[b+1]);Et(e,r[u]),p[u++]=e}for(;h<=f;){const t=s[h++];null!==t&&Nt(t)}return this.at=l,((t,e=Rt)=>{t._$AH=e})(t,p),W}});
99
+ /**
100
+ * @license
101
+ * Copyright 2017 Google LLC
102
+ * SPDX-License-Identifier: BSD-3-Clause
103
+ */
104
+ /**
105
+ * @license
106
+ * Copyright 2017 Google LLC
107
+ * SPDX-License-Identifier: BSD-3-Clause
108
+ */
109
+ class Ft extends Ot{constructor(t){if(super(t),this.it=Z,t.type!==$t)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||null==t)return this.vt=void 0,this.it=t;if(t===W)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:[]}}}Ft.directiveName="unsafeHTML",Ft.resultType=1;const Ut=wt(Ft),Dt=wt(class extends Ot{constructor(t){var e;if(super(t),t.type!==mt||"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 i,o;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===(i=this.et)||void 0===i?void 0:i.has(t))&&this.st.add(t);return this.render(e)}const n=t.element.classList;this.st.forEach((t=>{t in e||(n.remove(t),this.st.delete(t))}));for(const t in e){const i=!!e[t];i===this.st.has(t)||(null===(o=this.et)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.st.add(t)):(n.remove(t),this.st.delete(t)))}return W}}),Bt=t=>({_$litStatic$:t}),Lt=new Map,At=(t=>(e,...i)=>{var o;const n=i.length;let s,r;const l=[],a=[];let p,c=0,d=!1;for(;c<n;){for(p=e[c];c<n&&void 0!==(r=i[c],s=null===(o=r)||void 0===o?void 0:o._$litStatic$);)p+=s+e[++c],d=!0;a.push(r),l.push(p),c++}if(c===n&&l.push(e[n]),d){const t=l.join("$$lit$$");void 0===(e=Lt.get(t))&&(l.raw=l,Lt.set(t,e=l)),i=a}return t(e,...i)})(H);
110
+ /**
111
+ * @license
112
+ * Copyright 2018 Google LLC
113
+ * SPDX-License-Identifier: BSD-3-Clause
114
+ */var Tt,jt=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Tt||(Tt={}));const It=dt.extend("--ft-typography-font-family",ft.titleFont),Pt=dt.extend("--ft-typography-font-family",ft.contentFont),_t={fontFamily:Pt,fontSize:dt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:dt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:dt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:dt.create("--ft-typography-line-height","SIZE","24px"),textTransform:dt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ht=dt.extend("--ft-typography-title-font-family",It),Wt=dt.extend("--ft-typography-title-font-size",_t.fontSize,"20px"),Zt=dt.extend("--ft-typography-title-font-weight",_t.fontWeight,"normal"),Kt=dt.extend("--ft-typography-title-letter-spacing",_t.letterSpacing,"0.15px"),Vt=dt.extend("--ft-typography-title-line-height",_t.lineHeight,"24px"),Xt=dt.extend("--ft-typography-title-text-transform",_t.textTransform,"inherit"),qt=dt.extend("--ft-typography-title-dense-font-family",It),Jt=dt.extend("--ft-typography-title-dense-font-size",_t.fontSize,"14px"),Yt=dt.extend("--ft-typography-title-dense-font-weight",_t.fontWeight,"normal"),Gt=dt.extend("--ft-typography-title-dense-letter-spacing",_t.letterSpacing,"0.105px"),Qt=dt.extend("--ft-typography-title-dense-line-height",_t.lineHeight,"24px"),te=dt.extend("--ft-typography-title-dense-text-transform",_t.textTransform,"inherit"),ee=dt.extend("--ft-typography-subtitle1-font-family",Pt),ie=dt.extend("--ft-typography-subtitle1-font-size",_t.fontSize,"16px"),oe=dt.extend("--ft-typography-subtitle1-font-weight",_t.fontWeight,"600"),ne=dt.extend("--ft-typography-subtitle1-letter-spacing",_t.letterSpacing,"0.144px"),se=dt.extend("--ft-typography-subtitle1-line-height",_t.lineHeight,"24px"),re=dt.extend("--ft-typography-subtitle1-text-transform",_t.textTransform,"inherit"),le=dt.extend("--ft-typography-subtitle2-font-family",Pt),ae=dt.extend("--ft-typography-subtitle2-font-size",_t.fontSize,"14px"),pe=dt.extend("--ft-typography-subtitle2-font-weight",_t.fontWeight,"normal"),ce=dt.extend("--ft-typography-subtitle2-letter-spacing",_t.letterSpacing,"0.098px"),de=dt.extend("--ft-typography-subtitle2-line-height",_t.lineHeight,"24px"),he=dt.extend("--ft-typography-subtitle2-text-transform",_t.textTransform,"inherit"),fe={fontFamily:dt.extend("--ft-typography-body1-font-family",Pt),fontSize:dt.extend("--ft-typography-body1-font-size",_t.fontSize,"16px"),fontWeight:dt.extend("--ft-typography-body1-font-weight",_t.fontWeight,"normal"),letterSpacing:dt.extend("--ft-typography-body1-letter-spacing",_t.letterSpacing,"0.496px"),lineHeight:dt.extend("--ft-typography-body1-line-height",_t.lineHeight,"24px"),textTransform:dt.extend("--ft-typography-body1-text-transform",_t.textTransform,"inherit")},ue=dt.extend("--ft-typography-body2-font-family",Pt),be=dt.extend("--ft-typography-body2-font-size",_t.fontSize,"14px"),ve=dt.extend("--ft-typography-body2-font-weight",_t.fontWeight,"normal"),ye=dt.extend("--ft-typography-body2-letter-spacing",_t.letterSpacing,"0.252px"),ge=dt.extend("--ft-typography-body2-line-height",_t.lineHeight,"20px"),xe=dt.extend("--ft-typography-body2-text-transform",_t.textTransform,"inherit"),me={fontFamily:dt.extend("--ft-typography-caption-font-family",Pt),fontSize:dt.extend("--ft-typography-caption-font-size",_t.fontSize,"12px"),fontWeight:dt.extend("--ft-typography-caption-font-weight",_t.fontWeight,"normal"),letterSpacing:dt.extend("--ft-typography-caption-letter-spacing",_t.letterSpacing,"0.396px"),lineHeight:dt.extend("--ft-typography-caption-line-height",_t.lineHeight,"16px"),textTransform:dt.extend("--ft-typography-caption-text-transform",_t.textTransform,"inherit")},$e=dt.extend("--ft-typography-breadcrumb-font-family",Pt),we=dt.extend("--ft-typography-breadcrumb-font-size",_t.fontSize,"10px"),Oe=dt.extend("--ft-typography-breadcrumb-font-weight",_t.fontWeight,"normal"),Se=dt.extend("--ft-typography-breadcrumb-letter-spacing",_t.letterSpacing,"0.33px"),ke=dt.extend("--ft-typography-breadcrumb-line-height",_t.lineHeight,"16px"),Ce=dt.extend("--ft-typography-breadcrumb-text-transform",_t.textTransform,"inherit"),Ee=dt.extend("--ft-typography-overline-font-family",Pt),Re=dt.extend("--ft-typography-overline-font-size",_t.fontSize,"10px"),Ne=dt.extend("--ft-typography-overline-font-weight",_t.fontWeight,"normal"),ze=dt.extend("--ft-typography-overline-letter-spacing",_t.letterSpacing,"1.5px"),Me=dt.extend("--ft-typography-overline-line-height",_t.lineHeight,"16px"),Fe=dt.extend("--ft-typography-overline-text-transform",_t.textTransform,"uppercase"),Ue={fontFamily:dt.extend("--ft-typography-button-font-family",Pt),fontSize:dt.extend("--ft-typography-button-font-size",_t.fontSize,"14px"),fontWeight:dt.extend("--ft-typography-button-font-weight",_t.fontWeight,"600"),letterSpacing:dt.extend("--ft-typography-button-letter-spacing",_t.letterSpacing,"1.246px"),lineHeight:dt.extend("--ft-typography-button-line-height",_t.lineHeight,"16px"),textTransform:dt.extend("--ft-typography-button-text-transform",_t.textTransform,"uppercase")},De=u`
115
+ .ft-typography--title {
116
+ font-family: ${Ht};
117
+ font-size: ${Wt};
118
+ font-weight: ${Zt};
119
+ letter-spacing: ${Kt};
120
+ line-height: ${Vt};
121
+ text-transform: ${Xt};
122
+ }
123
+ `,Be=u`
124
+ .ft-typography--title-dense {
125
+ font-family: ${qt};
126
+ font-size: ${Jt};
127
+ font-weight: ${Yt};
128
+ letter-spacing: ${Gt};
129
+ line-height: ${Qt};
130
+ text-transform: ${te};
131
+ }
132
+ `,Le=u`
133
+ .ft-typography--subtitle1 {
134
+ font-family: ${ee};
135
+ font-size: ${ie};
136
+ font-weight: ${oe};
137
+ letter-spacing: ${ne};
138
+ line-height: ${se};
139
+ text-transform: ${re};
140
+ }
141
+ `,Ae=u`
142
+ .ft-typography--subtitle2 {
143
+ font-family: ${le};
144
+ font-size: ${ae};
145
+ font-weight: ${pe};
146
+ letter-spacing: ${ce};
147
+ line-height: ${de};
148
+ text-transform: ${he};
149
+ }
150
+
151
+ `,Te=u`
152
+ .ft-typography--body1 {
153
+ font-family: ${fe.fontFamily};
154
+ font-size: ${fe.fontSize};
155
+ font-weight: ${fe.fontWeight};
156
+ letter-spacing: ${fe.letterSpacing};
157
+ line-height: ${fe.lineHeight};
158
+ text-transform: ${fe.textTransform};
159
+ }
160
+ `,je=u`
161
+ .ft-typography--body2 {
162
+ font-family: ${ue};
163
+ font-size: ${be};
164
+ font-weight: ${ve};
165
+ letter-spacing: ${ye};
166
+ line-height: ${ge};
167
+ text-transform: ${xe};
168
+ }
169
+ `,Ie=u`
170
+ .ft-typography--caption {
171
+ font-family: ${me.fontFamily};
172
+ font-size: ${me.fontSize};
173
+ font-weight: ${me.fontWeight};
174
+ letter-spacing: ${me.letterSpacing};
175
+ line-height: ${me.lineHeight};
176
+ text-transform: ${me.textTransform};
177
+ }
178
+ `,Pe=u`
179
+ .ft-typography--breadcrumb {
180
+ font-family: ${$e};
181
+ font-size: ${we};
182
+ font-weight: ${Oe};
183
+ letter-spacing: ${Se};
184
+ line-height: ${ke};
185
+ text-transform: ${Ce};
186
+ }
187
+ `,_e=u`
188
+ .ft-typography--overline {
189
+ font-family: ${Ee};
190
+ font-size: ${Re};
191
+ font-weight: ${Ne};
192
+ letter-spacing: ${ze};
193
+ line-height: ${Me};
194
+ text-transform: ${Fe};
195
+ }
196
+ `,He=u`
197
+ .ft-typography--button {
198
+ font-family: ${Ue.fontFamily};
199
+ font-size: ${Ue.fontSize};
200
+ font-weight: ${Ue.fontWeight};
201
+ letter-spacing: ${Ue.letterSpacing};
202
+ line-height: ${Ue.lineHeight};
203
+ text-transform: ${Ue.textTransform};
204
+ }
205
+ `;class We extends ut{constructor(){super(...arguments),this.variant=Tt.body1}render(){return this.element?At`
206
+ <${Bt(this.element)}
207
+ class="ft-typography ft-typography--${this.variant}">
208
+ <slot></slot>
209
+ </${Bt(this.element)}>
210
+ `:At`
211
+ <slot class="ft-typography ft-typography--${this.variant}"></slot>
212
+ `}}We.styles=[De,Be,Le,Ae,Te,je,Ie,Pe,_e,He,u`
213
+ .ft-typography {
214
+ vertical-align: inherit;
215
+ }
216
+ `],jt([i()],We.prototype,"element",void 0),jt([i()],We.prototype,"variant",void 0),a("ft-typography")(We);var Ze=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const Ke={fontSize:dt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:dt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:dt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:dt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:dt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:dt.extend("--ft-input-label-border-color",ft.colorOutline),textColor:dt.extend("--ft-input-label-text-color",ft.colorOnSurfaceMedium),disabledTextColor:dt.extend("--ft-input-label-disabled-text-color",ft.colorOnSurfaceDisabled),colorSurface:dt.external(ft.colorSurface,"Design system"),borderRadiusS:dt.external(ft.borderRadiusS,"Design system")};class Ve extends ut{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return H`
217
+ <div class="${Dt(t)}">
218
+ ${this.text?H`
219
+ <div class="ft-input-label--text ft-typography--caption">
220
+ <span class="ft-input-label--floating-text">${this.text}</span>
221
+ <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
222
+ </div>
223
+ `:null}
224
+ </div>
225
+ `}}Ve.elementDefinitions={},Ve.styles=[Ie,u`
226
+ .ft-input-label {
227
+ position: absolute;
228
+ inset: 0;
229
+ display: flex;
230
+ }
231
+
232
+ .ft-input-label {
233
+ border-color: ${Ke.borderColor};
234
+ }
235
+
236
+ .ft-input-label:before,
237
+ .ft-input-label:after {
238
+ content: "";
239
+ display: flex;
240
+ border-bottom-width: 1px;
241
+ border-bottom-style: solid;
242
+ border-color: inherit;
243
+ }
244
+
245
+ .ft-input-label:before {
246
+ width: ${Ke.horizontalSpacing};
247
+ flex-shrink: 0;
248
+ }
249
+
250
+ .ft-input-label:after {
251
+ flex-grow: 1;
252
+ flex-shrink: 1;
253
+ }
254
+
255
+ .ft-input-label--text {
256
+ display: flex;
257
+ flex-shrink: 1;
258
+ position: relative;
259
+ border-bottom-width: 1px;
260
+ border-bottom-style: solid;
261
+ border-color: inherit;
262
+ color: ${Ke.textColor};
263
+ transition: font-size 250ms, line-height 250ms, color 250ms;
264
+ ${ht(me.fontSize,Ke.fontSize)};
265
+ ${ht(me.lineHeight,Ke.fontSize)};
266
+ }
267
+
268
+ .ft-input-label--disabled .ft-input-label--text {
269
+ color: ${Ke.disabledTextColor};
270
+ }
271
+
272
+ .ft-input-label--hidden-text {
273
+ padding: 0 4px;
274
+ opacity: 0;
275
+ }
276
+
277
+ .ft-input-label--floating-text {
278
+ position: absolute;
279
+ top: calc(50% - var(--ft-typography-caption-line-height) / 2);
280
+ transition: top 250ms;
281
+ width: calc(100% - 8px);
282
+ overflow: hidden;
283
+ white-space: nowrap;
284
+ text-overflow: ellipsis;
285
+ padding: ${Ke.verticalSpacing} 4px;
286
+ margin: calc(${Ke.verticalSpacing} * -1) 0;
287
+ }
288
+
289
+ .ft-input-label--raised .ft-input-label--text {
290
+ ${ht(me.fontSize,Ke.raisedFontSize)};
291
+ ${ht(me.lineHeight,Ke.raisedFontSize)};
292
+ }
293
+
294
+ .ft-input-label--raised .ft-input-label--floating-text {
295
+ top: ${Ke.verticalSpacing};
296
+ }
297
+
298
+ .ft-input-label--outlined .ft-input-label--text,
299
+ .ft-input-label--outlined:before,
300
+ .ft-input-label--outlined:after {
301
+ border-top-width: 1px;
302
+ border-top-style: solid;
303
+ }
304
+
305
+ .ft-input-label--outlined:before {
306
+ border-left-width: 1px;
307
+ border-left-style: solid;
308
+ border-radius: ${Ke.borderRadiusS} 0 0 ${Ke.borderRadiusS};
309
+ }
310
+
311
+ .ft-input-label--outlined:after {
312
+ border-right-width: 1px;
313
+ border-right-style: solid;
314
+ border-radius: 0 ${Ke.borderRadiusS} ${Ke.borderRadiusS} 0;
315
+ }
316
+
317
+ .ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
318
+ padding: 2px 4px;
319
+ z-index: ${Ke.raisedZIndex};
320
+ background-color: ${Ke.colorSurface};
321
+ border-radius: ${Ke.borderRadiusS};
322
+ top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
323
+ }
324
+
325
+ .ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
326
+ border-top: none;
327
+ }
328
+ `],Ze([i({type:String})],Ve.prototype,"text",void 0),Ze([i({type:Boolean})],Ve.prototype,"raised",void 0),Ze([i({type:Boolean})],Ve.prototype,"outlined",void 0),Ze([i({type:Boolean})],Ve.prototype,"disabled",void 0),a("ft-input-label")(Ve);var Xe=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const qe={color:dt.extend("--ft-ripple-color",ft.colorContent),primaryColor:dt.extend("--ft-ripple-primary-color",dt.extend("--ft-ripple-color",ft.colorPrimary)),secondaryColor:dt.extend("--ft-ripple-secondary-color",dt.extend("--ft-ripple-color",ft.colorSecondary)),opacityContentOnSurfacePressed:dt.external(ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:dt.external(ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:dt.external(ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:dt.external(ft.opacityContentOnSurfaceSelected,"Design system")};class Je extends ut{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return H`
329
+ <style>
330
+ .ft-ripple .ft-ripple--effect,
331
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
332
+ width: ${this.rippleSize}px;
333
+ height: ${this.rippleSize}px;
334
+ }
335
+
336
+ .ft-ripple .ft-ripple--effect {
337
+ left: ${this.originX}px;
338
+ top: ${this.originY}px;
339
+ }
340
+ </style>
341
+ <div class="${Dt(t)}">
342
+ <div class="ft-ripple--background"></div>
343
+ <div class="ft-ripple--effect"></div>
344
+ </div>
345
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Je.elementDefinitions={},Je.styles=u`
346
+ :host {
347
+ display: contents;
348
+ }
349
+
350
+ .ft-ripple {
351
+ position: absolute;
352
+ inset: 0;
353
+ pointer-events: none;
354
+ }
355
+
356
+ .ft-ripple:not(.ft-ripple--unbounded) {
357
+ overflow: hidden;
358
+ }
359
+
360
+ .ft-ripple .ft-ripple--background,
361
+ .ft-ripple .ft-ripple--effect {
362
+ position: absolute;
363
+ opacity: 0;
364
+ background-color: ${qe.color};
365
+ }
366
+
367
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background,
368
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
369
+ background-color: ${qe.secondaryColor};
370
+ }
371
+
372
+ .ft-ripple.ft-ripple--primary .ft-ripple--background,
373
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
374
+ background-color: ${qe.primaryColor};
375
+ }
376
+
377
+ .ft-ripple .ft-ripple--background {
378
+ top: 0;
379
+ left: 0;
380
+ height: 100%;
381
+ width: 100%;
382
+ }
383
+
384
+ .ft-ripple .ft-ripple--effect,
385
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
386
+ border-radius: 50%;
387
+ }
388
+
389
+ .ft-ripple .ft-ripple--effect {
390
+ transform: translate(-50%, -50%) scale(0.15);
391
+ transition: transform 300ms ease, opacity 75ms linear;
392
+ }
393
+
394
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
395
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
396
+ left: 50%;
397
+ top: 50%;
398
+ }
399
+
400
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
401
+ transform: translate(-50%, -50%);
402
+ }
403
+
404
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
405
+ opacity: ${qe.opacityContentOnSurfaceHover};
406
+ }
407
+
408
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
409
+ opacity: ${qe.opacityContentOnSurfaceSelected};
410
+ }
411
+
412
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
413
+ opacity: ${qe.opacityContentOnSurfaceFocused};
414
+ }
415
+
416
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
417
+ opacity: ${qe.opacityContentOnSurfacePressed};
418
+ transform: translate(-50%, -50%) scale(1);
419
+ }
420
+ `,Xe([i({type:Boolean})],Je.prototype,"primary",void 0),Xe([i({type:Boolean})],Je.prototype,"secondary",void 0),Xe([i({type:Boolean})],Je.prototype,"unbounded",void 0),Xe([i({type:Boolean})],Je.prototype,"activated",void 0),Xe([i({type:Boolean})],Je.prototype,"selected",void 0),Xe([i({type:Boolean})],Je.prototype,"disabled",void 0),Xe([o()],Je.prototype,"hovered",void 0),Xe([o()],Je.prototype,"focused",void 0),Xe([o()],Je.prototype,"pressed",void 0),Xe([o()],Je.prototype,"rippling",void 0),Xe([o()],Je.prototype,"rippleSize",void 0),Xe([o()],Je.prototype,"originX",void 0),Xe([o()],Je.prototype,"originY",void 0),Xe([s(".ft-ripple")],Je.prototype,"ripple",void 0),Xe([s(".ft-ripple--effect")],Je.prototype,"rippleEffect",void 0),a("ft-ripple")(Je);
421
+ /**
422
+ * @license
423
+ * Copyright 2021 Google LLC
424
+ * SPDX-LIcense-Identifier: Apache-2.0
425
+ */
426
+ const Ye=u`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
427
+ /**
428
+ * @license
429
+ * Copyright 2018 Google LLC
430
+ * SPDX-License-Identifier: Apache-2.0
431
+ */;let Ge=class extends pt{render(){return H`<span><slot></slot></span>`}};Ge.styles=[Ye],Ge=
432
+ /*! *****************************************************************************
433
+ Copyright (c) Microsoft Corporation.
434
+
435
+ Permission to use, copy, modify, and/or distribute this software for any
436
+ purpose with or without fee is hereby granted.
437
+
438
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
439
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
440
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
441
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
442
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
443
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
444
+ PERFORMANCE OF THIS SOFTWARE.
445
+ ***************************************************************************** */
446
+ function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r}([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){window.customElements.define(t,e)}}})(t,e))("mwc-icon")],Ge);var Qe=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ti extends ut{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return H``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}ti.elementDefinitions={},Qe([i({type:String})],ti.prototype,"label",void 0),Qe([i({type:Object,converter:t=>t})],ti.prototype,"value",void 0),Qe([i({type:Boolean,reflect:!0})],ti.prototype,"selected",void 0);const ei={labelSize:dt.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:dt.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:dt.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:dt.extend("--ft-select-selected-option-color",ft.colorOnSurface),helperColor:dt.extend("--ft-select-helper-color",ft.colorOnSurfaceMedium),optionsColor:dt.extend("--ft-select-options-color",ft.colorOnSurface),optionsZIndex:dt.create("--ft-select-options-z-index","NUMBER","2"),colorSurface:dt.external(ft.colorSurface,"Design system"),colorOnSurfaceDisabled:dt.external(ft.colorOnSurfaceDisabled,"Design system"),colorPrimary:dt.external(ft.colorPrimary,"Design system"),borderRadiusS:dt.external(ft.borderRadiusS,"Design system"),elevation02:dt.external(ft.elevation02,"Design system")};class ii extends ut{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,i,o,n;let s=!this.disabled&&this.optionsDisplayed&&this.hasOptions,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":s,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label};return H`
447
+ <div class="${Dt(a)}" part="container">
448
+ <div class="ft-select--main-panel" part="main-panel">
449
+ <ft-input-label text="${this.label}"
450
+ part="label"
451
+ ?disabled=${r}
452
+ ?outlined=${this.outlined}
453
+ ?raised=${l||s}
454
+ ></ft-input-label>
455
+ <div class="ft-select--input-panel"
456
+ part="selected-value"
457
+ tabindex="${r?"-1":"0"}"
458
+ @click=${()=>{this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=this.optionsDisplayed}}
459
+ @keydown=${this.onMainPanelKeyDown}
460
+ aria-label="${this.label}"
461
+ aria-haspopup="listbox"
462
+ aria-expanded="${s}">
463
+ <ft-ripple ?disabled=${r} ?activated=${!this.outlined}></ft-ripple>
464
+ <ft-typography variant="body1" class="ft-select--selected-option">
465
+ ${null!==(n=null===(o=this.selectedOption)||void 0===o?void 0:o.label)&&void 0!==n?n:""}
466
+ </ft-typography>
467
+ <mwc-icon>${s?"expand_less":"expand_more"}</mwc-icon>
468
+ </div>
469
+ <div class="ft-select--options"
470
+ part="options"
471
+ @keydown=${this.onOptionsKeyDown}
472
+ innerrole="listbox">
473
+ ${Mt(this.options,(t=>t.value),(t=>this.renderOption(t)))}
474
+ </div>
475
+ </div>
476
+ ${this.helper?H`
477
+ <ft-typography class="ft-select--helper-text" variant="caption">${this.helper}
478
+ </ft-typography>`:void 0}
479
+ </div>
480
+ <slot @slotchange=${this.updateOptionsFromSlot}
481
+ @option-change=${this.updateOptionsFromSlot}
482
+ ></slot>
483
+ `}renderOption(t){let e=this.selectedOption===t;return H`
484
+ <div class="${Dt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
485
+ part="option"
486
+ tabindex="0"
487
+ @keydown=${e=>this.onOptionKeyDown(e,t)}
488
+ @click=${()=>this.selectOption(t)}>
489
+ <ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
490
+ ${t.label}
491
+ </div>
492
+ `}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,n,s;let r;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),r=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),r=null!==(s=null===(n=this.focusedOption)||void 0===n?void 0:n.nextElementSibling)&&void 0!==s?s:this.firstOption}null==r||r.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}ii.elementDefinitions={"ft-input-label":Ve,"ft-typography":We,"ft-ripple":Je,"mwc-icon":Ge},ii.styles=[je,Ie,u`
493
+ *:focus {
494
+ outline: none;
495
+ }
496
+
497
+ .ft-select {
498
+ display: flex;
499
+ flex-direction: column;
500
+ align-items: stretch;
501
+ }
502
+
503
+ .ft-select--main-panel {
504
+ position: relative;
505
+ display: flex;
506
+ height: calc(4 * ${ei.verticalSpacing} + ${ei.labelSize} + ${ei.selectedOptionSize});
507
+ }
508
+
509
+ .ft-select--input-panel {
510
+ flex-grow: 1;
511
+ position: relative;
512
+ display: flex;
513
+ align-items: center;
514
+ overflow: hidden;
515
+ padding-left: 16px;
516
+ padding-right: 8px;
517
+ gap: 8px;
518
+ color: ${ei.selectedOptionColor};
519
+ ${ht(qe.color,ei.selectedOptionColor)};
520
+ }
521
+
522
+ .ft-select--input-panel,
523
+ .ft-select--option {
524
+ ${ht(qe.opacityContentOnSurfaceHover,"0.08")};
525
+ ${ht(qe.opacityContentOnSurfacePressed,"0.04")};
526
+ }
527
+
528
+ .ft-select--disabled .ft-select--input-panel,
529
+ .ft-select--disabled .ft-select--option {
530
+ color: ${ei.colorOnSurfaceDisabled};
531
+ }
532
+
533
+ .ft-select:not(.ft-select--disabled) .ft-select--input-panel,
534
+ .ft-select:not(.ft-select--disabled) .ft-select--option {
535
+ cursor: pointer;
536
+ }
537
+
538
+ ft-input-label {
539
+ ${ht(Ke.fontSize,ei.selectedOptionSize)};
540
+ ${ht(Ke.raisedFontSize,ei.labelSize)};
541
+ ${ht(Ke.verticalSpacing,ei.verticalSpacing)};
542
+ }
543
+
544
+ .ft-select:not(.ft-select--disabled):focus-within mwc-icon {
545
+ color: ${ei.colorPrimary};
546
+ }
547
+
548
+ .ft-select:not(.ft-select--disabled):focus-within ft-input-label {
549
+ ${ht(Ke.borderColor,ei.colorPrimary)};
550
+ ${ht(Ke.textColor,ei.colorPrimary)};
551
+ }
552
+
553
+ .ft-select--selected-option {
554
+ display: block;
555
+ flex-grow: 1;
556
+ flex-shrink: 1;
557
+ overflow: hidden;
558
+ white-space: nowrap;
559
+ text-overflow: ellipsis;
560
+ ${ht(fe.fontSize,ei.selectedOptionSize)};
561
+ ${ht(fe.lineHeight,ei.selectedOptionSize)};
562
+ }
563
+
564
+ mwc-icon {
565
+ flex-shrink: 0;
566
+ }
567
+
568
+ slot {
569
+ display: none;
570
+ }
571
+
572
+ .ft-select--filled .ft-select--input-panel {
573
+ border-radius: ${ei.borderRadiusS} ${ei.borderRadiusS} 0 0;
574
+ }
575
+
576
+ .ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
577
+ align-self: stretch;
578
+ padding-top: calc(${ei.labelSize} + 2 * ${ei.verticalSpacing});
579
+ }
580
+
581
+ .ft-select--outlined .ft-select--input-panel {
582
+ border-radius: ${ei.borderRadiusS};
583
+ }
584
+
585
+ .ft-select--options {
586
+ display: none;
587
+ position: absolute;
588
+ top: 100%;
589
+ left: 0;
590
+ right: 0;
591
+ color: ${ei.optionsColor};
592
+ background: ${ei.colorSurface};
593
+ z-index: ${ei.optionsZIndex};
594
+ box-shadow: ${ei.elevation02};
595
+ }
596
+
597
+ .ft-select--options-displayed .ft-select--options {
598
+ display: block;
599
+ }
600
+
601
+ .ft-select--option {
602
+ position: relative;
603
+ padding: 4px 16px;
604
+ min-height: 32px;
605
+ display: flex;
606
+ align-items: center;
607
+ }
608
+
609
+ .ft-select--helper-text {
610
+ padding: 0 12px 0 16px;
611
+ color: ${ei.helperColor};
612
+ }
613
+ `],Qe([i({type:String})],ii.prototype,"label",void 0),Qe([i({type:String})],ii.prototype,"helper",void 0),Qe([i({type:Boolean})],ii.prototype,"outlined",void 0),Qe([i({type:Boolean})],ii.prototype,"disabled",void 0),Qe([i({type:Array})],ii.prototype,"options",void 0),Qe([o()],ii.prototype,"selectedOption",void 0),Qe([o()],ii.prototype,"optionsDisplayed",void 0),Qe([o()],ii.prototype,"focusOptions",void 0),Qe([s(".ft-select")],ii.prototype,"container",void 0),Qe([s(".ft-select--input-panel")],ii.prototype,"mainPanel",void 0),Qe([s(".ft-select--option:first-child")],ii.prototype,"firstOption",void 0),Qe([s(".ft-select--option:focus")],ii.prototype,"focusedOption",void 0),Qe([s(".ft-select--option.ft-select--option-selected")],ii.prototype,"selectedOptionElement",void 0),Qe([s(".ft-select--option:last-child")],ii.prototype,"lastOption",void 0),Qe([s("slot")],ii.prototype,"optionsSlot",void 0),a("ft-select")(ii),a("ft-select-option")(ti);var oi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const ni={fontSize:dt.create("--ft-text-field-font-size","SIZE","14px"),labelSize:dt.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:dt.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:dt.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:dt.extend("--ft-text-field-helper-color",ft.colorOnSurfaceMedium),colorPrimary:dt.external(ft.colorPrimary,"Design system"),colorOnSurface:dt.external(ft.colorOnSurface,"Design system"),colorOnSurfaceDisabled:dt.external(ft.colorOnSurfaceDisabled,"Design system"),borderRadiusS:dt.external(ft.borderRadiusS,"Design system")};class si extends ut{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.dataList=[],this.focused=!1}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--no-label":!this.label};return H`
614
+ <div class="${Dt(t)}">
615
+ <div class="ft-text-field--main-panel">
616
+ <ft-input-label text="${this.label}"
617
+ ?disabled=${this.disabled}
618
+ ?outlined=${this.outlined}
619
+ ?raised=${this.focused||""!=this.value}
620
+ ></ft-input-label>
621
+ <div class="ft-text-field--input-panel"
622
+ aria-label="${this.label}">
623
+ ${this.outlined?null:H`
624
+ <ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
625
+ `}
626
+ <input type="text"
627
+ class="ft-typography--body1 ft-text-field--input"
628
+ ?disabled=${this.disabled}
629
+ .value=${this.value}
630
+ @change=${this.updateValueFromInputField}
631
+ @keyup=${this.liveUpdateValueFromInputField}
632
+ @focus=${()=>this.focused=!0}
633
+ @focusout=${()=>this.focused=!1}
634
+ list="datalist"
635
+ />
636
+
637
+ <datalist id="datalist">
638
+ ${this.dataList.map((t=>H`
639
+ <option value="${t}"></option>`))}
640
+ </datalist>
641
+
642
+ </div>
643
+ </div>
644
+ ${this.helper?H`
645
+ <ft-typography class="ft-text-field--helper-text" variant="caption">${this.helper}
646
+ </ft-typography>`:void 0}
647
+ </div>
648
+ `}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}updateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.input)||void 0===t?void 0:t.value)||""}}si.elementDefinitions={"ft-input-label":Ve,"ft-ripple":Je,"ft-typography":We},si.styles=[Te,u`
649
+ *:focus {
650
+ outline: none;
651
+ }
652
+
653
+ .ft-text-field {
654
+ display: flex;
655
+ flex-direction: column;
656
+ align-items: stretch;
657
+ }
658
+
659
+ ft-input-label {
660
+ ${ht(Ke.fontSize,ni.fontSize)};
661
+ ${ht(Ke.raisedFontSize,ni.labelSize)};
662
+ ${ht(Ke.verticalSpacing,ni.verticalSpacing)};
663
+ ${ht(Ke.horizontalSpacing,u`calc(${ni.horizontalSpacing} - 4px)`)};
664
+ }
665
+
666
+ .ft-text-field--main-panel {
667
+ position: relative;
668
+ display: flex;
669
+ height: calc(4 * ${ni.verticalSpacing} + ${ni.labelSize} + ${ni.fontSize});
670
+ }
671
+
672
+ .ft-text-field--input-panel {
673
+ flex-grow: 1;
674
+ position: relative;
675
+ display: flex;
676
+ align-items: center;
677
+ overflow: hidden;
678
+ gap: 8px;
679
+ }
680
+
681
+ .ft-text-field--input-panel ft-ripple {
682
+ ${ht(qe.opacityContentOnSurfaceHover,"0.08")};
683
+ ${ht(qe.opacityContentOnSurfacePressed,"0.04")};
684
+ }
685
+
686
+ .ft-text-field--input {
687
+ display: block;
688
+ flex-grow: 1;
689
+ flex-shrink: 1;
690
+ min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
691
+
692
+ ${ht(fe.fontSize,ni.fontSize)};
693
+ ${ht(fe.lineHeight,ni.fontSize)};
694
+ color: ${ni.colorOnSurface};
695
+
696
+ padding: 0 ${ni.horizontalSpacing};
697
+
698
+ border: none;
699
+ background: none;
700
+ }
701
+
702
+ .ft-text-field--input::-webkit-calendar-picker-indicator,
703
+ .ft-text-field--input::-webkit-list-button {
704
+ display: none !important;
705
+ }
706
+
707
+ .ft-text-field--disabled .ft-text-field--input {
708
+ color: ${ni.colorOnSurfaceDisabled};
709
+ }
710
+
711
+ .ft-text-field:not(.ft-text-field--disabled) .ft-text-field--input-panel {
712
+ cursor: pointer;
713
+ }
714
+
715
+ .ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
716
+ ${ht(Ke.borderColor,ni.colorPrimary)};
717
+ ${ht(Ke.textColor,ni.colorPrimary)};
718
+ }
719
+
720
+ .ft-text-field--filled .ft-text-field--input-panel {
721
+ border-radius: ${ni.borderRadiusS} ${ni.borderRadiusS} 0 0;
722
+ }
723
+
724
+ .ft-text-field--filled:not(.ft-text-field--no-label) .ft-text-field--input {
725
+ align-self: stretch;
726
+ padding-bottom: ${ni.verticalSpacing};
727
+ padding-top: calc(${ni.labelSize} + 2 * ${ni.verticalSpacing});
728
+ }
729
+
730
+ .ft-text-field--outlined .ft-text-field--input-panel {
731
+ border-radius: ${ni.borderRadiusS};
732
+ }
733
+
734
+ .ft-text-field--helper-text {
735
+ padding: 0 12px 0 ${ni.horizontalSpacing};
736
+ color: ${ni.helperColor};
737
+ }
738
+ `],oi([i({type:String})],si.prototype,"label",void 0),oi([i({reflect:!0})],si.prototype,"value",void 0),oi([i({type:String})],si.prototype,"helper",void 0),oi([i({type:Boolean})],si.prototype,"outlined",void 0),oi([i({type:Boolean})],si.prototype,"disabled",void 0),oi([s(".ft-text-field--input")],si.prototype,"input",void 0),oi([i({attribute:!1})],si.prototype,"dataList",void 0),oi([o()],si.prototype,"focused",void 0),a("ft-text-field")(si);var ri=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const li=dt.create("--ft-tooltip-distance","SIZE","4px"),ai=dt.create("--ft-tooltip-color","COLOR","#FFFFFF"),pi=dt.create("--ft-tooltip-background-color","COLOR","#666666"),ci=dt.create("--ft-tooltip-z-index","NUMBER","1"),di=dt.external(ft.borderRadiusS,"Design system");class hi extends ut{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new t,this.revealDebouncer=new t}render(){return H`
739
+ <div part="container"
740
+ class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
741
+ @mouseenter=${this.onHover}
742
+ @mouseleave=${this.onOut}
743
+ @focusin=${this.onHover}
744
+ @focusout=${this.onOut}
745
+ @touchstart=${this.onTouch}>
746
+ <div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
747
+ <div part="tooltip-content" class="ft-tooltip--content">
748
+ <ft-typography variant="caption">${this.text}</ft-typography>
749
+ </div>
750
+ </div>
751
+ <slot></slot>
752
+ </div>
753
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=e.height+"px",n.left=o+"px";break;case"left":n.top=i+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=i+"px",n.left=e.width+"px"}n.maxWidth=Math.max(e.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}hi.elementDefinitions={"ft-typography":We},hi.styles=u`
754
+ .ft-tooltip--container {
755
+ display: block;
756
+ position: relative;
757
+ }
758
+
759
+ .ft-tooltip--inline {
760
+ display: inline-block;
761
+ max-width: 100%;
762
+ }
763
+
764
+ .ft-tooltip {
765
+ position: absolute;
766
+ box-sizing: border-box;
767
+ overflow: hidden;
768
+ width: max-content;
769
+ max-width: 150px;
770
+ text-align: center;
771
+ padding: ${li};
772
+ z-index: ${ci};
773
+ }
774
+
775
+ .ft-tooltip--content {
776
+ padding: 4px 8px;
777
+ border-radius: ${di};
778
+ background-color: ${pi};
779
+ color: ${ai};
780
+ top: -500px;
781
+ left: -500px;
782
+ position: relative;
783
+ word-break: break-word;
784
+ }
785
+ `,ri([i()],hi.prototype,"text",void 0),ri([i({type:Boolean})],hi.prototype,"manual",void 0),ri([i({type:Boolean})],hi.prototype,"inline",void 0),ri([i({type:Number})],hi.prototype,"delay",void 0),ri([i()],hi.prototype,"position",void 0),ri([
786
+ /**
787
+ * @license
788
+ * Copyright 2017 Google LLC
789
+ * SPDX-License-Identifier: BSD-3-Clause
790
+ */
791
+ function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return n({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:s,flatten:e,selector:i}):n({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==n?void 0:n.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],hi.prototype,"slotNodes",void 0),ri([s(".ft-tooltip--container")],hi.prototype,"container",void 0),ri([s("slot")],hi.prototype,"target",void 0),ri([s(".ft-tooltip")],hi.prototype,"tooltip",void 0),ri([s(".ft-tooltip--content")],hi.prototype,"tooltipContent",void 0),ri([o()],hi.prototype,"visible",void 0),a("ft-tooltip")(hi);const fi={color:dt.extend("--ft-loader-color",ft.colorPrimary),size:dt.create("--ft-loader-size","SIZE","80px")};class ui extends ut{static get styles(){return u`
792
+ :host {
793
+ line-height: 0;
794
+ }
795
+
796
+ .ft-loader {
797
+ display: inline-block;
798
+ position: relative;
799
+
800
+ width: ${fi.size};
801
+ height: ${fi.size};
802
+ }
803
+
804
+ .ft-loader div {
805
+ position: absolute;
806
+ top: 37.5%;
807
+ width: 25%;
808
+ height: 25%;
809
+ border-radius: 50%;
810
+ background: ${fi.color};
811
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
812
+ }
813
+
814
+ .ft-loader div:nth-child(1) {
815
+ left: 2.5%;
816
+ animation: appear 0.6s infinite;
817
+ }
818
+
819
+ .ft-loader div:nth-child(2) {
820
+ left: 2.5%;
821
+ animation: move 0.6s infinite;
822
+ }
823
+
824
+ .ft-loader div:nth-child(3) {
825
+ left: 37.5%;
826
+ animation: move 0.6s infinite;
827
+ }
828
+
829
+ .ft-loader div:nth-child(4) {
830
+ left: 72.5%;
831
+ animation: disappear 0.6s infinite;
832
+ }
833
+
834
+ @keyframes appear {
835
+ 0% {
836
+ transform: scale(0);
837
+ }
838
+ 100% {
839
+ transform: scale(1);
840
+ }
841
+ }
842
+
843
+ @keyframes disappear {
844
+ 0% {
845
+ transform: scale(1);
846
+ }
847
+ 100% {
848
+ transform: scale(0);
849
+ }
850
+ }
851
+
852
+ @keyframes move {
853
+ 0% {
854
+ transform: translate(0, 0);
855
+ }
856
+ 100% {
857
+ transform: translate(calc(0.35 * ${fi.size}), 0);
858
+ }
859
+ }
860
+ `}render(){return H`
861
+ <div class="ft-loader">
862
+ <div></div>
863
+ <div></div>
864
+ <div></div>
865
+ <div></div>
866
+ </div>
867
+ `}}a("ft-loader")(ui);var bi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};const vi=dt.extend("--ft-button-color",ft.colorPrimary),yi={backgroundColor:dt.extend("--ft-button-background-color",ft.colorSurface),borderRadius:dt.extend("--ft-button-border-radius",ft.borderRadiusL),color:vi,fontSize:dt.extend("--ft-button-font-size",Ue.fontSize),iconSize:dt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:dt.extend("--ft-button-ripple-color",vi),opacityDisabled:dt.external(ft.colorOpacityDisabled,"Design system")},gi=dt.extend("--ft-button-primary-color",dt.extend("--ft-button-color",ft.colorOnPrimary)),xi={backgroundColor:dt.extend("--ft-button-primary-background-color",dt.extend("--ft-button-background-color",ft.colorPrimary)),color:gi,rippleColor:dt.extend("--ft-button-primary-ripple-color",gi)},mi=dt.extend("--ft-button-dense-border-radius",dt.extend("--ft-button-border-radius",ft.borderRadiusM));class $i extends ut{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[bt,u`
868
+ :host {
869
+ display: inline-block;
870
+ max-width: 100%;
871
+ pointer-events: none;
872
+ }
873
+
874
+ button {
875
+ box-shadow: 0px 0px 0px transparent;
876
+ border: 0px solid transparent;
877
+ text-shadow: 0px 0px 0px transparent;
878
+ }
879
+
880
+ button:hover {
881
+ box-shadow: 0px 0px 0px transparent;
882
+ border: 0px solid transparent;
883
+ text-shadow: 0px 0px 0px transparent;
884
+ }
885
+
886
+ button:active {
887
+ outline: none;
888
+ border: none;
889
+ }
890
+
891
+ button:focus {
892
+ outline: 0;
893
+ }
894
+
895
+ .ft-button {
896
+ position: relative;
897
+ display: flex;
898
+ justify-content: center;
899
+ align-items: center;
900
+ width: 100%;
901
+ overflow: hidden;
902
+ box-sizing: border-box;
903
+ border: none;
904
+ pointer-events: auto;
905
+
906
+ --ft-button-internal-font-size: ${yi.fontSize};
907
+ --ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
908
+ --ft-button-internal-color: ${yi.color};
909
+ --mdc-icon-size: ${yi.iconSize};
910
+ --ft-button-internal-vertical-padding: 6px;
911
+ --ft-button-internal-horizontal-padding: 8px;
912
+ ${ht(qe.color,yi.rippleColor)};
913
+ --ft-button-internal-content-height: max(var(--ft-button-internal-line-height), var(--mdc-icon-size));
914
+
915
+ border-radius: ${yi.borderRadius};
916
+ padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
917
+ background-color: ${yi.backgroundColor};
918
+ color: var(--ft-button-internal-color);
919
+ -webkit-mask-image: radial-gradient(white, black);
920
+ }
921
+
922
+ .ft-button:not([disabled]):hover {
923
+ cursor: pointer;
924
+ }
925
+
926
+ .ft-button--dense {
927
+ --ft-button-internal-vertical-padding: 2px;
928
+ --ft-button-internal-horizontal-padding: 4px;
929
+ border-radius: ${mi};
930
+ }
931
+
932
+ .ft-button--round {
933
+ border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
934
+ }
935
+
936
+ .ft-button[disabled] {
937
+ filter: grayscale(1);
938
+ opacity: ${yi.opacityDisabled};
939
+ }
940
+
941
+ .ft-button.ft-button--primary {
942
+ background-color: ${xi.backgroundColor};
943
+ --ft-button-internal-color: ${xi.color};
944
+ ${ht(qe.color,xi.rippleColor)};
945
+ }
946
+
947
+ .ft-button.ft-button--outlined {
948
+ border: 1px solid var(--ft-button-internal-color);
949
+ padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
950
+ }
951
+
952
+ .ft-button:focus {
953
+ outline: none;
954
+ }
955
+
956
+ .ft-button--label {
957
+ overflow: hidden;
958
+ white-space: nowrap;
959
+ text-overflow: ellipsis;
960
+ display: block;
961
+ margin: 0 var(--ft-button-internal-horizontal-padding);
962
+ ${ht(Ue.fontSize,"var(--ft-button-internal-font-size)")};
963
+ ${ht(Ue.lineHeight,"var(--ft-button-internal-content-height)")};
964
+ }
965
+
966
+ .ft-button--safari-fix .ft-button--label {
967
+ margin-right: 0;
968
+ }
969
+
970
+ .ft-button--safari-fix .ft-button--label:after {
971
+ content: "\\0000a0";
972
+ display: inline-block;
973
+ width: 0;
974
+ }
975
+
976
+ .ft-button--label[hidden] {
977
+ display: none;
978
+ }
979
+
980
+ mwc-icon {
981
+ flex-shrink: 0;
982
+ width: var(--mdc-icon-size);
983
+ }
984
+
985
+ .ft-button--label[hidden] + mwc-icon {
986
+ margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
987
+ padding: 0 var(--ft-button-internal-vertical-padding);
988
+ }
989
+
990
+ .ft-button:not(.ft-button--trailing-icon) mwc-icon,
991
+ .ft-button:not(.ft-button--trailing-icon) ft-loader {
992
+ order: -1;
993
+ }
994
+
995
+ ft-loader {
996
+ ${ht(fi.size,yi.iconSize)};
997
+ ${ht(fi.color,"var(--ft-button-internal-color)")};
998
+ }
999
+ `]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":xt,"ft-no-text-select":!0};return this.addTooltip(H`
1000
+ <button part="button"
1001
+ class="${Dt(t)}"
1002
+ aria-label="${this.getLabel()}"
1003
+ ?disabled=${this.isDisabled()}>
1004
+ <ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
1005
+ <ft-typography part="label"
1006
+ variant="button"
1007
+ class="ft-button--label"
1008
+ ?hidden=${!this.hasTextContent()}>
1009
+ <slot @slotchange=${this.onSlotchange}></slot>
1010
+ </ft-typography>
1011
+ ${this.resolveIcon()}
1012
+ </button>
1013
+ `)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:H`
1014
+ <ft-tooltip part="tooltip"
1015
+ text="${this.getLabel()}"
1016
+ position="${this.tooltipPosition}">
1017
+ ${t}
1018
+ </ft-tooltip>
1019
+ `}resolveIcon(){return this.loading?H`
1020
+ <ft-loader></ft-loader> `:this.icon?H`
1021
+ <mwc-icon>${this.icon}</mwc-icon> `:Z}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}$i.elementDefinitions={"ft-ripple":Je,"ft-tooltip":hi,"ft-typography":We,"mwc-icon":Ge,"ft-loader":ui},bi([i({type:Boolean})],$i.prototype,"primary",void 0),bi([i({type:Boolean})],$i.prototype,"outlined",void 0),bi([i({type:Boolean})],$i.prototype,"disabled",void 0),bi([i({type:Boolean})],$i.prototype,"dense",void 0),bi([i({type:Boolean})],$i.prototype,"round",void 0),bi([i({type:String})],$i.prototype,"label",void 0),bi([i({type:String})],$i.prototype,"icon",void 0),bi([i({type:Boolean})],$i.prototype,"trailingIcon",void 0),bi([i({type:Boolean})],$i.prototype,"loading",void 0),bi([i({type:String})],$i.prototype,"tooltipPosition",void 0),bi([s(".ft-button")],$i.prototype,"button",void 0),bi([s(".ft-button--label slot")],$i.prototype,"slottedContent",void 0),a("ft-button")($i);var wi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Oi extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const Si={headerBackground:dt.create("--ft-filterable-table-header-background","COLOR","whitesmoke"),oddRowBackground:dt.create("--ft-filterable-table-odd-row-background","COLOR","#FFFFFF"),evenRowBackground:dt.create("--ft-filterable-table-even-row-background","COLOR","#fdfdfd"),rowHoverBackground:dt.create("--ft-filterable-table-row-hover-background","COLOR","#fafafa"),colorOnSurfaceHigh:dt.external(ft.colorOnSurfaceHigh,"Design system"),titleFont:dt.external(ft.titleFont,"Design system"),contentFont:dt.external(ft.contentFont,"Design system")},ki=t=>H`${t}`,Ci=(t,e)=>t-e;class Ei extends ut{constructor(){super(...arguments),this.data=[],this.columns=[],this.filters=[],this.selectData=[]}init(t,e,i){this.data=t,this.columns=e,this.sort=i}render(){let t=this.sortData(this.filterData());return H`
1022
+ <style>
1023
+ .table {
1024
+ grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
1025
+ }
1026
+ </style>
1027
+ <div class="table">
1028
+ <div class="header">
1029
+ ${Mt(this.columns,((t,e)=>"header-cell-"+e),((t,e)=>this.renderHeader(t,e)))}
1030
+ </div>
1031
+ ${Mt(t,((t,e)=>"row-"+e),((t,e)=>H`
1032
+ <div class="row"
1033
+ @click=${()=>this.dispatchEvent(new Oi(t))}>
1034
+ ${Mt(this.columns,((t,i)=>"cell-"+e+" "+i),(i=>this.renderCell(i,t,e)))}
1035
+ </div>
1036
+ `))}
1037
+ </div>
1038
+ `}filterData(){let t=[...this.data];return this.filters.forEach(((e,i)=>{var o;const n=this.columns[i];if(e)switch(null!==(o=n.filter)&&void 0!==o?o:"text"){case"text":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i).toLowerCase().includes(e.value.toLowerCase()))));break;case"select":e.value&&(t=t.filter((t=>this.getValueAsString(n,t,i)===e.value)))}})),t}sortData(t){var e;if(this.currentSort){const i=this.columns[this.currentSort.column],o=null!==(e=i.comparator)&&void 0!==e?e:Ci,n="asc"===this.currentSort.order?o:(t,e)=>-o(t,e);return t.sort(((t,e)=>n(this.getValue(i,t),this.getValue(i,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let i in e){const o=e[i];"select"===o.filter&&(this.selectData[i]=[...new Set(t.map(((t,e)=>this.getValueAsString(o,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){return H`
1039
+ <div class="header-cell">
1040
+ <div class="column-title-container">
1041
+ <span class="column-title">${t.title}</span>
1042
+ ${this.renderColumnSort(t,e)}
1043
+ </div>
1044
+ <div class="column-filter">
1045
+ ${this.renderColumnFilter(t,e)}
1046
+ </div>
1047
+ </div>
1048
+ `}renderColumnSort(t,e){var i;const o=this.currentSort&&this.currentSort.column===e,n=o?"asc"===this.currentSort.order?"expand_more":"expand_less":"unfold_more";return H`
1049
+ <ft-button
1050
+ round
1051
+ dense
1052
+ class="${null===(i=t.sortable)||void 0===i||i?"":"hidden"}"
1053
+ icon="${n}"
1054
+ label="Sort ${t.title}"
1055
+ @click=${()=>{var t;o?"asc"===(null===(t=this.currentSort)||void 0===t?void 0:t.order)?this.currentSort={column:e,order:"desc"}:this.currentSort=void 0:this.currentSort={column:e,order:"asc"}}}
1056
+ ></ft-button>
1057
+ `}renderColumnFilter(t,e){var i,o;const n=t=>{this.filters[e]={value:t.detail},this.requestUpdate()};switch(null!==(i=t.filter)&&void 0!==i?i:"text"){case"text":return H`
1058
+ <ft-text-field
1059
+ label="Search ${t.title}"
1060
+ @live-change="${n}"
1061
+ ></ft-text-field>
1062
+ `;case"select":const i=null!==(o=this.selectData[e])&&void 0!==o?o:[];return i.length?H`
1063
+ <ft-select label="Filter ${t.title}" @change=${n}>
1064
+ <ft-select-option></ft-select-option>
1065
+ ${i.map((t=>H`
1066
+ <ft-select-option value="${t}" label="${t}"></ft-select-option>
1067
+ `))}
1068
+ </ft-select>
1069
+ `:null}return null}renderCell(t,e,i){var o;const n=null!==(o=t.render)&&void 0!==o?o:ki;return H`
1070
+ <div class="cell">${(t=>{const e=n(t,i);return"string"==typeof e?Ut(e):e})(this.getValue(t,e))}</div>
1071
+ `}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,i){const o=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(o,i):(t=>""+t)(o)}}Ei.styles=u`
1072
+ :host {
1073
+ display: block;
1074
+ }
1075
+
1076
+ .table {
1077
+ display: grid;
1078
+ }
1079
+
1080
+ .header, .row {
1081
+ display: contents;
1082
+ }
1083
+
1084
+ .header-cell {
1085
+ display: flex;
1086
+ flex-direction: column;
1087
+ background: ${Si.headerBackground};
1088
+ color: ${Si.colorOnSurfaceHigh};
1089
+ padding: .5rem 1rem;
1090
+ font-family: ${Si.titleFont};
1091
+ }
1092
+
1093
+ .header-cell:first-of-type {
1094
+ border-radius: .5rem 0 0 0;
1095
+ }
1096
+
1097
+ .header-cell:last-of-type {
1098
+ border-radius: 0 .5rem 0 0;
1099
+ }
1100
+
1101
+ .column-title-container {
1102
+ display: flex;
1103
+ align-items: center;
1104
+ }
1105
+
1106
+ .column-title-container ft-button {
1107
+ ${ht(yi.backgroundColor,Si.headerBackground)};
1108
+ ${ht(yi.color,Si.colorOnSurfaceHigh)};
1109
+ }
1110
+
1111
+ .column-title {
1112
+ white-space: nowrap;
1113
+ text-transform: uppercase;
1114
+ margin-right: .5rem;
1115
+ }
1116
+
1117
+ .column-filter {
1118
+ flex-grow: 1;
1119
+ flex-shrink: 0;
1120
+ }
1121
+
1122
+ .column-filter:not(:empty) {
1123
+ padding-top: .5rem;
1124
+ }
1125
+
1126
+ .column-filter ft-text-field,
1127
+ .column-filter ft-select {
1128
+ width: 150px;
1129
+ min-width: 100%;
1130
+ }
1131
+
1132
+ .cell {
1133
+ padding: 1rem;
1134
+ border-left: 1px solid ${Si.headerBackground};
1135
+ border-bottom: 1px solid ${Si.headerBackground};
1136
+ overflow-x: auto;
1137
+ display: flex;
1138
+ align-items: center;
1139
+ font-family: ${Si.contentFont};
1140
+ }
1141
+
1142
+ /* Even is 2n+1 and odd is 2n because of the header */
1143
+ .row:nth-child(2n) > .cell {
1144
+ background: ${Si.oddRowBackground};
1145
+ }
1146
+
1147
+ .row:nth-child(2n + 1) > .cell {
1148
+ background: ${Si.evenRowBackground};
1149
+ }
1150
+
1151
+ .row:hover > .cell {
1152
+ background: ${Si.rowHoverBackground};
1153
+ }
1154
+
1155
+ .cell:last-of-type {
1156
+ border-right: 1px solid ${Si.headerBackground};
1157
+ }
1158
+
1159
+ .row:last-of-type .cell:first-of-type {
1160
+ border-radius: 0 0 0 .5rem;
1161
+ }
1162
+
1163
+ .row:last-of-type .cell:last-of-type {
1164
+ border-radius: 0 0 .5rem 0;
1165
+ }
1166
+
1167
+ .hidden {
1168
+ visibility: hidden;
1169
+ }
1170
+ `,wi([i({attribute:!1})],Ei.prototype,"data",void 0),wi([i({attribute:!1})],Ei.prototype,"columns",void 0),wi([i({attribute:!1})],Ei.prototype,"sort",void 0),wi([o()],Ei.prototype,"currentSort",void 0),a("ft-filterable-table")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),H`
1171
+ ${i.map((t=>H`
1172
+ <style>${t}</style>
1173
+ `))}
1174
+ ${super.render()}
1175
+ `}},i.styles=void 0,i.elementDefinitions=o,i}(Ei))}();