@fluid-topics/ft-reader-toc 0.3.12 → 0.3.13
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-toc.css.d.ts +11 -0
- package/build/ft-reader-toc.css.js +48 -0
- package/build/ft-reader-toc.d.ts +2 -22
- package/build/ft-reader-toc.js +7 -50
- package/build/ft-reader-toc.light.js +469 -469
- package/build/ft-reader-toc.min.js +478 -478
- package/build/ft-reader-toc.properties.d.ts +15 -0
- package/build/ft-reader-toc.properties.js +5 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +7 -7
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=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||[]);d(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=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.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=s.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=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(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 r{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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=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||[]);d(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=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.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=s.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=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.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)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(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 r{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 s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(bi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.warn(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -101,172 +101,261 @@ var ct,pt;null==ht||ht(G,et),(null!==(E=globalThis.litHtmlVersions)&&void 0!==E?
|
|
|
101
101
|
* Copyright 2020 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
103
|
*/
|
|
104
|
-
const Ht=Symbol.for(""),Kt=t=>{if((null==t?void 0:t.r)===Ht)return null==t?void 0:t._$litStatic$},Zt=t=>({_$litStatic$:t,r:Ht}),Vt=new Map,Jt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=Kt(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=Vt.get(t))&&(s.raw=s,Vt.set(t,e=s)),i=a}return t(e,...i)})(Z);var Xt
|
|
104
|
+
const Ht=Symbol.for(""),Kt=t=>{if((null==t?void 0:t.r)===Ht)return null==t?void 0:t._$litStatic$},Zt=t=>({_$litStatic$:t,r:Ht}),Vt=new Map,Jt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=Kt(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=Vt.get(t))&&(s.raw=s,Vt.set(t,e=s)),i=a}return t(e,...i)})(Z);var Xt;!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"}(Xt||(Xt={}));const qt=ut.extend("--ft-typography-font-family",yt.titleFont),Yt=ut.extend("--ft-typography-font-family",yt.contentFont),Gt={fontFamily:Yt,fontSize:ut.create("--ft-typography-font-size","SIZE","16px"),fontWeight:ut.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:ut.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:ut.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:ut.create("--ft-typography-text-transform","UNKNOWN","inherit")},Qt=ut.extend("--ft-typography-title-font-family",qt),te=ut.extend("--ft-typography-title-font-size",Gt.fontSize,"20px"),ee=ut.extend("--ft-typography-title-font-weight",Gt.fontWeight,"normal"),ie=ut.extend("--ft-typography-title-letter-spacing",Gt.letterSpacing,"0.15px"),oe=ut.extend("--ft-typography-title-line-height",Gt.lineHeight,"1.2"),ne=ut.extend("--ft-typography-title-text-transform",Gt.textTransform,"inherit"),re=ut.extend("--ft-typography-title-dense-font-family",qt),se=ut.extend("--ft-typography-title-dense-font-size",Gt.fontSize,"14px"),ae=ut.extend("--ft-typography-title-dense-font-weight",Gt.fontWeight,"normal"),le=ut.extend("--ft-typography-title-dense-letter-spacing",Gt.letterSpacing,"0.105px"),he=ut.extend("--ft-typography-title-dense-line-height",Gt.lineHeight,"1.7"),ce=ut.extend("--ft-typography-title-dense-text-transform",Gt.textTransform,"inherit"),pe=ut.extend("--ft-typography-subtitle1-font-family",Yt),de=ut.extend("--ft-typography-subtitle1-font-size",Gt.fontSize,"16px"),fe=ut.extend("--ft-typography-subtitle1-font-weight",Gt.fontWeight,"600"),ue=ut.extend("--ft-typography-subtitle1-letter-spacing",Gt.letterSpacing,"0.144px"),ve=ut.extend("--ft-typography-subtitle1-line-height",Gt.lineHeight,"1.5"),ye=ut.extend("--ft-typography-subtitle1-text-transform",Gt.textTransform,"inherit"),be=ut.extend("--ft-typography-subtitle2-font-family",Yt),xe=ut.extend("--ft-typography-subtitle2-font-size",Gt.fontSize,"14px"),ge=ut.extend("--ft-typography-subtitle2-font-weight",Gt.fontWeight,"normal"),me=ut.extend("--ft-typography-subtitle2-letter-spacing",Gt.letterSpacing,"0.098px"),we=ut.extend("--ft-typography-subtitle2-line-height",Gt.lineHeight,"1.7"),$e=ut.extend("--ft-typography-subtitle2-text-transform",Gt.textTransform,"inherit"),Oe=ut.extend("--ft-typography-body1-font-family",Yt),Se=ut.extend("--ft-typography-body1-font-size",Gt.fontSize,"16px"),ke=ut.extend("--ft-typography-body1-font-weight",Gt.fontWeight,"normal"),Ne=ut.extend("--ft-typography-body1-letter-spacing",Gt.letterSpacing,"0.496px"),Ce=ut.extend("--ft-typography-body1-line-height",Gt.lineHeight,"1.5"),Ee=ut.extend("--ft-typography-body1-text-transform",Gt.textTransform,"inherit"),Re=ut.extend("--ft-typography-body2-font-family",Yt),ze=ut.extend("--ft-typography-body2-font-size",Gt.fontSize,"14px"),Me=ut.extend("--ft-typography-body2-font-weight",Gt.fontWeight,"normal"),Fe=ut.extend("--ft-typography-body2-letter-spacing",Gt.letterSpacing,"0.252px"),Ue=ut.extend("--ft-typography-body2-line-height",Gt.lineHeight,"1.4"),je=ut.extend("--ft-typography-body2-text-transform",Gt.textTransform,"inherit"),Te=ut.extend("--ft-typography-caption-font-family",Yt),Be=ut.extend("--ft-typography-caption-font-size",Gt.fontSize,"12px"),Ae=ut.extend("--ft-typography-caption-font-weight",Gt.fontWeight,"normal"),Le=ut.extend("--ft-typography-caption-letter-spacing",Gt.letterSpacing,"0.396px"),Pe=ut.extend("--ft-typography-caption-line-height",Gt.lineHeight,"1.33"),Ie=ut.extend("--ft-typography-caption-text-transform",Gt.textTransform,"inherit"),_e=ut.extend("--ft-typography-breadcrumb-font-family",Yt),De=ut.extend("--ft-typography-breadcrumb-font-size",Gt.fontSize,"10px"),We=ut.extend("--ft-typography-breadcrumb-font-weight",Gt.fontWeight,"normal"),He=ut.extend("--ft-typography-breadcrumb-letter-spacing",Gt.letterSpacing,"0.33px"),Ke=ut.extend("--ft-typography-breadcrumb-line-height",Gt.lineHeight,"1.6"),Ze=ut.extend("--ft-typography-breadcrumb-text-transform",Gt.textTransform,"inherit"),Ve=ut.extend("--ft-typography-overline-font-family",Yt),Je=ut.extend("--ft-typography-overline-font-size",Gt.fontSize,"10px"),Xe=ut.extend("--ft-typography-overline-font-weight",Gt.fontWeight,"normal"),qe=ut.extend("--ft-typography-overline-letter-spacing",Gt.letterSpacing,"1.5px"),Ye=ut.extend("--ft-typography-overline-line-height",Gt.lineHeight,"1.6"),Ge=ut.extend("--ft-typography-overline-text-transform",Gt.textTransform,"uppercase"),Qe={fontFamily:ut.extend("--ft-typography-button-font-family",Yt),fontSize:ut.extend("--ft-typography-button-font-size",Gt.fontSize,"14px"),fontWeight:ut.extend("--ft-typography-button-font-weight",Gt.fontWeight,"600"),letterSpacing:ut.extend("--ft-typography-button-letter-spacing",Gt.letterSpacing,"1.246px"),lineHeight:ut.extend("--ft-typography-button-line-height",Gt.lineHeight,"1.15"),textTransform:ut.extend("--ft-typography-button-text-transform",Gt.textTransform,"uppercase")},ti=b`
|
|
105
105
|
.ft-typography--title {
|
|
106
|
-
font-family: ${
|
|
107
|
-
font-size: ${
|
|
108
|
-
font-weight: ${
|
|
109
|
-
letter-spacing: ${
|
|
110
|
-
line-height: ${
|
|
111
|
-
text-transform: ${
|
|
106
|
+
font-family: ${Qt};
|
|
107
|
+
font-size: ${te};
|
|
108
|
+
font-weight: ${ee};
|
|
109
|
+
letter-spacing: ${ie};
|
|
110
|
+
line-height: ${oe};
|
|
111
|
+
text-transform: ${ne};
|
|
112
112
|
}
|
|
113
|
-
`,
|
|
113
|
+
`,ei=b`
|
|
114
114
|
.ft-typography--title-dense {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
115
|
+
font-family: ${re};
|
|
116
|
+
font-size: ${se};
|
|
117
|
+
font-weight: ${ae};
|
|
118
|
+
letter-spacing: ${le};
|
|
119
|
+
line-height: ${he};
|
|
120
|
+
text-transform: ${ce};
|
|
121
121
|
}
|
|
122
|
-
`,
|
|
122
|
+
`,ii=b`
|
|
123
123
|
.ft-typography--subtitle1 {
|
|
124
|
-
font-family: ${
|
|
125
|
-
font-size: ${
|
|
126
|
-
font-weight: ${
|
|
127
|
-
letter-spacing: ${
|
|
128
|
-
line-height: ${
|
|
129
|
-
text-transform: ${
|
|
124
|
+
font-family: ${pe};
|
|
125
|
+
font-size: ${de};
|
|
126
|
+
font-weight: ${fe};
|
|
127
|
+
letter-spacing: ${ue};
|
|
128
|
+
line-height: ${ve};
|
|
129
|
+
text-transform: ${ye};
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,oi=b`
|
|
132
132
|
.ft-typography--subtitle2 {
|
|
133
|
-
font-family: ${
|
|
134
|
-
font-size: ${
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
138
|
-
text-transform: ${
|
|
133
|
+
font-family: ${be};
|
|
134
|
+
font-size: ${xe};
|
|
135
|
+
font-weight: ${ge};
|
|
136
|
+
letter-spacing: ${me};
|
|
137
|
+
line-height: ${we};
|
|
138
|
+
text-transform: ${$e};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
`,
|
|
141
|
+
`,ni=b`
|
|
142
142
|
.ft-typography--body1 {
|
|
143
|
-
font-family: ${
|
|
144
|
-
font-size: ${
|
|
145
|
-
font-weight: ${
|
|
146
|
-
letter-spacing: ${
|
|
147
|
-
line-height: ${
|
|
148
|
-
text-transform: ${
|
|
143
|
+
font-family: ${Oe};
|
|
144
|
+
font-size: ${Se};
|
|
145
|
+
font-weight: ${ke};
|
|
146
|
+
letter-spacing: ${Ne};
|
|
147
|
+
line-height: ${Ce};
|
|
148
|
+
text-transform: ${Ee};
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,ri=b`
|
|
151
151
|
.ft-typography--body2 {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
152
|
+
font-family: ${Re};
|
|
153
|
+
font-size: ${ze};
|
|
154
|
+
font-weight: ${Me};
|
|
155
|
+
letter-spacing: ${Fe};
|
|
156
|
+
line-height: ${Ue};
|
|
157
|
+
text-transform: ${je};
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,si=b`
|
|
160
160
|
.ft-typography--caption {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
161
|
+
font-family: ${Te};
|
|
162
|
+
font-size: ${Be};
|
|
163
|
+
font-weight: ${Ae};
|
|
164
|
+
letter-spacing: ${Le};
|
|
165
|
+
line-height: ${Pe};
|
|
166
|
+
text-transform: ${Ie};
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,ai=b`
|
|
169
169
|
.ft-typography--breadcrumb {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
170
|
+
font-family: ${_e};
|
|
171
|
+
font-size: ${De};
|
|
172
|
+
font-weight: ${We};
|
|
173
|
+
letter-spacing: ${He};
|
|
174
|
+
line-height: ${Ke};
|
|
175
|
+
text-transform: ${Ze};
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,li=b`
|
|
178
178
|
.ft-typography--overline {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
179
|
+
font-family: ${Ve};
|
|
180
|
+
font-size: ${Je};
|
|
181
|
+
font-weight: ${Xe};
|
|
182
|
+
letter-spacing: ${qe};
|
|
183
|
+
line-height: ${Ye};
|
|
184
|
+
text-transform: ${Ge};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,hi=b`
|
|
187
187
|
.ft-typography--button {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
194
|
-
}
|
|
195
|
-
|
|
188
|
+
font-family: ${Qe.fontFamily};
|
|
189
|
+
font-size: ${Qe.fontSize};
|
|
190
|
+
font-weight: ${Qe.fontWeight};
|
|
191
|
+
letter-spacing: ${Qe.letterSpacing};
|
|
192
|
+
line-height: ${Qe.lineHeight};
|
|
193
|
+
text-transform: ${Qe.textTransform};
|
|
194
|
+
}
|
|
195
|
+
`,ci=b`
|
|
196
|
+
.ft-typography {
|
|
197
|
+
vertical-align: inherit;
|
|
198
|
+
}
|
|
199
|
+
`;var pi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class di extends xt{constructor(){super(...arguments),this.variant=Xt.body1}render(){return this.element?Jt`
|
|
196
200
|
<${Zt(this.element)}
|
|
197
201
|
class="ft-typography ft-typography--${this.variant}">
|
|
198
202
|
<slot></slot>
|
|
199
203
|
</${Zt(this.element)}>
|
|
200
204
|
`:Jt`
|
|
201
205
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
202
|
-
`}}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
`}}di.styles=[ti,ei,ii,oi,ni,ri,si,ai,li,hi,ci],pi([o()],di.prototype,"element",void 0),pi([o()],di.prototype,"variant",void 0),h("ft-typography")(di);const fi=ut.extend("--ft-reader-internal-link-outline-color",yt.colorPrimary),ui=b`
|
|
207
|
+
a:focus {
|
|
208
|
+
outline-color: ${fi};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ft-reader-link--remove-style {
|
|
212
|
+
text-decoration: none;
|
|
213
|
+
color: inherit;
|
|
214
|
+
}
|
|
215
|
+
`;var vi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class yi extends Wt{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Pt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return Z`
|
|
207
216
|
<a class=${e}
|
|
208
217
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
209
218
|
@click=${t=>this.onClick(t)}>
|
|
210
219
|
<slot></slot>
|
|
211
220
|
</a>
|
|
212
|
-
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}
|
|
213
|
-
a:focus {
|
|
214
|
-
outline-color: ${fi};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.ft-reader-link--remove-style {
|
|
218
|
-
text-decoration: none;
|
|
219
|
-
color: inherit;
|
|
220
|
-
}
|
|
221
|
-
`,di([o()],ui.prototype,"tocId",void 0),di([o()],ui.prototype,"section",void 0),di([o({type:Number})],ui.prototype,"pageNumber",void 0),di([o({type:Boolean})],ui.prototype,"removeStyle",void 0),h("ft-reader-internal-link")(ui);
|
|
221
|
+
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}yi.styles=ui,vi([o()],yi.prototype,"tocId",void 0),vi([o()],yi.prototype,"section",void 0),vi([o({type:Number})],yi.prototype,"pageNumber",void 0),vi([o({type:Boolean})],yi.prototype,"removeStyle",void 0),h("ft-reader-internal-link")(yi);
|
|
222
222
|
/**
|
|
223
223
|
* @license
|
|
224
224
|
* Copyright 2017 Google LLC
|
|
225
225
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
226
226
|
*/
|
|
227
|
-
class
|
|
227
|
+
class bi extends zt{constructor(t){if(super(t),this.it=J,t.type!==Et)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===V)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:[]}}}bi.directiveName="unsafeHTML",bi.resultType=1;const xi=Rt(bi);var gi,mi;!function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(gi||(gi={})),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=""}(mi||(mi={})),new Map([...["abw"].map((t=>[t,mi.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,mi.AUDIO])),...["avi"].map((t=>[t,mi.AVI])),...["chm","xhs"].map((t=>[t,mi.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,mi.CODE])),...["csv"].map((t=>[t,mi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,mi.DITA])),...["epub"].map((t=>[t,mi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,mi.EXCEL])),...["flac"].map((t=>[t,mi.FLAC])),...["gif"].map((t=>[t,mi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,mi.GZIP])),...["html","htm","xhtml"].map((t=>[t,mi.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,mi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,mi.JPEG])),...["json"].map((t=>[t,mi.JSON])),...["m4a","m4p"].map((t=>[t,mi.M4A])),...["mov","qt"].map((t=>[t,mi.MOV])),...["mp3"].map((t=>[t,mi.MP3])),...["mp4","m4v"].map((t=>[t,mi.MP4])),...["ogg","oga"].map((t=>[t,mi.OGG])),...["pdf","ps"].map((t=>[t,mi.PDF])),...["png"].map((t=>[t,mi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,mi.POWERPOINT])),...["rar"].map((t=>[t,mi.RAR])),...["stp"].map((t=>[t,mi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,mi.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,mi.VIDEO])),...["wav"].map((t=>[t,mi.WAV])),...["wma"].map((t=>[t,mi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,mi.WORD])),...["xml","xsl","rdf"].map((t=>[t,mi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,mi.YAML])),...["zip"].map((t=>[t,mi.ZIP]))]);const wi={size:ut.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:ut.extend("--ft-icon-fluid-topics-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:ut.extend("--ft-icon-file-format-font-family",ut.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:ut.extend("--ft-icon-material-font-family",ut.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:ut.create("--ft-icon-vertical-align","UNKNOWN","unset")},$i=b`
|
|
228
|
+
:host {
|
|
229
|
+
display: inline-block;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host, i.ft-icon {
|
|
233
|
+
width: ${wi.size};
|
|
234
|
+
height: ${wi.size};
|
|
235
|
+
text-align: center;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
i.ft-icon {
|
|
239
|
+
font-size: ${wi.size};
|
|
240
|
+
line-height: 1;
|
|
241
|
+
font-weight: normal;
|
|
242
|
+
text-transform: none;
|
|
243
|
+
font-style: normal;
|
|
244
|
+
font-variant: normal;
|
|
245
|
+
speak: none;
|
|
246
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
247
|
+
text-rendering: auto;
|
|
248
|
+
-webkit-font-smoothing: antialiased;
|
|
249
|
+
-moz-osx-font-smoothing: grayscale;
|
|
250
|
+
vertical-align: ${wi.verticalAlign};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.ft-icon--fluid-topics {
|
|
254
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ft-icon--file-format {
|
|
258
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ft-icon--material {
|
|
262
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
263
|
+
}
|
|
264
|
+
`;var Oi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oi||(Oi={}));var Si=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ki extends xt{constructor(){super(...arguments),this.variant=Oi.fluid_topics,this.resolvedIcon=J}render(){const t="material"!==this.variant||this.value;return Z`
|
|
228
265
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
229
|
-
${
|
|
266
|
+
${xi(this.resolvedIcon)}
|
|
230
267
|
<slot ?hidden=${t}></slot>
|
|
231
268
|
</i>
|
|
232
|
-
`}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
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
269
|
+
`}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 Oi.file_format:this.resolvedIcon=null!==(t=mi[i.toUpperCase()])&&void 0!==t?t:i;break;case Oi.fluid_topics:this.resolvedIcon=null!==(e=gi[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||J}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}ki.elementDefinitions={},ki.styles=$i,Si([o()],ki.prototype,"variant",void 0),Si([o()],ki.prototype,"value",void 0),Si([n()],ki.prototype,"resolvedIcon",void 0),Si([s("slot")],ki.prototype,"slottedContent",void 0),h("ft-icon")(ki);const Ni=ut.extend("--ft-ripple-color",yt.colorContent),Ci={color:Ni,backgroundColor:ut.extend("--ft-ripple-background-color",Ni),opacityContentOnSurfacePressed:ut.external(yt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ut.external(yt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ut.external(yt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ut.external(yt.opacityContentOnSurfaceSelected,"Design system")},Ei=ut.extend("--ft-ripple-color",yt.colorPrimary),Ri=Ei,zi=ut.extend("--ft-ripple-background-color",Ei),Mi=ut.extend("--ft-ripple-color",yt.colorSecondary),Fi=Mi,Ui=ut.extend("--ft-ripple-background-color",Mi),ji=b`
|
|
270
|
+
:host {
|
|
271
|
+
display: contents;
|
|
272
|
+
}
|
|
236
273
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
274
|
+
.ft-ripple {
|
|
275
|
+
position: absolute;
|
|
276
|
+
inset: 0;
|
|
277
|
+
pointer-events: none;
|
|
278
|
+
}
|
|
242
279
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
font-weight: normal;
|
|
247
|
-
text-transform: none;
|
|
248
|
-
font-style: normal;
|
|
249
|
-
font-variant: normal;
|
|
250
|
-
speak: none;
|
|
251
|
-
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
252
|
-
text-rendering: auto;
|
|
253
|
-
-webkit-font-smoothing: antialiased;
|
|
254
|
-
-moz-osx-font-smoothing: grayscale;
|
|
255
|
-
vertical-align: ${wi.verticalAlign};
|
|
256
|
-
}
|
|
280
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
281
|
+
overflow: hidden;
|
|
282
|
+
}
|
|
257
283
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
284
|
+
.ft-ripple .ft-ripple--background,
|
|
285
|
+
.ft-ripple .ft-ripple--effect {
|
|
286
|
+
position: absolute;
|
|
287
|
+
opacity: 0;
|
|
288
|
+
}
|
|
261
289
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
290
|
+
.ft-ripple .ft-ripple--background {
|
|
291
|
+
background-color: ${Ci.backgroundColor};
|
|
292
|
+
}
|
|
265
293
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
294
|
+
.ft-ripple .ft-ripple--effect {
|
|
295
|
+
background-color: ${Ci.color};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
299
|
+
background-color: ${Ui};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
303
|
+
background-color: ${Fi};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
307
|
+
background-color: ${zi};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
311
|
+
background-color: ${Ri};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.ft-ripple .ft-ripple--background {
|
|
315
|
+
top: 0;
|
|
316
|
+
left: 0;
|
|
317
|
+
height: 100%;
|
|
318
|
+
width: 100%;
|
|
319
|
+
transition: opacity 75ms linear;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ft-ripple .ft-ripple--effect,
|
|
323
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
324
|
+
border-radius: 50%;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ft-ripple .ft-ripple--effect {
|
|
328
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
329
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
333
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
334
|
+
left: 50%;
|
|
335
|
+
top: 50%;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
339
|
+
transform: translate(-50%, -50%);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
343
|
+
opacity: ${Ci.opacityContentOnSurfaceHover};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
347
|
+
opacity: ${Ci.opacityContentOnSurfaceSelected};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
351
|
+
opacity: ${Ci.opacityContentOnSurfaceFocused};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
355
|
+
opacity: ${Ci.opacityContentOnSurfacePressed};
|
|
356
|
+
transform: translate(-50%, -50%) scale(1);
|
|
357
|
+
}
|
|
358
|
+
`;var Ti=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Bi extends xt{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.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.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 Z`
|
|
270
359
|
<style>
|
|
271
360
|
.ft-ripple .ft-ripple--effect,
|
|
272
361
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -283,96 +372,39 @@ class vi extends zt{constructor(t){if(super(t),this.it=J,t.type!==Et)throw Error
|
|
|
283
372
|
<div class="ft-ripple--background"></div>
|
|
284
373
|
<div class="ft-ripple--effect"></div>
|
|
285
374
|
</div>
|
|
286
|
-
`}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(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){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}}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()}}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
.ft-ripple {
|
|
292
|
-
position: absolute;
|
|
293
|
-
inset: 0;
|
|
294
|
-
pointer-events: none;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
298
|
-
overflow: hidden;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.ft-ripple .ft-ripple--background,
|
|
302
|
-
.ft-ripple .ft-ripple--effect {
|
|
303
|
-
position: absolute;
|
|
304
|
-
opacity: 0;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.ft-ripple .ft-ripple--background {
|
|
308
|
-
background-color: ${ki.backgroundColor};
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.ft-ripple .ft-ripple--effect {
|
|
312
|
-
background-color: ${ki.color};
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
316
|
-
background-color: ${Mi};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
320
|
-
background-color: ${zi};
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
324
|
-
background-color: ${Ei};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
328
|
-
background-color: ${Ci};
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.ft-ripple .ft-ripple--background {
|
|
332
|
-
top: 0;
|
|
333
|
-
left: 0;
|
|
334
|
-
height: 100%;
|
|
335
|
-
width: 100%;
|
|
336
|
-
transition: opacity 75ms linear;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.ft-ripple .ft-ripple--effect,
|
|
340
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
341
|
-
border-radius: 50%;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.ft-ripple .ft-ripple--effect {
|
|
345
|
-
transform: translate(-50%, -50%) scale(0.15);
|
|
346
|
-
transition: transform 300ms ease, opacity 75ms linear;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
350
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
351
|
-
left: 50%;
|
|
352
|
-
top: 50%;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
356
|
-
transform: translate(-50%, -50%);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
360
|
-
opacity: ${ki.opacityContentOnSurfaceHover};
|
|
361
|
-
}
|
|
375
|
+
`}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(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){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}}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()}}Bi.elementDefinitions={},Bi.styles=ji,Ti([o({type:Boolean})],Bi.prototype,"primary",void 0),Ti([o({type:Boolean})],Bi.prototype,"secondary",void 0),Ti([o({type:Boolean})],Bi.prototype,"unbounded",void 0),Ti([o({type:Boolean})],Bi.prototype,"activated",void 0),Ti([o({type:Boolean})],Bi.prototype,"selected",void 0),Ti([o({type:Boolean})],Bi.prototype,"disabled",void 0),Ti([n()],Bi.prototype,"hovered",void 0),Ti([n()],Bi.prototype,"focused",void 0),Ti([n()],Bi.prototype,"pressed",void 0),Ti([n()],Bi.prototype,"rippling",void 0),Ti([n()],Bi.prototype,"rippleSize",void 0),Ti([n()],Bi.prototype,"originX",void 0),Ti([n()],Bi.prototype,"originY",void 0),Ti([s(".ft-ripple")],Bi.prototype,"ripple",void 0),Ti([s(".ft-ripple--effect")],Bi.prototype,"rippleEffect",void 0),h("ft-ripple")(Bi);const Ai=ut.create("--ft-tooltip-distance","SIZE","4px"),Li=ut.create("--ft-tooltip-color","COLOR","#FFFFFF"),Pi=ut.create("--ft-tooltip-background-color","COLOR","#666666"),Ii=ut.create("--ft-tooltip-z-index","NUMBER","1"),_i=ut.external(yt.borderRadiusS,"Design system"),Di=ut.create("--ft-tooltip-max-width","SIZE","150px"),Wi=b`
|
|
376
|
+
.ft-tooltip--container {
|
|
377
|
+
display: block;
|
|
378
|
+
position: relative;
|
|
379
|
+
}
|
|
362
380
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
381
|
+
.ft-tooltip--inline {
|
|
382
|
+
display: inline-block;
|
|
383
|
+
max-width: 100%;
|
|
384
|
+
}
|
|
366
385
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
386
|
+
.ft-tooltip {
|
|
387
|
+
position: absolute;
|
|
388
|
+
box-sizing: border-box;
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
width: max-content;
|
|
391
|
+
max-width: ${Di};
|
|
392
|
+
text-align: center;
|
|
393
|
+
padding: ${Ai};
|
|
394
|
+
z-index: ${Ii};
|
|
395
|
+
}
|
|
370
396
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
397
|
+
.ft-tooltip--content {
|
|
398
|
+
padding: 4px 8px;
|
|
399
|
+
border-radius: ${_i};
|
|
400
|
+
background-color: ${Pi};
|
|
401
|
+
color: ${Li};
|
|
402
|
+
top: -500px;
|
|
403
|
+
left: -500px;
|
|
404
|
+
position: relative;
|
|
405
|
+
word-break: break-word;
|
|
406
|
+
}
|
|
407
|
+
`;var Hi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ki extends xt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new e,this.revealDebouncer=new e}render(){return Z`
|
|
376
408
|
<div part="container"
|
|
377
409
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
378
410
|
@mouseenter=${this.onHover}
|
|
@@ -388,254 +420,222 @@ class vi extends zt{constructor(t){if(super(t),this.it=J,t.type!==Et)throw Error
|
|
|
388
420
|
</div>
|
|
389
421
|
<slot></slot>
|
|
390
422
|
</div>
|
|
391
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=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 s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${
|
|
392
|
-
.ft-tooltip--container {
|
|
393
|
-
display: block;
|
|
394
|
-
position: relative;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.ft-tooltip--inline {
|
|
398
|
-
display: inline-block;
|
|
399
|
-
max-width: 100%;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.ft-tooltip {
|
|
403
|
-
position: absolute;
|
|
404
|
-
box-sizing: border-box;
|
|
405
|
-
overflow: hidden;
|
|
406
|
-
width: max-content;
|
|
407
|
-
max-width: ${Pi};
|
|
408
|
-
text-align: center;
|
|
409
|
-
padding: ${ji};
|
|
410
|
-
z-index: ${Ai};
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.ft-tooltip--content {
|
|
414
|
-
padding: 4px 8px;
|
|
415
|
-
border-radius: ${Li};
|
|
416
|
-
background-color: ${Bi};
|
|
417
|
-
color: ${Ti};
|
|
418
|
-
top: -500px;
|
|
419
|
-
left: -500px;
|
|
420
|
-
position: relative;
|
|
421
|
-
word-break: break-word;
|
|
422
|
-
}
|
|
423
|
-
`,Ui([o()],Ii.prototype,"text",void 0),Ui([o({type:Boolean})],Ii.prototype,"manual",void 0),Ui([o({type:Boolean})],Ii.prototype,"inline",void 0),Ui([o({type:Number})],Ii.prototype,"delay",void 0),Ui([o()],Ii.prototype,"position",void 0),Ui([
|
|
423
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.position){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=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 s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${Di})`}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())}}Ki.elementDefinitions={"ft-typography":di},Ki.styles=Wi,Hi([o()],Ki.prototype,"text",void 0),Hi([o({type:Boolean})],Ki.prototype,"manual",void 0),Hi([o({type:Boolean})],Ki.prototype,"inline",void 0),Hi([o({type:Number})],Ki.prototype,"delay",void 0),Hi([o()],Ki.prototype,"position",void 0),Hi([
|
|
424
424
|
/**
|
|
425
425
|
* @license
|
|
426
426
|
* Copyright 2017 Google LLC
|
|
427
427
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
428
428
|
*/
|
|
429
|
-
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 r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
.ft-loader {
|
|
435
|
-
display: inline-block;
|
|
436
|
-
position: relative;
|
|
437
|
-
|
|
438
|
-
width: ${_i.size};
|
|
439
|
-
height: ${_i.size};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.ft-loader div {
|
|
443
|
-
position: absolute;
|
|
444
|
-
top: 37.5%;
|
|
445
|
-
width: 25%;
|
|
446
|
-
height: 25%;
|
|
447
|
-
border-radius: 50%;
|
|
448
|
-
background: ${_i.color};
|
|
449
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.ft-loader div:nth-child(1) {
|
|
453
|
-
left: 2.5%;
|
|
454
|
-
animation: appear 0.6s infinite;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.ft-loader div:nth-child(2) {
|
|
458
|
-
left: 2.5%;
|
|
459
|
-
animation: move 0.6s infinite;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.ft-loader div:nth-child(3) {
|
|
463
|
-
left: 37.5%;
|
|
464
|
-
animation: move 0.6s infinite;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.ft-loader div:nth-child(4) {
|
|
468
|
-
left: 72.5%;
|
|
469
|
-
animation: disappear 0.6s infinite;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
@keyframes appear {
|
|
473
|
-
0% {
|
|
474
|
-
transform: scale(0);
|
|
475
|
-
}
|
|
476
|
-
100% {
|
|
477
|
-
transform: scale(1);
|
|
478
|
-
}
|
|
479
|
-
}
|
|
429
|
+
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 r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Ki.prototype,"slotNodes",void 0),Hi([s(".ft-tooltip--container")],Ki.prototype,"container",void 0),Hi([s("slot")],Ki.prototype,"target",void 0),Hi([s(".ft-tooltip")],Ki.prototype,"tooltip",void 0),Hi([s(".ft-tooltip--content")],Ki.prototype,"tooltipContent",void 0),Hi([n()],Ki.prototype,"visible",void 0),h("ft-tooltip")(Ki);const Zi={color:ut.extend("--ft-loader-color",yt.colorPrimary),size:ut.create("--ft-loader-size","SIZE","80px")},Vi=b`
|
|
430
|
+
:host {
|
|
431
|
+
line-height: 0;
|
|
432
|
+
}
|
|
480
433
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
100% {
|
|
486
|
-
transform: scale(0);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
434
|
+
.ft-loader {
|
|
435
|
+
display: inline-block;
|
|
436
|
+
position: relative;
|
|
489
437
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
438
|
+
width: ${Zi.size};
|
|
439
|
+
height: ${Zi.size};
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.ft-loader div {
|
|
443
|
+
position: absolute;
|
|
444
|
+
top: 37.5%;
|
|
445
|
+
width: 25%;
|
|
446
|
+
height: 25%;
|
|
447
|
+
border-radius: 50%;
|
|
448
|
+
background: ${Zi.color};
|
|
449
|
+
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.ft-loader div:nth-child(1) {
|
|
453
|
+
left: 2.5%;
|
|
454
|
+
animation: appear 0.6s infinite;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.ft-loader div:nth-child(2) {
|
|
458
|
+
left: 2.5%;
|
|
459
|
+
animation: move 0.6s infinite;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.ft-loader div:nth-child(3) {
|
|
463
|
+
left: 37.5%;
|
|
464
|
+
animation: move 0.6s infinite;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.ft-loader div:nth-child(4) {
|
|
468
|
+
left: 72.5%;
|
|
469
|
+
animation: disappear 0.6s infinite;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
@keyframes appear {
|
|
473
|
+
0% {
|
|
474
|
+
transform: scale(0);
|
|
475
|
+
}
|
|
476
|
+
100% {
|
|
477
|
+
transform: scale(1);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
@keyframes disappear {
|
|
482
|
+
0% {
|
|
483
|
+
transform: scale(1);
|
|
484
|
+
}
|
|
485
|
+
100% {
|
|
486
|
+
transform: scale(0);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
@keyframes move {
|
|
491
|
+
0% {
|
|
492
|
+
transform: translate(0, 0);
|
|
493
|
+
}
|
|
494
|
+
100% {
|
|
495
|
+
transform: translate(calc(0.35 * ${Zi.size}), 0);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
`;class Ji extends xt{render(){return Z`
|
|
499
499
|
<div class="ft-loader">
|
|
500
500
|
<div></div>
|
|
501
501
|
<div></div>
|
|
502
502
|
<div></div>
|
|
503
503
|
<div></div>
|
|
504
504
|
</div>
|
|
505
|
-
`}}h("ft-loader")(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
505
|
+
`}}Ji.styles=Vi,h("ft-loader")(Ji);const Xi=ut.extend("--ft-button-color",yt.colorPrimary),qi={backgroundColor:ut.extend("--ft-button-background-color",yt.colorSurface),borderRadius:ut.extend("--ft-button-border-radius",yt.borderRadiusL),color:Xi,fontSize:ut.extend("--ft-button-font-size",Qe.fontSize),iconSize:ut.create("--ft-button-icon-size","SIZE","24px"),rippleColor:ut.extend("--ft-button-ripple-color",Xi),opacityDisabled:ut.external(yt.colorOpacityDisabled,"Design system")},Yi=ut.extend("--ft-button-primary-color",ut.extend("--ft-button-color",yt.colorOnPrimary)),Gi={backgroundColor:ut.extend("--ft-button-primary-background-color",ut.extend("--ft-button-background-color",yt.colorPrimary)),color:Yi,rippleColor:ut.extend("--ft-button-primary-ripple-color",Yi)},Qi=ut.extend("--ft-button-dense-border-radius",ut.extend("--ft-button-border-radius",yt.borderRadiusM)),to=[gt,b`
|
|
506
|
+
:host {
|
|
507
|
+
display: inline-block;
|
|
508
|
+
max-width: 100%;
|
|
509
|
+
pointer-events: none;
|
|
510
|
+
}
|
|
511
511
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
512
|
+
button {
|
|
513
|
+
box-shadow: 0px 0px 0px transparent;
|
|
514
|
+
border: 0px solid transparent;
|
|
515
|
+
text-shadow: 0px 0px 0px transparent;
|
|
516
|
+
font-size: ${qi.fontSize};
|
|
517
|
+
}
|
|
518
518
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
519
|
+
button:hover {
|
|
520
|
+
box-shadow: 0px 0px 0px transparent;
|
|
521
|
+
border: 0px solid transparent;
|
|
522
|
+
text-shadow: 0px 0px 0px transparent;
|
|
523
|
+
}
|
|
524
524
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
525
|
+
button:active {
|
|
526
|
+
outline: none;
|
|
527
|
+
border: none;
|
|
528
|
+
}
|
|
529
529
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
530
|
+
button:focus {
|
|
531
|
+
outline: 0;
|
|
532
|
+
}
|
|
533
533
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
--ft-button-internal-line-height: calc(${Ki.fontSize} + 2px);
|
|
546
|
-
--ft-button-internal-color: ${Ki.color};
|
|
547
|
-
${vt(wi.size,Ki.iconSize)};
|
|
548
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
549
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
550
|
-
${vt(ki.color,Ki.rippleColor)};
|
|
551
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ki.iconSize});
|
|
552
|
-
|
|
553
|
-
border-radius: ${Ki.borderRadius};
|
|
554
|
-
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
555
|
-
background-color: ${Ki.backgroundColor};
|
|
556
|
-
color: var(--ft-button-internal-color);
|
|
557
|
-
-webkit-mask-image: radial-gradient(white, black);
|
|
558
|
-
}
|
|
534
|
+
.ft-button {
|
|
535
|
+
position: relative;
|
|
536
|
+
display: flex;
|
|
537
|
+
justify-content: center;
|
|
538
|
+
align-items: center;
|
|
539
|
+
width: 100%;
|
|
540
|
+
overflow: hidden;
|
|
541
|
+
box-sizing: border-box;
|
|
542
|
+
border: none;
|
|
543
|
+
pointer-events: auto;
|
|
559
544
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
545
|
+
--ft-button-internal-line-height: calc(${qi.fontSize} + 2px);
|
|
546
|
+
--ft-button-internal-color: ${qi.color};
|
|
547
|
+
${vt(wi.size,qi.iconSize)};
|
|
548
|
+
--ft-button-internal-vertical-padding: 6px;
|
|
549
|
+
--ft-button-internal-horizontal-padding: 8px;
|
|
550
|
+
${vt(Ci.color,qi.rippleColor)};
|
|
551
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${qi.iconSize});
|
|
563
552
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
553
|
+
border-radius: ${qi.borderRadius};
|
|
554
|
+
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
555
|
+
background-color: ${qi.backgroundColor};
|
|
556
|
+
color: var(--ft-button-internal-color);
|
|
557
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
558
|
+
}
|
|
569
559
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
560
|
+
.ft-button:not([disabled]):hover {
|
|
561
|
+
cursor: pointer;
|
|
562
|
+
}
|
|
573
563
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
564
|
+
.ft-button--dense {
|
|
565
|
+
--ft-button-internal-vertical-padding: 2px;
|
|
566
|
+
--ft-button-internal-horizontal-padding: 4px;
|
|
567
|
+
border-radius: ${Qi};
|
|
568
|
+
}
|
|
578
569
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
${vt(ki.color,Vi.rippleColor)};
|
|
583
|
-
}
|
|
570
|
+
.ft-button--round {
|
|
571
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
|
|
572
|
+
}
|
|
584
573
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
574
|
+
.ft-button[disabled] {
|
|
575
|
+
filter: grayscale(1);
|
|
576
|
+
opacity: ${qi.opacityDisabled};
|
|
577
|
+
}
|
|
589
578
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
579
|
+
.ft-button.ft-button--primary {
|
|
580
|
+
background-color: ${Gi.backgroundColor};
|
|
581
|
+
--ft-button-internal-color: ${Gi.color};
|
|
582
|
+
${vt(Ci.color,Gi.rippleColor)};
|
|
583
|
+
}
|
|
593
584
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
text-overflow: ellipsis;
|
|
599
|
-
display: block;
|
|
600
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
601
|
-
${vt(ti.fontSize,"1em")};
|
|
602
|
-
${vt(ti.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
603
|
-
}
|
|
585
|
+
.ft-button.ft-button--outlined {
|
|
586
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
587
|
+
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
588
|
+
}
|
|
604
589
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
590
|
+
.ft-button:focus {
|
|
591
|
+
outline: none;
|
|
592
|
+
}
|
|
608
593
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
594
|
+
.ft-button--label {
|
|
595
|
+
position: relative;
|
|
596
|
+
overflow: hidden;
|
|
597
|
+
white-space: nowrap;
|
|
598
|
+
text-overflow: ellipsis;
|
|
599
|
+
display: block;
|
|
600
|
+
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
601
|
+
${vt(Qe.fontSize,"1em")};
|
|
602
|
+
${vt(Qe.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
603
|
+
}
|
|
614
604
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
605
|
+
.ft-button--safari-fix .ft-button--label {
|
|
606
|
+
margin-right: 0;
|
|
607
|
+
}
|
|
618
608
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
609
|
+
.ft-button--safari-fix .ft-button--label:after {
|
|
610
|
+
content: "\\0000a0";
|
|
611
|
+
display: inline-block;
|
|
612
|
+
width: 0;
|
|
613
|
+
}
|
|
623
614
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
615
|
+
.ft-button--label[hidden] {
|
|
616
|
+
display: none;
|
|
617
|
+
}
|
|
628
618
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
619
|
+
ft-icon {
|
|
620
|
+
flex-shrink: 0;
|
|
621
|
+
position: relative;
|
|
622
|
+
}
|
|
633
623
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
624
|
+
.ft-button--label[hidden] + ft-icon {
|
|
625
|
+
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
626
|
+
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
630
|
+
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
631
|
+
order: -1;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
ft-loader {
|
|
635
|
+
${vt(Zi.size,qi.iconSize)};
|
|
636
|
+
${vt(Zi.color,"var(--ft-button-internal-color)")};
|
|
637
|
+
}
|
|
638
|
+
`];var eo,io=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class oo extends xt{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=Oi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!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-button--safari-fix":Nt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(Z`
|
|
639
639
|
<button part="button"
|
|
640
640
|
class="${Pt(t)}"
|
|
641
641
|
aria-label="${this.getLabel()}"
|
|
@@ -657,41 +657,73 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
657
657
|
</ft-tooltip>
|
|
658
658
|
`}resolveIcon(){return this.loading?Z`
|
|
659
659
|
<ft-loader></ft-loader> `:this.icon?Z`
|
|
660
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
660
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}oo.elementDefinitions={"ft-ripple":Bi,"ft-tooltip":Ki,"ft-typography":di,"ft-icon":ki,"ft-loader":Ji},oo.styles=to,io([o({type:Boolean})],oo.prototype,"primary",void 0),io([o({type:Boolean})],oo.prototype,"outlined",void 0),io([o({type:Boolean})],oo.prototype,"disabled",void 0),io([o({type:Boolean})],oo.prototype,"dense",void 0),io([o({type:Boolean})],oo.prototype,"round",void 0),io([o({type:String})],oo.prototype,"label",void 0),io([o({type:String})],oo.prototype,"icon",void 0),io([o({type:String})],oo.prototype,"iconVariant",void 0),io([o({type:Boolean})],oo.prototype,"trailingIcon",void 0),io([o({type:Boolean})],oo.prototype,"loading",void 0),io([o({type:String})],oo.prototype,"tooltipPosition",void 0),io([o({type:Boolean})],oo.prototype,"hideTooltip",void 0),io([s(".ft-button")],oo.prototype,"button",void 0),io([s(".ft-button--label slot")],oo.prototype,"slottedContent",void 0),h("ft-button")(oo),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(eo||(eo={}));const no=b`
|
|
661
|
+
.ft-size-watcher--pixel {
|
|
662
|
+
width: 0;
|
|
663
|
+
height: 0;
|
|
664
|
+
overflow: hidden;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
668
|
+
width: 100%;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.ft-size-watcher--watcher {
|
|
672
|
+
height: 1px;
|
|
673
|
+
width: 100vw;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
677
|
+
width: 100%;
|
|
678
|
+
}
|
|
679
|
+
`;var ro=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class so extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class ao extends xt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=eo.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return Z`
|
|
661
680
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
662
681
|
<div class="ft-size-watcher--watcher"></div>
|
|
663
682
|
</div>
|
|
664
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
overflow: hidden;
|
|
669
|
-
}
|
|
683
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=eo.S:this.size<976?this.category=eo.M:this.size<1024?this.category=eo.L:this.size<1440?this.category=eo.XL:this.category=eo.XXL,this.dispatchEvent(new so(this.size,this.category)))}),this.debounceTimeout)}}ao.elementDefinitions={},ao.styles=no,ro([o({type:Number})],ao.prototype,"debounceTimeout",void 0),ro([o({type:Boolean})],ao.prototype,"local",void 0),ro([o({type:Number,reflect:!0})],ao.prototype,"size",void 0),ro([o({type:String,reflect:!0})],ao.prototype,"category",void 0),ro([s(".ft-size-watcher--watcher")],ao.prototype,"watcher",void 0),h("ft-size-watcher")(ao);const lo={expand:"Expand {0}",collapse:"Collapse {0}"},ho={tabulationSize:ut.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:ut.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:ut.extend("--ft-reader-toc-text-color",yt.colorOnSurface),highlightedTextColor:ut.extend("--ft-reader-toc-highlighted-text-color",yt.colorPrimary),highlightedFontWeight:ut.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:ut.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:ut.create("--ft-reader-toc-icon-font-size","SIZE","16px")},co=b`
|
|
684
|
+
.ft-reader-toc {
|
|
685
|
+
color: ${ho.textColor};
|
|
686
|
+
}
|
|
670
687
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
}
|
|
688
|
+
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
689
|
+
background-color: ${ho.highlightedBackgroundColor};
|
|
690
|
+
color: ${ho.highlightedTextColor};
|
|
691
|
+
${vt(Gt.fontWeight,ho.highlightedFontWeight)}
|
|
692
|
+
}
|
|
674
693
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
694
|
+
.ft-reader-toc--link-container {
|
|
695
|
+
display: flex;
|
|
696
|
+
gap: 4px;
|
|
697
|
+
padding: ${ho.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
698
|
+
align-items: center;
|
|
699
|
+
}
|
|
679
700
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
|
|
701
|
+
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
702
|
+
flex-shrink: 0;
|
|
703
|
+
width: calc(${ho.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
707
|
+
flex-shrink: 0;
|
|
708
|
+
width: calc(${ho.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
ft-button {
|
|
712
|
+
${vt(qi.iconSize,ho.iconFontSize)};
|
|
713
|
+
${vt(qi.backgroundColor,"transparent")};
|
|
714
|
+
}
|
|
715
|
+
`;var po=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class fo extends Wt{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=Oi.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.autoCollapse=!1,this.labels={},this.labelResolver=new mt(lo,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.viewportSize=eo.M}update(t){var e,i;super.update(t),t.has("labels")&&(this.labelResolver=new mt(lo,this.labels)),!this.expanded&&["splitToc","visibleTopics","currentPage","toc"].some((e=>t.has(e)))&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(this.splitToc?[null===(e=this.currentPage)||void 0===e?void 0:e.rootTocId]:null!==(i=this.visibleTopics)&&void 0!==i?i:[]))}render(){var t;const e={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===eo.S,"ft-reader-toc-desktop":this.viewportSize!==eo.S};return Z`
|
|
684
716
|
<div class=${Pt(e)}>
|
|
685
717
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
686
718
|
${Lt(null!==(t=this.toc)&&void 0!==t?t:[],(t=>t.tocId),(t=>this.renderNode(t)))}
|
|
687
719
|
</div>
|
|
688
|
-
`}renderNode(t){var e,i;const o=this.splitToc&&null!=t.page&&!t.page.onItsOwn,n=this.splitToc?(null===(e=this.currentPage)||void 0===e?void 0:e.rootTocId)===t.tocId:null===(i=this.visibleTopics)||void 0===i?void 0:i.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||this.automaticallyExpandedNodes.has(t.tocId)&&!this.manuallyCollapsedNodes.has(t.tocId),s=!o&&t.children.length>0,a=s&&!this.expanded,l={"padding-left":`calc( ${
|
|
720
|
+
`}renderNode(t){var e,i;const o=this.splitToc&&null!=t.page&&!t.page.onItsOwn,n=this.splitToc?(null===(e=this.currentPage)||void 0===e?void 0:e.rootTocId)===t.tocId:null===(i=this.visibleTopics)||void 0===i?void 0:i.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||this.automaticallyExpandedNodes.has(t.tocId)&&!this.manuallyCollapsedNodes.has(t.tocId),s=!o&&t.children.length>0,a=s&&!this.expanded,l={"padding-left":`calc( ${ho.tabulationSize} * ${t.depth-1} + 4px)`};return Z`
|
|
689
721
|
<div class="ft-reader-toc--node ${n?"ft-reader-toc--node-highlighted":""}">
|
|
690
722
|
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${It(l)}>
|
|
691
723
|
<div class="ft-reader-toc--toggle-container">
|
|
692
724
|
${a?Z`
|
|
693
725
|
<ft-button round hideTooltip
|
|
694
|
-
?dense=${this.viewportSize!==
|
|
726
|
+
?dense=${this.viewportSize!==eo.S}
|
|
695
727
|
label="${this.labelResolver.resolve(r?"collapse":"expand",t.title)}"
|
|
696
728
|
iconVariant="${this.iconVariant}"
|
|
697
729
|
icon="${r?this.collapseIcon:this.expandIcon}"
|
|
@@ -713,36 +745,4 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
713
745
|
</div>
|
|
714
746
|
`:J}
|
|
715
747
|
</div>
|
|
716
|
-
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t)for(;n&&!o.has(n);)o.add(n),this.manuallyCollapsedNodes.delete(n),n=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeOrThrow(n))||void 0===i?void 0:i.parentTocId;return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}}
|
|
717
|
-
.ft-reader-toc {
|
|
718
|
-
color: ${io.textColor};
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
722
|
-
background-color: ${io.highlightedBackgroundColor};
|
|
723
|
-
color: ${io.highlightedTextColor};
|
|
724
|
-
${vt(Qt.fontWeight,io.highlightedFontWeight)}
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.ft-reader-toc--link-container {
|
|
728
|
-
display: flex;
|
|
729
|
-
gap: 4px;
|
|
730
|
-
padding: ${io.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
731
|
-
align-items: center;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
735
|
-
flex-shrink: 0;
|
|
736
|
-
width: calc(${io.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
740
|
-
flex-shrink: 0;
|
|
741
|
-
width: calc(${io.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
ft-button {
|
|
745
|
-
${vt(Ki.iconSize,io.iconFontSize)};
|
|
746
|
-
${vt(Ki.backgroundColor,"transparent")};
|
|
747
|
-
}
|
|
748
|
-
`,to([o({type:Boolean})],oo.prototype,"expanded",void 0),to([o()],oo.prototype,"iconVariant",void 0),to([o()],oo.prototype,"collapseIcon",void 0),to([o()],oo.prototype,"expandIcon",void 0),to([o({type:Boolean})],oo.prototype,"autoCollapse",void 0),to([c({})],oo.prototype,"labels",void 0),to([wt()],oo.prototype,"toc",void 0),to([wt((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.shouldSplitCurrentPageToc}))],oo.prototype,"splitToc",void 0),to([wt()],oo.prototype,"currentPage",void 0),to([wt()],oo.prototype,"visibleTopics",void 0),to([n({hasChanged:(t,e)=>!p(t,e)})],oo.prototype,"automaticallyExpandedNodes",void 0),to([n({hasChanged:(t,e)=>!p(t,e)})],oo.prototype,"manuallyExpandedNodes",void 0),to([n({hasChanged:(t,e)=>!p(t,e)})],oo.prototype,"manuallyCollapsedNodes",void 0),to([n()],oo.prototype,"viewportSize",void 0),h("ft-reader-toc")(oo),t.DEFAULT_LABELS=eo,t.FtReaderToc=oo,t.FtReaderTocCssVariables=io,Object.defineProperty(t,"i",{value:!0})}({});
|
|
748
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t)for(;n&&!o.has(n);)o.add(n),this.manuallyCollapsedNodes.delete(n),n=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeOrThrow(n))||void 0===i?void 0:i.parentTocId;return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}}fo.elementDefinitions={"ft-button":oo,"ft-reader-internal-link":yi,"ft-size-watcher":ao,"ft-typography":di},fo.styles=co,po([o({type:Boolean})],fo.prototype,"expanded",void 0),po([o()],fo.prototype,"iconVariant",void 0),po([o()],fo.prototype,"collapseIcon",void 0),po([o()],fo.prototype,"expandIcon",void 0),po([o({type:Boolean})],fo.prototype,"autoCollapse",void 0),po([c({})],fo.prototype,"labels",void 0),po([wt()],fo.prototype,"toc",void 0),po([wt((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.shouldSplitCurrentPageToc}))],fo.prototype,"splitToc",void 0),po([wt()],fo.prototype,"currentPage",void 0),po([wt()],fo.prototype,"visibleTopics",void 0),po([n({hasChanged:(t,e)=>!p(t,e)})],fo.prototype,"automaticallyExpandedNodes",void 0),po([n({hasChanged:(t,e)=>!p(t,e)})],fo.prototype,"manuallyExpandedNodes",void 0),po([n({hasChanged:(t,e)=>!p(t,e)})],fo.prototype,"manuallyCollapsedNodes",void 0),po([n()],fo.prototype,"viewportSize",void 0),h("ft-reader-toc")(fo),t.DEFAULT_LABELS=lo,t.FtReaderToc=fo,t.FtReaderTocCssVariables=ho,t.styles=co,Object.defineProperty(t,"i",{value:!0})}({});
|