@fluid-topics/ft-filter 1.0.58 → 1.0.59
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 +9 -9
- package/build/ft-filter.min.js +217 -217
- 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,r=new WeakMap,n=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&&(n.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.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){const e=this._definitionsByTag.get(t);return e?.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=n.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):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=s.get(this);t?.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 r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,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=void 0)=>{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 r{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 n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=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&&(n.set(s,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.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){const e=this._definitionsByTag.get(t);return e?.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=n.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):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=s.get(this);t?.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 r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,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=void 0)=>{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 r{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 n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ai){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}s(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -66,7 +66,7 @@ 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 j;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:z}),(null!==(k=O.reactiveElementVersions)&&void 0!==k?k:O.reactiveElementVersions=[]).push("1.6.1");const B=window,F=B.trustedTypes,U=F?F.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,
|
|
69
|
+
var j;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},null==E||E({ReactiveElement:z}),(null!==(k=O.reactiveElementVersions)&&void 0!==k?k:O.reactiveElementVersions=[]).push("1.6.1");const B=window,F=B.trustedTypes,U=F?F.createPolicy("lit-html",{createHTML:t=>t}):void 0,L="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,A="?"+T,D=`<${A}>`,I=document,P=()=>I.createComment(""),_=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,W=t=>H(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),V="[ \t\n\f\r]",K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,J=/>/g,q=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),X=/'/g,G=/"/g,Y=/^(?:script|style|textarea|title)$/i,Q=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),it=new WeakMap,ot=I.createTreeWalker(I,129,null,!1),st=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=K;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===K?"!--"===a[1]?n=Z:void 0!==a[1]?n=J:void 0!==a[2]?(Y.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=q):void 0!==a[3]&&(n=q):n===q?">"===a[0]?(n=null!=s?s:K,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?q:'"'===a[3]?G:X):n===G||n===X?n=q:n===Z||n===J?n=K:(n=q,s=void 0);const p=n===q&&t[e+1].startsWith("/>")?" ":"";r+=n===K?i+D:h>=0?(o.push(l),i.slice(0,h)+L+i.slice(h)+T+p):i+T+(-2===h?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==U?U.createHTML(l):l,o]};class rt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,h]=st(t,e);if(this.el=rt.createElement(a,i),ot.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=ot.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(L)||e.startsWith(T)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+L).split(T),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?ct:"?"===e[1]?dt:"@"===e[1]?ft:ht})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(Y.test(o.tagName)){const t=o.textContent.split(T),e=t.length-1;if(e>0){o.textContent=F?F.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),ot.nextNode(),l.push({type:2,index:++s});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(T,t+1));)l.push({type:7,index:s}),t+=T.length-1}s++}}static createElement(t,e){const i=I.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,o){var s,r,n,l;if(e===tt)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=_(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=nt(t,a._$AS(t,e.values),a,o)),e}class lt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:I).importNode(i,!0);ot.currentNode=s;let r=ot.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new at(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new ut(r,this,t)),this._$AV.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=ot.nextNode(),n++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class at{constructor(t,e,i,o){var s;this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),_(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):W(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==et&&_(this._$AH)?this._$AA.nextSibling.data=t:this.$(I.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=rt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new lt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new rt(t)),e}T(t){H(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 at(this.k(P()),this.k(P()),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._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ht{constructor(t,e,i,o,s){this.type=1,this._$AH=et,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=et}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=nt(this,t,e,0),r=!_(t)||t!==this._$AH&&t!==tt,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=nt(this,o[i+n],e,n),l===tt&&(l=this._$AH[n]),r||(r=!_(l)||l!==this._$AH[n]),l===et?t=et:t!==et&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class ct extends ht{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}const pt=F?F.emptyScript:"";class dt extends ht{constructor(){super(...arguments),this.type=4}j(t){t&&t!==et?this.element.setAttribute(this.name,pt):this.element.removeAttribute(this.name)}}class ft extends ht{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=nt(this,t,e,0))&&void 0!==i?i:et)===tt)return;const o=this._$AH,s=t===et&&o!==et||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==et&&(o===et||s);s&&this.element.removeEventListener(this.name,this,o),r&&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 ut{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){nt(this,t)}}const vt={O:L,P:T,A,C:1,M:st,L:lt,D:W,R:nt,I:at,V:ht,H:dt,N:ft,U:ct,F:ut},bt=B.litHtmlPolyfillSupport;null==bt||bt(rt,at),(null!==(j=B.litHtmlVersions)&&void 0!==j?j:B.litHtmlVersions=[]).push("2.7.3");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
@@ -104,125 +104,125 @@ var xt,yt;let gt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
104
104
|
display: inline-block;
|
|
105
105
|
width: 0;
|
|
106
106
|
}
|
|
107
|
-
`;
|
|
107
|
+
`;window.ftReduxStores||(window.ftReduxStores={});const Bt=Symbol("elementInternals");var Ft,Ut,Lt;const Tt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Lt=null===(Ut=null===(Ft=window.safari)||void 0===Ft?void 0:Ft.pushNotification)||void 0===Ut?void 0:Ut.toString())&&void 0!==Lt?Lt:""),At=Symbol.for(""),Dt=t=>{if((null==t?void 0:t.r)===At)return null==t?void 0:t._$litStatic$},It=t=>({_$litStatic$:t,r:At}),Pt=new Map,_t=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(r=i[h],s=Dt(r));)a+=s+e[++h],c=!0;h!==o&&l.push(r),n.push(a),h++}if(h===o&&n.push(e[o]),c){const t=n.join("$$lit$$");void 0===(e=Pt.get(t))&&(n.raw=n,Pt.set(t,e=n)),i=l}return t(e,...i)})(Q);
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
|
-
*/var
|
|
112
|
+
*/var Ht;!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"}(Ht||(Ht={}));const Wt=$t.extend("--ft-typography-font-family",kt.titleFont),Vt=$t.extend("--ft-typography-font-family",kt.contentFont),Kt={fontFamily:Vt,fontSize:$t.create("--ft-typography-font-size","SIZE","16px"),fontWeight:$t.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:$t.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:$t.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:$t.create("--ft-typography-text-transform","UNKNOWN","inherit")},Zt=$t.extend("--ft-typography-title-font-family",Wt),Jt=$t.extend("--ft-typography-title-font-size",Kt.fontSize,"20px"),qt=$t.extend("--ft-typography-title-font-weight",Kt.fontWeight,"normal"),Xt=$t.extend("--ft-typography-title-letter-spacing",Kt.letterSpacing,"0.15px"),Gt=$t.extend("--ft-typography-title-line-height",Kt.lineHeight,"1.2"),Yt=$t.extend("--ft-typography-title-text-transform",Kt.textTransform,"inherit"),Qt=$t.extend("--ft-typography-title-dense-font-family",Wt),te=$t.extend("--ft-typography-title-dense-font-size",Kt.fontSize,"14px"),ee=$t.extend("--ft-typography-title-dense-font-weight",Kt.fontWeight,"normal"),ie=$t.extend("--ft-typography-title-dense-letter-spacing",Kt.letterSpacing,"0.105px"),oe=$t.extend("--ft-typography-title-dense-line-height",Kt.lineHeight,"1.7"),se=$t.extend("--ft-typography-title-dense-text-transform",Kt.textTransform,"inherit"),re=$t.extend("--ft-typography-subtitle1-font-family",Vt),ne=$t.extend("--ft-typography-subtitle1-font-size",Kt.fontSize,"16px"),le=$t.extend("--ft-typography-subtitle1-font-weight",Kt.fontWeight,"600"),ae=$t.extend("--ft-typography-subtitle1-letter-spacing",Kt.letterSpacing,"0.144px"),he=$t.extend("--ft-typography-subtitle1-line-height",Kt.lineHeight,"1.5"),ce=$t.extend("--ft-typography-subtitle1-text-transform",Kt.textTransform,"inherit"),pe=$t.extend("--ft-typography-subtitle2-font-family",Vt),de=$t.extend("--ft-typography-subtitle2-font-size",Kt.fontSize,"14px"),fe=$t.extend("--ft-typography-subtitle2-font-weight",Kt.fontWeight,"normal"),ue=$t.extend("--ft-typography-subtitle2-letter-spacing",Kt.letterSpacing,"0.098px"),ve=$t.extend("--ft-typography-subtitle2-line-height",Kt.lineHeight,"1.7"),be=$t.extend("--ft-typography-subtitle2-text-transform",Kt.textTransform,"inherit"),xe=$t.extend("--ft-typography-body1-font-family",Vt),ye=$t.extend("--ft-typography-body1-font-size",Kt.fontSize,"16px"),ge=$t.extend("--ft-typography-body1-font-weight",Kt.fontWeight,"normal"),me=$t.extend("--ft-typography-body1-letter-spacing",Kt.letterSpacing,"0.496px"),$e=$t.extend("--ft-typography-body1-line-height",Kt.lineHeight,"1.5"),we=$t.extend("--ft-typography-body1-text-transform",Kt.textTransform,"inherit"),ke={fontFamily:$t.extend("--ft-typography-body2-font-family",Vt),fontSize:$t.extend("--ft-typography-body2-font-size",Kt.fontSize,"14px"),fontWeight:$t.extend("--ft-typography-body2-font-weight",Kt.fontWeight,"normal"),letterSpacing:$t.extend("--ft-typography-body2-letter-spacing",Kt.letterSpacing,"0.252px"),lineHeight:$t.extend("--ft-typography-body2-line-height",Kt.lineHeight,"1.4"),textTransform:$t.extend("--ft-typography-body2-text-transform",Kt.textTransform,"inherit")},Oe=$t.extend("--ft-typography-caption-font-family",Vt),Se=$t.extend("--ft-typography-caption-font-size",Kt.fontSize,"12px"),Ce=$t.extend("--ft-typography-caption-font-weight",Kt.fontWeight,"normal"),Ee=$t.extend("--ft-typography-caption-letter-spacing",Kt.letterSpacing,"0.396px"),Ne=$t.extend("--ft-typography-caption-line-height",Kt.lineHeight,"1.33"),Re=$t.extend("--ft-typography-caption-text-transform",Kt.textTransform,"inherit"),Me=$t.extend("--ft-typography-breadcrumb-font-family",Vt),ze=$t.extend("--ft-typography-breadcrumb-font-size",Kt.fontSize,"10px"),je=$t.extend("--ft-typography-breadcrumb-font-weight",Kt.fontWeight,"normal"),Be=$t.extend("--ft-typography-breadcrumb-letter-spacing",Kt.letterSpacing,"0.33px"),Fe=$t.extend("--ft-typography-breadcrumb-line-height",Kt.lineHeight,"1.6"),Ue=$t.extend("--ft-typography-breadcrumb-text-transform",Kt.textTransform,"inherit"),Le=$t.extend("--ft-typography-overline-font-family",Vt),Te=$t.extend("--ft-typography-overline-font-size",Kt.fontSize,"10px"),Ae=$t.extend("--ft-typography-overline-font-weight",Kt.fontWeight,"normal"),De=$t.extend("--ft-typography-overline-letter-spacing",Kt.letterSpacing,"1.5px"),Ie=$t.extend("--ft-typography-overline-line-height",Kt.lineHeight,"1.6"),Pe=$t.extend("--ft-typography-overline-text-transform",Kt.textTransform,"uppercase"),_e={fontFamily:$t.extend("--ft-typography-button-font-family",Vt),fontSize:$t.extend("--ft-typography-button-font-size",Kt.fontSize,"14px"),fontWeight:$t.extend("--ft-typography-button-font-weight",Kt.fontWeight,"600"),letterSpacing:$t.extend("--ft-typography-button-letter-spacing",Kt.letterSpacing,"1.246px"),lineHeight:$t.extend("--ft-typography-button-line-height",Kt.lineHeight,"1.15"),textTransform:$t.extend("--ft-typography-button-text-transform",Kt.textTransform,"uppercase")},He=m`
|
|
113
113
|
.ft-typography--title {
|
|
114
|
-
font-family: ${
|
|
115
|
-
font-size: ${
|
|
116
|
-
font-weight: ${
|
|
117
|
-
letter-spacing: ${
|
|
118
|
-
line-height: ${
|
|
119
|
-
text-transform: ${
|
|
120
|
-
}
|
|
121
|
-
`,He=m`
|
|
122
|
-
.ft-typography--title-dense {
|
|
123
|
-
font-family: ${Yt};
|
|
124
|
-
font-size: ${Qt};
|
|
125
|
-
font-weight: ${te};
|
|
126
|
-
letter-spacing: ${ee};
|
|
127
|
-
line-height: ${ie};
|
|
128
|
-
text-transform: ${oe};
|
|
114
|
+
font-family: ${Zt};
|
|
115
|
+
font-size: ${Jt};
|
|
116
|
+
font-weight: ${qt};
|
|
117
|
+
letter-spacing: ${Xt};
|
|
118
|
+
line-height: ${Gt};
|
|
119
|
+
text-transform: ${Yt};
|
|
129
120
|
}
|
|
130
121
|
`,We=m`
|
|
131
|
-
.ft-typography--
|
|
132
|
-
font-family: ${
|
|
133
|
-
font-size: ${
|
|
134
|
-
font-weight: ${
|
|
135
|
-
letter-spacing: ${
|
|
136
|
-
line-height: ${
|
|
137
|
-
text-transform: ${
|
|
122
|
+
.ft-typography--title-dense {
|
|
123
|
+
font-family: ${Qt};
|
|
124
|
+
font-size: ${te};
|
|
125
|
+
font-weight: ${ee};
|
|
126
|
+
letter-spacing: ${ie};
|
|
127
|
+
line-height: ${oe};
|
|
128
|
+
text-transform: ${se};
|
|
138
129
|
}
|
|
139
130
|
`,Ve=m`
|
|
131
|
+
.ft-typography--subtitle1 {
|
|
132
|
+
font-family: ${re};
|
|
133
|
+
font-size: ${ne};
|
|
134
|
+
font-weight: ${le};
|
|
135
|
+
letter-spacing: ${ae};
|
|
136
|
+
line-height: ${he};
|
|
137
|
+
text-transform: ${ce};
|
|
138
|
+
}
|
|
139
|
+
`,Ke=m`
|
|
140
140
|
.ft-typography--subtitle2 {
|
|
141
|
-
font-family: ${
|
|
142
|
-
font-size: ${
|
|
143
|
-
font-weight: ${
|
|
144
|
-
letter-spacing: ${
|
|
145
|
-
line-height: ${
|
|
146
|
-
text-transform: ${
|
|
141
|
+
font-family: ${pe};
|
|
142
|
+
font-size: ${de};
|
|
143
|
+
font-weight: ${fe};
|
|
144
|
+
letter-spacing: ${ue};
|
|
145
|
+
line-height: ${ve};
|
|
146
|
+
text-transform: ${be};
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
`,
|
|
149
|
+
`,Ze=m`
|
|
150
150
|
.ft-typography--body1 {
|
|
151
|
-
font-family: ${
|
|
152
|
-
font-size: ${
|
|
153
|
-
font-weight: ${
|
|
154
|
-
letter-spacing: ${
|
|
155
|
-
line-height: ${
|
|
156
|
-
text-transform: ${
|
|
151
|
+
font-family: ${xe};
|
|
152
|
+
font-size: ${ye};
|
|
153
|
+
font-weight: ${ge};
|
|
154
|
+
letter-spacing: ${me};
|
|
155
|
+
line-height: ${$e};
|
|
156
|
+
text-transform: ${we};
|
|
157
157
|
}
|
|
158
|
-
`,
|
|
158
|
+
`,Je=m`
|
|
159
159
|
.ft-typography--body2 {
|
|
160
|
-
font-family: ${
|
|
161
|
-
font-size: ${
|
|
162
|
-
font-weight: ${
|
|
163
|
-
letter-spacing: ${
|
|
164
|
-
line-height: ${
|
|
165
|
-
text-transform: ${
|
|
160
|
+
font-family: ${ke.fontFamily};
|
|
161
|
+
font-size: ${ke.fontSize};
|
|
162
|
+
font-weight: ${ke.fontWeight};
|
|
163
|
+
letter-spacing: ${ke.letterSpacing};
|
|
164
|
+
line-height: ${ke.lineHeight};
|
|
165
|
+
text-transform: ${ke.textTransform};
|
|
166
166
|
}
|
|
167
|
-
`,
|
|
167
|
+
`,qe=m`
|
|
168
168
|
.ft-typography--caption {
|
|
169
|
-
font-family: ${
|
|
170
|
-
font-size: ${
|
|
171
|
-
font-weight: ${
|
|
172
|
-
letter-spacing: ${
|
|
173
|
-
line-height: ${
|
|
174
|
-
text-transform: ${
|
|
169
|
+
font-family: ${Oe};
|
|
170
|
+
font-size: ${Se};
|
|
171
|
+
font-weight: ${Ce};
|
|
172
|
+
letter-spacing: ${Ee};
|
|
173
|
+
line-height: ${Ne};
|
|
174
|
+
text-transform: ${Re};
|
|
175
175
|
}
|
|
176
|
-
`,
|
|
176
|
+
`,Xe=m`
|
|
177
177
|
.ft-typography--breadcrumb {
|
|
178
|
-
font-family: ${
|
|
179
|
-
font-size: ${
|
|
180
|
-
font-weight: ${
|
|
181
|
-
letter-spacing: ${
|
|
182
|
-
line-height: ${
|
|
183
|
-
text-transform: ${
|
|
178
|
+
font-family: ${Me};
|
|
179
|
+
font-size: ${ze};
|
|
180
|
+
font-weight: ${je};
|
|
181
|
+
letter-spacing: ${Be};
|
|
182
|
+
line-height: ${Fe};
|
|
183
|
+
text-transform: ${Ue};
|
|
184
184
|
}
|
|
185
|
-
`,
|
|
185
|
+
`,Ge=m`
|
|
186
186
|
.ft-typography--overline {
|
|
187
|
-
font-family: ${
|
|
188
|
-
font-size: ${
|
|
189
|
-
font-weight: ${
|
|
187
|
+
font-family: ${Le};
|
|
188
|
+
font-size: ${Te};
|
|
189
|
+
font-weight: ${Ae};
|
|
190
190
|
letter-spacing: ${De};
|
|
191
|
-
line-height: ${
|
|
192
|
-
text-transform: ${
|
|
193
|
-
}
|
|
194
|
-
`,Ge=m`
|
|
195
|
-
.ft-typography--button {
|
|
196
|
-
font-family: ${Pe.fontFamily};
|
|
197
|
-
font-size: ${Pe.fontSize};
|
|
198
|
-
font-weight: ${Pe.fontWeight};
|
|
199
|
-
letter-spacing: ${Pe.letterSpacing};
|
|
200
|
-
line-height: ${Pe.lineHeight};
|
|
201
|
-
text-transform: ${Pe.textTransform};
|
|
191
|
+
line-height: ${Ie};
|
|
192
|
+
text-transform: ${Pe};
|
|
202
193
|
}
|
|
203
194
|
`,Ye=m`
|
|
195
|
+
.ft-typography--button {
|
|
196
|
+
font-family: ${_e.fontFamily};
|
|
197
|
+
font-size: ${_e.fontSize};
|
|
198
|
+
font-weight: ${_e.fontWeight};
|
|
199
|
+
letter-spacing: ${_e.letterSpacing};
|
|
200
|
+
line-height: ${_e.lineHeight};
|
|
201
|
+
text-transform: ${_e.textTransform};
|
|
202
|
+
}
|
|
203
|
+
`,Qe=m`
|
|
204
204
|
.ft-typography {
|
|
205
205
|
vertical-align: inherit;
|
|
206
206
|
}
|
|
207
|
-
`;var
|
|
208
|
-
<${
|
|
207
|
+
`;var ti=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ei extends Mt{constructor(){super(...arguments),this.variant=Ht.body1}render(){return this.element?_t`
|
|
208
|
+
<${It(this.element)}
|
|
209
209
|
class="ft-typography ft-typography--${this.variant}">
|
|
210
210
|
<slot></slot>
|
|
211
|
-
</${
|
|
212
|
-
`:
|
|
211
|
+
</${It(this.element)}>
|
|
212
|
+
`:_t`
|
|
213
213
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
214
|
-
`}}
|
|
214
|
+
`}}ei.styles=[He,We,Ve,Ke,Ze,Je,qe,Xe,Ge,Ye,Qe],ti([o()],ei.prototype,"element",void 0),ti([o()],ei.prototype,"variant",void 0),d("ft-typography")(ei);
|
|
215
215
|
/**
|
|
216
216
|
* @license
|
|
217
217
|
* Copyright 2017 Google LLC
|
|
218
218
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
219
219
|
*/
|
|
220
|
-
const
|
|
220
|
+
const ii=1,oi=2,si=t=>(...e)=>({_$litDirective$:t,values:e});class ri{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)}}
|
|
221
221
|
/**
|
|
222
222
|
* @license
|
|
223
223
|
* Copyright 2020 Google LLC
|
|
224
224
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
225
|
-
*/const{I:
|
|
225
|
+
*/const{I:ni}=vt,li=()=>document.createComment(""),ai=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(li(),r),o=s.insertBefore(li(),r);i=new ni(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==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)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},hi=(t,e,i=t)=>(t._$AI(e,i),t),ci={},pi=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}},di=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},fi=si(class extends ri{constructor(t){if(super(t),t.type!==oi)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.dt(e,i,o);if(!Array.isArray(r))return this.ht=l,n;const a=null!==(s=this.ht)&&void 0!==s?s:this.ht=[],h=[];let c,p,d=0,f=r.length-1,u=0,v=n.length-1;for(;d<=f&&u<=v;)if(null===r[d])d++;else if(null===r[f])f--;else if(a[d]===l[u])h[u]=hi(r[d],n[u]),d++,u++;else if(a[f]===l[v])h[v]=hi(r[f],n[v]),f--,v--;else if(a[d]===l[v])h[v]=hi(r[d],n[v]),ai(t,h[v+1],r[d]),d++,v--;else if(a[f]===l[u])h[u]=hi(r[f],n[u]),ai(t,r[d],r[f]),f--,u++;else if(void 0===c&&(c=di(l,u,v),p=di(a,d,f)),c.has(a[d]))if(c.has(a[f])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=ai(t,r[d]);hi(e,n[u]),h[u]=e}else h[u]=hi(i,n[u]),ai(t,r[d],i),r[e]=null;u++}else pi(r[f]),f--;else pi(r[d]),d++;for(;u<=v;){const e=ai(t,h[v+1]);hi(e,n[u]),h[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&pi(t)}return this.ht=l,((t,e=ci)=>{t._$AH=e})(t,h),tt}}),ui=si(class extends ri{constructor(t){var e;if(super(t),t.type!==ii||"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.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const s=t.element.classList;this.it.forEach((t=>{t in e||(s.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.it.add(t)):(s.remove(t),this.it.delete(t)))}return tt}}),vi=$t.extend("--ft-ripple-color",kt.colorContent),bi={color:vi,backgroundColor:$t.extend("--ft-ripple-background-color",vi),opacityContentOnSurfacePressed:$t.external(kt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:$t.external(kt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:$t.external(kt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:$t.external(kt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:$t.create("--ft-ripple-border-radius","SIZE","0px")},xi=$t.extend("--ft-ripple-color",kt.colorPrimary),yi=xi,gi=$t.extend("--ft-ripple-background-color",xi),mi=$t.extend("--ft-ripple-color",kt.colorSecondary),$i=mi,wi=$t.extend("--ft-ripple-background-color",mi),ki=m`
|
|
226
226
|
:host {
|
|
227
227
|
display: contents;
|
|
228
228
|
}
|
|
@@ -235,7 +235,7 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
235
235
|
|
|
236
236
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
237
237
|
overflow: hidden;
|
|
238
|
-
border-radius: ${
|
|
238
|
+
border-radius: ${bi.borderRadius};
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.ft-ripple .ft-ripple--background,
|
|
@@ -269,27 +269,27 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.ft-ripple .ft-ripple--background {
|
|
272
|
-
background-color: ${
|
|
272
|
+
background-color: ${bi.backgroundColor};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.ft-ripple .ft-ripple--effect {
|
|
276
|
-
background-color: ${
|
|
276
|
+
background-color: ${bi.color};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
280
|
-
background-color: ${
|
|
280
|
+
background-color: ${wi};
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
284
|
-
background-color: ${
|
|
284
|
+
background-color: ${$i};
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
288
|
-
background-color: ${
|
|
288
|
+
background-color: ${gi};
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
292
|
-
background-color: ${
|
|
292
|
+
background-color: ${yi};
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
.ft-ripple .ft-ripple--background {
|
|
@@ -319,19 +319,19 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
322
|
-
opacity: ${
|
|
322
|
+
opacity: ${bi.opacityContentOnSurfaceHover};
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
326
|
-
opacity: ${
|
|
326
|
+
opacity: ${bi.opacityContentOnSurfaceSelected};
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
330
|
-
opacity: ${
|
|
330
|
+
opacity: ${bi.opacityContentOnSurfaceFocused};
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
334
|
-
opacity: ${
|
|
334
|
+
opacity: ${bi.opacityContentOnSurfacePressed};
|
|
335
335
|
transform: translate(-50%, -50%) scale(1);
|
|
336
336
|
}
|
|
337
337
|
`;
|
|
@@ -339,18 +339,18 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
339
339
|
* @license
|
|
340
340
|
* Copyright 2017 Google LLC
|
|
341
341
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
342
|
-
*/var
|
|
342
|
+
*/var Oi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Si extends Mt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return Q`
|
|
343
343
|
<style>
|
|
344
344
|
.ft-ripple .ft-ripple--effect {
|
|
345
345
|
left: ${this.originX}px;
|
|
346
346
|
top: ${this.originY}px;
|
|
347
347
|
}
|
|
348
348
|
</style>
|
|
349
|
-
<div class="${
|
|
349
|
+
<div class="${ui(t)}">
|
|
350
350
|
<div class="ft-ripple--background"></div>
|
|
351
351
|
<div class="ft-ripple--effect"></div>
|
|
352
352
|
</div>
|
|
353
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
353
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Si.elementDefinitions={},Si.styles=ki,Oi([o({type:Boolean})],Si.prototype,"primary",void 0),Oi([o({type:Boolean})],Si.prototype,"secondary",void 0),Oi([o({type:Boolean})],Si.prototype,"unbounded",void 0),Oi([o({type:Boolean})],Si.prototype,"activated",void 0),Oi([o({type:Boolean})],Si.prototype,"selected",void 0),Oi([o({type:Boolean})],Si.prototype,"disabled",void 0),Oi([s()],Si.prototype,"hovered",void 0),Oi([s()],Si.prototype,"focused",void 0),Oi([s()],Si.prototype,"pressed",void 0),Oi([s()],Si.prototype,"rippling",void 0),Oi([s()],Si.prototype,"originX",void 0),Oi([s()],Si.prototype,"originY",void 0),Oi([n(".ft-ripple")],Si.prototype,"ripple",void 0),Oi([n(".ft-ripple--effect")],Si.prototype,"rippleEffect",void 0),d("ft-ripple")(Si);const Ci=$t.create("--ft-tooltip-distance","SIZE","4px"),Ei=$t.create("--ft-tooltip-color","COLOR","#FFFFFF"),Ni=$t.create("--ft-tooltip-background-color","COLOR","#666666"),Ri=$t.create("--ft-tooltip-z-index","NUMBER","100"),Mi=$t.external(kt.borderRadiusS,"Design system"),zi=$t.create("--ft-tooltip-max-width","SIZE","150px"),ji=m`
|
|
354
354
|
.ft-tooltip--container {
|
|
355
355
|
display: block;
|
|
356
356
|
}
|
|
@@ -365,21 +365,21 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
365
365
|
box-sizing: border-box;
|
|
366
366
|
overflow: hidden;
|
|
367
367
|
width: max-content;
|
|
368
|
-
max-width: ${
|
|
368
|
+
max-width: ${zi};
|
|
369
369
|
text-align: center;
|
|
370
|
-
padding: ${
|
|
371
|
-
z-index: ${
|
|
370
|
+
padding: ${Ci};
|
|
371
|
+
z-index: ${Ri};
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
.ft-tooltip--content {
|
|
375
375
|
padding: 4px 8px;
|
|
376
|
-
border-radius: ${
|
|
377
|
-
background-color: ${
|
|
378
|
-
color: ${
|
|
376
|
+
border-radius: ${Mi};
|
|
377
|
+
background-color: ${Ni};
|
|
378
|
+
color: ${Ei};
|
|
379
379
|
position: relative;
|
|
380
380
|
word-break: break-word;
|
|
381
381
|
}
|
|
382
|
-
`;var
|
|
382
|
+
`;var Bi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Fi extends Mt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return Q`
|
|
383
383
|
<div part="container"
|
|
384
384
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
385
385
|
@mouseenter=${this.onHover}
|
|
@@ -397,7 +397,7 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
397
397
|
</div>
|
|
398
398
|
</div>
|
|
399
399
|
</div>
|
|
400
|
-
`}
|
|
400
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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.validPosition){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=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,s=(t.offsetWidth-e)/2;let r=0,n=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":n=t.offsetTop-i-this.tooltip.offsetTop,r=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"bottom":n=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,r=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"left":n=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":n=t.offsetTop+o-this.tooltip.offsetTop,r=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const l=this.tooltip.style;l.left=r+"px",l.top=n+"px";const a=this.tooltip.getBoundingClientRect();let h=-a.x,c=a.x+a.width-window.innerWidth;l.left=r+Math.round(this.correctOutOfWindowPixels(h,c))+"px";let p=-a.y,d=a.y+a.height-window.innerHeight;l.top=n+Math.round(this.correctOutOfWindowPixels(p,d))+"px",l.maxWidth=`max(${t.offsetWidth}px, ${zi})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Fi.elementDefinitions={"ft-typography":ei},Fi.styles=ji,Bi([o()],Fi.prototype,"text",void 0),Bi([o({type:Boolean})],Fi.prototype,"manual",void 0),Bi([o({type:Boolean})],Fi.prototype,"inline",void 0),Bi([o({type:Number})],Fi.prototype,"delay",void 0),Bi([o()],Fi.prototype,"position",void 0),Bi([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}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Fi.prototype,"slotNodes",void 0),Bi([n(".ft-tooltip--container")],Fi.prototype,"container",void 0),Bi([n(".ft-tooltip")],Fi.prototype,"tooltip",void 0),Bi([n(".ft-tooltip--content")],Fi.prototype,"tooltipContent",void 0),Bi([s()],Fi.prototype,"visible",void 0),d("ft-tooltip")(Fi);const Ui={color:$t.extend("--ft-loader-color",kt.colorPrimary),size:$t.create("--ft-loader-size","SIZE","80px")},Li=m`
|
|
401
401
|
:host {
|
|
402
402
|
line-height: 0;
|
|
403
403
|
}
|
|
@@ -406,8 +406,8 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
406
406
|
display: inline-block;
|
|
407
407
|
position: relative;
|
|
408
408
|
|
|
409
|
-
width: ${
|
|
410
|
-
height: ${
|
|
409
|
+
width: ${Ui.size};
|
|
410
|
+
height: ${Ui.size};
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
.ft-loader div {
|
|
@@ -416,7 +416,7 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
416
416
|
width: 25%;
|
|
417
417
|
height: 25%;
|
|
418
418
|
border-radius: 50%;
|
|
419
|
-
background: ${
|
|
419
|
+
background: ${Ui.color};
|
|
420
420
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
421
421
|
}
|
|
422
422
|
|
|
@@ -463,23 +463,23 @@ const ei=1,ii=2,oi=t=>(...e)=>({_$litDirective$:t,values:e});class si{constructo
|
|
|
463
463
|
transform: translate(0, 0);
|
|
464
464
|
}
|
|
465
465
|
100% {
|
|
466
|
-
transform: translate(calc(0.35 * ${
|
|
466
|
+
transform: translate(calc(0.35 * ${Ui.size}), 0);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
`;class
|
|
469
|
+
`;class Ti extends Mt{render(){return Q`
|
|
470
470
|
<div class="ft-loader">
|
|
471
471
|
<div></div>
|
|
472
472
|
<div></div>
|
|
473
473
|
<div></div>
|
|
474
474
|
<div></div>
|
|
475
475
|
</div>
|
|
476
|
-
`}}
|
|
476
|
+
`}}Ti.styles=Li,d("ft-loader")(Ti);
|
|
477
477
|
/**
|
|
478
478
|
* @license
|
|
479
479
|
* Copyright 2017 Google LLC
|
|
480
480
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
481
481
|
*/
|
|
482
|
-
class
|
|
482
|
+
class Ai extends ri{constructor(t){if(super(t),this.et=et,t.type!==oi)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===et||null==t)return this.ft=void 0,this.et=t;if(t===tt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ai.directiveName="unsafeHTML",Ai.resultType=1;const Di=si(Ai);var Ii,Pi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ii||(Ii={})),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=""}(Pi||(Pi={})),new Map([...["abw"].map((t=>[t,Pi.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,Pi.AUDIO])),...["avi"].map((t=>[t,Pi.AVI])),...["chm","xhs"].map((t=>[t,Pi.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,Pi.CODE])),...["csv"].map((t=>[t,Pi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Pi.DITA])),...["epub"].map((t=>[t,Pi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Pi.EXCEL])),...["flac"].map((t=>[t,Pi.FLAC])),...["gif"].map((t=>[t,Pi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Pi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Pi.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,Pi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Pi.JPEG])),...["json"].map((t=>[t,Pi.JSON])),...["m4a","m4p"].map((t=>[t,Pi.M4A])),...["mov","qt"].map((t=>[t,Pi.MOV])),...["mp3"].map((t=>[t,Pi.MP3])),...["mp4","m4v"].map((t=>[t,Pi.MP4])),...["ogg","oga"].map((t=>[t,Pi.OGG])),...["pdf","ps"].map((t=>[t,Pi.PDF])),...["png"].map((t=>[t,Pi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Pi.POWERPOINT])),...["rar"].map((t=>[t,Pi.RAR])),...["stp"].map((t=>[t,Pi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Pi.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,Pi.VIDEO])),...["wav"].map((t=>[t,Pi.WAV])),...["wma"].map((t=>[t,Pi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Pi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Pi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Pi.YAML])),...["zip"].map((t=>[t,Pi.ZIP]))]);const _i={size:$t.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:$t.extend("--ft-icon-fluid-topics-font-family",$t.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:$t.extend("--ft-icon-file-format-font-family",$t.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:$t.extend("--ft-icon-material-font-family",$t.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:$t.create("--ft-icon-vertical-align","UNKNOWN","unset")},Hi=m`
|
|
483
483
|
:host, i.ft-icon {
|
|
484
484
|
display: inline-flex;
|
|
485
485
|
align-items: center;
|
|
@@ -488,14 +488,14 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
:host {
|
|
491
|
-
width: ${
|
|
492
|
-
height: ${
|
|
491
|
+
width: ${_i.size};
|
|
492
|
+
height: ${_i.size};
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
i.ft-icon {
|
|
496
496
|
width: 100%;
|
|
497
497
|
height: 100%;
|
|
498
|
-
font-size: ${
|
|
498
|
+
font-size: ${_i.size};
|
|
499
499
|
line-height: 1;
|
|
500
500
|
font-weight: normal;
|
|
501
501
|
text-transform: none;
|
|
@@ -506,33 +506,33 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
506
506
|
text-rendering: auto;
|
|
507
507
|
-webkit-font-smoothing: antialiased;
|
|
508
508
|
-moz-osx-font-smoothing: grayscale;
|
|
509
|
-
vertical-align: ${
|
|
509
|
+
vertical-align: ${_i.verticalAlign};
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
i.ft-icon.ft-icon--fluid-topics {
|
|
513
|
-
font-family: ${
|
|
513
|
+
font-family: ${_i.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
514
514
|
|
|
515
515
|
/* Ugly fix because font is broken */
|
|
516
|
-
font-size: calc(0.75 * ${
|
|
517
|
-
line-height: ${
|
|
516
|
+
font-size: calc(0.75 * ${_i.size});
|
|
517
|
+
line-height: ${_i.size};
|
|
518
518
|
position: relative;
|
|
519
519
|
top: -4%;
|
|
520
520
|
justify-content: center;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
.ft-icon--file-format {
|
|
524
|
-
font-family: ${
|
|
524
|
+
font-family: ${_i.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
.ft-icon--material {
|
|
528
|
-
font-family: ${
|
|
528
|
+
font-family: ${_i.materialFontFamily}, "Material Icons", sans-serif;
|
|
529
529
|
}
|
|
530
|
-
`;var
|
|
530
|
+
`;var Wi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Wi||(Wi={}));var Vi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ki extends Mt{constructor(){super(...arguments),this.resolvedIcon=et}render(){const t=this.variant&&Object.values(Wi).includes(this.variant)?this.variant:Wi.fluid_topics,e=t!==Wi.material||!!this.value;return Q`
|
|
531
531
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
532
532
|
${Di(this.resolvedIcon)}
|
|
533
533
|
<slot ?hidden=${e}></slot>
|
|
534
534
|
</i>
|
|
535
|
-
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
535
|
+
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Wi.file_format:this.resolvedIcon=null!==(t=Pi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Wi.material:this.resolvedIcon=this.value||et;break;default:this.resolvedIcon=null!==(e=Ii[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ki.elementDefinitions={},Ki.styles=Hi,Vi([o()],Ki.prototype,"variant",void 0),Vi([o()],Ki.prototype,"value",void 0),Vi([s()],Ki.prototype,"resolvedIcon",void 0),Vi([n("slot")],Ki.prototype,"slottedContent",void 0),d("ft-icon")(Ki);const Zi=$t.extend("--ft-button-color",kt.colorPrimary),Ji={backgroundColor:$t.extend("--ft-button-background-color",kt.colorSurface),borderRadius:$t.extend("--ft-button-border-radius",kt.borderRadiusL),color:Zi,fontSize:$t.extend("--ft-button-font-size",_e.fontSize),iconSize:$t.create("--ft-button-icon-size","SIZE","24px"),rippleColor:$t.extend("--ft-button-ripple-color",Zi),verticalPadding:$t.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:$t.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:$t.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:$t.external(kt.colorOpacityDisabled,"Design system")},qi=$t.extend("--ft-button-primary-color",$t.extend("--ft-button-color",kt.colorOnPrimary)),Xi={backgroundColor:$t.extend("--ft-button-primary-background-color",$t.extend("--ft-button-background-color",kt.colorPrimary)),color:qi,rippleColor:$t.extend("--ft-button-primary-ripple-color",qi)},Gi=$t.extend("--ft-button-dense-border-radius",$t.extend("--ft-button-border-radius",kt.borderRadiusM)),Yi=$t.create("--ft-button-dense-vertical-padding","SIZE","2px"),Qi=$t.create("--ft-button-dense-horizontal-padding","SIZE","4px"),to=$t.create("--ft-button-dense-icon-padding","SIZE","4px"),eo=[m`
|
|
536
536
|
:host {
|
|
537
537
|
display: inline-block;
|
|
538
538
|
max-width: 100%;
|
|
@@ -543,7 +543,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
543
543
|
box-shadow: 0px 0px 0px transparent;
|
|
544
544
|
border: 0px solid transparent;
|
|
545
545
|
text-shadow: 0px 0px 0px transparent;
|
|
546
|
-
font-size: ${
|
|
546
|
+
font-size: ${Ji.fontSize};
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
button:hover {
|
|
@@ -572,31 +572,31 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
572
572
|
border: none;
|
|
573
573
|
pointer-events: auto;
|
|
574
574
|
|
|
575
|
-
--ft-button-internal-line-height: max(calc(${
|
|
576
|
-
--ft-button-internal-color: ${
|
|
577
|
-
${wt(
|
|
578
|
-
${wt(
|
|
575
|
+
--ft-button-internal-line-height: max(calc(${Ji.fontSize} + 2px), ${Ji.iconSize});
|
|
576
|
+
--ft-button-internal-color: ${Ji.color};
|
|
577
|
+
${wt(_i.size,Ji.iconSize)};
|
|
578
|
+
${wt(bi.color,Ji.rippleColor)};
|
|
579
579
|
|
|
580
|
-
border-radius: ${
|
|
581
|
-
padding: ${
|
|
582
|
-
background-color: ${
|
|
580
|
+
border-radius: ${Ji.borderRadius};
|
|
581
|
+
padding: ${Ji.verticalPadding} ${Ji.horizontalPadding};
|
|
582
|
+
background-color: ${Ji.backgroundColor};
|
|
583
583
|
color: var(--ft-button-internal-color);
|
|
584
584
|
-webkit-mask-image: radial-gradient(white, black);
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
.ft-button.ft-button--outlined {
|
|
588
588
|
border: 1px solid var(--ft-button-internal-color);
|
|
589
|
-
padding: calc(${
|
|
589
|
+
padding: calc(${Ji.verticalPadding} - 1px) calc(${Ji.horizontalPadding} - 1px);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
.ft-button.ft-button--dense {
|
|
593
|
-
padding: ${
|
|
594
|
-
border-radius: ${
|
|
595
|
-
gap: ${
|
|
593
|
+
padding: ${Yi} ${Qi};
|
|
594
|
+
border-radius: ${Gi};
|
|
595
|
+
gap: ${to};
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
599
|
-
padding: calc(${
|
|
599
|
+
padding: calc(${Yi} - 1px) calc(${Qi} - 1px);
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
.ft-button:not([disabled]):hover {
|
|
@@ -604,22 +604,22 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
.ft-button--round {
|
|
607
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
607
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Ji.verticalPadding});
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
.ft-button--round.ft-button--dense {
|
|
611
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
611
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Yi});
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
.ft-button[disabled] {
|
|
615
615
|
filter: grayscale(1);
|
|
616
|
-
opacity: ${
|
|
616
|
+
opacity: ${Ji.opacityDisabled};
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
.ft-button.ft-button--primary {
|
|
620
|
-
background-color: ${
|
|
621
|
-
--ft-button-internal-color: ${
|
|
622
|
-
${wt(
|
|
620
|
+
background-color: ${Xi.backgroundColor};
|
|
621
|
+
--ft-button-internal-color: ${Xi.color};
|
|
622
|
+
${wt(bi.color,Xi.rippleColor)};
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
.ft-button:focus {
|
|
@@ -632,13 +632,13 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
632
632
|
white-space: nowrap;
|
|
633
633
|
text-overflow: ellipsis;
|
|
634
634
|
display: block;
|
|
635
|
-
margin: 0 ${
|
|
636
|
-
${wt(
|
|
637
|
-
${wt(
|
|
635
|
+
margin: 0 ${Ji.iconPadding};
|
|
636
|
+
${wt(_e.fontSize,"1em")};
|
|
637
|
+
${wt(_e.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
.ft-button--dense .ft-button--label {
|
|
641
|
-
margin: 0 ${
|
|
641
|
+
margin: 0 ${to};
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ft-button--label[hidden] {
|
|
@@ -651,13 +651,13 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
.ft-button--label[hidden] + ft-icon {
|
|
654
|
-
margin: 0 calc(${
|
|
655
|
-
padding: 0 ${
|
|
654
|
+
margin: 0 calc(${Ji.horizontalPadding} * -1);
|
|
655
|
+
padding: 0 ${Ji.verticalPadding};
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
659
|
-
margin: 0 calc(${
|
|
660
|
-
padding: 0 ${
|
|
659
|
+
margin: 0 calc(${Qi} * -1);
|
|
660
|
+
padding: 0 ${Yi};
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -666,40 +666,40 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
ft-loader {
|
|
669
|
-
${wt(
|
|
670
|
-
${wt(
|
|
669
|
+
${wt(Ui.size,Ji.iconSize)};
|
|
670
|
+
${wt(Ui.color,"var(--ft-button-internal-color)")};
|
|
671
671
|
}
|
|
672
|
-
`,zt];var
|
|
672
|
+
`,zt];var io=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class oo extends(function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Bt].form}constructor(...t){super(t),this[Bt]=this.attachInternals(),this[Bt].role=e}setFormValue(t){this[Bt].setFormValue(t)}}}(Mt,"button")){constructor(){super(...arguments),this.role="button",this.type="button",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.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}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-no-text-select":!0};return this.addTooltipIfNeeded(Q`
|
|
673
673
|
<button part="button"
|
|
674
|
-
class="${
|
|
674
|
+
class="${ui(t)}"
|
|
675
675
|
aria-label="${this.getLabel()}"
|
|
676
676
|
?disabled=${this.isDisabled()}>
|
|
677
677
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
678
678
|
<ft-typography part="label"
|
|
679
679
|
variant="button"
|
|
680
680
|
element="span"
|
|
681
|
-
class="ft-button--label ${
|
|
681
|
+
class="ft-button--label ${Tt?"ft-safari-ellipsis-fix":""}"
|
|
682
682
|
?hidden=${!this.hasTextContent()}>
|
|
683
683
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
684
684
|
</ft-typography>
|
|
685
685
|
${this.resolveIcon()}
|
|
686
686
|
</button>
|
|
687
687
|
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?Q`
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
688
|
+
<ft-tooltip part="tooltip"
|
|
689
|
+
text="${this.getLabel()}"
|
|
690
|
+
position="${this.tooltipPosition}">
|
|
691
|
+
${t}
|
|
692
|
+
</ft-tooltip>
|
|
693
693
|
`:t}resolveIcon(){return this.loading?Q`
|
|
694
694
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?Q`
|
|
695
|
-
|
|
695
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:et}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}}oo.elementDefinitions={"ft-ripple":Si,"ft-tooltip":Fi,"ft-typography":ei,"ft-icon":Ki,"ft-loader":Ti},oo.styles=[jt,eo],io([o({type:String,reflect:!0})],oo.prototype,"role",void 0),io([o()],oo.prototype,"type",void 0),io([o({type:Boolean})],oo.prototype,"primary",void 0),io([o({type:Boolean})],oo.prototype,"outlined",void 0),io([o({type:Boolean})],oo.prototype,"disabled",void 0),io([o({type:Boolean})],oo.prototype,"dense",void 0),io([o({type:Boolean})],oo.prototype,"round",void 0),io([o()],oo.prototype,"label",void 0),io([o()],oo.prototype,"icon",void 0),io([o()],oo.prototype,"iconVariant",void 0),io([o({type:Boolean})],oo.prototype,"trailingIcon",void 0),io([o({type:Boolean})],oo.prototype,"loading",void 0),io([o()],oo.prototype,"tooltipPosition",void 0),io([o({type:Boolean})],oo.prototype,"hideTooltip",void 0),io([o({type:Boolean})],oo.prototype,"forceTooltip",void 0),io([n(".ft-button")],oo.prototype,"button",void 0),io([n(".ft-button--label slot")],oo.prototype,"slottedContent",void 0),d("ft-button")(oo);const so=$t.extend("--ft-checkbox-text-color",kt.colorOnSurfaceHigh),ro=$t.external(kt.colorPrimary,"Design system"),no=$t.external(kt.colorOnPrimary,"Design system"),lo=$t.extend("--ft-checkbox-border-color",kt.colorOnSurfaceMedium),ao=$t.external(kt.colorOnSurfaceDisabled,"Design system"),ho=m`
|
|
696
696
|
* {
|
|
697
697
|
box-sizing: border-box;
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
.ft-checkbox {
|
|
701
701
|
box-sizing: border-box;
|
|
702
|
-
color: ${
|
|
702
|
+
color: ${so};
|
|
703
703
|
|
|
704
704
|
display: inline-flex;
|
|
705
705
|
align-items: center;
|
|
@@ -707,7 +707,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
.ft-checkbox--disabled {
|
|
710
|
-
color: ${
|
|
710
|
+
color: ${ao};
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
input {
|
|
@@ -731,26 +731,26 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
731
731
|
|
|
732
732
|
.ft-checkbox--box {
|
|
733
733
|
display: flex;
|
|
734
|
-
border: 2px solid ${
|
|
734
|
+
border: 2px solid ${lo};
|
|
735
735
|
border-radius: 2px;
|
|
736
736
|
|
|
737
737
|
width: 18px;
|
|
738
738
|
height: 18px;
|
|
739
739
|
|
|
740
|
-
color: ${
|
|
740
|
+
color: ${no};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
743
|
|
|
744
744
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
745
745
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
746
|
-
border-color: ${
|
|
747
|
-
background-color: ${
|
|
746
|
+
border-color: ${ro};
|
|
747
|
+
background-color: ${ro};
|
|
748
748
|
}
|
|
749
749
|
|
|
750
750
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
751
|
-
border-color: ${
|
|
751
|
+
border-color: ${ao};
|
|
752
752
|
background-color: transparent;
|
|
753
|
-
color: ${
|
|
753
|
+
color: ${ao};
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
.ft-checkbox--checkmark {
|
|
@@ -769,8 +769,8 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
769
769
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
770
770
|
opacity: 1;
|
|
771
771
|
}
|
|
772
|
-
`;var
|
|
773
|
-
<label class="${
|
|
772
|
+
`;var co=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class po extends Mt{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 Q`
|
|
773
|
+
<label class="${ui(t)}" for="checkbox-input">
|
|
774
774
|
<div class="ft-checkbox--box-container">
|
|
775
775
|
<ft-ripple
|
|
776
776
|
?disabled=${this.disabled}
|
|
@@ -795,14 +795,14 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
795
795
|
<slot></slot>
|
|
796
796
|
</ft-typography>
|
|
797
797
|
</label>
|
|
798
|
-
`}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)}}
|
|
798
|
+
`}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)}}po.elementDefinitions={"ft-ripple":Si,"ft-typography":ei},po.styles=ho,co([o()],po.prototype,"name",void 0),co([o({type:Boolean,reflect:!0})],po.prototype,"checked",void 0),co([o({type:Boolean})],po.prototype,"indeterminate",void 0),co([o({type:Boolean})],po.prototype,"disabled",void 0),co([n(".ft-checkbox")],po.prototype,"container",void 0),co([n("ft-ripple")],po.prototype,"ripple",void 0),d("ft-checkbox")(po);const fo=$t.extend("--ft-radio-text-color",kt.colorOnSurfaceHigh),uo=$t.external(kt.colorPrimary,"Design system"),vo=($t.external(kt.colorOnPrimary,"Design system"),$t.extend("--ft-radio-border-color",kt.colorOnSurfaceMedium)),bo=$t.external(kt.colorOnSurfaceDisabled,"Design system"),xo=m`
|
|
799
799
|
* {
|
|
800
800
|
box-sizing: border-box;
|
|
801
801
|
}
|
|
802
802
|
|
|
803
803
|
.ft-radio {
|
|
804
804
|
box-sizing: border-box;
|
|
805
|
-
color: ${
|
|
805
|
+
color: ${fo};
|
|
806
806
|
|
|
807
807
|
display: inline-flex;
|
|
808
808
|
align-items: center;
|
|
@@ -810,7 +810,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
810
810
|
}
|
|
811
811
|
|
|
812
812
|
.ft-radio--disabled {
|
|
813
|
-
color: ${
|
|
813
|
+
color: ${bo};
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
input {
|
|
@@ -833,7 +833,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
.ft-radio--box {
|
|
836
|
-
border: 2px solid ${
|
|
836
|
+
border: 2px solid ${vo};
|
|
837
837
|
border-radius: 50%;
|
|
838
838
|
|
|
839
839
|
display: flex;
|
|
@@ -846,7 +846,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
846
846
|
|
|
847
847
|
.ft-radio--box:after {
|
|
848
848
|
content: " ";
|
|
849
|
-
background-color: ${
|
|
849
|
+
background-color: ${uo};
|
|
850
850
|
|
|
851
851
|
border-radius: 50%;
|
|
852
852
|
|
|
@@ -858,7 +858,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
.ft-radio--checked .ft-radio--box {
|
|
861
|
-
border-color: ${
|
|
861
|
+
border-color: ${uo};
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
|
|
@@ -867,15 +867,15 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
.ft-radio--disabled .ft-radio--box {
|
|
870
|
-
border-color: ${
|
|
870
|
+
border-color: ${bo};
|
|
871
871
|
background-color: transparent;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
.ft-radio--disabled .ft-radio--box:after {
|
|
875
|
-
background-color: ${
|
|
875
|
+
background-color: ${bo};
|
|
876
876
|
}
|
|
877
|
-
`;var
|
|
878
|
-
<div class="${
|
|
877
|
+
`;var yo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class go extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class mo extends Mt{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 Q`
|
|
878
|
+
<div class="${ui(t)}">
|
|
879
879
|
<div class="ft-radio--box-container">
|
|
880
880
|
<ft-ripple
|
|
881
881
|
?disabled=${this.disabled}
|
|
@@ -899,16 +899,16 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
899
899
|
</ft-typography>
|
|
900
900
|
</label>
|
|
901
901
|
</div>
|
|
902
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
902
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new go(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 go(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}mo.elementDefinitions={"ft-ripple":Si,"ft-typography":ei},mo.styles=xo,yo([o()],mo.prototype,"value",void 0),yo([o()],mo.prototype,"name",void 0),yo([o({type:Boolean,reflect:!0})],mo.prototype,"checked",void 0),yo([o({type:Boolean})],mo.prototype,"disabled",void 0),yo([n(".ft-radio")],mo.prototype,"container",void 0),yo([n("ft-ripple")],mo.prototype,"ripple",void 0),yo([n("input")],mo.prototype,"input",void 0);const $o=m`
|
|
903
903
|
:host {
|
|
904
904
|
display: contents;
|
|
905
905
|
}
|
|
906
|
-
`;var
|
|
906
|
+
`;var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends Mt{constructor(){super(...arguments),this.name=""}render(){return Q`
|
|
907
907
|
<slot @slotchange=${this.onSlotChange}
|
|
908
908
|
@change=${this.onChange}
|
|
909
909
|
@keydown=${this.onKeyDown}
|
|
910
910
|
></slot>
|
|
911
|
-
`}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)}}
|
|
911
|
+
`}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)}}ko.elementDefinitions={},ko.styles=$o,wo([o()],ko.prototype,"name",void 0),wo([h()],ko.prototype,"radioButtons",void 0),d("ft-radio")(mo),d("ft-radio-group")(ko);const Oo={borderRadiusM:$t.external(kt.borderRadiusM,"Design system"),colorOutline:$t.external(kt.colorOutline,"Design system"),colorOnSurface:$t.external(kt.colorOnSurface,"Design system"),colorOnSurfaceMedium:$t.external(kt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:$t.external(kt.colorOnSurfaceDisabled,"Design system"),colorPrimary:$t.external(kt.colorPrimary,"Design system"),colorOnPrimary:$t.external(kt.colorOnPrimary,"Design system"),fontFamily:$t.external(ke.fontFamily,"Body2 typography"),fontSize:$t.external(ke.fontSize,"Body2 typography"),fontWeight:$t.external(ke.fontWeight,"Body2 typography"),letterSpacing:$t.external(ke.letterSpacing,"Body2 typography"),lineHeight:$t.external(ke.lineHeight,"Body2 typography"),textTransform:$t.external(ke.textTransform,"Body2 typography")},So=m`
|
|
912
912
|
.ft-filter-level--container {
|
|
913
913
|
display: flex;
|
|
914
914
|
flex-direction: column;
|
|
@@ -922,14 +922,14 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
922
922
|
flex-shrink: 0;
|
|
923
923
|
text-decoration: none;
|
|
924
924
|
position: relative;
|
|
925
|
-
border-radius: ${
|
|
925
|
+
border-radius: ${Oo.borderRadiusM};
|
|
926
926
|
overflow: hidden;
|
|
927
927
|
display: flex;
|
|
928
928
|
align-items: center;
|
|
929
929
|
padding: 4px 4px;
|
|
930
930
|
gap: 4px;
|
|
931
931
|
cursor: pointer;
|
|
932
|
-
color: ${
|
|
932
|
+
color: ${Oo.colorOnSurface};
|
|
933
933
|
}
|
|
934
934
|
|
|
935
935
|
.ft-filter-level--go-back:focus {
|
|
@@ -958,7 +958,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
958
958
|
}
|
|
959
959
|
|
|
960
960
|
ft-button {
|
|
961
|
-
${wt(
|
|
961
|
+
${wt(Ji.color,Oo.colorOnSurface)};
|
|
962
962
|
}
|
|
963
963
|
|
|
964
964
|
ft-radio, ft-checkbox {
|
|
@@ -972,9 +972,9 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
972
972
|
|
|
973
973
|
.ft-filter-level--no-values {
|
|
974
974
|
margin: 10px 0;
|
|
975
|
-
color: ${
|
|
975
|
+
color: ${Oo.colorOnSurfaceMedium};
|
|
976
976
|
}
|
|
977
|
-
`;var
|
|
977
|
+
`;var Co=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Eo extends Mt{constructor(){super(...arguments),this.filterId="",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 Q`
|
|
978
978
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
979
979
|
${null==this.parent?null:Q`
|
|
980
980
|
<div tabindex="0"
|
|
@@ -993,7 +993,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
993
993
|
${this.noValuesLabel}
|
|
994
994
|
</ft-typography>
|
|
995
995
|
`:et}
|
|
996
|
-
${
|
|
996
|
+
${fi(e,(t=>t.value),(t=>{var e;return Q`
|
|
997
997
|
<div class="ft-filter-level--option" part="options">
|
|
998
998
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
999
999
|
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?et:Q`
|
|
@@ -1038,7 +1038,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1038
1038
|
@change=${t=>t.stopPropagation()}>
|
|
1039
1039
|
${t.renderOption?t.renderOption:t.label}
|
|
1040
1040
|
</ft-radio>
|
|
1041
|
-
`}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}))}}
|
|
1041
|
+
`}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}))}}Eo.elementDefinitions={"ft-button":oo,"ft-ripple":Si,"ft-typography":ei,"ft-checkbox":po,"ft-icon":Ki,"ft-radio":mo},Eo.styles=So,Co([o({type:String})],Eo.prototype,"filterId",void 0),Co([o({type:Object})],Eo.prototype,"parent",void 0),Co([o({type:Array})],Eo.prototype,"options",void 0),Co([o({type:Boolean})],Eo.prototype,"multivalued",void 0),Co([o({type:Boolean})],Eo.prototype,"disabled",void 0),Co([o({type:Boolean})],Eo.prototype,"hideSelectedOptions",void 0),Co([o({type:Boolean})],Eo.prototype,"preventNavigation",void 0),Co([o({type:String})],Eo.prototype,"filter",void 0),Co([o({type:String})],Eo.prototype,"moreValuesButtonLabel",void 0),Co([o({type:String})],Eo.prototype,"noValuesLabel",void 0),Co([o({type:Number})],Eo.prototype,"displayedValuesLimit",void 0),Co([n(".ft-filter-level--container")],Eo.prototype,"container",void 0),Co([s()],Eo.prototype,"displayedPages",void 0);const No={buttonsColor:$t.extend("--ft-snap-scroll-buttons-color",kt.colorPrimary),buttonsZIndex:$t.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:$t.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:$t.external(kt.colorSurface,"Design system")},Ro=m`
|
|
1042
1042
|
.ft-snap-scroll {
|
|
1043
1043
|
box-sizing: border-box;
|
|
1044
1044
|
position: relative;
|
|
@@ -1073,7 +1073,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1073
1073
|
flex-wrap: nowrap;
|
|
1074
1074
|
align-items: flex-start;
|
|
1075
1075
|
justify-content: flex-start;
|
|
1076
|
-
gap: ${
|
|
1076
|
+
gap: ${No.gap};
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1116,11 +1116,11 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1116
1116
|
.ft-snap-scroll--next {
|
|
1117
1117
|
position: absolute;
|
|
1118
1118
|
display: flex;
|
|
1119
|
-
z-index: ${
|
|
1119
|
+
z-index: ${No.buttonsZIndex};
|
|
1120
1120
|
opacity: 1;
|
|
1121
1121
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1122
|
-
${wt(
|
|
1123
|
-
${wt(
|
|
1122
|
+
${wt(Ji.backgroundColor,"transparent")};
|
|
1123
|
+
${wt(Ji.color,No.buttonsColor)};
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
1126
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1133,37 +1133,37 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1133
1133
|
top: 0;
|
|
1134
1134
|
left: -1px;
|
|
1135
1135
|
bottom: 0;
|
|
1136
|
-
background: linear-gradient(to right, ${
|
|
1136
|
+
background: linear-gradient(to right, ${No.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1137
1137
|
}
|
|
1138
1138
|
|
|
1139
1139
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1140
1140
|
top: -1px;
|
|
1141
1141
|
left: 0;
|
|
1142
1142
|
right: 0;
|
|
1143
|
-
background: linear-gradient(to bottom, ${
|
|
1143
|
+
background: linear-gradient(to bottom, ${No.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
1146
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1147
1147
|
top: 0;
|
|
1148
1148
|
right: -1px;
|
|
1149
1149
|
bottom: 0;
|
|
1150
|
-
background: linear-gradient(to left, ${
|
|
1150
|
+
background: linear-gradient(to left, ${No.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
1153
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1154
1154
|
left: 0;
|
|
1155
1155
|
right: 0;
|
|
1156
1156
|
bottom: -1px;
|
|
1157
|
-
background: linear-gradient(to top, ${
|
|
1157
|
+
background: linear-gradient(to top, ${No.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
1160
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1161
1161
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1162
1162
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1163
1163
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1164
|
-
background-color: ${
|
|
1164
|
+
background-color: ${No.colorSurface};
|
|
1165
1165
|
}
|
|
1166
|
-
`;var
|
|
1166
|
+
`;var Mo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class zo extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class jo extends Mt{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=ui({"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":Tt}),e=this.controls&&this.withScroll;return Q`
|
|
1167
1167
|
<div part="container" class="${t}">
|
|
1168
1168
|
<ft-button
|
|
1169
1169
|
class="ft-snap-scroll--previous"
|
|
@@ -1187,7 +1187,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1187
1187
|
@click=${this.next}
|
|
1188
1188
|
></ft-button>
|
|
1189
1189
|
</div>
|
|
1190
|
-
`}update(t){super.update(t),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
|
|
1190
|
+
`}update(t){super.update(t),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 zo(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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)}}jo.elementDefinitions={"ft-button":oo},jo.styles=Ro,Mo([o({type:Boolean})],jo.prototype,"horizontal",void 0),Mo([o({type:Boolean})],jo.prototype,"hideScrollbar",void 0),Mo([o({type:Boolean})],jo.prototype,"controls",void 0),Mo([o({type:Boolean})],jo.prototype,"limitSize",void 0),Mo([s()],jo.prototype,"elements",void 0),Mo([s()],jo.prototype,"currentElement",void 0),Mo([s()],jo.prototype,"withScroll",void 0),Mo([s()],jo.prototype,"startReached",void 0),Mo([s()],jo.prototype,"endReached",void 0),Mo([n(".ft-snap-scroll--content")],jo.prototype,"contentSlot",void 0),d("ft-snap-scroll")(jo);const Bo={colorOutline:$t.external(kt.colorOutline,"Design system"),colorOnSurface:$t.external(kt.colorOnSurface,"Design system"),colorOnSurfaceMedium:$t.external(kt.colorOnSurfaceMedium,"Design system"),colorPrimary:$t.external(kt.colorPrimary,"Design system"),colorSurface:$t.external(kt.colorSurface,"Design system"),transitionDuration:$t.external(kt.transitionDuration,"Design system"),transitionTimingFunction:$t.external(kt.transitionTimingFunction,"Design system")},Fo=[qe,m`
|
|
1191
1191
|
:host {
|
|
1192
1192
|
display: flex;
|
|
1193
1193
|
max-height: 100%;
|
|
@@ -1200,7 +1200,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1200
1200
|
flex-direction: column;
|
|
1201
1201
|
max-height: 100%;
|
|
1202
1202
|
max-width: 100%;
|
|
1203
|
-
color: ${
|
|
1203
|
+
color: ${Bo.colorOnSurface};
|
|
1204
1204
|
}
|
|
1205
1205
|
|
|
1206
1206
|
.ft-filter--header {
|
|
@@ -1210,13 +1210,13 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1210
1210
|
flex-shrink: 0;
|
|
1211
1211
|
padding: 0 10px;
|
|
1212
1212
|
margin-bottom: 8px;
|
|
1213
|
-
${wt(
|
|
1213
|
+
${wt(Kt.fontSize,"14px")};
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
1216
|
.ft-filter--header ft-button {
|
|
1217
1217
|
flex-shrink: 0;
|
|
1218
1218
|
margin-left: auto;
|
|
1219
|
-
${wt(
|
|
1219
|
+
${wt(Ji.iconSize,"18px")};
|
|
1220
1220
|
}
|
|
1221
1221
|
|
|
1222
1222
|
.ft-filter--label {
|
|
@@ -1224,8 +1224,8 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1224
1224
|
flex-shrink: 1;
|
|
1225
1225
|
flex-grow: 1;
|
|
1226
1226
|
word-break: break-word;
|
|
1227
|
-
${wt(
|
|
1228
|
-
${wt(
|
|
1227
|
+
${wt(Kt.lineHeight,"22px")};
|
|
1228
|
+
${wt(Kt.fontWeight,"bold")};
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
.ft-filter--filter {
|
|
@@ -1236,8 +1236,8 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1236
1236
|
padding: 0 10px;
|
|
1237
1237
|
overflow: hidden;
|
|
1238
1238
|
height: 32px;
|
|
1239
|
-
transition: height ${
|
|
1240
|
-
margin ${
|
|
1239
|
+
transition: height ${Bo.transitionDuration} ${Bo.transitionTimingFunction},
|
|
1240
|
+
margin ${Bo.transitionDuration} ${Bo.transitionTimingFunction};
|
|
1241
1241
|
transition-delay: 500ms;
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
@@ -1250,15 +1250,15 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1250
1250
|
display: block;
|
|
1251
1251
|
width: 100%;
|
|
1252
1252
|
border-radius: 4px;
|
|
1253
|
-
border: 1px solid ${
|
|
1253
|
+
border: 1px solid ${Bo.colorOutline};
|
|
1254
1254
|
padding: 4px;
|
|
1255
|
-
background-color: ${
|
|
1256
|
-
color: ${
|
|
1257
|
-
outline-color: ${
|
|
1255
|
+
background-color: ${Bo.colorSurface};
|
|
1256
|
+
color: ${Bo.colorOnSurface};
|
|
1257
|
+
outline-color: ${Bo.colorPrimary};
|
|
1258
1258
|
}
|
|
1259
1259
|
|
|
1260
1260
|
input::placeholder {
|
|
1261
|
-
color: ${
|
|
1261
|
+
color: ${Bo.colorOnSurfaceMedium};
|
|
1262
1262
|
}
|
|
1263
1263
|
|
|
1264
1264
|
input:placeholder-shown {
|
|
@@ -1274,7 +1274,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1274
1274
|
}
|
|
1275
1275
|
|
|
1276
1276
|
.ft-filter--separator {
|
|
1277
|
-
border-top: 1px solid ${
|
|
1277
|
+
border-top: 1px solid ${Bo.colorOutline};
|
|
1278
1278
|
margin: 4px 10px;
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
@@ -1299,7 +1299,7 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1299
1299
|
slot:not([name]) {
|
|
1300
1300
|
display: none;
|
|
1301
1301
|
}
|
|
1302
|
-
`];var
|
|
1302
|
+
`];var Uo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Lo extends CustomEvent{constructor(t){super("change",{detail:t})}}class To extends Mt{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.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10),this.lastDispatchedValues=[]}get flatOptions(){return c(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),e=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,i=this.filterPlaceHolder.replace("{0}",this.label);return Q`
|
|
1303
1303
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1304
1304
|
part="container">
|
|
1305
1305
|
${this.label||t?Q`
|
|
@@ -1371,6 +1371,6 @@ class Ti extends si{constructor(t){if(super(t),this.et=et,t.type!==ii)throw Erro
|
|
|
1371
1371
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1372
1372
|
noValuesLabel="${this.noValuesLabel}"
|
|
1373
1373
|
></ft-filter-level>
|
|
1374
|
-
`}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;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;p(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1374
|
+
`}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;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;p(this.lastDispatchedValues,t)||(this.dispatchEvent(new Lo(t)),this.lastDispatchedValues=t)}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)}}To.elementDefinitions={"ft-button":oo,"ft-filter-level":Eo,"ft-snap-scroll":jo,"ft-typography":ei},To.styles=Fo,Uo([o({type:String})],To.prototype,"id",void 0),Uo([o({type:String})],To.prototype,"label",void 0),Uo([o({type:String})],To.prototype,"filterPlaceHolder",void 0),Uo([o({type:String})],To.prototype,"clearButtonLabel",void 0),Uo([o({type:String})],To.prototype,"moreValuesButtonLabel",void 0),Uo([o({type:String})],To.prototype,"noValuesLabel",void 0),Uo([f([])],To.prototype,"options",void 0),Uo([o({type:Boolean})],To.prototype,"multivalued",void 0),Uo([o({type:Boolean})],To.prototype,"disabled",void 0),Uo([o({type:Boolean})],To.prototype,"raiseSelectedOptions",void 0),Uo([o({type:Number})],To.prototype,"displayedValuesLimit",void 0),Uo([o({type:Boolean})],To.prototype,"hideClearButton",void 0),Uo([n(".ft-filter--slot")],To.prototype,"slotElement",void 0),Uo([n(".ft-filter--container")],To.prototype,"container",void 0),Uo([n(".ft-filter--values")],To.prototype,"valuesContainer",void 0),Uo([n(".ft-filter--levels")],To.prototype,"levelsContainer",void 0),Uo([s()],To.prototype,"lastLevelHasHiddenvalues",void 0),Uo([n(".ft-filter--filter input")],To.prototype,"filterInput",void 0),Uo([function(t){return r({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")],To.prototype,"levels",void 0),Uo([s()],To.prototype,"withScroll",void 0),Uo([s()],To.prototype,"filter",void 0),Uo([s()],To.prototype,"slideIn",void 0),Uo([s()],To.prototype,"slideOut",void 0);var Ao=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Do extends Mt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return Q`
|
|
1375
1375
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1376
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Do.elementDefinitions={},
|
|
1376
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Do.elementDefinitions={},Ao([o({type:String})],Do.prototype,"label",void 0),Ao([o({type:Object,converter:t=>t})],Do.prototype,"value",void 0),Ao([o({type:Boolean,reflect:!0})],Do.prototype,"selected",void 0),Ao([o({type:Object})],Do.prototype,"subOptions",void 0),Ao([f({})],Do.prototype,"renderOption",void 0),Ao([n(".ft-filter-option--slot")],Do.prototype,"slotElement",void 0),d("ft-filter")(To),d("ft-filter-option")(Do),t.FtFilter=To,t.FtFilterChangeEvent=Lo,t.FtFilterCssVariables=Bo,t.FtFilterLevelCssVariables=Oo,t.FtFilterOption=Do,t.levelStyles=So,t.styles=Fo}({});
|