@fluid-topics/ft-search-results 1.1.100 → 1.1.102

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.
@@ -6,7 +6,7 @@
6
6
  `;var En=O(T()),wn=O($());var _r=O(T());var pi=O(T());var ks=O(po(),1);var fo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(fo||(fo={}));var ho;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(ho||(ho={}));var yo;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(yo||(yo={}));var go;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(go||(go={}));var mo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(mo||(mo={}));var bo;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(bo||(bo={}));var xo;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(xo||(xo={}));var vo;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(vo||(vo={}));var So;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(So||(So={}));var Oo;(function(r){r.ASC="ASC",r.DESC="DESC"})(Oo||(Oo={}));var Co;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Co||(Co={}));var Jt;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Jt||(Jt={}));var Eo;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Eo||(Eo={}));var pt;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(pt||(pt={}));var wo;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(wo||(wo={}));var we;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(we||(we={}));var er;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS"})(er||(er={}));var D;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN",r.DEVELOPER="DEVELOPER"})(D||(D={}));var Ao;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Ao||(Ao={}));var Rs={[D.PERSONAL_BOOK_SHARE_USER]:[D.PERSONAL_BOOK_USER],[D.HTML_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.PDF_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.KHUB_ADMIN]:[D.CONTENT_PUBLISHER],[D.ADMIN]:[D.KHUB_ADMIN,D.USERS_ADMIN,D.PORTAL_ADMIN],[D.DEVELOPER]:[D.BETA_USER,D.DEBUG_USER]};var Cn=O(T());var To=O(B()),K=O($()),q=O(T());var No=O(B());var Ro=No.css`
7
7
  `;var ft=O(T()),fi="ft-app-info",tr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},hi={session:(r,t)=>{(0,ft.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.eventBus.dispatchEvent(new tr(t.payload)),0))}},w=ft.FtReduxStore.get({name:fi,reducers:hi,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ce=O(T());var rr=O(T());var be=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let a=w.subscribe(()=>{n=r.get(t),n&&(a(),o(n))})}})}};var oe=class{constructor(t=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new rr.CacheRegistry,this.cache=t?a.commonCache:new rr.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:be.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):be.await()}clearCache(){this.cache.clearAll()}};var Io,yi=Symbol("clearAfterUnitTest"),ht=class extends oe{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Io]=()=>{this.defaultMessages={},this.cache=new ce.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ce.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var a,i,c;t=t.toLowerCase(),this.fetchContext(t);let u=(i=(a=this.cache.getNow(t))===null||a===void 0?void 0:a.messages)!==null&&i!==void 0?i:{};return new ce.ParametrizedLabelResolver((c=this.defaultMessages[t])!==null&&c!==void 0?c:{},u).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ce.delay)(0).then(()=>o()).catch(()=>null)))}};Io=yi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ht{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ht{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Ae=window.FluidTopicsI18nService,Po=window.FluidTopicsCustomI18nService;var H=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},F=class extends q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",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=()=>be.get(),this.messageContexts=[],this.cache=new q.CacheRegistry,this.cleanSessionDebouncer=new q.Debouncer}render(){return To.html`
8
8
  <slot></slot>
