@fluid-topics/ft-search-input 0.3.67 → 0.3.68
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-search-input.light.js +84 -73
- package/build/ft-search-input.min.js +67 -56
- package/package.json +9 -9
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
opacity: ${l.opacityContentOnSurfacePressed};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`;var v
|
|
90
|
+
`;var x,v=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class y 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.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=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-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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`
|
|
91
91
|
<style>
|
|
92
92
|
.ft-ripple .ft-ripple--effect,
|
|
93
93
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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"),s=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",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}y.elementDefinitions={},y.styles=g,x([o.property({type:Boolean})],y.prototype,"primary",void 0),x([o.property({type:Boolean})],y.prototype,"secondary",void 0),x([o.property({type:Boolean})],y.prototype,"unbounded",void 0),x([o.property({type:Boolean})],y.prototype,"activated",void 0),x([o.property({type:Boolean})],y.prototype,"selected",void 0),x([o.property({type:Boolean})],y.prototype,"disabled",void 0),x([o.state()],y.prototype,"hovered",void 0),x([o.state()],y.prototype,"focused",void 0),x([o.state()],y.prototype,"pressed",void 0),x([o.state()],y.prototype,"rippling",void 0),x([o.state()],y.prototype,"rippleSize",void 0),x([o.state()],y.prototype,"originX",void 0),x([o.state()],y.prototype,"originY",void 0),x([o.query(".ft-ripple")],y.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const b=window,m=b.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,S=`<${k}>`,z=document,C=(t="")=>z.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),M=/'/g,A=/"/g,B=/^(?:script|style|textarea|title)$/i,T=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),F=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),R=new WeakMap,_=z.createTreeWalker(z,129,null,!1),L=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=j;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===j?"!--"===l[1]?r=I:void 0!==l[1]?r=U:void 0!==l[2]?(B.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=N):void 0!==l[3]&&(r=N):r===N?">"===l[0]?(r=null!=s?s:j,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?N:'"'===l[3]?A:M):r===A||r===M?r=N:r===I||r===U?r=j:(r=N,s=void 0);const c=r===N&&t[i+1].startsWith("/>")?" ":"";n+=r===j?e+S:p>=0?(o.push(a),e.slice(0,p)+"$lit$"+e.slice(p)+w+c):e+w+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class P{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=L(t,i);if(this.el=P.createElement(l,e),_.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=_.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(w)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?Q:"@"===i[1]?V:G})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(B.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),_.nextNode(),a.push({type:2,index:++s});o.append(t[i],C())}}}else if(8===o.nodeType)if(o.data===k)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)a.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function Z(t,i,e=t,o){var s,n,r,a;if(i===F)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=O(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=Z(t,l._$AS(t,i.values),l,o)),i}class K{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);_.currentNode=s;let n=_.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new W(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new X(n,this,t)),this.u.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=_.nextNode(),r++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class W{constructor(t,i,e,o){var s;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}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=Z(this,t,i),O(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==F&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==D&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=P.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new K(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=R.get(t.strings);return void 0===i&&R.set(t.strings,i=new P(t)),i}k(t){E(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new W(this.O(C()),this.O(C()),this,this.options)):e=i[o],e._$AI(s),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class G{constructor(t,i,e,o,s){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=Z(this,t,i,0),n=!O(t)||t!==this._$AH&&t!==F,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=Z(this,o[e+r],i,r),a===F&&(a=this._$AH[r]),n||(n=!O(a)||a!==this._$AH[r]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const q=m?m.emptyScript:"";class Q extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class V extends G{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=Z(this,t,i,0))&&void 0!==e?e:D)===F)return;const o=this._$AH,s=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==D&&(o===D||s);s&&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 X{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){Z(this,t)}}const Y=b.litHtmlPolyfillSupport;null==Y||Y(P,W),(null!==(v=b.litHtmlVersions)&&void 0!==v?v:b.litHtmlVersions=[]).push("2.4.0");
|
|
107
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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"),s=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",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}y.elementDefinitions={},y.styles=g,v([o.property({type:Boolean})],y.prototype,"primary",void 0),v([o.property({type:Boolean})],y.prototype,"secondary",void 0),v([o.property({type:Boolean})],y.prototype,"unbounded",void 0),v([o.property({type:Boolean})],y.prototype,"activated",void 0),v([o.property({type:Boolean})],y.prototype,"selected",void 0),v([o.property({type:Boolean})],y.prototype,"disabled",void 0),v([o.state()],y.prototype,"hovered",void 0),v([o.state()],y.prototype,"focused",void 0),v([o.state()],y.prototype,"pressed",void 0),v([o.state()],y.prototype,"rippling",void 0),v([o.state()],y.prototype,"rippleSize",void 0),v([o.state()],y.prototype,"originX",void 0),v([o.state()],y.prototype,"originY",void 0),v([o.query(".ft-ripple")],y.prototype,"ripple",void 0),v([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const b=window,m=b.trustedTypes,$=m?m.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,S=`<${k}>`,C=document,z=(t="")=>C.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,E=Array.isArray,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),M=/'/g,A=/"/g,B=/^(?:script|style|textarea|title)$/i,T=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),F=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),R=new WeakMap,P=C.createTreeWalker(C,129,null,!1),Z=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=I;for(let i=0;i<e;i++){const e=t[i];let a,l,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,l=r.exec(e),null!==l);)h=r.lastIndex,r===I?"!--"===l[1]?r=j:void 0!==l[1]?r=U:void 0!==l[2]?(B.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=N):void 0!==l[3]&&(r=N):r===N?">"===l[0]?(r=null!=s?s:I,p=-1):void 0===l[1]?p=-2:(p=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?N:'"'===l[3]?A:M):r===A||r===M?r=N:r===j||r===U?r=I:(r=N,s=void 0);const c=r===N&&t[i+1].startsWith("/>")?" ":"";n+=r===I?e+S:p>=0?(o.push(a),e.slice(0,p)+"$lit$"+e.slice(p)+w+c):e+w+(-2===p?(o.push(void 0),i):c)}const a=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class _{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,p]=Z(t,i);if(this.el=_.createElement(l,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.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(w)){const e=p[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?Q:"@"===i[1]?V:G})}else a.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(B.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=m?m.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],z()),P.nextNode(),a.push({type:2,index:++s});o.append(t[i],z())}}}else if(8===o.nodeType)if(o.data===k)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)a.push({type:7,index:s}),t+=w.length-1}s++}}static createElement(t,i){const e=C.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var s,n,r,a;if(i===F)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const p=O(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==p&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===p?l=void 0:(l=new p(t),l._$AT(t,e,o)),void 0!==o?(null!==(r=(a=e)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=L(t,l._$AS(t,i.values),l,o)),i}class K{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:C).importNode(e,!0);P.currentNode=s;let n=P.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let i;2===l.type?i=new W(n,n.nextSibling,this,t):1===l.type?i=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(i=new X(n,this,t)),this.u.push(i),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=P.nextNode(),r++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class W{constructor(t,i,e,o){var s;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}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=L(this,t,i),O(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==F&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>E(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==D&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=_.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new K(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=R.get(t.strings);return void 0===i&&R.set(t.strings,i=new _(t)),i}k(t){E(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new W(this.O(z()),this.O(z()),this,this.options)):e=i[o],e._$AI(s),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class G{constructor(t,i,e,o,s){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=L(this,t,i,0),n=!O(t)||t!==this._$AH&&t!==F,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=L(this,o[e+r],i,r),a===F&&(a=this._$AH[r]),n||(n=!O(a)||a!==this._$AH[r]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const q=m?m.emptyScript:"";class Q extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class V extends G{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=L(this,t,i,0))&&void 0!==e?e:D)===F)return;const o=this._$AH,s=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==D&&(o===D||s);s&&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 X{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){L(this,t)}}const Y=b.litHtmlPolyfillSupport;null==Y||Y(_,W),(null!==(x=b.litHtmlVersions)&&void 0!==x?x:b.litHtmlVersions=[]).push("2.4.0");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t._$litStatic$},it=t=>({_$litStatic$:t,r:J}),et=new Map,ot=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=tt(n));)l+=s+i[++p],h=!0;a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=et.get(t))&&(r.raw=r,et.set(t,i=r)),e=a}return t(i,...e)})(T);var st;!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"}(st||(st={}));const nt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:rt,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")},lt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",nt),pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",nt),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),
|
|
113
|
+
const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t._$litStatic$},it=t=>({_$litStatic$:t,r:J}),et=new Map,ot=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],a=[];let l,p=0,h=!1;for(;p<o;){for(l=i[p];p<o&&void 0!==(n=e[p],s=tt(n));)l+=s+i[++p],h=!0;a.push(n),r.push(l),p++}if(p===o&&r.push(i[o]),h){const t=r.join("$$lit$$");void 0===(i=et.get(t))&&(r.raw=r,et.set(t,i=r)),e=a}return t(i,...e)})(T);var st;!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"}(st||(st={}));const nt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),at={fontFamily:rt,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")},lt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",nt),pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",at.fontSize,"20px"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",at.fontWeight,"normal"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",at.letterSpacing,"0.15px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",at.lineHeight,"1.2"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",at.textTransform,"inherit"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",nt),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",at.fontSize,"14px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",at.fontWeight,"normal"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",at.letterSpacing,"0.105px"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",at.lineHeight,"1.7"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",at.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",rt),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",at.fontSize,"16px"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",at.fontWeight,"600"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",at.letterSpacing,"0.144px"),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",at.lineHeight,"1.5"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",at.textTransform,"inherit"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",rt),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",at.fontSize,"14px"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",at.fontWeight,"normal"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",at.letterSpacing,"0.098px"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",at.lineHeight,"1.7"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",at.textTransform,"inherit"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",rt),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",at.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",at.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",at.letterSpacing,"0.496px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",at.lineHeight,"1.5"),Ft=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",at.textTransform,"inherit"),Dt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",rt),Rt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",at.fontSize,"14px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",at.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",at.letterSpacing,"0.252px"),_t=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",at.lineHeight,"1.4"),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",at.textTransform,"inherit"),Kt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",rt),Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",at.fontSize,"12px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",at.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",at.letterSpacing,"0.396px"),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",at.lineHeight,"1.33"),Qt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",at.textTransform,"inherit"),Vt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",rt),Xt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",at.fontSize,"10px"),Yt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",at.fontWeight,"normal"),Jt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",at.letterSpacing,"0.33px"),ti=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",at.lineHeight,"1.6"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",at.textTransform,"inherit"),ei=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",rt),oi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",at.fontSize,"10px"),si=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",at.fontWeight,"normal"),ni=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",at.letterSpacing,"1.5px"),ri=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",at.lineHeight,"1.6"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",at.textTransform,"uppercase"),li={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",rt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",at.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",at.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",at.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",at.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",at.textTransform,"uppercase")},pi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
115
|
font-family: ${lt};
|
|
116
116
|
font-size: ${pt};
|
|
@@ -123,8 +123,8 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
123
123
|
.ft-typography--title-dense {
|
|
124
124
|
font-family: ${ut};
|
|
125
125
|
font-size: ${gt};
|
|
126
|
-
font-weight: ${
|
|
127
|
-
letter-spacing: ${
|
|
126
|
+
font-weight: ${xt};
|
|
127
|
+
letter-spacing: ${vt};
|
|
128
128
|
line-height: ${yt};
|
|
129
129
|
text-transform: ${bt};
|
|
130
130
|
}
|
|
@@ -135,15 +135,15 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
135
135
|
font-weight: ${wt};
|
|
136
136
|
letter-spacing: ${kt};
|
|
137
137
|
line-height: ${St};
|
|
138
|
-
text-transform: ${
|
|
138
|
+
text-transform: ${Ct};
|
|
139
139
|
}
|
|
140
140
|
`,fi=e.css`
|
|
141
141
|
.ft-typography--subtitle2 {
|
|
142
|
-
font-family: ${
|
|
142
|
+
font-family: ${zt};
|
|
143
143
|
font-size: ${Ot};
|
|
144
144
|
font-weight: ${Et};
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
145
|
+
letter-spacing: ${It};
|
|
146
|
+
line-height: ${jt};
|
|
147
147
|
text-transform: ${Ut};
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -160,10 +160,10 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
160
160
|
.ft-typography--body2 {
|
|
161
161
|
font-family: ${Dt};
|
|
162
162
|
font-size: ${Rt};
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
163
|
+
font-weight: ${Pt};
|
|
164
|
+
letter-spacing: ${Zt};
|
|
165
|
+
line-height: ${_t};
|
|
166
|
+
text-transform: ${Lt};
|
|
167
167
|
}
|
|
168
168
|
`,gi=e.css`
|
|
169
169
|
.ft-typography--caption {
|
|
@@ -174,7 +174,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
174
174
|
line-height: ${qt};
|
|
175
175
|
text-transform: ${Qt};
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,xi=e.css`
|
|
178
178
|
.ft-typography--breadcrumb {
|
|
179
179
|
font-family: ${Vt};
|
|
180
180
|
font-size: ${Xt};
|
|
@@ -183,7 +183,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
183
183
|
line-height: ${ti};
|
|
184
184
|
text-transform: ${ii};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,vi=e.css`
|
|
187
187
|
.ft-typography--overline {
|
|
188
188
|
font-family: ${ei};
|
|
189
189
|
font-size: ${oi};
|
|
@@ -212,7 +212,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
212
212
|
</${it(this.element)}>
|
|
213
213
|
`:ot`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}$i.styles=[pi,hi,ci,fi,di,ui,gi,vi,
|
|
215
|
+
`}}$i.styles=[pi,hi,ci,fi,di,ui,gi,xi,vi,yi,bi],mi([o.property()],$i.prototype,"element",void 0),mi([o.property()],$i.prototype,"variant",void 0),i.customElement("ft-typography")($i);const wi={distance:i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),color:i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),backgroundColor:i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),zIndex:i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),borderRadiusS:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),maxWidth:i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px")},ki=e.css`
|
|
216
216
|
.ft-tooltip--container {
|
|
217
217
|
display: block;
|
|
218
218
|
position: relative;
|
|
@@ -244,7 +244,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
244
244
|
position: relative;
|
|
245
245
|
word-break: break-word;
|
|
246
246
|
}
|
|
247
|
-
`;var Si=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class
|
|
247
|
+
`;var Si=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ci extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return e.html`
|
|
248
248
|
<div part="container"
|
|
249
249
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
250
250
|
@mouseenter=${this.onHover}
|
|
@@ -262,7 +262,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
262
262
|
</div>
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
265
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${wi.maxWidth})`}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())}}
|
|
265
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${wi.maxWidth})`}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())}}Ci.elementDefinitions={"ft-typography":$i},Ci.styles=ki,Si([o.property()],Ci.prototype,"text",void 0),Si([o.property({type:Boolean})],Ci.prototype,"manual",void 0),Si([o.property({type:Boolean})],Ci.prototype,"inline",void 0),Si([o.property({type:Number})],Ci.prototype,"delay",void 0),Si([o.property()],Ci.prototype,"position",void 0),Si([o.queryAssignedNodes("",!0)],Ci.prototype,"slotNodes",void 0),Si([o.query(".ft-tooltip--container")],Ci.prototype,"container",void 0),Si([o.query("slot")],Ci.prototype,"target",void 0),Si([o.query(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Si([o.query(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Si([o.state()],Ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ci);const zi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Oi=e.css`
|
|
266
266
|
:host {
|
|
267
267
|
line-height: 0;
|
|
268
268
|
}
|
|
@@ -271,8 +271,8 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
271
271
|
display: inline-block;
|
|
272
272
|
position: relative;
|
|
273
273
|
|
|
274
|
-
width: ${
|
|
275
|
-
height: ${
|
|
274
|
+
width: ${zi.size};
|
|
275
|
+
height: ${zi.size};
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.ft-loader div {
|
|
@@ -281,7 +281,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
281
281
|
width: 25%;
|
|
282
282
|
height: 25%;
|
|
283
283
|
border-radius: 50%;
|
|
284
|
-
background: ${
|
|
284
|
+
background: ${zi.color};
|
|
285
285
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -328,7 +328,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
328
328
|
transform: translate(0, 0);
|
|
329
329
|
}
|
|
330
330
|
100% {
|
|
331
|
-
transform: translate(calc(0.35 * ${
|
|
331
|
+
transform: translate(calc(0.35 * ${zi.size}), 0);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
`;class Ei extends i.FtLitElement{render(){return e.html`
|
|
@@ -338,7 +338,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
338
338
|
<div></div>
|
|
339
339
|
<div></div>
|
|
340
340
|
</div>
|
|
341
|
-
`}}var ji
|
|
341
|
+
`}}var Ii,ji;Ei.styles=Oi,i.customElement("ft-loader")(Ei),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ii||(Ii={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(ji||(ji={}));const Ui=new Map([...["abw"].map((t=>[t,ji.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,ji.AUDIO])),...["avi"].map((t=>[t,ji.AVI])),...["chm","xhs"].map((t=>[t,ji.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,ji.CODE])),...["csv"].map((t=>[t,ji.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ji.DITA])),...["epub"].map((t=>[t,ji.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ji.EXCEL])),...["flac"].map((t=>[t,ji.FLAC])),...["gif"].map((t=>[t,ji.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ji.GZIP])),...["html","htm","xhtml"].map((t=>[t,ji.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,ji.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ji.JPEG])),...["json"].map((t=>[t,ji.JSON])),...["m4a","m4p"].map((t=>[t,ji.M4A])),...["mov","qt"].map((t=>[t,ji.MOV])),...["mp3"].map((t=>[t,ji.MP3])),...["mp4","m4v"].map((t=>[t,ji.MP4])),...["ogg","oga"].map((t=>[t,ji.OGG])),...["pdf","ps"].map((t=>[t,ji.PDF])),...["png"].map((t=>[t,ji.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ji.POWERPOINT])),...["rar"].map((t=>[t,ji.RAR])),...["stp"].map((t=>[t,ji.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ji.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,ji.VIDEO])),...["wav"].map((t=>[t,ji.WAV])),...["wma"].map((t=>[t,ji.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ji.WORD])),...["xml","xsl","rdf"].map((t=>[t,ji.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ji.YAML])),...["zip"].map((t=>[t,ji.ZIP]))]),Ni=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);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")},Ai=e.css`
|
|
342
342
|
:host, i.ft-icon {
|
|
343
343
|
display: inline-flex;
|
|
344
344
|
align-items: center;
|
|
@@ -390,7 +390,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
390
390
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
391
391
|
<slot ?hidden=${o}></slot>
|
|
392
392
|
</i>
|
|
393
|
-
`}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 Bi.file_format:this.resolvedIcon=null!==(t=
|
|
393
|
+
`}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 Bi.file_format:this.resolvedIcon=null!==(t=ji[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Bi.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ii[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Fi.elementDefinitions={},Fi.styles=Ai,Ti([o.property()],Fi.prototype,"variant",void 0),Ti([o.property()],Fi.prototype,"value",void 0),Ti([o.state()],Fi.prototype,"resolvedIcon",void 0),Ti([o.query("slot")],Fi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Fi);const Di=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ri={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",li.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Di),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Pi=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Zi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Pi,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",Pi)},_i=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Li=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Ki=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Wi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Gi=[i.noTextSelect,e.css`
|
|
394
394
|
:host {
|
|
395
395
|
display: inline-block;
|
|
396
396
|
max-width: 100%;
|
|
@@ -429,12 +429,11 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
429
429
|
box-sizing: border-box;
|
|
430
430
|
border: none;
|
|
431
431
|
pointer-events: auto;
|
|
432
|
+
gap: ${Ri.iconPadding};
|
|
432
433
|
|
|
433
434
|
--ft-button-internal-line-height: calc(${Ri.fontSize} + 2px);
|
|
434
435
|
--ft-button-internal-color: ${Ri.color};
|
|
435
436
|
${i.setVariable(Mi.size,Ri.iconSize)};
|
|
436
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
437
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
438
437
|
${i.setVariable(l.color,Ri.rippleColor)};
|
|
439
438
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ri.iconSize});
|
|
440
439
|
|
|
@@ -445,18 +444,31 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
445
444
|
-webkit-mask-image: radial-gradient(white, black);
|
|
446
445
|
}
|
|
447
446
|
|
|
447
|
+
.ft-button.ft-button--outlined {
|
|
448
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
449
|
+
padding: calc(${Ri.verticalPadding} - 1px) calc(${Ri.horizontalPadding} - 1px);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.ft-button.ft-button--dense {
|
|
453
|
+
padding: ${Li} ${Ki};
|
|
454
|
+
border-radius: ${_i};
|
|
455
|
+
gap: ${Wi};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.ft-button.ft-button--dense.ft-button--outlined {
|
|
459
|
+
padding: calc(${Li} - 1px) calc(${Ki} - 1px);
|
|
460
|
+
}
|
|
461
|
+
|
|
448
462
|
.ft-button:not([disabled]):hover {
|
|
449
463
|
cursor: pointer;
|
|
450
464
|
}
|
|
451
465
|
|
|
452
|
-
.ft-button--
|
|
453
|
-
--ft-button-internal-
|
|
454
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
455
|
-
border-radius: ${Pi};
|
|
466
|
+
.ft-button--round {
|
|
467
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Ri.verticalPadding});
|
|
456
468
|
}
|
|
457
469
|
|
|
458
|
-
.ft-button--round {
|
|
459
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 +
|
|
470
|
+
.ft-button--round.ft-button--dense {
|
|
471
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Li});
|
|
460
472
|
}
|
|
461
473
|
|
|
462
474
|
.ft-button[disabled] {
|
|
@@ -465,14 +477,9 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
465
477
|
}
|
|
466
478
|
|
|
467
479
|
.ft-button.ft-button--primary {
|
|
468
|
-
background-color: ${
|
|
469
|
-
--ft-button-internal-color: ${
|
|
470
|
-
${i.setVariable(l.color,
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.ft-button.ft-button--outlined {
|
|
474
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
475
|
-
padding: calc(${Ri.verticalPadding} - 1px) calc(${Ri.horizontalPadding} - 1px);
|
|
480
|
+
background-color: ${Zi.backgroundColor};
|
|
481
|
+
--ft-button-internal-color: ${Zi.color};
|
|
482
|
+
${i.setVariable(l.color,Zi.rippleColor)};
|
|
476
483
|
}
|
|
477
484
|
|
|
478
485
|
.ft-button:focus {
|
|
@@ -485,7 +492,6 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
485
492
|
white-space: nowrap;
|
|
486
493
|
text-overflow: ellipsis;
|
|
487
494
|
display: block;
|
|
488
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
489
495
|
${i.setVariable(li.fontSize,"1em")};
|
|
490
496
|
${i.setVariable(li.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
491
497
|
}
|
|
@@ -500,8 +506,13 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
500
506
|
}
|
|
501
507
|
|
|
502
508
|
.ft-button--label[hidden] + ft-icon {
|
|
503
|
-
margin: 0 calc(
|
|
504
|
-
padding: 0
|
|
509
|
+
margin: 0 calc(${Ri.horizontalPadding} * -1);
|
|
510
|
+
padding: 0 ${Ri.verticalPadding};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
514
|
+
margin: 0 calc(${Ki} * -1);
|
|
515
|
+
padding: 0 ${Li};
|
|
505
516
|
}
|
|
506
517
|
|
|
507
518
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -510,10 +521,10 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
510
521
|
}
|
|
511
522
|
|
|
512
523
|
ft-loader {
|
|
513
|
-
${i.setVariable(
|
|
514
|
-
${i.setVariable(
|
|
524
|
+
${i.setVariable(zi.size,Ri.iconSize)};
|
|
525
|
+
${i.setVariable(zi.color,"var(--ft-button-internal-color)")};
|
|
515
526
|
}
|
|
516
|
-
`];var
|
|
527
|
+
`];var Hi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class qi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Bi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
517
528
|
<button part="button"
|
|
518
529
|
class="${s.classMap(t)}"
|
|
519
530
|
aria-label="${this.getLabel()}"
|
|
@@ -536,7 +547,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
536
547
|
</ft-tooltip>
|
|
537
548
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
538
549
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
539
|
-
<ft-icon part="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}}
|
|
550
|
+
<ft-icon part="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}}qi.elementDefinitions={"ft-ripple":y,"ft-tooltip":Ci,"ft-typography":$i,"ft-icon":Fi,"ft-loader":Ei},qi.styles=[i.safariEllipsisFix,Gi],Hi([o.property({type:String,reflect:!0})],qi.prototype,"role",void 0),Hi([o.property({type:Boolean})],qi.prototype,"primary",void 0),Hi([o.property({type:Boolean})],qi.prototype,"outlined",void 0),Hi([o.property({type:Boolean})],qi.prototype,"disabled",void 0),Hi([o.property({type:Boolean})],qi.prototype,"dense",void 0),Hi([o.property({type:Boolean})],qi.prototype,"round",void 0),Hi([o.property({type:String})],qi.prototype,"label",void 0),Hi([o.property({type:String})],qi.prototype,"icon",void 0),Hi([o.property({type:String})],qi.prototype,"iconVariant",void 0),Hi([o.property({type:Boolean})],qi.prototype,"trailingIcon",void 0),Hi([o.property({type:Boolean})],qi.prototype,"loading",void 0),Hi([o.property({type:String})],qi.prototype,"tooltipPosition",void 0),Hi([o.property({type:Boolean})],qi.prototype,"hideTooltip",void 0),Hi([o.property({type:Boolean})],qi.prototype,"forceTooltip",void 0),Hi([o.query(".ft-button")],qi.prototype,"button",void 0),Hi([o.query(".ft-button--label slot")],qi.prototype,"slottedContent",void 0),i.customElement("ft-button")(qi);const Qi={height:i.FtCssVariableFactory.create("--ft-search-input-height","SIZE","38px"),borderRadius:i.FtCssVariableFactory.extend("--ft-search-input-border-radius",i.designSystemVariables.borderRadiusS),desktopFiltersHeight:i.FtCssVariableFactory.create("--ft-search-input-desktop-filters-height","SIZE","350px"),floatingZIndex:i.FtCssVariableFactory.create("--ft-search-input-floating-components-z-index","NUMBER","3"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),elevation02:i.FtCssVariableFactory.external(i.designSystemVariables.elevation02,"Design system"),buttonColor:i.FtCssVariableFactory.external(Ri.color,"Button"),buttonRippleColor:i.FtCssVariableFactory.external(Ri.rippleColor,"Button")},Vi=e.css`
|
|
540
551
|
* {
|
|
541
552
|
box-sizing: border-box;
|
|
542
553
|
}
|
|
@@ -546,11 +557,11 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
546
557
|
display: flex;
|
|
547
558
|
flex-direction: row;
|
|
548
559
|
align-items: center;
|
|
549
|
-
height: ${
|
|
560
|
+
height: ${Qi.height};
|
|
550
561
|
|
|
551
|
-
background: ${
|
|
552
|
-
border: 1px solid ${
|
|
553
|
-
border-radius: ${
|
|
562
|
+
background: ${Qi.colorSurface};
|
|
563
|
+
border: 1px solid ${Qi.colorOutline};
|
|
564
|
+
border-radius: ${Qi.borderRadius};
|
|
554
565
|
}
|
|
555
566
|
|
|
556
567
|
.ft-search-input--input-container {
|
|
@@ -565,23 +576,23 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
565
576
|
width: 100%;
|
|
566
577
|
display: grid;
|
|
567
578
|
padding: 0 8px;
|
|
568
|
-
border-radius: ${
|
|
579
|
+
border-radius: ${Qi.borderRadius};
|
|
569
580
|
}
|
|
570
581
|
|
|
571
582
|
.ft-search-input--input-container:focus-within .ft-search-input--input-outline {
|
|
572
|
-
outline: 2px solid ${
|
|
583
|
+
outline: 2px solid ${Qi.colorPrimary};
|
|
573
584
|
}
|
|
574
585
|
|
|
575
586
|
.ft-search-input--input {
|
|
576
587
|
height: 100%;
|
|
577
588
|
border: none;
|
|
578
589
|
background-color: transparent;
|
|
579
|
-
color: ${
|
|
590
|
+
color: ${Qi.colorOnSurface};
|
|
580
591
|
outline: none;
|
|
581
592
|
}
|
|
582
593
|
|
|
583
594
|
.ft-search-input--input::placeholder {
|
|
584
|
-
color: ${
|
|
595
|
+
color: ${Qi.colorOnSurfaceMedium};
|
|
585
596
|
}
|
|
586
597
|
|
|
587
598
|
.ft-search-input--actions {
|
|
@@ -591,7 +602,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
591
602
|
align-items: center;
|
|
592
603
|
height: 100%;
|
|
593
604
|
|
|
594
|
-
${i.setVariable(wi.zIndex,`calc(${
|
|
605
|
+
${i.setVariable(wi.zIndex,`calc(${Qi.floatingZIndex} + 1)`)};
|
|
595
606
|
}
|
|
596
607
|
|
|
597
608
|
.ft-search-input > ft-button,
|
|
@@ -611,27 +622,27 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
611
622
|
.ft-search-input.ft-search-input--with-suggestions:focus-within:not(.ft-search-input--with-suggestions-closed) ft-search-input-suggestion {
|
|
612
623
|
display: block;
|
|
613
624
|
}
|
|
614
|
-
`,
|
|
615
|
-
`,
|
|
625
|
+
`,Xi=e.css`
|
|
626
|
+
`,Yi=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ji{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=Yi.getState(),o=null!=t?t:e;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static get(t){var i;return null!=t?Ji.build(t):null!==(i=Ji.API)&&void 0!==i?i:Ji.API=Ji.build()}static await(t){return new Promise((i=>{let e=Ji.get(t);if(e)i(e);else{const o=Yi.subscribe((()=>{e=Ji.get(t),e&&(o(),i(e))}))}}))}}var te;const ie=Symbol("clearAfterUnitTest");class ee{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[te]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=Yi.getState().uiLocale,Yi.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Yi.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};i.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}te=ie,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new ee((async(t,i)=>(await Ji.await()).getFluidTopicsMessageContext(t,i)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new ee((async(t,i)=>(await Ji.await()).getCustomMessageContext(t,i))));const oe=window.FluidTopicsI18nService,se=window.FluidTopicsCustomI18nService;var ne=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class re extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ji.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
616
627
|
<slot></slot>
|
|
617
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
618
|
-
`;var
|
|
628
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Yi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Yi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Yi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Yi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Yi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Yi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Yi.actions.setSession(this.session),t.has("availableUiLocales")&&Yi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>oe.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}re.elementDefinitions={},re.styles=Xi,ne([o.property()],re.prototype,"baseUrl",void 0),ne([o.property()],re.prototype,"apiIntegrationIdentifier",void 0),ne([o.property()],re.prototype,"uiLocale",void 0),ne([i.jsonProperty([])],re.prototype,"availableUiLocales",void 0),ne([o.property({type:Boolean})],re.prototype,"editorMode",void 0),ne([o.property({type:Boolean})],re.prototype,"noCustom",void 0),ne([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],re.prototype,"noCustomComponent",void 0),ne([o.property({type:Boolean})],re.prototype,"withManualResources",void 0),ne([i.jsonProperty([])],re.prototype,"messageContexts",void 0),ne([i.jsonProperty(void 0)],re.prototype,"session",void 0),ne([o.property({type:Object})],re.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(re);var ae=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class le extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const pe=Symbol("registerInterval");class he extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[pe]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[pe]):this.dispatchEvent(new le)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=pe,ae([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}const ce=e.css`
|
|
629
|
+
`;var fe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};const de=Symbol("i18nProperties"),ue=Symbol("i18nUnsubs");function ge(t){var i;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[i]=new Map}get i18nService(){return this.useCustomMessageContexts?se:oe}i18n(t,i,...e){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[de])||void 0===i||i.forEach(((i,e)=>{i.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(i))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var i;super.updated(t),null===(i=this[de])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[de]&&new Set([...this[de].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[ue].has(t)||this[ue].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[ue].forEach((t=>t())),this[ue].clear()}}return i=ue,fe([o.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class xe extends(ge(i.FtLitElement)){}class ve extends(ge(i.FtLitElementRedux)){}var ye=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class be extends ve{constructor(){super(),this.editorMode=!1,this.addStore(Yi)}render(){return this.key&&this.context?e.html`
|
|
619
630
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
620
|
-
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
631
|
+
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}be.elementDefinitions={},be.styles=ce,ye([i.redux()],be.prototype,"editorMode",void 0),ye([o.property()],be.prototype,"context",void 0),ye([o.property()],be.prototype,"key",void 0),ye([i.jsonProperty([])],be.prototype,"args",void 0),ye([o.property()],be.prototype,"defaultMessage",void 0);class me{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)=>oe.resolveMessage(this.name,i,...t)})}static build(t){return new me(t)}static fromGwt(t){return new me(t)}}i.customElement("ft-i18n")(be);const $e=me.build("designedSearchInput"),we=e.css`
|
|
621
632
|
* {
|
|
622
633
|
box-sizing: border-box;
|
|
623
634
|
}
|
|
624
635
|
|
|
625
636
|
.ft-search-input-suggestion {
|
|
626
637
|
position: absolute;
|
|
627
|
-
z-index: ${
|
|
638
|
+
z-index: ${Qi.floatingZIndex};
|
|
628
639
|
top: calc(100% + 2px);
|
|
629
640
|
left: -1px;
|
|
630
641
|
right: -1px;
|
|
631
|
-
background: ${
|
|
632
|
-
border: 1px solid ${
|
|
633
|
-
border-radius: 0 0 ${
|
|
634
|
-
box-shadow: ${
|
|
642
|
+
background: ${Qi.colorSurface};
|
|
643
|
+
border: 1px solid ${Qi.colorOutline};
|
|
644
|
+
border-radius: 0 0 ${Qi.borderRadius} ${Qi.borderRadius};
|
|
645
|
+
box-shadow: ${Qi.elevation02};
|
|
635
646
|
}
|
|
636
647
|
|
|
637
648
|
.ft-search-input-suggestion--suggestion {
|
|
@@ -642,7 +653,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
642
653
|
padding: 8px;
|
|
643
654
|
gap: 8px;
|
|
644
655
|
cursor: pointer;
|
|
645
|
-
color: ${
|
|
656
|
+
color: ${Qi.colorOnSurface};
|
|
646
657
|
min-height: 44px;
|
|
647
658
|
}
|
|
648
659
|
|
|
@@ -659,7 +670,7 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
659
670
|
flex-grow: 1;
|
|
660
671
|
flex-shrink: 1;
|
|
661
672
|
}
|
|
662
|
-
`;var
|
|
673
|
+
`;var ke=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Se extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t})}}let Ce=class extends he{constructor(){super(...arguments),this.suggestResults=[]}render(){return e.html`
|
|
663
674
|
<div class="ft-search-input-suggestion ft-word-wrap"
|
|
664
675
|
part="container"
|
|
665
676
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
@@ -675,18 +686,18 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
675
686
|
</a>
|
|
676
687
|
`))}
|
|
677
688
|
</div>
|
|
678
|
-
`}onSuggestKeyDown(t){var i,e,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(e=null===(i=this.getFocusedSuggestionElement())||void 0===i?void 0:i.previousElementSibling)&&void 0!==e?e:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.getFirstSuggestionElement())||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,i){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,i)}onSuggestSelected(t,i){t.preventDefault(),this.dispatchEvent(new
|
|
689
|
+
`}onSuggestKeyDown(t){var i,e,o,s,n,r;switch(t.key){case"ArrowUp":null===(o=null!==(e=null===(i=this.getFocusedSuggestionElement())||void 0===i?void 0:i.previousElementSibling)&&void 0!==e?e:this.getLastSuggestionElement())||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(r=null!==(n=null===(s=this.getFocusedSuggestionElement())||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.getFirstSuggestionElement())||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,i){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,i)}onSuggestSelected(t,i){t.preventDefault(),this.dispatchEvent(new Se(i))}getIcon(t){const i="DOCUMENT"===t.type?Bi.file_format:Bi.fluid_topics;let o;switch(t.type){case"MAP":o="BOOK"===t.editorialType?Ii.BOOK:Ii.ARTICLE;break;case"DOCUMENT":o=function(t,i){var e,o,s,n;t=(null!=t?t:"").toLowerCase(),i=(null!=i?i:"").toLowerCase();const[r,a]=((null!==(e=Ni.get(t))&&void 0!==e?e:t)+"/").split("/");return null!==(n=null!==(s=null!==(o=Ui.get(a))&&void 0!==o?o:Ui.get(i))&&void 0!==s?s:Ui.get(r))&&void 0!==n?n:ji.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":o=Ii.TOPICS}return e.html`
|
|
679
690
|
<ft-icon variant="${i}" part="suggestion-icon">
|
|
680
691
|
${o}
|
|
681
692
|
</ft-icon>
|
|
682
|
-
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};
|
|
693
|
+
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};Ce.elementDefinitions={"ft-ripple":y,"ft-typography":$i,"ft-icon":Fi},Ce.styles=[i.wordWrap,we],ke([i.redux()],Ce.prototype,"suggestResults",void 0),Ce=ke([o.customElement("ft-search-input-suggestion")],Ce);var ze=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Oe extends(ge(he)){constructor(){super(),this.liveQuery="",this.suggestResults=[],this.forceCloseSuggestion=!1,this.addI18nContext($e)}render(){let t={"ft-search-input":!0,"ft-search-input--with-suggestions":this.suggestResults.length>0,"ft-search-input--with-suggestions-closed":this.forceCloseSuggestion};return e.html`
|
|
683
694
|
<div class="${s.classMap(t)}" @focusout=${()=>this.forceCloseSuggestion=!1}>
|
|
684
695
|
<div class="ft-search-input--input-container" part="input-container" tabindex="-1">
|
|
685
696
|
<div class="ft-search-input--input-outline" part="input-outline">
|
|
686
697
|
<input class="ft-search-input--input ft-typography--body2"
|
|
687
698
|
part="input"
|
|
688
699
|
type="text"
|
|
689
|
-
placeholder="${
|
|
700
|
+
placeholder="${$e.messages.placeholder()}"
|
|
690
701
|
.value="${this.liveQuery}"
|
|
691
702
|
@keydown=${t=>this.onSearchBarKeyDown(t)}
|
|
692
703
|
@keyup=${t=>this.onSearchBarKeyUp(t)}>
|
|
@@ -700,9 +711,9 @@ const J=Symbol.for(""),tt=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:
|
|
|
700
711
|
part="launch-search-in-input"
|
|
701
712
|
icon="search"
|
|
702
713
|
round dense
|
|
703
|
-
label="${
|
|
714
|
+
label="${$e.messages.searchButton()}"
|
|
704
715
|
@click=${()=>this.launchSearch()}
|
|
705
716
|
></ft-button>
|
|
706
717
|
</div>
|
|
707
718
|
</div>
|
|
708
|
-
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}
|
|
719
|
+
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var i,e;"Enter"===t.key?(null===(i=this.stateManager)||void 0===i||i.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(e=this.stateManager)||void 0===e||e.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setQuery(t.detail),this.forceCloseSuggestion=!0}}Oe.elementDefinitions={"ft-search-input-suggestion":Ce,"ft-button":qi},Oe.styles=[ui,Vi],ze([i.redux()],Oe.prototype,"request",void 0),ze([i.redux()],Oe.prototype,"liveQuery",void 0),ze([i.redux()],Oe.prototype,"suggestResults",void 0),ze([o.state()],Oe.prototype,"forceCloseSuggestion",void 0),ze([o.query(".ft-search-input--input")],Oe.prototype,"input",void 0),ze([o.query("ft-search-input-suggestion")],Oe.prototype,"suggestion",void 0),i.customElement("ft-search-input")(Oe),t.FtSearchInput=Oe,t.FtSearchInputCssVariables=Qi,t.styles=Vi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML,ftGlobals.litRepeat);
|