@fluid-topics/ft-search-input 1.3.46 → 1.3.47

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.
@@ -1155,7 +1155,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1155
1155
  `;var Ji=f(C()),th="ft-app-info",ao=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ao.eventName="authentication-change";var rh={session:(t,e)=>{(0,Ji.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>k.dispatchEvent(new ao(e.payload)),0))}},k=Ji.FtReduxStore.get({name:th,reducers:rh,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Xa=f(C());var so=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=k.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=k.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var en=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:so.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):so.await()}};var ct=class extends en{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[p])=>c.localeCompare(p)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new Xa.CacheRegistry,this.cache=e?n.commonCache:new Xa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var tn=class extends ct{async listMyBookmarks(){let e=k.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Qa=class{addCommand(e,r=!1){k.commands.add(e,r)}consumeCommand(e){return k.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Qa;var It=f(C());var Ad,Mo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},oh=Symbol("clearAfterUnitTest"),rn=class extends(0,It.withEventBus)(ct){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ad]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=k.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,It.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new It.ParametrizedLabelResolver((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof It.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Mo({loadedContexts:e})),this.dispatchEvent(new Mo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Mo({loadedContexts:[e]})),this.dispatchEvent(new Mo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,It.delay)(0).then(()=>i()).catch(()=>null)))}};Ad=oh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends rn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends rn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var zo=window.FluidTopicsI18nService,on=window.FluidTopicsCustomI18nService;var Rd=f(C()),Ja=class{highlightHtml(e,r,i){(0,Rd.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ja;var nn=class extends ct{async listMySearches(){let{session:e}=k.getState();return Cd(e,$e.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ld=f(C());var es=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=k.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a;return Ld.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:k.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new es;var Id=f(C());var vr=class{static get(e,r){var i,n;let a=k.getState(),{lang:s,region:c}=(n=(i=a.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Id.SearchPlaceConverter(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var ts=class{urlToSearchRequest(e){return vr.get().parse(e)}searchRequestToUrl(e){return vr.get().serialize(e)}};window.FluidTopicsUrlService=new ts;var Pr=f(C());var lo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};lo.eventName="change";var rs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},kd=new rs;var an=class t extends Pr.WithEventBus{static build(){return new t(window.history,kd,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Pr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new lo(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,c])=>{let p=r(),u={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};i.apply(n,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(lo.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(lo.eventName,e)}currentItem(){return(0,Pr.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Pr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Pr.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=an.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Td=k;function $d(t,e){var r;return Td.getState().authenticationRequired&&!(!((r=Td.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(e):t()}var Pe=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ue=class extends Ht.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>so.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ht.CacheRegistry,this.cleanSessionDebouncer=new Ht.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Pd.html`
1156
1156
  <slot></slot>