9
- `}update(t){super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("availableUiLocales")&&w.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ae.addContext(o)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};F.elementDefinitions={};F.styles=Ro;H([(0,K.property)()],F.prototype,"baseUrl",void 0);H([(0,K.property)()],F.prototype,"apiIntegrationIdentifier",void 0);H([(0,K.property)()],F.prototype,"uiLocale",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"editorMode",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"noCustom",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);H([(0,K.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"withManualResources",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);H([(0,K.property)({type:Object})],F.prototype,"apiProvider",void 0);H([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);H([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);var ts=O($());function gi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!yt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!yt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!yt(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function yt(r,t){try{return gi(r,t)}catch{return!1}}function or(r,t){return!yt(r,t)}var mi=O($(),1);var gt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Ye=O($(),1);var ko=O($(),1);function Lo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,ko.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:or,...t??{}})}var mt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(u){a(u);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Fo=O(B(),1);var bt=window,bi=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,cc=Symbol();var _o=(r,t)=>{bi?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=bt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var xt=class extends Fo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return _o(n,t.elementStyles),n}};var vt=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Bo,Uo=Symbol("constructorPrototype"),Do=Symbol("constructorName"),Wo=Symbol("exportpartsDebouncer"),Mo=Symbol("dynamicDependenciesLoaded"),le=class extends xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Bo]=new mt(5),this[Do]=this.constructor.name,this[Uo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Do]&&Object.setPrototypeOf(this,this[Uo])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Mo]||(t[Mo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Wo].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,c,u;let d=g=>g!=null&&g.trim().length>0,p=t.filter(d).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(u=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(S=>S.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...b).filter(d).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Bo=Wo;vt([(0,Ye.property)()],le.prototype,"exportpartsPrefix",void 0);vt([Lo([])],le.prototype,"exportpartsPrefixes",void 0);vt([(0,Ye.property)()],le.prototype,"customStylesheet",void 0);vt([(0,Ye.state)()],le.prototype,"useAdoptedStyleSheets",void 0);function Xe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var zo,Ho,$o,St=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),xe=Symbol("internalStores"),Qe=class extends le{constructor(){super(...arguments),this[zo]=new Map,this[Ho]=new Map,this[$o]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[xe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[xe].get(t)}addStore(t,o){var n;o=(n=o??(Xe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[xe].delete(o)}setupStore(t,o){this[xe].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[xe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(t.store);a&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),Xe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=u=>this[i](u);o.eventBus.addEventListener(a.eventName,c),this[St].push(()=>o.eventBus.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o)),this[St].forEach(t=>t()),this[St]=[]}unsubscribeFromStore(t){this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};zo=ue,Ho=xe,$o=St;Qe.reduxProperties=new Map;Qe.reduxReactiveProperties=new Set;Qe.reduxEventListeners=new Map;function G(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ai}(r)||Array.isArray(r)||!!r[Yo]||!!(!((t=r.constructor)===null||t===void 0)&&t[Yo])||pr(r)||fr(r))}function ve(r,t,o){o===void 0&&(o=!1),Ie(r)===0?(o?Object.keys:Re)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function Ie(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:pr(r)?2:fr(r)?3:0}function Ne(r,t){return Ie(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function xi(r,t){return Ie(r)===2?r.get(t):r[t]}function Xo(r,t,o){var n=Ie(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Qo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function pr(r){return Ei&&r instanceof Map}function fr(r){return wi&&r instanceof Set}function de(r){return r.o||r.t}function hr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=tn(r);delete t[L];for(var o=Re(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function yr(r,t){return t===void 0&&(t=!1),gr(r)||ne(r)||!Y(r)||(Ie(r)>1&&(r.set=r.add=r.clear=r.delete=vi),Object.freeze(r),t&&ve(r,function(o,n){return yr(n,!0)},!0)),r}function vi(){G(2)}function gr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function te(r){var t=dr[r];return t||G(18,r),t}function Si(r,t){dr[r]||(dr[r]=t)}function cr(){return et}function nr(r,t){t&&(te("Patches"),r.u=[],r.s=[],r.v=t)}function Ot(r){lr(r),r.p.forEach(Oi),r.p=null}function lr(r){r===et&&(et=r.l)}function jo(r){return et={p:[],l:et,h:r,m:!0,_:0}}function Oi(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function ar(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||te("ES5").S(t,r,n),n?(o[L].P&&(Ot(t),G(4)),Y(r)&&(r=Ct(t,r),t.l||Et(t,r)),t.u&&te("Patches").M(o[L].t,r,t.u,t.s)):r=Ct(t,o,[]),Ot(t),t.u&&t.v(t.u,t.s),r!==en?r:void 0}function Ct(r,t,o){if(gr(t))return t;var n=t[L];if(!n)return ve(t,function(u,d){return Ko(r,n,t,u,d,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Et(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=hr(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),ve(i,function(u,d){return Ko(r,n,a,u,d,o,c)}),Et(r,a,!1),o&&r.u&&te("Patches").N(n,o,r.u,r.s)}return n.o}function Ko(r,t,o,n,a,i,c){if(ne(a)){var u=Ct(r,a,i&&t&&t.i!==3&&!Ne(t.R,n)?i.concat(n):void 0);if(Xo(o,n,u),!ne(u))return;r.m=!1}else c&&o.add(a);if(Y(a)&&!gr(a)){if(!r.h.D&&r._<1)return;Ct(r,a),t&&t.A.l||Et(r,a)}}function Et(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&yr(t,o)}function ir(r,t){var o=r[L];return(o?de(o):r)[t]}function Go(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function pe(r){r.P||(r.P=!0,r.l&&pe(r.l))}function sr(r){r.o||(r.o=hr(r.t))}function ur(r,t,o){var n=pr(t)?te("MapSet").F(t,o):fr(t)?te("MapSet").T(t,o):r.O?function(a,i){var c=Array.isArray(a),u={i:c?1:0,A:i?i.A:cr(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=u,p=tt;c&&(d=[u],p=Je);var h=Proxy.revocable(d,p),y=h.revoke,g=h.proxy;return u.k=g,u.j=y,g}(t,o):te("ES5").J(t,o);return(o?o.A:cr()).p.push(n),n}function Ci(r){return ne(r)||G(22,r),function t(o){if(!Y(o))return o;var n,a=o[L],i=Ie(o);if(a){if(!a.P&&(a.i<4||!te("ES5").K(a)))return a.t;a.I=!0,n=Vo(o,i),a.I=!1}else n=Vo(o,i);return ve(n,function(c,u){a&&xi(a.t,c)===u||Xo(n,c,t(u))}),i===3?new Set(n):n}(r)}function Vo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return hr(r)}function Jo(){function r(c,u){var d=i[c];return d?d.enumerable=u:i[c]=d={configurable:!0,enumerable:u,get:function(){var p=this[L];return tt.get(p,c)},set:function(p){var h=this[L];tt.set(h,c,p)}},d}function t(c){for(var u=c.length-1;u>=0;u--){var d=c[u][L];if(!d.P)switch(d.i){case 5:n(d)&&pe(d);break;case 4:o(d)&&pe(d)}}}function o(c){for(var u=c.t,d=c.k,p=Re(d),h=p.length-1;h>=0;h--){var y=p[h];if(y!==L){var g=u[y];if(g===void 0&&!Ne(u,y))return!0;var v=d[y],b=v&&v[L];if(b?b.t!==g:!Qo(v,g))return!0}}var S=!!u[L];return p.length!==Re(u).length+(S?0:1)}function n(c){var u=c.k;if(u.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(u,u.length-1);if(d&&!d.get)return!0;for(var p=0;p<u.length;p++)if(!u.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&G(3,JSON.stringify(de(c)))}var i={};Si("ES5",{J:function(c,u){var d=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=tn(g);delete S[L];for(var I=Re(S),A=0;A<I.length;A++){var N=I[A];S[N]=r(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(d,c),h={i:d?5:4,A:u?u.A:cr(),P:!1,I:!1,R:{},l:u,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,L,{value:h,writable:!0}),p},S:function(c,u,d){d?ne(u)&&u[L].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[L];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)ve(v,function(R){R!==L&&(g[R]!==void 0||Ne(g,R)?b[R]||p(v[R]):(b[R]=!0,pe(y)))}),ve(g,function(R){v[R]!==void 0||Ne(v,R)||(b[R]=!1,pe(y))});else if(S===5){if(n(y)&&(pe(y),b.length=!0),v.length<g.length)for(var I=v.length;I<g.length;I++)b[I]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,g.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&p(v[k])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var Zo,et,mr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ei=typeof Map<"u",wi=typeof Set<"u",qo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",en=mr?Symbol.for("immer-nothing"):((Zo={})["immer-nothing"]=!0,Zo),Yo=mr?Symbol.for("immer-draftable"):"__$immer_draftable",L=mr?Symbol.for("immer-state"):"__$immer_state";var Ai=""+Object.prototype.constructor,Re=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(r){var t={};return Re(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},dr={},tt={get:function(r,t){if(t===L)return r;var o=de(r);if(!Ne(o,t))return function(a,i,c){var u,d=Go(i,c);return d?"value"in d?d.value:(u=d.get)===null||u===void 0?void 0:u.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===ir(r.t,t)?(sr(r),r.o[t]=ur(r.A.h,n,r)):n},has:function(r,t){return t in de(r)},ownKeys:function(r){return Reflect.ownKeys(de(r))},set:function(r,t,o){var n=Go(de(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=ir(de(r),t),i=a?.[L];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Qo(o,a)&&(o!==void 0||Ne(r.t,t)))return!0;sr(r),pe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return ir(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,sr(r),pe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=de(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){G(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){G(12)}},Je={};ve(tt,function(r,t){Je[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Je.deleteProperty=function(r,t){return Je.set.call(this,r,t,void 0)},Je.set=function(r,t,o){return tt.set.call(this,r[0],t,o,r[0])};var Ni=function(){function r(o){var n=this;this.O=qo,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var u=i;i=a;var d=n;return function(S){var I=this;S===void 0&&(S=u);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return d.produce(S,function(R){var ee;return(ee=i).call.apply(ee,[I,R].concat(N))})}}var p;if(typeof i!="function"&&G(6),c!==void 0&&typeof c!="function"&&G(7),Y(a)){var h=jo(n),y=ur(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?Ot(h):lr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return nr(h,c),ar(S,h)},function(S){throw Ot(h),S}):(nr(h,c),ar(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===en&&(p=void 0),n.D&&yr(p,!0),c){var v=[],b=[];te("Patches").M(a,p,v,b),c(v,b)}return p}G(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return a.apply(void 0,[v].concat(y))})};var c,u,d=n.produce(a,i,function(p,h){c=p,u=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,u]}):[d,c,u]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||G(8),ne(o)&&(o=Ci(o));var n=jo(this),a=ur(this,o,void 0);return a[L].C=!0,lr(n),a},t.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return nr(i,n),ar(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!qo&&G(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var c=te("Patches").$;return ne(o)?c(o,n):this.produce(o,function(u){return c(u,n)})},r}(),j=new Ni,Ri=j.produce,vc=j.produceWithPatches.bind(j),Sc=j.setAutoFreeze.bind(j),Oc=j.setUseProxies.bind(j),Cc=j.applyPatches.bind(j),Ec=j.createDraft.bind(j),wc=j.finishDraft.bind(j),wt=Ri;function fe(r){"@babel/helpers - typeof";return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(r)}function br(r,t){if(fe(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(fe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function xr(r){var t=br(r,"string");return fe(t)==="symbol"?t:String(t)}function vr(r,t,o){return t=xr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function rn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function At(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(o),!0).forEach(function(n){vr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):rn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var on=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Sr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Nt={INIT:"@@redux/INIT"+Sr(),REPLACE:"@@redux/REPLACE"+Sr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Sr()}};function Ii(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Or(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Or)(r,t)}if(typeof r!="function")throw new Error(z(2));var a=r,i=t,c=[],u=c,d=!1;function p(){u===c&&(u=c.slice())}function h(){if(d)throw new Error(z(3));return i}function y(S){if(typeof S!="function")throw new Error(z(4));if(d)throw new Error(z(5));var I=!0;return p(),u.push(S),function(){if(I){if(d)throw new Error(z(6));I=!1,p();var N=u.indexOf(S);u.splice(N,1),c=null}}}function g(S){if(!Ii(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(d)throw new Error(z(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var I=c=u,A=0;A<I.length;A++){var N=I[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));a=S,g({type:Nt.REPLACE})}function b(){var S,I=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(z(11));function k(){N.next&&N.next(h())}k();var R=I(k);return{unsubscribe:R}}},S[on]=function(){return this},S}return g({type:Nt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[on]=b,n}function Pi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Nt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Nt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function nn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),c,u;try{Pi(o)}catch(d){u=d}return function(p,h){if(p===void 0&&(p={}),u)throw u;if(0)var y;for(var g=!1,v={},b=0;b<i.length;b++){var S=i[b],I=o[S],A=p[S],N=I(A,h);if(typeof N>"u"){var k=h&&h.type;throw new Error(z(14))}v[S]=N,g=g||N!==A}return g=g||i.length!==Object.keys(p).length,g?v:p}}function Pe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function an(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(z(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(d){return d(c)});return i=Pe.apply(void 0,u)(a.dispatch),At(At({},a),{},{dispatch:i})}}}function sn(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(u){return typeof u=="function"?u(a,i,r):c(u)}}};return t}var cn=sn();cn.withExtraArgument=sn;var Cr=cn;var fn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ti=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Te=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},ki=Object.defineProperty,Li=Object.defineProperties,_i=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,un=function(r,t,o){return t in r?ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},he=function(r,t){for(var o in t||(t={}))Fi.call(t,o)&&un(r,o,t[o]);if(ln)for(var n=0,a=ln(t);n<a.length;n++){var o=a[n];Ui.call(t,o)&&un(r,o,t[o])}return r},Er=function(r,t){return Li(r,_i(t))},Di=function(r,t,o){return new Promise(function(n,a){var i=function(d){try{u(o.next(d))}catch(p){a(p)}},c=function(d){try{u(o.throw(d))}catch(p){a(p)}},u=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,c)};u((o=o.apply(r,t)).next())})};var Mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pe:Pe.apply(null,arguments)},$c=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Wi=function(r){fn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Te([void 0],o[0].concat(this)))):new(t.bind.apply(t,Te([void 0],o.concat(this))))},t}(Array),zi=function(r){fn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Te([void 0],o[0].concat(this)))):new(t.bind.apply(t,Te([void 0],o.concat(this))))},t}(Array);function Nr(r){return Y(r)?wt(r,function(){}):r}function Hi(r){return typeof r=="boolean"}function $i(){return function(t){return ji(t)}}function ji(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,c=i===void 0?!0:i,u=new Wi;if(o&&(Hi(o)?u.push(Cr):u.push(Cr.withExtraArgument(o.extraArgument))),0){if(a)var d;if(c)var p}return u}var wr=!0;function hn(r){var t=$i(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?t():i,u=o.devTools,d=u===void 0?!0:u,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(Bi(a))v=nn(a);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 b=c;if(typeof b=="function"&&(b=b(t),!wr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wr&&b.some(function(R){return typeof R!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=an.apply(void 0,b),I=Pe;d&&(I=Mi(he({trace:!wr},typeof d=="object"&&d)));var A=new zi(S),N=A;Array.isArray(g)?N=Te([S],g):typeof g=="function"&&(N=g(A));var k=I.apply(void 0,N);return Or(v,h,k)}function ye(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return he(he({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function yn(r){var t={},o=[],n,a={addCase:function(i,c){var u=typeof i=="string"?i:i.type;if(u in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[u]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function Ki(r){return typeof r=="function"}function Gi(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?yn(t):[t,o,n],i=a[0],c=a[1],u=a[2],d;if(Ki(r))d=function(){return Nr(r())};else{var p=Nr(r);d=function(){return p}}function h(y,g){y===void 0&&(y=d());var v=Te([i[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[u]),v.reduce(function(b,S){if(S)if(ne(b)){var I=b,A=S(I,g);return A===void 0?b:A}else{if(Y(b))return wt(b,function(N){return S(N,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},y)}return h.getInitialState=d,h}function Vi(r,t){return r+"/"+t}function gn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Nr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},c={},u={};a.forEach(function(h){var y=n[h],g=Vi(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,i[h]=v,c[g]=v,u[h]=b?ye(g,b):ye(g)});function d(){var h=typeof r.extraReducers=="function"?yn(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],I=S===void 0?void 0:S,A=he(he({},g),c);return Gi(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var R=0,ee=b;R<ee.length;R++){var Z=ee[R];N.addMatcher(Z.matcher,Z.reducer)}I&&N.addDefaultCase(I)})}var p;return{name:t,reducer:function(h,y){return p||(p=d()),p(h,y)},actions:u,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Zi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Zi[Math.random()*64|0];return t},Yi=["name","message","stack","code"],Ar=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),dn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Xi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Yi;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},Vc=function(){function r(t,o,n){var a=ye(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Er(he({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=ye(t+"/pending",function(h,y,g){return{payload:void 0,meta:Er(he({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=ye(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||Xi)(h||"Rejected"),meta:Er(he({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),u=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):qi(),S=new d,I,A=!1;function N(R){I=R,S.abort()}var k=function(){return Di(this,null,function(){var R,ee,Z,W,ut,re,f;return Ti(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),W=(R=n?.condition)==null?void 0:R.call(n,h,{getState:g,extra:v}),Ji(W)?[4,W]:[3,2];case 1:W=m.sent(),m.label=2;case 2:if(W===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,ut=new Promise(function(C,_){return S.signal.addEventListener("abort",function(){return _({name:"AbortError",message:I||"Aborted"})})}),y(i(b,h,(ee=n?.getPendingMeta)==null?void 0:ee.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([ut,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(C,_){return new Ar(C,_)},fulfillWithValue:function(C,_){return new dn(C,_)}})).then(function(C){if(C instanceof Ar)throw C;return C instanceof dn?a(C.payload,b,h,C.meta):a(C,b,h)})])];case 3:return Z=m.sent(),[3,5];case 4:return re=m.sent(),Z=re instanceof Ar?c(null,b,h,re.payload,re.meta):c(re,b,h),[3,5];case 5:return f=n&&!n.dispatchConditionRejection&&c.match(Z)&&Z.meta.condition,f||y(Z),[2,Z]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:h,unwrap:function(){return k.then(Qi)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function Qi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ji(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var mn="listener",bn="completed",xn="cancelled",Zc="task-"+xn,qc="task-"+bn,Yc=mn+"-"+xn,Xc=mn+"-"+bn;var Rr="listenerMiddleware";var Qc=ye(Rr+"/add"),Jc=ye(Rr+"/removeAll"),el=ye(Rr+"/remove");var pn,tl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(pn||(pn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},es=function(r){return function(t){setTimeout(t,r)}},rl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:es(10);Jo();window.ftReduxStores||(window.ftReduxStores={});var vn=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Xe(i))return i;if(a==null)return;let c=gn({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),u=hn({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[a.name]=new r(c,u)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new gt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let c=a,u=n[c];return u?(...d)=>{let p=u(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Tt=O(T());var Rt=class extends oe{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var It=class extends oe{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var rs="ft-user-assets",Pt=Tt.FtReduxStore.get({name:rs,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ir=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new It,this.savedSearchesService=new Rt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Tt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Pt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Pt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Pt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Pt.actions.bookmarks(o)}}},Tl=new Ir;var Pr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Pr;var Sn=O(T()),Tr=class{highlightHtml(t,o){(0,Sn.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new Tr;var On=O(T());var kr=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return On.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new kr;(0,Cn.customElement)("ft-app-context")(F);var Lr=class r extends Event{constructor(){super(r.eventName)}};Lr.eventName="search-context-clear-all-filters";var os=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ur=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Fr=Symbol("registerInterval");function ns(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setSearchStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Fr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Fr]):this.dispatchEvent(new Ur)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Fr,os([(0,wn.state)()],o.prototype,"stateManager",void 0),o}var ke=class extends ns(En.FtLitElementRedux){};var Pn=O(T());var Rn=O(B()),rt=O($()),In=O(T());var An=O(B());var Nn=An.css`
9
+ `}update(t){super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("availableUiLocales")&&w.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ae.addContext(o)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};F.elementDefinitions={};F.styles=Ro;H([(0,K.property)()],F.prototype,"baseUrl",void 0);H([(0,K.property)()],F.prototype,"apiIntegrationIdentifier",void 0);H([(0,K.property)()],F.prototype,"uiLocale",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);H([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"editorMode",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"noCustom",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);H([(0,K.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"withManualResources",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);H([(0,K.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);H([(0,K.property)({type:Object})],F.prototype,"apiProvider",void 0);H([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);H([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);var ts=O($());function gi(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!yt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!yt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!yt(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function yt(r,t){try{return gi(r,t)}catch{return!1}}function or(r,t){return!yt(r,t)}var mi=O($(),1);var gt=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Ye=O($(),1);var ko=O($(),1);function Lo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,ko.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:or,...t??{}})}var mt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(u){a(u);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Fo=O(B(),1);var bt=window,bi=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,cc=Symbol();var _o=(r,t)=>{bi?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=bt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var xt=class extends Fo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return _o(n,t.elementStyles),n}};var vt=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Bo,Uo=Symbol("constructorPrototype"),Do=Symbol("constructorName"),Wo=Symbol("exportpartsDebouncer"),Mo=Symbol("dynamicDependenciesLoaded"),le=class extends xt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Bo]=new mt(5),this[Do]=this.constructor.name,this[Uo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Do]&&Object.setPrototypeOf(this,this[Uo])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[Mo]||(t[Mo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Wo].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,c,u;let d=g=>g!=null&&g.trim().length>0,p=t.filter(d).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(u=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(S=>S.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...b).filter(d).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Bo=Wo;vt([(0,Ye.property)()],le.prototype,"exportpartsPrefix",void 0);vt([Lo([])],le.prototype,"exportpartsPrefixes",void 0);vt([(0,Ye.property)()],le.prototype,"customStylesheet",void 0);vt([(0,Ye.state)()],le.prototype,"useAdoptedStyleSheets",void 0);function Xe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var zo,Ho,$o,St=Symbol("internalReduxEventsUnsubscribers"),ue=Symbol("internalStoresUnsubscribers"),xe=Symbol("internalStores"),Qe=class extends le{constructor(){super(...arguments),this[zo]=new Map,this[Ho]=new Map,this[$o]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[xe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[xe].get(t)}addStore(t,o){var n;o=(n=o??(Xe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[xe].delete(o)}setupStore(t,o){this[xe].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[xe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(t.store);a&&(t.store?this[ue].has(t.store):this[ue].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[ue].set(t,o.subscribe(()=>this.updateFromStores())),Xe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=u=>this[i](u);o.eventBus.addEventListener(a.eventName,c),this[St].push(()=>o.eventBus.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ue].forEach((t,o)=>this.unsubscribeFromStore(o)),this[St].forEach(t=>t()),this[St]=[]}unsubscribeFromStore(t){this[ue].has(t)&&this[ue].get(t)(),this[ue].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};zo=ue,Ho=xe,$o=St;Qe.reduxProperties=new Map;Qe.reduxReactiveProperties=new Set;Qe.reduxEventListeners=new Map;function G(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ai}(r)||Array.isArray(r)||!!r[Yo]||!!(!((t=r.constructor)===null||t===void 0)&&t[Yo])||pr(r)||fr(r))}function ve(r,t,o){o===void 0&&(o=!1),Ie(r)===0?(o?Object.keys:Re)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function Ie(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:pr(r)?2:fr(r)?3:0}function Ne(r,t){return Ie(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function xi(r,t){return Ie(r)===2?r.get(t):r[t]}function Xo(r,t,o){var n=Ie(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Qo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function pr(r){return Ei&&r instanceof Map}function fr(r){return wi&&r instanceof Set}function de(r){return r.o||r.t}function hr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=tn(r);delete t[L];for(var o=Re(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function yr(r,t){return t===void 0&&(t=!1),gr(r)||ne(r)||!Y(r)||(Ie(r)>1&&(r.set=r.add=r.clear=r.delete=vi),Object.freeze(r),t&&ve(r,function(o,n){return yr(n,!0)},!0)),r}function vi(){G(2)}function gr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function te(r){var t=dr[r];return t||G(18,r),t}function Si(r,t){dr[r]||(dr[r]=t)}function cr(){return et}function nr(r,t){t&&(te("Patches"),r.u=[],r.s=[],r.v=t)}function Ot(r){lr(r),r.p.forEach(Oi),r.p=null}function lr(r){r===et&&(et=r.l)}function jo(r){return et={p:[],l:et,h:r,m:!0,_:0}}function Oi(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function ar(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||te("ES5").S(t,r,n),n?(o[L].P&&(Ot(t),G(4)),Y(r)&&(r=Ct(t,r),t.l||Et(t,r)),t.u&&te("Patches").M(o[L].t,r,t.u,t.s)):r=Ct(t,o,[]),Ot(t),t.u&&t.v(t.u,t.s),r!==en?r:void 0}function Ct(r,t,o){if(gr(t))return t;var n=t[L];if(!n)return ve(t,function(u,d){return Ko(r,n,t,u,d,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Et(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=hr(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),ve(i,function(u,d){return Ko(r,n,a,u,d,o,c)}),Et(r,a,!1),o&&r.u&&te("Patches").N(n,o,r.u,r.s)}return n.o}function Ko(r,t,o,n,a,i,c){if(ne(a)){var u=Ct(r,a,i&&t&&t.i!==3&&!Ne(t.R,n)?i.concat(n):void 0);if(Xo(o,n,u),!ne(u))return;r.m=!1}else c&&o.add(a);if(Y(a)&&!gr(a)){if(!r.h.D&&r._<1)return;Ct(r,a),t&&t.A.l||Et(r,a)}}function Et(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&yr(t,o)}function ir(r,t){var o=r[L];return(o?de(o):r)[t]}function Go(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function pe(r){r.P||(r.P=!0,r.l&&pe(r.l))}function sr(r){r.o||(r.o=hr(r.t))}function ur(r,t,o){var n=pr(t)?te("MapSet").F(t,o):fr(t)?te("MapSet").T(t,o):r.O?function(a,i){var c=Array.isArray(a),u={i:c?1:0,A:i?i.A:cr(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=u,p=tt;c&&(d=[u],p=Je);var h=Proxy.revocable(d,p),y=h.revoke,g=h.proxy;return u.k=g,u.j=y,g}(t,o):te("ES5").J(t,o);return(o?o.A:cr()).p.push(n),n}function Ci(r){return ne(r)||G(22,r),function t(o){if(!Y(o))return o;var n,a=o[L],i=Ie(o);if(a){if(!a.P&&(a.i<4||!te("ES5").K(a)))return a.t;a.I=!0,n=Vo(o,i),a.I=!1}else n=Vo(o,i);return ve(n,function(c,u){a&&xi(a.t,c)===u||Xo(n,c,t(u))}),i===3?new Set(n):n}(r)}function Vo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return hr(r)}function Jo(){function r(c,u){var d=i[c];return d?d.enumerable=u:i[c]=d={configurable:!0,enumerable:u,get:function(){var p=this[L];return tt.get(p,c)},set:function(p){var h=this[L];tt.set(h,c,p)}},d}function t(c){for(var u=c.length-1;u>=0;u--){var d=c[u][L];if(!d.P)switch(d.i){case 5:n(d)&&pe(d);break;case 4:o(d)&&pe(d)}}}function o(c){for(var u=c.t,d=c.k,p=Re(d),h=p.length-1;h>=0;h--){var y=p[h];if(y!==L){var g=u[y];if(g===void 0&&!Ne(u,y))return!0;var v=d[y],b=v&&v[L];if(b?b.t!==g:!Qo(v,g))return!0}}var S=!!u[L];return p.length!==Re(u).length+(S?0:1)}function n(c){var u=c.k;if(u.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(u,u.length-1);if(d&&!d.get)return!0;for(var p=0;p<u.length;p++)if(!u.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&G(3,JSON.stringify(de(c)))}var i={};Si("ES5",{J:function(c,u){var d=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=tn(g);delete S[L];for(var I=Re(S),A=0;A<I.length;A++){var N=I[A];S[N]=r(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(d,c),h={i:d?5:4,A:u?u.A:cr(),P:!1,I:!1,R:{},l:u,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,L,{value:h,writable:!0}),p},S:function(c,u,d){d?ne(u)&&u[L].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[L];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)ve(v,function(R){R!==L&&(g[R]!==void 0||Ne(g,R)?b[R]||p(v[R]):(b[R]=!0,pe(y)))}),ve(g,function(R){v[R]!==void 0||Ne(v,R)||(b[R]=!1,pe(y))});else if(S===5){if(n(y)&&(pe(y),b.length=!0),v.length<g.length)for(var I=v.length;I<g.length;I++)b[I]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,g.length),k=0;k<N;k++)v.hasOwnProperty(k)||(b[k]=!0),b[k]===void 0&&p(v[k])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var Zo,et,mr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ei=typeof Map<"u",wi=typeof Set<"u",qo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",en=mr?Symbol.for("immer-nothing"):((Zo={})["immer-nothing"]=!0,Zo),Yo=mr?Symbol.for("immer-draftable"):"__$immer_draftable",L=mr?Symbol.for("immer-state"):"__$immer_state";var Ai=""+Object.prototype.constructor,Re=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,tn=Object.getOwnPropertyDescriptors||function(r){var t={};return Re(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},dr={},tt={get:function(r,t){if(t===L)return r;var o=de(r);if(!Ne(o,t))return function(a,i,c){var u,d=Go(i,c);return d?"value"in d?d.value:(u=d.get)===null||u===void 0?void 0:u.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===ir(r.t,t)?(sr(r),r.o[t]=ur(r.A.h,n,r)):n},has:function(r,t){return t in de(r)},ownKeys:function(r){return Reflect.ownKeys(de(r))},set:function(r,t,o){var n=Go(de(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=ir(de(r),t),i=a?.[L];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Qo(o,a)&&(o!==void 0||Ne(r.t,t)))return!0;sr(r),pe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return ir(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,sr(r),pe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=de(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){G(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){G(12)}},Je={};ve(tt,function(r,t){Je[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Je.deleteProperty=function(r,t){return Je.set.call(this,r,t,void 0)},Je.set=function(r,t,o){return tt.set.call(this,r[0],t,o,r[0])};var Ni=function(){function r(o){var n=this;this.O=qo,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var u=i;i=a;var d=n;return function(S){var I=this;S===void 0&&(S=u);for(var A=arguments.length,N=Array(A>1?A-1:0),k=1;k<A;k++)N[k-1]=arguments[k];return d.produce(S,function(R){var ee;return(ee=i).call.apply(ee,[I,R].concat(N))})}}var p;if(typeof i!="function"&&G(6),c!==void 0&&typeof c!="function"&&G(7),Y(a)){var h=jo(n),y=ur(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?Ot(h):lr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return nr(h,c),ar(S,h)},function(S){throw Ot(h),S}):(nr(h,c),ar(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===en&&(p=void 0),n.D&&yr(p,!0),c){var v=[],b=[];te("Patches").M(a,p,v,b),c(v,b)}return p}G(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return a.apply(void 0,[v].concat(y))})};var c,u,d=n.produce(a,i,function(p,h){c=p,u=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,u]}):[d,c,u]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||G(8),ne(o)&&(o=Ci(o));var n=jo(this),a=ur(this,o,void 0);return a[L].C=!0,lr(n),a},t.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return nr(i,n),ar(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!qo&&G(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var c=te("Patches").$;return ne(o)?c(o,n):this.produce(o,function(u){return c(u,n)})},r}(),j=new Ni,Ri=j.produce,vc=j.produceWithPatches.bind(j),Sc=j.setAutoFreeze.bind(j),Oc=j.setUseProxies.bind(j),Cc=j.applyPatches.bind(j),Ec=j.createDraft.bind(j),wc=j.finishDraft.bind(j),wt=Ri;function fe(r){"@babel/helpers - typeof";return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(r)}function br(r,t){if(fe(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(fe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function xr(r){var t=br(r,"string");return fe(t)==="symbol"?t:String(t)}function vr(r,t,o){return t=xr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function rn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function At(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(o),!0).forEach(function(n){vr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):rn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var on=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Sr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Nt={INIT:"@@redux/INIT"+Sr(),REPLACE:"@@redux/REPLACE"+Sr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Sr()}};function Ii(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Or(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Or)(r,t)}if(typeof r!="function")throw new Error(z(2));var a=r,i=t,c=[],u=c,d=!1;function p(){u===c&&(u=c.slice())}function h(){if(d)throw new Error(z(3));return i}function y(S){if(typeof S!="function")throw new Error(z(4));if(d)throw new Error(z(5));var I=!0;return p(),u.push(S),function(){if(I){if(d)throw new Error(z(6));I=!1,p();var N=u.indexOf(S);u.splice(N,1),c=null}}}function g(S){if(!Ii(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(d)throw new Error(z(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var I=c=u,A=0;A<I.length;A++){var N=I[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));a=S,g({type:Nt.REPLACE})}function b(){var S,I=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(z(11));function k(){N.next&&N.next(h())}k();var R=I(k);return{unsubscribe:R}}},S[on]=function(){return this},S}return g({type:Nt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[on]=b,n}function Pi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Nt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Nt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function nn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),c,u;try{Pi(o)}catch(d){u=d}return function(p,h){if(p===void 0&&(p={}),u)throw u;if(0)var y;for(var g=!1,v={},b=0;b<i.length;b++){var S=i[b],I=o[S],A=p[S],N=I(A,h);if(typeof N>"u"){var k=h&&h.type;throw new Error(z(14))}v[S]=N,g=g||N!==A}return g=g||i.length!==Object.keys(p).length,g?v:p}}function Pe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function an(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(z(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(d){return d(c)});return i=Pe.apply(void 0,u)(a.dispatch),At(At({},a),{},{dispatch:i})}}}function sn(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(u){return typeof u=="function"?u(a,i,r):c(u)}}};return t}var cn=sn();cn.withExtraArgument=sn;var Cr=cn;var fn=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ti=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Te=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},ki=Object.defineProperty,Li=Object.defineProperties,_i=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,un=function(r,t,o){return t in r?ki(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},he=function(r,t){for(var o in t||(t={}))Fi.call(t,o)&&un(r,o,t[o]);if(ln)for(var n=0,a=ln(t);n<a.length;n++){var o=a[n];Ui.call(t,o)&&un(r,o,t[o])}return r},Er=function(r,t){return Li(r,_i(t))},Di=function(r,t,o){return new Promise(function(n,a){var i=function(d){try{u(o.next(d))}catch(p){a(p)}},c=function(d){try{u(o.throw(d))}catch(p){a(p)}},u=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,c)};u((o=o.apply(r,t)).next())})};var Mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pe:Pe.apply(null,arguments)},$c=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Wi=function(r){fn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Te([void 0],o[0].concat(this)))):new(t.bind.apply(t,Te([void 0],o.concat(this))))},t}(Array),zi=function(r){fn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Te([void 0],o[0].concat(this)))):new(t.bind.apply(t,Te([void 0],o.concat(this))))},t}(Array);function Nr(r){return Y(r)?wt(r,function(){}):r}function Hi(r){return typeof r=="boolean"}function $i(){return function(t){return ji(t)}}function ji(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,c=i===void 0?!0:i,u=new Wi;if(o&&(Hi(o)?u.push(Cr):u.push(Cr.withExtraArgument(o.extraArgument))),0){if(a)var d;if(c)var p}return u}var wr=!0;function hn(r){var t=$i(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?t():i,u=o.devTools,d=u===void 0?!0:u,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(Bi(a))v=nn(a);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 b=c;if(typeof b=="function"&&(b=b(t),!wr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wr&&b.some(function(R){return typeof R!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=an.apply(void 0,b),I=Pe;d&&(I=Mi(he({trace:!wr},typeof d=="object"&&d)));var A=new zi(S),N=A;Array.isArray(g)?N=Te([S],g):typeof g=="function"&&(N=g(A));var k=I.apply(void 0,N);return Or(v,h,k)}function ye(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return he(he({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function yn(r){var t={},o=[],n,a={addCase:function(i,c){var u=typeof i=="string"?i:i.type;if(u in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[u]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function Ki(r){return typeof r=="function"}function Gi(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?yn(t):[t,o,n],i=a[0],c=a[1],u=a[2],d;if(Ki(r))d=function(){return Nr(r())};else{var p=Nr(r);d=function(){return p}}function h(y,g){y===void 0&&(y=d());var v=Te([i[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[u]),v.reduce(function(b,S){if(S)if(ne(b)){var I=b,A=S(I,g);return A===void 0?b:A}else{if(Y(b))return wt(b,function(N){return S(N,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},y)}return h.getInitialState=d,h}function Vi(r,t){return r+"/"+t}function gn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Nr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},c={},u={};a.forEach(function(h){var y=n[h],g=Vi(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,i[h]=v,c[g]=v,u[h]=b?ye(g,b):ye(g)});function d(){var h=typeof r.extraReducers=="function"?yn(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],I=S===void 0?void 0:S,A=he(he({},g),c);return Gi(o,function(N){for(var k in A)N.addCase(k,A[k]);for(var R=0,ee=b;R<ee.length;R++){var Z=ee[R];N.addMatcher(Z.matcher,Z.reducer)}I&&N.addDefaultCase(I)})}var p;return{name:t,reducer:function(h,y){return p||(p=d()),p(h,y)},actions:u,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Zi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Zi[Math.random()*64|0];return t},Yi=["name","message","stack","code"],Ar=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),dn=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Xi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Yi;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},Vc=function(){function r(t,o,n){var a=ye(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Er(he({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=ye(t+"/pending",function(h,y,g){return{payload:void 0,meta:Er(he({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=ye(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||Xi)(h||"Rejected"),meta:Er(he({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),u=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):qi(),S=new d,I,A=!1;function N(R){I=R,S.abort()}var k=function(){return Di(this,null,function(){var R,ee,Z,W,ut,re,f;return Ti(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),W=(R=n?.condition)==null?void 0:R.call(n,h,{getState:g,extra:v}),Ji(W)?[4,W]:[3,2];case 1:W=m.sent(),m.label=2;case 2:if(W===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,ut=new Promise(function(C,_){return S.signal.addEventListener("abort",function(){return _({name:"AbortError",message:I||"Aborted"})})}),y(i(b,h,(ee=n?.getPendingMeta)==null?void 0:ee.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([ut,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(C,_){return new Ar(C,_)},fulfillWithValue:function(C,_){return new dn(C,_)}})).then(function(C){if(C instanceof Ar)throw C;return C instanceof dn?a(C.payload,b,h,C.meta):a(C,b,h)})])];case 3:return Z=m.sent(),[3,5];case 4:return re=m.sent(),Z=re instanceof Ar?c(null,b,h,re.payload,re.meta):c(re,b,h),[3,5];case 5:return f=n&&!n.dispatchConditionRejection&&c.match(Z)&&Z.meta.condition,f||y(Z),[2,Z]}})})}();return Object.assign(k,{abort:N,requestId:b,arg:h,unwrap:function(){return k.then(Qi)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function Qi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ji(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var mn="listener",bn="completed",xn="cancelled",Zc="task-"+xn,qc="task-"+bn,Yc=mn+"-"+xn,Xc=mn+"-"+bn;var Rr="listenerMiddleware";var Qc=ye(Rr+"/add"),Jc=ye(Rr+"/removeAll"),el=ye(Rr+"/remove");var pn,tl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(pn||(pn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},es=function(r){return function(t){setTimeout(t,r)}},rl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:es(10);Jo();window.ftReduxStores||(window.ftReduxStores={});var vn=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Xe(i))return i;if(a==null)return;let c=gn({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),u=hn({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[a.name]=new r(c,u)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new gt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let c=a,u=n[c];return u?(...d)=>{let p=u(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Tt=O(T());var Rt=class extends oe{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var It=class extends oe{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var rs="ft-user-assets",Pt=Tt.FtReduxStore.get({name:rs,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ir=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new It,this.savedSearchesService=new Rt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Tt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Pt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Pt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Pt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Pt.actions.bookmarks(o)}}},Tl=new Ir;var Pr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Pr;var Sn=O(T()),Tr=class{highlightHtml(t,o,n){(0,Sn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Tr;var On=O(T());var kr=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return On.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new kr;(0,Cn.customElement)("ft-app-context")(F);var Lr=class r extends Event{constructor(){super(r.eventName)}};Lr.eventName="search-context-clear-all-filters";var os=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ur=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Fr=Symbol("registerInterval");function ns(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setSearchStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Fr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Fr]):this.dispatchEvent(new Ur)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Fr,os([(0,wn.state)()],o.prototype,"stateManager",void 0),o}var ke=class extends ns(En.FtLitElementRedux){};var Pn=O(T());var Rn=O(B()),rt=O($()),In=O(T());var An=O(B());var Nn=An.css`
10
10
  a {
11
11
  color: inherit;
12
12
  text-decoration: inherit;