@fluid-topics/ft-search-bar 0.0.88 → 0.1.0

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.
@@ -478,4 +478,4 @@ const si=a`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40p
478
478
  * @license
479
479
  * Copyright 2018 Google LLC
480
480
  * SPDX-License-Identifier: Apache-2.0
481
- */;let li=class extends ci{};li.styles=[si],li=de([it("mwc-radio")],li);var di=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let hi=class extends Tt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}getStyles(){return[a`.ft-filter-level--container{display:flex;flex-direction:column}.ft-filter-level--container>*{padding:0 10px}.ft-filter-level--go-back{flex-shrink:0;text-decoration:none;position:relative;border-radius:var(--ft-border-radius-M,8px);overflow:hidden;display:flex;align-items:center;padding:4px 4px;gap:4px;cursor:pointer;color:var(--ft-color-on-surface,rgba(0,0,0,.87))}.ft-filter-level--go-back:focus{outline:0}.ft-filter-level--go-back mwc-icon{flex-shrink:0}.ft-filter-level--go-back ft-typography{display:block;flex-grow:1;flex-shrink:0}.ft-filter-level--option{display:flex;align-items:center;max-width:100%}.ft-filter-level--option ft-button{margin-right:-10px;flex-shrink:0}ft-button{--ft-color-primary:var(--ft-color-on-surface, rgba(0, 0, 0, 0.87))}mwc-formfield{flex-shrink:1;flex-grow:1;display:block;max-width:calc(100% + 10px);margin-left:-10px;word-break:break-word;--mdc-theme-secondary:var(--ft-color-primary, #2196F3);--mdc-radio-unchecked-color:var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60));--mdc-checkbox-unchecked-color:var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60));--mdc-checkbox-ink-color:var(--ft-color-on-primary, #FFFFFF);--mdc-radio-disabled-color:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38));--mdc-checkbox-disabled-color:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38));--mdc-theme-on-surface:var(--ft-color-primary, #2196F3);--mdc-typography-body2-font-family:var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans')),system-ui,sans-serif;--mdc-typography-body2-font-size:var(--ft-typography-font-size, 14px);--mdc-typography-body2-font-weight:var(--ft-typography-font-weight, normal);--mdc-typography-body2-letter-spacing:var(--ft-typography-letter-spacing, 0.252px);--mdc-typography-body2-line-height:var(--ft-typography-line-height, 20px);--mdc-typography-body2-text-transform:var(--ft-typography-text-transform, inherit)}.ft-filter--disabled{--mdc-theme-text-primary-on-background:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38))}`]}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}getTemplate(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return B`<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">${null==this.parent?null:B`<div tabindex="0" class="ft-filter-level--go-back" ?disabled="${this.disabled}" @keyup="${this.goBackOnKeyPress}" @click="${this.goBackOnClick}"><ft-ripple></ft-ripple><mwc-icon>chevron_left</mwc-icon><ft-typography variant="body2">${this.parent.label}</ft-typography></div>`} ${$t(e,(t=>t.value),(t=>{var e;return B`<div class="ft-filter-level--option" part="options">${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)} ${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?L:B`<ft-button icon="chevron_right" label="${t.label}" ?disabled="${this.disabled}" tooltipPosition="left" @click="${()=>this.displayLevel(t)}"></ft-button>`}</div>`}))} ${e.length<t.length?B`<ft-button class="ft-filter-level--display-more" icon="expand_more" dense trailingIcon @click="${this.displayMore}">${this.moreValuesButtonLabel}</ft-button>`:L}</div>`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return B`<mwc-formfield label="${t.label}"><mwc-checkbox reducedTouchTarget ?checked="${t.selected}" ?disabled="${this.disabled}" ?indeterminate="${re(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}" @change="${e=>this.toggleMultiValuedOption(e,t)}"></mwc-checkbox></mwc-formfield>`}toggleMultiValuedOption(t,e){var i;re(null!==(i=e.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).forEach((t=>t.selected=!1)),this.optionsChanged(t,e)}buildMonoValuedOption(t){return B`<mwc-formfield label="${t.label}"><mwc-radio reducedTouchTarget name="${this.id}" ?checked="${t.selected}" ?disabled="${this.disabled}" @click="${e=>this.toggleMonoValuedOption(e,t)}"></mwc-radio></mwc-formfield>`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};hi.elementDefinitions={"ft-button":Ke,"ft-ripple":De,"ft-typography":ie,"mwc-checkbox":Me,"mwc-formfield":ti,"mwc-icon":Ne,"mwc-radio":li},di([ot({type:String})],hi.prototype,"id",void 0),di([ot({type:Object})],hi.prototype,"parent",void 0),di([ot({type:Array})],hi.prototype,"options",void 0),di([ot({type:Boolean})],hi.prototype,"multivalued",void 0),di([ot({type:Boolean})],hi.prototype,"disabled",void 0),di([ot({type:Boolean})],hi.prototype,"hideSelectedOptions",void 0),di([ot({type:Boolean})],hi.prototype,"preventNavigation",void 0),di([ot({type:String})],hi.prototype,"filter",void 0),di([ot({type:String})],hi.prototype,"moreValuesButtonLabel",void 0),di([ot({type:Number})],hi.prototype,"displayedValuesLimit",void 0),di([st(".ft-filter-level--container")],hi.prototype,"container",void 0),di([at()],hi.prototype,"displayedPages",void 0),hi=di([Ot("ft-filter-level")],hi);var pi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class fi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let ui=class extends Tt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new St(200),this.updateScrollDebouncer=new St(100)}getStyles(){return a`.ft-snap-scroll{box-sizing:border-box;position:relative;display:flex;--ft-snap-scroll-transparent-color:transparent}.ft-snap-scroll.ft-snap-scroll--safari-fix{--ft-snap-scroll-transparent-color:rgba(255, 255, 255, 0)}.ft-snap-scroll,.ft-snap-scroll--content{overflow:hidden}.ft-snap-scroll--limit-size,.ft-snap-scroll--limit-size .ft-snap-scroll--content{width:100%;height:100%}.ft-snap-scroll--content{flex-grow:1;flex-shrink:1;box-sizing:border-box;scroll-snap-align:start;display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:var(--ft-snap-scroll-gap,0)}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar{display:none}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content{-ms-overflow-style:none;scrollbar-width:none}.ft-snap-scroll--content::slotted(*){flex-shrink:0;flex-grow:1;max-height:100%;max-width:100%}.ft-snap-scroll--horizontal,.ft-snap-scroll--horizontal .ft-snap-scroll--content{width:100%}.ft-snap-scroll--vertical,.ft-snap-scroll--vertical .ft-snap-scroll--content{height:100%}.ft-snap-scroll--horizontal .ft-snap-scroll--content{flex-direction:row;overflow-x:auto}.ft-snap-scroll--vertical .ft-snap-scroll--content{flex-direction:column;overflow-y:auto}.ft-snap-scroll--next,.ft-snap-scroll--previous{position:absolute;display:flex;z-index:var(--ft-snap-scroll-buttons-z-index,1);opacity:1;transition:background-color .5s ease-in-out,opacity .5s ease-in-out,z-index .5s ease-in-out;--ft-button-background-color:transparent;--ft-button-color:var(--ft-snap-scroll-buttons-color, var(--ft-color-primary, #2196F3))}.ft-snap-scroll--next[hidden],.ft-snap-scroll--previous[hidden]{z-index:-1;opacity:0}.ft-snap-scroll--horizontal .ft-snap-scroll--previous{top:0;left:-1px;bottom:0;background:linear-gradient(to right,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--previous{top:-1px;left:0;right:0;background:linear-gradient(to bottom,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next{top:0;right:-1px;bottom:0;background:linear-gradient(to left,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--next{left:0;right:0;bottom:-1px;background:linear-gradient(to top,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,.ft-snap-scroll--vertical .ft-snap-scroll--next:hover,.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover{background-color:var(--ft-color-surface,#fff)}`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}getTemplate(){const t=zt({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Lt}),e=this.controls&&this.withScroll;return B`<div part="container" class="${t}"><ft-button class="ft-snap-scroll--previous" part="controls" primary icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}" ?hidden="${!e||this.startReached}" ?disabled="${!e||this.startReached}" @click="${this.previous}"></ft-button><slot class="ft-snap-scroll--content" part="content" @slotchange="${this.onSlotChange}"></slot><ft-button class="ft-snap-scroll--next" part="controls" primary icon="${this.horizontal?"arrow_forward_ios":"expand_more"}" ?hidden="${!e||this.endReached}" ?disabled="${!e||this.endReached}" @click="${this.next}"></ft-button></div>`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new fi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};ui.elementDefinitions={"ft-button":Ke},pi([ot({type:Boolean})],ui.prototype,"horizontal",void 0),pi([ot({type:Boolean})],ui.prototype,"hideScrollbar",void 0),pi([ot({type:Boolean})],ui.prototype,"controls",void 0),pi([ot({type:Boolean})],ui.prototype,"limitSize",void 0),pi([at()],ui.prototype,"elements",void 0),pi([at()],ui.prototype,"currentElement",void 0),pi([at()],ui.prototype,"withScroll",void 0),pi([at()],ui.prototype,"startReached",void 0),pi([at()],ui.prototype,"endReached",void 0),pi([st(".ft-snap-scroll--content")],ui.prototype,"contentSlot",void 0),ui=pi([Ot("ft-snap-scroll")],ui);var mi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let bi=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return B`<slot @slotchange="${this.updateSubOptionsFromSlot}"></slot>`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};bi.elementDefinitions={},mi([ot({type:String})],bi.prototype,"label",void 0),mi([ot({type:Object,converter:t=>t})],bi.prototype,"value",void 0),mi([ot({type:Boolean,reflect:!0})],bi.prototype,"selected",void 0),mi([ot({type:Object})],bi.prototype,"subOptions",void 0),bi=mi([Ot("ft-filter-option")],bi);var vi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class gi extends CustomEvent{constructor(t){super("change",{detail:t})}}let yi=class extends Tt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new St(300)}getStyles(){return[Yt,a`:host{display:flex;max-height:100%;max-width:100%}.ft-filter--container{flex-grow:1;display:flex;flex-direction:column;max-height:100%;max-width:100%;background:var(--ft-color-surface,#fff)}.ft-filter--header{display:flex;flex-wrap:wrap;gap:4px;flex-shrink:0;padding:0 10px;margin-bottom:8px;--ft-typography-font-size:14px}.ft-filter--header ft-button{flex-shrink:0;margin-left:auto;--ft-button-icon-size:18px}.ft-filter--label{display:block;flex-shrink:1;flex-grow:1;word-break:break-word;--ft-typography-line-height:22px;--ft-typography-font-weight:bold}.ft-filter--filter{flex-shrink:0;display:flex;margin:0;margin-bottom:8px;padding:0 10px;overflow:hidden;height:32px;transition:height 250ms ease-in-out,margin 250ms ease-in-out;transition-delay:.5s}.ft-filter--filter[hidden]{height:0;margin-bottom:0}input{display:block;width:100%;border-radius:4px;border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));padding:4px;outline-color:var(--ft-color-primary,#2196f3)}.ft-filter--values{flex-grow:1;flex-shrink:1;max-width:100%;overflow-x:hidden;overflow-y:auto}.ft-filter--separator{border-top:1px solid var(--ft-color-outline,rgba(0,0,0,.14));margin:4px 10px}.ft-filter--levels-container{position:relative;overflow:hidden}.ft-filter--levels{position:relative;overflow:hidden}ft-filter-level{width:100%}.ft-filter--level-left{height:0}slot{display:none}`]}get flatOptions(){return re(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}getTemplate(){var t,e;const i=this.flatOptions.some((t=>t.selected));let r=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return B`<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}" part="container">${this.label||i?B`<div class="ft-filter--header" part="header"><ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}</ft-typography>${i?B`<ft-button icon="close" dense @click="${this.clear}" part="clear-button">${this.clearButtonLabel}</ft-button>`:null}</div>`:null}<div class="ft-filter--filter" ?hidden="${!r}"><input type="search" part="input" class="ft-typography--caption" ?disabled="${!r}" placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}" @keyup="${this.onFilterChange}"></div><div class="ft-filter--values">${this.renderLevels()}</div><slot @slotchange="${this.updateOptionsFromSlot}"></slot></div>`}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&this.updateScroll(),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(e=this.levelsContainer)||void 0===e||e.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return B`${this.raiseSelectedOptions&&e.length>0?B`<ft-filter-level id="${this.id}" ?multivalued="${this.multivalued}" ?disabled="${this.disabled}" preventNavigation .options="${e}" @change="${this.onChange}" part="selected-values"></ft-filter-level><div class="ft-filter--separator"></div>`:null}<ft-snap-scroll horizontal hideScrollbar class="ft-filter--levels" @current-element-change="${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}">${this.renderLevel(r,this.options)} ${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var r;const o=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(o,null!==(r=null==t?void 0:t.subOptions)&&void 0!==r?r:[],t)}))}</ft-snap-scroll>`}renderLevel(t,e,i){return B`<ft-filter-level class="${t}" id="${this.id}" filter="${this.filter}" moreValuesButtonLabel="${this.moreValuesButtonLabel}" ?multivalued="${this.multivalued}" ?disabled="${this.disabled||"ft-filter--level-center"!==t}" ?hideSelectedOptions="${this.raiseSelectedOptions}" .parent="${i}" .options="${e}" .displayedValuesLimit="${this.displayedValuesLimit}" @change="${this.onChange}" @go-back="${this.goBack}" @display-level="${this.onDisplayLevel}" part="values"></ft-filter-level>`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){if(t.stopPropagation(),!this.multivalued){const e=i=>{var r;i.value!==t.detail.value&&(i.selected=!1),null===(r=i.subOptions)||void 0===r||r.forEach(e)};this.options.forEach(e)}this.optionsChanged()}optionsChanged(){var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new gi(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}updateOptionsFromSlot(t){const e=t.composedPath()[0];this.options=e.assignedElements().map((t=>t))}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};var xi,ki;yi.elementDefinitions={"ft-button":Ke,"ft-filter-level":hi,"ft-snap-scroll":ui,"ft-typography":ie},vi([ot({type:String})],yi.prototype,"id",void 0),vi([ot({type:String})],yi.prototype,"label",void 0),vi([ot({type:String})],yi.prototype,"filterPlaceHolder",void 0),vi([ot({type:String})],yi.prototype,"clearButtonLabel",void 0),vi([ot({type:String})],yi.prototype,"moreValuesButtonLabel",void 0),vi([ot({type:Array})],yi.prototype,"options",void 0),vi([ot({type:Boolean})],yi.prototype,"multivalued",void 0),vi([ot({type:Boolean})],yi.prototype,"disabled",void 0),vi([ot({type:Boolean})],yi.prototype,"raiseSelectedOptions",void 0),vi([ot({type:Number})],yi.prototype,"displayedValuesLimit",void 0),vi([st(".ft-filter--container")],yi.prototype,"container",void 0),vi([st(".ft-filter--values")],yi.prototype,"valuesContainer",void 0),vi([st(".ft-filter--levels")],yi.prototype,"levelsContainer",void 0),vi([st(".ft-filter--levels ft-filter-level:last-child")],yi.prototype,"lastLevel",void 0),vi([function(t){return nt({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],yi.prototype,"levels",void 0),vi([at()],yi.prototype,"withScroll",void 0),vi([at()],yi.prototype,"filter",void 0),vi([at()],yi.prototype,"slideIn",void 0),vi([at()],yi.prototype,"slideOut",void 0),yi=vi([Ot("ft-filter")],yi),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;"}(xi||(xi={})),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;"}(ki||(ki={}));const wi=new Map([...["abw"].map((t=>[t,ki.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,ki.AUDIO])),...["avi"].map((t=>[t,ki.AVI])),...["chm","xhs"].map((t=>[t,ki.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,ki.CODE])),...["csv"].map((t=>[t,ki.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ki.DITA])),...["epub"].map((t=>[t,ki.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ki.EXCEL])),...["flac"].map((t=>[t,ki.FLAC])),...["gif"].map((t=>[t,ki.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ki.GZIP])),...["html","htm","xhtml"].map((t=>[t,ki.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,ki.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ki.JPEG])),...["json"].map((t=>[t,ki.JSON])),...["m4a","m4p"].map((t=>[t,ki.M4A])),...["mov","qt"].map((t=>[t,ki.MOV])),...["mp3"].map((t=>[t,ki.MP3])),...["mp4","m4v"].map((t=>[t,ki.MP4])),...["ogg","oga"].map((t=>[t,ki.OGG])),...["pdf","ps"].map((t=>[t,ki.PDF])),...["png"].map((t=>[t,ki.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ki.POWERPOINT])),...["rar"].map((t=>[t,ki.RAR])),...["stp"].map((t=>[t,ki.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ki.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,ki.VIDEO])),...["wav"].map((t=>[t,ki.WAV])),...["wma"].map((t=>[t,ki.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ki.WORD])),...["xml","xsl","rdf"].map((t=>[t,ki.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ki.YAML])),...["zip"].map((t=>[t,ki.ZIP]))]),_i=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"]]);var $i,zi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format"}($i||($i={}));const Si=a`.ft-icon--fluid-topics{font-family:var(--ft-icon-fluid-topics-font-family, var(--ft-icon-font-family, "ft-icons")),ft-icons,fticons,sans-serif;font-size:var(--ft-icon-font-size,24px);line-height:1;font-weight:400;text-transform:none;font-style:normal;font-variant:normal;speak:none;text-shadow:1px 1px 1px rgba(0,0,0,.004);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}`,Oi=a`.ft-icon--file-format{font-family:var(--ft-icon-file-format-font-family, var(--ft-icon-font-family, "ft-mime")),ft-mime,sans-serif;font-size:var(--ft-icon-font-size,24px);line-height:1;font-weight:400;text-transform:none;font-style:normal;font-variant:normal;speak:none;text-shadow:1px 1px 1px rgba(0,0,0,.004);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}`;let Ci=class extends Tt{constructor(){super(...arguments),this.variant=$i.fluid_topics}getStyles(){return[Si,Oi,a`:host,i.ft-icon{display:inline-block;width:var(--ft-icon-font-size,24px);height:var(--ft-icon-font-size,24px);text-align:center}`]}getTemplate(){return Ut`<slot @slotchange="${()=>this.requestUpdate()}" hidden></slot><i class="ft-icon ${"ft-icon--"+this.variant}">${At(this.getIcon())}</i>`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;return this.variant===$i.file_format?null!==(t=ki[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=xi[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}};Ci.elementDefinitions={},zi([ot()],Ci.prototype,"variant",void 0),zi([st("slot")],Ci.prototype,"slottedContent",void 0),Ci=zi([Ot("ft-icon")],Ci);var Ti=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Ei=class extends Tt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}getStyles(){return a`.ft-accordion-item{display:flex;flex-direction:column}.ft-accordion-item--toggle{flex-shrink:0;flex-grow:0;position:relative;display:flex;align-items:center;cursor:pointer;padding:var(--ft-accordion-toggle-vertical-spacing,12px) var(--ft-accordion-toggle-horizontal-spacing,16px);gap:calc(var(--ft-accordion-toggle-horizontal-spacing,16px)/ 2);outline:0}.ft-accordion-item--label{flex-grow:1;flex-shrink:1;display:block}.ft-accordion-item--content{box-sizing:border-box;flex-shrink:1;flex-grow:1;overflow:hidden;height:0}.ft-accordion-item--active .ft-accordion-item--content{height:initial;overflow:visible;padding:var(--ft-accordion-toggle-vertical-spacing,12px) var(--ft-accordion-toggle-horizontal-spacing,16px)}.ft-accordion-item--separator{border-bottom:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}`}getTemplate(){return B`<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}"><div class="ft-accordion-item--toggle" part="toggle" @click="${()=>this.active=!this.active}" @keydown="${this.onToggleKeyDown}" tabindex="0"><ft-ripple part="toggle-ripple"></ft-ripple>${this.icon?B`<mwc-icon>${this.icon}</mwc-icon>`:null} ${this.label?B`<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}</ft-typography>`:B`<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>`}<mwc-icon>${this.active?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-accordion-item--content" part="content" @focusin="${()=>this.active=!0}"><slot></slot></div><div class="ft-accordion-item--separator" part="separator"></div></div>`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}};Ei.elementDefinitions={"ft-ripple":De,"ft-typography":ie,"mwc-icon":Ne},Ti([ot({type:String})],Ei.prototype,"icon",void 0),Ti([ot({type:String})],Ei.prototype,"label",void 0),Ti([ot({type:Boolean,reflect:!0})],Ei.prototype,"active",void 0),Ei=Ti([Ot("ft-accordion-item")],Ei);var Ai=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Fi=class extends Tt{constructor(){super(...arguments),this.multi=!1}getStyles(){return a`.ft-accordion{box-sizing:border-box}`}getTemplate(){return B`<div class="ft-accordion"><slot @activated="${this.onChange}"></slot></div>`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}};Fi.elementDefinitions={},Ai([ot({type:Boolean})],Fi.prototype,"multi",void 0),Ai([st("slot")],Fi.prototype,"content",void 0),Fi=Ai([Ot("ft-accordion")],Fi);var ji=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class Bi extends CustomEvent{constructor(){super("icon-click")}}let Ri=class extends Tt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return a`:host{display:inline-block;max-width:100%}.ft-chip{position:relative;display:flex;justify-content:center;align-items:center;width:100%;overflow:hidden;box-sizing:border-box;--ft-chip-internal-font-size:var(--ft-typography-font-size, 14px);--ft-chip-internal-line-height:var(--ft-typography-line-height, max(20px, calc(var(--ft-chip-internal-font-size) + 2px)));--mdc-icon-size:var(--ft-chip-icon-size, 18px);--ft-chip-internal-vertical-padding:var(--ft-chip-vertical-padding, 6px);--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, 6px);--ft-chip-internal-icon-padding:3px;--ft-chip-internal-content-height:max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));color:var(--ft-color-on-surface,rgba(0,0,0,.87));--ft-ripple-color:var(--ft-color-on-surface, rgba(0, 0, 0, 0.87));border-radius:calc(var(--ft-chip-internal-content-height)/ 2 + var(--ft-chip-internal-vertical-padding));padding:calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);background-color:var(--ft-color-surface,#fff);line-height:var(--ft-chip-internal-content-height)}.ft-chip--dense{--ft-chip-internal-icon-padding:3px;--ft-chip-internal-vertical-padding:var(--ft-chip-vertical-padding, 4px);--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, 4px);--ft-chip-internal-line-height:var(--ft-typography-line-height, max(16px, calc(var(--ft-chip-internal-font-size) + 2px)))}.ft-chip--no-content{--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding))}.ft-chip--disabled{cursor:default;pointer-events:none;filter:grayscale(1);opacity:var(--ft-color-opacity-disabled,.38)}.ft-chip--highlighted{border:none;padding:var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);background-color:var(--ft-color-primary,#2196f3);--ft-ripple-color:var(--ft-color-on-primary, #FFFFFF);color:var(--ft-color-on-primary,#fff)}.ft-chip--clickable{cursor:pointer;-webkit-mask-image:radial-gradient(white,#000)}.ft-chip:focus{outline:0}.ft-chip--icon-container{display:inline-flex;position:relative;overflow:hidden;border-radius:100%;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;justify-content:center;align-items:center;flex-shrink:0;padding:var(--ft-chip-internal-icon-padding);margin:calc((-1) * var(--ft-chip-internal-icon-padding))}.ft-chip--label{display:block;margin:0 var(--ft-chip-internal-horizontal-padding);--ft-typography-line-height:var(--ft-chip-internal-content-height)}.ft-chip--safari-fix .ft-chip--label{margin-right:0}.ft-chip:not(.ft-chip--multi-line) .ft-chip--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after{content:"\\0000a0";display:inline-block;width:0}.ft-chip--no-content .ft-chip--label{display:none}.ft-chip--no-content .ft-chip--label+.ft-chip--icon-container{width:var(--ft-chip-internal-content-height);height:var(--ft-chip-internal-content-height)}.ft-chip--icon-container:focus{outline:0}.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container{order:-1}`}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Lt};return B`<div class="${zt(t)}" aria-label="${this.getLabel()}" tabindex="${this.interactionsOnChip?0:-1}" @keyup="${this.onKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnChip}"></ft-ripple><ft-typography variant="body2" element="span" class="ft-chip--label"><slot @slotchange="${this.onSlotchange}"></slot></ft-typography>${this.internalIcon?this.renderIcon():null}</div>`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return B`<div class="ft-chip--icon-container ${this.interactionsOnIcon?"ft-chip--clickable":""}" tabindex="${this.interactionsOnIcon?0:-1}" @click="${this.onIconClick}" @keyup="${this.onIconKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnIcon}"></ft-ripple><mwc-icon>${this.internalIcon}</mwc-icon></div>`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bi))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}};Ri.elementDefinitions={"ft-ripple":De,"ft-typography":ie,"mwc-icon":Ne},ji([ot({type:Boolean})],Ri.prototype,"highlighted",void 0),ji([ot({type:Boolean})],Ri.prototype,"removable",void 0),ji([ot({type:Boolean})],Ri.prototype,"disabled",void 0),ji([ot({type:Boolean})],Ri.prototype,"clickable",void 0),ji([ot({type:Boolean})],Ri.prototype,"iconClickable",void 0),ji([ot({type:Boolean})],Ri.prototype,"dense",void 0),ji([ot({type:Boolean})],Ri.prototype,"multiLine",void 0),ji([ot({type:String})],Ri.prototype,"label",void 0),ji([ot({type:String})],Ri.prototype,"icon",void 0),ji([ot({type:Boolean})],Ri.prototype,"trailingIcon",void 0),ji([st("ft-typography slot")],Ri.prototype,"slottedContent",void 0),Ri=ji([Ot("ft-chip")],Ri);var Li=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Mi=class extends Tt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Yt,a`.ft-input-label{position:absolute;inset:0;display:flex}.ft-input-label{border-color:var(--ft-input-label-border-color,var(--ft-color-outline,rgba(0,0,0,.14)))}.ft-input-label:after,.ft-input-label:before{content:"";display:flex;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit}.ft-input-label:before{width:var(--ft-input-label-horizontal-spacing,12px);flex-shrink:0}.ft-input-label:after{flex-grow:1;flex-shrink:1}.ft-input-label--text{display:flex;flex-shrink:1;position:relative;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit;padding:0 4px;color:var(--ft-input-label-text-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)));transition:font-size 250ms,line-height 250ms,color 250ms;--ft-typography-font-size:var(--ft-input-label-font-size, 14px);--ft-typography-line-height:var(--ft-input-label-font-size, 14px)}.ft-input-label--disabled .ft-input-label--text{color:var(--ft-input-label-text-color,var(--ft-color-on-surface-disabled,rgba(0,0,0,.38)))}.ft-input-label--hidden-text{opacity:0}.ft-input-label--floating-text{position:absolute;top:calc(50% - var(--ft-typography-line-height)/ 2);transition:top 250ms;width:calc(100% - 8px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--ft-input-label-vertical-spacing,4px) 0;margin:calc(var(--ft-input-label-vertical-spacing,4px) * -1) 0}.ft-input-label--raised .ft-input-label--text{--ft-typography-font-size:var(--ft-input-label-raised-font-size, 11px);--ft-typography-line-height:var(--ft-input-label-raised-font-size, 11px)}.ft-input-label--raised .ft-input-label--floating-text{top:var(--ft-input-label-vertical-spacing,4px)}.ft-input-label--outlined .ft-input-label--text,.ft-input-label--outlined:after,.ft-input-label--outlined:before{border-top-width:1px;border-top-style:solid}.ft-input-label--outlined:before{border-left-width:1px;border-left-style:solid;border-radius:var(--ft-border-radius-S,4px) 0 0 var(--ft-border-radius-S,4px)}.ft-input-label--outlined:after{border-right-width:1px;border-right-style:solid;border-radius:0 var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text{top:calc(var(--ft-typography-line-height)/ -2)}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text{border-top:none}`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return B`<div class="${zt(t)}">${this.text?B`<div class="ft-input-label--text ft-typography--caption"><span class="ft-input-label--floating-text">${this.text}</span> <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span></div>`:null}</div>`}};Mi.elementDefinitions={},Li([ot({type:String})],Mi.prototype,"text",void 0),Li([ot({type:Boolean})],Mi.prototype,"raised",void 0),Li([ot({type:Boolean})],Mi.prototype,"outlined",void 0),Li([ot({type:Boolean})],Mi.prototype,"disabled",void 0),Mi=Li([Ot("ft-input-label")],Mi);var Ii=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Di=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return B``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Di.elementDefinitions={},Ii([ot({type:String})],Di.prototype,"label",void 0),Ii([ot({type:Object,converter:t=>t})],Di.prototype,"value",void 0),Ii([ot({type:Boolean,reflect:!0})],Di.prototype,"selected",void 0),Di=Ii([Ot("ft-select-option")],Di);let Hi=class extends Tt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=()=>this.optionsDisplayed=!1}getStyles(){return[Zt,Yt,a`:focus{outline:0}.ft-select{display:flex;flex-direction:column;align-items:stretch}.ft-select--main-panel{position:relative;display:flex;height:calc(4 * var(--ft-select-vertical-spacing,4px) + var(--ft-select-label-size,11px) + var(--ft-select-selected-option-size,14px))}.ft-select--input-panel{flex-grow:1;position:relative;display:flex;align-items:center;overflow:hidden;padding-left:16px;padding-right:8px;gap:8px}.ft-select--input-panel,.ft-select--option{color:var(--ft-color-on-surface,rgba(0,0,0,.87));--ft-opacity-color-content-on-surface-hover:0.08;--ft-opacity-color-content-on-surface-dragged:0.04}.ft-select--disabled .ft-select--input-panel,.ft-select--disabled .ft-select--option{color:var(--ft-color-on-surface-disabled,rgba(0,0,0,.38))}.ft-select:not(.ft-select--disabled) .ft-select--input-panel{cursor:pointer}ft-input-label{--ft-input-label-font-size:var(--ft-select-selected-option-size, 14px);--ft-input-label-raised-font-size:var(--ft-select-label-size, 11px);--ft-input-label-vertical-spacing:var(--ft-select-vertical-spacing, 4px)}.ft-select:not(.ft-select--disabled):focus-within ft-input-label{--ft-input-label-border-color:var(--ft-color-primary, #2196F3);--ft-input-label-text-color:var(--ft-color-primary, #2196F3)}.ft-select--selected-option{display:block;flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--ft-typography-font-size:var(--ft-select-selected-option-size, 14px);--ft-typography-line-height:var(--ft-select-selected-option-size, 14px)}mwc-icon{flex-shrink:0}slot{display:none}.ft-select--filled .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0 0}.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option{align-self:stretch;padding-top:calc(var(--ft-select-label-size,11px) + 2 * var(--ft-select-vertical-spacing,4px))}.ft-select--outlined .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px)}.ft-select--options{display:none;position:absolute;top:100%;left:0;right:0;background:var(--ft-color-surface,#fff);z-index:var(--ft-select-options-z-index,1);box-shadow:var(--ft-elevation-02,0 4px 10px 0 rgba(0,0,0,.06),0 2px 5px 0 rgba(0,0,0,.14),0 0 1px 0 rgba(0,0,0,.06))}.ft-select--options-displayed .ft-select--options{display:block}.ft-select--option{position:relative;padding:4px 16px;min-height:32px;display:flex;align-items:center}.ft-select--helper-text{padding:0 12px 0 16px;color:var(--ft-select-helper-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)))}`]}getTemplate(){var t,e,i,r,o;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,n=this.disabled||!this.hasOptions;const c={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":n,"ft-select--options-displayed":a,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return B`<div class="${zt(c)}" @click="${t=>t.stopPropagation()}" part="container"><div class="ft-select--main-panel" part="main-panel"><ft-input-label text="${this.label}" part="label" ?disabled="${n}" ?outlined="${this.outlined}" ?raised="${null!=(null===(e=this.selectedOption)||void 0===e?void 0:e.value)||a}"></ft-input-label><div class="ft-select--input-panel" part="selected-value" tabindex="${n?"-1":"0"}" @click="${()=>this.optionsDisplayed=!this.optionsDisplayed}" @keydown="${this.onMainPanelKeyDown}" aria-label="${this.label}" aria-haspopup="listbox" aria-expanded="${a}">${this.outlined?null:B`<ft-ripple ?disabled="${n}" activated></ft-ripple>`}<ft-typography variant="body1" class="ft-select--selected-option">${null!=(null===(i=this.selectedOption)||void 0===i?void 0:i.value)&&null!==(o=null===(r=this.selectedOption)||void 0===r?void 0:r.label)&&void 0!==o?o:""}</ft-typography><mwc-icon>${a?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-select--options" part="options" @keydown="${this.onOptionsKeyDown}" innerrole="listbox">${$t(this.options,(t=>t.value),(t=>this.renderOption(t)))}</div></div>${this.helper?B`<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}</ft-typography>`:void 0}</div><slot @slotchange="${this.updateOptionsFromSlot}" @option-change="${this.updateOptionsFromSlot}"></slot>`}renderOption(t){let e=this.selectedOption===t;return B`<div class="${zt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}" part="option" tabindex="0" @keydown="${e=>this.onOptionKeyDown(e,t)}" @click="${()=>this.selectOption(t)}"><ft-ripple ?primary="${e}" ?activated="${e}"></ft-ripple>${t.label}</div>`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,a;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(a=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};Hi.elementDefinitions={"ft-input-label":Mi,"ft-typography":ie,"ft-ripple":De,"mwc-icon":Ne},Ii([ot({type:String})],Hi.prototype,"label",void 0),Ii([ot({type:String})],Hi.prototype,"helper",void 0),Ii([ot({type:Boolean})],Hi.prototype,"outlined",void 0),Ii([ot({type:Boolean})],Hi.prototype,"disabled",void 0),Ii([ot({type:Array})],Hi.prototype,"options",void 0),Ii([at()],Hi.prototype,"selectedOption",void 0),Ii([at()],Hi.prototype,"optionsDisplayed",void 0),Ii([at()],Hi.prototype,"focusOptions",void 0),Ii([st(".ft-select--input-panel")],Hi.prototype,"mainPanel",void 0),Ii([st(".ft-select--option:first-child")],Hi.prototype,"firstOption",void 0),Ii([st(".ft-select--option:focus")],Hi.prototype,"focusedOption",void 0),Ii([st(".ft-select--option.ft-select--option-selected")],Hi.prototype,"selectedOptionElement",void 0),Ii([st(".ft-select--option:last-child")],Hi.prototype,"lastOption",void 0),Ii([st("slot")],Hi.prototype,"optionsSlot",void 0),Hi=Ii([Ot("ft-select")],Hi);var Ni=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Pi={filtersButton:"Filters",oneFilterEnabled:"1 filter enabled",nFiltersEnabled:"{0} filter(s) enabled",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",removeRecentSearch:"Remove",back:"Back"};class Ui extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Vi extends CustomEvent{constructor(t){super("change",{detail:t})}}t.FtSearchBar=class extends Tt{constructor(){super(...arguments),this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new Ft(Pi,{}),this.displayedFilters=[],this.searchRequestSerializer=t=>function(t,e){var i;const r=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t}/search/all?${r.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=Mt.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new St(500),this.suggestDebouncer=new St(300),this.facetsLoaded=!1,this.abortUpdateFacetsController=new AbortController,this.closeFloatingContainer=t=>{this.sizeCategory!==Mt.S&&(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))}}getStyles(){return[Zt,a`*{box-sizing:border-box}.ft-search-bar--container{display:flex;flex-direction:column;gap:8px;background:var(--ft-color-surface,#fff);outline:0;--ft-search-bar-border-radius--internal:var(--ft-search-bar-border-radius, var(--ft-border-radius-S, 4px))}.ft-search-bar--mobile-menu-open{position:var(--ft-search-bar-mobile-open-position,fixed);top:var(--ft-search-bar-mobile-open-top,0);bottom:var(--ft-search-bar-mobile-open-bottom,0);left:var(--ft-search-bar-mobile-open-left,0);right:var(--ft-search-bar-mobile-open-right,0);z-index:var(--ft-search-bar-floating-components-z-index,1);padding:16px}.ft-search-bar{flex-shrink:0;position:relative;display:flex;flex-direction:row;align-items:center;height:var(--ft-search-bar-height,38px);background:var(--ft-color-surface,#fff);border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));border-radius:var(--ft-search-bar-border-radius--internal)}.ft-search-bar--floating-panel-open .ft-search-bar{border-radius:var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal) 0 0}.ft-search-bar--input-container{flex-grow:1;flex-shrink:1;align-self:stretch;position:relative}.ft-search-bar--input{border:none;background-color:transparent;padding:0 8px;height:100%;width:100%}.ft-search-bar--input:focus-within{outline-color:var(--ft-color-primary,#2196f3)}.ft-search-bar--mobile .ft-search-bar--suggestions{flex-grow:1;flex-shrink:1;overflow-y:auto;height:0}.ft-search-bar--mobile-open .ft-search-bar--suggestions{height:initial}.ft-search-bar--desktop .ft-search-bar--suggestions,.ft-search-bar--floating-panel{position:absolute;z-index:var(--ft-search-bar-floating-components-z-index,1);top:100%;left:-1px;right:-1px;display:none;background:var(--ft-color-surface,#fff);border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));border-radius:0 0 var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal);box-shadow:var(--ft-elevation-02,0 4px 10px 0 rgba(0,0,0,.06),0 2px 5px 0 rgba(0,0,0,.14),0 0 1px 0 rgba(0,0,0,.06));outline:0}.ft-search-bar--desktop .ft-search-bar--suggestions{top:calc(100% + 1px)}.ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty{display:block}.ft-search-bar--no-suggestions{text-align:center;padding:8px;color:var(--ft-color-on-surface,rgba(0,0,0,.87))}.ft-search-bar--suggestion{text-decoration:none;position:relative;display:flex;align-items:center;padding:8px;gap:8px;cursor:pointer;color:var(--ft-color-on-surface,rgba(0,0,0,.87));min-height:52px}.ft-search-bar--desktop .ft-search-bar--suggestion{min-height:44px}.ft-search-bar--suggestion:focus{outline:0}.ft-search-bar--mobile .ft-search-bar--suggestion:first-child,.ft-search-bar--recent-search+.ft-search-bar--suggestion:not(.ft-search-bar--recent-search){border-top:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--suggestion ft-typography{display:block;flex-grow:1;flex-shrink:1}.ft-search-bar>ft-button{flex-shrink:0}.ft-search-bar--left-action{--ft-border-radius-L:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px);border-right:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--floating-panel-open .ft-search-bar--left-action{--ft-border-radius-L:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 0}.ft-search-bar--clear-query,.ft-search-bar--launch-search{margin:0 4px}.ft-search-bar--separator{height:20px;border-right:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--floating-panel{padding:16px}.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel{display:block}.ft-search-bar--desktop .ft-search-bar--facets-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 10px;margin-bottom:16px}.ft-search-bar--mobile .ft-search-bar--facets-actions{flex-shrink:0;flex-grow:0;display:flex;gap:16px;justify-content:space-evenly}.ft-search-bar--mobile .ft-search-bar--facets-actions>*{flex-grow:1;flex-basis:0}.ft-search-bar>.ft-search-bar--content-locale,.ft-search-bar>.ft-search-bar--content-locale::part(container),.ft-search-bar>.ft-search-bar--content-locale::part(main-panel){height:100%}.ft-search-bar>.ft-search-bar--content-locale::part(options){top:calc(100% + 1px);right:unset;width:max-content;min-width:100%}.ft-search-bar>.ft-search-bar--content-locale::part(selected-value){--ft-color-on-surface:var(--ft-button-color, var(--ft-color-primary, #2196F3));--ft-ripple-color:var(--ft-button-color, var(--ft-color-primary, #2196F3));border-radius:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px)}.ft-search-bar>.ft-search-bar--content-locale::part(label){--ft-input-label-border-color:transparent;--ft-ripple-color:var(--ft-button-color, var(--ft-color-primary, #2196F3))}.ft-search-bar--floating-panel .ft-search-bar--content-locale{margin-right:auto;min-width:250px;--ft-select-options-z-index:2}.ft-search-bar--mobile .ft-search-bar--content-locale::part(clear-button){display:none}.ft-search-bar--floating-panel .ft-search-bar--filters-container{display:block;height:400px;--ft-snap-scroll-gap:16px}.ft-search-bar--floating-panel ft-filter{display:flex;flex-grow:0;max-height:100%;max-width:250px}.ft-search-bar--hierarchical-filter{width:250px}.ft-search-bar--mobile .ft-search-bar--filters-container{flex-grow:1;flex-shrink:1;overflow-y:auto;margin:0 -16px;padding:0 16px}.ft-search-bar--mobile .ft-search-bar--filters-container ft-filter{display:flex;max-height:60vh}.ft-search-bar--mobile ft-filter::part(container){flex-grow:1}.ft-search-bar--filter-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.ft-search-bar--filter-label>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ft-search-bar--filter-label>:first-child{flex-shrink:0}.ft-search-bar--filter-label>:last-child{flex-shrink:1;color:var(--ft-color-on-surface-medium,rgba(0,0,0,.6))}ft-accordion-item::part(toggle){margin-left:-16px;margin-right:-16px}ft-accordion-item::part(label){overflow:hidden}ft-accordion-item::part(content){padding-left:0;padding-right:0}.ft-search-bar--selected-filters{flex-shrink:0;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}.ft-search-bar--selected-filters *{max-width:100%}`]}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.displayedFilters.map((t=>({id:t}))),filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get hasFacets(){return this.facets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}getTemplate(){const t={"ft-search-bar--container":!0,"ft-search-bar--mobile":this.sizeCategory===Mt.S,"ft-search-bar--desktop":this.sizeCategory!==Mt.S,"ft-search-bar--floating-panel-open":this.sizeCategory!==Mt.S&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return B`<ft-size-watcher @change="${this.updateSize}"></ft-size-watcher><div class="${zt(t)}" part="container" tabindex="-1">${this.sizeCategory===Mt.S?this.renderMobileSearchBar():this.renderDesktopSearchBar()}</div>`}renderDesktopSearchBar(){return B`<div class="ft-search-bar" part="search-bar">${this.renderSearchBarLeftAction()}<div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keydown="${this.onSearchBarKeyDown}" @keyup="${this.onSearchBarKeyUp}"> ${this.renderSuggestions()}</div>${this.renderDesktopSearchBarButtons()}<div class="ft-search-bar--floating-panel" @keyup="${this.onFloatingContainerKeyUp}" tabindex="-1">${this.renderDesktopFacetsActions()} ${this.renderDesktopFacets()}</div></div>${this.renderSelectedFacets()}`}renderSearchBarLeftAction(){return this.hasFacets?B`<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action" part="filters-opener" trailingIcon icon="${this.displayFacets?"expand_less":"expand_more"}" @click="${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}" @focusin="${t=>t.stopPropagation()}">${this.labelResolver.resolve("filtersButton")}</ft-button>`:this.hasLocaleSelector?B`<ft-select class="ft-search-bar--content-locale ft-search-bar--left-action" part="content-locale" @change="${t=>this.contentLocale=t.detail}">${$t(this.availableContentLocales,(t=>t.lang),(t=>B`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:L}renderDesktopSearchBarButtons(){return B`${this.query?B`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round dense label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>this.setQuery("")}"></ft-button><div class="ft-search-bar--separator"></div>`:null}<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round dense label="${this.labelResolver.resolve("searchButton")}" @click="${this.launchSearch}"></ft-button>`}renderMobileSearchBar(){return B`<div class="ft-search-bar"><div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keyup="${this.onSearchBarKeyUp}" @focus="${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}"></div>${this.renderMobileSearchBarButtons()}</div>${this.mobileMenuOpen?this.renderMobileFacetsActions():this.renderSelectedFacets()} ${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?B`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}"></ft-button>`:B`<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round label="${this.labelResolver.resolve("searchButton")}" @click="${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}"></ft-button>`}renderMobileFacetsActions(){if(!this.hasLocaleSelector&&0===this.displayedFilters.length)return null;if(this.displayFacets)return B`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" icon="arrow_back" label="${this.labelResolver.resolve("back")}" @click="${()=>this.displayFacets=!1}">${this.labelResolver.resolve("back")}</ft-button>${this.searchFilters.length>0?B`<ft-button part="facets-actions" @click="${()=>this.searchFilters=[]}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}</div>`;let t=this.searchFilters.length>0?this.searchFilters.length>1?this.labelResolver.resolve("nFiltersEnabled",this.searchFilters.length):this.labelResolver.resolve("oneFilterEnabled"):this.labelResolver.resolve("filtersButton");return B`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" @click="${()=>this.displayFacets=!0}">${t}</ft-button></div>`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop(),i=this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale,options:[]})));return B`<ft-accordion class="ft-search-bar--filters-container">${this.hasLocaleSelector?B`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}</ft-typography><ft-typography variant="body2">${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}</ft-typography></div><ft-filter part="filters" class="ft-search-bar--content-locale" id="content-locale" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" raiseSelectedOptions .options="${i}" @change="${t=>this.contentLocale=t.detail[0]}"></ft-filter></ft-accordion-item>`:null} ${$t(this.facets,(t=>t.key),(t=>{const e=ne(t);return B`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${t.label}</ft-typography><ft-typography variant="body2">${function(t){return re(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}</ft-typography></div><ft-filter part="filters" id="${e.id}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter></ft-accordion-item>`}))}</ft-accordion>`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return B`<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}" @keydown="${this.onSuggestKeyDown}">${$t(t.slice(0,5),(t=>t),(t=>B`<a href="${this.searchRequestSerializer({...this.request,query:t})}" part="suggestions" class="ft-search-bar--suggestion ft-search-bar--recent-search" @keyup="${e=>this.onSuggestKeyUp(e,t)}" @click="${e=>this.onSuggestClick(e,t)}"><ft-ripple></ft-ripple><mwc-icon part="suggestion-icon">history</mwc-icon><ft-typography variant="body1">${t}</ft-typography><ft-button icon="close" round part="remove-suggestion" ?dense="${this.sizeCategory!==Mt.S}" label="${this.labelResolver.resolve("removeRecentSearch")}" @click="${e=>this.removeRecentSearch(e,t)}"></ft-button></a>`))} ${$t(this.suggestions,(t=>t.value),(t=>B`<a href="${this.searchRequestSerializer({...this.request,query:t.value})}" part="suggestions" class="ft-search-bar--suggestion" @keyup="${e=>this.onSuggestKeyUp(e,t.value)}" @click="${e=>this.onSuggestClick(e,t.value)}"><ft-ripple></ft-ripple>${this.getIcon(t)}<ft-typography variant="body1">${t.value}</ft-typography></a>`))} ${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?B`<ft-typography class="ft-search-bar--no-suggestions" element="p" variant="body2">${this.labelResolver.resolve("noSuggestions")}</ft-typography>`:null}</div>`}getIcon(t){const e="DOCUMENT"===t.type?$i.file_format:$i.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?xi.BOOK:xi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,r,o,a;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,c]=((null!==(i=_i.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(a=null!==(o=null!==(r=wi.get(c))&&void 0!==r?r:wi.get(e))&&void 0!==o?o:wi.get(n))&&void 0!==a?a:ki.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=xi.TOPICS}return B`<ft-icon variant="${e}" part="suggestion-icon">${i}</ft-icon>`}renderDesktopFacetsActions(){return B`<div class="ft-search-bar--facets-actions">${this.hasLocaleSelector?B`<ft-select class="ft-search-bar--content-locale" part="content-locale" label="${this.labelResolver.resolve("contentLocaleSelector")}" outlined @change="${t=>this.contentLocale=t.detail}">${$t(this.availableContentLocales,(t=>t.lang),(t=>B`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:null} ${this.searchFilters.length>0?B`<ft-button part="facets-actions" @click="${()=>this.searchFilters=[]}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}<slot name="facets-actions"></slot></div>`}renderDesktopFacets(){return this.hasFacets?B`<ft-snap-scroll horizontal limitSize controls hideScrollbar class="ft-search-bar--filters-container" part="filters-container">${$t(this.facets,(t=>t.key),(t=>{const e=ne(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return B`<ft-filter class="${i?"ft-search-bar--hierarchical-filter":""}" part="filters" id="${e.id}" label="${e.label}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter>`}))}</ft-snap-scroll>`:null}renderSelectedFacets(){return this.hasLocaleSelector||0!==this.searchFilters.length?B`<div class="ft-search-bar--selected-filters" part="selected-filters-container">${this.hasLocaleSelector&&(this.hasFacets||this.sizeCategory===Mt.S)?B`<ft-chip part="selected-filters">${this.getLocaleLabel(this.contentLocale)}</ft-chip>`:null} ${$t(this.searchFilters,(t=>t.key),(t=>$t(t.values,(e=>{let i=t.label+": "+function(t){return oe(t).split("|").join(" > ")}(e);return B`<ft-tooltip inline text="${i}"><ft-chip part="selected-filters" removable label="${i}" @icon-click="${()=>this.setFilter(t.key,t.label,t.values.filter((t=>t!==e)))}">${function(t){return oe(t).split("|").pop()}(e)}</ft-chip></ft-tooltip>`}))))}</div>`:null}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i;t.has("labels")&&(this.labelResolver=new Ft(Pi,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&this.sizeCategory!==Mt.S),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0&&(this.availableContentLocales.some((t=>t.lang===this.contentLocale))||(this.contentLocale=null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)),t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Vi(this.request))}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded&&(null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet))),this.scrollToFacet=void 0)}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){null!=this.api&&this.displayedFilters.length>0?(this.facetsLoaded=!1,this.abortUpdateFacetsController.abort(),this.updateFacetsDebouncer.run((async()=>{var t;const e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""},this.abortUpdateFacetsController.signal).then((t=>t.facets)).catch((()=>{})));null!=e&&(this.facets=e),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.focus(),this.dispatchEvent(new Ui(this.request))}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e,i){let r=this.searchFilters.filter((e=>e.key!==t));i.length&&r.push({key:t,label:e,negative:!1,values:i}),this.searchFilters=r,this.scrollToFacet=t}removeRecentSearch(t,e){var i,r,o,a;t.preventDefault(),t.stopPropagation();const n=null!==(a=null!==(r=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.input;null==n||n.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,r,o,a,n;switch(t.key){case"ArrowUp":null===(r=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(a=null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstSuggestion)||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}},t.FtSearchBar.elementDefinitions={"ft-accordion":Fi,"ft-accordion-item":Ei,"ft-button":Ke,"ft-chip":Ri,"ft-filter":yi,"ft-filter-option":bi,"ft-icon":Ci,"ft-ripple":De,"ft-select":Hi,"ft-select-option":Di,"ft-size-watcher":Ht,"ft-snap-scroll":ui,"ft-tooltip":Ue,"ft-typography":ie,"mwc-icon":Ne},Ni([ot({type:String})],t.FtSearchBar.prototype,"baseUrl",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"apiIntegrationIdentifier",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"contentLocale",void 0),Ni([at()],t.FtSearchBar.prototype,"availableContentLocales",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"uiLocale",void 0),Ni([Ct({})],t.FtSearchBar.prototype,"labels",void 0),Ni([Ct([])],t.FtSearchBar.prototype,"displayedFilters",void 0),Ni([ot()],t.FtSearchBar.prototype,"searchRequestSerializer",void 0),Ni([at()],t.FtSearchBar.prototype,"searchFilters",void 0),Ni([at()],t.FtSearchBar.prototype,"sizeCategory",void 0),Ni([at()],t.FtSearchBar.prototype,"displayFacets",void 0),Ni([at()],t.FtSearchBar.prototype,"mobileMenuOpen",void 0),Ni([at()],t.FtSearchBar.prototype,"facets",void 0),Ni([st(".ft-search-bar--container")],t.FtSearchBar.prototype,"container",void 0),Ni([st(".ft-search-bar--filters-opener")],t.FtSearchBar.prototype,"filtersOpener",void 0),Ni([st(".ft-search-bar--floating-panel")],t.FtSearchBar.prototype,"floatingContainer",void 0),Ni([st("ft-snap-scroll.ft-search-bar--filters-container")],t.FtSearchBar.prototype,"scrollingFiltersContainer",void 0),Ni([st(".ft-search-bar--input")],t.FtSearchBar.prototype,"input",void 0),Ni([at()],t.FtSearchBar.prototype,"query",void 0),Ni([at()],t.FtSearchBar.prototype,"suggestions",void 0),Ni([at()],t.FtSearchBar.prototype,"suggestionsLoaded",void 0),Ni([at()],t.FtSearchBar.prototype,"recentSearches",void 0),Ni([at()],t.FtSearchBar.prototype,"scrollToFacet",void 0),Ni([st(".ft-search-bar--suggestion:first-child")],t.FtSearchBar.prototype,"firstSuggestion",void 0),Ni([st(".ft-search-bar--suggestion:focus-within")],t.FtSearchBar.prototype,"focusedSuggestion",void 0),Ni([st(".ft-search-bar--suggestion:last-child")],t.FtSearchBar.prototype,"lastSuggestion",void 0),Ni([at()],t.FtSearchBar.prototype,"api",void 0),t.FtSearchBar=Ni([Ot("ft-search-bar")],t.FtSearchBar),t.DEFAULT_LABELS=Pi,t.LaunchSearchEvent=Ui,t.SearchStateChangeEvent=Vi,Object.defineProperty(t,"t",{value:!0})}({});
481
+ */;let li=class extends ci{};li.styles=[si],li=de([it("mwc-radio")],li);var di=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let hi=class extends Tt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}getStyles(){return[a`.ft-filter-level--container{display:flex;flex-direction:column}.ft-filter-level--container>*{padding:0 10px}.ft-filter-level--go-back{flex-shrink:0;text-decoration:none;position:relative;border-radius:var(--ft-border-radius-M,8px);overflow:hidden;display:flex;align-items:center;padding:4px 4px;gap:4px;cursor:pointer;color:var(--ft-color-on-surface,rgba(0,0,0,.87))}.ft-filter-level--go-back:focus{outline:0}.ft-filter-level--go-back mwc-icon{flex-shrink:0}.ft-filter-level--go-back ft-typography{display:block;flex-grow:1;flex-shrink:0}.ft-filter-level--option{display:flex;align-items:center;max-width:100%}.ft-filter-level--option ft-button{margin-right:-10px;flex-shrink:0}ft-button{--ft-color-primary:var(--ft-color-on-surface, rgba(0, 0, 0, 0.87))}mwc-formfield{flex-shrink:1;flex-grow:1;display:block;max-width:calc(100% + 10px);margin-left:-10px;word-break:break-word;--mdc-theme-secondary:var(--ft-color-primary, #2196F3);--mdc-radio-unchecked-color:var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60));--mdc-checkbox-unchecked-color:var(--ft-color-on-surface-medium, rgba(0, 0, 0, 0.60));--mdc-checkbox-ink-color:var(--ft-color-on-primary, #FFFFFF);--mdc-radio-disabled-color:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38));--mdc-checkbox-disabled-color:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38));--mdc-theme-on-surface:var(--ft-color-primary, #2196F3);--mdc-typography-body2-font-family:var(--ft-typography-font-family, var(--ft-content-font, 'Open Sans')),system-ui,sans-serif;--mdc-typography-body2-font-size:var(--ft-typography-font-size, 14px);--mdc-typography-body2-font-weight:var(--ft-typography-font-weight, normal);--mdc-typography-body2-letter-spacing:var(--ft-typography-letter-spacing, 0.252px);--mdc-typography-body2-line-height:var(--ft-typography-line-height, 20px);--mdc-typography-body2-text-transform:var(--ft-typography-text-transform, inherit)}.ft-filter--disabled{--mdc-theme-text-primary-on-background:var(--ft-color-on-surface-disabled, rgba(0, 0, 0, 0.38))}`]}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}getTemplate(){let t=this.options;this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return B`<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">${null==this.parent?null:B`<div tabindex="0" class="ft-filter-level--go-back" ?disabled="${this.disabled}" @keyup="${this.goBackOnKeyPress}" @click="${this.goBackOnClick}"><ft-ripple></ft-ripple><mwc-icon>chevron_left</mwc-icon><ft-typography variant="body2">${this.parent.label}</ft-typography></div>`} ${$t(e,(t=>t.value),(t=>{var e;return B`<div class="ft-filter-level--option" part="options">${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)} ${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?L:B`<ft-button icon="chevron_right" label="${t.label}" ?disabled="${this.disabled}" tooltipPosition="left" @click="${()=>this.displayLevel(t)}"></ft-button>`}</div>`}))} ${e.length<t.length?B`<ft-button class="ft-filter-level--display-more" icon="expand_more" dense trailingIcon @click="${this.displayMore}">${this.moreValuesButtonLabel}</ft-button>`:L}</div>`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return B`<mwc-formfield label="${t.label}"><mwc-checkbox reducedTouchTarget ?checked="${t.selected}" ?disabled="${this.disabled}" ?indeterminate="${re(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}" @change="${e=>this.toggleMultiValuedOption(e,t)}"></mwc-checkbox></mwc-formfield>`}toggleMultiValuedOption(t,e){var i;re(null!==(i=e.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).forEach((t=>t.selected=!1)),this.optionsChanged(t,e)}buildMonoValuedOption(t){return B`<mwc-formfield label="${t.label}"><mwc-radio reducedTouchTarget name="${this.id}" ?checked="${t.selected}" ?disabled="${this.disabled}" @click="${e=>this.toggleMonoValuedOption(e,t)}"></mwc-radio></mwc-formfield>`}toggleMonoValuedOption(t,e){this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),e.selected=!e.selected,this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};hi.elementDefinitions={"ft-button":Ke,"ft-ripple":De,"ft-typography":ie,"mwc-checkbox":Me,"mwc-formfield":ti,"mwc-icon":Ne,"mwc-radio":li},di([ot({type:String})],hi.prototype,"id",void 0),di([ot({type:Object})],hi.prototype,"parent",void 0),di([ot({type:Array})],hi.prototype,"options",void 0),di([ot({type:Boolean})],hi.prototype,"multivalued",void 0),di([ot({type:Boolean})],hi.prototype,"disabled",void 0),di([ot({type:Boolean})],hi.prototype,"hideSelectedOptions",void 0),di([ot({type:Boolean})],hi.prototype,"preventNavigation",void 0),di([ot({type:String})],hi.prototype,"filter",void 0),di([ot({type:String})],hi.prototype,"moreValuesButtonLabel",void 0),di([ot({type:Number})],hi.prototype,"displayedValuesLimit",void 0),di([st(".ft-filter-level--container")],hi.prototype,"container",void 0),di([at()],hi.prototype,"displayedPages",void 0),hi=di([Ot("ft-filter-level")],hi);var pi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class fi extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let ui=class extends Tt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new St(200),this.updateScrollDebouncer=new St(100)}getStyles(){return a`.ft-snap-scroll{box-sizing:border-box;position:relative;display:flex;--ft-snap-scroll-transparent-color:transparent}.ft-snap-scroll.ft-snap-scroll--safari-fix{--ft-snap-scroll-transparent-color:rgba(255, 255, 255, 0)}.ft-snap-scroll,.ft-snap-scroll--content{overflow:hidden}.ft-snap-scroll--limit-size,.ft-snap-scroll--limit-size .ft-snap-scroll--content{width:100%;height:100%}.ft-snap-scroll--content{flex-grow:1;flex-shrink:1;box-sizing:border-box;scroll-snap-align:start;display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:var(--ft-snap-scroll-gap,0)}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar{display:none}.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content{-ms-overflow-style:none;scrollbar-width:none}.ft-snap-scroll--content::slotted(*){flex-shrink:0;flex-grow:1;max-height:100%;max-width:100%}.ft-snap-scroll--horizontal,.ft-snap-scroll--horizontal .ft-snap-scroll--content{width:100%}.ft-snap-scroll--vertical,.ft-snap-scroll--vertical .ft-snap-scroll--content{height:100%}.ft-snap-scroll--horizontal .ft-snap-scroll--content{flex-direction:row;overflow-x:auto}.ft-snap-scroll--vertical .ft-snap-scroll--content{flex-direction:column;overflow-y:auto}.ft-snap-scroll--next,.ft-snap-scroll--previous{position:absolute;display:flex;z-index:var(--ft-snap-scroll-buttons-z-index,1);opacity:1;transition:background-color .5s ease-in-out,opacity .5s ease-in-out,z-index .5s ease-in-out;--ft-button-background-color:transparent;--ft-button-color:var(--ft-snap-scroll-buttons-color, var(--ft-color-primary, #2196F3))}.ft-snap-scroll--next[hidden],.ft-snap-scroll--previous[hidden]{z-index:-1;opacity:0}.ft-snap-scroll--horizontal .ft-snap-scroll--previous{top:0;left:-1px;bottom:0;background:linear-gradient(to right,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--previous{top:-1px;left:0;right:0;background:linear-gradient(to bottom,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next{top:0;right:-1px;bottom:0;background:linear-gradient(to left,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--vertical .ft-snap-scroll--next{left:0;right:0;bottom:-1px;background:linear-gradient(to top,var(--ft-color-surface,#fff) 50%,var(--ft-snap-scroll-transparent-color))}.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,.ft-snap-scroll--vertical .ft-snap-scroll--next:hover,.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover{background-color:var(--ft-color-surface,#fff)}`}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}getTemplate(){const t=zt({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Lt}),e=this.controls&&this.withScroll;return B`<div part="container" class="${t}"><ft-button class="ft-snap-scroll--previous" part="controls" primary icon="${this.horizontal?"arrow_back_ios_new":"expand_less"}" ?hidden="${!e||this.startReached}" ?disabled="${!e||this.startReached}" @click="${this.previous}"></ft-button><slot class="ft-snap-scroll--content" part="content" @slotchange="${this.onSlotChange}"></slot><ft-button class="ft-snap-scroll--next" part="controls" primary icon="${this.horizontal?"arrow_forward_ios":"expand_more"}" ?hidden="${!e||this.endReached}" ?disabled="${!e||this.endReached}" @click="${this.next}"></ft-button></div>`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new fi(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};ui.elementDefinitions={"ft-button":Ke},pi([ot({type:Boolean})],ui.prototype,"horizontal",void 0),pi([ot({type:Boolean})],ui.prototype,"hideScrollbar",void 0),pi([ot({type:Boolean})],ui.prototype,"controls",void 0),pi([ot({type:Boolean})],ui.prototype,"limitSize",void 0),pi([at()],ui.prototype,"elements",void 0),pi([at()],ui.prototype,"currentElement",void 0),pi([at()],ui.prototype,"withScroll",void 0),pi([at()],ui.prototype,"startReached",void 0),pi([at()],ui.prototype,"endReached",void 0),pi([st(".ft-snap-scroll--content")],ui.prototype,"contentSlot",void 0),ui=pi([Ot("ft-snap-scroll")],ui);var mi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let bi=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return B`<slot @slotchange="${this.updateSubOptionsFromSlot}"></slot>`}updateSubOptionsFromSlot(t){const e=t.composedPath()[0];this.subOptions=e.assignedElements().map((t=>t))}};bi.elementDefinitions={},mi([ot({type:String})],bi.prototype,"label",void 0),mi([ot({type:Object,converter:t=>t})],bi.prototype,"value",void 0),mi([ot({type:Boolean,reflect:!0})],bi.prototype,"selected",void 0),mi([ot({type:Object})],bi.prototype,"subOptions",void 0),bi=mi([Ot("ft-filter-option")],bi);var vi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class gi extends CustomEvent{constructor(t){super("change",{detail:t})}}let yi=class extends Tt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new St(300)}getStyles(){return[Yt,a`:host{display:flex;max-height:100%;max-width:100%}.ft-filter--container{flex-grow:1;display:flex;flex-direction:column;max-height:100%;max-width:100%;background:var(--ft-color-surface,#fff)}.ft-filter--header{display:flex;flex-wrap:wrap;gap:4px;flex-shrink:0;padding:0 10px;margin-bottom:8px;--ft-typography-font-size:14px}.ft-filter--header ft-button{flex-shrink:0;margin-left:auto;--ft-button-icon-size:18px}.ft-filter--label{display:block;flex-shrink:1;flex-grow:1;word-break:break-word;--ft-typography-line-height:22px;--ft-typography-font-weight:bold}.ft-filter--filter{flex-shrink:0;display:flex;margin:0;margin-bottom:8px;padding:0 10px;overflow:hidden;height:32px;transition:height 250ms ease-in-out,margin 250ms ease-in-out;transition-delay:.5s}.ft-filter--filter[hidden]{height:0;margin-bottom:0}input{display:block;width:100%;border-radius:4px;border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));padding:4px;outline-color:var(--ft-color-primary,#2196f3)}.ft-filter--values{flex-grow:1;flex-shrink:1;max-width:100%;overflow-x:hidden;overflow-y:auto}.ft-filter--separator{border-top:1px solid var(--ft-color-outline,rgba(0,0,0,.14));margin:4px 10px}.ft-filter--levels-container{position:relative;overflow:hidden}.ft-filter--levels{position:relative;overflow:hidden}ft-filter-level{width:100%}.ft-filter--level-left{height:0}slot{display:none}`]}get flatOptions(){return re(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}getTemplate(){var t,e;const i=this.flatOptions.some((t=>t.selected));let r=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e;return B`<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}" part="container">${this.label||i?B`<div class="ft-filter--header" part="header"><ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}</ft-typography>${i?B`<ft-button icon="close" dense @click="${this.clear}" part="clear-button">${this.clearButtonLabel}</ft-button>`:null}</div>`:null}<div class="ft-filter--filter" ?hidden="${!r}"><input type="search" part="input" class="ft-typography--caption" ?disabled="${!r}" placeholder="${this.filterPlaceHolder.replace("{0}",this.label)}" @keyup="${this.onFilterChange}"></div><div class="ft-filter--values">${this.renderLevels()}</div><slot @slotchange="${this.updateOptionsFromSlot}"></slot></div>`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=i<0?"ft-filter--level-center":"ft-filter--level-left";return B`${this.raiseSelectedOptions&&e.length>0?B`<ft-filter-level id="${this.id}" ?multivalued="${this.multivalued}" ?disabled="${this.disabled}" preventNavigation .options="${e}" @change="${this.onChange}" part="selected-values"></ft-filter-level><div class="ft-filter--separator"></div>`:null}<ft-snap-scroll horizontal hideScrollbar class="ft-filter--levels" @current-element-change="${t=>this.levelsScrollDebouncer.run((()=>{for(;t.detail.index<this.displayedLevels.length;)this.displayedLevels.pop();this.requestUpdate()}))}">${this.renderLevel(r,this.options)} ${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var r;const o=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(o,null!==(r=null==t?void 0:t.subOptions)&&void 0!==r?r:[],t)}))}</ft-snap-scroll>`}renderLevel(t,e,i){return B`<ft-filter-level class="${t}" id="${this.id}" filter="${this.filter}" moreValuesButtonLabel="${this.moreValuesButtonLabel}" ?multivalued="${this.multivalued}" ?disabled="${this.disabled||"ft-filter--level-center"!==t}" ?hideSelectedOptions="${this.raiseSelectedOptions}" .parent="${i}" .options="${e}" .displayedValuesLimit="${this.displayedValuesLimit}" @change="${this.onChange}" @go-back="${this.goBack}" @display-level="${this.onDisplayLevel}" part="values"></ft-filter-level>`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){if(t.stopPropagation(),!this.multivalued){const e=i=>{var r;i.value!==t.detail.value&&(i.selected=!1),null===(r=i.subOptions)||void 0===r||r.forEach(e)};this.options.forEach(e)}this.optionsChanged()}optionsChanged(){var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new gi(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}updateOptionsFromSlot(t){const e=t.composedPath()[0];this.options=e.assignedElements().map((t=>t))}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};var xi,ki;yi.elementDefinitions={"ft-button":Ke,"ft-filter-level":hi,"ft-snap-scroll":ui,"ft-typography":ie},vi([ot({type:String})],yi.prototype,"id",void 0),vi([ot({type:String})],yi.prototype,"label",void 0),vi([ot({type:String})],yi.prototype,"filterPlaceHolder",void 0),vi([ot({type:String})],yi.prototype,"clearButtonLabel",void 0),vi([ot({type:String})],yi.prototype,"moreValuesButtonLabel",void 0),vi([ot({type:Array})],yi.prototype,"options",void 0),vi([ot({type:Boolean})],yi.prototype,"multivalued",void 0),vi([ot({type:Boolean})],yi.prototype,"disabled",void 0),vi([ot({type:Boolean})],yi.prototype,"raiseSelectedOptions",void 0),vi([ot({type:Number})],yi.prototype,"displayedValuesLimit",void 0),vi([st(".ft-filter--container")],yi.prototype,"container",void 0),vi([st(".ft-filter--values")],yi.prototype,"valuesContainer",void 0),vi([st(".ft-filter--levels")],yi.prototype,"levelsContainer",void 0),vi([st(".ft-filter--levels ft-filter-level:last-child")],yi.prototype,"lastLevel",void 0),vi([function(t){return nt({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],yi.prototype,"levels",void 0),vi([at()],yi.prototype,"withScroll",void 0),vi([at()],yi.prototype,"filter",void 0),vi([at()],yi.prototype,"slideIn",void 0),vi([at()],yi.prototype,"slideOut",void 0),yi=vi([Ot("ft-filter")],yi),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;"}(xi||(xi={})),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;"}(ki||(ki={}));const wi=new Map([...["abw"].map((t=>[t,ki.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,ki.AUDIO])),...["avi"].map((t=>[t,ki.AVI])),...["chm","xhs"].map((t=>[t,ki.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,ki.CODE])),...["csv"].map((t=>[t,ki.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ki.DITA])),...["epub"].map((t=>[t,ki.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ki.EXCEL])),...["flac"].map((t=>[t,ki.FLAC])),...["gif"].map((t=>[t,ki.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ki.GZIP])),...["html","htm","xhtml"].map((t=>[t,ki.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,ki.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ki.JPEG])),...["json"].map((t=>[t,ki.JSON])),...["m4a","m4p"].map((t=>[t,ki.M4A])),...["mov","qt"].map((t=>[t,ki.MOV])),...["mp3"].map((t=>[t,ki.MP3])),...["mp4","m4v"].map((t=>[t,ki.MP4])),...["ogg","oga"].map((t=>[t,ki.OGG])),...["pdf","ps"].map((t=>[t,ki.PDF])),...["png"].map((t=>[t,ki.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ki.POWERPOINT])),...["rar"].map((t=>[t,ki.RAR])),...["stp"].map((t=>[t,ki.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ki.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,ki.VIDEO])),...["wav"].map((t=>[t,ki.WAV])),...["wma"].map((t=>[t,ki.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ki.WORD])),...["xml","xsl","rdf"].map((t=>[t,ki.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ki.YAML])),...["zip"].map((t=>[t,ki.ZIP]))]),_i=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"]]);var $i,zi=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format"}($i||($i={}));const Si=a`.ft-icon--fluid-topics{font-family:var(--ft-icon-fluid-topics-font-family, var(--ft-icon-font-family, "ft-icons")),ft-icons,fticons,sans-serif;font-size:var(--ft-icon-font-size,24px);line-height:1;font-weight:400;text-transform:none;font-style:normal;font-variant:normal;speak:none;text-shadow:1px 1px 1px rgba(0,0,0,.004);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}`,Oi=a`.ft-icon--file-format{font-family:var(--ft-icon-file-format-font-family, var(--ft-icon-font-family, "ft-mime")),ft-mime,sans-serif;font-size:var(--ft-icon-font-size,24px);line-height:1;font-weight:400;text-transform:none;font-style:normal;font-variant:normal;speak:none;text-shadow:1px 1px 1px rgba(0,0,0,.004);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}`;let Ci=class extends Tt{constructor(){super(...arguments),this.variant=$i.fluid_topics}getStyles(){return[Si,Oi,a`:host,i.ft-icon{display:inline-block;width:var(--ft-icon-font-size,24px);height:var(--ft-icon-font-size,24px);text-align:center}`]}getTemplate(){return Ut`<slot @slotchange="${()=>this.requestUpdate()}" hidden></slot><i class="ft-icon ${"ft-icon--"+this.variant}">${At(this.getIcon())}</i>`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;return this.variant===$i.file_format?null!==(t=ki[this.textContent.toUpperCase()])&&void 0!==t?t:this.textContent:null!==(e=xi[this.textContent.toUpperCase()])&&void 0!==e?e:this.textContent}};Ci.elementDefinitions={},zi([ot()],Ci.prototype,"variant",void 0),zi([st("slot")],Ci.prototype,"slottedContent",void 0),Ci=zi([Ot("ft-icon")],Ci);var Ti=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Ei=class extends Tt{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}getStyles(){return a`.ft-accordion-item{display:flex;flex-direction:column}.ft-accordion-item--toggle{flex-shrink:0;flex-grow:0;position:relative;display:flex;align-items:center;cursor:pointer;padding:var(--ft-accordion-toggle-vertical-spacing,12px) var(--ft-accordion-toggle-horizontal-spacing,16px);gap:calc(var(--ft-accordion-toggle-horizontal-spacing,16px)/ 2);outline:0}.ft-accordion-item--label{flex-grow:1;flex-shrink:1;display:block}.ft-accordion-item--content{box-sizing:border-box;flex-shrink:1;flex-grow:1;overflow:hidden;height:0}.ft-accordion-item--active .ft-accordion-item--content{height:initial;overflow:visible;padding:var(--ft-accordion-toggle-vertical-spacing,12px) var(--ft-accordion-toggle-horizontal-spacing,16px)}.ft-accordion-item--separator{border-bottom:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}`}getTemplate(){return B`<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}"><div class="ft-accordion-item--toggle" part="toggle" @click="${()=>this.active=!this.active}" @keydown="${this.onToggleKeyDown}" tabindex="0"><ft-ripple part="toggle-ripple"></ft-ripple>${this.icon?B`<mwc-icon>${this.icon}</mwc-icon>`:null} ${this.label?B`<ft-typography class="ft-accordion-item--label" variant="body1" part="label">${this.label}</ft-typography>`:B`<slot class="ft-accordion-item--label" name="toggle" part="label"></slot>`}<mwc-icon>${this.active?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-accordion-item--content" part="content" @focusin="${()=>this.active=!0}"><slot></slot></div><div class="ft-accordion-item--separator" part="separator"></div></div>`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}};Ei.elementDefinitions={"ft-ripple":De,"ft-typography":ie,"mwc-icon":Ne},Ti([ot({type:String})],Ei.prototype,"icon",void 0),Ti([ot({type:String})],Ei.prototype,"label",void 0),Ti([ot({type:Boolean,reflect:!0})],Ei.prototype,"active",void 0),Ei=Ti([Ot("ft-accordion-item")],Ei);var Ai=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Fi=class extends Tt{constructor(){super(...arguments),this.multi=!1}getStyles(){return a`.ft-accordion{box-sizing:border-box}`}getTemplate(){return B`<div class="ft-accordion"><slot @activated="${this.onChange}"></slot></div>`}onChange(t){t.stopPropagation(),this.multi||this.content.assignedElements().forEach((e=>e.active=e===t.target))}};Fi.elementDefinitions={},Ai([ot({type:Boolean})],Fi.prototype,"multi",void 0),Ai([st("slot")],Fi.prototype,"content",void 0),Fi=Ai([Ot("ft-accordion")],Fi);var ji=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};class Bi extends CustomEvent{constructor(){super("icon-click")}}let Ri=class extends Tt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return a`:host{display:inline-block;max-width:100%}.ft-chip{position:relative;display:flex;justify-content:center;align-items:center;width:100%;overflow:hidden;box-sizing:border-box;--ft-chip-internal-font-size:var(--ft-typography-font-size, 14px);--ft-chip-internal-line-height:var(--ft-typography-line-height, max(20px, calc(var(--ft-chip-internal-font-size) + 2px)));--mdc-icon-size:var(--ft-chip-icon-size, 18px);--ft-chip-internal-vertical-padding:var(--ft-chip-vertical-padding, 6px);--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, 6px);--ft-chip-internal-icon-padding:3px;--ft-chip-internal-content-height:max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));color:var(--ft-color-on-surface,rgba(0,0,0,.87));--ft-ripple-color:var(--ft-color-on-surface, rgba(0, 0, 0, 0.87));border-radius:calc(var(--ft-chip-internal-content-height)/ 2 + var(--ft-chip-internal-vertical-padding));padding:calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);background-color:var(--ft-color-surface,#fff);line-height:var(--ft-chip-internal-content-height)}.ft-chip--dense{--ft-chip-internal-icon-padding:3px;--ft-chip-internal-vertical-padding:var(--ft-chip-vertical-padding, 4px);--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, 4px);--ft-chip-internal-line-height:var(--ft-typography-line-height, max(16px, calc(var(--ft-chip-internal-font-size) + 2px)))}.ft-chip--no-content{--ft-chip-internal-horizontal-padding:var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding))}.ft-chip--disabled{cursor:default;pointer-events:none;filter:grayscale(1);opacity:var(--ft-color-opacity-disabled,.38)}.ft-chip--highlighted{border:none;padding:var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);background-color:var(--ft-color-primary,#2196f3);--ft-ripple-color:var(--ft-color-on-primary, #FFFFFF);color:var(--ft-color-on-primary,#fff)}.ft-chip--clickable{cursor:pointer;-webkit-mask-image:radial-gradient(white,#000)}.ft-chip:focus{outline:0}.ft-chip--icon-container{display:inline-flex;position:relative;overflow:hidden;border-radius:100%;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;justify-content:center;align-items:center;flex-shrink:0;padding:var(--ft-chip-internal-icon-padding);margin:calc((-1) * var(--ft-chip-internal-icon-padding))}.ft-chip--label{display:block;margin:0 var(--ft-chip-internal-horizontal-padding);--ft-typography-line-height:var(--ft-chip-internal-content-height)}.ft-chip--safari-fix .ft-chip--label{margin-right:0}.ft-chip:not(.ft-chip--multi-line) .ft-chip--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after{content:"\\0000a0";display:inline-block;width:0}.ft-chip--no-content .ft-chip--label{display:none}.ft-chip--no-content .ft-chip--label+.ft-chip--icon-container{width:var(--ft-chip-internal-content-height);height:var(--ft-chip-internal-content-height)}.ft-chip--icon-container:focus{outline:0}.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container{order:-1}`}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Lt};return B`<div class="${zt(t)}" aria-label="${this.getLabel()}" tabindex="${this.interactionsOnChip?0:-1}" @keyup="${this.onKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnChip}"></ft-ripple><ft-typography variant="body2" element="span" class="ft-chip--label"><slot @slotchange="${this.onSlotchange}"></slot></ft-typography>${this.internalIcon?this.renderIcon():null}</div>`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return B`<div class="ft-chip--icon-container ${this.interactionsOnIcon?"ft-chip--clickable":""}" tabindex="${this.interactionsOnIcon?0:-1}" @click="${this.onIconClick}" @keyup="${this.onIconKeyUp}"><ft-ripple ?disabled="${!this.interactionsOnIcon}"></ft-ripple><mwc-icon>${this.internalIcon}</mwc-icon></div>`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Bi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Bi))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}};Ri.elementDefinitions={"ft-ripple":De,"ft-typography":ie,"mwc-icon":Ne},ji([ot({type:Boolean})],Ri.prototype,"highlighted",void 0),ji([ot({type:Boolean})],Ri.prototype,"removable",void 0),ji([ot({type:Boolean})],Ri.prototype,"disabled",void 0),ji([ot({type:Boolean})],Ri.prototype,"clickable",void 0),ji([ot({type:Boolean})],Ri.prototype,"iconClickable",void 0),ji([ot({type:Boolean})],Ri.prototype,"dense",void 0),ji([ot({type:Boolean})],Ri.prototype,"multiLine",void 0),ji([ot({type:String})],Ri.prototype,"label",void 0),ji([ot({type:String})],Ri.prototype,"icon",void 0),ji([ot({type:Boolean})],Ri.prototype,"trailingIcon",void 0),ji([st("ft-typography slot")],Ri.prototype,"slottedContent",void 0),Ri=ji([Ot("ft-chip")],Ri);var Li=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Mi=class extends Tt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}getStyles(){return[Yt,a`.ft-input-label{position:absolute;inset:0;display:flex}.ft-input-label{border-color:var(--ft-input-label-border-color,var(--ft-color-outline,rgba(0,0,0,.14)))}.ft-input-label:after,.ft-input-label:before{content:"";display:flex;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit}.ft-input-label:before{width:var(--ft-input-label-horizontal-spacing,12px);flex-shrink:0}.ft-input-label:after{flex-grow:1;flex-shrink:1}.ft-input-label--text{display:flex;flex-shrink:1;position:relative;border-bottom-width:1px;border-bottom-style:solid;border-color:inherit;padding:0 4px;color:var(--ft-input-label-text-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)));transition:font-size 250ms,line-height 250ms,color 250ms;--ft-typography-font-size:var(--ft-input-label-font-size, 14px);--ft-typography-line-height:var(--ft-input-label-font-size, 14px)}.ft-input-label--disabled .ft-input-label--text{color:var(--ft-input-label-text-color,var(--ft-color-on-surface-disabled,rgba(0,0,0,.38)))}.ft-input-label--hidden-text{opacity:0}.ft-input-label--floating-text{position:absolute;top:calc(50% - var(--ft-typography-line-height)/ 2);transition:top 250ms;width:calc(100% - 8px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:var(--ft-input-label-vertical-spacing,4px) 0;margin:calc(var(--ft-input-label-vertical-spacing,4px) * -1) 0}.ft-input-label--raised .ft-input-label--text{--ft-typography-font-size:var(--ft-input-label-raised-font-size, 11px);--ft-typography-line-height:var(--ft-input-label-raised-font-size, 11px)}.ft-input-label--raised .ft-input-label--floating-text{top:var(--ft-input-label-vertical-spacing,4px)}.ft-input-label--outlined .ft-input-label--text,.ft-input-label--outlined:after,.ft-input-label--outlined:before{border-top-width:1px;border-top-style:solid}.ft-input-label--outlined:before{border-left-width:1px;border-left-style:solid;border-radius:var(--ft-border-radius-S,4px) 0 0 var(--ft-border-radius-S,4px)}.ft-input-label--outlined:after{border-right-width:1px;border-right-style:solid;border-radius:0 var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text{top:calc(var(--ft-typography-line-height)/ -2)}.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text{border-top:none}`]}getTemplate(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return B`<div class="${zt(t)}">${this.text?B`<div class="ft-input-label--text ft-typography--caption"><span class="ft-input-label--floating-text">${this.text}</span> <span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span></div>`:null}</div>`}};Mi.elementDefinitions={},Li([ot({type:String})],Mi.prototype,"text",void 0),Li([ot({type:Boolean})],Mi.prototype,"raised",void 0),Li([ot({type:Boolean})],Mi.prototype,"outlined",void 0),Li([ot({type:Boolean})],Mi.prototype,"disabled",void 0),Mi=Li([Ot("ft-input-label")],Mi);var Ii=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};let Di=class extends Tt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}getTemplate(){return B``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Di.elementDefinitions={},Ii([ot({type:String})],Di.prototype,"label",void 0),Ii([ot({type:Object,converter:t=>t})],Di.prototype,"value",void 0),Ii([ot({type:Boolean,reflect:!0})],Di.prototype,"selected",void 0),Di=Ii([Ot("ft-select-option")],Di);let Hi=class extends Tt{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=()=>this.optionsDisplayed=!1}getStyles(){return[Zt,Yt,a`:focus{outline:0}.ft-select{display:flex;flex-direction:column;align-items:stretch}.ft-select--main-panel{position:relative;display:flex;height:calc(4 * var(--ft-select-vertical-spacing,4px) + var(--ft-select-label-size,11px) + var(--ft-select-selected-option-size,14px))}.ft-select--input-panel{flex-grow:1;position:relative;display:flex;align-items:center;overflow:hidden;padding-left:16px;padding-right:8px;gap:8px}.ft-select--input-panel,.ft-select--option{color:var(--ft-color-on-surface,rgba(0,0,0,.87));--ft-opacity-color-content-on-surface-hover:0.08;--ft-opacity-color-content-on-surface-dragged:0.04}.ft-select--disabled .ft-select--input-panel,.ft-select--disabled .ft-select--option{color:var(--ft-color-on-surface-disabled,rgba(0,0,0,.38))}.ft-select:not(.ft-select--disabled) .ft-select--input-panel{cursor:pointer}ft-input-label{--ft-input-label-font-size:var(--ft-select-selected-option-size, 14px);--ft-input-label-raised-font-size:var(--ft-select-label-size, 11px);--ft-input-label-vertical-spacing:var(--ft-select-vertical-spacing, 4px)}.ft-select:not(.ft-select--disabled):focus-within ft-input-label{--ft-input-label-border-color:var(--ft-color-primary, #2196F3);--ft-input-label-text-color:var(--ft-color-primary, #2196F3)}.ft-select--selected-option{display:block;flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--ft-typography-font-size:var(--ft-select-selected-option-size, 14px);--ft-typography-line-height:var(--ft-select-selected-option-size, 14px)}mwc-icon{flex-shrink:0}slot{display:none}.ft-select--filled .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px) var(--ft-border-radius-S,4px) 0 0}.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option{align-self:stretch;padding-top:calc(var(--ft-select-label-size,11px) + 2 * var(--ft-select-vertical-spacing,4px))}.ft-select--outlined .ft-select--input-panel{border-radius:var(--ft-border-radius-S,4px)}.ft-select--options{display:none;position:absolute;top:100%;left:0;right:0;background:var(--ft-color-surface,#fff);z-index:var(--ft-select-options-z-index,1);box-shadow:var(--ft-elevation-02,0 4px 10px 0 rgba(0,0,0,.06),0 2px 5px 0 rgba(0,0,0,.14),0 0 1px 0 rgba(0,0,0,.06))}.ft-select--options-displayed .ft-select--options{display:block}.ft-select--option{position:relative;padding:4px 16px;min-height:32px;display:flex;align-items:center}.ft-select--helper-text{padding:0 12px 0 16px;color:var(--ft-select-helper-color,var(--ft-color-on-surface-medium,rgba(0,0,0,.6)))}`]}getTemplate(){var t,e,i,r,o;let a=!this.disabled&&this.optionsDisplayed&&this.hasOptions,n=this.disabled||!this.hasOptions;const c={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":n,"ft-select--options-displayed":a,"ft-select--has-value":null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value),"ft-select--no-label":!this.label};return B`<div class="${zt(c)}" @click="${t=>t.stopPropagation()}" part="container"><div class="ft-select--main-panel" part="main-panel"><ft-input-label text="${this.label}" part="label" ?disabled="${n}" ?outlined="${this.outlined}" ?raised="${null!=(null===(e=this.selectedOption)||void 0===e?void 0:e.value)||a}"></ft-input-label><div class="ft-select--input-panel" part="selected-value" tabindex="${n?"-1":"0"}" @click="${()=>this.optionsDisplayed=!this.optionsDisplayed}" @keydown="${this.onMainPanelKeyDown}" aria-label="${this.label}" aria-haspopup="listbox" aria-expanded="${a}">${this.outlined?null:B`<ft-ripple ?disabled="${n}" activated></ft-ripple>`}<ft-typography variant="body1" class="ft-select--selected-option">${null!=(null===(i=this.selectedOption)||void 0===i?void 0:i.value)&&null!==(o=null===(r=this.selectedOption)||void 0===r?void 0:r.label)&&void 0!==o?o:""}</ft-typography><mwc-icon>${a?"expand_less":"expand_more"}</mwc-icon></div><div class="ft-select--options" part="options" @keydown="${this.onOptionsKeyDown}" innerrole="listbox">${$t(this.options,(t=>t.value),(t=>this.renderOption(t)))}</div></div>${this.helper?B`<ft-typography class="ft-select--helper-text" variant="caption">${this.helper}</ft-typography>`:void 0}</div><slot @slotchange="${this.updateOptionsFromSlot}" @option-change="${this.updateOptionsFromSlot}"></slot>`}renderOption(t){let e=this.selectedOption===t;return B`<div class="${zt({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}" part="option" tabindex="0" @keydown="${e=>this.onOptionKeyDown(e,t)}" @click="${()=>this.selectOption(t)}"><ft-ripple ?primary="${e}" ?activated="${e}"></ft-ripple>${t.label}</div>`}updated(t){var e;super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1,this.dispatchEvent(new CustomEvent("change",{detail:null===(e=this.selectedOption)||void 0===e?void 0:e.value})))}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,r,o,a;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(r=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(a=null===(o=this.focusedOption)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){this.selectedOption=t;for(let e of this.options)e.selected=e===t}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};Hi.elementDefinitions={"ft-input-label":Mi,"ft-typography":ie,"ft-ripple":De,"mwc-icon":Ne},Ii([ot({type:String})],Hi.prototype,"label",void 0),Ii([ot({type:String})],Hi.prototype,"helper",void 0),Ii([ot({type:Boolean})],Hi.prototype,"outlined",void 0),Ii([ot({type:Boolean})],Hi.prototype,"disabled",void 0),Ii([ot({type:Array})],Hi.prototype,"options",void 0),Ii([at()],Hi.prototype,"selectedOption",void 0),Ii([at()],Hi.prototype,"optionsDisplayed",void 0),Ii([at()],Hi.prototype,"focusOptions",void 0),Ii([st(".ft-select--input-panel")],Hi.prototype,"mainPanel",void 0),Ii([st(".ft-select--option:first-child")],Hi.prototype,"firstOption",void 0),Ii([st(".ft-select--option:focus")],Hi.prototype,"focusedOption",void 0),Ii([st(".ft-select--option.ft-select--option-selected")],Hi.prototype,"selectedOptionElement",void 0),Ii([st(".ft-select--option:last-child")],Hi.prototype,"lastOption",void 0),Ii([st("slot")],Hi.prototype,"optionsSlot",void 0),Hi=Ii([Ot("ft-select")],Hi);var Ni=function(t,e,i,r){for(var o,a=arguments.length,n=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,c=t.length-1;c>=0;c--)(o=t[c])&&(n=(a<3?o(n):a>3?o(e,i,n):o(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};null==window.fluidtopics&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");const Pi={filtersButton:"Filters",oneFilterEnabled:"1 filter enabled",nFiltersEnabled:"{0} filter(s) enabled",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",searchButton:"Search",noSuggestions:"No results found…",clearFilters:"Clear filters",contentLocaleSelector:"Lang",removeRecentSearch:"Remove",back:"Back"};class Ui extends CustomEvent{constructor(t){super("launch-search",{detail:t})}}class Vi extends CustomEvent{constructor(t){super("change",{detail:t})}}t.FtSearchBar=class extends Tt{constructor(){super(...arguments),this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.labels={},this.labelResolver=new Ft(Pi,{}),this.displayedFilters=[],this.searchRequestSerializer=t=>function(t,e){var i;const r=new URLSearchParams({"content-lang":null!==(i=e.contentLocale)&&void 0!==i?i:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t}/search/all?${r.toString()}`).href}(this.baseUrl,t),this.searchFilters=[],this.sizeCategory=Mt.S,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.query="",this.suggestions=[],this.suggestionsLoaded=!0,this.recentSearches=[],this.updateFacetsDebouncer=new St(500),this.suggestDebouncer=new St(300),this.facetsLoaded=!1,this.closeFloatingContainer=t=>{this.sizeCategory!==Mt.S&&(this.displayFacets=this.displayFacets&&t.composedPath().some((t=>t===this.floatingContainer)))}}getStyles(){return[Zt,a`*{box-sizing:border-box}.ft-search-bar--container{display:flex;flex-direction:column;gap:8px;background:var(--ft-color-surface,#fff);outline:0;--ft-search-bar-border-radius--internal:var(--ft-search-bar-border-radius, var(--ft-border-radius-S, 4px))}.ft-search-bar--mobile-menu-open{position:var(--ft-search-bar-mobile-open-position,fixed);top:var(--ft-search-bar-mobile-open-top,0);bottom:var(--ft-search-bar-mobile-open-bottom,0);left:var(--ft-search-bar-mobile-open-left,0);right:var(--ft-search-bar-mobile-open-right,0);z-index:var(--ft-search-bar-floating-components-z-index,1);padding:16px}.ft-search-bar{flex-shrink:0;position:relative;display:flex;flex-direction:row;align-items:center;height:var(--ft-search-bar-height,38px);background:var(--ft-color-surface,#fff);border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));border-radius:var(--ft-search-bar-border-radius--internal)}.ft-search-bar--floating-panel-open .ft-search-bar{border-radius:var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal) 0 0}.ft-search-bar--input-container{flex-grow:1;flex-shrink:1;align-self:stretch;position:relative}.ft-search-bar--input{border:none;background-color:transparent;padding:0 8px;height:100%;width:100%}.ft-search-bar--input:focus-within{outline-color:var(--ft-color-primary,#2196f3)}.ft-search-bar--mobile .ft-search-bar--suggestions{flex-grow:1;flex-shrink:1;overflow-y:auto;height:0}.ft-search-bar--mobile-open .ft-search-bar--suggestions{height:initial}.ft-search-bar--desktop .ft-search-bar--suggestions,.ft-search-bar--floating-panel{position:absolute;z-index:var(--ft-search-bar-floating-components-z-index,1);top:100%;left:-1px;right:-1px;display:none;background:var(--ft-color-surface,#fff);border:1px solid var(--ft-color-outline,rgba(0,0,0,.14));border-radius:0 0 var(--ft-search-bar-border-radius--internal) var(--ft-search-bar-border-radius--internal);box-shadow:var(--ft-elevation-02,0 4px 10px 0 rgba(0,0,0,.06),0 2px 5px 0 rgba(0,0,0,.14),0 0 1px 0 rgba(0,0,0,.06));outline:0}.ft-search-bar--desktop .ft-search-bar--suggestions{top:calc(100% + 1px)}.ft-search-bar--input-container:focus-within .ft-search-bar--suggestions-not-empty{display:block}.ft-search-bar--no-suggestions{text-align:center;padding:8px;color:var(--ft-color-on-surface,rgba(0,0,0,.87))}.ft-search-bar--suggestion{text-decoration:none;position:relative;display:flex;align-items:center;padding:8px;gap:8px;cursor:pointer;color:var(--ft-color-on-surface,rgba(0,0,0,.87));min-height:52px}.ft-search-bar--desktop .ft-search-bar--suggestion{min-height:44px}.ft-search-bar--suggestion:focus{outline:0}.ft-search-bar--mobile .ft-search-bar--suggestion:first-child,.ft-search-bar--recent-search+.ft-search-bar--suggestion:not(.ft-search-bar--recent-search){border-top:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--suggestion ft-typography{display:block;flex-grow:1;flex-shrink:1}.ft-search-bar>ft-button{flex-shrink:0}.ft-search-bar--left-action{--ft-border-radius-L:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px);border-right:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--floating-panel-open .ft-search-bar--left-action{--ft-border-radius-L:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 0}.ft-search-bar--clear-query,.ft-search-bar--launch-search{margin:0 4px}.ft-search-bar--separator{height:20px;border-right:1px solid var(--ft-color-outline,rgba(0,0,0,.14))}.ft-search-bar--floating-panel{padding:16px}.ft-search-bar--floating-panel-open .ft-search-bar--floating-panel{display:block}.ft-search-bar--desktop .ft-search-bar--facets-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 10px;margin-bottom:16px}.ft-search-bar--mobile .ft-search-bar--facets-actions{flex-shrink:0;flex-grow:0;display:flex;gap:16px;justify-content:space-evenly}.ft-search-bar--mobile .ft-search-bar--facets-actions>*{flex-grow:1;flex-basis:0}.ft-search-bar>.ft-search-bar--content-locale,.ft-search-bar>.ft-search-bar--content-locale::part(container),.ft-search-bar>.ft-search-bar--content-locale::part(main-panel){height:100%}.ft-search-bar>.ft-search-bar--content-locale::part(options){top:calc(100% + 1px);right:unset;width:max-content;min-width:100%}.ft-search-bar>.ft-search-bar--content-locale::part(selected-value){--ft-color-on-surface:var(--ft-button-color, var(--ft-color-primary, #2196F3));--ft-ripple-color:var(--ft-button-color, var(--ft-color-primary, #2196F3));border-radius:calc(var(--ft-search-bar-border-radius--internal) - 1px) 0 0 calc(var(--ft-search-bar-border-radius--internal) - 1px)}.ft-search-bar>.ft-search-bar--content-locale::part(label){--ft-input-label-border-color:transparent;--ft-ripple-color:var(--ft-button-color, var(--ft-color-primary, #2196F3))}.ft-search-bar--floating-panel .ft-search-bar--content-locale{margin-right:auto;min-width:250px;--ft-select-options-z-index:2}.ft-search-bar--mobile .ft-search-bar--content-locale::part(clear-button){display:none}.ft-search-bar--floating-panel .ft-search-bar--filters-container{display:block;height:400px;--ft-snap-scroll-gap:16px}.ft-search-bar--floating-panel ft-filter{display:flex;flex-grow:0;max-height:100%;max-width:250px}.ft-search-bar--hierarchical-filter{width:250px}.ft-search-bar--mobile .ft-search-bar--filters-container{flex-grow:1;flex-shrink:1;overflow-y:auto;margin:0 -16px;padding:0 16px}.ft-search-bar--mobile .ft-search-bar--filters-container ft-filter{display:flex;max-height:60vh}.ft-search-bar--mobile ft-filter::part(container){flex-grow:1}.ft-search-bar--filter-label{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.ft-search-bar--filter-label>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ft-search-bar--filter-label>:first-child{flex-shrink:0}.ft-search-bar--filter-label>:last-child{flex-shrink:1;color:var(--ft-color-on-surface-medium,rgba(0,0,0,.6))}ft-accordion-item::part(toggle){margin-left:-16px;margin-right:-16px}ft-accordion-item::part(label){overflow:hidden}ft-accordion-item::part(content){padding-left:0;padding-right:0}.ft-search-bar--selected-filters{flex-shrink:0;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}.ft-search-bar--selected-filters *{max-width:100%}`]}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.displayedFilters.map((t=>({id:t}))),filters:this.searchFilters,paging:{perPage:0,page:1},sort:[]}}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,filters:this.searchFilters,sort:[]}}get hasFacets(){return this.facets.length>0}get hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var t;null===(t=this.container)||void 0===t||t.focus()}clear(){this.query="",this.searchFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}getTemplate(){const t={"ft-search-bar--container":!0,"ft-search-bar--mobile":this.sizeCategory===Mt.S,"ft-search-bar--desktop":this.sizeCategory!==Mt.S,"ft-search-bar--floating-panel-open":this.sizeCategory!==Mt.S&&this.displayFacets,"ft-search-bar--mobile-menu-open":this.mobileMenuOpen};return B`<ft-size-watcher @change="${this.updateSize}"></ft-size-watcher><div class="${zt(t)}" part="container" tabindex="-1">${this.sizeCategory===Mt.S?this.renderMobileSearchBar():this.renderDesktopSearchBar()}</div>`}renderDesktopSearchBar(){return B`<div class="ft-search-bar" part="search-bar">${this.renderSearchBarLeftAction()}<div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keydown="${this.onSearchBarKeyDown}" @keyup="${this.onSearchBarKeyUp}"> ${this.renderSuggestions()}</div>${this.renderDesktopSearchBarButtons()}<div class="ft-search-bar--floating-panel" @keyup="${this.onFloatingContainerKeyUp}" tabindex="-1">${this.renderDesktopFacetsActions()} ${this.renderDesktopFacets()}</div></div>${this.renderSelectedFacets()}`}renderSearchBarLeftAction(){return this.hasFacets?B`<ft-button class="ft-search-bar--filters-opener ft-search-bar--left-action" part="filters-opener" trailingIcon icon="${this.displayFacets?"expand_less":"expand_more"}" @click="${t=>{t.stopPropagation(),this.displayFacets=!this.displayFacets}}" @focusin="${t=>t.stopPropagation()}">${this.labelResolver.resolve("filtersButton")}</ft-button>`:this.hasLocaleSelector?B`<ft-select class="ft-search-bar--content-locale ft-search-bar--left-action" part="content-locale" @change="${t=>this.contentLocale=t.detail}">${$t(this.availableContentLocales,(t=>t.lang),(t=>B`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:L}renderDesktopSearchBarButtons(){return B`${this.query?B`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round dense label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>this.setQuery("")}"></ft-button><div class="ft-search-bar--separator"></div>`:null}<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round dense label="${this.labelResolver.resolve("searchButton")}" @click="${this.launchSearch}"></ft-button>`}renderMobileSearchBar(){return B`<div class="ft-search-bar"><div class="ft-search-bar--input-container" part="input-container"><input class="ft-search-bar--input ft-typography--body2" part="input" type="text" placeholder="${this.labelResolver.resolve("inputPlaceHolder")}" value="${this.query}" @keyup="${this.onSearchBarKeyUp}" @focus="${()=>{this.mobileMenuOpen=!0,this.displayFacets=!1}}"></div>${this.renderMobileSearchBarButtons()}</div>${this.mobileMenuOpen?this.renderMobileFacetsActions():this.renderSelectedFacets()} ${this.displayFacets?this.renderMobileFacets():this.renderSuggestions()}`}renderMobileSearchBarButtons(){return this.query||this.mobileMenuOpen?B`<ft-button class="ft-search-bar--clear-query" part="search-bar-actions" icon="close" round label="${this.labelResolver.resolve("clearInputButton")}" @click="${()=>{this.setQuery(""),this.mobileMenuOpen=!1,this.displayFacets=!1}}"></ft-button>`:B`<ft-button class="ft-search-bar--launch-search" part="search-bar-actions" icon="search" round label="${this.labelResolver.resolve("searchButton")}" @click="${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}"></ft-button>`}renderMobileFacetsActions(){if(!this.hasLocaleSelector&&0===this.displayedFilters.length)return null;if(this.displayFacets)return B`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" icon="arrow_back" label="${this.labelResolver.resolve("back")}" @click="${()=>this.displayFacets=!1}">${this.labelResolver.resolve("back")}</ft-button>${this.searchFilters.length>0?B`<ft-button part="facets-actions" @click="${this.clearFilters}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}</div>`;let t=this.searchFilters.length>0?this.searchFilters.length>1?this.labelResolver.resolve("nFiltersEnabled",this.searchFilters.length):this.labelResolver.resolve("oneFilterEnabled"):this.labelResolver.resolve("filtersButton");return B`<div class="ft-search-bar--facets-actions"><ft-button part="facets-actions" @click="${()=>this.displayFacets=!0}">${t}</ft-button></div>`}renderMobileFacets(){var t;const e=this.availableContentLocales.filter((t=>t.lang===this.contentLocale)).pop(),i=this.availableContentLocales.map((t=>({value:t.lang,label:t.label,selected:t.lang==this.contentLocale,options:[]})));return B`<ft-accordion class="ft-search-bar--filters-container">${this.hasLocaleSelector?B`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${this.labelResolver.resolve("contentLocaleSelector")}</ft-typography><ft-typography variant="body2">${null!==(t=null==e?void 0:e.label)&&void 0!==t?t:""}</ft-typography></div><ft-filter part="filters" class="ft-search-bar--content-locale" id="content-locale" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",this.labelResolver.resolve("contentLocaleSelector"))}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" raiseSelectedOptions .options="${i}" @change="${t=>this.contentLocale=t.detail[0]}"></ft-filter></ft-accordion-item>`:null} ${$t(this.facets,(t=>t.key),(t=>{const e=ne(t);return B`<ft-accordion-item><div class="ft-search-bar--filter-label" slot="toggle"><ft-typography variant="button">${t.label}</ft-typography><ft-typography variant="body2">${function(t){return re(t.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).filter((t=>t.selected)).map((t=>t.label))}(e).join(", ")}</ft-typography></div><ft-filter part="filters" id="${e.id}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter></ft-accordion-item>`}))}</ft-accordion>`}renderSuggestions(){const t=this.recentSearches.filter((t=>t.toLowerCase().includes(this.query.toLowerCase()))),e=this.query.length>2||t.length>0;return B`<div class="ft-search-bar--suggestions ${e?"ft-search-bar--suggestions-not-empty":""}" @keydown="${this.onSuggestKeyDown}">${$t(t.slice(0,5),(t=>t),(t=>B`<a href="${this.searchRequestSerializer({...this.request,query:t})}" part="suggestions" class="ft-search-bar--suggestion ft-search-bar--recent-search" @keyup="${e=>this.onSuggestKeyUp(e,t)}" @click="${e=>this.onSuggestClick(e,t)}"><ft-ripple></ft-ripple><mwc-icon part="suggestion-icon">history</mwc-icon><ft-typography variant="body1">${t}</ft-typography><ft-button icon="close" round part="remove-suggestion" ?dense="${this.sizeCategory!==Mt.S}" label="${this.labelResolver.resolve("removeRecentSearch")}" @click="${e=>this.removeRecentSearch(e,t)}"></ft-button></a>`))} ${$t(this.suggestions,(t=>t.value),(t=>B`<a href="${this.searchRequestSerializer({...this.request,query:t.value})}" part="suggestions" class="ft-search-bar--suggestion" @keyup="${e=>this.onSuggestKeyUp(e,t.value)}" @click="${e=>this.onSuggestClick(e,t.value)}"><ft-ripple></ft-ripple>${this.getIcon(t)}<ft-typography variant="body1">${t.value}</ft-typography></a>`))} ${0===t.length&&0===this.suggestions.length&&this.query.length>2&&this.suggestionsLoaded?B`<ft-typography class="ft-search-bar--no-suggestions" element="p" variant="body2">${this.labelResolver.resolve("noSuggestions")}</ft-typography>`:null}</div>`}getIcon(t){const e="DOCUMENT"===t.type?$i.file_format:$i.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?xi.BOOK:xi.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,r,o,a;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[n,c]=((null!==(i=_i.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(a=null!==(o=null!==(r=wi.get(c))&&void 0!==r?r:wi.get(e))&&void 0!==o?o:wi.get(n))&&void 0!==a?a:ki.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=xi.TOPICS}return B`<ft-icon variant="${e}" part="suggestion-icon">${i}</ft-icon>`}renderDesktopFacetsActions(){return B`<div class="ft-search-bar--facets-actions">${this.hasLocaleSelector?B`<ft-select class="ft-search-bar--content-locale" part="content-locale" label="${this.labelResolver.resolve("contentLocaleSelector")}" outlined @change="${t=>this.contentLocale=t.detail}">${$t(this.availableContentLocales,(t=>t.lang),(t=>B`<ft-select-option value="${t.lang}" label="${t.label}" ?selected="${t.lang===this.contentLocale}"></ft-select-option>`))}</ft-select>`:null} ${this.searchFilters.length>0?B`<ft-button part="facets-actions" @click="${this.clearFilters}">${this.labelResolver.resolve("clearFilters")}</ft-button>`:null}<slot name="facets-actions"></slot></div>`}renderDesktopFacets(){return this.hasFacets?B`<ft-snap-scroll horizontal limitSize controls class="ft-search-bar--filters-container" part="filters-container">${$t(this.facets,(t=>t.key),(t=>{const e=ne(t),i=e.options.some((t=>{var e,i;return(null!==(i=null===(e=t.subOptions)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0}));return B`<ft-filter class="${i?"ft-search-bar--hierarchical-filter":""}" part="filters" id="${e.id}" label="${e.label}" filterPlaceHolder="${this.labelResolver.resolve("filterInputPlaceHolder",e.label)}" clearButtonLabel="${this.labelResolver.resolve("clearFilterButton")}" moreValuesButtonLabel="${this.labelResolver.resolve("displayMoreFilterValuesButton")}" ?multivalued="${e.multivalued}" raiseSelectedOptions .options="${e.options}" .displayedValuesLimit="${10}" @change="${t=>this.setFilter(e.id,e.label,t.detail)}"></ft-filter>`}))}</ft-snap-scroll>`:null}renderSelectedFacets(){return this.hasLocaleSelector||0!==this.searchFilters.length?B`<div class="ft-search-bar--selected-filters" part="selected-filters-container">${this.hasLocaleSelector&&(this.hasFacets||this.sizeCategory===Mt.S)?B`<ft-chip part="selected-filters">${this.getLocaleLabel(this.contentLocale)}</ft-chip>`:null} ${$t(this.searchFilters,(t=>t.key),(t=>$t(t.values,(e=>{let i=t.label+": "+function(t){return oe(t).split("|").join(" > ")}(e);return B`<ft-tooltip inline text="${i}"><ft-chip part="selected-filters" removable label="${i}" @icon-click="${()=>this.setFilter(t.key,t.label,t.values.filter((t=>t!==e)))}">${function(t){return oe(t).split("|").pop()}(e)}</ft-chip></ft-tooltip>`}))))}</div>`:null}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i;t.has("labels")&&(this.labelResolver=new Ft(Pi,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&this.sizeCategory!==Mt.S),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0&&(this.availableContentLocales.some((t=>t.lang===this.contentLocale))||(this.contentLocale=null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)),t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new Vi(this.request))}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded&&(null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet))),this.scrollToFacet=void 0)}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){this.displayedFilters.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.focus(),this.dispatchEvent(new Ui(this.request))}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e,i){let r=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((e=>{e.key===t&&re(e.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=i.includes(t.value)))})),i.length&&r.push({key:t,label:e,negative:!1,values:i}),this.searchFilters=r,this.scrollToFacet=t}clearFilters(){this.facets.forEach((t=>re(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,r,o,a;t.preventDefault(),t.stopPropagation();const n=null!==(a=null!==(r=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==r?r:null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.input;null==n||n.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,r,o,a,n;switch(t.key){case"ArrowUp":null===(r=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===r||r.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(n=null!==(a=null===(o=this.focusedSuggestion)||void 0===o?void 0:o.nextElementSibling)&&void 0!==a?a:this.firstSuggestion)||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation()}}},t.FtSearchBar.elementDefinitions={"ft-accordion":Fi,"ft-accordion-item":Ei,"ft-button":Ke,"ft-chip":Ri,"ft-filter":yi,"ft-filter-option":bi,"ft-icon":Ci,"ft-ripple":De,"ft-select":Hi,"ft-select-option":Di,"ft-size-watcher":Ht,"ft-snap-scroll":ui,"ft-tooltip":Ue,"ft-typography":ie,"mwc-icon":Ne},Ni([ot({type:String})],t.FtSearchBar.prototype,"baseUrl",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"apiIntegrationIdentifier",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"contentLocale",void 0),Ni([at()],t.FtSearchBar.prototype,"availableContentLocales",void 0),Ni([ot({type:String})],t.FtSearchBar.prototype,"uiLocale",void 0),Ni([Ct({})],t.FtSearchBar.prototype,"labels",void 0),Ni([Ct([])],t.FtSearchBar.prototype,"displayedFilters",void 0),Ni([ot()],t.FtSearchBar.prototype,"searchRequestSerializer",void 0),Ni([at()],t.FtSearchBar.prototype,"searchFilters",void 0),Ni([at()],t.FtSearchBar.prototype,"sizeCategory",void 0),Ni([at()],t.FtSearchBar.prototype,"displayFacets",void 0),Ni([at()],t.FtSearchBar.prototype,"mobileMenuOpen",void 0),Ni([at()],t.FtSearchBar.prototype,"facets",void 0),Ni([st(".ft-search-bar--container")],t.FtSearchBar.prototype,"container",void 0),Ni([st(".ft-search-bar--filters-opener")],t.FtSearchBar.prototype,"filtersOpener",void 0),Ni([st(".ft-search-bar--floating-panel")],t.FtSearchBar.prototype,"floatingContainer",void 0),Ni([st("ft-snap-scroll.ft-search-bar--filters-container")],t.FtSearchBar.prototype,"scrollingFiltersContainer",void 0),Ni([st(".ft-search-bar--input")],t.FtSearchBar.prototype,"input",void 0),Ni([at()],t.FtSearchBar.prototype,"query",void 0),Ni([at()],t.FtSearchBar.prototype,"suggestions",void 0),Ni([at()],t.FtSearchBar.prototype,"suggestionsLoaded",void 0),Ni([at()],t.FtSearchBar.prototype,"recentSearches",void 0),Ni([at()],t.FtSearchBar.prototype,"scrollToFacet",void 0),Ni([st(".ft-search-bar--suggestion:first-child")],t.FtSearchBar.prototype,"firstSuggestion",void 0),Ni([st(".ft-search-bar--suggestion:focus-within")],t.FtSearchBar.prototype,"focusedSuggestion",void 0),Ni([st(".ft-search-bar--suggestion:last-child")],t.FtSearchBar.prototype,"lastSuggestion",void 0),Ni([at()],t.FtSearchBar.prototype,"api",void 0),t.FtSearchBar=Ni([Ot("ft-search-bar")],t.FtSearchBar),t.DEFAULT_LABELS=Pi,t.LaunchSearchEvent=Ui,t.SearchStateChangeEvent=Vi,Object.defineProperty(t,"t",{value:!0})}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-bar",
3
- "version": "0.0.88",
3
+ "version": "0.1.0",
4
4
  "description": "Search bar component using Fluid Topics public API",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,17 +19,17 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-accordion": "^0.0.88",
23
- "@fluid-topics/ft-button": "^0.0.88",
24
- "@fluid-topics/ft-chip": "^0.0.88",
25
- "@fluid-topics/ft-filter": "^0.0.88",
26
- "@fluid-topics/ft-icon": "^0.0.88",
27
- "@fluid-topics/ft-select": "^0.0.88",
28
- "@fluid-topics/ft-size-watcher": "^0.0.88",
29
- "@fluid-topics/ft-snap-scroll": "^0.0.88",
30
- "@fluid-topics/ft-tooltip": "^0.0.88",
31
- "@fluid-topics/ft-typography": "^0.0.88",
32
- "@fluid-topics/ft-wc-utils": "^0.0.88",
22
+ "@fluid-topics/ft-accordion": "^0.1.0",
23
+ "@fluid-topics/ft-button": "^0.1.0",
24
+ "@fluid-topics/ft-chip": "^0.1.0",
25
+ "@fluid-topics/ft-filter": "^0.1.0",
26
+ "@fluid-topics/ft-icon": "^0.1.0",
27
+ "@fluid-topics/ft-select": "^0.1.0",
28
+ "@fluid-topics/ft-size-watcher": "^0.1.0",
29
+ "@fluid-topics/ft-snap-scroll": "^0.1.0",
30
+ "@fluid-topics/ft-tooltip": "^0.1.0",
31
+ "@fluid-topics/ft-typography": "^0.1.0",
32
+ "@fluid-topics/ft-wc-utils": "^0.1.0",
33
33
  "@material/mwc-icon": "^0.25.3",
34
34
  "lit": "^2.0.2"
35
35
  },
@@ -39,5 +39,5 @@
39
39
  "peerDependencies": {
40
40
  "@fluid-topics/public-api": "^1.0.14"
41
41
  },
42
- "gitHead": "220e53dba55dfa1de1560abbc30067555f72198c"
42
+ "gitHead": "8a87041408cbaccded5dc7c2a8f6a8aa6c92b9ee"
43
43
  }