1157
1157
  `}connectedCallback(){super.connectedCallback(),k.addEventListener(ao.eventName,this.reloadConfiguration)}disconnectedCallback(){k.addEventListener(ao.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,i,n,a,s,c,p;super.update(e),e.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&k.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&k.actions.noCustom(this.noCustom),e.has("editorMode")&&k.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&k.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>zo.addContext(u)),e.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(k.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),k.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),k.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&k.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&k.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>$d(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ue.elementDefinitions={};ue.styles=Ed;Pe([(0,Ve.property)()],ue.prototype,"baseUrl",void 0);Pe([(0,Ve.property)()],ue.prototype,"apiIntegrationIdentifier",void 0);Pe([(0,Ve.property)()],ue.prototype,"apiIntegrationAppVersion",void 0);Pe([(0,Ve.property)()],ue.prototype,"uiLocale",void 0);Pe([(0,Ht.jsonProperty)(null)],ue.prototype,"availableUiLocales",void 0);Pe([(0,Ht.jsonProperty)(null)],ue.prototype,"metadataConfiguration",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"editorMode",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"noCustom",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"openExternalDocumentInNewTab",void 0);Pe([(0,Ve.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ue.prototype,"noCustomComponent",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"withManualResources",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"navigatorOnline",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"forcedOffline",void 0);Pe([(0,Ve.property)({type:Object})],ue.prototype,"apiProvider",void 0);Pe([(0,Ve.property)({type:Boolean})],ue.prototype,"authenticationRequired",void 0);Pe([(0,Ht.jsonProperty)([])],ue.prototype,"messageContexts",void 0);Pe([(0,Ht.jsonProperty)(void 0)],ue.prototype,"session",void 0);Pe([(0,Ve.state)()],ue.prototype,"localesConfiguration",void 0);Pe([(0,Ve.state)()],ue.prototype,"availableContentLocales",void 0);var Rs=f(J());function ih(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!sn(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!sn(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(n=a(t),r=n.length,r!==a(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let s=n[i];if(!sn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function sn(t,e){try{return ih(t,e)}catch{return!1}}function bi(t,e){return!sn(t,e)}function ln(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Nd=f(J(),1);var os=t=>{let e=t??{};return(r,i)=>{var n;let a={hasChanged:bi,attribute:!1,...e};(0,Nd.property)(a)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:c=>c[i],store:e.store})}};var cn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var co=f(J(),1);var _d=f(J(),1);function Bd(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,_d.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return r();try{return JSON.parse(i)}catch{return r()}},toAttribute:i=>JSON.stringify(i)},hasChanged:bi,...e??{}})}var dn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(c){n(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Fd=f(L(),1);var pn=globalThis,nh=pn.ShadowRoot&&(pn.ShadyCSS===void 0||pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,YO=Symbol();var Dd=(t,e)=>{if(nh)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=pn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var un=class extends Fd.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([n,a])=>e.registry.define(n,a)));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Dd(i,e.elementStyles),i}};function Md(t,e,...r){var i;let n=t.querySelector(e);for(let a of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(a);return n}var Ho=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Wd,zd=Symbol("constructorPrototype"),Ud=Symbol("constructorName"),Vd=Symbol("exportpartsDebouncer"),Hd=Symbol("dynamicDependenciesLoaded"),Uo=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Uo.eventName="exportparts-updated";var rr=class extends un{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Wd]=new dn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Vd].run(()=>{var n,a;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ud]=this.constructor.name,this[zd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ud]&&Object.setPrototypeOf(this,this[zd])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Hd]||(r[Hd]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Uo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Uo.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Uo)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let a=[...n??[],i];r=Md(this.shadowRoot,...a)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(e){var r,i,n,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let g=new Set;for(let b of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let O=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map($=>$.split(":")[1]))!==null&&c!==void 0?c:[],E=[...O,...S].filter(p).map($=>$.trim());for(let $ of E)g.add($)}if(g.size===0){this.exportparts=void 0;return}let y=[...g.values()].flatMap(b=>u.map(O=>`${b}:${O}--${b}`));this.exportparts=[...this.part,...y].join(", ")}};Wd=Vd;Ho([(0,co.property)()],rr.prototype,"exportpartsPrefix",void 0);Ho([Bd([])],rr.prototype,"exportpartsPrefixes",void 0);Ho([(0,co.property)({reflect:!0})],rr.prototype,"exportparts",void 0);Ho([(0,co.property)()],rr.prototype,"customStylesheet",void 0);Ho([(0,co.property)()],rr.prototype,"elementToFocus",void 0);Ho([(0,co.state)()],rr.prototype,"useAdoptedStyleSheets",void 0);function fn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var xi=Symbol("internalReduxEventsUnsubscribers"),Nr=Symbol("internalStoresUnsubscribers"),po=Symbol("internalStores"),ah=ln(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[po].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[po].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[po].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[po].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[po].delete(c)}setupStores(){this.unsubscribeFromStores(),this[po].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Nr].has(s.store):this[Nr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[Nr].set(s,c.subscribe(()=>this.updateFromStores())),this[xi].set(s,[]),fn(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,g)=>{if(typeof this[g]=="function"&&(!u.store||c.name===u.store)){let y=b=>this[g](b);c.addEventListener(u.eventName,y),this[xi].get(s).push(()=>c.removeEventListener(u.eventName,y))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Nr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Nr].has(s)&&this[Nr].get(s)(),this[Nr].delete(s),(c=this[xi].get(s))===null||c===void 0||c.forEach(p=>p()),this[xi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Nr,r=po,i=xi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Gd=class extends ah(rr){};function kt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Sr(t){return!!t&&!!t[me]}function Wt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===hh}(t)||Array.isArray(t)||!!t[Qd]||!!(!((e=t.constructor)===null||e===void 0)&&e[Qd])||us(t)||fs(t))}function uo(t,e,r){r===void 0&&(r=!1),Go(t)===0?(r?Object.keys:Vo)(t).forEach(function(i){r&&typeof i=="symbol"||e(i,t[i],t)}):t.forEach(function(i,n){return e(n,i,t)})}function Go(t){var e=t[me];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:us(t)?2:fs(t)?3:0}function Wo(t,e){return Go(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function sh(t,e){return Go(t)===2?t.get(e):t[e]}function Jd(t,e,r){var i=Go(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function ep(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function us(t){return uh&&t instanceof Map}function fs(t){return fh&&t instanceof Set}function _r(t){return t.o||t.t}function hs(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=op(t);delete e[me];for(var r=Vo(e),i=0;i<r.length;i++){var n=r[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function ys(t,e){return e===void 0&&(e=!1),gs(t)||Sr(t)||!Wt(t)||(Go(t)>1&&(t.set=t.add=t.clear=t.delete=lh),Object.freeze(t),e&&uo(t,function(r,i){return ys(i,!0)},!0)),t}function lh(){kt(2)}function gs(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function or(t){var e=ps[t];return e||kt(18,t),e}function ch(t,e){ps[t]||(ps[t]=e)}function ls(){return Si}function is(t,e){e&&(or("Patches"),t.u=[],t.s=[],t.v=e)}function hn(t){cs(t),t.p.forEach(dh),t.p=null}function cs(t){t===Si&&(Si=t.l)}function jd(t){return Si={p:[],l:Si,h:t,m:!0,_:0}}function dh(t){var e=t[me];e.i===0||e.i===1?e.j():e.g=!0}function ns(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||or("ES5").S(e,t,i),i?(r[me].P&&(hn(e),kt(4)),Wt(t)&&(t=yn(e,t),e.l||gn(e,t)),e.u&&or("Patches").M(r[me].t,t,e.u,e.s)):t=yn(e,r,[]),hn(e),e.u&&e.v(e.u,e.s),t!==rp?t:void 0}function yn(t,e,r){if(gs(e))return e;var i=e[me];if(!i)return uo(e,function(c,p){return Kd(t,i,e,c,p,r)},!0),e;if(i.A!==t)return e;if(!i.P)return gn(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=hs(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),uo(a,function(c,p){return Kd(t,i,n,c,p,r,s)}),gn(t,n,!1),r&&t.u&&or("Patches").N(i,r,t.u,t.s)}return i.o}function Kd(t,e,r,i,n,a,s){if(Sr(n)){var c=yn(t,n,a&&e&&e.i!==3&&!Wo(e.R,i)?a.concat(i):void 0);if(Jd(r,i,c),!Sr(c))return;t.m=!1}else s&&r.add(n);if(Wt(n)&&!gs(n)){if(!t.h.D&&t._<1)return;yn(t,n),e&&e.A.l||gn(t,n)}}function gn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ys(e,r)}function as(t,e){var r=t[me];return(r?_r(r):t)[e]}function Zd(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function Br(t){t.P||(t.P=!0,t.l&&Br(t.l))}function ss(t){t.o||(t.o=hs(t.t))}function ds(t,e,r){var i=us(e)?or("MapSet").F(e,r):fs(e)?or("MapSet").T(e,r):t.O?function(n,a){var s=Array.isArray(n),c={i:s?1:0,A:a?a.A:ls(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},p=c,u=Oi;s&&(p=[c],u=vi);var g=Proxy.revocable(p,u),y=g.revoke,b=g.proxy;return c.k=b,c.j=y,b}(e,r):or("ES5").J(e,r);return(r?r.A:ls()).p.push(i),i}function ph(t){return Sr(t)||kt(22,t),function e(r){if(!Wt(r))return r;var i,n=r[me],a=Go(r);if(n){if(!n.P&&(n.i<4||!or("ES5").K(n)))return n.t;n.I=!0,i=qd(r,a),n.I=!1}else i=qd(r,a);return uo(i,function(s,c){n&&sh(n.t,s)===c||Jd(i,s,e(c))}),a===3?new Set(i):i}(t)}function qd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return hs(t)}function tp(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[me];return Oi.get(u,s)},set:function(u){var g=this[me];Oi.set(g,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][me];if(!p.P)switch(p.i){case 5:i(p)&&Br(p);break;case 4:r(p)&&Br(p)}}}function r(s){for(var c=s.t,p=s.k,u=Vo(p),g=u.length-1;g>=0;g--){var y=u[g];if(y!==me){var b=c[y];if(b===void 0&&!Wo(c,y))return!0;var O=p[y],S=O&&O[me];if(S?S.t!==b:!ep(O,b))return!0}}var E=!!c[me];return u.length!==Vo(c).length+(E?0:1)}function i(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function n(s){s.g&&kt(3,JSON.stringify(_r(s)))}var a={};ch("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(y,b){if(y){for(var O=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(O,""+S,t(S,!0));return O}var E=op(b);delete E[me];for(var $=Vo(E),T=0;T<$.length;T++){var P=$[T];E[P]=t(P,y||!!E[P].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(p,s),g={i:p?5:4,A:c?c.A:ls(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,me,{value:g,writable:!0}),u},S:function(s,c,p){p?Sr(c)&&c[me].A===s&&e(s.p):(s.u&&function u(g){if(g&&typeof g=="object"){var y=g[me];if(y){var b=y.t,O=y.k,S=y.R,E=y.i;if(E===4)uo(O,function(Y){Y!==me&&(b[Y]!==void 0||Wo(b,Y)?S[Y]||u(O[Y]):(S[Y]=!0,Br(y)))}),uo(b,function(Y){O[Y]!==void 0||Wo(O,Y)||(S[Y]=!1,Br(y))});else if(E===5){if(i(y)&&(Br(y),S.length=!0),O.length<b.length)for(var $=O.length;$<b.length;$++)S[$]=!1;else for(var T=b.length;T<O.length;T++)S[T]=!0;for(var P=Math.min(O.length,b.length),z=0;z<P;z++)O.hasOwnProperty(z)||(S[z]=!0),S[z]===void 0&&u(O[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var Yd,Si,ms=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",uh=typeof Map<"u",fh=typeof Set<"u",Xd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",rp=ms?Symbol.for("immer-nothing"):((Yd={})["immer-nothing"]=!0,Yd),Qd=ms?Symbol.for("immer-draftable"):"__$immer_draftable",me=ms?Symbol.for("immer-state"):"__$immer_state";var hh=""+Object.prototype.constructor,Vo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,op=Object.getOwnPropertyDescriptors||function(t){var e={};return Vo(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ps={},Oi={get:function(t,e){if(e===me)return t;var r=_r(t);if(!Wo(r,e))return function(n,a,s){var c,p=Zd(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(n.k):void 0}(t,r,e);var i=r[e];return t.I||!Wt(i)?i:i===as(t.t,e)?(ss(t),t.o[e]=ds(t.A.h,i,t)):i},has:function(t,e){return e in _r(t)},ownKeys:function(t){return Reflect.ownKeys(_r(t))},set:function(t,e,r){var i=Zd(_r(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var n=as(_r(t),e),a=n?.[me];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ep(r,n)&&(r!==void 0||Wo(t.t,e)))return!0;ss(t),Br(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return as(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ss(t),Br(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=_r(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){kt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){kt(12)}},vi={};uo(Oi,function(t,e){vi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),vi.deleteProperty=function(t,e){return vi.set.call(this,t,e,void 0)},vi.set=function(t,e,r){return Oi.set.call(this,t[0],e,r,t[0])};var yh=function(){function t(r){var i=this;this.O=Xd,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var c=a;a=n;var p=i;return function(E){var $=this;E===void 0&&(E=c);for(var T=arguments.length,P=Array(T>1?T-1:0),z=1;z<T;z++)P[z-1]=arguments[z];return p.produce(E,function(Y){var X;return(X=a).call.apply(X,[$,Y].concat(P))})}}var u;if(typeof a!="function"&&kt(6),s!==void 0&&typeof s!="function"&&kt(7),Wt(n)){var g=jd(i),y=ds(i,n,void 0),b=!0;try{u=a(y),b=!1}finally{b?hn(g):cs(g)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return is(g,s),ns(E,g)},function(E){throw hn(g),E}):(is(g,s),ns(u,g))}if(!n||typeof n!="object"){if((u=a(n))===void 0&&(u=n),u===rp&&(u=void 0),i.D&&ys(u,!0),s){var O=[],S=[];or("Patches").M(n,u,O,S),s(O,S)}return u}kt(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(u){for(var g=arguments.length,y=Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];return i.produceWithPatches(u,function(O){return n.apply(void 0,[O].concat(y))})};var s,c,p=i.produce(n,a,function(u,g){s=u,c=g});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Wt(r)||kt(8),Sr(r)&&(r=ph(r));var i=jd(this),n=ds(this,r,void 0);return n[me].C=!0,cs(i),n},e.finishDraft=function(r,i){var n=r&&r[me],a=n.A;return is(a,i),ns(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Xd&&kt(20),this.O=r},e.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}n>-1&&(i=i.slice(n+1));var s=or("Patches").$;return Sr(r)?s(r,i):this.produce(r,function(c){return s(c,i)})},t}(),mt=new yh,gh=mt.produce,pC=mt.produceWithPatches.bind(mt),uC=mt.setAutoFreeze.bind(mt),fC=mt.setUseProxies.bind(mt),hC=mt.applyPatches.bind(mt),yC=mt.createDraft.bind(mt),gC=mt.finishDraft.bind(mt),mn=gh;function fo(t){"@babel/helpers - typeof";return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fo(t)}function ip(t,e){if(fo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(fo(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function np(t){var e=ip(t,"string");return fo(e)=="symbol"?e:e+""}function ap(t,e,r){return(e=np(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function bs(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sp(Object(r),!0).forEach(function(i){ap(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var lp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xs=function(){return Math.random().toString(36).substring(7).split("").join(".")},bn={INIT:"@@redux/INIT"+xs(),REPLACE:"@@redux/REPLACE"+xs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xs()}};function mh(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function vs(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Xe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Xe(1));return r(vs)(t,e)}if(typeof t!="function")throw new Error(Xe(2));var n=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function g(){if(p)throw new Error(Xe(3));return a}function y(E){if(typeof E!="function")throw new Error(Xe(4));if(p)throw new Error(Xe(5));var $=!0;return u(),c.push(E),function(){if($){if(p)throw new Error(Xe(6));$=!1,u();var P=c.indexOf(E);c.splice(P,1),s=null}}}function b(E){if(!mh(E))throw new Error(Xe(7));if(typeof E.type>"u")throw new Error(Xe(8));if(p)throw new Error(Xe(9));try{p=!0,a=n(a,E)}finally{p=!1}for(var $=s=c,T=0;T<$.length;T++){var P=$[T];P()}return E}function O(E){if(typeof E!="function")throw new Error(Xe(10));n=E,b({type:bn.REPLACE})}function S(){var E,$=y;return E={subscribe:function(P){if(typeof P!="object"||P===null)throw new Error(Xe(11));function z(){P.next&&P.next(g())}z();var Y=$(z);return{unsubscribe:Y}}},E[lp]=function(){return this},E}return b({type:bn.INIT}),i={dispatch:b,subscribe:y,getState:g,replaceReducer:O},i[lp]=S,i}function bh(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:bn.INIT});if(typeof i>"u")throw new Error(Xe(12));if(typeof r(void 0,{type:bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xe(13))})}function cp(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(r[n]=t[n])}var a=Object.keys(r),s,c;try{bh(r)}catch(p){c=p}return function(u,g){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var b=!1,O={},S=0;S<a.length;S++){var E=a[S],$=r[E],T=u[E],P=$(T,g);if(typeof P>"u"){var z=g&&g.type;throw new Error(Xe(14))}O[E]=P,b=b||P!==T}return b=b||a.length!==Object.keys(u).length,b?O:u}}function jo(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function dp(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(Xe(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=jo.apply(void 0,c)(n.dispatch),bs(bs({},n),{},{dispatch:a})}}}function pp(t){var e=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(c){return typeof c=="function"?c(n,a,t):s(c)}}};return e}var up=pp();up.withExtraArgument=pp;var Ss=up;var mp=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),xh=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(g){return p([u,g])}}function p(u){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,n=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(g){u=[6,g],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ko=function(t,e){for(var r=0,i=e.length,n=t.length;r<i;r++,n++)t[n]=e[r];return t},vh=Object.defineProperty,Sh=Object.defineProperties,Oh=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,Ch=Object.prototype.hasOwnProperty,wh=Object.prototype.propertyIsEnumerable,hp=function(t,e,r){return e in t?vh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Dr=function(t,e){for(var r in e||(e={}))Ch.call(e,r)&&hp(t,r,e[r]);if(fp)for(var i=0,n=fp(e);i<n.length;i++){var r=n[i];wh.call(e,r)&&hp(t,r,e[r])}return t},Os=function(t,e){return Sh(t,Oh(e))},Eh=function(t,e,r){return new Promise(function(i,n){var a=function(p){try{c(r.next(p))}catch(u){n(u)}},s=function(p){try{c(r.throw(p))}catch(u){n(u)}},c=function(p){return p.done?i(p.value):Promise.resolve(p.value).then(a,s)};c((r=r.apply(t,e)).next())})};var Ah=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jo:jo.apply(null,arguments)},NC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Rh(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var Lh=function(t){mp(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ko([void 0],r.concat(this))))},e}(Array),Ih=function(t){mp(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ko([void 0],r.concat(this))))},e}(Array);function Es(t){return Wt(t)?mn(t,function(){}):t}function kh(t){return typeof t=="boolean"}function Th(){return function(e){return $h(e)}}function $h(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,a=t.serializableCheck,s=a===void 0?!0:a,c=new Lh;if(r&&(kh(r)?c.push(Ss):c.push(Ss.withExtraArgument(r.extraArgument))),0){if(n)var p;if(s)var u}return c}var Cs=!0;function bp(t){var e=Th(),r=t||{},i=r.reducer,n=i===void 0?void 0:i,a=r.middleware,s=a===void 0?e():a,c=r.devTools,p=c===void 0?!0:c,u=r.preloadedState,g=u===void 0?void 0:u,y=r.enhancers,b=y===void 0?void 0:y,O;if(typeof n=="function")O=n;else if(Rh(n))O=cp(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(e),!Cs&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cs&&S.some(function(Y){return typeof Y!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=dp.apply(void 0,S),$=jo;p&&($=Ah(Dr({trace:!Cs},typeof p=="object"&&p)));var T=new Ih(E),P=T;Array.isArray(b)?P=Ko([E],b):typeof b=="function"&&(P=b(T));var z=$.apply(void 0,P);return vs(O,g,z)}function Fr(t,e){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var a=e.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return Dr(Dr({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}function xp(t){var e={},r=[],i,n={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,n},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return t(n),[e,r,i]}function Ph(t){return typeof t=="function"}function Nh(t,e,r,i){r===void 0&&(r=[]);var n=typeof e=="function"?xp(e):[e,r,i],a=n[0],s=n[1],c=n[2],p;if(Ph(t))p=function(){return Es(t())};else{var u=Es(t);p=function(){return u}}function g(y,b){y===void 0&&(y=p());var O=Ko([a[b.type]],s.filter(function(S){var E=S.matcher;return E(b)}).map(function(S){var E=S.reducer;return E}));return O.filter(function(S){return!!S}).length===0&&(O=[c]),O.reduce(function(S,E){if(E)if(Sr(S)){var $=S,T=E($,b);return T===void 0?S:T}else{if(Wt(S))return mn(S,function(P){return E(P,b)});var T=E(S,b);if(T===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return S},y)}return g.getInitialState=p,g}function _h(t,e){return t+"/"+e}function vp(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Es(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};n.forEach(function(g){var y=i[g],b=_h(e,g),O,S;"reducer"in y?(O=y.reducer,S=y.prepare):O=y,a[g]=O,s[b]=O,c[g]=S?Fr(b,S):Fr(b)});function p(){var g=typeof t.extraReducers=="function"?xp(t.extraReducers):[t.extraReducers],y=g[0],b=y===void 0?{}:y,O=g[1],S=O===void 0?[]:O,E=g[2],$=E===void 0?void 0:E,T=Dr(Dr({},b),s);return Nh(r,function(P){for(var z in T)P.addCase(z,T[z]);for(var Y=0,X=S;Y<X.length;Y++){var nt=X[Y];P.addMatcher(nt.matcher,nt.reducer)}$&&P.addDefaultCase($)})}var u;return{name:e,reducer:function(g,y){return u||(u=p()),u(g,y)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Bh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dh=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Bh[Math.random()*64|0];return e},Fh=["name","message","stack","code"],ws=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),yp=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Mh=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=Fh;r<i.length;r++){var n=i[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},FC=function(){function t(e,r,i){var n=Fr(e+"/fulfilled",function(g,y,b,O){return{payload:g,meta:Os(Dr({},O||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),a=Fr(e+"/pending",function(g,y,b){return{payload:void 0,meta:Os(Dr({},b||{}),{arg:y,requestId:g,requestStatus:"pending"})}}),s=Fr(e+"/rejected",function(g,y,b,O,S){return{payload:O,error:(i&&i.serializeError||Mh)(g||"Rejected"),meta:Os(Dr({},S||{}),{arg:b,requestId:y,rejectedWithValue:!!O,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g}();function u(g){return function(y,b,O){var S=i?.idGenerator?i.idGenerator(g):Dh(),E=new p,$,T=!1;function P(Y){$=Y,E.abort()}var z=function(){return Eh(this,null,function(){var Y,X,nt,qt,tt,Yt,ze;return xh(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),qt=(Y=i?.condition)==null?void 0:Y.call(i,g,{getState:b,extra:O}),Uh(qt)?[4,qt]:[3,2];case 1:qt=m.sent(),m.label=2;case 2:if(qt===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,tt=new Promise(function(v,_){return E.signal.addEventListener("abort",function(){return _({name:"AbortError",message:$||"Aborted"})})}),y(a(S,g,(X=i?.getPendingMeta)==null?void 0:X.call(i,{requestId:S,arg:g},{getState:b,extra:O}))),[4,Promise.race([tt,Promise.resolve(r(g,{dispatch:y,getState:b,extra:O,requestId:S,signal:E.signal,abort:P,rejectWithValue:function(v,_){return new ws(v,_)},fulfillWithValue:function(v,_){return new yp(v,_)}})).then(function(v){if(v instanceof ws)throw v;return v instanceof yp?n(v.payload,S,g,v.meta):n(v,S,g)})])];case 3:return nt=m.sent(),[3,5];case 4:return Yt=m.sent(),nt=Yt instanceof ws?s(null,S,g,Yt.payload,Yt.meta):s(Yt,S,g),[3,5];case 5:return ze=i&&!i.dispatchConditionRejection&&s.match(nt)&&nt.meta.condition,ze||y(nt),[2,nt]}})})}();return Object.assign(z,{abort:P,requestId:S,arg:g,unwrap:function(){return z.then(zh)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function zh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Uh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Sp="listener",Op="completed",Cp="cancelled",MC="task-"+Cp,zC="task-"+Op,UC=Sp+"-"+Cp,HC=Sp+"-"+Op;var As="listenerMiddleware";var WC=Fr(As+"/add"),VC=Fr(As+"/removeAll"),GC=Fr(As+"/remove");var gp,jC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(gp||(gp=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Hh=function(t){return function(e){setTimeout(e,t)}},KC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Hh(10);tp();var Wh=ln(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),xn=class extends Wh(Object){};window.ftReduxStores||(window.ftReduxStores={});var wp=class t extends xn{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[i];if(fn(a))return a;if(n==null)return;let s=vp({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),c=bp({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[n.name]=new t(s,c,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new cn;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...g)=>{let y=u(...g.map(n));return this.reduxStore.dispatch(y),y}:g=>{this.setState({[p]:n(g)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var vn=class{static format(e,r,i,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n)):this.getIntlDateTime(e,r,i,n)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(a);if(!n)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ep=f(C()),Sn=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},mw=(0,Ep.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(k)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,a;return((a=(n=this.metadataDescriptors.find(c=>c.key===i))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?c=>vn.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sn([(0,Rs.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Sn([(0,Rs.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Sn([os({store:k.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Sn([os({store:k.name})],e.prototype,"uiLocale",void 0),e});var wn=f(C());var On=class extends ct{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=k.getState().session;return!!e?.sessionAuthenticated}};var Cn=class extends ct{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=k.getState().session;return!!e?.sessionAuthenticated}};var Vh="ft-user-assets",Gh={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Lt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;Is(t,r,[...Ls(t,r),n]),Ap(t,r,1,i),Rp(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Is(t,r,Ls(t,r).map(n=>n.id===i.id?i:n)),Rp(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;Is(t,r,Ls(t,r).filter(a=>a.id!==n)),Ap(t,r,-1,i)}},Lp={[Lt.SEARCHES]:"savedSearches",[Lt.BOOKMARKS]:"bookmarks",[Lt.BOOKS]:void 0,[Lt.COLLECTIONS]:void 0},Ls=(t,e)=>{var r;let i=Lp[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Is=(t,e,r)=>{let i=Lp[e];i&&(t[i]=r)},Ap=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Lt.BOOKMARKS&&i)){let a=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,a+r)}},Rp=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},bt=wn.FtReduxStore.get({name:Vh,reducers:Gh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ks=class{constructor(e=new On,r=new Cn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new tn,this.savedSearchesService=new nn,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=k.getState();(0,wn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),bt.actions.clearAssetCount(),bt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),bt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),bt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();bt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();bt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&bt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&bt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(bt.getState().assetCounts.bookmarkByMap).length!==0;e===Lt.BOOKMARKS&&r&&bt.actions.clearBookmarkCountByMap(),bt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;bt.actions.bookmarks(r)}}},jh=new ks;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=jh);(0,Ip.customElement)("ft-app-context")(ue);var Ts=class t extends Event{constructor(){super(t.eventName)}};Ts.eventName="search-context-clear-all-filters";var Kh=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Ps=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},kp=Symbol("registerInterval"),$s=Symbol("registerAttempts"),Zh=40,qh=(0,Rn.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[$s]=0,this[kp]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[$s]>Zh?window.clearInterval(this[kp]):(this[$s]++,this.dispatchEvent(new Ps))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Kh([(0,Tp.state)()],e.prototype,"stateManager",void 0),e}),An=class extends qh(Rn.FtLitElementRedux){};var Fp=f(C());var kn=f(L()),Tn=f(J()),$n=f(C());var $p=f(L());var Pp=$p.css`
