@fluid-topics/ft-reader-toc 0.3.9 → 0.3.12

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.
@@ -1,144 +1,639 @@
1
- !function(t,i,e,o,r,n){var s,h=function(t,i,e,o){for(var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(r=t[h])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);return n>3&&s&&Object.defineProperty(i,e,s),s};class l extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class a extends i.FtLitElementRedux{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new l)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}h([r.state()],a.prototype,"stateManager",void 0);const f=globalThis.trustedTypes,p=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,y=`lit$${(Math.random()+"").slice(9)}$`,g="?"+y,d=`<${g}>`,c=document,u=(t="")=>c.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,x=/>/g,w=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),z=/'/g,_=/"/g,A=/^(?:script|style|textarea|title)$/i,S=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),k=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),O=new WeakMap,T=c.createTreeWalker(c,129,null,!1),j=(t,i)=>{const e=t.length-1,o=[];let r,n=2===i?"<svg>":"",s=b;for(let i=0;i<e;i++){const e=t[i];let h,l,a=-1,f=0;for(;f<e.length&&(s.lastIndex=f,l=s.exec(e),null!==l);)f=s.lastIndex,s===b?"!--"===l[1]?s=m:void 0!==l[1]?s=x:void 0!==l[2]?(A.test(l[2])&&(r=RegExp("</"+l[2],"g")),s=w):void 0!==l[3]&&(s=w):s===w?">"===l[0]?(s=null!=r?r:b,a=-1):void 0===l[1]?a=-2:(a=s.lastIndex-l[2].length,h=l[1],s=void 0===l[3]?w:'"'===l[3]?_:z):s===_||s===z?s=w:s===m||s===x?s=b:(s=w,r=void 0);const p=s===w&&t[i+1].startsWith("/>")?" ":"";n+=s===b?e+d:a>=0?(o.push(h),e.slice(0,a)+"$lit$"+e.slice(a)+y+p):e+y+(-2===a?(o.push(void 0),i):p)}const h=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==p?p.createHTML(h):h,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let r=0,n=0;const s=t.length-1,h=this.parts,[l,a]=j(t,i);if(this.el=E.createElement(l,e),T.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=T.nextNode())&&h.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(y)){const e=a[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(y),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?P:"?"===i[1]?R:"@"===i[1]?Z:C})}else h.push({type:6,index:r})}for(const i of t)o.removeAttribute(i)}if(A.test(o.tagName)){const t=o.textContent.split(y),i=t.length-1;if(i>0){o.textContent=f?f.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],u()),T.nextNode(),h.push({type:2,index:++r});o.append(t[i],u())}}}else if(8===o.nodeType)if(o.data===g)h.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(y,t+1));)h.push({type:7,index:r}),t+=y.length-1}r++}}static createElement(t,i){const e=c.createElement("template");return e.innerHTML=t,e}}function I(t,i,e=t,o){var r,n,s,h;if(i===k)return i;let l=void 0!==o?null===(r=e._$Cl)||void 0===r?void 0:r[o]:e._$Cu;const a=v(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,e,o)),void 0!==o?(null!==(s=(h=e)._$Cl)&&void 0!==s?s:h._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=I(t,l._$AS(t,i.values),l,o)),i}class M{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:c).importNode(e,!0);T.currentNode=r;let n=T.nextNode(),s=0,h=0,l=o[0];for(;void 0!==l;){if(s===l.index){let i;2===l.type?i=new U(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new W(n,this,t)),this.v.push(i),l=o[++h]}s!==(null==l?void 0:l.index)&&(n=T.nextNode(),s++)}return r}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class U{constructor(t,i,e,o){var r;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=I(this,t,i),v(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==k&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==N&&v(this._$AH)?this._$AA.nextSibling.data=t:this.k(c.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=E.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.m(e);else{const t=new M(r,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=O.get(t.strings);return void 0===i&&O.set(t.strings,i=new E(t)),i}S(t){$(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const r of t)o===i.length?i.push(e=new U(this.j(u()),this.j(u()),this,this.options)):e=i[o],e._$AI(r),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class C{constructor(t,i,e,o,r){this.type=1,this._$AH=N,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const r=this.strings;let n=!1;if(void 0===r)t=I(this,t,i,0),n=!v(t)||t!==this._$AH&&t!==k,n&&(this._$AH=t);else{const o=t;let s,h;for(t=r[0],s=0;s<r.length-1;s++)h=I(this,o[e+s],i,s),h===k&&(h=this._$AH[s]),n||(n=!v(h)||h!==this._$AH[s]),h===N?t=N:t!==N&&(t+=(null!=h?h:"")+r[s+1]),this._$AH[s]=h}n&&!o&&this.P(t)}P(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends C{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===N?void 0:t}}const G=f?f.emptyScript:"";class R extends C{constructor(){super(...arguments),this.type=4}P(t){t&&t!==N?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class Z extends C{constructor(t,i,e,o,r){super(t,i,e,o,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=I(this,t,i,0))&&void 0!==e?e:N)===k)return;const o=this._$AH,r=t===N&&o!==N||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==N&&(o===N||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class W{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const B=window.litHtmlPolyfillSupport;null==B||B(E,U),(null!==(s=globalThis.litHtmlVersions)&&void 0!==s?s:globalThis.litHtmlVersions=[]).push("2.2.7");
1
+ !function(t,i,e,o,n,s,r,a){var l,h=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class p extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class f extends i.FtLitElementRedux{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new p)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}h([r.state()],f.prototype,"stateManager",void 0);const d=globalThis.trustedTypes,c=d?d.createPolicy("lit-html",{createHTML:t=>t}):void 0,u=`lit$${(Math.random()+"").slice(9)}$`,g="?"+u,v=`<${g}>`,x=document,y=(t="")=>x.createComment(t),b=t=>null===t||"object"!=typeof t&&"function"!=typeof t,m=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w=/-->/g,k=/>/g,z=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),S=/'/g,N=/"/g,C=/^(?:script|style|textarea|title)$/i,O=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),j=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),E=new WeakMap,I=x.createTreeWalker(x,129,null,!1),B=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=$;for(let i=0;i<e;i++){const e=t[i];let a,l,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,l=r.exec(e),null!==l);)p=r.lastIndex,r===$?"!--"===l[1]?r=w:void 0!==l[1]?r=k:void 0!==l[2]?(C.test(l[2])&&(n=RegExp("</"+l[2],"g")),r=z):void 0!==l[3]&&(r=z):r===z?">"===l[0]?(r=null!=n?n:$,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?z:'"'===l[3]?N:S):r===N||r===S?r=z:r===w||r===k?r=$:(r=z,n=void 0);const f=r===z&&t[i+1].startsWith("/>")?" ":"";s+=r===$?e+v:h>=0?(o.push(a),e.slice(0,h)+"$lit$"+e.slice(h)+u+f):e+u+(-2===h?(o.push(void 0),i):f)}const a=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==c?c.createHTML(a):a,o]};class A{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,a=this.parts,[l,h]=B(t,i);if(this.el=A.createElement(l,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=I.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(u)){const e=h[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(u),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?R:"?"===i[1]?W:"@"===i[1]?L:_})}else a.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(C.test(o.tagName)){const t=o.textContent.split(u),i=t.length-1;if(i>0){o.textContent=d?d.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],y()),I.nextNode(),a.push({type:2,index:++n});o.append(t[i],y())}}}else if(8===o.nodeType)if(o.data===g)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(u,t+1));)a.push({type:7,index:n}),t+=u.length-1}n++}}static createElement(t,i){const e=x.createElement("template");return e.innerHTML=t,e}}function F(t,i,e=t,o){var n,s,r,a;if(i===j)return i;let l=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const h=b(i)?void 0:i._$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,e,o)),void 0!==o?(null!==(r=(a=e)._$Cl)&&void 0!==r?r:a._$Cl=[])[o]=l:e._$Cu=l),void 0!==l&&(i=F(t,l._$AS(t,i.values),l,o)),i}class M{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:x).importNode(e,!0);I.currentNode=n;let s=I.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new U(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new D(s,this,t)),this.v.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(s=I.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class U{constructor(t,i,e,o){var n;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=F(this,t,i),b(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==j&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>m(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==T&&b(this._$AH)?this._$AA.nextSibling.data=t:this.k(x.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=A.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new M(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new A(t)),i}S(t){m(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new U(this.j(y()),this.j(y()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class _{constructor(t,i,e,o,n){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=T}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=F(this,t,i,0),s=!b(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=F(this,o[e+r],i,r),a===j&&(a=this._$AH[r]),s||(s=!b(a)||a!==this._$AH[r]),a===T?t=T:t!==T&&(t+=(null!=a?a:"")+n[r+1]),this._$AH[r]=a}s&&!o&&this.P(t)}P(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends _{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===T?void 0:t}}const Z=d?d.emptyScript:"";class W extends _{constructor(){super(...arguments),this.type=4}P(t){t&&t!==T?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class L extends _{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=F(this,t,i,0))&&void 0!==e?e:T)===j)return;const o=this._$AH,n=t===T&&o!==T||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==T&&(o===T||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}}const P=window.litHtmlPolyfillSupport;null==P||P(A,U),(null!==(l=globalThis.litHtmlVersions)&&void 0!==l?l:globalThis.litHtmlVersions=[]).push("2.2.7");
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2020 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const D=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===D)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:D}),F=new Map,L=(t=>(i,...e)=>{const o=e.length;let r,n;const s=[],h=[];let l,a=0,f=!1;for(;a<o;){for(l=i[a];a<o&&void 0!==(n=e[a],r=H(n));)l+=r+i[++a],f=!0;h.push(n),s.push(l),a++}if(a===o&&s.push(i[o]),f){const t=s.join("$$lit$$");void 0===(i=F.get(t))&&(s.raw=s,F.set(t,i=s)),e=h}return t(i,...e)})(S);var q,J=function(t,i,e,o){for(var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(r=t[h])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);return n>3&&s&&Object.defineProperty(i,e,s),s};!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"}(q||(q={}));const Q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),V=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),X={fontFamily:V,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",Q),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),it=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),et=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",Q),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",V),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",V),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",V),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",V),Tt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),jt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),It=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",V),Ct=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit"),Wt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",V),Bt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),Lt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",V),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),Xt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Yt=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",V),ti=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),ii=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),ei=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),oi=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),ri=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase"),ni=e.css`
7
+ const G=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:G}),V=new Map,X=(t=>(i,...e)=>{const o=e.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(s=e[h],n=K(s));)l+=n+i[++h],p=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=V.get(t))&&(r.raw=r,V.set(t,i=r)),e=a}return t(i,...e)})(O);var q,Y=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(q||(q={}));const J=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),Q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),tt={fontFamily:Q,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},it=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",J),et=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",tt.fontSize,"20px"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",tt.fontWeight,"normal"),nt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",tt.letterSpacing,"0.15px"),st=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",tt.lineHeight,"1.2"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",tt.textTransform,"inherit"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",J),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",tt.fontSize,"14px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",tt.fontWeight,"normal"),pt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",tt.letterSpacing,"0.105px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",tt.lineHeight,"1.7"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",tt.textTransform,"inherit"),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Q),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",tt.fontSize,"16px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",tt.fontWeight,"600"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",tt.letterSpacing,"0.144px"),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",tt.lineHeight,"1.5"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",tt.textTransform,"inherit"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Q),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",tt.fontSize,"14px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",tt.fontWeight,"normal"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",tt.letterSpacing,"0.098px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",tt.lineHeight,"1.7"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",tt.textTransform,"inherit"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Q),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",tt.fontSize,"16px"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",tt.fontWeight,"normal"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",tt.letterSpacing,"0.496px"),jt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",tt.lineHeight,"1.5"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",tt.textTransform,"inherit"),Et=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Q),It=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",tt.fontSize,"14px"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",tt.fontWeight,"normal"),At=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",tt.letterSpacing,"0.252px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",tt.lineHeight,"1.4"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",tt.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Q),_t=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",tt.fontSize,"12px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",tt.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",tt.letterSpacing,"0.396px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",tt.lineHeight,"1.33"),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",tt.textTransform,"inherit"),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Q),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",tt.fontSize,"10px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",tt.fontWeight,"normal"),Kt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",tt.letterSpacing,"0.33px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",tt.lineHeight,"1.6"),Vt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",tt.textTransform,"inherit"),Xt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Q),qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",tt.fontSize,"10px"),Yt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",tt.fontWeight,"normal"),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",tt.letterSpacing,"1.5px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",tt.lineHeight,"1.6"),ti=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",tt.textTransform,"uppercase"),ii={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",Q),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",tt.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",tt.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",tt.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",tt.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",tt.textTransform,"uppercase")},ei=e.css`
8
8
  .ft-typography--title {
9
- font-family: ${Y};
10
- font-size: ${tt};
11
- font-weight: ${it};
12
- letter-spacing: ${et};
13
- line-height: ${ot};
9
+ font-family: ${it};
10
+ font-size: ${et};
11
+ font-weight: ${ot};
12
+ letter-spacing: ${nt};
13
+ line-height: ${st};
14
14
  text-transform: ${rt};
15
15
  }
16
- `,si=e.css`
16
+ `,oi=e.css`
17
17
  .ft-typography--title-dense {
18
- font-family: ${nt};
19
- font-size: ${st};
18
+ font-family: ${at};
19
+ font-size: ${lt};
20
20
  font-weight: ${ht};
21
- letter-spacing: ${lt};
22
- line-height: ${at};
23
- text-transform: ${ft};
21
+ letter-spacing: ${pt};
22
+ line-height: ${ft};
23
+ text-transform: ${dt};
24
24
  }
25
- `,hi=e.css`
25
+ `,ni=e.css`
26
26
  .ft-typography--subtitle1 {
27
- font-family: ${pt};
28
- font-size: ${yt};
27
+ font-family: ${ct};
28
+ font-size: ${ut};
29
29
  font-weight: ${gt};
30
- letter-spacing: ${dt};
31
- line-height: ${ct};
32
- text-transform: ${ut};
30
+ letter-spacing: ${vt};
31
+ line-height: ${xt};
32
+ text-transform: ${yt};
33
33
  }
34
- `,li=e.css`
34
+ `,si=e.css`
35
35
  .ft-typography--subtitle2 {
36
- font-family: ${vt};
37
- font-size: ${$t};
38
- font-weight: ${bt};
39
- letter-spacing: ${mt};
40
- line-height: ${xt};
41
- text-transform: ${wt};
36
+ font-family: ${bt};
37
+ font-size: ${mt};
38
+ font-weight: ${$t};
39
+ letter-spacing: ${wt};
40
+ line-height: ${kt};
41
+ text-transform: ${zt};
42
42
  }
43
43
 
44
- `,ai=e.css`
44
+ `,ri=e.css`
45
45
  .ft-typography--body1 {
46
- font-family: ${zt};
47
- font-size: ${_t};
48
- font-weight: ${At};
49
- letter-spacing: ${St};
50
- line-height: ${kt};
51
- text-transform: ${Nt};
46
+ font-family: ${St};
47
+ font-size: ${Nt};
48
+ font-weight: ${Ct};
49
+ letter-spacing: ${Ot};
50
+ line-height: ${jt};
51
+ text-transform: ${Tt};
52
52
  }
53
- `,fi=e.css`
53
+ `,ai=e.css`
54
54
  .ft-typography--body2 {
55
- font-family: ${Ot};
56
- font-size: ${Tt};
57
- font-weight: ${jt};
58
- letter-spacing: ${Et};
59
- line-height: ${It};
55
+ font-family: ${Et};
56
+ font-size: ${It};
57
+ font-weight: ${Bt};
58
+ letter-spacing: ${At};
59
+ line-height: ${Ft};
60
60
  text-transform: ${Mt};
61
61
  }
62
- `,pi=e.css`
62
+ `,li=e.css`
63
63
  .ft-typography--caption {
64
64
  font-family: ${Ut};
65
- font-size: ${Ct};
66
- font-weight: ${Pt};
67
- letter-spacing: ${Gt};
68
- line-height: ${Rt};
69
- text-transform: ${Zt};
65
+ font-size: ${_t};
66
+ font-weight: ${Rt};
67
+ letter-spacing: ${Zt};
68
+ line-height: ${Wt};
69
+ text-transform: ${Lt};
70
70
  }
71
- `,yi=e.css`
71
+ `,hi=e.css`
72
72
  .ft-typography--breadcrumb {
73
- font-family: ${Wt};
74
- font-size: ${Bt};
75
- font-weight: ${Dt};
76
- letter-spacing: ${Ht};
77
- line-height: ${Kt};
78
- text-transform: ${Ft};
73
+ font-family: ${Dt};
74
+ font-size: ${Pt};
75
+ font-weight: ${Gt};
76
+ letter-spacing: ${Kt};
77
+ line-height: ${Ht};
78
+ text-transform: ${Vt};
79
79
  }
80
- `,gi=e.css`
80
+ `,pi=e.css`
81
81
  .ft-typography--overline {
82
- font-family: ${Lt};
82
+ font-family: ${Xt};
83
83
  font-size: ${qt};
84
- font-weight: ${Jt};
85
- letter-spacing: ${Qt};
86
- line-height: ${Vt};
87
- text-transform: ${Xt};
84
+ font-weight: ${Yt};
85
+ letter-spacing: ${Jt};
86
+ line-height: ${Qt};
87
+ text-transform: ${ti};
88
88
  }
89
- `,di=e.css`
89
+ `,fi=e.css`
90
90
  .ft-typography--button {
91
- font-family: ${Yt};
92
- font-size: ${ti};
93
- font-weight: ${ii};
94
- letter-spacing: ${ei};
95
- line-height: ${oi};
96
- text-transform: ${ri};
91
+ font-family: ${ii.fontFamily};
92
+ font-size: ${ii.fontSize};
93
+ font-weight: ${ii.fontWeight};
94
+ letter-spacing: ${ii.letterSpacing};
95
+ line-height: ${ii.lineHeight};
96
+ text-transform: ${ii.textTransform};
97
97
  }
98
- `;class ci extends i.FtLitElement{constructor(){super(...arguments),this.variant=q.body1}render(){return this.element?L`
99
- <${K(this.element)}
98
+ `;class di extends i.FtLitElement{constructor(){super(...arguments),this.variant=q.body1}render(){return this.element?X`
99
+ <${H(this.element)}
100
100
  class="ft-typography ft-typography--${this.variant}">
101
101
  <slot></slot>
102
- </${K(this.element)}>
103
- `:L`
102
+ </${H(this.element)}>
103
+ `:X`
104
104
  <slot class="ft-typography ft-typography--${this.variant}"></slot>
105
- `}}ci.styles=[ni,si,hi,li,ai,fi,pi,yi,gi,di,e.css`
105
+ `}}di.styles=[ei,oi,ni,si,ri,ai,li,hi,pi,fi,e.css`
106
106
  .ft-typography {
107
107
  vertical-align: inherit;
108
108
  }
109
- `],J([r.property()],ci.prototype,"element",void 0),J([r.property()],ci.prototype,"variant",void 0),i.customElement("ft-typography")(ci);var ui=function(t,i,e,o){for(var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(r=t[h])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);return n>3&&s&&Object.defineProperty(i,e,s),s};class vi extends a{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
109
+ `],Y([r.property()],di.prototype,"element",void 0),Y([r.property()],di.prototype,"variant",void 0),i.customElement("ft-typography")(di);var ci=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const ui=i.FtCssVariableFactory.extend("--ft-reader-internal-link-outline-color",i.designSystemVariables.colorPrimary);class gi extends f{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let i=n.classMap({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return e.html`
110
110
  <a class=${i}
111
111
  href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
112
112
  @click=${t=>this.onClick(t)}>
113
113
  <slot></slot>
114
114
  </a>
115
- `}onClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section)))}}vi.styles=e.css`
115
+ `}onClick(t){var i;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(i=this.stateManager)||void 0===i||i.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}var vi,xi;gi.styles=e.css`
116
+ a:focus {
117
+ outline-color: ${ui};
118
+ }
119
+
116
120
  .ft-reader-link--remove-style {
117
121
  text-decoration: none;
118
122
  color: inherit;
119
123
  }
120
- `,ui([r.property()],vi.prototype,"tocId",void 0),ui([r.property()],vi.prototype,"section",void 0),ui([r.property()],vi.prototype,"pageNumber",void 0),ui([r.property({type:Boolean})],vi.prototype,"removeStyle",void 0),i.customElement("ft-reader-internal-link")(vi);var $i=function(t,i,e,o){for(var r,n=arguments.length,s=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,h=t.length-1;h>=0;h--)(r=t[h])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);return n>3&&s&&Object.defineProperty(i,e,s),s};const bi={colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),tabulationSize:i.FtCssVariableFactory.create("--ft-reader-toc-tabulation-size","SIZE","8px")};class mi extends a{render(){var t;return e.html`
121
- <div class="ft-reader-toc">
124
+ `,ci([r.property()],gi.prototype,"tocId",void 0),ci([r.property()],gi.prototype,"section",void 0),ci([r.property({type:Number})],gi.prototype,"pageNumber",void 0),ci([r.property({type:Boolean})],gi.prototype,"removeStyle",void 0),i.customElement("ft-reader-internal-link")(gi),function(t){t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.STAR_PLAIN="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN_PLAIN="&#xe94d;",t.THUMBS_DOWN="&#xe94e;",t.THUMBS_UP_PLAIN="&#xe94f;",t.THUMBS_UP="&#xe950;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe900;",t.EYE="\f06e",t.DISC="&#xe901;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe902;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe90f;",t.ADMIN_USERS="&#xe910;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe912;"}(vi||(vi={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(xi||(xi={})),new Map([...["abw"].map((t=>[t,xi.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,xi.AUDIO])),...["avi"].map((t=>[t,xi.AVI])),...["chm","xhs"].map((t=>[t,xi.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,xi.CODE])),...["csv"].map((t=>[t,xi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xi.DITA])),...["epub"].map((t=>[t,xi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xi.EXCEL])),...["flac"].map((t=>[t,xi.FLAC])),...["gif"].map((t=>[t,xi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xi.GZIP])),...["html","htm","xhtml"].map((t=>[t,xi.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,xi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xi.JPEG])),...["json"].map((t=>[t,xi.JSON])),...["m4a","m4p"].map((t=>[t,xi.M4A])),...["mov","qt"].map((t=>[t,xi.MOV])),...["mp3"].map((t=>[t,xi.MP3])),...["mp4","m4v"].map((t=>[t,xi.MP4])),...["ogg","oga"].map((t=>[t,xi.OGG])),...["pdf","ps"].map((t=>[t,xi.PDF])),...["png"].map((t=>[t,xi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xi.POWERPOINT])),...["rar"].map((t=>[t,xi.RAR])),...["stp"].map((t=>[t,xi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xi.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,xi.VIDEO])),...["wav"].map((t=>[t,xi.WAV])),...["wma"].map((t=>[t,xi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xi.WORD])),...["xml","xsl","rdf"].map((t=>[t,xi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xi.YAML])),...["zip"].map((t=>[t,xi.ZIP]))]);var yi,bi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(yi||(yi={}));const mi={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")};class $i extends i.FtLitElement{constructor(){super(...arguments),this.variant=yi.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
125
+ <i class="ft-icon ${"ft-icon--"+this.variant}">
126
+ ${a.unsafeHTML(this.resolvedIcon)}
127
+ <slot ?hidden=${t}></slot>
128
+ </i>
129
+ `}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case yi.file_format:this.resolvedIcon=null!==(t=xi[o.toUpperCase()])&&void 0!==t?t:o;break;case yi.fluid_topics:this.resolvedIcon=null!==(i=vi[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}$i.elementDefinitions={},$i.styles=e.css`
130
+ :host {
131
+ display: inline-block;
132
+ }
133
+
134
+ :host, i.ft-icon {
135
+ width: ${mi.size};
136
+ height: ${mi.size};
137
+ text-align: center;
138
+ }
139
+
140
+ i.ft-icon {
141
+ font-size: ${mi.size};
142
+ line-height: 1;
143
+ font-weight: normal;
144
+ text-transform: none;
145
+ font-style: normal;
146
+ font-variant: normal;
147
+ speak: none;
148
+ text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
149
+ text-rendering: auto;
150
+ -webkit-font-smoothing: antialiased;
151
+ -moz-osx-font-smoothing: grayscale;
152
+ vertical-align: ${mi.verticalAlign};
153
+ }
154
+
155
+ .ft-icon--fluid-topics {
156
+ font-family: ${mi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
157
+ }
158
+
159
+ .ft-icon--file-format {
160
+ font-family: ${mi.fileFormatFontFamily}, ft-mime, sans-serif;
161
+ }
162
+
163
+ .ft-icon--material {
164
+ font-family: ${mi.materialFontFamily}, "Material Icons", sans-serif;
165
+ }
166
+ `,bi([r.property()],$i.prototype,"variant",void 0),bi([r.property()],$i.prototype,"value",void 0),bi([r.state()],$i.prototype,"resolvedIcon",void 0),bi([r.query("slot")],$i.prototype,"slottedContent",void 0),i.customElement("ft-icon")($i);var wi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const ki=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),zi={color:ki,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ki),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},Si=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),Ni=Si,Ci=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Si),Oi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ji=Oi,Ti=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Oi);class Ei extends i.FtLitElement{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.Debouncer(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 i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{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 e.html`
167
+ <style>
168
+ .ft-ripple .ft-ripple--effect,
169
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
170
+ width: ${this.rippleSize}px;
171
+ height: ${this.rippleSize}px;
172
+ }
173
+
174
+ .ft-ripple .ft-ripple--effect {
175
+ left: ${this.originX}px;
176
+ top: ${this.originY}px;
177
+ }
178
+ </style>
179
+ <div class="${n.classMap(t)}">
180
+ <div class="ft-ripple--background"></div>
181
+ <div class="ft-ripple--effect"></div>
182
+ </div>
183
+ `}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 i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),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",e),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 i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Ei.elementDefinitions={},Ei.styles=e.css`
184
+ :host {
185
+ display: contents;
186
+ }
187
+
188
+ .ft-ripple {
189
+ position: absolute;
190
+ inset: 0;
191
+ pointer-events: none;
192
+ }
193
+
194
+ .ft-ripple:not(.ft-ripple--unbounded) {
195
+ overflow: hidden;
196
+ }
197
+
198
+ .ft-ripple .ft-ripple--background,
199
+ .ft-ripple .ft-ripple--effect {
200
+ position: absolute;
201
+ opacity: 0;
202
+ }
203
+
204
+ .ft-ripple .ft-ripple--background {
205
+ background-color: ${zi.backgroundColor};
206
+ }
207
+
208
+ .ft-ripple .ft-ripple--effect {
209
+ background-color: ${zi.color};
210
+ }
211
+
212
+ .ft-ripple.ft-ripple--secondary .ft-ripple--background {
213
+ background-color: ${Ti};
214
+ }
215
+
216
+ .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
217
+ background-color: ${ji};
218
+ }
219
+
220
+ .ft-ripple.ft-ripple--primary .ft-ripple--background {
221
+ background-color: ${Ci};
222
+ }
223
+
224
+ .ft-ripple.ft-ripple--primary .ft-ripple--effect {
225
+ background-color: ${Ni};
226
+ }
227
+
228
+ .ft-ripple .ft-ripple--background {
229
+ top: 0;
230
+ left: 0;
231
+ height: 100%;
232
+ width: 100%;
233
+ transition: opacity 75ms linear;
234
+ }
235
+
236
+ .ft-ripple .ft-ripple--effect,
237
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
238
+ border-radius: 50%;
239
+ }
240
+
241
+ .ft-ripple .ft-ripple--effect {
242
+ transform: translate(-50%, -50%) scale(0.15);
243
+ transition: transform 300ms ease, opacity 75ms linear;
244
+ }
245
+
246
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
247
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
248
+ left: 50%;
249
+ top: 50%;
250
+ }
251
+
252
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
253
+ transform: translate(-50%, -50%);
254
+ }
255
+
256
+ .ft-ripple.ft-ripple--hovered .ft-ripple--background {
257
+ opacity: ${zi.opacityContentOnSurfaceHover};
258
+ }
259
+
260
+ .ft-ripple.ft-ripple--selected .ft-ripple--background {
261
+ opacity: ${zi.opacityContentOnSurfaceSelected};
262
+ }
263
+
264
+ .ft-ripple.ft-ripple--focused .ft-ripple--background {
265
+ opacity: ${zi.opacityContentOnSurfaceFocused};
266
+ }
267
+
268
+ .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
269
+ opacity: ${zi.opacityContentOnSurfacePressed};
270
+ transform: translate(-50%, -50%) scale(1);
271
+ }
272
+ `,wi([r.property({type:Boolean})],Ei.prototype,"primary",void 0),wi([r.property({type:Boolean})],Ei.prototype,"secondary",void 0),wi([r.property({type:Boolean})],Ei.prototype,"unbounded",void 0),wi([r.property({type:Boolean})],Ei.prototype,"activated",void 0),wi([r.property({type:Boolean})],Ei.prototype,"selected",void 0),wi([r.property({type:Boolean})],Ei.prototype,"disabled",void 0),wi([r.state()],Ei.prototype,"hovered",void 0),wi([r.state()],Ei.prototype,"focused",void 0),wi([r.state()],Ei.prototype,"pressed",void 0),wi([r.state()],Ei.prototype,"rippling",void 0),wi([r.state()],Ei.prototype,"rippleSize",void 0),wi([r.state()],Ei.prototype,"originX",void 0),wi([r.state()],Ei.prototype,"originY",void 0),wi([r.query(".ft-ripple")],Ei.prototype,"ripple",void 0),wi([r.query(".ft-ripple--effect")],Ei.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(Ei);var Ii=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Bi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Ai=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Fi=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Mi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Ui=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),_i=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px");class Ri extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
273
+ <div part="container"
274
+ class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
275
+ @mouseenter=${this.onHover}
276
+ @mouseleave=${this.onOut}
277
+ @focusin=${this.onHover}
278
+ @focusout=${this.onOut}
279
+ @touchstart=${this.onTouch}>
280
+ <div part="tooltip" class="ft-tooltip ft-tooltip--${this.position}" ?hidden=${!this.visible}>
281
+ <div part="tooltip-content" class="ft-tooltip--content">
282
+ <slot name="text"></slot>
283
+ <ft-typography variant="caption" ?hidden=${!this.text}>${this.text}</ft-typography>
284
+ </div>
285
+ </div>
286
+ <slot></slot>
287
+ </div>
288
+ `}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 i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.position){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=i.height,n=o;break;case"left":s=e,n=-this.tooltip.clientWidth;break;case"right":s=e,n=i.width}i.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${i.width}px, ${_i})`}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())}}Ri.elementDefinitions={"ft-typography":di},Ri.styles=e.css`
289
+ .ft-tooltip--container {
290
+ display: block;
291
+ position: relative;
292
+ }
293
+
294
+ .ft-tooltip--inline {
295
+ display: inline-block;
296
+ max-width: 100%;
297
+ }
298
+
299
+ .ft-tooltip {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ overflow: hidden;
303
+ width: max-content;
304
+ max-width: ${_i};
305
+ text-align: center;
306
+ padding: ${Bi};
307
+ z-index: ${Mi};
308
+ }
309
+
310
+ .ft-tooltip--content {
311
+ padding: 4px 8px;
312
+ border-radius: ${Ui};
313
+ background-color: ${Fi};
314
+ color: ${Ai};
315
+ top: -500px;
316
+ left: -500px;
317
+ position: relative;
318
+ word-break: break-word;
319
+ }
320
+ `,Ii([r.property()],Ri.prototype,"text",void 0),Ii([r.property({type:Boolean})],Ri.prototype,"manual",void 0),Ii([r.property({type:Boolean})],Ri.prototype,"inline",void 0),Ii([r.property({type:Number})],Ri.prototype,"delay",void 0),Ii([r.property()],Ri.prototype,"position",void 0),Ii([r.queryAssignedNodes("",!0)],Ri.prototype,"slotNodes",void 0),Ii([r.query(".ft-tooltip--container")],Ri.prototype,"container",void 0),Ii([r.query("slot")],Ri.prototype,"target",void 0),Ii([r.query(".ft-tooltip")],Ri.prototype,"tooltip",void 0),Ii([r.query(".ft-tooltip--content")],Ri.prototype,"tooltipContent",void 0),Ii([r.state()],Ri.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ri);const Zi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")};class Wi extends i.FtLitElement{static get styles(){return e.css`
321
+ :host {
322
+ line-height: 0;
323
+ }
324
+
325
+ .ft-loader {
326
+ display: inline-block;
327
+ position: relative;
328
+
329
+ width: ${Zi.size};
330
+ height: ${Zi.size};
331
+ }
332
+
333
+ .ft-loader div {
334
+ position: absolute;
335
+ top: 37.5%;
336
+ width: 25%;
337
+ height: 25%;
338
+ border-radius: 50%;
339
+ background: ${Zi.color};
340
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
341
+ }
342
+
343
+ .ft-loader div:nth-child(1) {
344
+ left: 2.5%;
345
+ animation: appear 0.6s infinite;
346
+ }
347
+
348
+ .ft-loader div:nth-child(2) {
349
+ left: 2.5%;
350
+ animation: move 0.6s infinite;
351
+ }
352
+
353
+ .ft-loader div:nth-child(3) {
354
+ left: 37.5%;
355
+ animation: move 0.6s infinite;
356
+ }
357
+
358
+ .ft-loader div:nth-child(4) {
359
+ left: 72.5%;
360
+ animation: disappear 0.6s infinite;
361
+ }
362
+
363
+ @keyframes appear {
364
+ 0% {
365
+ transform: scale(0);
366
+ }
367
+ 100% {
368
+ transform: scale(1);
369
+ }
370
+ }
371
+
372
+ @keyframes disappear {
373
+ 0% {
374
+ transform: scale(1);
375
+ }
376
+ 100% {
377
+ transform: scale(0);
378
+ }
379
+ }
380
+
381
+ @keyframes move {
382
+ 0% {
383
+ transform: translate(0, 0);
384
+ }
385
+ 100% {
386
+ transform: translate(calc(0.35 * ${Zi.size}), 0);
387
+ }
388
+ }
389
+ `}render(){return e.html`
390
+ <div class="ft-loader">
391
+ <div></div>
392
+ <div></div>
393
+ <div></div>
394
+ <div></div>
395
+ </div>
396
+ `}}i.customElement("ft-loader")(Wi);var Li=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Di=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Pi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Di,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",ii.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Di),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Gi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Ki={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Gi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Gi)},Hi=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Vi extends i.FtLitElement{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=yi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
397
+ :host {
398
+ display: inline-block;
399
+ max-width: 100%;
400
+ pointer-events: none;
401
+ }
402
+
403
+ button {
404
+ box-shadow: 0px 0px 0px transparent;
405
+ border: 0px solid transparent;
406
+ text-shadow: 0px 0px 0px transparent;
407
+ font-size: ${Pi.fontSize};
408
+ }
409
+
410
+ button:hover {
411
+ box-shadow: 0px 0px 0px transparent;
412
+ border: 0px solid transparent;
413
+ text-shadow: 0px 0px 0px transparent;
414
+ }
415
+
416
+ button:active {
417
+ outline: none;
418
+ border: none;
419
+ }
420
+
421
+ button:focus {
422
+ outline: 0;
423
+ }
424
+
425
+ .ft-button {
426
+ position: relative;
427
+ display: flex;
428
+ justify-content: center;
429
+ align-items: center;
430
+ width: 100%;
431
+ overflow: hidden;
432
+ box-sizing: border-box;
433
+ border: none;
434
+ pointer-events: auto;
435
+
436
+ --ft-button-internal-line-height: calc(${Pi.fontSize} + 2px);
437
+ --ft-button-internal-color: ${Pi.color};
438
+ ${i.setVariable(mi.size,Pi.iconSize)};
439
+ --ft-button-internal-vertical-padding: 6px;
440
+ --ft-button-internal-horizontal-padding: 8px;
441
+ ${i.setVariable(zi.color,Pi.rippleColor)};
442
+ --ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Pi.iconSize});
443
+
444
+ border-radius: ${Pi.borderRadius};
445
+ padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
446
+ background-color: ${Pi.backgroundColor};
447
+ color: var(--ft-button-internal-color);
448
+ -webkit-mask-image: radial-gradient(white, black);
449
+ }
450
+
451
+ .ft-button:not([disabled]):hover {
452
+ cursor: pointer;
453
+ }
454
+
455
+ .ft-button--dense {
456
+ --ft-button-internal-vertical-padding: 2px;
457
+ --ft-button-internal-horizontal-padding: 4px;
458
+ border-radius: ${Hi};
459
+ }
460
+
461
+ .ft-button--round {
462
+ border-radius: calc(var(--ft-button-internal-content-height) / 2 + var(--ft-button-internal-vertical-padding));
463
+ }
464
+
465
+ .ft-button[disabled] {
466
+ filter: grayscale(1);
467
+ opacity: ${Pi.opacityDisabled};
468
+ }
469
+
470
+ .ft-button.ft-button--primary {
471
+ background-color: ${Ki.backgroundColor};
472
+ --ft-button-internal-color: ${Ki.color};
473
+ ${i.setVariable(zi.color,Ki.rippleColor)};
474
+ }
475
+
476
+ .ft-button.ft-button--outlined {
477
+ border: 1px solid var(--ft-button-internal-color);
478
+ padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
479
+ }
480
+
481
+ .ft-button:focus {
482
+ outline: none;
483
+ }
484
+
485
+ .ft-button--label {
486
+ position: relative;
487
+ overflow: hidden;
488
+ white-space: nowrap;
489
+ text-overflow: ellipsis;
490
+ display: block;
491
+ margin: 0 var(--ft-button-internal-horizontal-padding);
492
+ ${i.setVariable(ii.fontSize,"1em")};
493
+ ${i.setVariable(ii.lineHeight,"var(--ft-button-internal-content-height)")};
494
+ }
495
+
496
+ .ft-button--safari-fix .ft-button--label {
497
+ margin-right: 0;
498
+ }
499
+
500
+ .ft-button--safari-fix .ft-button--label:after {
501
+ content: "\\0000a0";
502
+ display: inline-block;
503
+ width: 0;
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
+ ${i.setVariable(Zi.size,Pi.iconSize)};
527
+ ${i.setVariable(Zi.color,"var(--ft-button-internal-color)")};
528
+ }
529
+ `]}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":i.isSafari,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
530
+ <button part="button"
531
+ class="${n.classMap(t)}"
532
+ aria-label="${this.getLabel()}"
533
+ ?disabled=${this.isDisabled()}>
534
+ <ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
535
+ <ft-typography part="label"
536
+ variant="button"
537
+ class="ft-button--label"
538
+ ?hidden=${!this.hasTextContent()}>
539
+ <slot @slotchange=${this.onSlotchange}></slot>
540
+ </ft-typography>
541
+ ${this.resolveIcon()}
542
+ </button>
543
+ `)}addTooltipIfNeeded(t){return this.hasTextContent()||0===this.getLabel().trim().length||this.hideTooltip?t:e.html`
544
+ <ft-tooltip part="tooltip"
545
+ text="${this.getLabel()}"
546
+ position="${this.tooltipPosition}">
547
+ ${t}
548
+ </ft-tooltip>
549
+ `}resolveIcon(){return this.loading?e.html`
550
+ <ft-loader></ft-loader> `:this.icon?e.html`
551
+ <ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}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}}Vi.elementDefinitions={"ft-ripple":Ei,"ft-tooltip":Ri,"ft-typography":di,"ft-icon":$i,"ft-loader":Wi},Li([r.property({type:Boolean})],Vi.prototype,"primary",void 0),Li([r.property({type:Boolean})],Vi.prototype,"outlined",void 0),Li([r.property({type:Boolean})],Vi.prototype,"disabled",void 0),Li([r.property({type:Boolean})],Vi.prototype,"dense",void 0),Li([r.property({type:Boolean})],Vi.prototype,"round",void 0),Li([r.property({type:String})],Vi.prototype,"label",void 0),Li([r.property({type:String})],Vi.prototype,"icon",void 0),Li([r.property({type:String})],Vi.prototype,"iconVariant",void 0),Li([r.property({type:Boolean})],Vi.prototype,"trailingIcon",void 0),Li([r.property({type:Boolean})],Vi.prototype,"loading",void 0),Li([r.property({type:String})],Vi.prototype,"tooltipPosition",void 0),Li([r.property({type:Boolean})],Vi.prototype,"hideTooltip",void 0),Li([r.query(".ft-button")],Vi.prototype,"button",void 0),Li([r.query(".ft-button--label slot")],Vi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Vi);var Xi,qi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(Xi||(Xi={}));class Yi extends CustomEvent{constructor(t,i){super("change",{detail:{size:t,category:i}})}}class Ji extends i.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=Xi.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new i.Debouncer}render(){return e.html`
552
+ <div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
553
+ <div class="ft-size-watcher--watcher"></div>
554
+ </div>
555
+ `}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=Xi.S:this.size<976?this.category=Xi.M:this.size<1024?this.category=Xi.L:this.size<1440?this.category=Xi.XL:this.category=Xi.XXL,this.dispatchEvent(new Yi(this.size,this.category)))}),this.debounceTimeout)}}Ji.elementDefinitions={},Ji.styles=e.css`
556
+ .ft-size-watcher--pixel {
557
+ width: 0;
558
+ height: 0;
559
+ overflow: hidden;
560
+ }
561
+
562
+ .ft-size-watcher--pixel.ft-size-watcher--local {
563
+ width: 100%;
564
+ }
565
+
566
+ .ft-size-watcher--watcher {
567
+ height: 1px;
568
+ width: 100vw;
569
+ }
570
+
571
+ .ft-size-watcher--local .ft-size-watcher--watcher {
572
+ width: 100%;
573
+ }
574
+ `,qi([r.property({type:Number})],Ji.prototype,"debounceTimeout",void 0),qi([r.property({type:Boolean})],Ji.prototype,"local",void 0),qi([r.property({type:Number,reflect:!0})],Ji.prototype,"size",void 0),qi([r.property({type:String,reflect:!0})],Ji.prototype,"category",void 0),qi([r.query(".ft-size-watcher--watcher")],Ji.prototype,"watcher",void 0),i.customElement("ft-size-watcher")(Ji);var Qi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const te={expand:"Expand {0}",collapse:"Collapse {0}"},ie={tabulationSize:i.FtCssVariableFactory.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:i.FtCssVariableFactory.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:i.FtCssVariableFactory.extend("--ft-reader-toc-text-color",i.designSystemVariables.colorOnSurface),highlightedTextColor:i.FtCssVariableFactory.extend("--ft-reader-toc-highlighted-text-color",i.designSystemVariables.colorPrimary),highlightedFontWeight:i.FtCssVariableFactory.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:i.FtCssVariableFactory.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:i.FtCssVariableFactory.create("--ft-reader-toc-icon-font-size","SIZE","16px")};class ee extends f{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=yi.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.autoCollapse=!1,this.labels={},this.labelResolver=new i.ParametrizedLabelResolver(te,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.viewportSize=Xi.M}update(t){var e,o;super.update(t),t.has("labels")&&(this.labelResolver=new i.ParametrizedLabelResolver(te,this.labels)),!this.expanded&&["splitToc","visibleTopics","currentPage","toc"].some((i=>t.has(i)))&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(this.splitToc?[null===(e=this.currentPage)||void 0===e?void 0:e.rootTocId]:null!==(o=this.visibleTopics)&&void 0!==o?o:[]))}render(){var t;const i={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===Xi.S,"ft-reader-toc-desktop":this.viewportSize!==Xi.S};return e.html`
575
+ <div class=${n.classMap(i)}>
576
+ <ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
122
577
  ${o.repeat(null!==(t=this.toc)&&void 0!==t?t:[],(t=>t.tocId),(t=>this.renderNode(t)))}
123
578
  </div>
124
- `}renderNode(t){var i,r;const n=this.splitToc&&null!=t.page&&!t.page.onItsOwn,s=this.splitToc?(null===(i=this.currentPage)||void 0===i?void 0:i.rootTocId)===t.tocId:null===(r=this.visibleTopics)||void 0===r?void 0:r.includes(t.tocId);return e.html`
125
- <div class="ft-reader-toc--node">
126
- <ft-reader-internal-link
127
- class="${s?"ft-reader-toc--node-visible":""}"
128
- tocId=${t.tocId}>
129
- <ft-typography variant="body2">${t.title}</ft-typography>
130
- </ft-reader-internal-link>
131
- <div class="ft-reader-toc--node-children">
132
- ${n?e.nothing:o.repeat(t.children,(t=>t.tocId),(t=>this.renderNode(t)))}
579
+ `}renderNode(t){var i,n;const r=this.splitToc&&null!=t.page&&!t.page.onItsOwn,a=this.splitToc?(null===(i=this.currentPage)||void 0===i?void 0:i.rootTocId)===t.tocId:null===(n=this.visibleTopics)||void 0===n?void 0:n.includes(t.tocId),l=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||this.automaticallyExpandedNodes.has(t.tocId)&&!this.manuallyCollapsedNodes.has(t.tocId),h=!r&&t.children.length>0,p=h&&!this.expanded,f={"padding-left":`calc( ${ie.tabulationSize} * ${t.depth-1} + 4px)`};return e.html`
580
+ <div class="ft-reader-toc--node ${a?"ft-reader-toc--node-highlighted":""}">
581
+ <div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${s.styleMap(f)}>
582
+ <div class="ft-reader-toc--toggle-container">
583
+ ${p?e.html`
584
+ <ft-button round hideTooltip
585
+ ?dense=${this.viewportSize!==Xi.S}
586
+ label="${this.labelResolver.resolve(l?"collapse":"expand",t.title)}"
587
+ iconVariant="${this.iconVariant}"
588
+ icon="${l?this.collapseIcon:this.expandIcon}"
589
+ @click=${()=>this.manuallyToggle(t.tocId,l)}
590
+ data-expand-node="${t.tocId}"
591
+ >
592
+ </ft-button>
593
+ `:e.nothing}
594
+ </div>
595
+ <ft-reader-internal-link
596
+ tocId="${t.tocId}"
597
+ removeStyle>
598
+ <ft-typography variant="body2">${t.title}</ft-typography>
599
+ </ft-reader-internal-link>
133
600
  </div>
601
+ ${h?e.html`
602
+ <div class="ft-reader-toc--node-children">
603
+ ${l?o.repeat(t.children,(t=>t.tocId),(t=>this.renderNode(t))):e.nothing}
604
+ </div>
605
+ `:e.nothing}
134
606
  </div>
135
- `}}mi.elementDefinitions={"ft-typography":ci,"ft-reader-internal-link":vi},mi.styles=e.css`
136
- .ft-reader-toc--node-visible {
137
- background-color: ${bi.colorPrimary};
138
- color: ${bi.colorOnPrimary};
607
+ `}buildAutomaticallyExpandedNodes(t){var i,e;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===(e=null===(i=this.service)||void 0===i?void 0:i.getTocNodeOrThrow(n))||void 0===e?void 0:e.parentTocId;return o}manuallyToggle(t,i){i?(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}}ee.elementDefinitions={"ft-button":Vi,"ft-reader-internal-link":gi,"ft-size-watcher":Ji,"ft-typography":di},ee.styles=e.css`
608
+ .ft-reader-toc {
609
+ color: ${ie.textColor};
610
+ }
611
+
612
+ .ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
613
+ background-color: ${ie.highlightedBackgroundColor};
614
+ color: ${ie.highlightedTextColor};
615
+ ${i.setVariable(tt.fontWeight,ie.highlightedFontWeight)}
616
+ }
617
+
618
+ .ft-reader-toc--link-container {
619
+ display: flex;
620
+ gap: 4px;
621
+ padding: ${ie.verticalSpacing} 4px; /* left padding is override on inline style */
622
+ align-items: center;
623
+ }
624
+
625
+ .ft-reader-toc-mobile .ft-reader-toc--toggle-container {
626
+ flex-shrink: 0;
627
+ width: calc(${ie.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
628
+ }
629
+
630
+ .ft-reader-toc-desktop .ft-reader-toc--toggle-container {
631
+ flex-shrink: 0;
632
+ width: calc(${ie.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
139
633
  }
140
634
 
141
- .ft-reader-toc--node-children {
142
- padding-left: ${bi.tabulationSize};
635
+ ft-button {
636
+ ${i.setVariable(Pi.iconSize,ie.iconFontSize)};
637
+ ${i.setVariable(Pi.backgroundColor,"transparent")};
143
638
  }
144
- `,$i([i.redux()],mi.prototype,"toc",void 0),$i([i.redux((t=>{var i;return null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc}))],mi.prototype,"splitToc",void 0),$i([i.redux()],mi.prototype,"currentPage",void 0),$i([i.redux()],mi.prototype,"visibleTopics",void 0),i.customElement("ft-reader-toc")(mi),t.FtReaderToc=mi,t.FtReaderTocCssVariables=bi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litDecorators,ftGlobals.litClassMap);
639
+ `,Qi([r.property({type:Boolean})],ee.prototype,"expanded",void 0),Qi([r.property()],ee.prototype,"iconVariant",void 0),Qi([r.property()],ee.prototype,"collapseIcon",void 0),Qi([r.property()],ee.prototype,"expandIcon",void 0),Qi([r.property({type:Boolean})],ee.prototype,"autoCollapse",void 0),Qi([i.jsonProperty({})],ee.prototype,"labels",void 0),Qi([i.redux()],ee.prototype,"toc",void 0),Qi([i.redux((t=>{var i;return null===(i=t.map)||void 0===i?void 0:i.shouldSplitCurrentPageToc}))],ee.prototype,"splitToc",void 0),Qi([i.redux()],ee.prototype,"currentPage",void 0),Qi([i.redux()],ee.prototype,"visibleTopics",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"automaticallyExpandedNodes",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"manuallyExpandedNodes",void 0),Qi([r.state({hasChanged:(t,e)=>!i.deepEqual(t,e)})],ee.prototype,"manuallyCollapsedNodes",void 0),Qi([r.state()],ee.prototype,"viewportSize",void 0),i.customElement("ft-reader-toc")(ee),t.DEFAULT_LABELS=te,t.FtReaderToc=ee,t.FtReaderTocCssVariables=ie,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litStyleMap,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);