@fluid-topics/ft-filter 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filter.light.js +85 -84
- package/build/ft-filter.min.js +96 -95
- package/package.json +10 -10
package/build/ft-filter.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=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,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,n=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,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);d(s,a,l);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(r.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)n.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let 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),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=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,s=o._getDefinition(e);return s?u(i,s):n.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,s),i.call(this,n,t,s)}else o.call(this,n,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.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),s.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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(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!==s.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 n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),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=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch($i){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 e{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
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -55,7 +55,7 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2019 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
-
*/const
|
|
58
|
+
*/const d=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),u=new WeakMap;class v{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const b=t=>new v("string"==typeof t?t:t+"",void 0,f),x=(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 v(i,t,f)},y=(t,e)=>{d?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)}))},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return b(e)})(t):t
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
@@ -66,18 +66,18 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var N;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:E}),(null!==(m=globalThis.reactiveElementVersions)&&void 0!==m?m:globalThis.reactiveElementVersions=[]).push("1.3.4");const z=globalThis.trustedTypes,
|
|
69
|
+
var N;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==k||k({ReactiveElement:E}),(null!==(m=globalThis.reactiveElementVersions)&&void 0!==m?m:globalThis.reactiveElementVersions=[]).push("1.3.4");const z=globalThis.trustedTypes,R=z?z.createPolicy("lit-html",{createHTML:t=>t}):void 0,M=`lit$${(Math.random()+"").slice(9)}$`,B="?"+M,F=`<${B}>`,j=document,U=(t="")=>j.createComment(t),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,T=t=>D(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),A=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,_=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),W=/'/g,H=/"/g,K=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Z=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),q=new WeakMap,X=j.createTreeWalker(j,129,null,!1),Y=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=A;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,a=r.exec(i),null!==a);)c=r.lastIndex,r===A?"!--"===a[1]?r=P:void 0!==a[1]?r=_:void 0!==a[2]?(K.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=I):void 0!==a[3]&&(r=I):r===I?">"===a[0]?(r=null!=s?s:A,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?I:'"'===a[3]?H:W):r===H||r===W?r=I:r===P||r===_?r=A:(r=I,s=void 0);const p=r===I&&t[e+1].startsWith("/>")?" ":"";n+=r===A?i+F:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+M+p):i+M+(-2===h?(o.push(void 0),e):p)}const l=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==R?R.createHTML(l):l,o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=Y(t,e);if(this.el=G.createElement(a,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=X.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(M)){const i=h[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(M),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ot:"?"===e[1]?nt:"@"===e[1]?rt:it})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(K.test(o.tagName)){const t=o.textContent.split(M),e=t.length-1;if(e>0){o.textContent=z?z.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],U()),X.nextNode(),l.push({type:2,index:++s});o.append(t[e],U())}}}else if(8===o.nodeType)if(o.data===B)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(M,t+1));)l.push({type:7,index:s}),t+=M.length-1}s++}}static createElement(t,e){const i=j.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){var s,n,r,l;if(e===Z)return e;let a=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const h=L(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(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=Q(t,a._$AS(t,e.values),a,o)),e}class tt{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,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:j).importNode(i,!0);X.currentNode=s;let n=X.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new et(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new lt(n,this,t)),this.v.push(e),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=X.nextNode(),r++)}return s}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 et{constructor(t,e,i,o){var s;this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$C_=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$C_}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),L(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==Z&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):T(t)?this.S(t):this.T(t)}j(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==J&&L(this._$AH)?this._$AA.nextSibling.data=t:this.k(j.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=G.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new tt(s,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}S(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new et(this.j(U()),this.j(U()),this,this.options)):i=e[o],i._$AI(s),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._$C_=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,o,s){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=J}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=Q(this,t,e,0),n=!L(t)||t!==this._$AH&&t!==Z,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=Q(this,o[i+r],e,r),l===Z&&(l=this._$AH[r]),n||(n=!L(l)||l!==this._$AH[r]),l===J?t=J:t!==J&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.P(t)}P(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ot extends it{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===J?void 0:t}}const st=z?z.emptyScript:"";class nt extends it{constructor(){super(...arguments),this.type=4}P(t){t&&t!==J?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class rt extends it{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:J)===Z)return;const o=this._$AH,s=t===J&&o!==J||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==J&&(o===J||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 lt{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){Q(this,t)}}const at={A:"$lit$",C:M,M:B,L:1,R:Y,V:tt,D:T,I:Q,H:et,N:it,U:nt,B:rt,F:ot,W:lt},ht=window.litHtmlPolyfillSupport;
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
74
|
*/
|
|
75
|
-
var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N:globalThis.litHtmlVersions=[]).push("2.2.7");class
|
|
75
|
+
var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?N:globalThis.litHtmlVersions=[]).push("2.2.7");class dt extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=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._$Do=((t,e,i)=>{var o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new et(e.insertBefore(U(),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._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}dt.finalized=!0,dt._$litElement$=!0,null===(ct=globalThis.litElementHydrateSupport)||void 0===ct||ct.call(globalThis,{LitElement:dt});const ft=globalThis.litElementPolyfillSupport;null==ft||ft({LitElement:dt}),(null!==(pt=globalThis.litElementVersions)&&void 0!==pt?pt:globalThis.litElementVersions=[]).push("3.2.2");class ut{static create(t,e,i){let o=t=>b(null!=t?t:i),s=x`var(${b(t)}, ${o(i)})`;return s.name=t,s.category=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>x`var(${b(t)}, ${o(e)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>i,s}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),s=x`var(${b(t)}, ${o(i)})`;return s.name=t,s.category=e.category,s.fallbackVariable=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>x`var(${b(t)}, ${o(e)})`,s.breadcrumb=()=>[e.name,...e.breadcrumb()],s.lastResortDefaultValue=()=>i,s}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):b(null!=e?e:t.defaultValue),o=x`var(${b(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>x`var(${b(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function vt(t,e){return b(`${t.name}: ${e}`)}const bt={colorPrimary:ut.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ut.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ut.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ut.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ut.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ut.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ut.create("--ft-color-error","COLOR","#B00020"),colorOutline:ut.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ut.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ut.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ut.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ut.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ut.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ut.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ut.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ut.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ut.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ut.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ut.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ut.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ut.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ut.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ut.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ut.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ut.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ut.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ut.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ut.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ut.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ut.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ut.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ut.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ut.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ut.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ut.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ut.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ut.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ut.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ut.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ut.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ut.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ut.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ut.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ut.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ut.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:ut.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:ut.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:ut.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:ut.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:ut.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:ut.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:ut.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:ut.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:ut.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:ut.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ut.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ut.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ut.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ut.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ut.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ut.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ut.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2021 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/var xt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class yt 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 s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(s,this.constructor.elementStyles),s}}}(
|
|
80
|
+
*/var xt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class yt 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 s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(s,this.constructor.elementStyles),s}}}(dt)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
|
|
81
81
|
${t.map((t=>V`
|
|
82
82
|
<style>${t}</style>
|
|
83
83
|
`))}
|
|
@@ -96,7 +96,7 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
96
96
|
* @license
|
|
97
97
|
* Copyright 2020 Google LLC
|
|
98
98
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
99
|
-
*/var zt,
|
|
99
|
+
*/var zt,Rt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>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"}(zt||(zt={}));const Mt=ut.extend("--ft-typography-font-family",bt.titleFont),Bt=ut.extend("--ft-typography-font-family",bt.contentFont),Ft={fontFamily:Bt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},jt=ut.extend("--ft-typography-title-font-family",Mt),Ut=ut.extend("--ft-typography-title-font-size",Ft.fontSize,"20px"),Lt=ut.extend("--ft-typography-title-font-weight",Ft.fontWeight,"normal"),Dt=ut.extend("--ft-typography-title-letter-spacing",Ft.letterSpacing,"0.15px"),Tt=ut.extend("--ft-typography-title-line-height",Ft.lineHeight,"1.2"),At=ut.extend("--ft-typography-title-text-transform",Ft.textTransform,"inherit"),Pt=ut.extend("--ft-typography-title-dense-font-family",Mt),_t=ut.extend("--ft-typography-title-dense-font-size",Ft.fontSize,"14px"),It=ut.extend("--ft-typography-title-dense-font-weight",Ft.fontWeight,"normal"),Wt=ut.extend("--ft-typography-title-dense-letter-spacing",Ft.letterSpacing,"0.105px"),Ht=ut.extend("--ft-typography-title-dense-line-height",Ft.lineHeight,"1.7"),Kt=ut.extend("--ft-typography-title-dense-text-transform",Ft.textTransform,"inherit"),Vt=ut.extend("--ft-typography-subtitle1-font-family",Bt),Zt=ut.extend("--ft-typography-subtitle1-font-size",Ft.fontSize,"16px"),Jt=ut.extend("--ft-typography-subtitle1-font-weight",Ft.fontWeight,"600"),qt=ut.extend("--ft-typography-subtitle1-letter-spacing",Ft.letterSpacing,"0.144px"),Xt=ut.extend("--ft-typography-subtitle1-line-height",Ft.lineHeight,"1.5"),Yt=ut.extend("--ft-typography-subtitle1-text-transform",Ft.textTransform,"inherit"),Gt=ut.extend("--ft-typography-subtitle2-font-family",Bt),Qt=ut.extend("--ft-typography-subtitle2-font-size",Ft.fontSize,"14px"),te=ut.extend("--ft-typography-subtitle2-font-weight",Ft.fontWeight,"normal"),ee=ut.extend("--ft-typography-subtitle2-letter-spacing",Ft.letterSpacing,"0.098px"),ie=ut.extend("--ft-typography-subtitle2-line-height",Ft.lineHeight,"1.7"),oe=ut.extend("--ft-typography-subtitle2-text-transform",Ft.textTransform,"inherit"),se=ut.extend("--ft-typography-body1-font-family",Bt),ne=ut.extend("--ft-typography-body1-font-size",Ft.fontSize,"16px"),re=ut.extend("--ft-typography-body1-font-weight",Ft.fontWeight,"normal"),le=ut.extend("--ft-typography-body1-letter-spacing",Ft.letterSpacing,"0.496px"),ae=ut.extend("--ft-typography-body1-line-height",Ft.lineHeight,"1.5"),he=ut.extend("--ft-typography-body1-text-transform",Ft.textTransform,"inherit"),ce={fontFamily:ut.extend("--ft-typography-body2-font-family",Bt),fontSize:ut.extend("--ft-typography-body2-font-size",Ft.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-body2-font-weight",Ft.fontWeight,"normal"),letterSpacing:ut.extend("--ft-typography-body2-letter-spacing",Ft.letterSpacing,"0.252px"),lineHeight:ut.extend("--ft-typography-body2-line-height",Ft.lineHeight,"1.4"),textTransform:ut.extend("--ft-typography-body2-text-transform",Ft.textTransform,"inherit")},pe=ut.extend("--ft-typography-caption-font-family",Bt),de=ut.extend("--ft-typography-caption-font-size",Ft.fontSize,"12px"),fe=ut.extend("--ft-typography-caption-font-weight",Ft.fontWeight,"normal"),ue=ut.extend("--ft-typography-caption-letter-spacing",Ft.letterSpacing,"0.396px"),ve=ut.extend("--ft-typography-caption-line-height",Ft.lineHeight,"1.33"),be=ut.extend("--ft-typography-caption-text-transform",Ft.textTransform,"inherit"),xe=ut.extend("--ft-typography-breadcrumb-font-family",Bt),ye=ut.extend("--ft-typography-breadcrumb-font-size",Ft.fontSize,"10px"),ge=ut.extend("--ft-typography-breadcrumb-font-weight",Ft.fontWeight,"normal"),me=ut.extend("--ft-typography-breadcrumb-letter-spacing",Ft.letterSpacing,"0.33px"),$e=ut.extend("--ft-typography-breadcrumb-line-height",Ft.lineHeight,"1.6"),we=ut.extend("--ft-typography-breadcrumb-text-transform",Ft.textTransform,"inherit"),ke=ut.extend("--ft-typography-overline-font-family",Bt),Oe=ut.extend("--ft-typography-overline-font-size",Ft.fontSize,"10px"),Se=ut.extend("--ft-typography-overline-font-weight",Ft.fontWeight,"normal"),Ce=ut.extend("--ft-typography-overline-letter-spacing",Ft.letterSpacing,"1.5px"),Ee=ut.extend("--ft-typography-overline-line-height",Ft.lineHeight,"1.6"),Ne=ut.extend("--ft-typography-overline-text-transform",Ft.textTransform,"uppercase"),ze={fontFamily:ut.extend("--ft-typography-button-font-family",Bt),fontSize:ut.extend("--ft-typography-button-font-size",Ft.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",Ft.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",Ft.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",Ft.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",Ft.textTransform,"uppercase")},Re=x`
|
|
100
100
|
.ft-typography--title {
|
|
101
101
|
font-family: ${jt};
|
|
102
102
|
font-size: ${Ut};
|
|
@@ -105,13 +105,13 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
105
105
|
line-height: ${Tt};
|
|
106
106
|
text-transform: ${At};
|
|
107
107
|
}
|
|
108
|
-
`,
|
|
108
|
+
`,Me=x`
|
|
109
109
|
.ft-typography--title-dense {
|
|
110
110
|
font-family: ${Pt};
|
|
111
111
|
font-size: ${_t};
|
|
112
112
|
font-weight: ${It};
|
|
113
|
-
letter-spacing: ${
|
|
114
|
-
line-height: ${
|
|
113
|
+
letter-spacing: ${Wt};
|
|
114
|
+
line-height: ${Ht};
|
|
115
115
|
text-transform: ${Kt};
|
|
116
116
|
}
|
|
117
117
|
`,Be=x`
|
|
@@ -154,8 +154,8 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
154
154
|
`,Le=x`
|
|
155
155
|
.ft-typography--caption {
|
|
156
156
|
font-family: ${pe};
|
|
157
|
-
font-size: ${
|
|
158
|
-
font-weight: ${
|
|
157
|
+
font-size: ${de};
|
|
158
|
+
font-weight: ${fe};
|
|
159
159
|
letter-spacing: ${ue};
|
|
160
160
|
line-height: ${ve};
|
|
161
161
|
text-transform: ${be};
|
|
@@ -199,16 +199,16 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
199
199
|
* @license
|
|
200
200
|
* Copyright 2017 Google LLC
|
|
201
201
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
202
|
-
*/Pe.styles=[Me,
|
|
202
|
+
*/Pe.styles=[Re,Me,Be,Fe,je,Ue,Le,De,Te,Ae,x`
|
|
203
203
|
.ft-typography {
|
|
204
204
|
vertical-align: inherit;
|
|
205
205
|
}
|
|
206
|
-
`],
|
|
206
|
+
`],Rt([o()],Pe.prototype,"element",void 0),Rt([o()],Pe.prototype,"variant",void 0),c("ft-typography")(Pe);const Ie=1,We=2,He=t=>(...e)=>({_$litDirective$:t,values:e});class Ke{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)}}
|
|
207
207
|
/**
|
|
208
208
|
* @license
|
|
209
209
|
* Copyright 2020 Google LLC
|
|
210
210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
211
|
-
*/const{H:Ve}=at,Ze=()=>document.createComment(""),Je=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Ze(),n),o=s.insertBefore(Ze(),n);i=new Ve(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!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},qe=(t,e,i=t)=>(t._$AI(e,i),t),Xe={},Ye=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}},Ge=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Qe=
|
|
211
|
+
*/const{H:Ve}=at,Ze=()=>document.createComment(""),Je=(t,e,i)=>{var o;const s=t._$AA.parentNode,n=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Ze(),n),o=s.insertBefore(Ze(),n);i=new Ve(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!==n||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,n),t=e}}}return i},qe=(t,e,i=t)=>(t._$AI(e,i),t),Xe={},Ye=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}},Ge=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},Qe=He(class extends Ke{constructor(t){if(super(t),t.type!==We)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],n=[];let r=0;for(const e of t)s[r]=o?o(e,r):r,n[r]=i(e,r),r++;return{values:n,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const n=(t=>t._$AH)(t),{values:r,keys:l}=this.ht(e,i,o);if(!Array.isArray(n))return this.ut=l,r;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],h=[];let c,p,d=0,f=n.length-1,u=0,v=r.length-1;for(;d<=f&&u<=v;)if(null===n[d])d++;else if(null===n[f])f--;else if(a[d]===l[u])h[u]=qe(n[d],r[u]),d++,u++;else if(a[f]===l[v])h[v]=qe(n[f],r[v]),f--,v--;else if(a[d]===l[v])h[v]=qe(n[d],r[v]),Je(t,h[v+1],n[d]),d++,v--;else if(a[f]===l[u])h[u]=qe(n[f],r[u]),Je(t,n[d],n[f]),f--,u++;else if(void 0===c&&(c=Ge(l,u,v),p=Ge(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?n[e]:null;if(null===i){const e=Je(t,n[d]);qe(e,r[u]),h[u]=e}else h[u]=qe(i,r[u]),Je(t,n[d],i),n[e]=null;u++}else Ye(n[f]),f--;else Ye(n[d]),d++;for(;u<=v;){const e=Je(t,h[v+1]);qe(e,r[u]),h[u++]=e}for(;d<=f;){const t=n[d++];null!==t&&Ye(t)}return this.ut=l,((t,e=Xe)=>{t._$AH=e})(t,h),Z}}),ti=He(class extends Ke{constructor(t){var e;if(super(t),t.type!==Ie||"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.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return Z}});
|
|
212
212
|
/**
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright 2017 Google LLC
|
|
@@ -319,7 +319,7 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
319
319
|
opacity: ${oi.opacityContentOnSurfacePressed};
|
|
320
320
|
transform: translate(-50%, -50%) scale(1);
|
|
321
321
|
}
|
|
322
|
-
`,ei([o({type:Boolean})],ci.prototype,"primary",void 0),ei([o({type:Boolean})],ci.prototype,"secondary",void 0),ei([o({type:Boolean})],ci.prototype,"unbounded",void 0),ei([o({type:Boolean})],ci.prototype,"activated",void 0),ei([o({type:Boolean})],ci.prototype,"selected",void 0),ei([o({type:Boolean})],ci.prototype,"disabled",void 0),ei([s()],ci.prototype,"hovered",void 0),ei([s()],ci.prototype,"focused",void 0),ei([s()],ci.prototype,"pressed",void 0),ei([s()],ci.prototype,"rippling",void 0),ei([s()],ci.prototype,"rippleSize",void 0),ei([s()],ci.prototype,"originX",void 0),ei([s()],ci.prototype,"originY",void 0),ei([r(".ft-ripple")],ci.prototype,"ripple",void 0),ei([r(".ft-ripple--effect")],ci.prototype,"rippleEffect",void 0),c("ft-ripple")(ci);var pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const
|
|
322
|
+
`,ei([o({type:Boolean})],ci.prototype,"primary",void 0),ei([o({type:Boolean})],ci.prototype,"secondary",void 0),ei([o({type:Boolean})],ci.prototype,"unbounded",void 0),ei([o({type:Boolean})],ci.prototype,"activated",void 0),ei([o({type:Boolean})],ci.prototype,"selected",void 0),ei([o({type:Boolean})],ci.prototype,"disabled",void 0),ei([s()],ci.prototype,"hovered",void 0),ei([s()],ci.prototype,"focused",void 0),ei([s()],ci.prototype,"pressed",void 0),ei([s()],ci.prototype,"rippling",void 0),ei([s()],ci.prototype,"rippleSize",void 0),ei([s()],ci.prototype,"originX",void 0),ei([s()],ci.prototype,"originY",void 0),ei([r(".ft-ripple")],ci.prototype,"ripple",void 0),ei([r(".ft-ripple--effect")],ci.prototype,"rippleEffect",void 0),c("ft-ripple")(ci);var pi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const di=ut.create("--ft-tooltip-distance","SIZE","4px"),fi=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),ui=ut.create("--ft-tooltip-background-color","COLOR","#666666"),vi=ut.create("--ft-tooltip-z-index","NUMBER","1"),bi=ut.external(bt.borderRadiusS,"Design system"),xi=ut.create("--ft-tooltip-max-width","SIZE","150px");class yi extends yt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return V`
|
|
323
323
|
<div part="container"
|
|
324
324
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
325
325
|
@mouseenter=${this.onHover}
|
|
@@ -329,12 +329,13 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
329
329
|
@touchstart=${this.onTouch}>
|
|
330
330
|
<div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
|
|
331
331
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
332
|
-
<
|
|
332
|
+
<slot name="text"></slot>
|
|
333
|
+
<ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
|
|
333
334
|
</div>
|
|
334
335
|
</div>
|
|
335
336
|
<slot></slot>
|
|
336
337
|
</div>
|
|
337
|
-
`}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
|
|
338
|
+
`}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;let s=0,n=0;switch(this.position){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${xi})`}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())}}yi.elementDefinitions={"ft-typography":Pe},yi.styles=x`
|
|
338
339
|
.ft-tooltip--container {
|
|
339
340
|
display: block;
|
|
340
341
|
position: relative;
|
|
@@ -350,9 +351,9 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
350
351
|
box-sizing: border-box;
|
|
351
352
|
overflow: hidden;
|
|
352
353
|
width: max-content;
|
|
353
|
-
max-width:
|
|
354
|
+
max-width: ${xi};
|
|
354
355
|
text-align: center;
|
|
355
|
-
padding: ${
|
|
356
|
+
padding: ${di};
|
|
356
357
|
z-index: ${vi};
|
|
357
358
|
}
|
|
358
359
|
|
|
@@ -360,13 +361,13 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
360
361
|
padding: 4px 8px;
|
|
361
362
|
border-radius: ${bi};
|
|
362
363
|
background-color: ${ui};
|
|
363
|
-
color: ${
|
|
364
|
+
color: ${fi};
|
|
364
365
|
top: -500px;
|
|
365
366
|
left: -500px;
|
|
366
367
|
position: relative;
|
|
367
368
|
word-break: break-word;
|
|
368
369
|
}
|
|
369
|
-
`,pi([o()],
|
|
370
|
+
`,pi([o()],yi.prototype,"text",void 0),pi([o({type:Boolean})],yi.prototype,"manual",void 0),pi([o({type:Boolean})],yi.prototype,"inline",void 0),pi([o({type:Number})],yi.prototype,"delay",void 0),pi([o()],yi.prototype,"position",void 0),pi([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?h({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)],yi.prototype,"slotNodes",void 0),pi([r(".ft-tooltip--container")],yi.prototype,"container",void 0),pi([r("slot")],yi.prototype,"target",void 0),pi([r(".ft-tooltip")],yi.prototype,"tooltip",void 0),pi([r(".ft-tooltip--content")],yi.prototype,"tooltipContent",void 0),pi([s()],yi.prototype,"visible",void 0),c("ft-tooltip")(yi);const gi={color:ut.extend("--ft-loader-color",bt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")};class mi extends yt{static get styles(){return x`
|
|
370
371
|
:host {
|
|
371
372
|
line-height: 0;
|
|
372
373
|
}
|
|
@@ -375,8 +376,8 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
375
376
|
display: inline-block;
|
|
376
377
|
position: relative;
|
|
377
378
|
|
|
378
|
-
width: ${
|
|
379
|
-
height: ${
|
|
379
|
+
width: ${gi.size};
|
|
380
|
+
height: ${gi.size};
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
.ft-loader div {
|
|
@@ -385,7 +386,7 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
385
386
|
width: 25%;
|
|
386
387
|
height: 25%;
|
|
387
388
|
border-radius: 50%;
|
|
388
|
-
background: ${
|
|
389
|
+
background: ${gi.color};
|
|
389
390
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
390
391
|
}
|
|
391
392
|
|
|
@@ -432,7 +433,7 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
432
433
|
transform: translate(0, 0);
|
|
433
434
|
}
|
|
434
435
|
100% {
|
|
435
|
-
transform: translate(calc(0.35 * ${
|
|
436
|
+
transform: translate(calc(0.35 * ${gi.size}), 0);
|
|
436
437
|
}
|
|
437
438
|
}
|
|
438
439
|
`}render(){return V`
|
|
@@ -442,25 +443,25 @@ var ct,pt;null==ht||ht(G,et),(null!==(N=globalThis.litHtmlVersions)&&void 0!==N?
|
|
|
442
443
|
<div></div>
|
|
443
444
|
<div></div>
|
|
444
445
|
</div>
|
|
445
|
-
`}}c("ft-loader")(
|
|
446
|
+
`}}c("ft-loader")(mi);
|
|
446
447
|
/**
|
|
447
448
|
* @license
|
|
448
449
|
* Copyright 2017 Google LLC
|
|
449
450
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
450
451
|
*/
|
|
451
|
-
class
|
|
452
|
+
class $i extends Ke{constructor(t){if(super(t),this.it=J,t.type!==We)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}$i.directiveName="unsafeHTML",$i.resultType=1;const wi=He($i);var ki,Oi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ki||(ki={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Oi||(Oi={})),new Map([...["abw"].map((t=>[t,Oi.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Oi.AUDIO])),...["avi"].map((t=>[t,Oi.AVI])),...["chm","xhs"].map((t=>[t,Oi.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Oi.CODE])),...["csv"].map((t=>[t,Oi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Oi.DITA])),...["epub"].map((t=>[t,Oi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Oi.EXCEL])),...["flac"].map((t=>[t,Oi.FLAC])),...["gif"].map((t=>[t,Oi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Oi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Oi.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Oi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Oi.JPEG])),...["json"].map((t=>[t,Oi.JSON])),...["m4a","m4p"].map((t=>[t,Oi.M4A])),...["mov","qt"].map((t=>[t,Oi.MOV])),...["mp3"].map((t=>[t,Oi.MP3])),...["mp4","m4v"].map((t=>[t,Oi.MP4])),...["ogg","oga"].map((t=>[t,Oi.OGG])),...["pdf","ps"].map((t=>[t,Oi.PDF])),...["png"].map((t=>[t,Oi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Oi.POWERPOINT])),...["rar"].map((t=>[t,Oi.RAR])),...["stp"].map((t=>[t,Oi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Oi.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Oi.VIDEO])),...["wav"].map((t=>[t,Oi.WAV])),...["wma"].map((t=>[t,Oi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Oi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Oi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Oi.YAML])),...["zip"].map((t=>[t,Oi.ZIP]))]);var Si,Ci=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Si||(Si={}));const Ei={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ut.create("--ft-icon-vertical-align","UNKNOWN","unset")};class Ni extends yt{constructor(){super(...arguments),this.variant=Si.fluid_topics}getStyles(){return x`
|
|
452
453
|
:host {
|
|
453
454
|
display: inline-block;
|
|
454
455
|
}
|
|
455
456
|
|
|
456
457
|
:host, i.ft-icon {
|
|
457
|
-
width: ${
|
|
458
|
-
height: ${
|
|
458
|
+
width: ${Ei.size};
|
|
459
|
+
height: ${Ei.size};
|
|
459
460
|
text-align: center;
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
i.ft-icon {
|
|
463
|
-
font-size: ${
|
|
464
|
+
font-size: ${Ei.size};
|
|
464
465
|
line-height: 1;
|
|
465
466
|
font-weight: normal;
|
|
466
467
|
text-transform: none;
|
|
@@ -471,25 +472,26 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
471
472
|
text-rendering: auto;
|
|
472
473
|
-webkit-font-smoothing: antialiased;
|
|
473
474
|
-moz-osx-font-smoothing: grayscale;
|
|
475
|
+
vertical-align: ${Ei.verticalAlign};
|
|
474
476
|
}
|
|
475
477
|
|
|
476
478
|
.ft-icon--fluid-topics {
|
|
477
|
-
font-family: ${
|
|
479
|
+
font-family: ${Ei.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
478
480
|
}
|
|
479
481
|
|
|
480
482
|
.ft-icon--file-format {
|
|
481
|
-
font-family: ${
|
|
483
|
+
font-family: ${Ei.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
482
484
|
}
|
|
483
485
|
|
|
484
486
|
.ft-icon--material {
|
|
485
|
-
font-family: ${
|
|
487
|
+
font-family: ${Ei.materialFontFamily}, "Material Icons", sans-serif;
|
|
486
488
|
}
|
|
487
489
|
`}getTemplate(){return V`
|
|
488
490
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
489
|
-
${
|
|
491
|
+
${wi(this.getIcon())}
|
|
490
492
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
491
493
|
</i>
|
|
492
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===
|
|
494
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let i=this.textContent;return this.variant===Si.file_format?null!==(t=Oi[i.toUpperCase()])&&void 0!==t?t:i:this.variant===Si.fluid_topics?null!==(e=ki[i.toUpperCase()])&&void 0!==e?e:i:J}}Ni.elementDefinitions={},Ci([o()],Ni.prototype,"variant",void 0),Ci([r("slot")],Ni.prototype,"slottedContent",void 0),c("ft-icon")(Ni);var zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Ri=ut.extend("--ft-button-color",bt.colorPrimary),Mi={backgroundColor:ut.extend("--ft-button-background-color",bt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",bt.borderRadiusL),color:Ri,fontSize:ut.extend("--ft-button-font-size",ze.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",Ri),opacityDisabled:ut.external(bt.colorOpacityDisabled,"Design system")},Bi=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",bt.colorOnPrimary)),Fi={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",bt.colorPrimary)),color:Bi,rippleColor:ut.extend("--ft-button-primary-ripple-color",Bi)},ji=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",bt.borderRadiusM));class Ui extends yt{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[gt,x`
|
|
493
495
|
:host {
|
|
494
496
|
display: inline-block;
|
|
495
497
|
max-width: 100%;
|
|
@@ -500,7 +502,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
500
502
|
box-shadow: 0px 0px 0px transparent;
|
|
501
503
|
border: 0px solid transparent;
|
|
502
504
|
text-shadow: 0px 0px 0px transparent;
|
|
503
|
-
font-size:
|
|
505
|
+
font-size: ${Mi.fontSize};
|
|
504
506
|
}
|
|
505
507
|
|
|
506
508
|
button:hover {
|
|
@@ -529,10 +531,9 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
529
531
|
border: none;
|
|
530
532
|
pointer-events: auto;
|
|
531
533
|
|
|
532
|
-
--ft-button-internal-
|
|
533
|
-
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
534
|
+
--ft-button-internal-line-height: calc(${Mi.fontSize} + 2px);
|
|
534
535
|
--ft-button-internal-color: ${Mi.color};
|
|
535
|
-
${vt(
|
|
536
|
+
${vt(Ei.size,Mi.iconSize)};
|
|
536
537
|
--ft-button-internal-vertical-padding: 6px;
|
|
537
538
|
--ft-button-internal-horizontal-padding: 8px;
|
|
538
539
|
${vt(oi.color,Mi.rippleColor)};
|
|
@@ -552,7 +553,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
552
553
|
.ft-button--dense {
|
|
553
554
|
--ft-button-internal-vertical-padding: 2px;
|
|
554
555
|
--ft-button-internal-horizontal-padding: 4px;
|
|
555
|
-
border-radius: ${
|
|
556
|
+
border-radius: ${ji};
|
|
556
557
|
}
|
|
557
558
|
|
|
558
559
|
.ft-button--round {
|
|
@@ -565,9 +566,9 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
565
566
|
}
|
|
566
567
|
|
|
567
568
|
.ft-button.ft-button--primary {
|
|
568
|
-
background-color: ${
|
|
569
|
-
--ft-button-internal-color: ${
|
|
570
|
-
${vt(oi.color,
|
|
569
|
+
background-color: ${Fi.backgroundColor};
|
|
570
|
+
--ft-button-internal-color: ${Fi.color};
|
|
571
|
+
${vt(oi.color,Fi.rippleColor)};
|
|
571
572
|
}
|
|
572
573
|
|
|
573
574
|
.ft-button.ft-button--outlined {
|
|
@@ -586,7 +587,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
586
587
|
text-overflow: ellipsis;
|
|
587
588
|
display: block;
|
|
588
589
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
589
|
-
${vt(ze.fontSize,"
|
|
590
|
+
${vt(ze.fontSize,"1em")};
|
|
590
591
|
${vt(ze.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
591
592
|
}
|
|
592
593
|
|
|
@@ -620,8 +621,8 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
620
621
|
}
|
|
621
622
|
|
|
622
623
|
ft-loader {
|
|
623
|
-
${vt(
|
|
624
|
-
${vt(
|
|
624
|
+
${vt(gi.size,Mi.iconSize)};
|
|
625
|
+
${vt(gi.color,"var(--ft-button-internal-color)")};
|
|
625
626
|
}
|
|
626
627
|
`]}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":kt,"ft-no-text-select":!0};return this.addTooltip(V`
|
|
627
628
|
<button part="button"
|
|
@@ -645,7 +646,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
645
646
|
</ft-tooltip>
|
|
646
647
|
`}resolveIcon(){return this.loading?V`
|
|
647
648
|
<ft-loader></ft-loader> `:this.icon?V`
|
|
648
|
-
<ft-icon variant="material">${this.icon}</ft-icon> `:J}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}}
|
|
649
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:J}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}}Ui.elementDefinitions={"ft-ripple":ci,"ft-tooltip":yi,"ft-typography":Pe,"ft-icon":Ni,"ft-loader":mi},zi([o({type:Boolean})],Ui.prototype,"primary",void 0),zi([o({type:Boolean})],Ui.prototype,"outlined",void 0),zi([o({type:Boolean})],Ui.prototype,"disabled",void 0),zi([o({type:Boolean})],Ui.prototype,"dense",void 0),zi([o({type:Boolean})],Ui.prototype,"round",void 0),zi([o({type:String})],Ui.prototype,"label",void 0),zi([o({type:String})],Ui.prototype,"icon",void 0),zi([o({type:Boolean})],Ui.prototype,"trailingIcon",void 0),zi([o({type:Boolean})],Ui.prototype,"loading",void 0),zi([o({type:String})],Ui.prototype,"tooltipPosition",void 0),zi([r(".ft-button")],Ui.prototype,"button",void 0),zi([r(".ft-button--label slot")],Ui.prototype,"slottedContent",void 0),c("ft-button")(Ui);var Li=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Di=ut.extend("--ft-checkbox-text-color",bt.colorOnSurfaceHigh),Ti=ut.external(bt.colorPrimary,"Design system"),Ai=ut.external(bt.colorOnPrimary,"Design system"),Pi=ut.extend("--ft-checkbox-border-color",bt.colorOnSurfaceMedium),_i=ut.external(bt.colorOnSurfaceDisabled,"Design system");class Ii extends yt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return V`
|
|
649
650
|
<label class="${ti(t)}" for="checkbox-input">
|
|
650
651
|
<div class="ft-checkbox--box-container">
|
|
651
652
|
<ft-ripple
|
|
@@ -671,14 +672,14 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
671
672
|
<slot></slot>
|
|
672
673
|
</ft-typography>
|
|
673
674
|
</label>
|
|
674
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
675
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Ii.elementDefinitions={"ft-ripple":ci,"ft-typography":Pe},Ii.styles=x`
|
|
675
676
|
* {
|
|
676
677
|
box-sizing: border-box;
|
|
677
678
|
}
|
|
678
679
|
|
|
679
680
|
.ft-checkbox {
|
|
680
681
|
box-sizing: border-box;
|
|
681
|
-
color: ${
|
|
682
|
+
color: ${Di};
|
|
682
683
|
|
|
683
684
|
display: inline-flex;
|
|
684
685
|
align-items: center;
|
|
@@ -686,7 +687,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
686
687
|
}
|
|
687
688
|
|
|
688
689
|
.ft-checkbox--disabled {
|
|
689
|
-
color: ${
|
|
690
|
+
color: ${_i};
|
|
690
691
|
}
|
|
691
692
|
|
|
692
693
|
input {
|
|
@@ -710,26 +711,26 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
710
711
|
|
|
711
712
|
.ft-checkbox--box {
|
|
712
713
|
display: flex;
|
|
713
|
-
border: 2px solid ${
|
|
714
|
+
border: 2px solid ${Pi};
|
|
714
715
|
border-radius: 2px;
|
|
715
716
|
|
|
716
717
|
width: 18px;
|
|
717
718
|
height: 18px;
|
|
718
719
|
|
|
719
|
-
color: ${
|
|
720
|
+
color: ${Ai};
|
|
720
721
|
}
|
|
721
722
|
|
|
722
723
|
|
|
723
724
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
724
725
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
725
|
-
border-color: ${
|
|
726
|
-
background-color: ${
|
|
726
|
+
border-color: ${Ti};
|
|
727
|
+
background-color: ${Ti};
|
|
727
728
|
}
|
|
728
729
|
|
|
729
730
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
730
|
-
border-color: ${
|
|
731
|
+
border-color: ${_i};
|
|
731
732
|
background-color: transparent;
|
|
732
|
-
color: ${
|
|
733
|
+
color: ${_i};
|
|
733
734
|
}
|
|
734
735
|
|
|
735
736
|
.ft-checkbox--checkmark {
|
|
@@ -748,7 +749,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
748
749
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
749
750
|
opacity: 1;
|
|
750
751
|
}
|
|
751
|
-
`,
|
|
752
|
+
`,Li([o()],Ii.prototype,"name",void 0),Li([o({type:Boolean,reflect:!0})],Ii.prototype,"checked",void 0),Li([o({type:Boolean})],Ii.prototype,"indeterminate",void 0),Li([o({type:Boolean})],Ii.prototype,"disabled",void 0),Li([r(".ft-checkbox")],Ii.prototype,"container",void 0),Li([r("ft-ripple")],Ii.prototype,"ripple",void 0),c("ft-checkbox")(Ii);var Wi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Hi=ut.extend("--ft-radio-text-color",bt.colorOnSurfaceHigh),Ki=ut.external(bt.colorPrimary,"Design system"),Vi=(ut.external(bt.colorOnPrimary,"Design system"),ut.extend("--ft-radio-border-color",bt.colorOnSurfaceMedium)),Zi=ut.external(bt.colorOnSurfaceDisabled,"Design system");class Ji extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class qi extends yt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return V`
|
|
752
753
|
<div class="${ti(t)}">
|
|
753
754
|
<div class="ft-radio--box-container">
|
|
754
755
|
<ft-ripple
|
|
@@ -773,7 +774,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
773
774
|
</ft-typography>
|
|
774
775
|
</label>
|
|
775
776
|
</div>
|
|
776
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
777
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ji(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Ji(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}qi.elementDefinitions={"ft-ripple":ci,"ft-typography":Pe},qi.styles=x`
|
|
777
778
|
* {
|
|
778
779
|
box-sizing: border-box;
|
|
779
780
|
}
|
|
@@ -788,7 +789,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
788
789
|
}
|
|
789
790
|
|
|
790
791
|
.ft-radio--disabled {
|
|
791
|
-
color: ${
|
|
792
|
+
color: ${Zi};
|
|
792
793
|
}
|
|
793
794
|
|
|
794
795
|
input {
|
|
@@ -811,7 +812,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
811
812
|
}
|
|
812
813
|
|
|
813
814
|
.ft-radio--box {
|
|
814
|
-
border: 2px solid ${
|
|
815
|
+
border: 2px solid ${Vi};
|
|
815
816
|
border-radius: 50%;
|
|
816
817
|
|
|
817
818
|
display: flex;
|
|
@@ -824,7 +825,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
824
825
|
|
|
825
826
|
.ft-radio--box:after {
|
|
826
827
|
content: " ";
|
|
827
|
-
background-color: ${
|
|
828
|
+
background-color: ${Ki};
|
|
828
829
|
|
|
829
830
|
border-radius: 50%;
|
|
830
831
|
|
|
@@ -836,7 +837,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
836
837
|
}
|
|
837
838
|
|
|
838
839
|
.ft-radio--checked .ft-radio--box {
|
|
839
|
-
border-color: ${
|
|
840
|
+
border-color: ${Ki};
|
|
840
841
|
}
|
|
841
842
|
|
|
842
843
|
|
|
@@ -845,24 +846,24 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
845
846
|
}
|
|
846
847
|
|
|
847
848
|
.ft-radio--disabled .ft-radio--box {
|
|
848
|
-
border-color: ${
|
|
849
|
+
border-color: ${Zi};
|
|
849
850
|
background-color: transparent;
|
|
850
851
|
}
|
|
851
852
|
|
|
852
853
|
.ft-radio--disabled .ft-radio--box:after {
|
|
853
|
-
background-color: ${
|
|
854
|
+
background-color: ${Zi};
|
|
854
855
|
}
|
|
855
|
-
`,
|
|
856
|
+
`,Wi([o()],qi.prototype,"value",void 0),Wi([o()],qi.prototype,"name",void 0),Wi([o({type:Boolean,reflect:!0})],qi.prototype,"checked",void 0),Wi([o({type:Boolean})],qi.prototype,"disabled",void 0),Wi([r(".ft-radio")],qi.prototype,"container",void 0),Wi([r("ft-ripple")],qi.prototype,"ripple",void 0),Wi([r("input")],qi.prototype,"input",void 0);var Xi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Yi extends yt{constructor(){super(...arguments),this.name=""}render(){return V`
|
|
856
857
|
<slot @slotchange=${this.onSlotChange}
|
|
857
858
|
@change=${this.onChange}
|
|
858
859
|
@keydown=${this.onKeyDown}
|
|
859
860
|
@focusin=${this.focusCurrentValue}
|
|
860
861
|
></slot>
|
|
861
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
862
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Yi.elementDefinitions={},Yi.styles=x`
|
|
862
863
|
:host {
|
|
863
864
|
display: contents;
|
|
864
865
|
}
|
|
865
|
-
`,
|
|
866
|
+
`,Xi([o()],Yi.prototype,"name",void 0),Xi([h()],Yi.prototype,"radioButtons",void 0),c("ft-radio")(qi),c("ft-radio-group")(Yi);var Gi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const Qi={borderRadiusM:ut.external(bt.borderRadiusM,"Design system"),colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:ut.external(bt.colorOnSurfaceDisabled,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorOnPrimary:ut.external(bt.colorOnPrimary,"Design system"),fontFamily:ut.external(ce.fontFamily,"Body2 typography"),fontSize:ut.external(ce.fontSize,"Body2 typography"),fontWeight:ut.external(ce.fontWeight,"Body2 typography"),letterSpacing:ut.external(ce.letterSpacing,"Body2 typography"),lineHeight:ut.external(ce.lineHeight,"Body2 typography"),textTransform:ut.external(ce.textTransform,"Body2 typography")};class to extends yt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return V`
|
|
866
867
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
867
868
|
${null==this.parent?null:V`
|
|
868
869
|
<div tabindex="0"
|
|
@@ -926,7 +927,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
926
927
|
@change=${t=>t.stopPropagation()}>
|
|
927
928
|
${t.label}
|
|
928
929
|
</ft-radio>
|
|
929
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
930
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}to.elementDefinitions={"ft-button":Ui,"ft-ripple":ci,"ft-typography":Pe,"ft-checkbox":Ii,"ft-icon":Ni,"ft-radio":qi},to.styles=[x`
|
|
930
931
|
.ft-filter-level--container {
|
|
931
932
|
display: flex;
|
|
932
933
|
flex-direction: column;
|
|
@@ -940,14 +941,14 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
940
941
|
flex-shrink: 0;
|
|
941
942
|
text-decoration: none;
|
|
942
943
|
position: relative;
|
|
943
|
-
border-radius: ${
|
|
944
|
+
border-radius: ${Qi.borderRadiusM};
|
|
944
945
|
overflow: hidden;
|
|
945
946
|
display: flex;
|
|
946
947
|
align-items: center;
|
|
947
948
|
padding: 4px 4px;
|
|
948
949
|
gap: 4px;
|
|
949
950
|
cursor: pointer;
|
|
950
|
-
color: ${
|
|
951
|
+
color: ${Qi.colorOnSurface};
|
|
951
952
|
}
|
|
952
953
|
|
|
953
954
|
.ft-filter-level--go-back:focus {
|
|
@@ -976,7 +977,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
976
977
|
}
|
|
977
978
|
|
|
978
979
|
ft-button {
|
|
979
|
-
${vt(Mi.color,
|
|
980
|
+
${vt(Mi.color,Qi.colorOnSurface)};
|
|
980
981
|
}
|
|
981
982
|
|
|
982
983
|
ft-radio, ft-checkbox {
|
|
@@ -990,9 +991,9 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
990
991
|
|
|
991
992
|
.ft-filter-level--no-values {
|
|
992
993
|
margin: 10px 0;
|
|
993
|
-
color: ${
|
|
994
|
+
color: ${Qi.colorOnSurfaceMedium};
|
|
994
995
|
}
|
|
995
|
-
`],
|
|
996
|
+
`],Gi([o({type:String})],to.prototype,"id",void 0),Gi([o({type:Object})],to.prototype,"parent",void 0),Gi([o({type:Array})],to.prototype,"options",void 0),Gi([o({type:Boolean})],to.prototype,"multivalued",void 0),Gi([o({type:Boolean})],to.prototype,"disabled",void 0),Gi([o({type:Boolean})],to.prototype,"hideSelectedOptions",void 0),Gi([o({type:Boolean})],to.prototype,"preventNavigation",void 0),Gi([o({type:String})],to.prototype,"filter",void 0),Gi([o({type:String})],to.prototype,"moreValuesButtonLabel",void 0),Gi([o({type:String})],to.prototype,"noValuesLabel",void 0),Gi([o({type:Number})],to.prototype,"displayedValuesLimit",void 0),Gi([r(".ft-filter-level--container")],to.prototype,"container",void 0),Gi([s()],to.prototype,"displayedPages",void 0);var eo=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const io={buttonsColor:ut.extend("--ft-snap-scroll-buttons-color",bt.colorPrimary),buttonsZIndex:ut.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:ut.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:ut.external(bt.colorSurface,"Design system")};class oo extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class so extends yt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=ti({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":kt}),e=this.controls&&this.withScroll;return V`
|
|
996
997
|
<div part="container" class="${t}">
|
|
997
998
|
<ft-button
|
|
998
999
|
class="ft-snap-scroll--previous"
|
|
@@ -1016,7 +1017,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1016
1017
|
@click=${this.next}
|
|
1017
1018
|
></ft-button>
|
|
1018
1019
|
</div>
|
|
1019
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1020
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new oo(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}so.elementDefinitions={"ft-button":Ui},so.styles=x`
|
|
1020
1021
|
.ft-snap-scroll {
|
|
1021
1022
|
box-sizing: border-box;
|
|
1022
1023
|
position: relative;
|
|
@@ -1051,7 +1052,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1051
1052
|
flex-wrap: nowrap;
|
|
1052
1053
|
align-items: flex-start;
|
|
1053
1054
|
justify-content: flex-start;
|
|
1054
|
-
gap: ${
|
|
1055
|
+
gap: ${io.gap};
|
|
1055
1056
|
}
|
|
1056
1057
|
|
|
1057
1058
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1094,11 +1095,11 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1094
1095
|
.ft-snap-scroll--next {
|
|
1095
1096
|
position: absolute;
|
|
1096
1097
|
display: flex;
|
|
1097
|
-
z-index: ${
|
|
1098
|
+
z-index: ${io.buttonsZIndex};
|
|
1098
1099
|
opacity: 1;
|
|
1099
1100
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1100
1101
|
${vt(Mi.backgroundColor,"transparent")};
|
|
1101
|
-
${vt(Mi.color,
|
|
1102
|
+
${vt(Mi.color,io.buttonsColor)};
|
|
1102
1103
|
}
|
|
1103
1104
|
|
|
1104
1105
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1111,37 +1112,37 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1111
1112
|
top: 0;
|
|
1112
1113
|
left: -1px;
|
|
1113
1114
|
bottom: 0;
|
|
1114
|
-
background: linear-gradient(to right, ${
|
|
1115
|
+
background: linear-gradient(to right, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1115
1116
|
}
|
|
1116
1117
|
|
|
1117
1118
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1118
1119
|
top: -1px;
|
|
1119
1120
|
left: 0;
|
|
1120
1121
|
right: 0;
|
|
1121
|
-
background: linear-gradient(to bottom, ${
|
|
1122
|
+
background: linear-gradient(to bottom, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1122
1123
|
}
|
|
1123
1124
|
|
|
1124
1125
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1125
1126
|
top: 0;
|
|
1126
1127
|
right: -1px;
|
|
1127
1128
|
bottom: 0;
|
|
1128
|
-
background: linear-gradient(to left, ${
|
|
1129
|
+
background: linear-gradient(to left, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1129
1130
|
}
|
|
1130
1131
|
|
|
1131
1132
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1132
1133
|
left: 0;
|
|
1133
1134
|
right: 0;
|
|
1134
1135
|
bottom: -1px;
|
|
1135
|
-
background: linear-gradient(to top, ${
|
|
1136
|
+
background: linear-gradient(to top, ${io.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1136
1137
|
}
|
|
1137
1138
|
|
|
1138
1139
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1139
1140
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1140
1141
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1141
1142
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1142
|
-
background-color: ${
|
|
1143
|
+
background-color: ${io.colorSurface};
|
|
1143
1144
|
}
|
|
1144
|
-
`,
|
|
1145
|
+
`,eo([o({type:Boolean})],so.prototype,"horizontal",void 0),eo([o({type:Boolean})],so.prototype,"hideScrollbar",void 0),eo([o({type:Boolean})],so.prototype,"controls",void 0),eo([o({type:Boolean})],so.prototype,"limitSize",void 0),eo([s()],so.prototype,"elements",void 0),eo([s()],so.prototype,"currentElement",void 0),eo([s()],so.prototype,"withScroll",void 0),eo([s()],so.prototype,"startReached",void 0),eo([s()],so.prototype,"endReached",void 0),eo([r(".ft-snap-scroll--content")],so.prototype,"contentSlot",void 0),c("ft-snap-scroll")(so);var no=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const ro={colorOutline:ut.external(bt.colorOutline,"Design system"),colorOnSurface:ut.external(bt.colorOnSurface,"Design system"),colorOnSurfaceMedium:ut.external(bt.colorOnSurfaceMedium,"Design system"),colorPrimary:ut.external(bt.colorPrimary,"Design system"),colorSurface:ut.external(bt.colorSurface,"Design system"),transitionDuration:ut.external(bt.transitionDuration,"Design system"),transitionTimingFunction:ut.external(bt.transitionTimingFunction,"Design system")};class lo extends CustomEvent{constructor(t){super("change",{detail:t})}}class ao extends yt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return _e(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected));let o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return V`
|
|
1145
1146
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1146
1147
|
part="container">
|
|
1147
1148
|
${this.label||i?V`
|
|
@@ -1210,7 +1211,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1210
1211
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1211
1212
|
noValuesLabel="${this.noValuesLabel}"
|
|
1212
1213
|
></ft-filter-level>
|
|
1213
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new
|
|
1214
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new lo(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}ao.elementDefinitions={"ft-button":Ui,"ft-filter-level":to,"ft-snap-scroll":so,"ft-typography":Pe},ao.styles=[Le,x`
|
|
1214
1215
|
:host {
|
|
1215
1216
|
display: flex;
|
|
1216
1217
|
max-height: 100%;
|
|
@@ -1223,7 +1224,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1223
1224
|
flex-direction: column;
|
|
1224
1225
|
max-height: 100%;
|
|
1225
1226
|
max-width: 100%;
|
|
1226
|
-
color: ${
|
|
1227
|
+
color: ${ro.colorOnSurface};
|
|
1227
1228
|
}
|
|
1228
1229
|
|
|
1229
1230
|
.ft-filter--header {
|
|
@@ -1259,8 +1260,8 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1259
1260
|
padding: 0 10px;
|
|
1260
1261
|
overflow: hidden;
|
|
1261
1262
|
height: 32px;
|
|
1262
|
-
transition: height ${
|
|
1263
|
-
margin ${
|
|
1263
|
+
transition: height ${ro.transitionDuration} ${ro.transitionTimingFunction},
|
|
1264
|
+
margin ${ro.transitionDuration} ${ro.transitionTimingFunction};
|
|
1264
1265
|
transition-delay: 500ms;
|
|
1265
1266
|
}
|
|
1266
1267
|
|
|
@@ -1273,15 +1274,15 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1273
1274
|
display: block;
|
|
1274
1275
|
width: 100%;
|
|
1275
1276
|
border-radius: 4px;
|
|
1276
|
-
border: 1px solid ${
|
|
1277
|
+
border: 1px solid ${ro.colorOutline};
|
|
1277
1278
|
padding: 4px;
|
|
1278
|
-
background-color: ${
|
|
1279
|
-
color: ${
|
|
1280
|
-
outline-color: ${
|
|
1279
|
+
background-color: ${ro.colorSurface};
|
|
1280
|
+
color: ${ro.colorOnSurface};
|
|
1281
|
+
outline-color: ${ro.colorPrimary};
|
|
1281
1282
|
}
|
|
1282
1283
|
|
|
1283
1284
|
input::placeholder {
|
|
1284
|
-
color: ${
|
|
1285
|
+
color: ${ro.colorOnSurfaceMedium};
|
|
1285
1286
|
}
|
|
1286
1287
|
|
|
1287
1288
|
.ft-filter--values {
|
|
@@ -1293,7 +1294,7 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1293
1294
|
}
|
|
1294
1295
|
|
|
1295
1296
|
.ft-filter--separator {
|
|
1296
|
-
border-top: 1px solid ${
|
|
1297
|
+
border-top: 1px solid ${ro.colorOutline};
|
|
1297
1298
|
margin: 4px 10px;
|
|
1298
1299
|
}
|
|
1299
1300
|
|
|
@@ -1318,6 +1319,6 @@ class mi extends Ke{constructor(t){if(super(t),this.it=J,t.type!==He)throw Error
|
|
|
1318
1319
|
slot {
|
|
1319
1320
|
display: none;
|
|
1320
1321
|
}
|
|
1321
|
-
`],
|
|
1322
|
+
`],no([o({type:String})],ao.prototype,"id",void 0),no([o({type:String})],ao.prototype,"label",void 0),no([o({type:String})],ao.prototype,"filterPlaceHolder",void 0),no([o({type:String})],ao.prototype,"clearButtonLabel",void 0),no([o({type:String})],ao.prototype,"moreValuesButtonLabel",void 0),no([o({type:String})],ao.prototype,"noValuesLabel",void 0),no([p([])],ao.prototype,"options",void 0),no([o({type:Boolean})],ao.prototype,"multivalued",void 0),no([o({type:Boolean})],ao.prototype,"disabled",void 0),no([o({type:Boolean})],ao.prototype,"raiseSelectedOptions",void 0),no([o({type:Number})],ao.prototype,"displayedValuesLimit",void 0),no([r(".ft-filter--slot")],ao.prototype,"slotElement",void 0),no([r(".ft-filter--container")],ao.prototype,"container",void 0),no([r(".ft-filter--values")],ao.prototype,"valuesContainer",void 0),no([r(".ft-filter--levels")],ao.prototype,"levelsContainer",void 0),no([r(".ft-filter--levels ft-filter-level:last-child")],ao.prototype,"lastLevel",void 0),no([r(".ft-filter--filter input")],ao.prototype,"filterInput",void 0),no([function(t){return n({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],ao.prototype,"levels",void 0),no([s()],ao.prototype,"withScroll",void 0),no([s()],ao.prototype,"filter",void 0),no([s()],ao.prototype,"slideIn",void 0),no([s()],ao.prototype,"slideOut",void 0);var ho=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class co extends yt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return V`
|
|
1322
1323
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1323
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1324
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}co.elementDefinitions={},ho([o({type:String})],co.prototype,"label",void 0),ho([o({type:Object,converter:t=>t})],co.prototype,"value",void 0),ho([o({type:Boolean,reflect:!0})],co.prototype,"selected",void 0),ho([o({type:Object})],co.prototype,"subOptions",void 0),ho([r(".ft-filter-option--slot")],co.prototype,"slotElement",void 0),c("ft-filter")(ao),c("ft-filter-option")(co),t.FtFilter=ao,t.FtFilterChangeEvent=lo,t.FtFilterCssVariables=ro,t.FtFilterOption=co,Object.defineProperty(t,"i",{value:!0})}({});
|