1158
- `;var Zo=f(C());var Bp=f(J());var Ns=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[i,n]=e.split(".");return{context:i,key:n,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Np=new Ns;var Yh=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Xh=Symbol("i18nAttributes"),Qh=Symbol("i18nListAttributes"),Dp=Symbol("i18nProperties"),Ln=Symbol("i18nContexts"),Ci=Symbol("i18nUnsubs"),qo=(0,Zo.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?on:zo}i18n(a){let{context:s,key:c,message:p}=a,{custom:u,args:g,argsProvider:y}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let b=g??(y?y(this):[]);return this.getI18nService(u).resolveMessage(s,c,...b)}return p}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Np.isI18nKey(a)){let[c,p]=a.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,p)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let p=this,u=(g,y,b)=>b?.context&&b.key&&a(g,y,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...g})}:b;(s=this[Xh])===null||s===void 0||s.forEach((g,y)=>p[y]=u(g,y,p[y])),(c=this[Qh])===null||c===void 0||c.forEach((g,y)=>{var b;return p[y]=(b=p[y])===null||b===void 0?void 0:b.map(O=>u(g,y,O))})}updateI18nProperties(a){var s;(s=this[Dp])===null||s===void 0||s.forEach((c,p)=>{a(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let p=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ln].set(p,{isCustomContext:c}),this[Ci].has(p)||this[Ci].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(a){return this[Ln].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ln].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ci].forEach(a=>a()),this[Ci].clear()}}return e=Ln,r=Ci,Yh([(0,Bp.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),_p=class extends qo(Zo.FtLitElement){},In=class extends qo(Zo.FtLitElementRedux){};var wi=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Vt=class extends In{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kn.nothing:kn.html`
1158
+ `;var Zo=f(C());var Bp=f(J());var Ns=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[i,n]=e.split(".");return{context:i,key:n,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Np=new Ns;var Yh=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Xh=Symbol("i18nAttributes"),Qh=Symbol("i18nListAttributes"),Dp=Symbol("i18nProperties"),Ln=Symbol("i18nContexts"),Ci=Symbol("i18nUnsubs"),qo=(0,Zo.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?on:zo}i18n(a){let{context:s,key:c,message:p}=a,{custom:u,args:g,argsProvider:y}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let b=g??(y?y(this):[]);return this.getI18nService(u).resolveMessage(s,c,...b)}return p}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Np.isI18nKey(a)){let[c,p]=a.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,p)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let p=this,u=(g,y,b)=>b?.context&&b.key&&a(g,y,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...g})}:b;(s=this[Xh])===null||s===void 0||s.forEach((g,y)=>p[y]=u(g,y,p[y])),(c=this[Qh])===null||c===void 0||c.forEach((g,y)=>{var b;return p[y]=(b=p[y])===null||b===void 0?void 0:b.map(O=>u(g,y,O))})}updateI18nProperties(a){var s;(s=this[Dp])===null||s===void 0||s.forEach((c,p)=>{a(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let p=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ln].set(p,{isCustomContext:c}),this[Ci].has(p)||this[Ci].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(a){return this[Ln].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ln].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ci].forEach(a=>a()),this[Ci].clear()}}return e=Ln,r=Ci,Yh([(0,Bp.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),_p=class extends qo(Zo.FtLitElement){},In=class extends qo(Zo.FtLitElementRedux){};var wi=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Vt=class extends In{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kn.nothing:kn.html`
1159
1159
  <span class="ft-i18n">
