@fluid-topics/ft-reader-feedback 0.3.55 → 0.3.56
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-reader-feedback.css.d.ts +6 -0
- package/build/ft-reader-feedback.css.js +25 -3
- package/build/ft-reader-feedback.light.js +569 -554
- package/build/ft-reader-feedback.min.js +596 -581
- package/build/ft-reader-map-feedback.d.ts +5 -0
- package/build/ft-reader-map-feedback.js +66 -36
- package/build/ft-reader-topic-feedback.d.ts +3 -0
- package/build/ft-reader-topic-feedback.js +39 -17
- package/build/utils/labels.d.ts +1 -0
- package/build/utils/labels.js +2 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(t){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
@@ -14,64 +14,64 @@
|
|
|
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,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);p(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(o,t);c||(c=d(t),e.call(o,t,c)),this===window.customElements&&(r.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,h,!0)}const
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);p(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(o,t);c||(c=d(t),e.call(o,t,c)),this===window.customElements&&(r.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)s.delete(t),u(t,h,!0)}const b=this._whenDefinedPromises.get(t);return void 0!==b&&(b.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){v.push(this),o.upgrade.apply(o,arguments),v.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=v[v.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},p=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=b.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let v=[document];const g=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){v.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),v.pop(),t}};g(ShadowRoot,"createElement",document),g(ShadowRoot,"importNode",document),g(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){v.push(this),i.set.call(this,t),v.pop()}})};if(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!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(di){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{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,n=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)}n(!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
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const
|
|
22
|
+
*/const i=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,o)=>void 0!==o?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,o):i(t,e)
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/}function
|
|
27
|
+
*/}function n(t){return o({...t,state:!0})}
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const
|
|
32
|
+
*/const s=({finisher:t,descriptor:e})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,s=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(s.finisher=function(e){t(e,o)}),s}{const n=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(n,o)}}
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/;function
|
|
37
|
+
*/;function r(t,e){return s({descriptor:i=>{const o={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;o.get=function(){var i,o;return void 0===this[e]&&(this[e]=null!==(o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==o?o:null),this[e]}}return o}})}
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
40
40
|
* Copyright 2021 Google LLC
|
|
41
41
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
-
*/var
|
|
42
|
+
*/var a;const l=null!=(null===(a=window.HTMLSlotElement)||void 0===a?void 0:a.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));const h=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function c(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,n;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!c(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!c(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(n=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,n[o]))return!1;for(o=i;0!=o--;){var s=n[o];if(!c(t[s],e[s]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2019 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const
|
|
47
|
+
*/const d=window,p=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),u=new WeakMap;class b{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(p&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const v=t=>new b("string"==typeof t?t:t+"",void 0,f),g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new b(i,t,f)},y=(t,e)=>{p?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=d.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},x=p?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return v(e)})(t):t
|
|
48
48
|
/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/;var
|
|
52
|
+
*/;var m;const $=window,w=$.trustedTypes,k=w?w.emptyScript:"",S=$.reactiveElementPolyfillSupport,O={toAttribute(t,e){switch(e){case Boolean:t=t?k:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},_=(t,e)=>e!==t&&(e==e||t==t),R={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:_};class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=R){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||R}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return y(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=R){var o;const n=this.constructor._$Ep(t,i);if(void 0!==n&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:O).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=o.getPropertyOptions(n),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:O;this._$El=n,this[n]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||_)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
57
|
*/
|
|
58
|
-
var
|
|
58
|
+
var N;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==S||S({ReactiveElement:C}),(null!==(m=$.reactiveElementVersions)&&void 0!==m?m:$.reactiveElementVersions=[]).push("1.4.1");const E=window,M=E.trustedTypes,I=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,T=`lit$${(Math.random()+"").slice(9)}$`,z="?"+T,F=`<${z}>`,D=document,U=(t="")=>D.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,A=Array.isArray,B=t=>A(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,H=/>/g,W=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),K=/'/g,Z=/"/g,V=/^(?:script|style|textarea|title)$/i,G=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),J=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),Y=new WeakMap,X=D.createTreeWalker(D,129,null,!1),Q=(t,e)=>{const i=t.length-1,o=[];let n,s=2===e?"<svg>":"",r=L;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===L?"!--"===l[1]?r=P:void 0!==l[1]?r=H:void 0!==l[2]?(V.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=W):void 0!==l[3]&&(r=W):r===W?">"===l[0]?(r=null!=n?n:L,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?W:'"'===l[3]?Z:K):r===Z||r===K?r=W:r===P||r===H?r=L:(r=W,n=void 0);const d=r===W&&t[e+1].startsWith("/>")?" ":"";s+=r===L?i+F:h>=0?(o.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+T+d):i+T+(-2===h?(o.push(void 0),e):d)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(a):a,o]};class tt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,h]=Q(t,e);if(this.el=tt.createElement(l,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=X.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(T)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(T),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?st:"?"===e[1]?at:"@"===e[1]?lt:nt})}else a.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(V.test(o.tagName)){const t=o.textContent.split(T),e=t.length-1;if(e>0){o.textContent=M?M.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],U()),X.nextNode(),a.push({type:2,index:++n});o.append(t[e],U())}}}else if(8===o.nodeType)if(o.data===z)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(T,t+1));)a.push({type:7,index:n}),t+=T.length-1}n++}}static createElement(t,e){const i=D.createElement("template");return i.innerHTML=t,i}}function et(t,e,i=t,o){var n,s,r,a;if(e===J)return e;let l=void 0!==o?null===(n=i._$Co)||void 0===n?void 0:n[o]:i._$Cl;const h=j(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=et(t,l._$AS(t,e.values),l,o)),e}class it{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:D).importNode(i,!0);X.currentNode=n;let s=X.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new ot(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new ht(s,this,t)),this.u.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=X.nextNode(),r++)}return n}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ot{constructor(t,e,i,o){var n;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=et(this,t,e),j(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==J&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):B(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==q&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=tt.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.p(i);else{const t=new it(n,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new tt(t)),e}k(t){A(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new ot(this.O(U()),this.O(U()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,o,n){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let s=!1;if(void 0===n)t=et(this,t,e,0),s=!j(t)||t!==this._$AH&&t!==J,s&&(this._$AH=t);else{const o=t;let r,a;for(t=n[0],r=0;r<n.length-1;r++)a=et(this,o[i+r],e,r),a===J&&(a=this._$AH[r]),s||(s=!j(a)||a!==this._$AH[r]),a===q?t=q:t!==q&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class st extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const rt=M?M.emptyScript:"";class at extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,rt):this.element.removeAttribute(this.name)}}class lt extends nt{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=et(this,t,e,0))&&void 0!==i?i:q)===J)return;const o=this._$AH,n=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==q&&(o===q||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class ht{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){et(this,t)}}const ct={P:"$lit$",A:T,M:z,C:1,L:Q,R:it,D:B,V:et,I:ot,H:nt,N:at,U:lt,B:st,F:ht},dt=E.litHtmlPolyfillSupport;null==dt||dt(tt,ot),(null!==(N=E.litHtmlVersions)&&void 0!==N?N:E.litHtmlVersions=[]).push("2.4.0");
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
63
|
*/
|
|
64
|
-
var ft
|
|
64
|
+
var pt,ft;class ut extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,n;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=s._$litPart$;if(void 0===r){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;s._$litPart$=r=new ot(e.insertBefore(U(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return J}}ut.finalized=!0,ut._$litElement$=!0,null===(pt=globalThis.litElementHydrateSupport)||void 0===pt||pt.call(globalThis,{LitElement:ut});const bt=globalThis.litElementPolyfillSupport;null==bt||bt({LitElement:ut}),(null!==(ft=globalThis.litElementVersions)&&void 0!==ft?ft:globalThis.litElementVersions=[]).push("3.2.2");class vt{static create(t,e,i){let o=t=>v(null!=t?t:i),n=g`var(${v(t)}, ${o(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>g`var(${v(t)}, ${o(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),n=g`var(${v(t)}, ${o(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>g`var(${v(t)}, ${o(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):v(null!=e?e:t.defaultValue),o=g`var(${v(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>g`var(${v(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function gt(t,e){return v(`${t.name}: ${e}`)}const yt={colorPrimary:vt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:vt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:vt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:vt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:vt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:vt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:vt.create("--ft-color-error","COLOR","#B00020"),colorOutline:vt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:vt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:vt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:vt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:vt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:vt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:vt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:vt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:vt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:vt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:vt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:vt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:vt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:vt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:vt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:vt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:vt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:vt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:vt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:vt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:vt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:vt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:vt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:vt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:vt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:vt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:vt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:vt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:vt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:vt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:vt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:vt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:vt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:vt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:vt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:vt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:vt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:vt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:vt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:vt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:vt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:vt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:vt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:vt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:vt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:vt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:vt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:vt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:vt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:vt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:vt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:vt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:vt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:vt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:vt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};class xt extends CustomEvent{constructor(t){super("ft-notification",{bubbles:!0,composed:!0,detail:t})}}
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2021 Google LLC
|
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
69
|
-
*/var
|
|
70
|
-
${t.map((t=>
|
|
69
|
+
*/var mt=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class $t extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const n=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return y(n,this.constructor.elementStyles),n}}}(ut)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),G`
|
|
70
|
+
${t.map((t=>G`
|
|
71
71
|
<style>${t}</style>
|
|
72
72
|
`))}
|
|
73
73
|
${this.getTemplate()}
|
|
74
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,n,s,r;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=null!==(r=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}
|
|
74
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,n,s,r;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=null!==(r=null===(s=t.getAttribute("exportparts"))||void 0===s?void 0:s.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}mt([o()],$t.prototype,"exportpartsPrefix",void 0),mt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],$t.prototype,"exportpartsPrefixes",void 0),mt([o()],$t.prototype,"customStylesheet",void 0);const wt=g`
|
|
75
75
|
.ft-no-text-select {
|
|
76
76
|
-webkit-touch-callout: none;
|
|
77
77
|
-webkit-user-select: none;
|
|
@@ -80,7 +80,7 @@ var ft,ut;class vt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
80
80
|
-ms-user-select: none;
|
|
81
81
|
user-select: none;
|
|
82
82
|
}
|
|
83
|
-
`;
|
|
83
|
+
`;g`
|
|
84
84
|
.ft-word-wrap {
|
|
85
85
|
white-space: normal;
|
|
86
86
|
word-wrap: break-word;
|
|
@@ -92,7 +92,7 @@ var ft,ut;class vt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
92
92
|
-webkit-hyphens: auto;
|
|
93
93
|
hyphens: auto
|
|
94
94
|
}
|
|
95
|
-
`;const
|
|
95
|
+
`;const kt=g`
|
|
96
96
|
.ft-safari-ellipsis-fix {
|
|
97
97
|
margin-right: 0;
|
|
98
98
|
|
|
@@ -103,185 +103,260 @@ var ft,ut;class vt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
display: inline-block;
|
|
104
104
|
width: 0;
|
|
105
105
|
}
|
|
106
|
-
`;class
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
display: flex;
|
|
110
|
-
flex-direction: column;
|
|
111
|
-
gap: 16px;
|
|
106
|
+
`;class St{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),n}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):t}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}const Ot=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged),_t=(t,e)=>{var i;const o=Ot(t)?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!c(t,e),(i,n)=>{var s;i.constructor.createProperty(n,{attribute:!1,hasChanged:e});const r=i;r.reduxProperties=r.reduxProperties||new Map;const a=null!==(s=Ot(t)?o.selector:t)&&void 0!==s?s:t=>t[n];r.reduxProperties.set(n,{selector:a,store:o.store})}};class Rt extends $t{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Ct(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Ct(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Ct(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var Nt,Et,Mt;const It=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Mt=null===(Et=null===(Nt=window.safari)||void 0===Nt?void 0:Nt.pushNotification)||void 0===Et?void 0:Et.toString())&&void 0!==Mt?Mt:"");var Tt=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class zt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Ft extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new zt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Tt([n()],e.prototype,"stateManager",void 0),e}(Rt)){}const Dt=vt.extend("--ft-ripple-color",yt.colorContent),Ut={color:Dt,backgroundColor:vt.extend("--ft-ripple-background-color",Dt),opacityContentOnSurfacePressed:vt.external(yt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:vt.external(yt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:vt.external(yt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:vt.external(yt.opacityContentOnSurfaceSelected,"Design system")},jt=vt.extend("--ft-ripple-color",yt.colorPrimary),At=jt,Bt=vt.extend("--ft-ripple-background-color",jt),Lt=vt.extend("--ft-ripple-color",yt.colorSecondary),Pt=Lt,Ht=vt.extend("--ft-ripple-background-color",Lt),Wt=g`
|
|
107
|
+
:host {
|
|
108
|
+
display: contents;
|
|
112
109
|
}
|
|
113
110
|
|
|
114
|
-
.ft-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
padding: 8px;
|
|
119
|
-
border: 1px dashed #e1e1e1;
|
|
120
|
-
color: #444444;
|
|
121
|
-
background: #f1f1f1;
|
|
122
|
-
border-radius: 4px;
|
|
123
|
-
align-items: center;
|
|
111
|
+
.ft-ripple {
|
|
112
|
+
position: absolute;
|
|
113
|
+
inset: 0;
|
|
114
|
+
pointer-events: none;
|
|
124
115
|
}
|
|
125
116
|
|
|
126
|
-
.ft-
|
|
127
|
-
|
|
117
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
118
|
+
overflow: hidden;
|
|
128
119
|
}
|
|
129
120
|
|
|
130
|
-
.ft-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
.ft-ripple .ft-ripple--background,
|
|
122
|
+
.ft-ripple .ft-ripple--effect {
|
|
123
|
+
position: absolute;
|
|
124
|
+
opacity: 0;
|
|
133
125
|
}
|
|
134
126
|
|
|
135
|
-
.ft-
|
|
136
|
-
|
|
137
|
-
flex-direction: row;
|
|
138
|
-
align-items: center;
|
|
127
|
+
.ft-ripple .ft-ripple--background {
|
|
128
|
+
background-color: ${Ut.backgroundColor};
|
|
139
129
|
}
|
|
140
130
|
|
|
131
|
+
.ft-ripple .ft-ripple--effect {
|
|
132
|
+
background-color: ${Ut.color};
|
|
133
|
+
}
|
|
141
134
|
|
|
142
|
-
.ft-
|
|
143
|
-
|
|
144
|
-
flex-direction: column;
|
|
135
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
136
|
+
background-color: ${Ht};
|
|
145
137
|
}
|
|
146
138
|
|
|
147
|
-
.ft-
|
|
148
|
-
|
|
139
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
140
|
+
background-color: ${Pt};
|
|
149
141
|
}
|
|
150
142
|
|
|
151
|
-
.ft-
|
|
152
|
-
|
|
143
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
144
|
+
background-color: ${Bt};
|
|
153
145
|
}
|
|
154
146
|
|
|
155
|
-
.ft-
|
|
156
|
-
color: ${
|
|
147
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
148
|
+
background-color: ${At};
|
|
157
149
|
}
|
|
158
150
|
|
|
159
|
-
.ft-
|
|
160
|
-
|
|
151
|
+
.ft-ripple .ft-ripple--background {
|
|
152
|
+
top: 0;
|
|
153
|
+
left: 0;
|
|
154
|
+
height: 100%;
|
|
155
|
+
width: 100%;
|
|
156
|
+
transition: opacity 75ms linear;
|
|
161
157
|
}
|
|
162
158
|
|
|
163
|
-
.ft-
|
|
164
|
-
|
|
159
|
+
.ft-ripple .ft-ripple--effect,
|
|
160
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
161
|
+
border-radius: 50%;
|
|
165
162
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
|
|
164
|
+
.ft-ripple .ft-ripple--effect {
|
|
165
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
166
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
170
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
171
|
+
left: 50%;
|
|
172
|
+
top: 50%;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
176
|
+
transform: translate(-50%, -50%);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
180
|
+
opacity: ${Ut.opacityContentOnSurfaceHover};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
184
|
+
opacity: ${Ut.opacityContentOnSurfaceSelected};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
188
|
+
opacity: ${Ut.opacityContentOnSurfaceFocused};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
192
|
+
opacity: ${Ut.opacityContentOnSurfacePressed};
|
|
193
|
+
transform: translate(-50%, -50%) scale(1);
|
|
194
|
+
}
|
|
195
|
+
`,Kt=vt.extend("--ft-typography-font-family",yt.titleFont),Zt=vt.extend("--ft-typography-font-family",yt.contentFont),Vt={fontFamily:Zt,fontSize:vt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:vt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:vt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:vt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:vt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Gt={fontFamily:vt.extend("--ft-typography-title-font-family",Kt),fontSize:vt.extend("--ft-typography-title-font-size",Vt.fontSize,"20px"),fontWeight:vt.extend("--ft-typography-title-font-weight",Vt.fontWeight,"normal"),letterSpacing:vt.extend("--ft-typography-title-letter-spacing",Vt.letterSpacing,"0.15px"),lineHeight:vt.extend("--ft-typography-title-line-height",Vt.lineHeight,"1.2"),textTransform:vt.extend("--ft-typography-title-text-transform",Vt.textTransform,"inherit")},Jt={fontFamily:vt.extend("--ft-typography-title-dense-font-family",Kt),fontSize:vt.extend("--ft-typography-title-dense-font-size",Vt.fontSize,"14px"),fontWeight:vt.extend("--ft-typography-title-dense-font-weight",Vt.fontWeight,"normal"),letterSpacing:vt.extend("--ft-typography-title-dense-letter-spacing",Vt.letterSpacing,"0.105px"),lineHeight:vt.extend("--ft-typography-title-dense-line-height",Vt.lineHeight,"1.7"),textTransform:vt.extend("--ft-typography-title-dense-text-transform",Vt.textTransform,"inherit")},qt=vt.extend("--ft-typography-subtitle1-font-family",Zt),Yt=vt.extend("--ft-typography-subtitle1-font-size",Vt.fontSize,"16px"),Xt=vt.extend("--ft-typography-subtitle1-font-weight",Vt.fontWeight,"600"),Qt=vt.extend("--ft-typography-subtitle1-letter-spacing",Vt.letterSpacing,"0.144px"),te=vt.extend("--ft-typography-subtitle1-line-height",Vt.lineHeight,"1.5"),ee=vt.extend("--ft-typography-subtitle1-text-transform",Vt.textTransform,"inherit"),ie=vt.extend("--ft-typography-subtitle2-font-family",Zt),oe=vt.extend("--ft-typography-subtitle2-font-size",Vt.fontSize,"14px"),ne=vt.extend("--ft-typography-subtitle2-font-weight",Vt.fontWeight,"normal"),se=vt.extend("--ft-typography-subtitle2-letter-spacing",Vt.letterSpacing,"0.098px"),re=vt.extend("--ft-typography-subtitle2-line-height",Vt.lineHeight,"1.7"),ae=vt.extend("--ft-typography-subtitle2-text-transform",Vt.textTransform,"inherit"),le={fontFamily:vt.extend("--ft-typography-body1-font-family",Zt),fontSize:vt.extend("--ft-typography-body1-font-size",Vt.fontSize,"16px"),fontWeight:vt.extend("--ft-typography-body1-font-weight",Vt.fontWeight,"normal"),letterSpacing:vt.extend("--ft-typography-body1-letter-spacing",Vt.letterSpacing,"0.496px"),lineHeight:vt.extend("--ft-typography-body1-line-height",Vt.lineHeight,"1.5"),textTransform:vt.extend("--ft-typography-body1-text-transform",Vt.textTransform,"inherit")},he=vt.extend("--ft-typography-body2-font-family",Zt),ce=vt.extend("--ft-typography-body2-font-size",Vt.fontSize,"14px"),de=vt.extend("--ft-typography-body2-font-weight",Vt.fontWeight,"normal"),pe=vt.extend("--ft-typography-body2-letter-spacing",Vt.letterSpacing,"0.252px"),fe=vt.extend("--ft-typography-body2-line-height",Vt.lineHeight,"1.4"),ue=vt.extend("--ft-typography-body2-text-transform",Vt.textTransform,"inherit"),be={fontFamily:vt.extend("--ft-typography-caption-font-family",Zt),fontSize:vt.extend("--ft-typography-caption-font-size",Vt.fontSize,"12px"),fontWeight:vt.extend("--ft-typography-caption-font-weight",Vt.fontWeight,"normal"),letterSpacing:vt.extend("--ft-typography-caption-letter-spacing",Vt.letterSpacing,"0.396px"),lineHeight:vt.extend("--ft-typography-caption-line-height",Vt.lineHeight,"1.33"),textTransform:vt.extend("--ft-typography-caption-text-transform",Vt.textTransform,"inherit")},ve=vt.extend("--ft-typography-breadcrumb-font-family",Zt),ge=vt.extend("--ft-typography-breadcrumb-font-size",Vt.fontSize,"10px"),ye=vt.extend("--ft-typography-breadcrumb-font-weight",Vt.fontWeight,"normal"),xe=vt.extend("--ft-typography-breadcrumb-letter-spacing",Vt.letterSpacing,"0.33px"),me=vt.extend("--ft-typography-breadcrumb-line-height",Vt.lineHeight,"1.6"),$e=vt.extend("--ft-typography-breadcrumb-text-transform",Vt.textTransform,"inherit"),we=vt.extend("--ft-typography-overline-font-family",Zt),ke=vt.extend("--ft-typography-overline-font-size",Vt.fontSize,"10px"),Se=vt.extend("--ft-typography-overline-font-weight",Vt.fontWeight,"normal"),Oe=vt.extend("--ft-typography-overline-letter-spacing",Vt.letterSpacing,"1.5px"),_e=vt.extend("--ft-typography-overline-line-height",Vt.lineHeight,"1.6"),Re=vt.extend("--ft-typography-overline-text-transform",Vt.textTransform,"uppercase"),Ce={fontFamily:vt.extend("--ft-typography-button-font-family",Zt),fontSize:vt.extend("--ft-typography-button-font-size",Vt.fontSize,"14px"),fontWeight:vt.extend("--ft-typography-button-font-weight",Vt.fontWeight,"600"),letterSpacing:vt.extend("--ft-typography-button-letter-spacing",Vt.letterSpacing,"1.246px"),lineHeight:vt.extend("--ft-typography-button-line-height",Vt.lineHeight,"1.15"),textTransform:vt.extend("--ft-typography-button-text-transform",Vt.textTransform,"uppercase")},Ne=g`
|
|
172
196
|
.ft-typography--title {
|
|
173
|
-
font-family: ${Gt};
|
|
174
|
-
font-size: ${
|
|
175
|
-
font-weight: ${
|
|
176
|
-
letter-spacing: ${
|
|
177
|
-
line-height: ${
|
|
178
|
-
text-transform: ${
|
|
179
|
-
}
|
|
180
|
-
`,
|
|
197
|
+
font-family: ${Gt.fontFamily};
|
|
198
|
+
font-size: ${Gt.fontSize};
|
|
199
|
+
font-weight: ${Gt.fontWeight};
|
|
200
|
+
letter-spacing: ${Gt.letterSpacing};
|
|
201
|
+
line-height: ${Gt.lineHeight};
|
|
202
|
+
text-transform: ${Gt.textTransform};
|
|
203
|
+
}
|
|
204
|
+
`,Ee=g`
|
|
181
205
|
.ft-typography--title-dense {
|
|
182
|
-
font-family: ${
|
|
183
|
-
font-size: ${
|
|
184
|
-
font-weight: ${
|
|
185
|
-
letter-spacing: ${
|
|
186
|
-
line-height: ${
|
|
187
|
-
text-transform: ${
|
|
188
|
-
}
|
|
189
|
-
`,
|
|
206
|
+
font-family: ${Jt.fontFamily};
|
|
207
|
+
font-size: ${Jt.fontSize};
|
|
208
|
+
font-weight: ${Jt.fontWeight};
|
|
209
|
+
letter-spacing: ${Jt.letterSpacing};
|
|
210
|
+
line-height: ${Jt.lineHeight};
|
|
211
|
+
text-transform: ${Jt.textTransform};
|
|
212
|
+
}
|
|
213
|
+
`,Me=g`
|
|
190
214
|
.ft-typography--subtitle1 {
|
|
191
|
-
font-family: ${
|
|
192
|
-
font-size: ${
|
|
193
|
-
font-weight: ${
|
|
194
|
-
letter-spacing: ${
|
|
195
|
-
line-height: ${
|
|
196
|
-
text-transform: ${
|
|
197
|
-
}
|
|
198
|
-
`,
|
|
215
|
+
font-family: ${qt};
|
|
216
|
+
font-size: ${Yt};
|
|
217
|
+
font-weight: ${Xt};
|
|
218
|
+
letter-spacing: ${Qt};
|
|
219
|
+
line-height: ${te};
|
|
220
|
+
text-transform: ${ee};
|
|
221
|
+
}
|
|
222
|
+
`,Ie=g`
|
|
199
223
|
.ft-typography--subtitle2 {
|
|
200
|
-
font-family: ${
|
|
201
|
-
font-size: ${
|
|
202
|
-
font-weight: ${
|
|
203
|
-
letter-spacing: ${
|
|
204
|
-
line-height: ${
|
|
205
|
-
text-transform: ${
|
|
224
|
+
font-family: ${ie};
|
|
225
|
+
font-size: ${oe};
|
|
226
|
+
font-weight: ${ne};
|
|
227
|
+
letter-spacing: ${se};
|
|
228
|
+
line-height: ${re};
|
|
229
|
+
text-transform: ${ae};
|
|
206
230
|
}
|
|
207
231
|
|
|
208
|
-
`,
|
|
232
|
+
`,Te=g`
|
|
209
233
|
.ft-typography--body1 {
|
|
210
|
-
font-family: ${
|
|
211
|
-
font-size: ${
|
|
212
|
-
font-weight: ${
|
|
213
|
-
letter-spacing: ${
|
|
214
|
-
line-height: ${
|
|
215
|
-
text-transform: ${
|
|
216
|
-
}
|
|
217
|
-
`,
|
|
234
|
+
font-family: ${le.fontFamily};
|
|
235
|
+
font-size: ${le.fontSize};
|
|
236
|
+
font-weight: ${le.fontWeight};
|
|
237
|
+
letter-spacing: ${le.letterSpacing};
|
|
238
|
+
line-height: ${le.lineHeight};
|
|
239
|
+
text-transform: ${le.textTransform};
|
|
240
|
+
}
|
|
241
|
+
`,ze=g`
|
|
218
242
|
.ft-typography--body2 {
|
|
219
|
-
font-family: ${
|
|
220
|
-
font-size: ${
|
|
221
|
-
font-weight: ${
|
|
222
|
-
letter-spacing: ${
|
|
223
|
-
line-height: ${
|
|
224
|
-
text-transform: ${
|
|
225
|
-
}
|
|
226
|
-
`,
|
|
243
|
+
font-family: ${he};
|
|
244
|
+
font-size: ${ce};
|
|
245
|
+
font-weight: ${de};
|
|
246
|
+
letter-spacing: ${pe};
|
|
247
|
+
line-height: ${fe};
|
|
248
|
+
text-transform: ${ue};
|
|
249
|
+
}
|
|
250
|
+
`,Fe=g`
|
|
227
251
|
.ft-typography--caption {
|
|
228
|
-
font-family: ${
|
|
229
|
-
font-size: ${
|
|
230
|
-
font-weight: ${
|
|
231
|
-
letter-spacing: ${
|
|
232
|
-
line-height: ${
|
|
233
|
-
text-transform: ${
|
|
234
|
-
}
|
|
235
|
-
`,
|
|
252
|
+
font-family: ${be.fontFamily};
|
|
253
|
+
font-size: ${be.fontSize};
|
|
254
|
+
font-weight: ${be.fontWeight};
|
|
255
|
+
letter-spacing: ${be.letterSpacing};
|
|
256
|
+
line-height: ${be.lineHeight};
|
|
257
|
+
text-transform: ${be.textTransform};
|
|
258
|
+
}
|
|
259
|
+
`,De=g`
|
|
236
260
|
.ft-typography--breadcrumb {
|
|
237
|
-
font-family: ${
|
|
238
|
-
font-size: ${
|
|
239
|
-
font-weight: ${
|
|
240
|
-
letter-spacing: ${
|
|
241
|
-
line-height: ${
|
|
242
|
-
text-transform: ${
|
|
243
|
-
}
|
|
244
|
-
`,
|
|
261
|
+
font-family: ${ve};
|
|
262
|
+
font-size: ${ge};
|
|
263
|
+
font-weight: ${ye};
|
|
264
|
+
letter-spacing: ${xe};
|
|
265
|
+
line-height: ${me};
|
|
266
|
+
text-transform: ${$e};
|
|
267
|
+
}
|
|
268
|
+
`,Ue=g`
|
|
245
269
|
.ft-typography--overline {
|
|
246
|
-
font-family: ${
|
|
247
|
-
font-size: ${
|
|
248
|
-
font-weight: ${
|
|
249
|
-
letter-spacing: ${
|
|
250
|
-
line-height: ${
|
|
251
|
-
text-transform: ${
|
|
252
|
-
}
|
|
253
|
-
`,
|
|
270
|
+
font-family: ${we};
|
|
271
|
+
font-size: ${ke};
|
|
272
|
+
font-weight: ${Se};
|
|
273
|
+
letter-spacing: ${Oe};
|
|
274
|
+
line-height: ${_e};
|
|
275
|
+
text-transform: ${Re};
|
|
276
|
+
}
|
|
277
|
+
`,je=g`
|
|
254
278
|
.ft-typography--button {
|
|
255
|
-
font-family: ${
|
|
256
|
-
font-size: ${
|
|
257
|
-
font-weight: ${
|
|
258
|
-
letter-spacing: ${
|
|
259
|
-
line-height: ${
|
|
260
|
-
text-transform: ${
|
|
261
|
-
}
|
|
262
|
-
`,
|
|
279
|
+
font-family: ${Ce.fontFamily};
|
|
280
|
+
font-size: ${Ce.fontSize};
|
|
281
|
+
font-weight: ${Ce.fontWeight};
|
|
282
|
+
letter-spacing: ${Ce.letterSpacing};
|
|
283
|
+
line-height: ${Ce.lineHeight};
|
|
284
|
+
text-transform: ${Ce.textTransform};
|
|
285
|
+
}
|
|
286
|
+
`,Ae=g`
|
|
263
287
|
.ft-typography {
|
|
264
288
|
vertical-align: inherit;
|
|
265
289
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
290
|
+
`,Be={color:vt.extend("--ft-loader-color",yt.colorPrimary),size:vt.create("--ft-loader-size","SIZE","80px")},Le=g`
|
|
291
|
+
:host {
|
|
292
|
+
line-height: 0;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.ft-loader {
|
|
296
|
+
display: inline-block;
|
|
297
|
+
position: relative;
|
|
298
|
+
|
|
299
|
+
width: ${Be.size};
|
|
300
|
+
height: ${Be.size};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.ft-loader div {
|
|
304
|
+
position: absolute;
|
|
305
|
+
top: 37.5%;
|
|
306
|
+
width: 25%;
|
|
307
|
+
height: 25%;
|
|
308
|
+
border-radius: 50%;
|
|
309
|
+
background: ${Be.color};
|
|
310
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.ft-loader div:nth-child(1) {
|
|
314
|
+
left: 2.5%;
|
|
315
|
+
animation: appear 0.6s infinite;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ft-loader div:nth-child(2) {
|
|
319
|
+
left: 2.5%;
|
|
320
|
+
animation: move 0.6s infinite;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.ft-loader div:nth-child(3) {
|
|
324
|
+
left: 37.5%;
|
|
325
|
+
animation: move 0.6s infinite;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.ft-loader div:nth-child(4) {
|
|
329
|
+
left: 72.5%;
|
|
330
|
+
animation: disappear 0.6s infinite;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@keyframes appear {
|
|
334
|
+
0% {
|
|
335
|
+
transform: scale(0);
|
|
336
|
+
}
|
|
337
|
+
100% {
|
|
338
|
+
transform: scale(1);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@keyframes disappear {
|
|
343
|
+
0% {
|
|
344
|
+
transform: scale(1);
|
|
345
|
+
}
|
|
346
|
+
100% {
|
|
347
|
+
transform: scale(0);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@keyframes move {
|
|
352
|
+
0% {
|
|
353
|
+
transform: translate(0, 0);
|
|
354
|
+
}
|
|
355
|
+
100% {
|
|
356
|
+
transform: translate(calc(0.35 * ${Be.size}), 0);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
`,Pe={size:vt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:vt.extend("--ft-icon-fluid-topics-font-family",vt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:vt.extend("--ft-icon-file-format-font-family",vt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:vt.extend("--ft-icon-material-font-family",vt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:vt.create("--ft-icon-vertical-align","UNKNOWN","unset")},He=g`
|
|
285
360
|
:host, i.ft-icon {
|
|
286
361
|
display: inline-flex;
|
|
287
362
|
align-items: center;
|
|
@@ -290,14 +365,14 @@ const Xe=1,Qe=2,ti=t=>(...e)=>({_$litDirective$:t,values:e});class ei{constructo
|
|
|
290
365
|
}
|
|
291
366
|
|
|
292
367
|
:host {
|
|
293
|
-
width: ${
|
|
294
|
-
height: ${
|
|
368
|
+
width: ${Pe.size};
|
|
369
|
+
height: ${Pe.size};
|
|
295
370
|
}
|
|
296
371
|
|
|
297
372
|
i.ft-icon {
|
|
298
373
|
width: 100%;
|
|
299
374
|
height: 100%;
|
|
300
|
-
font-size: ${
|
|
375
|
+
font-size: ${Pe.size};
|
|
301
376
|
line-height: 1;
|
|
302
377
|
font-weight: normal;
|
|
303
378
|
text-transform: none;
|
|
@@ -308,32 +383,251 @@ const Xe=1,Qe=2,ti=t=>(...e)=>({_$litDirective$:t,values:e});class ei{constructo
|
|
|
308
383
|
text-rendering: auto;
|
|
309
384
|
-webkit-font-smoothing: antialiased;
|
|
310
385
|
-moz-osx-font-smoothing: grayscale;
|
|
311
|
-
vertical-align: ${
|
|
386
|
+
vertical-align: ${Pe.verticalAlign};
|
|
312
387
|
}
|
|
313
388
|
|
|
314
389
|
i.ft-icon.ft-icon--fluid-topics {
|
|
315
|
-
font-family: ${
|
|
390
|
+
font-family: ${Pe.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
316
391
|
|
|
317
392
|
/* Ugly fix because font is broken */
|
|
318
|
-
font-size: calc(0.9 * ${
|
|
393
|
+
font-size: calc(0.9 * ${Pe.size});
|
|
319
394
|
position: relative;
|
|
320
395
|
top: -5%;
|
|
321
396
|
justify-content: center;
|
|
322
397
|
}
|
|
323
398
|
|
|
324
399
|
.ft-icon--file-format {
|
|
325
|
-
font-family: ${
|
|
400
|
+
font-family: ${Pe.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
326
401
|
}
|
|
327
402
|
|
|
328
403
|
.ft-icon--material {
|
|
329
|
-
font-family: ${
|
|
404
|
+
font-family: ${Pe.materialFontFamily}, "Material Icons", sans-serif;
|
|
405
|
+
}
|
|
406
|
+
`,We=vt.extend("--ft-button-color",yt.colorPrimary),Ke={backgroundColor:vt.extend("--ft-button-background-color",yt.colorSurface),borderRadius:vt.extend("--ft-button-border-radius",yt.borderRadiusL),color:We,fontSize:vt.extend("--ft-button-font-size",Ce.fontSize),iconSize:vt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:vt.extend("--ft-button-ripple-color",We),opacityDisabled:vt.external(yt.colorOpacityDisabled,"Design system")},Ze=vt.extend("--ft-button-primary-color",vt.extend("--ft-button-color",yt.colorOnPrimary)),Ve={backgroundColor:vt.extend("--ft-button-primary-background-color",vt.extend("--ft-button-background-color",yt.colorPrimary)),color:Ze,rippleColor:vt.extend("--ft-button-primary-ripple-color",Ze)},Ge=vt.extend("--ft-button-dense-border-radius",vt.extend("--ft-button-border-radius",yt.borderRadiusM)),Je=[wt,g`
|
|
407
|
+
:host {
|
|
408
|
+
display: inline-block;
|
|
409
|
+
max-width: 100%;
|
|
410
|
+
pointer-events: none;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
button {
|
|
414
|
+
box-shadow: 0px 0px 0px transparent;
|
|
415
|
+
border: 0px solid transparent;
|
|
416
|
+
text-shadow: 0px 0px 0px transparent;
|
|
417
|
+
font-size: ${Ke.fontSize};
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
button:hover {
|
|
421
|
+
box-shadow: 0px 0px 0px transparent;
|
|
422
|
+
border: 0px solid transparent;
|
|
423
|
+
text-shadow: 0px 0px 0px transparent;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
button:active {
|
|
427
|
+
outline: none;
|
|
428
|
+
border: none;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
button:focus {
|
|
432
|
+
outline: 0;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.ft-button {
|
|
436
|
+
position: relative;
|
|
437
|
+
display: flex;
|
|
438
|
+
justify-content: center;
|
|
439
|
+
align-items: center;
|
|
440
|
+
width: 100%;
|
|
441
|
+
overflow: hidden;
|
|
442
|
+
box-sizing: border-box;
|
|
443
|
+
border: none;
|
|
444
|
+
pointer-events: auto;
|
|
445
|
+
|
|
446
|
+
--ft-button-internal-line-height: calc(${Ke.fontSize} + 2px);
|
|
447
|
+
--ft-button-internal-color: ${Ke.color};
|
|
448
|
+
${gt(Pe.size,Ke.iconSize)};
|
|
449
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
450
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
451
|
+
${gt(Ut.color,Ke.rippleColor)};
|
|
452
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ke.iconSize});
|
|
453
|
+
|
|
454
|
+
border-radius: ${Ke.borderRadius};
|
|
455
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
456
|
+
background-color: ${Ke.backgroundColor};
|
|
457
|
+
color: var(--ft-button-internal-color);
|
|
458
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.ft-button:not([disabled]):hover {
|
|
462
|
+
cursor: pointer;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ft-button--dense {
|
|
466
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
467
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
468
|
+
border-radius: ${Ge};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ft-button--round {
|
|
472
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.ft-button[disabled] {
|
|
476
|
+
filter: grayscale(1);
|
|
477
|
+
opacity: ${Ke.opacityDisabled};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.ft-button.ft-button--primary {
|
|
481
|
+
background-color: ${Ve.backgroundColor};
|
|
482
|
+
--ft-button-internal-color: ${Ve.color};
|
|
483
|
+
${gt(Ut.color,Ve.rippleColor)};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.ft-button.ft-button--outlined {
|
|
487
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
488
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.ft-button:focus {
|
|
492
|
+
outline: none;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.ft-button--label {
|
|
496
|
+
position: relative;
|
|
497
|
+
overflow: hidden;
|
|
498
|
+
white-space: nowrap;
|
|
499
|
+
text-overflow: ellipsis;
|
|
500
|
+
display: block;
|
|
501
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
502
|
+
${gt(Ce.fontSize,"1em")};
|
|
503
|
+
${gt(Ce.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.ft-button--label[hidden] {
|
|
507
|
+
display: none;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
ft-icon {
|
|
511
|
+
flex-shrink: 0;
|
|
512
|
+
position: relative;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.ft-button--label[hidden] + ft-icon {
|
|
516
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
517
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
521
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
522
|
+
order: -1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
ft-loader {
|
|
526
|
+
${gt(Be.size,Ke.iconSize)};
|
|
527
|
+
${gt(Be.color,"var(--ft-button-internal-color)")};
|
|
528
|
+
}
|
|
529
|
+
`],qe={textColor:vt.extend("--ft-switch-text-color",yt.colorOnSurfaceHigh),backgroundColor:vt.extend("--ft-switch-background-color",yt.colorSurface),selectedTextColor:vt.extend("--ft-switch-selected-text-color",yt.colorPrimary),selectedBackgroundColor:vt.extend("--ft-switch-selected-background-color",yt.colorPrimary),borderColor:vt.extend("--ft-switch-border-color",yt.colorOutline),borderRadius:vt.extend("--ft-switch-border-radius",yt.borderRadiusL),fontSize:vt.extend("--ft-switch-font-size",Ce.fontSize),iconSize:vt.create("--ft-switch-icon-size","SIZE","24px"),iconColor:vt.extend("--ft-switch-text-color",yt.colorOnSurfaceMedium),rippleColor:vt.extend("--ft-switch-ripple-color",yt.colorPrimary),outlineColor:vt.extend("--ft-switch-outline-color",yt.colorPrimary)},Ye={feedbackInputMinWidth:vt.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:vt.external(yt.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:vt.extend("--ft-reader-feedback-send-feedback-color",yt.colorOnPrimary),sendFeedbackBackgroundColor:vt.extend("--ft-reader-feedback-send-feedback-background-color",yt.colorPrimary),filledRatingColor:vt.extend("--ft-reader-feedback-filled-rating-color",yt.colorPrimary),emptyRatingColor:vt.extend("--ft-reader-feedback-empty-rating-color",yt.colorOnSurfaceMedium),mainTitleFontSize:vt.external(Gt.fontSize,"Typography"),sectionTitleFontSize:vt.external(Jt.fontSize,"Typography")},Xe=g`
|
|
530
|
+
.ft-reader-feedback {
|
|
531
|
+
box-sizing: border-box;
|
|
532
|
+
display: flex;
|
|
533
|
+
flex-direction: column;
|
|
534
|
+
gap: 16px;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.ft-reader-feedback--placeholder {
|
|
538
|
+
display: flex;
|
|
539
|
+
flex-direction: row;
|
|
540
|
+
gap: 8px;
|
|
541
|
+
padding: 8px;
|
|
542
|
+
border: 1px dashed #e1e1e1;
|
|
543
|
+
color: #444444;
|
|
544
|
+
background: #f1f1f1;
|
|
545
|
+
border-radius: 4px;
|
|
546
|
+
align-items: center;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.ft-reader-feedback--placeholder ft-typography {
|
|
550
|
+
flex-grow: 1;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.ft-reader-feedback--placeholder ft-tooltip {
|
|
554
|
+
flex-grow: 0;
|
|
555
|
+
flex-shrink: 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.ft-reader-feedback--stars {
|
|
559
|
+
display: flex;
|
|
560
|
+
flex-direction: row;
|
|
561
|
+
align-items: center;
|
|
562
|
+
margin-left: -6px;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.ft-reader-feedback--rating, .ft-reader-feedback--feedback {
|
|
566
|
+
display: flex;
|
|
567
|
+
flex-direction: column;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.ft-reader-feedback--rating .ft-reader-feedback--section-title {
|
|
571
|
+
margin-bottom: 8px;
|
|
330
572
|
}
|
|
331
|
-
|
|
573
|
+
|
|
574
|
+
.ft-reader-feedback--rating {
|
|
575
|
+
${gt(Ke.color,Ye.emptyRatingColor)};
|
|
576
|
+
${gt(Ke.rippleColor,Ye.filledRatingColor)};
|
|
577
|
+
${gt(qe.textColor,Ye.emptyRatingColor)};
|
|
578
|
+
${gt(qe.selectedTextColor,Ye.filledRatingColor)};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.ft-reader-feedback--rating .ft-reader-feedback--active {
|
|
582
|
+
${gt(Ke.color,Ye.filledRatingColor)};
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.ft-reader-feedback--feedback {
|
|
586
|
+
gap: 8px;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.ft-reader-feedback--rating-date {
|
|
590
|
+
color: ${Ye.ratedDateColor};
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.ft-reader-feedback--feedback ft-text-area {
|
|
594
|
+
min-width: ${Ye.feedbackInputMinWidth};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.ft-reader-feedback--send-feedback, .ft-reader-feedback--feedback-link {
|
|
598
|
+
align-self: flex-end;
|
|
599
|
+
${gt(Ke.color,Ye.sendFeedbackColor)};
|
|
600
|
+
${gt(Ke.backgroundColor,Ye.sendFeedbackBackgroundColor)};
|
|
601
|
+
}
|
|
602
|
+
`
|
|
603
|
+
/**
|
|
604
|
+
* @license
|
|
605
|
+
* Copyright 2020 Google LLC
|
|
606
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
607
|
+
*/,Qe=Symbol.for(""),ti=t=>{if((null==t?void 0:t.r)===Qe)return null==t?void 0:t._$litStatic$},ei=t=>({_$litStatic$:t,r:Qe}),ii=new Map,oi=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(s=i[h],n=ti(s));)l+=n+e[++h],c=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(e[o]),c){const t=r.join("$$lit$$");void 0===(e=ii.get(t))&&(r.raw=r,ii.set(t,e=r)),i=a}return t(e,...i)})(G);var ni;!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"}(ni||(ni={}));var si=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ri extends $t{constructor(){super(...arguments),this.variant=ni.body1}render(){return this.element?oi`
|
|
608
|
+
<${ei(this.element)}
|
|
609
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
610
|
+
<slot></slot>
|
|
611
|
+
</${ei(this.element)}>
|
|
612
|
+
`:oi`
|
|
613
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
614
|
+
`}}ri.styles=[Ne,Ee,Me,Ie,Te,ze,Fe,De,Ue,je,Ae],si([o()],ri.prototype,"element",void 0),si([o()],ri.prototype,"variant",void 0),h("ft-typography")(ri);
|
|
615
|
+
/**
|
|
616
|
+
* @license
|
|
617
|
+
* Copyright 2017 Google LLC
|
|
618
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
|
+
*/
|
|
620
|
+
const ai=1,li=2,hi=t=>(...e)=>({_$litDirective$:t,values:e});class ci{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)}}
|
|
621
|
+
/**
|
|
622
|
+
* @license
|
|
623
|
+
* Copyright 2017 Google LLC
|
|
624
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
625
|
+
*/class di extends ci{constructor(t){if(super(t),this.it=q,t.type!==li)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this._t=void 0,this.it=t;if(t===J)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}di.directiveName="unsafeHTML",di.resultType=1;const pi=hi(di);var fi,ui,bi;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",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.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",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=""}(fi||(fi={})),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=""}(ui||(ui={})),new Map([...["abw"].map((t=>[t,ui.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,ui.AUDIO])),...["avi"].map((t=>[t,ui.AVI])),...["chm","xhs"].map((t=>[t,ui.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,ui.CODE])),...["csv"].map((t=>[t,ui.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ui.DITA])),...["epub"].map((t=>[t,ui.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ui.EXCEL])),...["flac"].map((t=>[t,ui.FLAC])),...["gif"].map((t=>[t,ui.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ui.GZIP])),...["html","htm","xhtml"].map((t=>[t,ui.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,ui.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ui.JPEG])),...["json"].map((t=>[t,ui.JSON])),...["m4a","m4p"].map((t=>[t,ui.M4A])),...["mov","qt"].map((t=>[t,ui.MOV])),...["mp3"].map((t=>[t,ui.MP3])),...["mp4","m4v"].map((t=>[t,ui.MP4])),...["ogg","oga"].map((t=>[t,ui.OGG])),...["pdf","ps"].map((t=>[t,ui.PDF])),...["png"].map((t=>[t,ui.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ui.POWERPOINT])),...["rar"].map((t=>[t,ui.RAR])),...["stp"].map((t=>[t,ui.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ui.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,ui.VIDEO])),...["wav"].map((t=>[t,ui.WAV])),...["wma"].map((t=>[t,ui.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ui.WORD])),...["xml","xsl","rdf"].map((t=>[t,ui.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ui.YAML])),...["zip"].map((t=>[t,ui.ZIP]))]),function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(bi||(bi={}));var vi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class gi extends $t{constructor(){super(...arguments),this.variant=bi.fluid_topics,this.resolvedIcon=q}render(){const t="material"!==this.variant||this.value;return G`
|
|
332
626
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
333
|
-
${
|
|
627
|
+
${pi(this.resolvedIcon)}
|
|
334
628
|
<slot ?hidden=${t}></slot>
|
|
335
629
|
</i>
|
|
336
|
-
`}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
|
|
630
|
+
`}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 bi.file_format:this.resolvedIcon=null!==(t=ui[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case bi.fluid_topics:this.resolvedIcon=null!==(e=fi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||q}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}gi.elementDefinitions={},gi.styles=He,vi([o()],gi.prototype,"variant",void 0),vi([o()],gi.prototype,"value",void 0),vi([n()],gi.prototype,"resolvedIcon",void 0),vi([r("slot")],gi.prototype,"slottedContent",void 0),h("ft-icon")(gi);const yi=vt.create("--ft-tooltip-distance","SIZE","4px"),xi=vt.create("--ft-tooltip-color","COLOR","#FFFFFF"),mi=vt.create("--ft-tooltip-background-color","COLOR","#666666"),$i=vt.create("--ft-tooltip-z-index","NUMBER","1"),wi=vt.external(yt.borderRadiusS,"Design system"),ki=vt.create("--ft-tooltip-max-width","SIZE","150px"),Si=g`
|
|
337
631
|
.ft-tooltip--container {
|
|
338
632
|
display: block;
|
|
339
633
|
position: relative;
|
|
@@ -349,23 +643,23 @@ const Xe=1,Qe=2,ti=t=>(...e)=>({_$litDirective$:t,values:e});class ei{constructo
|
|
|
349
643
|
box-sizing: border-box;
|
|
350
644
|
overflow: hidden;
|
|
351
645
|
width: max-content;
|
|
352
|
-
max-width: ${
|
|
646
|
+
max-width: ${ki};
|
|
353
647
|
text-align: center;
|
|
354
|
-
padding: ${
|
|
355
|
-
z-index: ${
|
|
648
|
+
padding: ${yi};
|
|
649
|
+
z-index: ${$i};
|
|
356
650
|
}
|
|
357
651
|
|
|
358
652
|
.ft-tooltip--content {
|
|
359
653
|
padding: 4px 8px;
|
|
360
|
-
border-radius: ${
|
|
361
|
-
background-color: ${
|
|
362
|
-
color: ${
|
|
654
|
+
border-radius: ${wi};
|
|
655
|
+
background-color: ${mi};
|
|
656
|
+
color: ${xi};
|
|
363
657
|
top: -500px;
|
|
364
658
|
left: -500px;
|
|
365
659
|
position: relative;
|
|
366
660
|
word-break: break-word;
|
|
367
661
|
}
|
|
368
|
-
`;var
|
|
662
|
+
`;var Oi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class _i extends $t{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 G`
|
|
369
663
|
<div part="container"
|
|
370
664
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
371
665
|
@mouseenter=${this.onHover}
|
|
@@ -383,108 +677,19 @@ const Xe=1,Qe=2,ti=t=>(...e)=>({_$litDirective$:t,values:e});class ei{constructo
|
|
|
383
677
|
</div>
|
|
384
678
|
</div>
|
|
385
679
|
</div>
|
|
386
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${
|
|
680
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}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=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${ki})`}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())}}_i.elementDefinitions={"ft-typography":ri},_i.styles=Si,Oi([o()],_i.prototype,"text",void 0),Oi([o({type:Boolean})],_i.prototype,"manual",void 0),Oi([o({type:Boolean})],_i.prototype,"inline",void 0),Oi([o({type:Number})],_i.prototype,"delay",void 0),Oi([o()],_i.prototype,"position",void 0),Oi([
|
|
387
681
|
/**
|
|
388
682
|
* @license
|
|
389
683
|
* Copyright 2017 Google LLC
|
|
390
684
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
391
685
|
*/
|
|
392
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return
|
|
686
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],_i.prototype,"slotNodes",void 0),Oi([r(".ft-tooltip--container")],_i.prototype,"container",void 0),Oi([r("slot")],_i.prototype,"target",void 0),Oi([r(".ft-tooltip")],_i.prototype,"tooltip",void 0),Oi([r(".ft-tooltip--content")],_i.prototype,"tooltipContent",void 0),Oi([n()],_i.prototype,"visible",void 0),h("ft-tooltip")(_i);
|
|
393
687
|
/**
|
|
394
688
|
* @license
|
|
395
689
|
* Copyright 2018 Google LLC
|
|
396
690
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
397
691
|
*/
|
|
398
|
-
const
|
|
399
|
-
:host {
|
|
400
|
-
display: contents;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.ft-ripple {
|
|
404
|
-
position: absolute;
|
|
405
|
-
inset: 0;
|
|
406
|
-
pointer-events: none;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
410
|
-
overflow: hidden;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.ft-ripple .ft-ripple--background,
|
|
414
|
-
.ft-ripple .ft-ripple--effect {
|
|
415
|
-
position: absolute;
|
|
416
|
-
opacity: 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.ft-ripple .ft-ripple--background {
|
|
420
|
-
background-color: ${wi.backgroundColor};
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.ft-ripple .ft-ripple--effect {
|
|
424
|
-
background-color: ${wi.color};
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
428
|
-
background-color: ${Ni};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
432
|
-
background-color: ${Ci};
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
436
|
-
background-color: ${Oi};
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
440
|
-
background-color: ${Si};
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
.ft-ripple .ft-ripple--background {
|
|
444
|
-
top: 0;
|
|
445
|
-
left: 0;
|
|
446
|
-
height: 100%;
|
|
447
|
-
width: 100%;
|
|
448
|
-
transition: opacity 75ms linear;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.ft-ripple .ft-ripple--effect,
|
|
452
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
453
|
-
border-radius: 50%;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.ft-ripple .ft-ripple--effect {
|
|
457
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
458
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
462
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
463
|
-
left: 50%;
|
|
464
|
-
top: 50%;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
468
|
-
transform: translate(-50%, -50%);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
472
|
-
opacity: ${wi.opacityContentOnSurfaceHover};
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
476
|
-
opacity: ${wi.opacityContentOnSurfaceSelected};
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
480
|
-
opacity: ${wi.opacityContentOnSurfaceFocused};
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
484
|
-
opacity: ${wi.opacityContentOnSurfacePressed};
|
|
485
|
-
transform: translate(-50%, -50%) scale(1);
|
|
486
|
-
}
|
|
487
|
-
`;var Ei=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Mi extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i(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.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return J`
|
|
692
|
+
const Ri=hi(class extends ci{constructor(t){var e;if(super(t),t.type!==ai||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return J}});var Ci=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ni extends $t{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.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:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return G`
|
|
488
693
|
<style>
|
|
489
694
|
.ft-ripple .ft-ripple--effect,
|
|
490
695
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -497,11 +702,11 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
497
702
|
top: ${this.originY}px;
|
|
498
703
|
}
|
|
499
704
|
</style>
|
|
500
|
-
<div class="${
|
|
705
|
+
<div class="${Ri(t)}">
|
|
501
706
|
<div class="ft-ripple--background"></div>
|
|
502
707
|
<div class="ft-ripple--effect"></div>
|
|
503
708
|
</div>
|
|
504
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(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")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){
|
|
709
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(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")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(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"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),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",n),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,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ni.elementDefinitions={},Ni.styles=Wt,Ci([o({type:Boolean})],Ni.prototype,"primary",void 0),Ci([o({type:Boolean})],Ni.prototype,"secondary",void 0),Ci([o({type:Boolean})],Ni.prototype,"unbounded",void 0),Ci([o({type:Boolean})],Ni.prototype,"activated",void 0),Ci([o({type:Boolean})],Ni.prototype,"selected",void 0),Ci([o({type:Boolean})],Ni.prototype,"disabled",void 0),Ci([n()],Ni.prototype,"hovered",void 0),Ci([n()],Ni.prototype,"focused",void 0),Ci([n()],Ni.prototype,"pressed",void 0),Ci([n()],Ni.prototype,"rippling",void 0),Ci([n()],Ni.prototype,"rippleSize",void 0),Ci([n()],Ni.prototype,"originX",void 0),Ci([n()],Ni.prototype,"originY",void 0),Ci([r(".ft-ripple")],Ni.prototype,"ripple",void 0),Ci([r(".ft-ripple--effect")],Ni.prototype,"rippleEffect",void 0),h("ft-ripple")(Ni);const Ei={borderRadiusLeft:vt.extend("--ft-switch-option-border-radius-left",yt.borderRadiusL),borderRadiusRight:vt.extend("--ft-switch-option-border-radius-right",yt.borderRadiusL),borderWidthLeft:vt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:vt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:vt.create("--ft-switch-option-border-width-vertical","SIZE","1px")},Mi=g`
|
|
505
710
|
.ft-switch-option {
|
|
506
711
|
position: relative;
|
|
507
712
|
display: inline-block;
|
|
@@ -515,20 +720,20 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
515
720
|
}
|
|
516
721
|
|
|
517
722
|
.ft-switch-option--content {
|
|
518
|
-
--ft-switch-option-internal-line-height: calc(${
|
|
519
|
-
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${
|
|
723
|
+
--ft-switch-option-internal-line-height: calc(${qe.fontSize} + 2px);
|
|
724
|
+
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${qe.iconSize});
|
|
520
725
|
|
|
521
726
|
border-style: solid;
|
|
522
|
-
border-color: ${
|
|
523
|
-
border-width: ${
|
|
524
|
-
border-radius: ${
|
|
727
|
+
border-color: ${qe.borderColor};
|
|
728
|
+
border-width: ${Ei.borderWidthVertical} ${Ei.borderWidthRight} ${Ei.borderWidthVertical} ${Ei.borderWidthLeft};
|
|
729
|
+
border-radius: ${Ei.borderRadiusLeft} ${Ei.borderRadiusRight} ${Ei.borderRadiusRight} ${Ei.borderRadiusLeft};
|
|
525
730
|
display: flex;
|
|
526
731
|
align-items: center;
|
|
527
732
|
justify-content: center;
|
|
528
733
|
overflow: hidden;
|
|
529
|
-
${
|
|
734
|
+
${gt(Pe.size,qe.iconSize)};
|
|
530
735
|
padding: var(--ft-switch-internal-vertical-padding, 6px) var(--ft-switch-internal-horizontal-padding, 8px);
|
|
531
|
-
background-color: ${
|
|
736
|
+
background-color: ${qe.backgroundColor};
|
|
532
737
|
-webkit-mask-image: radial-gradient(white, black);
|
|
533
738
|
}
|
|
534
739
|
|
|
@@ -537,28 +742,28 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
537
742
|
}
|
|
538
743
|
|
|
539
744
|
.ft-switch-option--input:checked + .ft-switch-option--content:before {
|
|
540
|
-
background-color: ${
|
|
541
|
-
border-radius: ${
|
|
745
|
+
background-color: ${qe.selectedBackgroundColor};
|
|
746
|
+
border-radius: ${Ei.borderRadiusLeft} ${Ei.borderRadiusRight} ${Ei.borderRadiusRight} ${Ei.borderRadiusLeft};
|
|
542
747
|
position: absolute;
|
|
543
748
|
inset: 0;
|
|
544
749
|
content: "";
|
|
545
750
|
z-index: 1;
|
|
546
|
-
opacity: ${
|
|
751
|
+
opacity: ${yt.opacityPrimaryOnSurfaceSelected};
|
|
547
752
|
}
|
|
548
753
|
|
|
549
754
|
.ft-switch-option--label {
|
|
550
|
-
color: ${
|
|
755
|
+
color: ${qe.textColor};
|
|
551
756
|
overflow: hidden;
|
|
552
757
|
white-space: nowrap;
|
|
553
758
|
text-overflow: ellipsis;
|
|
554
759
|
display: block;
|
|
555
760
|
margin: 0 8px;
|
|
556
|
-
${
|
|
557
|
-
${
|
|
761
|
+
${gt(Ce.fontSize,qe.fontSize)};
|
|
762
|
+
${gt(Ce.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
558
763
|
}
|
|
559
764
|
|
|
560
765
|
.ft-switch-option--input:checked + .ft-switch-option--content .ft-switch-option--label {
|
|
561
|
-
color: ${
|
|
766
|
+
color: ${qe.selectedTextColor};
|
|
562
767
|
}
|
|
563
768
|
|
|
564
769
|
.ft-switch-option--label[hidden] {
|
|
@@ -566,7 +771,7 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
566
771
|
}
|
|
567
772
|
|
|
568
773
|
.ft-switch-option--ripple {
|
|
569
|
-
${
|
|
774
|
+
${gt(Ut.color,qe.rippleColor)};
|
|
570
775
|
}
|
|
571
776
|
|
|
572
777
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -579,49 +784,49 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
579
784
|
|
|
580
785
|
ft-icon {
|
|
581
786
|
flex-shrink: 0;
|
|
582
|
-
color: ${
|
|
787
|
+
color: ${qe.iconColor};
|
|
583
788
|
}
|
|
584
789
|
|
|
585
790
|
.ft-switch-option--input:checked + .ft-switch-option--content ft-icon {
|
|
586
|
-
color: ${
|
|
791
|
+
color: ${qe.selectedTextColor};
|
|
587
792
|
}
|
|
588
|
-
`;var
|
|
589
|
-
<label part="label" for="input" class=${
|
|
793
|
+
`;var Ii=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ti extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class zi extends $t{constructor(){super(...arguments),this.value="",this.iconVariant=bi.material,this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Ti)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon};return this.addTooltip(G`
|
|
794
|
+
<label part="label" for="input" class=${Ri(t)}
|
|
795
|
+
@click=${this.onChange}>
|
|
590
796
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
591
|
-
.checked=${this.selected}
|
|
592
|
-
@click=${this.onChange}>
|
|
797
|
+
.checked=${this.selected}>
|
|
593
798
|
<div class="ft-switch-option--content">
|
|
594
799
|
<ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
|
|
595
800
|
<ft-typography part="text"
|
|
596
801
|
variant="button"
|
|
597
|
-
class="ft-switch-option--label ${
|
|
802
|
+
class="ft-switch-option--label ${It?"ft-safari-ellipsis-fix":""}"
|
|
598
803
|
?hidden=${!this.hasTextContent()}>
|
|
599
804
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
600
805
|
</ft-typography>
|
|
601
806
|
${this.resolveIcon()}
|
|
602
807
|
</div>
|
|
603
808
|
</label>
|
|
604
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
809
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:G`
|
|
605
810
|
<ft-tooltip part="tooltip"
|
|
606
811
|
text="${this.getLabel()}"
|
|
607
812
|
position="${this.tooltipPosition}">
|
|
608
813
|
${t}
|
|
609
814
|
</ft-tooltip>
|
|
610
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?
|
|
815
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?G`
|
|
611
816
|
<ft-icon part="icon" .variant=${this.iconVariant} value=${this.icon}></ft-icon>
|
|
612
|
-
`:
|
|
613
|
-
<div @keydown=${this.onKeyDown} tabindex="0" class="${
|
|
817
|
+
`:q}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:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}zi.elementDefinitions={"ft-ripple":Ni,"ft-typography":ri,"ft-tooltip":_i,"ft-icon":gi},zi.styles=[kt,Mi],Ii([o()],zi.prototype,"value",void 0),Ii([o()],zi.prototype,"icon",void 0),Ii([o()],zi.prototype,"iconVariant",void 0),Ii([o()],zi.prototype,"label",void 0),Ii([o()],zi.prototype,"tooltipPosition",void 0),Ii([o({type:Boolean,reflect:!0})],zi.prototype,"selected",void 0),Ii([o({type:Boolean})],zi.prototype,"trailingIcon",void 0),Ii([o({type:Boolean})],zi.prototype,"unselectable",void 0),Ii([r(".ft-switch-option--content slot")],zi.prototype,"slottedContent",void 0),Ii([r(".ft-switch-option--input")],zi.prototype,"input",void 0);var Fi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Di extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ui extends $t{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){var e;super.updated(t),t.has("selectedOption")&&(this.updateOptions(),this.dispatchEvent(new Di(null===(e=this.selectedOption)||void 0===e?void 0:e.value))),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return G`
|
|
818
|
+
<div @keydown=${this.onKeyDown} tabindex="0" class="${Ri(t)}">
|
|
614
819
|
<slot @slotchange=${this.onSlotchange}
|
|
615
820
|
@option-change=${this.onOptionChange}></slot>
|
|
616
821
|
</div>
|
|
617
|
-
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
822
|
+
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof zi&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChange(t){t.stopPropagation();let e=t.target;e.selected?this.selectedOption=e:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t==this.selectedOption}))}}Ui.elementDefinitions={},Ui.styles=g`
|
|
618
823
|
:host {
|
|
619
824
|
display: inline-block;
|
|
620
825
|
}
|
|
621
826
|
|
|
622
827
|
.ft-switch {
|
|
623
|
-
border-radius: ${
|
|
624
|
-
outline-color: ${
|
|
828
|
+
border-radius: ${qe.borderRadius};
|
|
829
|
+
outline-color: ${qe.outlineColor};
|
|
625
830
|
}
|
|
626
831
|
|
|
627
832
|
.ft-switch slot {
|
|
@@ -630,25 +835,25 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
630
835
|
}
|
|
631
836
|
|
|
632
837
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
633
|
-
${
|
|
634
|
-
${
|
|
635
|
-
${
|
|
838
|
+
${gt(Ei.borderRadiusLeft,"0")};
|
|
839
|
+
${gt(Ei.borderRadiusRight,"0")};
|
|
840
|
+
${gt(Ei.borderWidthLeft,"0")};
|
|
636
841
|
}
|
|
637
842
|
|
|
638
843
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
639
|
-
${
|
|
640
|
-
${
|
|
844
|
+
${gt(Ei.borderRadiusLeft,qe.borderRadius)};
|
|
845
|
+
${gt(Ei.borderWidthLeft,"1px")};
|
|
641
846
|
}
|
|
642
847
|
|
|
643
848
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
644
|
-
${
|
|
849
|
+
${gt(Ei.borderRadiusRight,qe.borderRadius)};
|
|
645
850
|
}
|
|
646
851
|
|
|
647
852
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
648
853
|
--ft-switch-internal-vertical-padding: 2px;
|
|
649
854
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
650
855
|
}
|
|
651
|
-
`,
|
|
856
|
+
`,Fi([o({type:Boolean})],Ui.prototype,"dense",void 0),Fi([o({type:Boolean})],Ui.prototype,"unselectable",void 0),Fi([r(".ft-switch slot")],Ui.prototype,"slottedContent",void 0),Fi([n()],Ui.prototype,"selectedOption",void 0),Fi([r(".ft-switch")],Ui.prototype,"ftSwitchDiv",void 0),h("ft-switch")(Ui),h("ft-switch-option")(zi);const ji=vt.external(yt.colorOutline,"Design system"),Ai=vt.external(yt.colorOnSurfaceMedium,"Design system"),Bi=g`
|
|
652
857
|
:host {
|
|
653
858
|
display: block;
|
|
654
859
|
}
|
|
@@ -659,17 +864,17 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
659
864
|
|
|
660
865
|
ft-icon {
|
|
661
866
|
transform: rotate(-45deg);
|
|
662
|
-
color: ${
|
|
867
|
+
color: ${ji};
|
|
663
868
|
}
|
|
664
869
|
|
|
665
870
|
.ft-resizer--dragging ft-icon,
|
|
666
871
|
.ft-resizer:hover ft-icon {
|
|
667
|
-
color: ${
|
|
872
|
+
color: ${Ai};
|
|
668
873
|
}
|
|
669
|
-
`;var
|
|
874
|
+
`;var Li=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Pi extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class Hi extends $t{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return G`
|
|
670
875
|
<style>
|
|
671
876
|
.ft-resizer {
|
|
672
|
-
cursor: ${
|
|
877
|
+
cursor: ${v(this.cursor)}
|
|
673
878
|
}
|
|
674
879
|
</style>
|
|
675
880
|
<div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
|
|
@@ -677,25 +882,25 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
677
882
|
@touchstart=${this.initDragFromTouch}>
|
|
678
883
|
<ft-icon variant="material">${this.icon}</ft-icon>
|
|
679
884
|
</div>
|
|
680
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
885
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new Pi(i,o))}}Hi.elementDefinitions={"ft-icon":gi},Hi.styles=[wt,Bi],Li([o({type:Number})],Hi.prototype,"initialWidth",void 0),Li([o({type:Number})],Hi.prototype,"initialHeight",void 0),Li([o()],Hi.prototype,"icon",void 0),Li([o()],Hi.prototype,"cursor",void 0),Li([n()],Hi.prototype,"dragging",void 0),h("ft-resizer")(Hi);const Wi={fontSize:vt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:vt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:vt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:vt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:vt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:vt.create("--ft-input-label-max-width","SIZE","100%"),borderColor:vt.extend("--ft-input-label-border-color",yt.colorOutline),textColor:vt.extend("--ft-input-label-text-color",yt.colorOnSurfaceMedium),disabledTextColor:vt.extend("--ft-input-label-disabled-text-color",yt.colorOnSurfaceDisabled),colorSurface:vt.external(yt.colorSurface,"Design system"),borderRadiusS:vt.external(yt.borderRadiusS,"Design system"),colorError:vt.external(yt.colorError,"Design system")},Ki=g`
|
|
681
886
|
.ft-input-label {
|
|
682
887
|
position: absolute;
|
|
683
888
|
inset: 0;
|
|
684
889
|
display: flex;
|
|
685
|
-
background-color: ${
|
|
686
|
-
border-radius: ${
|
|
890
|
+
background-color: ${Wi.colorSurface};
|
|
891
|
+
border-radius: ${Wi.borderRadiusS} ${Wi.borderRadiusS} 0 0;
|
|
687
892
|
}
|
|
688
893
|
|
|
689
894
|
.ft-input-label--outlined {
|
|
690
|
-
border-radius: ${
|
|
895
|
+
border-radius: ${Wi.borderRadiusS};
|
|
691
896
|
}
|
|
692
897
|
|
|
693
898
|
.ft-input-label {
|
|
694
|
-
border-color: ${
|
|
899
|
+
border-color: ${Wi.borderColor};
|
|
695
900
|
}
|
|
696
901
|
|
|
697
902
|
.ft-input-label.ft-input-label--in-error {
|
|
698
|
-
border-color: ${
|
|
903
|
+
border-color: ${Wi.colorError}
|
|
699
904
|
}
|
|
700
905
|
|
|
701
906
|
.ft-input-label:before,
|
|
@@ -708,7 +913,7 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
708
913
|
}
|
|
709
914
|
|
|
710
915
|
.ft-input-label:before {
|
|
711
|
-
width: calc(${
|
|
916
|
+
width: calc(${Wi.horizontalSpacing} - 4px);
|
|
712
917
|
flex-shrink: 0;
|
|
713
918
|
}
|
|
714
919
|
|
|
@@ -724,20 +929,20 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
724
929
|
border-bottom-width: 1px;
|
|
725
930
|
border-bottom-style: solid;
|
|
726
931
|
border-color: inherit;
|
|
727
|
-
color: ${
|
|
932
|
+
color: ${Wi.textColor};
|
|
728
933
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
729
|
-
max-width: calc(${
|
|
934
|
+
max-width: calc(${Wi.labelMaxWidth} - 2 * (${Wi.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
730
935
|
text-overflow: ellipsis;
|
|
731
|
-
${
|
|
732
|
-
${
|
|
936
|
+
${gt(be.fontSize,Wi.fontSize)};
|
|
937
|
+
${gt(be.lineHeight,Wi.fontSize)};
|
|
733
938
|
}
|
|
734
939
|
|
|
735
940
|
.ft-input-label--in-error .ft-input-label--text {
|
|
736
|
-
color: ${
|
|
941
|
+
color: ${Wi.colorError}
|
|
737
942
|
}
|
|
738
943
|
|
|
739
944
|
.ft-input-label--disabled .ft-input-label--text {
|
|
740
|
-
color: ${
|
|
945
|
+
color: ${Wi.disabledTextColor};
|
|
741
946
|
}
|
|
742
947
|
|
|
743
948
|
.ft-input-label--hidden-text {
|
|
@@ -754,19 +959,19 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
754
959
|
overflow: hidden;
|
|
755
960
|
white-space: nowrap;
|
|
756
961
|
text-overflow: ellipsis;
|
|
757
|
-
padding: ${
|
|
758
|
-
margin: calc(${
|
|
962
|
+
padding: ${Wi.verticalSpacing} 4px;
|
|
963
|
+
margin: calc(${Wi.verticalSpacing} * -1) 0;
|
|
759
964
|
max-width: 100%;
|
|
760
965
|
box-sizing: border-box;
|
|
761
966
|
}
|
|
762
967
|
|
|
763
968
|
.ft-input-label--raised .ft-input-label--text {
|
|
764
|
-
${
|
|
765
|
-
${
|
|
969
|
+
${gt(be.fontSize,Wi.raisedFontSize)};
|
|
970
|
+
${gt(be.lineHeight,Wi.raisedFontSize)};
|
|
766
971
|
}
|
|
767
972
|
|
|
768
973
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
769
|
-
top: ${
|
|
974
|
+
top: ${Wi.verticalSpacing};
|
|
770
975
|
}
|
|
771
976
|
|
|
772
977
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -779,36 +984,36 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
779
984
|
.ft-input-label--outlined:before {
|
|
780
985
|
border-left-width: 1px;
|
|
781
986
|
border-left-style: solid;
|
|
782
|
-
border-radius: ${
|
|
987
|
+
border-radius: ${Wi.borderRadiusS} 0 0 ${Wi.borderRadiusS};
|
|
783
988
|
}
|
|
784
989
|
|
|
785
990
|
.ft-input-label--outlined:after {
|
|
786
991
|
border-right-width: 1px;
|
|
787
992
|
border-right-style: solid;
|
|
788
|
-
border-radius: 0 ${
|
|
993
|
+
border-radius: 0 ${Wi.borderRadiusS} ${Wi.borderRadiusS} 0;
|
|
789
994
|
}
|
|
790
995
|
|
|
791
996
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
792
997
|
padding: 2px 4px;
|
|
793
|
-
z-index: ${
|
|
794
|
-
background-color: ${
|
|
795
|
-
border-radius: ${
|
|
998
|
+
z-index: ${Wi.raisedZIndex};
|
|
999
|
+
background-color: ${Wi.colorSurface};
|
|
1000
|
+
border-radius: ${Wi.borderRadiusS};
|
|
796
1001
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
797
1002
|
}
|
|
798
1003
|
|
|
799
1004
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
800
1005
|
border-top: none;
|
|
801
1006
|
}
|
|
802
|
-
`;var
|
|
803
|
-
<div class="${
|
|
804
|
-
${this.text?
|
|
1007
|
+
`;var Zi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Vi extends $t{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return G`
|
|
1008
|
+
<div class="${Ri(t)}">
|
|
1009
|
+
${this.text?G`
|
|
805
1010
|
<div class="ft-input-label--text ft-typography--caption">
|
|
806
1011
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
807
1012
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
808
1013
|
</div>
|
|
809
1014
|
`:null}
|
|
810
1015
|
</div>
|
|
811
|
-
`}}
|
|
1016
|
+
`}}Vi.elementDefinitions={},Vi.styles=[Fe,Ki],Zi([o({type:String})],Vi.prototype,"text",void 0),Zi([o({type:Boolean})],Vi.prototype,"raised",void 0),Zi([o({type:Boolean})],Vi.prototype,"outlined",void 0),Zi([o({type:Boolean})],Vi.prototype,"disabled",void 0),Zi([o({type:Boolean})],Vi.prototype,"error",void 0),h("ft-input-label")(Vi);const Gi={fontSize:vt.create("--ft-text-area-font-size","SIZE","14px"),labelSize:vt.create("--ft-text-area-label-size","SIZE","11px"),verticalSpacing:vt.create("--ft-text-area-vertical-spacing","SIZE","4px"),horizontalSpacing:vt.create("--ft-text-area-horizontal-spacing","SIZE","16px"),helperColor:vt.extend("--ft-text-area-helper-color",yt.colorOnSurfaceMedium),colorPrimary:vt.external(yt.colorPrimary,"Design system"),colorOnSurface:vt.external(yt.colorOnSurface,"Design system"),colorOnSurfaceDisabled:vt.external(yt.colorOnSurfaceDisabled,"Design system"),borderRadiusS:vt.external(yt.borderRadiusS,"Design system"),colorError:vt.external(yt.colorError,"Design system")},Ji=g`
|
|
812
1017
|
*:focus {
|
|
813
1018
|
outline: none;
|
|
814
1019
|
}
|
|
@@ -820,10 +1025,10 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
820
1025
|
}
|
|
821
1026
|
|
|
822
1027
|
ft-input-label {
|
|
823
|
-
${
|
|
824
|
-
${
|
|
825
|
-
${
|
|
826
|
-
${
|
|
1028
|
+
${gt(Wi.fontSize,Gi.fontSize)};
|
|
1029
|
+
${gt(Wi.raisedFontSize,Gi.labelSize)};
|
|
1030
|
+
${gt(Wi.verticalSpacing,Gi.verticalSpacing)};
|
|
1031
|
+
${gt(Wi.horizontalSpacing,Gi.horizontalSpacing)};
|
|
827
1032
|
}
|
|
828
1033
|
|
|
829
1034
|
.ft-text-area--main-panel {
|
|
@@ -841,8 +1046,8 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
841
1046
|
}
|
|
842
1047
|
|
|
843
1048
|
.ft-text-area--input-panel ft-ripple {
|
|
844
|
-
${
|
|
845
|
-
${
|
|
1049
|
+
${gt(Ut.opacityContentOnSurfaceHover,"0.08")};
|
|
1050
|
+
${gt(Ut.opacityContentOnSurfacePressed,"0.04")};
|
|
846
1051
|
}
|
|
847
1052
|
|
|
848
1053
|
.ft-text-area--input {
|
|
@@ -854,12 +1059,12 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
854
1059
|
align-self: stretch;
|
|
855
1060
|
resize: none;
|
|
856
1061
|
|
|
857
|
-
${
|
|
858
|
-
${
|
|
859
|
-
color: ${
|
|
1062
|
+
${gt(le.fontSize,Gi.fontSize)};
|
|
1063
|
+
${gt(le.lineHeight,Gi.fontSize)};
|
|
1064
|
+
color: ${Gi.colorOnSurface};
|
|
860
1065
|
|
|
861
|
-
padding: 0 ${
|
|
862
|
-
margin: calc(${
|
|
1066
|
+
padding: 0 ${Gi.horizontalSpacing};
|
|
1067
|
+
margin: calc(${Gi.verticalSpacing} + ${Gi.labelSize} / 2) 0 ${Gi.verticalSpacing} 0;
|
|
863
1068
|
|
|
864
1069
|
border: none;
|
|
865
1070
|
background: none;
|
|
@@ -868,7 +1073,7 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
868
1073
|
}
|
|
869
1074
|
|
|
870
1075
|
.ft-text-area--disabled .ft-text-area--input {
|
|
871
|
-
color: ${
|
|
1076
|
+
color: ${Gi.colorOnSurfaceDisabled};
|
|
872
1077
|
}
|
|
873
1078
|
|
|
874
1079
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -876,32 +1081,32 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
876
1081
|
}
|
|
877
1082
|
|
|
878
1083
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
879
|
-
${
|
|
880
|
-
${
|
|
1084
|
+
${gt(Wi.borderColor,Gi.colorPrimary)};
|
|
1085
|
+
${gt(Wi.textColor,Gi.colorPrimary)};
|
|
881
1086
|
}
|
|
882
1087
|
|
|
883
1088
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
884
|
-
border-radius: ${
|
|
1089
|
+
border-radius: ${Gi.borderRadiusS} ${Gi.borderRadiusS} 0 0;
|
|
885
1090
|
}
|
|
886
1091
|
|
|
887
1092
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
888
1093
|
align-self: stretch;
|
|
889
|
-
margin-bottom: ${
|
|
890
|
-
margin-top: calc(${
|
|
1094
|
+
margin-bottom: ${Gi.verticalSpacing};
|
|
1095
|
+
margin-top: calc(${Gi.labelSize} + 2 * ${Gi.verticalSpacing});
|
|
891
1096
|
}
|
|
892
1097
|
|
|
893
1098
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
894
|
-
border-radius: ${
|
|
1099
|
+
border-radius: ${Gi.borderRadiusS};
|
|
895
1100
|
}
|
|
896
1101
|
|
|
897
1102
|
.ft-text-area--helper-text {
|
|
898
|
-
padding: 0 12px 0 ${
|
|
899
|
-
color: ${
|
|
1103
|
+
padding: 0 12px 0 ${Gi.horizontalSpacing};
|
|
1104
|
+
color: ${Gi.helperColor};
|
|
900
1105
|
}
|
|
901
1106
|
|
|
902
1107
|
.ft-text-area--in-error .ft-text-area--input,
|
|
903
1108
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
904
|
-
color: ${
|
|
1109
|
+
color: ${Gi.colorError};
|
|
905
1110
|
}
|
|
906
1111
|
|
|
907
1112
|
ft-resizer {
|
|
@@ -909,13 +1114,13 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
909
1114
|
right: 0;
|
|
910
1115
|
bottom: 0;
|
|
911
1116
|
}
|
|
912
|
-
`;var
|
|
1117
|
+
`;var qi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Yi extends $t{constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return G`
|
|
913
1118
|
<style>
|
|
914
1119
|
.ft-text-area--main-panel {
|
|
915
|
-
height: calc(4 * ${
|
|
1120
|
+
height: calc(4 * ${Gi.verticalSpacing} + ${Gi.labelSize} + ${Gi.fontSize} + ${this.height}px);
|
|
916
1121
|
}
|
|
917
1122
|
</style>
|
|
918
|
-
<div class="${
|
|
1123
|
+
<div class="${Ri(t)}">
|
|
919
1124
|
<div class="ft-text-area--main-panel">
|
|
920
1125
|
<ft-input-label text="${this.label}"
|
|
921
1126
|
?disabled=${this.disabled}
|
|
@@ -925,7 +1130,7 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
925
1130
|
></ft-input-label>
|
|
926
1131
|
<div class="ft-text-area--input-panel"
|
|
927
1132
|
aria-label="${this.label}">
|
|
928
|
-
${this.outlined?null:
|
|
1133
|
+
${this.outlined?null:G`
|
|
929
1134
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
930
1135
|
`}
|
|
931
1136
|
<textarea class="ft-typography--body1 ft-text-area--input"
|
|
@@ -942,247 +1147,55 @@ const mi=ti(class extends ei{constructor(t){var e;if(super(t),t.type!==Xe||"clas
|
|
|
942
1147
|
initialHeight="${this.height}"
|
|
943
1148
|
cursor="ns-resize"></ft-resizer>
|
|
944
1149
|
</div>
|
|
945
|
-
${this.helper?
|
|
1150
|
+
${this.helper?G`
|
|
946
1151
|
<ft-typography class="ft-text-area--helper-text" variant="caption">
|
|
947
1152
|
${this.helper}
|
|
948
1153
|
</ft-typography>`:void 0}
|
|
949
1154
|
</div>
|
|
950
|
-
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
1155
|
+
`}updated(t){super.updated(t),t.has("value")&&this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||""}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}Yi.elementDefinitions={"ft-input-label":Vi,"ft-resizer":Hi,"ft-ripple":Ni,"ft-typography":ri},Yi.styles=[Te,Ji],qi([o({type:String})],Yi.prototype,"label",void 0),qi([o({reflect:!0})],Yi.prototype,"value",void 0),qi([o({type:String})],Yi.prototype,"helper",void 0),qi([o({type:Boolean})],Yi.prototype,"outlined",void 0),qi([o({type:Boolean})],Yi.prototype,"disabled",void 0),qi([o({type:Boolean})],Yi.prototype,"error",void 0),qi([o({type:Number,reflect:!0})],Yi.prototype,"height",void 0),qi([r("textarea")],Yi.prototype,"textarea",void 0),qi([n()],Yi.prototype,"focused",void 0),h("ft-text-area")(Yi);
|
|
951
1156
|
/**
|
|
952
1157
|
* @license
|
|
953
1158
|
* Copyright 2020 Google LLC
|
|
954
1159
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
955
1160
|
*/
|
|
956
|
-
const{I:
|
|
957
|
-
:host {
|
|
958
|
-
line-height: 0;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
.ft-loader {
|
|
962
|
-
display: inline-block;
|
|
963
|
-
position: relative;
|
|
964
|
-
|
|
965
|
-
width: ${ho.size};
|
|
966
|
-
height: ${ho.size};
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
.ft-loader div {
|
|
970
|
-
position: absolute;
|
|
971
|
-
top: 37.5%;
|
|
972
|
-
width: 25%;
|
|
973
|
-
height: 25%;
|
|
974
|
-
border-radius: 50%;
|
|
975
|
-
background: ${ho.color};
|
|
976
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
.ft-loader div:nth-child(1) {
|
|
980
|
-
left: 2.5%;
|
|
981
|
-
animation: appear 0.6s infinite;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
.ft-loader div:nth-child(2) {
|
|
985
|
-
left: 2.5%;
|
|
986
|
-
animation: move 0.6s infinite;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
.ft-loader div:nth-child(3) {
|
|
990
|
-
left: 37.5%;
|
|
991
|
-
animation: move 0.6s infinite;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
.ft-loader div:nth-child(4) {
|
|
995
|
-
left: 72.5%;
|
|
996
|
-
animation: disappear 0.6s infinite;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
@keyframes appear {
|
|
1000
|
-
0% {
|
|
1001
|
-
transform: scale(0);
|
|
1002
|
-
}
|
|
1003
|
-
100% {
|
|
1004
|
-
transform: scale(1);
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
@keyframes disappear {
|
|
1009
|
-
0% {
|
|
1010
|
-
transform: scale(1);
|
|
1011
|
-
}
|
|
1012
|
-
100% {
|
|
1013
|
-
transform: scale(0);
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
@keyframes move {
|
|
1018
|
-
0% {
|
|
1019
|
-
transform: translate(0, 0);
|
|
1020
|
-
}
|
|
1021
|
-
100% {
|
|
1022
|
-
transform: translate(calc(0.35 * ${ho.size}), 0);
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
`;
|
|
1161
|
+
const{I:Xi}=ct,Qi=()=>document.createComment(""),to=(t,e,i)=>{var o;const n=t._$AA.parentNode,s=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Qi(),s),o=n.insertBefore(Qi(),s);i=new Xi(e,o,t,t.options)}else{const e=i._$AB.nextSibling,r=i._$AM,a=r!==t;if(a){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==r._$AU&&i._$AP(e)}if(e!==s||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,s),t=e}}}return i},eo=(t,e,i=t)=>(t._$AI(e,i),t),io={},oo=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}},no=(t,e,i)=>{const o=new Map;for(let n=e;n<=i;n++)o.set(t[n],n);return o},so=hi(class extends ci{constructor(t){if(super(t),t.type!==li)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const n=[],s=[];let r=0;for(const e of t)n[r]=o?o(e,r):r,s[r]=i(e,r),r++;return{values:s,keys:n}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var n;const s=(t=>t._$AH)(t),{values:r,keys:a}=this.ht(e,i,o);if(!Array.isArray(s))return this.ut=a,r;const l=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let c,d,p=0,f=s.length-1,u=0,b=r.length-1;for(;p<=f&&u<=b;)if(null===s[p])p++;else if(null===s[f])f--;else if(l[p]===a[u])h[u]=eo(s[p],r[u]),p++,u++;else if(l[f]===a[b])h[b]=eo(s[f],r[b]),f--,b--;else if(l[p]===a[b])h[b]=eo(s[p],r[b]),to(t,h[b+1],s[p]),p++,b--;else if(l[f]===a[u])h[u]=eo(s[f],r[u]),to(t,s[p],s[f]),f--,u++;else if(void 0===c&&(c=no(a,u,b),d=no(l,p,f)),c.has(l[p]))if(c.has(l[f])){const e=d.get(a[u]),i=void 0!==e?s[e]:null;if(null===i){const e=to(t,s[p]);eo(e,r[u]),h[u]=e}else h[u]=eo(i,r[u]),to(t,s[p],i),s[e]=null;u++}else oo(s[f]),f--;else oo(s[p]),p++;for(;u<=b;){const e=to(t,h[b+1]);eo(e,r[u]),h[u++]=e}for(;p<=f;){const t=s[p++];null!==t&&oo(t)}return this.ut=a,((t,e=io)=>{t._$AH=e})(t,h),J}});
|
|
1026
1162
|
/**
|
|
1027
1163
|
* @license
|
|
1028
1164
|
* Copyright 2017 Google LLC
|
|
1029
1165
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1030
|
-
*/class
|
|
1166
|
+
*/class ro extends $t{render(){return G`
|
|
1031
1167
|
<div class="ft-loader">
|
|
1032
1168
|
<div></div>
|
|
1033
1169
|
<div></div>
|
|
1034
1170
|
<div></div>
|
|
1035
1171
|
<div></div>
|
|
1036
1172
|
</div>
|
|
1037
|
-
`}}
|
|
1038
|
-
:host {
|
|
1039
|
-
display: inline-block;
|
|
1040
|
-
max-width: 100%;
|
|
1041
|
-
pointer-events: none;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
button {
|
|
1045
|
-
box-shadow: 0px 0px 0px transparent;
|
|
1046
|
-
border: 0px solid transparent;
|
|
1047
|
-
text-shadow: 0px 0px 0px transparent;
|
|
1048
|
-
font-size: ${uo.fontSize};
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
button:hover {
|
|
1052
|
-
box-shadow: 0px 0px 0px transparent;
|
|
1053
|
-
border: 0px solid transparent;
|
|
1054
|
-
text-shadow: 0px 0px 0px transparent;
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
button:active {
|
|
1058
|
-
outline: none;
|
|
1059
|
-
border: none;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
button:focus {
|
|
1063
|
-
outline: 0;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.ft-button {
|
|
1067
|
-
position: relative;
|
|
1068
|
-
display: flex;
|
|
1069
|
-
justify-content: center;
|
|
1070
|
-
align-items: center;
|
|
1071
|
-
width: 100%;
|
|
1072
|
-
overflow: hidden;
|
|
1073
|
-
box-sizing: border-box;
|
|
1074
|
-
border: none;
|
|
1075
|
-
pointer-events: auto;
|
|
1076
|
-
|
|
1077
|
-
--ft-button-internal-line-height: calc(${uo.fontSize} + 2px);
|
|
1078
|
-
--ft-button-internal-color: ${uo.color};
|
|
1079
|
-
${yt(ri.size,uo.iconSize)};
|
|
1080
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
1081
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
1082
|
-
${yt(wi.color,uo.rippleColor)};
|
|
1083
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${uo.iconSize});
|
|
1084
|
-
|
|
1085
|
-
border-radius: ${uo.borderRadius};
|
|
1086
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
1087
|
-
background-color: ${uo.backgroundColor};
|
|
1088
|
-
color: var(--ft-button-internal-color);
|
|
1089
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
.ft-button:not([disabled]):hover {
|
|
1093
|
-
cursor: pointer;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
.ft-button--dense {
|
|
1097
|
-
--ft-button-internal-vertical-padding: 2px;
|
|
1098
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
1099
|
-
border-radius: ${go};
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
.ft-button--round {
|
|
1103
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
.ft-button[disabled] {
|
|
1107
|
-
filter: grayscale(1);
|
|
1108
|
-
opacity: ${uo.opacityDisabled};
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
.ft-button.ft-button--primary {
|
|
1112
|
-
background-color: ${bo.backgroundColor};
|
|
1113
|
-
--ft-button-internal-color: ${bo.color};
|
|
1114
|
-
${yt(wi.color,bo.rippleColor)};
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
.ft-button.ft-button--outlined {
|
|
1118
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
1119
|
-
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.ft-button:focus {
|
|
1123
|
-
outline: none;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
.ft-button--label {
|
|
1127
|
-
position: relative;
|
|
1128
|
-
overflow: hidden;
|
|
1129
|
-
white-space: nowrap;
|
|
1130
|
-
text-overflow: ellipsis;
|
|
1131
|
-
display: block;
|
|
1132
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
1133
|
-
${yt(je.fontSize,"1em")};
|
|
1134
|
-
${yt(je.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
.ft-button--label[hidden] {
|
|
1138
|
-
display: none;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
ft-icon {
|
|
1142
|
-
flex-shrink: 0;
|
|
1143
|
-
position: relative;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.ft-button--label[hidden] + ft-icon {
|
|
1147
|
-
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
1148
|
-
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
1152
|
-
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
1153
|
-
order: -1;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
ft-loader {
|
|
1157
|
-
${yt(ho.size,uo.iconSize)};
|
|
1158
|
-
${yt(ho.color,"var(--ft-button-internal-color)")};
|
|
1159
|
-
}
|
|
1160
|
-
`];var xo=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class mo extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=li.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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(J`
|
|
1173
|
+
`}}ro.styles=Le,h("ft-loader")(ro);var ao=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class lo extends $t{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=bi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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(G`
|
|
1161
1174
|
<button part="button"
|
|
1162
|
-
class="${
|
|
1175
|
+
class="${Ri(t)}"
|
|
1163
1176
|
aria-label="${this.getLabel()}"
|
|
1164
1177
|
?disabled=${this.isDisabled()}>
|
|
1165
1178
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
1166
1179
|
<ft-typography part="label"
|
|
1167
1180
|
variant="button"
|
|
1168
1181
|
element="span"
|
|
1169
|
-
class="ft-button--label ${
|
|
1182
|
+
class="ft-button--label ${It?"ft-safari-ellipsis-fix":""}"
|
|
1170
1183
|
?hidden=${!this.hasTextContent()}>
|
|
1171
1184
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1172
1185
|
</ft-typography>
|
|
1173
1186
|
${this.resolveIcon()}
|
|
1174
1187
|
</button>
|
|
1175
|
-
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?
|
|
1188
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?G`
|
|
1176
1189
|
<ft-tooltip part="tooltip"
|
|
1177
1190
|
text="${this.getLabel()}"
|
|
1178
1191
|
position="${this.tooltipPosition}">
|
|
1179
1192
|
${t}
|
|
1180
1193
|
</ft-tooltip>
|
|
1181
|
-
`:t}resolveIcon(){return this.loading?
|
|
1182
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
1183
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:
|
|
1194
|
+
`:t}resolveIcon(){return this.loading?G`
|
|
1195
|
+
<ft-loader></ft-loader> `:this.icon?G`
|
|
1196
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:q}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}}lo.elementDefinitions={"ft-ripple":Ni,"ft-tooltip":_i,"ft-typography":ri,"ft-icon":gi,"ft-loader":ro},lo.styles=[kt,Je],ao([o({type:Boolean})],lo.prototype,"primary",void 0),ao([o({type:Boolean})],lo.prototype,"outlined",void 0),ao([o({type:Boolean})],lo.prototype,"disabled",void 0),ao([o({type:Boolean})],lo.prototype,"dense",void 0),ao([o({type:Boolean})],lo.prototype,"round",void 0),ao([o({type:String})],lo.prototype,"label",void 0),ao([o({type:String})],lo.prototype,"icon",void 0),ao([o({type:String})],lo.prototype,"iconVariant",void 0),ao([o({type:Boolean})],lo.prototype,"trailingIcon",void 0),ao([o({type:Boolean})],lo.prototype,"loading",void 0),ao([o({type:String})],lo.prototype,"tooltipPosition",void 0),ao([o({type:Boolean})],lo.prototype,"hideTooltip",void 0),ao([o({type:Boolean})],lo.prototype,"forceTooltip",void 0),ao([r(".ft-button")],lo.prototype,"button",void 0),ao([r(".ft-button--label slot")],lo.prototype,"slottedContent",void 0),h("ft-button")(lo);var ho=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class co extends $t{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.feedbackMessage="",this.iconVariant=bi.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN"}get canAccessFeedback(){return this.user&&this.user.roles.includes("FEEDBACK_USER")}get canAccessRating(){return this.userHasRatingRole&&"NO_RATING"!==this.configuredRatingType}get userHasRatingRole(){return this.user&&this.user.roles.includes("RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,e;const i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.date;return"string"==typeof i?((o=i).match(/^\d{4}-\d{2}-\d{2}$/)&&(o=o.replace(/-/g,"/")),o=o.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,((t,e,i,o)=>e+i+":"+o)),new Date(o)):i;var o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?G`
|
|
1184
1197
|
<div class="ft-reader-feedback">
|
|
1185
|
-
${this.hideTitle?
|
|
1198
|
+
${this.hideTitle?q:G`
|
|
1186
1199
|
<ft-typography variant="title" part="main-title">
|
|
1187
1200
|
${this.labelResolver.resolve("feedbackMainTitle")}
|
|
1188
1201
|
</ft-typography>
|
|
@@ -1190,7 +1203,7 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1190
1203
|
${this.renderRatingSection()}
|
|
1191
1204
|
${this.renderFeedbackSection()}
|
|
1192
1205
|
</div>
|
|
1193
|
-
`:
|
|
1206
|
+
`:q}renderRatingSection(){return this.canAccessRating?G`
|
|
1194
1207
|
<div class="ft-reader-feedback--rating" part="rating-container">
|
|
1195
1208
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1196
1209
|
${"DICHOTOMOUS"===this.ratingSummary.type?this.labelResolver.resolve("dichotomousRatingSectionTitle"):this.labelResolver.resolve("ratingSectionTitle")}
|
|
@@ -1200,9 +1213,9 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1200
1213
|
${this.renderRatingDate()}
|
|
1201
1214
|
</ft-typography>
|
|
1202
1215
|
</div>
|
|
1203
|
-
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content":"missing role RATING_USER"))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return
|
|
1216
|
+
`:this.placeholderInEditor("Rating unavailable: "+(this.userHasRatingRole?"no rating configured for this content":"missing role RATING_USER"))}renderRatingDate(){const t=this.ratingDate;if(null==t)return this.labelResolver.resolve("notRated");if(t.getTime()>(new Date).getTime()-6e4)return this.labelResolver.resolve("ratedNow");return(new Date).toLocaleDateString()===t.toLocaleDateString()?this.labelResolver.resolve("ratedToday"):this.labelResolver.resolve("ratedOn",t)}renderRating(){switch(this.configuredRatingType){case"STARS":return G`
|
|
1204
1217
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1205
|
-
${
|
|
1218
|
+
${so(new Array(5),((t,e)=>e),((t,e)=>{let i="STARS"===this.ratingType&&this.ratingValue>e;const o=e+1;return G`
|
|
1206
1219
|
<ft-button round part="rating-stars-${o}"
|
|
1207
1220
|
label="${this.labelResolver.resolve("starsRating",o)}"
|
|
1208
1221
|
tooltipPosition="top"
|
|
@@ -1213,7 +1226,7 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1213
1226
|
></ft-button>
|
|
1214
1227
|
`}))}
|
|
1215
1228
|
</div>
|
|
1216
|
-
`;case"LIKE":const t="LIKE"===this.ratingType&&0===this.ratingValue,e="LIKE"===this.ratingType&&1===this.ratingValue;return
|
|
1229
|
+
`;case"LIKE":const t="LIKE"===this.ratingType&&0===this.ratingValue,e="LIKE"===this.ratingType&&1===this.ratingValue;return G`
|
|
1217
1230
|
<ft-switch @change=${t=>this.rate(t.detail)} part="rating rating-like">
|
|
1218
1231
|
<ft-switch-option .value=${0}
|
|
1219
1232
|
?selected=${t}
|
|
@@ -1228,7 +1241,7 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1228
1241
|
${this.labelResolver.resolve("like")}
|
|
1229
1242
|
</ft-switch-option>
|
|
1230
1243
|
</ft-switch>
|
|
1231
|
-
`;case"DICHOTOMOUS":const i="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,o="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return
|
|
1244
|
+
`;case"DICHOTOMOUS":const i="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,o="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return G`
|
|
1232
1245
|
<ft-switch @change=${t=>this.rate(t.detail)}
|
|
1233
1246
|
part="rating rating-dichotomous">
|
|
1234
1247
|
<ft-switch-option .value=${0}
|
|
@@ -1240,7 +1253,7 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1240
1253
|
${this.labelResolver.resolve("dichotomousYes")}
|
|
1241
1254
|
</ft-switch-option>
|
|
1242
1255
|
</ft-switch>
|
|
1243
|
-
`}return
|
|
1256
|
+
`}return q}rate(t){this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){if(this.canAccessFeedback){const t=this.feedbackMailLinkBuilder(this.feedbackMessage);let e=G`
|
|
1244
1257
|
<ft-button primary
|
|
1245
1258
|
class="ft-reader-feedback--send-feedback"
|
|
1246
1259
|
?disabled=${!this.feedbackMessage}
|
|
@@ -1248,11 +1261,11 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1248
1261
|
part="send-feedback">
|
|
1249
1262
|
${this.labelResolver.resolve("okButton")}
|
|
1250
1263
|
</ft-button>
|
|
1251
|
-
`;return t&&(e=
|
|
1264
|
+
`;return t&&(e=G`
|
|
1252
1265
|
<a class="ft-reader-feedback--feedback-link" href="${t}">
|
|
1253
1266
|
${e}
|
|
1254
1267
|
</a>
|
|
1255
|
-
`),
|
|
1268
|
+
`),G`
|
|
1256
1269
|
<div class="ft-reader-feedback--feedback" part="feedback-container">
|
|
1257
1270
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1258
1271
|
${this.labelResolver.resolve("feedbackSectionTitle")}
|
|
@@ -1264,7 +1277,7 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1264
1277
|
></ft-text-area>
|
|
1265
1278
|
${e}
|
|
1266
1279
|
</div>
|
|
1267
|
-
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?
|
|
1280
|
+
`}return this.placeholderInEditor("Feedback unavailable: missing role FEEDBACK_USER")}sendFeedback(){this.dispatchEvent(new CustomEvent("send-feedback",{detail:this.feedbackInput.value}))}placeholderInEditor(t){return this.editorMode?G`
|
|
1268
1281
|
<div class="ft-reader-feedback--placeholder">
|
|
1269
1282
|
<ft-typography variant="caption">${t}</ft-typography>
|
|
1270
1283
|
<ft-tooltip position="left"
|
|
@@ -1272,11 +1285,12 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1272
1285
|
<ft-icon>INFO</ft-icon>
|
|
1273
1286
|
</ft-tooltip>
|
|
1274
1287
|
</div>
|
|
1275
|
-
`:
|
|
1288
|
+
`:q}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}co.elementDefinitions={"ft-button":lo,"ft-typography":ri,"ft-icon":gi,"ft-tooltip":_i,"ft-switch":Ui,"ft-switch-option":zi,"ft-text-area":Yi},co.styles=Xe,ho([o({attribute:!0})],co.prototype,"editorMode",void 0),ho([o({type:Boolean})],co.prototype,"hideTitle",void 0),ho([o({type:Boolean})],co.prototype,"ratingAllowed",void 0),ho([o({attribute:!1})],co.prototype,"labelResolver",void 0),ho([o({attribute:!1})],co.prototype,"ratingSummary",void 0),ho([o({attribute:!1})],co.prototype,"user",void 0),ho([r(".ft-reader-feedback--feedback-input")],co.prototype,"feedbackInput",void 0),ho([n()],co.prototype,"feedbackMessage",void 0),ho([o()],co.prototype,"iconVariant",void 0),ho([o()],co.prototype,"emptyStarIcon",void 0),ho([o()],co.prototype,"filledStarIcon",void 0),ho([o()],co.prototype,"emptyLikeIcon",void 0),ho([o()],co.prototype,"filledLikeIcon",void 0),ho([o()],co.prototype,"emptyDislikeIcon",void 0),ho([o()],co.prototype,"filledDislikeIcon",void 0),ho([o()],co.prototype,"feedbackMailLinkBuilder",void 0);const po={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",okButton:"Send feedback",cancelButton:"Cancel",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later."},fo={...po,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this document",dichotomousRatingSectionTitle:"Did it solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}”",feedbackAndRatingDisabledInEditor:"Feedback & rating disabled in the reader designer"},uo=new St({...po,feedbackMainTitle:"Send feedback",ratingSectionTitle:"Rate this content",dichotomousRatingSectionTitle:"Did this content solve your problem?",feedbackSectionTitle:"Write your review",mailSubject:"Feedback about “{0}” in “{1}”",feedbackAndRatingDisabledInEditor:"Feedback & rating disabled in the topic template designer"},{}),bo=new St(fo,{});class vo{constructor(t){this.disclaimer=t,this.subject="",this.url="",this.allMetadata="",this.subjectMetadata="",this.isAuthenticated=!1}update(t,e,i,o,n){this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=n,this.subjectMetadata=o.subjectMetadataIds.map((t=>i.find((e=>e.key===t)))).filter((t=>null!=t)).map((t=>"["+t.values.join(", ")+"]")).join(""),this.allMetadata=i.filter((t=>!t.key.startsWith("ft:"))).map((t=>"["+t.values.join(", ")+"]")).join(" ")}build(t){var e,i;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics)))return;const o=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.allMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${this.disclaimer}`);return`mailto:${null===(i=this.configuration)||void 0===i?void 0:i.recipients.join(",")}?subject=${o}&body=${n}`}}var go=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class yo extends Ft{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=bi.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new vo(bo.resolve("mailDisclaimer")),this.updateDebouncer=new e(100),this.sendRatingDebouncer=new e(500)}render(){return null==this.map?q:G`
|
|
1276
1289
|
<ft-reader-feedback
|
|
1277
1290
|
ratingAllowed
|
|
1278
|
-
.editorMode=${
|
|
1279
|
-
|
|
1291
|
+
.editorMode=${this.editorMode}
|
|
1292
|
+
?hideTitle=${this.hideTitle}
|
|
1293
|
+
.labelResolver=${bo}
|
|
1280
1294
|
.ratingSummary=${this.ratingSummary}
|
|
1281
1295
|
.user=${this.user}
|
|
1282
1296
|
.iconVariant=${this.iconVariant}
|
|
@@ -1290,11 +1304,12 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1290
1304
|
@rate=${this.rate}
|
|
1291
1305
|
@send-feedback=${this.sendFeedback}
|
|
1292
1306
|
></ft-reader-feedback>
|
|
1293
|
-
`}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.updateData(),["map","configuration","user"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(
|
|
1307
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(bo.resolve("mailSubject",this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.map&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new xt({type:"error",message:bo.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new xt({type:"info",message:bo.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new xt({type:"info",message:bo.resolve("feedbackAndRatingDisabledInEditor")})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail)),this.dispatchEvent(new xt({type:"info",message:bo.resolve("feedbackSuccess")}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new xt({type:"error",message:bo.resolve("feedbackFailure")}))}}}yo.elementDefinitions={"ft-reader-feedback":co},go([_t()],yo.prototype,"map",void 0),go([o({attribute:!1})],yo.prototype,"editorMode",void 0),go([_t((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],yo.prototype,"configuration",void 0),go([n()],yo.prototype,"ratingSummary",void 0),go([n()],yo.prototype,"user",void 0),go([o({type:Boolean})],yo.prototype,"hideTitle",void 0),go([o()],yo.prototype,"iconVariant",void 0),go([o()],yo.prototype,"emptyStarIcon",void 0),go([o()],yo.prototype,"filledStarIcon",void 0),go([o()],yo.prototype,"emptyLikeIcon",void 0),go([o()],yo.prototype,"filledLikeIcon",void 0),go([o()],yo.prototype,"emptyDislikeIcon",void 0),go([o()],yo.prototype,"filledDislikeIcon",void 0),go([r("ft-reader-feedback")],yo.prototype,"readerFeedback",void 0);var xo=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class mo extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class $o extends(function(t){class e extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this.registerIntervalTopic=0}connectedCallback(){super.connectedCallback(),this.registerIntervalTopic=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this.registerIntervalTopic):this.dispatchEvent(new mo)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return xo([n()],e.prototype,"tocNode",void 0),xo([n()],e.prototype,"disableContextInteractions",void 0),e}(Ft)){}var wo=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class ko extends $o{constructor(){super(...arguments),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=bi.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new vo(uo.resolve("mailDisclaimer")),this.sendRatingDebouncer=new e(500)}render(){return null==this.map||null==this.tocNode?q:G`
|
|
1294
1308
|
<ft-reader-feedback
|
|
1295
1309
|
?ratingAllowed=${this.tocNode.hasRating}
|
|
1296
1310
|
.editorMode=${this.editorMode}
|
|
1297
|
-
|
|
1311
|
+
?hideTitle=${this.hideTitle}
|
|
1312
|
+
.labelResolver=${uo}
|
|
1298
1313
|
.ratingSummary=${this.ratingSummary}
|
|
1299
1314
|
.user=${this.user}
|
|
1300
1315
|
.iconVariant=${this.iconVariant}
|
|
@@ -1308,4 +1323,4 @@ const{I:eo}=dt,io=()=>document.createComment(""),oo=(t,e,i)=>{var o;const n=t._$
|
|
|
1308
1323
|
@rate=${this.rate}
|
|
1309
1324
|
@send-feedback=${this.sendFeedback}
|
|
1310
1325
|
></ft-reader-feedback>
|
|
1311
|
-
`}updated(t){var e,i,o;super.updated(t),t.has("tocNode")&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(
|
|
1326
|
+
`}updated(t){var e,i,o;super.updated(t),t.has("tocNode")&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(uo.resolve("mailSubject",this.tocNode.title,this.map.title),null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}async updateData(){var t,e;this.user=await(null===(t=this.service)||void 0===t?void 0:t.getSession().then((t=>t.profile))),this.tocNode&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getTopicRating(this.tocNode.tocId)))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new xt({type:"error",message:uo.resolve("ratingFailure")}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new xt({type:"info",message:uo.resolve("feedbackAndRatingDisabledInEditor")}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail)),this.dispatchEvent(new xt({type:"info",message:uo.resolve("feedbackSuccess")})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new xt({type:"info",message:uo.resolve("feedbackAndRatingDisabledInEditor")}))}catch{this.dispatchEvent(new xt({type:"error",message:uo.resolve("feedbackFailure")}))}}}ko.elementDefinitions={"ft-reader-feedback":co},wo([_t()],ko.prototype,"map",void 0),wo([o({attribute:!1})],ko.prototype,"editorMode",void 0),wo([_t((t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}))],ko.prototype,"configuration",void 0),wo([n()],ko.prototype,"ratingSummary",void 0),wo([n()],ko.prototype,"user",void 0),wo([o({type:Boolean})],ko.prototype,"hideTitle",void 0),wo([o()],ko.prototype,"iconVariant",void 0),wo([o()],ko.prototype,"emptyStarIcon",void 0),wo([o()],ko.prototype,"filledStarIcon",void 0),wo([o()],ko.prototype,"emptyLikeIcon",void 0),wo([o()],ko.prototype,"filledLikeIcon",void 0),wo([o()],ko.prototype,"emptyDislikeIcon",void 0),wo([o()],ko.prototype,"filledDislikeIcon",void 0),wo([r("ft-reader-feedback")],ko.prototype,"readerFeedback",void 0),h("ft-reader-map-feedback")(yo),h("ft-reader-topic-feedback")(ko),t.FtReaderFeedbackCssVariables=Ye,t.FtReaderMapFeedback=yo,t.FtReaderTopicFeedback=ko,t.styles=Xe,Object.defineProperty(t,"i",{value:!0})}({});
|