1160
1160
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1161
1161
  </span>
@@ -1284,7 +1284,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1284
1284
  unbounded>
1285
1285
  </ft-ripple>
1286
1286
  <div class="ft-checkbox--box" part="checkbox-box">
1287
- <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check">
1287
+ <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check" aria-hidden="true">
1288
1288
  <path class="ft-checkbox--checkmark-path" fill="none"
1289
1289
  d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
1290
1290
  </svg>
@@ -2887,16 +2887,16 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
2887
2887
  <slot @slotchange=${this.updateOptionsFromSlot}
2888
2888
  @option-change=${this.updateOptionsFromSlot}
2889
2889
  ></slot>
2890
- `}renderOption(e,r){var i;let n=this.selectedOption===e;return So.html`
2891
- <div class="${(0,qs.classMap)({"ft-select--option":!0,"ft-select--option-selected":n,"ft-typography--body2":!0})}"
2892
- part="option option-${(i=e.value)===null||i===void 0?void 0:i.replace(/[^\w-]/g,"")}"
2890
+ `}renderOption(e,r){var i,n;let a=this.selectedOption===e;return So.html`
2891
+ <div class="${(0,qs.classMap)({"ft-select--option":!0,"ft-select--option-selected":a,"ft-typography--body2":!0})}"
2892
+ part="option option-${(n=(i=e.value)===null||i===void 0?void 0:i.toString())===null||n===void 0?void 0:n.replace(/[^\w-]/g,"")}"
2893
2893
  tabindex="0"
2894
2894
  aria-label="${e.label}"
2895
2895
  data-value="${e.value}"
2896
2896
  id="${"option-"+r}"
2897
- @keydown=${s=>this.onOptionKeyDown(s,e)}
2897
+ @keydown=${c=>this.onOptionKeyDown(c,e)}
2898
2898
  @click=${()=>this.selectOption(e)}>
2899
- <ft-ripple ?primary=${n} ?activated=${n}></ft-ripple>
2899
+ <ft-ripple ?primary=${a} ?activated=${a}></ft-ripple>
2900
2900
  <span>${e.label}</span>
2901
2901
  </div>
2902
2902
  `}willUpdate(e){super.willUpdate(e),e.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),e.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),e.has("focusOptions")&&this.focusOptions&&((i=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||i===void 0||i.focus(),this.focusOptions=!1),e.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px";let n=["bottom","top"];(0,Kr.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",n,"fixed",j.optionsHeight,0).then(({x:a,y:s})=>{this.optionsMenu.style.left=`${a}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(e){var r;e.stopPropagation();let i=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(n=>n);i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(e){switch(e.key){case" ":e.preventDefault(),e.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":e.preventDefault(),e.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(e){var r,i,n,a,s;let c;switch(e.key){case"Escape":this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),c=(n=(i=this.focusedOption)===null||i===void 0?void 0:i.previousElementSibling)!==null&&n!==void 0?n:this.lastOption;break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),c=(s=(a=this.focusedOption)===null||a===void 0?void 0:a.nextElementSibling)!==null&&s!==void 0?s:this.firstOption;break;default:if(e.key.length!=1)break;this.isKeyAlphanumeric(e.key)&&(c=this.handleAlphanumericPress(e.key));break}c?.focus()}isKeyAlphanumeric(e){let r=e.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(e){var r,i;let n=new Date;n.getTime()-this.lastSearchInputDate.getTime()>t.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=e.toLowerCase();let a=this.options.find(c=>{var p;return((p=c.label)===null||p===void 0?void 0:p.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});if(a===void 0){this.lastSearchInputDate=n;return}let s=(i=(r=this.optionsMenu)===null||r===void 0?void 0:r.querySelector(`[data-value="${a.value}"]`))!==null&&i!==void 0?i:void 0;return this.lastSearchInputDate=n,s}onOptionKeyDown(e,r){var i;(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),this.selectOption(r),this.optionsDisplayed=!1,(i=this.mainPanel)===null||i===void 0||i.focus())}getOptionId(e){if(!e)return;let r=this.options.findIndex(i=>(0,Kr.deepEqual)(i.value,e.value));if(r!==-1)return`option-${r}`}selectOption(e){var r,i;if(!(0,Kr.deepEqual)((r=this.selectedOption)===null||r===void 0?void 0:r.value,e.value)){this.selectedOption=e;for(let n of this.options)n.selected=n===e;this.dispatchEvent(new CustomEvent("change",{detail:(i=this.selectedOption)===null||i===void 0?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};oe.elementDefinitions={"ft-input-label":jt,"ft-typography":te,"ft-ripple":K,"ft-icon":ae};oe.searchTimeoutMilliseconds=2e3;oe.styles=[Ar,Qt,Xu];be([(0,ce.property)({type:String})],oe.prototype,"label",void 0);be([(0,ce.property)({type:String})],oe.prototype,"ariaLabel",void 0);be([(0,ce.property)({type:String})],oe.prototype,"helper",void 0);be([(0,ce.property)({type:Boolean})],oe.prototype,"outlined",void 0);be([(0,ce.property)({type:Boolean})],oe.prototype,"disabled",void 0);be([(0,ce.property)({type:Boolean})],oe.prototype,"error",void 0);be([(0,ce.property)({type:Boolean})],oe.prototype,"fixedMenuPosition",void 0);be([(0,ce.property)({type:Array})],oe.prototype,"options",void 0);be([(0,ce.state)()],oe.prototype,"selectedOption",void 0);be([(0,ce.state)()],oe.prototype,"optionsDisplayed",void 0);be([(0,ce.state)()],oe.prototype,"focusOptions",void 0);be([(0,ce.state)()],oe.prototype,"currentSearch",void 0);be([(0,ce.state)()],oe.prototype,"lastSearchInputDate",void 0);be([(0,ce.query)(".ft-select")],oe.prototype,"container",void 0);be([(0,ce.query)(".ft-select--options")],oe.prototype,"optionsMenu",void 0);be([(0,ce.query)(".ft-select--input-panel")],oe.prototype,"mainPanel",void 0);be([(0,ce.query)(".ft-select--option:first-child")],oe.prototype,"firstOption",void 0);be([(0,ce.query)(".ft-select--option:focus")],oe.prototype,"focusedOption",void 0);be([(0,ce.query)(".ft-select--option.ft-select--option-selected")],oe.prototype,"selectedOptionElement",void 0);be([(0,ce.query)(".ft-select--option:last-child")],oe.prototype,"lastOption",void 0);be([(0,ce.query)("slot:not([name])")],oe.prototype,"optionsSlot",void 0);(0,Ys.customElement)("ft-select")(oe);(0,Ys.customElement)("ft-select-option")(cr);var F=f(C()),Xs=f(L());var Ju=f(L()),Kt=f(C()),qe={display:Kt.FtCssVariableFactory.create("--ft-skeleton--display","","DISPLAY","block"),width:Kt.FtCssVariableFactory.create("--ft-skeleton--width","","SIZE","100%"),height:Kt.FtCssVariableFactory.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:Kt.FtCssVariableFactory.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:Kt.FtCssVariableFactory.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:Kt.FtCssVariableFactory.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:Kt.FtCssVariableFactory.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:Kt.FtCssVariableFactory.external(Kt.designSystemVariables.borderRadiusM,"Design system")},ef=Ju.css`
@@ -1235,7 +1235,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1235
1235
  `;var Xh="ft-app-info",eo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};eo.eventName="authentication-change";var Qh={session:(t,e)=>{Pe(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>U.dispatchEvent(new eo(e.payload)),0))}},U=Cr.get({name:Xh,reducers:Qh,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var to=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=U.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=U.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Dn=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:to.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):to.await()}};var et=class extends Dn{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new $t,this.cache=e?n.commonCache:new $t}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Bn=class extends et{async listMyBookmarks(){let e=U.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var sl=class{addCommand(e,r=!1){U.commands.add(e,r)}consumeCommand(e){return U.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new sl;var wp,Uo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Jh=Symbol("clearAfterUnitTest"),Mn=class extends Vi(et){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[wp]=()=>{this.defaultMessages={},this.cache=new $t,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=U.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};Pe(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new yr((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof dr)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Uo({loadedContexts:e})),this.dispatchEvent(new Uo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Uo({loadedContexts:[e]})),this.dispatchEvent(new Uo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>Wi(0).then(()=>i()).catch(()=>null)))}};wp=Jh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Mn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Mn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var zo=window.FluidTopicsI18nService,Un=window.FluidTopicsCustomI18nService;var ll=class{highlightHtml(e,r,i){ds(e,r,i)}};window.FluidTopicsHighlightHtmlService=new ll;var zn=class extends et{async listMySearches(){let{session:e}=U.getState();return Md(e,ke.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var cl=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a;return qr.format(e,(i=r?.locale)!==null&&i!==void 0?i:U.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new cl;var sr=class{static get(e,r){var i,n;let a=U.getState(),{lang:s,region:l}=(n=(i=a.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Er(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var dl=class{urlToSearchRequest(e){return sr.get().parse(e)}searchRequestToUrl(e){return sr.get().serialize(e)}};window.FluidTopicsUrlService=new dl;var ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ro.eventName="change";var pl=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Ep=new pl;var Hn=class t extends Xt{static build(){return new t(window.history,Ep,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Pe(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ro(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};i.apply(n,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(ro.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ro.eventName,e)}currentItem(){return ti(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return ti(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return ti(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Hn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Ap=U;function Rp(t,e){var r;return Ap.getState().authenticationRequired&&!(!((r=Ap.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(e):t()}var $e=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},me=class extends D{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>to.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new $t,this.cleanSessionDebouncer=new le,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return O`
1236
1236
  <slot></slot>
1237
1237
  `}connectedCallback(){super.connectedCallback(),U.addEventListener(eo.eventName,this.reloadConfiguration)}disconnectedCallback(){U.addEventListener(eo.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,i,n,a,s,l,d;super.update(e),e.has("baseUrl")&&(U.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&U.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&U.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&U.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&U.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&U.actions.noCustom(this.noCustom),e.has("editorMode")&&U.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&U.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&U.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>zo.addContext(u)),e.has("openExternalDocumentInNewTab")&&U.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&U.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&U.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(U.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),U.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),U.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&U.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&U.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Rp(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};me.elementDefinitions={};me.styles=Cp;$e([h()],me.prototype,"baseUrl",void 0);$e([h()],me.prototype,"apiIntegrationIdentifier",void 0);$e([h()],me.prototype,"apiIntegrationAppVersion",void 0);$e([h()],me.prototype,"uiLocale",void 0);$e([Ce(null)],me.prototype,"availableUiLocales",void 0);$e([Ce(null)],me.prototype,"metadataConfiguration",void 0);$e([h({type:Boolean})],me.prototype,"editorMode",void 0);$e([h({type:Boolean})],me.prototype,"noCustom",void 0);$e([h({type:Boolean})],me.prototype,"openExternalDocumentInNewTab",void 0);$e([h({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],me.prototype,"noCustomComponent",void 0);$e([h({type:Boolean})],me.prototype,"withManualResources",void 0);$e([h({type:Boolean})],me.prototype,"navigatorOnline",void 0);$e([h({type:Boolean})],me.prototype,"forcedOffline",void 0);$e([h({type:Object})],me.prototype,"apiProvider",void 0);$e([h({type:Boolean})],me.prototype,"authenticationRequired",void 0);$e([Ce([])],me.prototype,"messageContexts",void 0);$e([Ce(void 0)],me.prototype,"session",void 0);$e([N()],me.prototype,"localesConfiguration",void 0);$e([N()],me.prototype,"availableContentLocales",void 0);var Wn=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},zR=Ie(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===i))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>qr.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Wn([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Wn([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Wn([Ft({store:U.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Wn([Ft({store:U.name})],e.prototype,"uiLocale",void 0),e});var Vn=class extends et{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var jn=class extends et{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=U.getState().session;return!!e?.sessionAuthenticated}};var em="ft-user-assets",tm={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(gt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;fl(t,r,[...ul(t,r),n]),Lp(t,r,1,i),Ip(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;fl(t,r,ul(t,r).map(n=>n.id===i.id?i:n)),Ip(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;fl(t,r,ul(t,r).filter(a=>a.id!==n)),Lp(t,r,-1,i)}},kp={[gt.SEARCHES]:"savedSearches",[gt.BOOKMARKS]:"bookmarks",[gt.BOOKS]:void 0,[gt.COLLECTIONS]:void 0},ul=(t,e)=>{var r;let i=kp[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},fl=(t,e,r)=>{let i=kp[e];i&&(t[i]=r)},Lp=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===gt.BOOKMARKS&&i)){let a=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,a+r)}},Ip=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},ct=Cr.get({name:em,reducers:tm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(gt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),hl=class{constructor(e=new Vn,r=new jn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bn,this.savedSearchesService=new zn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=U.getState();Pe((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ct.actions.clearAssetCount(),ct.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ct.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ct.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ct.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ct.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ct.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ct.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ct.getState().assetCounts.bookmarkByMap).length!==0;e===gt.BOOKMARKS&&r&&ct.actions.clearBookmarkCountByMap(),ct.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ct.actions.bookmarks(r)}}},rm=new hl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=rm);V("ft-app-context")(me);var ml=class t extends Event{constructor(){super(t.eventName)}};ml.eventName="search-context-clear-all-filters";var om=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},yl=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Tp=Symbol("registerInterval"),gl=Symbol("registerAttempts"),im=40,nm=Ie(Symbol("toFtSearchComponent"),function(t){class e extends t{setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[gl]=0,this[Tp]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[gl]>im?window.clearInterval(this[Tp]):(this[gl]++,this.dispatchEvent(new yl))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return om([N()],e.prototype,"stateManager",void 0),e}),Gn=class extends nm(jr){};var $p=I`
1238
- `;var bl=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[i,n]=e.split(".");return{context:i,key:n,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},_p=new bl;var am=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},sm=Symbol("i18nAttributes"),lm=Symbol("i18nListAttributes"),Np=Symbol("i18nProperties"),Kn=Symbol("i18nContexts"),Si=Symbol("i18nUnsubs"),Ho=Ie(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Un:zo}i18n(a){let{context:s,key:l,message:d}=a,{custom:u,args:m,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=m??(f?f(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(_p.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(m,f,y)=>y?.context&&y.key&&a(m,f,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[sm])===null||s===void 0||s.forEach((m,f)=>d[f]=u(m,f,d[f])),(l=this[lm])===null||l===void 0||l.forEach((m,f)=>{var y;return d[f]=(y=d[f])===null||y===void 0?void 0:y.map(S=>u(m,f,S))})}updateI18nProperties(a){var s;(s=this[Np])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Kn].set(d,{isCustomContext:l}),this[Si].has(d)||this[Si].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Kn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Kn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Si].forEach(a=>a()),this[Si].clear()}}return e=Kn,r=Si,am([h({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Pp=class extends Ho(D){},Zn=class extends Ho(jr){};var Oi=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Lt=class extends Zn{constructor(){super(),this.editorMode=!1,this.addStore(U)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":P:O`
1238
+ `;var bl=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[i,n]=e.split(".");return{context:i,key:n,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},_p=new bl;var am=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},sm=Symbol("i18nAttributes"),lm=Symbol("i18nListAttributes"),Np=Symbol("i18nProperties"),Kn=Symbol("i18nContexts"),Si=Symbol("i18nUnsubs"),Ho=Ie(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Un:zo}i18n(a){let{context:s,key:l,message:d}=a,{custom:u,args:m,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=m??(f?f(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(_p.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(m,f,y)=>y?.context&&y.key&&a(m,f,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[sm])===null||s===void 0||s.forEach((m,f)=>d[f]=u(m,f,d[f])),(l=this[lm])===null||l===void 0||l.forEach((m,f)=>{var y;return d[f]=(y=d[f])===null||y===void 0?void 0:y.map(S=>u(m,f,S))})}updateI18nProperties(a){var s;(s=this[Np])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Kn].set(d,{isCustomContext:l}),this[Si].has(d)||this[Si].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Kn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Kn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Si].forEach(a=>a()),this[Si].clear()}}return e=Kn,r=Si,am([h({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Pp=class extends Ho(D){},Zn=class extends Ho(jr){};var Oi=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Lt=class extends Zn{constructor(){super(),this.editorMode=!1,this.addStore(U)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":P:O`
1239
1239
  <span class="ft-i18n">
1240
1240
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1241
1241
  </span>
@@ -1364,7 +1364,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1364
1364
  unbounded>
1365
1365
  </ft-ripple>
1366
1366
  <div class="ft-checkbox--box" part="checkbox-box">
1367
- <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check">
1367
+ <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check" aria-hidden="true">
1368
1368
  <path class="ft-checkbox--checkmark-path" fill="none"
1369
1369
  d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
1370
1370
  </svg>
@@ -2967,16 +2967,16 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
2967
2967
  <slot @slotchange=${this.updateOptionsFromSlot}
2968
2968
  @option-change=${this.updateOptionsFromSlot}
2969
2969
  ></slot>
2970
- `}renderOption(e,r){var i;let n=this.selectedOption===e;return O`
2971
- <div class="${pe({"ft-select--option":!0,"ft-select--option-selected":n,"ft-typography--body2":!0})}"
2972
- part="option option-${(i=e.value)===null||i===void 0?void 0:i.replace(/[^\w-]/g,"")}"
2970
+ `}renderOption(e,r){var i,n;let a=this.selectedOption===e;return O`
2971
+ <div class="${pe({"ft-select--option":!0,"ft-select--option-selected":a,"ft-typography--body2":!0})}"
2972
+ part="option option-${(n=(i=e.value)===null||i===void 0?void 0:i.toString())===null||n===void 0?void 0:n.replace(/[^\w-]/g,"")}"
2973
2973
  tabindex="0"
2974
2974
  aria-label="${e.label}"
2975
2975
  data-value="${e.value}"
2976
2976
  id="${"option-"+r}"
2977
- @keydown=${s=>this.onOptionKeyDown(s,e)}
2977
+ @keydown=${l=>this.onOptionKeyDown(l,e)}
2978
2978
  @click=${()=>this.selectOption(e)}>
2979
- <ft-ripple ?primary=${n} ?activated=${n}></ft-ripple>
2979
+ <ft-ripple ?primary=${a} ?activated=${a}></ft-ripple>
2980
2980
  <span>${e.label}</span>
2981
2981
  </div>
2982
2982
  `}willUpdate(e){super.willUpdate(e),e.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),e.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),e.has("focusOptions")&&this.focusOptions&&((i=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||i===void 0||i.focus(),this.focusOptions=!1),e.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px";let n=["bottom","top"];rs(this.mainPanel,this.optionsMenu,"bottom",n,"fixed",X.optionsHeight,0).then(({x:a,y:s})=>{this.optionsMenu.style.left=`${a}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(e){var r;e.stopPropagation();let i=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(n=>n);i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(e){switch(e.key){case" ":e.preventDefault(),e.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":e.preventDefault(),e.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(e){var r,i,n,a,s;let l;switch(e.key){case"Escape":this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),l=(n=(i=this.focusedOption)===null||i===void 0?void 0:i.previousElementSibling)!==null&&n!==void 0?n:this.lastOption;break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),l=(s=(a=this.focusedOption)===null||a===void 0?void 0:a.nextElementSibling)!==null&&s!==void 0?s:this.firstOption;break;default:if(e.key.length!=1)break;this.isKeyAlphanumeric(e.key)&&(l=this.handleAlphanumericPress(e.key));break}l?.focus()}isKeyAlphanumeric(e){let r=e.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(e){var r,i;let n=new Date;n.getTime()-this.lastSearchInputDate.getTime()>t.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=e.toLowerCase();let a=this.options.find(l=>{var d;return((d=l.label)===null||d===void 0?void 0:d.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});if(a===void 0){this.lastSearchInputDate=n;return}let s=(i=(r=this.optionsMenu)===null||r===void 0?void 0:r.querySelector(`[data-value="${a.value}"]`))!==null&&i!==void 0?i:void 0;return this.lastSearchInputDate=n,s}onOptionKeyDown(e,r){var i;(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),this.selectOption(r),this.optionsDisplayed=!1,(i=this.mainPanel)===null||i===void 0||i.focus())}getOptionId(e){if(!e)return;let r=this.options.findIndex(i=>Pe(i.value,e.value));if(r!==-1)return`option-${r}`}selectOption(e){var r,i;if(!Pe((r=this.selectedOption)===null||r===void 0?void 0:r.value,e.value)){this.selectedOption=e;for(let n of this.options)n.selected=n===e;this.dispatchEvent(new CustomEvent("change",{detail:(i=this.selectedOption)===null||i===void 0?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};de.elementDefinitions={"ft-input-label":It,"ft-typography":se,"ft-ripple":Q,"ft-icon":ue};de.searchTimeoutMilliseconds=2e3;de.styles=[Ar,Mt,su];xe([h({type:String})],de.prototype,"label",void 0);xe([h({type:String})],de.prototype,"ariaLabel",void 0);xe([h({type:String})],de.prototype,"helper",void 0);xe([h({type:Boolean})],de.prototype,"outlined",void 0);xe([h({type:Boolean})],de.prototype,"disabled",void 0);xe([h({type:Boolean})],de.prototype,"error",void 0);xe([h({type:Boolean})],de.prototype,"fixedMenuPosition",void 0);xe([h({type:Array})],de.prototype,"options",void 0);xe([N()],de.prototype,"selectedOption",void 0);xe([N()],de.prototype,"optionsDisplayed",void 0);xe([N()],de.prototype,"focusOptions",void 0);xe([N()],de.prototype,"currentSearch",void 0);xe([N()],de.prototype,"lastSearchInputDate",void 0);xe([M(".ft-select")],de.prototype,"container",void 0);xe([M(".ft-select--options")],de.prototype,"optionsMenu",void 0);xe([M(".ft-select--input-panel")],de.prototype,"mainPanel",void 0);xe([M(".ft-select--option:first-child")],de.prototype,"firstOption",void 0);xe([M(".ft-select--option:focus")],de.prototype,"focusedOption",void 0);xe([M(".ft-select--option.ft-select--option-selected")],de.prototype,"selectedOptionElement",void 0);xe([M(".ft-select--option:last-child")],de.prototype,"lastOption",void 0);xe([M("slot:not([name])")],de.prototype,"optionsSlot",void 0);V("ft-select")(de);V("ft-select-option")(jt);var Ve={display:o.create("--ft-skeleton--display","","DISPLAY","block"),width:o.create("--ft-skeleton--width","","SIZE","100%"),height:o.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:o.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:o.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:o.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:o.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:o.external(R.borderRadiusM,"Design system")},lu=I`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-input",
3
- "version": "1.3.46",
3
+ "version": "1.3.47",
4
4
  "description": "Search bar input for integrated search component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,18 +19,18 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "1.3.46",
23
- "@fluid-topics/ft-button": "1.3.46",
24
- "@fluid-topics/ft-i18n": "1.3.46",
25
- "@fluid-topics/ft-icon": "1.3.46",
26
- "@fluid-topics/ft-ripple": "1.3.46",
27
- "@fluid-topics/ft-search-context": "1.3.46",
28
- "@fluid-topics/ft-typography": "1.3.46",
29
- "@fluid-topics/ft-wc-utils": "1.3.46",
22
+ "@fluid-topics/ft-app-context": "1.3.47",
23
+ "@fluid-topics/ft-button": "1.3.47",
24
+ "@fluid-topics/ft-i18n": "1.3.47",
25
+ "@fluid-topics/ft-icon": "1.3.47",
26
+ "@fluid-topics/ft-ripple": "1.3.47",
27
+ "@fluid-topics/ft-search-context": "1.3.47",
28
+ "@fluid-topics/ft-typography": "1.3.47",
29
+ "@fluid-topics/ft-wc-utils": "1.3.47",
30
30
  "lit": "3.1.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@fluid-topics/public-api": "1.0.110"
34
34
  },
35
- "gitHead": "d6cf25d6ed0dead8c7aff4f94a493c35d12f1392"
35
+ "gitHead": "16ac56d62f3a88a3b03cbc92bcd04dd91951a015"
36
36
  }