@fluid-topics/ft-search-facet 1.2.73 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1992,7 +1992,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1992
1992
|
`;var hd=g(N()),yd=g(j());var qe=g(N());var Ko=g(N()),pp={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var o;let n=+((o=e.payload)!==null&&o!==void 0?o:20);t.request.paging.perPage=isNaN(n)?20:(0,Ko.minmax)(1,n,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]}},Ml=t=>Ko.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,suggestResults:void 0},reducers:pp});var fp=g(zl(),1);var Hl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Hl||(Hl={}));var Wl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Wl||(Wl={}));var Vl;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(Vl||(Vl={}));var $r;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})($r||($r={}));var Gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Gl||(Gl={}));var jl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(jl||(jl={}));var pr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(pr||(pr={}));var Kl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Kl||(Kl={}));var Zl;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Zl||(Zl={}));var ql;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ql||(ql={}));var Yl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Yl||(Yl={}));var Ql;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ql||(Ql={}));var Xl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Xl||(Xl={}));var Jl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Jl||(Jl={}));var ec;(function(t){t.ASC="ASC",t.DESC="DESC"})(ec||(ec={}));var tc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(tc||(tc={}));var Fr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Fr||(Fr={}));var rc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(rc||(rc={}));var oc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(oc||(oc={}));var nc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(nc||(nc={}));var ac;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ac||(ac={}));var jt;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(jt||(jt={}));var Mr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Mr||(Mr={}));var de;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(de||(de={}));var ic;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ic||(ic={}));var sc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(sc||(sc={}));var lc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(lc||(lc={}));var up={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN],[de.GENERATIVE_AI_EXPORT_USER]:[de.GENERATIVE_AI_USER]};function cc(t,e){return t===e||(up[t]??[]).some(o=>cc(o,e))}function dc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>cc(n,e))}var ud=g(N());var hc=g(D()),He=g(j()),at=g(N());var pc=g(D());var uc=pc.css`
|
|
1993
1993
|
`;var Yo=g(N()),hp="ft-app-info",ua=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},yp={session:(t,e)=>{(0,Yo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new ua(e.payload)),0))}},P=Yo.FtReduxStore.get({name:hp,reducers:yp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var bt=g(N());var fa=g(N());var ur=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=P.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Ur=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ur.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ur.await()}};var gt=class extends Ur{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new fa.CacheRegistry,this.cache=e?a.commonCache:new fa.CacheRegistry}clearCache(){this.cache.clearAll()}};var fc,mp=Symbol("clearAfterUnitTest"),Qo=class extends gt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[fc]=()=>{this.defaultMessages={},this.cache=new bt.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,bt.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new bt.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(a){!(a instanceof bt.CanceledPromiseError)&&o&&console.error(a)}return o&&await this.notify(e),n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,bt.delay)(0).then(()=>o()).catch(()=>null)))}};fc=mp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var zr=window.FluidTopicsI18nService,Xo=window.FluidTopicsCustomI18nService;var Ae=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},oe=class extends at.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=()=>ur.get(),this.messageContexts=[],this.cache=new at.CacheRegistry,this.cleanSessionDebouncer=new at.Debouncer}render(){return hc.html`
|
|
1994
1994
|
<slot></slot>
|
|
1995
|
-
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>zr.addContext(c)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),P.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};oe.elementDefinitions={};oe.styles=uc;Ae([(0,He.property)()],oe.prototype,"baseUrl",void 0);Ae([(0,He.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ae([(0,He.property)()],oe.prototype,"uiLocale",void 0);Ae([(0,at.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ae([(0,at.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ae([(0,He.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ae([(0,He.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ae([(0,at.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ae([(0,at.jsonProperty)(void 0)],oe.prototype,"session",void 0);Ae([(0,He.state)()],oe.prototype,"localesConfiguration",void 0);var ou=g(j());function gp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Jo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Jo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let s=a[n];if(!Jo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Jo(t,e){try{return gp(t,e)}catch{return!1}}function en(t,e){return!Jo(t,e)}var bp=g(j(),1);var tn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Hr=g(j(),1);var yc=g(j(),1);function mc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,yc.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:en,...e??{}})}var rn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);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 bc=g(D(),1);var on=globalThis,xp=on.ShadowRoot&&(on.ShadyCSS===void 0||on.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c0=Symbol();var gc=(t,e)=>{if(xp)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=on.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var nn=class extends bc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return gc(n,e.elementStyles),n}};function xc(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var uo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Cc,vc=Symbol("constructorPrototype"),Sc=Symbol("constructorName"),Ec=Symbol("exportpartsDebouncer"),Oc=Symbol("dynamicDependenciesLoaded"),Pt=class extends nn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Cc]=new rn(5),this[Sc]=this.constructor.name,this[vc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Sc]&&Object.setPrototypeOf(this,this[vc])}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 e=this.constructor;e[Oc]||(e[Oc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=xc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){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(e.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 e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Ec].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(e){var o,n,a,i,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(O=>O.trim()).forEach(O=>m.add(O))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Cc=Ec;uo([(0,Hr.property)()],Pt.prototype,"exportpartsPrefix",void 0);uo([mc([])],Pt.prototype,"exportpartsPrefixes",void 0);uo([(0,Hr.property)()],Pt.prototype,"customStylesheet",void 0);uo([(0,Hr.property)()],Pt.prototype,"elementToFocus",void 0);uo([(0,Hr.state)()],Pt.prototype,"useAdoptedStyleSheets",void 0);function fo(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var wc,Ac,Rc,ho=Symbol("internalReduxEventsUnsubscribers"),Kt=Symbol("internalStoresUnsubscribers"),fr=Symbol("internalStores"),yo=class extends Pt{constructor(){super(...arguments),this[wc]=new Map,this[Ac]=new Map,this[Rc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[fr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[fr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[fr].get(e)}addStore(e,o){var n;o=(n=o??(fo(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[fr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[fr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[fr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(e.store);a&&(e.store?this[Kt].has(e.store):this[Kt].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[Kt].set(e,o.subscribe(()=>this.updateFromStores())),this[ho].set(e,[]),fo(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 s=c=>this[i](c);o.addEventListener(a.eventName,s),this[ho].get(e).push(()=>o.removeEventListener(a.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Kt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Kt].has(e)&&this[Kt].get(e)(),this[Kt].delete(e),(o=this[ho].get(e))===null||o===void 0||o.forEach(n=>n()),this[ho].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};wc=Kt,Ac=fr,Rc=ho;yo.reduxProperties=new Map;yo.reduxReactiveProperties=new Set;yo.reduxEventListeners=new Map;function Xe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function _t(t){return!!t&&!!t[X]}function it(t){var e;return!!t&&(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)===Rp}(t)||Array.isArray(t)||!!t[kc]||!!(!((e=t.constructor)===null||e===void 0)&&e[kc])||Oa(t)||Ca(t))}function hr(t,e,o){o===void 0&&(o=!1),Gr(t)===0?(o?Object.keys:Vr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Gr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Oa(t)?2:Ca(t)?3:0}function Wr(t,e){return Gr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function vp(t,e){return Gr(t)===2?t.get(e):t[e]}function Dc(t,e,o){var n=Gr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Bc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Oa(t){return wp&&t instanceof Map}function Ca(t){return Ap&&t instanceof Set}function Zt(t){return t.o||t.t}function Ea(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Mc(t);delete e[X];for(var o=Vr(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function wa(t,e){return e===void 0&&(e=!1),Aa(t)||_t(t)||!it(t)||(Gr(t)>1&&(t.set=t.add=t.clear=t.delete=Sp),Object.freeze(t),e&&hr(t,function(o,n){return wa(n,!0)},!0)),t}function Sp(){Xe(2)}function Aa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function xt(t){var e=Sa[t];return e||Xe(18,t),e}function Op(t,e){Sa[t]||(Sa[t]=e)}function ba(){return go}function ha(t,e){e&&(xt("Patches"),t.u=[],t.s=[],t.v=e)}function an(t){xa(t),t.p.forEach(Cp),t.p=null}function xa(t){t===go&&(go=t.l)}function Nc(t){return go={p:[],l:go,h:t,m:!0,_:0}}function Cp(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function ya(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||xt("ES5").S(e,t,n),n?(o[X].P&&(an(e),Xe(4)),it(t)&&(t=sn(e,t),e.l||ln(e,t)),e.u&&xt("Patches").M(o[X].t,t,e.u,e.s)):t=sn(e,o,[]),an(e),e.u&&e.v(e.u,e.s),t!==Fc?t:void 0}function sn(t,e,o){if(Aa(e))return e;var n=e[X];if(!n)return hr(e,function(c,p){return Tc(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return ln(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Ea(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),hr(i,function(c,p){return Tc(t,n,a,c,p,o,s)}),ln(t,a,!1),o&&t.u&&xt("Patches").N(n,o,t.u,t.s)}return n.o}function Tc(t,e,o,n,a,i,s){if(_t(a)){var c=sn(t,a,i&&e&&e.i!==3&&!Wr(e.R,n)?i.concat(n):void 0);if(Dc(o,n,c),!_t(c))return;t.m=!1}else s&&o.add(a);if(it(a)&&!Aa(a)){if(!t.h.D&&t._<1)return;sn(t,a),e&&e.A.l||ln(t,a)}}function ln(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&wa(e,o)}function ma(t,e){var o=t[X];return(o?Zt(o):t)[e]}function Lc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function qt(t){t.P||(t.P=!0,t.l&&qt(t.l))}function ga(t){t.o||(t.o=Ea(t.t))}function va(t,e,o){var n=Oa(e)?xt("MapSet").F(e,o):Ca(e)?xt("MapSet").T(e,o):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:ba(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=c,u=bo;s&&(p=[c],u=mo);var m=Proxy.revocable(p,u),y=m.revoke,b=m.proxy;return c.k=b,c.j=y,b}(e,o):xt("ES5").J(e,o);return(o?o.A:ba()).p.push(n),n}function Ep(t){return _t(t)||Xe(22,t),function e(o){if(!it(o))return o;var n,a=o[X],i=Gr(o);if(a){if(!a.P&&(a.i<4||!xt("ES5").K(a)))return a.t;a.I=!0,n=Ic(o,i),a.I=!1}else n=Ic(o,i);return hr(n,function(s,c){a&&vp(a.t,s)===c||Dc(n,s,e(c))}),i===3?new Set(n):n}(t)}function Ic(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ea(t)}function $c(){function t(s,c){var p=i[s];return p?p.enumerable=c:i[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[X];return bo.get(u,s)},set:function(u){var m=this[X];bo.set(m,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][X];if(!p.P)switch(p.i){case 5:n(p)&&qt(p);break;case 4:o(p)&&qt(p)}}}function o(s){for(var c=s.t,p=s.k,u=Vr(p),m=u.length-1;m>=0;m--){var y=u[m];if(y!==X){var b=c[y];if(b===void 0&&!Wr(c,y))return!0;var S=p[y],v=S&&S[X];if(v?v.t!==b:!Bc(S,b))return!0}}var O=!!c[X];return u.length!==Vr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Xe(3,JSON.stringify(Zt(s)))}var i={};Op("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(y,b){if(y){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Mc(b);delete O[X];for(var I=Vr(O),T=0;T<I.length;T++){var L=I[T];O[L]=t(L,y||!!O[L].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(p,s),m={i:p?5:4,A:c?c.A:ba(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(s,c,p){p?_t(c)&&c[X].A===s&&e(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var y=m[X];if(y){var b=y.t,S=y.k,v=y.R,O=y.i;if(O===4)hr(S,function($){$!==X&&(b[$]!==void 0||Wr(b,$)?v[$]||u(S[$]):(v[$]=!0,qt(y)))}),hr(b,function($){S[$]!==void 0||Wr(S,$)||(v[$]=!1,qt(y))});else if(O===5){if(n(y)&&(qt(y),v.length=!0),S.length<b.length)for(var I=S.length;I<b.length;I++)v[I]=!1;else for(var T=b.length;T<S.length;T++)v[T]=!0;for(var L=Math.min(S.length,b.length),k=0;k<L;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&u(S[k])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Pc,go,Ra=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",wp=typeof Map<"u",Ap=typeof Set<"u",_c=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Fc=Ra?Symbol.for("immer-nothing"):((Pc={})["immer-nothing"]=!0,Pc),kc=Ra?Symbol.for("immer-draftable"):"__$immer_draftable",X=Ra?Symbol.for("immer-state"):"__$immer_state";var Rp=""+Object.prototype.constructor,Vr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Mc=Object.getOwnPropertyDescriptors||function(t){var e={};return Vr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Sa={},bo={get:function(t,e){if(e===X)return t;var o=Zt(t);if(!Wr(o,e))return function(a,i,s){var c,p=Lc(i,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!it(n)?n:n===ma(t.t,e)?(ga(t),t.o[e]=va(t.A.h,n,t)):n},has:function(t,e){return e in Zt(t)},ownKeys:function(t){return Reflect.ownKeys(Zt(t))},set:function(t,e,o){var n=Lc(Zt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=ma(Zt(t),e),i=a?.[X];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Bc(o,a)&&(o!==void 0||Wr(t.t,e)))return!0;ga(t),qt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ma(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ga(t),qt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Zt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Xe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Xe(12)}},mo={};hr(bo,function(t,e){mo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),mo.deleteProperty=function(t,e){return mo.set.call(this,t,e,void 0)},mo.set=function(t,e,o){return bo.set.call(this,t[0],e,o,t[0])};var Np=function(){function t(o){var n=this;this.O=_c,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var p=n;return function(O){var I=this;O===void 0&&(O=c);for(var T=arguments.length,L=Array(T>1?T-1:0),k=1;k<T;k++)L[k-1]=arguments[k];return p.produce(O,function($){var F;return(F=i).call.apply(F,[I,$].concat(L))})}}var u;if(typeof i!="function"&&Xe(6),s!==void 0&&typeof s!="function"&&Xe(7),it(a)){var m=Nc(n),y=va(n,a,void 0),b=!0;try{u=i(y),b=!1}finally{b?an(m):xa(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return ha(m,s),ya(O,m)},function(O){throw an(m),O}):(ha(m,s),ya(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Fc&&(u=void 0),n.D&&wa(u,!0),s){var S=[],v=[];xt("Patches").M(a,u,S,v),s(S,v)}return u}Xe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,y=Array(m>1?m-1:0),b=1;b<m;b++)y[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var s,c,p=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){it(o)||Xe(8),_t(o)&&(o=Ep(o));var n=Nc(this),a=va(this,o,void 0);return a[X].C=!0,xa(n),a},e.finishDraft=function(o,n){var a=o&&o[X],i=a.A;return ha(i,n),ya(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!_c&&Xe(20),this.O=o},e.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 s=xt("Patches").$;return _t(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),Ze=new Np,Tp=Ze.produce,C0=Ze.produceWithPatches.bind(Ze),E0=Ze.setAutoFreeze.bind(Ze),w0=Ze.setUseProxies.bind(Ze),A0=Ze.applyPatches.bind(Ze),R0=Ze.createDraft.bind(Ze),N0=Ze.finishDraft.bind(Ze),cn=Tp;function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function Uc(t,e){if(yr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zc(t){var e=Uc(t,"string");return yr(e)=="symbol"?e:e+""}function Hc(t,e,o){return(e=zc(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Wc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Na(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Wc(Object(o),!0).forEach(function(n){Hc(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Wc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ta=function(){return Math.random().toString(36).substring(7).split("").join(".")},dn={INIT:"@@redux/INIT"+Ta(),REPLACE:"@@redux/REPLACE"+Ta(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ta()}};function Lp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function La(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Re(1));return o(La)(t,e)}if(typeof t!="function")throw new Error(Re(2));var a=t,i=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function m(){if(p)throw new Error(Re(3));return i}function y(O){if(typeof O!="function")throw new Error(Re(4));if(p)throw new Error(Re(5));var I=!0;return u(),c.push(O),function(){if(I){if(p)throw new Error(Re(6));I=!1,u();var L=c.indexOf(O);c.splice(L,1),s=null}}}function b(O){if(!Lp(O))throw new Error(Re(7));if(typeof O.type>"u")throw new Error(Re(8));if(p)throw new Error(Re(9));try{p=!0,i=a(i,O)}finally{p=!1}for(var I=s=c,T=0;T<I.length;T++){var L=I[T];L()}return O}function S(O){if(typeof O!="function")throw new Error(Re(10));a=O,b({type:dn.REPLACE})}function v(){var O,I=y;return O={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(Re(11));function k(){L.next&&L.next(m())}k();var $=I(k);return{unsubscribe:$}}},O[Vc]=function(){return this},O}return b({type:dn.INIT}),n={dispatch:b,subscribe:y,getState:m,replaceReducer:S},n[Vc]=v,n}function Ip(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:dn.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof o(void 0,{type:dn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Gc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),s,c;try{Ip(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var b=!1,S={},v=0;v<i.length;v++){var O=i[v],I=o[O],T=u[O],L=I(T,m);if(typeof L>"u"){var k=m&&m.type;throw new Error(Re(14))}S[O]=L,b=b||L!==T}return b=b||i.length!==Object.keys(u).length,b?S:u}}function jr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function jc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Re(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return i=jr.apply(void 0,c)(a.dispatch),Na(Na({},a),{},{dispatch:i})}}}function Kc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Zc=Kc();Zc.withExtraArgument=Kc;var Ia=Zc;var Jc=function(){var t=function(e,o){return t=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])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Pp=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Kr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},_p=Object.defineProperty,kp=Object.defineProperties,Dp=Object.getOwnPropertyDescriptors,qc=Object.getOwnPropertySymbols,Bp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Yc=function(t,e,o){return e in t?_p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Yt=function(t,e){for(var o in e||(e={}))Bp.call(e,o)&&Yc(t,o,e[o]);if(qc)for(var n=0,a=qc(e);n<a.length;n++){var o=a[n];$p.call(e,o)&&Yc(t,o,e[o])}return t},Pa=function(t,e){return kp(t,Dp(e))},Fp=function(t,e,o){return new Promise(function(n,a){var i=function(p){try{c(o.next(p))}catch(u){a(u)}},s=function(p){try{c(o.throw(p))}catch(u){a(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,s)};c((o=o.apply(t,e)).next())})};var Mp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jr:jr.apply(null,arguments)},j0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var zp=function(t){Jc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Kr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Kr([void 0],o.concat(this))))},e}(Array),Hp=function(t){Jc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Kr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Kr([void 0],o.concat(this))))},e}(Array);function Da(t){return it(t)?cn(t,function(){}):t}function Wp(t){return typeof t=="boolean"}function Vp(){return function(e){return Gp(e)}}function Gp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,c=new zp;if(o&&(Wp(o)?c.push(Ia):c.push(Ia.withExtraArgument(o.extraArgument))),0){if(a)var p;if(s)var u}return c}var _a=!0;function ed(t){var e=Vp(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?e():i,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,y=o.enhancers,b=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(Up(a))S=Gc(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 v=s;if(typeof v=="function"&&(v=v(e),!_a&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!_a&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=jc.apply(void 0,v),I=jr;p&&(I=Mp(Yt({trace:!_a},typeof p=="object"&&p)));var T=new Hp(O),L=T;Array.isArray(b)?L=Kr([O],b):typeof b=="function"&&(L=b(T));var k=I.apply(void 0,L);return La(S,m,k)}function Qt(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Yt(Yt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function td(t){var e={},o=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function jp(t){return typeof t=="function"}function Kp(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?td(e):[e,o,n],i=a[0],s=a[1],c=a[2],p;if(jp(t))p=function(){return Da(t())};else{var u=Da(t);p=function(){return u}}function m(y,b){y===void 0&&(y=p());var S=Kr([i[b.type]],s.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(_t(v)){var I=v,T=O(I,b);return T===void 0?v:T}else{if(it(v))return cn(v,function(L){return O(L,b)});var T=O(v,b);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return v},y)}return m.getInitialState=p,m}function Zp(t,e){return t+"/"+e}function rd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Da(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var y=n[m],b=Zp(e,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,s[b]=S,c[m]=v?Qt(b,v):Qt(b)});function p(){var m=typeof t.extraReducers=="function"?td(t.extraReducers):[t.extraReducers],y=m[0],b=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,O=m[2],I=O===void 0?void 0:O,T=Yt(Yt({},b),s);return Kp(o,function(L){for(var k in T)L.addCase(k,T[k]);for(var $=0,F=v;$<F.length;$++){var Be=F[$];L.addMatcher(Be.matcher,Be.reducer)}I&&L.addDefaultCase(I)})}var u;return{name:e,reducer:function(m,y){return u||(u=p()),u(m,y)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var qp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=qp[Math.random()*64|0];return e},Qp=["name","message","stack","code"],ka=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Qc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Xp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Qp;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Y0=function(){function t(e,o,n){var a=Qt(e+"/fulfilled",function(m,y,b,S){return{payload:m,meta:Pa(Yt({},S||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),i=Qt(e+"/pending",function(m,y,b){return{payload:void 0,meta:Pa(Yt({},b||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),s=Qt(e+"/rejected",function(m,y,b,S,v){return{payload:S,error:(n&&n.serializeError||Xp)(m||"Rejected"),meta:Pa(Yt({},v||{}),{arg:b,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(y,b,S){var v=n?.idGenerator?n.idGenerator(m):Yp(),O=new p,I,T=!1;function L($){I=$,O.abort()}var k=function(){return Fp(this,null,function(){var $,F,Be,lt,Le,ct,me;return Pp(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),lt=($=n?.condition)==null?void 0:$.call(n,m,{getState:b,extra:S}),eu(lt)?[4,lt]:[3,2];case 1:lt=h.sent(),h.label=2;case 2:if(lt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,Le=new Promise(function(x,_){return O.signal.addEventListener("abort",function(){return _({name:"AbortError",message:I||"Aborted"})})}),y(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Le,Promise.resolve(o(m,{dispatch:y,getState:b,extra:S,requestId:v,signal:O.signal,abort:L,rejectWithValue:function(x,_){return new ka(x,_)},fulfillWithValue:function(x,_){return new Qc(x,_)}})).then(function(x){if(x instanceof ka)throw x;return x instanceof Qc?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return Be=h.sent(),[3,5];case 4:return ct=h.sent(),Be=ct instanceof ka?s(null,v,m,ct.payload,ct.meta):s(ct,v,m),[3,5];case 5:return me=n&&!n.dispatchConditionRejection&&s.match(Be)&&Be.meta.condition,me||y(Be),[2,Be]}})})}();return Object.assign(k,{abort:L,requestId:v,arg:m,unwrap:function(){return k.then(Jp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Jp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function eu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var od="listener",nd="completed",ad="cancelled",Q0="task-"+ad,X0="task-"+nd,J0=od+"-"+ad,eS=od+"-"+nd;var Ba="listenerMiddleware";var tS=Qt(Ba+"/add"),rS=Qt(Ba+"/removeAll"),oS=Qt(Ba+"/remove");var Xc,nS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Xc||(Xc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},tu=function(t){return function(e){setTimeout(e,t)}},aS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tu(10);$c();function ru(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var pn=class extends ru(Object){};window.ftReduxStores||(window.ftReduxStores={});var id=class t extends pn{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(fo(i))return i;if(a==null)return;let s=rd({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=ed({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new tn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let p=s,u=i[p];return u?(...m)=>{let y=u(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[p]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var yn=g(N());var un=class extends gt{async listMySearches(){let{session:e}=P.getState();return dc(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var fn=class extends gt{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var nu="ft-user-assets",hn=yn.FtReduxStore.get({name:nu,initialState:{savedSearches:void 0,bookmarks:void 0}}),$a=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fn,this.savedSearchesService=new un,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,yn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),hn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),hn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();hn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;hn.actions.bookmarks(o)}}},sd=new $a;var Fa=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var ld=g(N()),Ma=class{highlightHtml(e,o,n){(0,ld.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ma;var cd=g(N());var Ua=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return cd.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ua;var dd=g(N());var xo=class{static get(e,o){var n,a,i,s;let c=P.getState(),{lang:p,region:u}=(a=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new dd.SearchPlaceConverter(c.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var mn=class extends Ur{async sendDocumentStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.start_display event"),console.debug(o)})}async sendTopicStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send topic.start_display event"),console.debug(o)})}async sendKhubSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send khub.search event"),console.debug(o)})}async sendDocumentSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.search event"),console.debug(o)})}async sendSearchPageSelectEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_page.select event"),console.debug(o)})}async sendSearchResultOpenContextMenuEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_result.open_context_menu event"),console.debug(o)})}};var za=class{urlToSearchRequest(e){return xo.get().parse(e)}searchRequestToUrl(e){return xo.get().serialize(e)}};window.FluidTopicsUrlService=new za;var Xt=g(N());var mr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};mr.eventName="change";var Ha=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},pd=new Ha;var gn=class t extends Xt.WithEventBus{static build(){return new t(window.history,pd,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mr(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...i,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var n,a,i;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},c=o?(a=e?.majorState)!==null&&a!==void 0?a:this.currentState.majorState:(i=this.currentState.majorState)!==null&&i!==void 0?i:e?.majorState;c!=null&&(s.majorState=c),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(mr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(mr.eventName,e)}currentItem(){return(0,Xt.deepCopy)(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Xt.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return(0,Xt.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,n;return this.hasState(e)&&((n=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,ud.customElement)("ft-app-context")(oe);var bn=class extends gt{constructor(e){super(!0,e),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([a],[i])=>a.localeCompare(i)))}async launchSearch(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,a)=>n.id.localeCompare(a.id))};return this.cache.get("search-"+this.hash(o),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(o),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(o=>o.valueFilter==null?o:{...o,valueFilter:{...o.valueFilter,values:[...o.valueFilter.values].sort((n,a)=>n.localeCompare(a))}}).sort((o,n)=>o.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var au=t=>t.request.virtualField===Fr.TITLE_ONLY&&t.request.scope===Mr.DOCUMENTS,Zr=class t extends Event{constructor(){super(t.eventName)}};Zr.eventName="search-context-clear-all-filters";var vo=class t{static build(e,o){return new t(Ml(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new qe.Debouncer(10),this.searchDebouncer=new qe.Debouncer(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(a=>({id:a}))}),this.suggestDebouncer=new qe.Debouncer(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=o??new bn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=(0,qe.watch)(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=(0,qe.watch)(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var o;let n=(o=this.store.getState().locales)!==null&&o!==void 0?o:[],a=this.store.getState().request.contentLocale;if(e!=a){if(n.length>0){let i=s=>n.some(c=>c.lang==s);i(e)||(e=i(a)?a:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Fr.TITLE_ONLY),this.store.actions.setRequestScope(Mr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Fr.EVERYWHERE),this.store.actions.setRequestScope(Mr.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return au(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Zr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,o){let n=this.facetIds.filter(a=>a!=e);o&&n.push(o),this.facetIds=n}get facetIds(){var e;let o=this.store.getState().request;return[...new Set([...o.facets.map(n=>n.id),...((e=o.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(a=>({id:a}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,a={key:e,valueFilter:{values:o,negative:!1}},i=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==a.key),a];this.setFilters(i)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,a={key:e,dateFilter:{type:o}},i=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==a.key),a];this.setFilters(i)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(a=>!a.dateFilter),...o.filter(a=>a.dateFilter&&a.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let a=this.store.getState().request.metadataFilters,i={key:e,rangeFilter:{from:o,to:n}},s=[...a.filter(c=>!c.rangeFilter),...a.filter(c=>c.rangeFilter&&c.key!==i.key),i];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(a=>!a.rangeFilter),...o.filter(a=>a.rangeFilter&&a.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var o,n,a,i;try{if((o=this.cancelableSearch)===null||o===void 0||o.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=(0,qe.cancelable)(this.service.launchSearch(e));let s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.results(s.results),this.store.actions.facets(s.facets),this.store.actions.spellcheck(s.spellcheck);else{let c=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(s.results);this.store.actions.results(c),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(s.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(s.paging)}}catch(s){s instanceof qe.CanceledPromiseError||(console.error(s),(i=this.errorHandler)===null||i===void 0||i.call(this,s))}}async fetchSuggestData(e){var o;try{(o=this.cancelableSuggest)===null||o===void 0||o.cancel(),this.cancelableSuggest=(0,qe.cancelable)(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof qe.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var iu=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Va=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},fd=Symbol("registerInterval"),Wa=Symbol("registerAttempts"),su=40;function lu(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Wa]=0,this[fd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Wa]>su?window.clearInterval(this[fd]):(this[Wa]++,this.dispatchEvent(new Va))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return iu([(0,yd.state)()],e.prototype,"stateManager",void 0),e}var xn=class extends lu(hd.FtLitElementRedux){};function md(t){return t.rootNodes.map(e=>gd(e))}function gd(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>gd(o,t.selected)),count:t.totalResultsCount}}var Ad=g(N());var En=g(D()),wn=g(j()),An=g(N());var bd=g(D());var xd=bd.css`
|
|
1995
|
+
`}update(e){var o,n,a,i,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>zr.addContext(c)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),P.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};oe.elementDefinitions={};oe.styles=uc;Ae([(0,He.property)()],oe.prototype,"baseUrl",void 0);Ae([(0,He.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ae([(0,He.property)()],oe.prototype,"uiLocale",void 0);Ae([(0,at.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ae([(0,at.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ae([(0,He.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ae([(0,He.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ae([(0,He.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ae([(0,at.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ae([(0,at.jsonProperty)(void 0)],oe.prototype,"session",void 0);Ae([(0,He.state)()],oe.prototype,"localesConfiguration",void 0);var ou=g(j());function gp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Jo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Jo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let s=a[n];if(!Jo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Jo(t,e){try{return gp(t,e)}catch{return!1}}function en(t,e){return!Jo(t,e)}var bp=g(j(),1);var tn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Hr=g(j(),1);var yc=g(j(),1);function mc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,yc.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:en,...e??{}})}var rn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);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 bc=g(D(),1);var on=globalThis,xp=on.ShadowRoot&&(on.ShadyCSS===void 0||on.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c0=Symbol();var gc=(t,e)=>{if(xp)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=on.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var nn=class extends bc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return gc(n,e.elementStyles),n}};function xc(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var uo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Cc,vc=Symbol("constructorPrototype"),Sc=Symbol("constructorName"),Ec=Symbol("exportpartsDebouncer"),Oc=Symbol("dynamicDependenciesLoaded"),Pt=class extends nn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Cc]=new rn(5),this[Sc]=this.constructor.name,this[vc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Sc]&&Object.setPrototypeOf(this,this[vc])}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 e=this.constructor;e[Oc]||(e[Oc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=xc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){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(e.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 e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Ec].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(e){var o,n,a,i,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(O=>O.trim()).forEach(O=>m.add(O))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Cc=Ec;uo([(0,Hr.property)()],Pt.prototype,"exportpartsPrefix",void 0);uo([mc([])],Pt.prototype,"exportpartsPrefixes",void 0);uo([(0,Hr.property)()],Pt.prototype,"customStylesheet",void 0);uo([(0,Hr.property)()],Pt.prototype,"elementToFocus",void 0);uo([(0,Hr.state)()],Pt.prototype,"useAdoptedStyleSheets",void 0);function fo(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var wc,Ac,Rc,ho=Symbol("internalReduxEventsUnsubscribers"),Kt=Symbol("internalStoresUnsubscribers"),fr=Symbol("internalStores"),yo=class extends Pt{constructor(){super(...arguments),this[wc]=new Map,this[Ac]=new Map,this[Rc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[fr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[fr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[fr].get(e)}addStore(e,o){var n;o=(n=o??(fo(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[fr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[fr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[fr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(e.store);a&&(e.store?this[Kt].has(e.store):this[Kt].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[Kt].set(e,o.subscribe(()=>this.updateFromStores())),this[ho].set(e,[]),fo(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 s=c=>this[i](c);o.addEventListener(a.eventName,s),this[ho].get(e).push(()=>o.removeEventListener(a.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Kt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Kt].has(e)&&this[Kt].get(e)(),this[Kt].delete(e),(o=this[ho].get(e))===null||o===void 0||o.forEach(n=>n()),this[ho].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};wc=Kt,Ac=fr,Rc=ho;yo.reduxProperties=new Map;yo.reduxReactiveProperties=new Set;yo.reduxEventListeners=new Map;function Xe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function _t(t){return!!t&&!!t[X]}function it(t){var e;return!!t&&(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)===Rp}(t)||Array.isArray(t)||!!t[kc]||!!(!((e=t.constructor)===null||e===void 0)&&e[kc])||Oa(t)||Ca(t))}function hr(t,e,o){o===void 0&&(o=!1),Gr(t)===0?(o?Object.keys:Vr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Gr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Oa(t)?2:Ca(t)?3:0}function Wr(t,e){return Gr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function vp(t,e){return Gr(t)===2?t.get(e):t[e]}function Dc(t,e,o){var n=Gr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Bc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Oa(t){return wp&&t instanceof Map}function Ca(t){return Ap&&t instanceof Set}function Zt(t){return t.o||t.t}function Ea(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Mc(t);delete e[X];for(var o=Vr(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function wa(t,e){return e===void 0&&(e=!1),Aa(t)||_t(t)||!it(t)||(Gr(t)>1&&(t.set=t.add=t.clear=t.delete=Sp),Object.freeze(t),e&&hr(t,function(o,n){return wa(n,!0)},!0)),t}function Sp(){Xe(2)}function Aa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function xt(t){var e=Sa[t];return e||Xe(18,t),e}function Op(t,e){Sa[t]||(Sa[t]=e)}function ba(){return go}function ha(t,e){e&&(xt("Patches"),t.u=[],t.s=[],t.v=e)}function an(t){xa(t),t.p.forEach(Cp),t.p=null}function xa(t){t===go&&(go=t.l)}function Nc(t){return go={p:[],l:go,h:t,m:!0,_:0}}function Cp(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function ya(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||xt("ES5").S(e,t,n),n?(o[X].P&&(an(e),Xe(4)),it(t)&&(t=sn(e,t),e.l||ln(e,t)),e.u&&xt("Patches").M(o[X].t,t,e.u,e.s)):t=sn(e,o,[]),an(e),e.u&&e.v(e.u,e.s),t!==Fc?t:void 0}function sn(t,e,o){if(Aa(e))return e;var n=e[X];if(!n)return hr(e,function(c,p){return Tc(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return ln(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Ea(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),hr(i,function(c,p){return Tc(t,n,a,c,p,o,s)}),ln(t,a,!1),o&&t.u&&xt("Patches").N(n,o,t.u,t.s)}return n.o}function Tc(t,e,o,n,a,i,s){if(_t(a)){var c=sn(t,a,i&&e&&e.i!==3&&!Wr(e.R,n)?i.concat(n):void 0);if(Dc(o,n,c),!_t(c))return;t.m=!1}else s&&o.add(a);if(it(a)&&!Aa(a)){if(!t.h.D&&t._<1)return;sn(t,a),e&&e.A.l||ln(t,a)}}function ln(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&wa(e,o)}function ma(t,e){var o=t[X];return(o?Zt(o):t)[e]}function Lc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function qt(t){t.P||(t.P=!0,t.l&&qt(t.l))}function ga(t){t.o||(t.o=Ea(t.t))}function va(t,e,o){var n=Oa(e)?xt("MapSet").F(e,o):Ca(e)?xt("MapSet").T(e,o):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:ba(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=c,u=bo;s&&(p=[c],u=mo);var m=Proxy.revocable(p,u),y=m.revoke,b=m.proxy;return c.k=b,c.j=y,b}(e,o):xt("ES5").J(e,o);return(o?o.A:ba()).p.push(n),n}function Ep(t){return _t(t)||Xe(22,t),function e(o){if(!it(o))return o;var n,a=o[X],i=Gr(o);if(a){if(!a.P&&(a.i<4||!xt("ES5").K(a)))return a.t;a.I=!0,n=Ic(o,i),a.I=!1}else n=Ic(o,i);return hr(n,function(s,c){a&&vp(a.t,s)===c||Dc(n,s,e(c))}),i===3?new Set(n):n}(t)}function Ic(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ea(t)}function $c(){function t(s,c){var p=i[s];return p?p.enumerable=c:i[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[X];return bo.get(u,s)},set:function(u){var m=this[X];bo.set(m,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][X];if(!p.P)switch(p.i){case 5:n(p)&&qt(p);break;case 4:o(p)&&qt(p)}}}function o(s){for(var c=s.t,p=s.k,u=Vr(p),m=u.length-1;m>=0;m--){var y=u[m];if(y!==X){var b=c[y];if(b===void 0&&!Wr(c,y))return!0;var S=p[y],v=S&&S[X];if(v?v.t!==b:!Bc(S,b))return!0}}var O=!!c[X];return u.length!==Vr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Xe(3,JSON.stringify(Zt(s)))}var i={};Op("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(y,b){if(y){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Mc(b);delete O[X];for(var I=Vr(O),T=0;T<I.length;T++){var L=I[T];O[L]=t(L,y||!!O[L].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(p,s),m={i:p?5:4,A:c?c.A:ba(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(s,c,p){p?_t(c)&&c[X].A===s&&e(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var y=m[X];if(y){var b=y.t,S=y.k,v=y.R,O=y.i;if(O===4)hr(S,function($){$!==X&&(b[$]!==void 0||Wr(b,$)?v[$]||u(S[$]):(v[$]=!0,qt(y)))}),hr(b,function($){S[$]!==void 0||Wr(S,$)||(v[$]=!1,qt(y))});else if(O===5){if(n(y)&&(qt(y),v.length=!0),S.length<b.length)for(var I=S.length;I<b.length;I++)v[I]=!1;else for(var T=b.length;T<S.length;T++)v[T]=!0;for(var L=Math.min(S.length,b.length),k=0;k<L;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&u(S[k])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Pc,go,Ra=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",wp=typeof Map<"u",Ap=typeof Set<"u",_c=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Fc=Ra?Symbol.for("immer-nothing"):((Pc={})["immer-nothing"]=!0,Pc),kc=Ra?Symbol.for("immer-draftable"):"__$immer_draftable",X=Ra?Symbol.for("immer-state"):"__$immer_state";var Rp=""+Object.prototype.constructor,Vr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Mc=Object.getOwnPropertyDescriptors||function(t){var e={};return Vr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Sa={},bo={get:function(t,e){if(e===X)return t;var o=Zt(t);if(!Wr(o,e))return function(a,i,s){var c,p=Lc(i,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!it(n)?n:n===ma(t.t,e)?(ga(t),t.o[e]=va(t.A.h,n,t)):n},has:function(t,e){return e in Zt(t)},ownKeys:function(t){return Reflect.ownKeys(Zt(t))},set:function(t,e,o){var n=Lc(Zt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=ma(Zt(t),e),i=a?.[X];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Bc(o,a)&&(o!==void 0||Wr(t.t,e)))return!0;ga(t),qt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return ma(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ga(t),qt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Zt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Xe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Xe(12)}},mo={};hr(bo,function(t,e){mo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),mo.deleteProperty=function(t,e){return mo.set.call(this,t,e,void 0)},mo.set=function(t,e,o){return bo.set.call(this,t[0],e,o,t[0])};var Np=function(){function t(o){var n=this;this.O=_c,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var p=n;return function(O){var I=this;O===void 0&&(O=c);for(var T=arguments.length,L=Array(T>1?T-1:0),k=1;k<T;k++)L[k-1]=arguments[k];return p.produce(O,function($){var F;return(F=i).call.apply(F,[I,$].concat(L))})}}var u;if(typeof i!="function"&&Xe(6),s!==void 0&&typeof s!="function"&&Xe(7),it(a)){var m=Nc(n),y=va(n,a,void 0),b=!0;try{u=i(y),b=!1}finally{b?an(m):xa(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return ha(m,s),ya(O,m)},function(O){throw an(m),O}):(ha(m,s),ya(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Fc&&(u=void 0),n.D&&wa(u,!0),s){var S=[],v=[];xt("Patches").M(a,u,S,v),s(S,v)}return u}Xe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,y=Array(m>1?m-1:0),b=1;b<m;b++)y[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var s,c,p=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){it(o)||Xe(8),_t(o)&&(o=Ep(o));var n=Nc(this),a=va(this,o,void 0);return a[X].C=!0,xa(n),a},e.finishDraft=function(o,n){var a=o&&o[X],i=a.A;return ha(i,n),ya(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!_c&&Xe(20),this.O=o},e.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 s=xt("Patches").$;return _t(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),Ze=new Np,Tp=Ze.produce,C0=Ze.produceWithPatches.bind(Ze),E0=Ze.setAutoFreeze.bind(Ze),w0=Ze.setUseProxies.bind(Ze),A0=Ze.applyPatches.bind(Ze),R0=Ze.createDraft.bind(Ze),N0=Ze.finishDraft.bind(Ze),cn=Tp;function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function Uc(t,e){if(yr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zc(t){var e=Uc(t,"string");return yr(e)=="symbol"?e:e+""}function Hc(t,e,o){return(e=zc(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Wc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Na(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Wc(Object(o),!0).forEach(function(n){Hc(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Wc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ta=function(){return Math.random().toString(36).substring(7).split("").join(".")},dn={INIT:"@@redux/INIT"+Ta(),REPLACE:"@@redux/REPLACE"+Ta(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ta()}};function Lp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function La(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Re(1));return o(La)(t,e)}if(typeof t!="function")throw new Error(Re(2));var a=t,i=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function m(){if(p)throw new Error(Re(3));return i}function y(O){if(typeof O!="function")throw new Error(Re(4));if(p)throw new Error(Re(5));var I=!0;return u(),c.push(O),function(){if(I){if(p)throw new Error(Re(6));I=!1,u();var L=c.indexOf(O);c.splice(L,1),s=null}}}function b(O){if(!Lp(O))throw new Error(Re(7));if(typeof O.type>"u")throw new Error(Re(8));if(p)throw new Error(Re(9));try{p=!0,i=a(i,O)}finally{p=!1}for(var I=s=c,T=0;T<I.length;T++){var L=I[T];L()}return O}function S(O){if(typeof O!="function")throw new Error(Re(10));a=O,b({type:dn.REPLACE})}function v(){var O,I=y;return O={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(Re(11));function k(){L.next&&L.next(m())}k();var $=I(k);return{unsubscribe:$}}},O[Vc]=function(){return this},O}return b({type:dn.INIT}),n={dispatch:b,subscribe:y,getState:m,replaceReducer:S},n[Vc]=v,n}function Ip(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:dn.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof o(void 0,{type:dn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Gc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),s,c;try{Ip(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var b=!1,S={},v=0;v<i.length;v++){var O=i[v],I=o[O],T=u[O],L=I(T,m);if(typeof L>"u"){var k=m&&m.type;throw new Error(Re(14))}S[O]=L,b=b||L!==T}return b=b||i.length!==Object.keys(u).length,b?S:u}}function jr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function jc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Re(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return i=jr.apply(void 0,c)(a.dispatch),Na(Na({},a),{},{dispatch:i})}}}function Kc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Zc=Kc();Zc.withExtraArgument=Kc;var Ia=Zc;var Jc=function(){var t=function(e,o){return t=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])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Pp=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Kr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},_p=Object.defineProperty,kp=Object.defineProperties,Dp=Object.getOwnPropertyDescriptors,qc=Object.getOwnPropertySymbols,Bp=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable,Yc=function(t,e,o){return e in t?_p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Yt=function(t,e){for(var o in e||(e={}))Bp.call(e,o)&&Yc(t,o,e[o]);if(qc)for(var n=0,a=qc(e);n<a.length;n++){var o=a[n];$p.call(e,o)&&Yc(t,o,e[o])}return t},Pa=function(t,e){return kp(t,Dp(e))},Fp=function(t,e,o){return new Promise(function(n,a){var i=function(p){try{c(o.next(p))}catch(u){a(u)}},s=function(p){try{c(o.throw(p))}catch(u){a(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,s)};c((o=o.apply(t,e)).next())})};var Mp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jr:jr.apply(null,arguments)},j0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var zp=function(t){Jc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Kr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Kr([void 0],o.concat(this))))},e}(Array),Hp=function(t){Jc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.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(e.bind.apply(e,Kr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Kr([void 0],o.concat(this))))},e}(Array);function Da(t){return it(t)?cn(t,function(){}):t}function Wp(t){return typeof t=="boolean"}function Vp(){return function(e){return Gp(e)}}function Gp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,c=new zp;if(o&&(Wp(o)?c.push(Ia):c.push(Ia.withExtraArgument(o.extraArgument))),0){if(a)var p;if(s)var u}return c}var _a=!0;function ed(t){var e=Vp(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?e():i,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,y=o.enhancers,b=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(Up(a))S=Gc(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 v=s;if(typeof v=="function"&&(v=v(e),!_a&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!_a&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=jc.apply(void 0,v),I=jr;p&&(I=Mp(Yt({trace:!_a},typeof p=="object"&&p)));var T=new Hp(O),L=T;Array.isArray(b)?L=Kr([O],b):typeof b=="function"&&(L=b(T));var k=I.apply(void 0,L);return La(S,m,k)}function Qt(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Yt(Yt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function td(t){var e={},o=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function jp(t){return typeof t=="function"}function Kp(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?td(e):[e,o,n],i=a[0],s=a[1],c=a[2],p;if(jp(t))p=function(){return Da(t())};else{var u=Da(t);p=function(){return u}}function m(y,b){y===void 0&&(y=p());var S=Kr([i[b.type]],s.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(_t(v)){var I=v,T=O(I,b);return T===void 0?v:T}else{if(it(v))return cn(v,function(L){return O(L,b)});var T=O(v,b);if(T===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return v},y)}return m.getInitialState=p,m}function Zp(t,e){return t+"/"+e}function rd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Da(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var y=n[m],b=Zp(e,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,s[b]=S,c[m]=v?Qt(b,v):Qt(b)});function p(){var m=typeof t.extraReducers=="function"?td(t.extraReducers):[t.extraReducers],y=m[0],b=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,O=m[2],I=O===void 0?void 0:O,T=Yt(Yt({},b),s);return Kp(o,function(L){for(var k in T)L.addCase(k,T[k]);for(var $=0,F=v;$<F.length;$++){var Be=F[$];L.addMatcher(Be.matcher,Be.reducer)}I&&L.addDefaultCase(I)})}var u;return{name:e,reducer:function(m,y){return u||(u=p()),u(m,y)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var qp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=qp[Math.random()*64|0];return e},Qp=["name","message","stack","code"],ka=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Qc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Xp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Qp;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Y0=function(){function t(e,o,n){var a=Qt(e+"/fulfilled",function(m,y,b,S){return{payload:m,meta:Pa(Yt({},S||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),i=Qt(e+"/pending",function(m,y,b){return{payload:void 0,meta:Pa(Yt({},b||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),s=Qt(e+"/rejected",function(m,y,b,S,v){return{payload:S,error:(n&&n.serializeError||Xp)(m||"Rejected"),meta:Pa(Yt({},v||{}),{arg:b,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(y,b,S){var v=n?.idGenerator?n.idGenerator(m):Yp(),O=new p,I,T=!1;function L($){I=$,O.abort()}var k=function(){return Fp(this,null,function(){var $,F,Be,lt,Le,ct,me;return Pp(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),lt=($=n?.condition)==null?void 0:$.call(n,m,{getState:b,extra:S}),eu(lt)?[4,lt]:[3,2];case 1:lt=h.sent(),h.label=2;case 2:if(lt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,Le=new Promise(function(x,_){return O.signal.addEventListener("abort",function(){return _({name:"AbortError",message:I||"Aborted"})})}),y(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Le,Promise.resolve(o(m,{dispatch:y,getState:b,extra:S,requestId:v,signal:O.signal,abort:L,rejectWithValue:function(x,_){return new ka(x,_)},fulfillWithValue:function(x,_){return new Qc(x,_)}})).then(function(x){if(x instanceof ka)throw x;return x instanceof Qc?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return Be=h.sent(),[3,5];case 4:return ct=h.sent(),Be=ct instanceof ka?s(null,v,m,ct.payload,ct.meta):s(ct,v,m),[3,5];case 5:return me=n&&!n.dispatchConditionRejection&&s.match(Be)&&Be.meta.condition,me||y(Be),[2,Be]}})})}();return Object.assign(k,{abort:L,requestId:v,arg:m,unwrap:function(){return k.then(Jp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Jp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function eu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var od="listener",nd="completed",ad="cancelled",Q0="task-"+ad,X0="task-"+nd,J0=od+"-"+ad,eS=od+"-"+nd;var Ba="listenerMiddleware";var tS=Qt(Ba+"/add"),rS=Qt(Ba+"/removeAll"),oS=Qt(Ba+"/remove");var Xc,nS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Xc||(Xc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},tu=function(t){return function(e){setTimeout(e,t)}},aS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tu(10);$c();function ru(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var pn=class extends ru(Object){};window.ftReduxStores||(window.ftReduxStores={});var id=class t extends pn{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(fo(i))return i;if(a==null)return;let s=rd({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=ed({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new tn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let p=s,u=i[p];return u?(...m)=>{let y=u(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[p]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var yn=g(N());var un=class extends gt{async listMySearches(){let{session:e}=P.getState();return dc(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var fn=class extends gt{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var nu="ft-user-assets",hn=yn.FtReduxStore.get({name:nu,initialState:{savedSearches:void 0,bookmarks:void 0}}),$a=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fn,this.savedSearchesService=new un,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,yn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),hn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),hn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();hn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;hn.actions.bookmarks(o)}}},sd=new $a;var Fa=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var ld=g(N()),Ma=class{highlightHtml(e,o,n){(0,ld.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ma;var cd=g(N());var Ua=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return cd.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ua;var dd=g(N());var xo=class{static get(e,o){var n,a,i,s;let c=P.getState(),{lang:p,region:u}=(a=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new dd.SearchPlaceConverter(c.baseUrl,(s=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var mn=class extends Ur{async sendDocumentStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.start_display event"),console.debug(o)})}async sendTopicStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send topic.start_display event"),console.debug(o)})}async sendKhubSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send khub.search event"),console.debug(o)})}async sendDocumentSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send document.search event"),console.debug(o)})}async sendSearchPageSelectEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_page.select event"),console.debug(o)})}async sendSearchResultOpenContextMenuEvent(e){return(await this.awaitApi).sendEvents([e]).catch(o=>{console.info("Failed to send search_result.open_context_menu event"),console.debug(o)})}};var za=class{urlToSearchRequest(e){return xo.get().parse(e)}searchRequestToUrl(e){return xo.get().serialize(e)}};window.FluidTopicsUrlService=new za;var Xt=g(N());var mr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};mr.eventName="change";var Ha=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},pd=new Ha;var gn=class t extends Xt.WithEventBus{static build(){return new t(window.history,pd,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mr(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...i,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(mr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(mr.eventName,e)}currentItem(){return(0,Xt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Xt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Xt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,ud.customElement)("ft-app-context")(oe);var bn=class extends gt{constructor(e){super(!0,e),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([a],[i])=>a.localeCompare(i)))}async launchSearch(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,a)=>n.id.localeCompare(a.id))};return this.cache.get("search-"+this.hash(o),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(o),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(o=>o.valueFilter==null?o:{...o,valueFilter:{...o.valueFilter,values:[...o.valueFilter.values].sort((n,a)=>n.localeCompare(a))}}).sort((o,n)=>o.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var au=t=>t.request.virtualField===Fr.TITLE_ONLY&&t.request.scope===Mr.DOCUMENTS,Zr=class t extends Event{constructor(){super(t.eventName)}};Zr.eventName="search-context-clear-all-filters";var vo=class t{static build(e,o){return new t(Ml(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new qe.Debouncer(10),this.searchDebouncer=new qe.Debouncer(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(a=>({id:a}))}),this.suggestDebouncer=new qe.Debouncer(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=o??new bn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=(0,qe.watch)(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=(0,qe.watch)(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var o;let n=(o=this.store.getState().locales)!==null&&o!==void 0?o:[],a=this.store.getState().request.contentLocale;if(e!=a){if(n.length>0){let i=s=>n.some(c=>c.lang==s);i(e)||(e=i(a)?a:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Fr.TITLE_ONLY),this.store.actions.setRequestScope(Mr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Fr.EVERYWHERE),this.store.actions.setRequestScope(Mr.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return au(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Zr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,o){let n=this.facetIds.filter(a=>a!=e);o&&n.push(o),this.facetIds=n}get facetIds(){var e;let o=this.store.getState().request;return[...new Set([...o.facets.map(n=>n.id),...((e=o.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(a=>({id:a}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,a={key:e,valueFilter:{values:o,negative:!1}},i=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==a.key),a];this.setFilters(i)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,a={key:e,dateFilter:{type:o}},i=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==a.key),a];this.setFilters(i)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(a=>!a.dateFilter),...o.filter(a=>a.dateFilter&&a.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let a=this.store.getState().request.metadataFilters,i={key:e,rangeFilter:{from:o,to:n}},s=[...a.filter(c=>!c.rangeFilter),...a.filter(c=>c.rangeFilter&&c.key!==i.key),i];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(a=>!a.rangeFilter),...o.filter(a=>a.rangeFilter&&a.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var o,n,a,i;try{if((o=this.cancelableSearch)===null||o===void 0||o.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=(0,qe.cancelable)(this.service.launchSearch(e));let s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.results(s.results),this.store.actions.facets(s.facets),this.store.actions.spellcheck(s.spellcheck);else{let c=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(s.results);this.store.actions.results(c),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(s.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(s.paging)}}catch(s){s instanceof qe.CanceledPromiseError||(console.error(s),(i=this.errorHandler)===null||i===void 0||i.call(this,s))}}async fetchSuggestData(e){var o;try{(o=this.cancelableSuggest)===null||o===void 0||o.cancel(),this.cancelableSuggest=(0,qe.cancelable)(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof qe.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var iu=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Va=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},fd=Symbol("registerInterval"),Wa=Symbol("registerAttempts"),su=40;function lu(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Wa]=0,this[fd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Wa]>su?window.clearInterval(this[fd]):(this[Wa]++,this.dispatchEvent(new Va))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return iu([(0,yd.state)()],e.prototype,"stateManager",void 0),e}var xn=class extends lu(hd.FtLitElementRedux){};function md(t){return t.rootNodes.map(e=>gd(e))}function gd(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>gd(o,t.selected)),count:t.totalResultsCount}}var Ad=g(N());var En=g(D()),wn=g(j()),An=g(N());var bd=g(D());var xd=bd.css`
|
|
1996
1996
|
`;var On=g(N());var Ed=g(j());var cu=g(N());function vd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var du=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Sd=Symbol("i18nAttributes"),Od=Symbol("i18nListAttributes"),wd=Symbol("i18nProperties"),vn=Symbol("i18nContexts"),So=Symbol("i18nUnsubs");function Cn(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Xo:zr}i18n(i){var s;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let c=(s=i.args)!==null&&s!==void 0?s:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...c)}customI18n(i,s){if(vd(i)){let[c,p]=i.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,p)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let p=this,u=(m,y,b)=>b?.context&&b.key&&i(m,y,b)?{...b,message:this.i18n({context:b.context,key:b.key,...m})}:b;(s=this[Sd])===null||s===void 0||s.forEach((m,y)=>p[y]=u(m,y,p[y])),(c=this[Od])===null||c===void 0||c.forEach((m,y)=>{var b;return p[y]=(b=p[y])===null||b===void 0?void 0:b.map(S=>u(m,y,S))})}updateI18nProperties(i){var s;(s=this[wd])===null||s===void 0||s.forEach((c,p)=>{i(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let p=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[vn].set(p,{isCustomContext:c}),this[So].has(p)||this[So].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(i){return this[vn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[vn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[So].forEach(i=>i()),this[So].clear()}}return e=vn,o=So,du([(0,Ed.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Cd=class extends Cn(On.FtLitElement){},Sn=class extends Cn(On.FtLitElementRedux){};var Oo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},st=class extends Sn{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":En.nothing:En.html`
|
|
1997
1997
|
<span class="ft-i18n">
|
|
1998
1998
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
@@ -2059,7 +2059,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
|
|
|
2059
2059
|
`;var cf={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var r;let n=+((r=e.payload)!==null&&r!==void 0?r:20);t.request.paging.perPage=isNaN(n)?20:qt(1,n,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]}},bd=t=>Ot.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,suggestResults:void 0},reducers:cf});var xd=I`
|
|
2060
2060
|
`;var df="ft-app-info",ds=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},pf={session:(t,e)=>{Re(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>B.dispatchEvent(new ds(e.payload)),0))}},B=Ot.get({name:df,reducers:pf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var cr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=B.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=B.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var Yr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:cr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):cr.await()}};var dt=class extends Yr{constructor(e=!0,r){var n;super(r);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new tt,this.cache=e?i.commonCache:new tt}clearCache(){this.cache.clearAll()}};var vd,uf=Symbol("clearAfterUnitTest"),yn=class extends dt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[vd]=()=>{this.defaultMessages={},this.cache=new tt,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=B.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};Re(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new tr((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(i){!(i instanceof et)&&r&&console.error(i)}return r&&await this.notify(e),n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>Go(0).then(()=>r()).catch(()=>null)))}};vd=uf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Qr=window.FluidTopicsI18nService,gn=window.FluidTopicsCustomI18nService;var Ee=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},de=class extends z{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=()=>cr.get(),this.messageContexts=[],this.cache=new tt,this.cleanSessionDebouncer=new ae}render(){return k`
|
|
2061
2061
|
<slot></slot>
|
|
2062
|
-
`}update(e){var r,n,i,a,s;super.update(e),e.has("baseUrl")&&(B.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&B.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&B.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&B.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&B.actions.noCustom(this.noCustom),e.has("editorMode")&&B.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&B.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&B.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Qr.addContext(l)),e.has("openExternalDocumentInNewTab")&&B.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&B.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&B.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(B.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),B.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),B.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};de.elementDefinitions={};de.styles=xd;Ee([b()],de.prototype,"baseUrl",void 0);Ee([b()],de.prototype,"apiIntegrationIdentifier",void 0);Ee([b()],de.prototype,"uiLocale",void 0);Ee([me(null)],de.prototype,"availableUiLocales",void 0);Ee([me(null)],de.prototype,"metadataConfiguration",void 0);Ee([b({type:Boolean})],de.prototype,"editorMode",void 0);Ee([b({type:Boolean})],de.prototype,"noCustom",void 0);Ee([b({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Ee([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Ee([b({type:Boolean})],de.prototype,"withManualResources",void 0);Ee([b({type:Boolean})],de.prototype,"navigatorOnline",void 0);Ee([b({type:Boolean})],de.prototype,"forcedOffline",void 0);Ee([b({type:Object})],de.prototype,"apiProvider",void 0);Ee([me([])],de.prototype,"messageContexts",void 0);Ee([me(void 0)],de.prototype,"session",void 0);Ee([H()],de.prototype,"localesConfiguration",void 0);var bn=class extends dt{async listMySearches(){let{session:e}=B.getState();return Nc(e,fe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var xn=class extends dt{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ff="ft-user-assets",vn=Ot.get({name:ff,initialState:{savedSearches:void 0,bookmarks:void 0}}),ps=class{constructor(){this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new xn,this.savedSearchesService=new bn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();Re((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),vn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),vn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();vn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;vn.actions.bookmarks(r)}}},Sd=new ps;var us=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new us;var fs=class{highlightHtml(e,r,n){da(e,r,n)}};window.FluidTopicsHighlightHtmlService=new fs;var hs=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=B.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return Fr.format(e,(n=r?.locale)!==null&&n!==void 0?n:B.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new hs;var To=class{static get(e,r){var n,i,a,s;let l=B.getState(),{lang:d,region:u}=(i=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new $r(l.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,r??`${d}-${u}`)}};var Sn=class extends Yr{async sendDocumentStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send document.start_display event"),console.debug(r)})}async sendTopicStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send topic.start_display event"),console.debug(r)})}async sendKhubSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send khub.search event"),console.debug(r)})}async sendDocumentSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send document.search event"),console.debug(r)})}async sendSearchPageSelectEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send search_page.select event"),console.debug(r)})}async sendSearchResultOpenContextMenuEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send search_result.open_context_menu event"),console.debug(r)})}};var ms=class{urlToSearchRequest(e){return To.get().parse(e)}searchRequestToUrl(e){return To.get().serialize(e)}};window.FluidTopicsUrlService=new ms;var dr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};dr.eventName="change";var ys=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Od=new ys;var On=class t extends ht{static build(){return new t(window.history,Od,()=>window.location,!1)}constructor(e,r,n,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Re(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new dr(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(i,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e,r=!1){var n,i,a;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},l=r?(i=e?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(a=this.currentState.majorState)!==null&&a!==void 0?a:e?.majorState;l!=null&&(s.majorState=l),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(dr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(dr.eventName,e)}currentItem(){return po(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return po(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return po(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let r=e;do r--;while(r>0&&!this.hasState(r));return r}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var r,n;return this.hasState(e)&&((n=(r=this.states[e])===null||r===void 0?void 0:r.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=On.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});K("ft-app-context")(de);var Cn=class extends dt{constructor(e){super(!0,e),this.sortObjectFields=(r,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([i],[a])=>i.localeCompare(a)))}async launchSearch(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,i)=>n.id.localeCompare(i.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(r),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((n,i)=>n.localeCompare(i))}}).sort((r,n)=>r.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var hf=t=>t.request.virtualField===sr.TITLE_ONLY&&t.request.scope===Dr.DOCUMENTS,Xr=class t extends Event{constructor(){super(t.eventName)}};Xr.eventName="search-context-clear-all-filters";var Lo=class t{static build(e,r){return new t(bd(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ae(10),this.searchDebouncer=new ae(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(i=>({id:i}))}),this.suggestDebouncer=new ae(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=r??new Cn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=_r(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=_r(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var r;let n=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(l=>l.lang==s);a(e)||(e=a(i)?i:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let r=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(sr.TITLE_ONLY),this.store.actions.setRequestScope(Dr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(sr.EVERYWHERE),this.store.actions.setRequestScope(Dr.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return hf(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Xr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(n=>n.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:r,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:r}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.dateFilter),...r.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,r,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:n}},s=[...i.filter(l=>!l.rangeFilter),...i.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.rangeFilter),...r.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,n,i,a;try{if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=xr(this.service.launchSearch(e));let s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.results(s.results),this.store.actions.facets(s.facets),this.store.actions.spellcheck(s.spellcheck);else{let l=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(s.results);this.store.actions.results(l),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(s.paging.currentPage-1)*((i=e.paging.perPage)!==null&&i!==void 0?i:20)+1}`})}this.store.actions.paging(s.paging)}}catch(s){s instanceof et||(console.error(s),(a=this.errorHandler)===null||a===void 0||a.call(this,s))}}async fetchSuggestData(e){var r;try{(r=this.cancelableSuggest)===null||r===void 0||r.cancel(),this.cancelableSuggest=xr(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof et)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var mf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},bs=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Cd=Symbol("registerInterval"),gs=Symbol("registerAttempts"),yf=40;function gf(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[gs]=0,this[Cd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[gs]>yf?window.clearInterval(this[Cd]):(this[gs]++,this.dispatchEvent(new bs))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return mf([H()],e.prototype,"stateManager",void 0),e}var En=class extends gf(We){};function Ed(t){return t.rootNodes.map(e=>wd(e))}function wd(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(r=>wd(r,t.selected)),count:t.totalResultsCount}}var Ad=I`
|
|
2062
|
+
`}update(e){var r,n,i,a,s;super.update(e),e.has("baseUrl")&&(B.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&B.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&B.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&B.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&B.actions.noCustom(this.noCustom),e.has("editorMode")&&B.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&B.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&B.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Qr.addContext(l)),e.has("openExternalDocumentInNewTab")&&B.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&B.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&B.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(B.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),B.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),B.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};de.elementDefinitions={};de.styles=xd;Ee([b()],de.prototype,"baseUrl",void 0);Ee([b()],de.prototype,"apiIntegrationIdentifier",void 0);Ee([b()],de.prototype,"uiLocale",void 0);Ee([me(null)],de.prototype,"availableUiLocales",void 0);Ee([me(null)],de.prototype,"metadataConfiguration",void 0);Ee([b({type:Boolean})],de.prototype,"editorMode",void 0);Ee([b({type:Boolean})],de.prototype,"noCustom",void 0);Ee([b({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Ee([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Ee([b({type:Boolean})],de.prototype,"withManualResources",void 0);Ee([b({type:Boolean})],de.prototype,"navigatorOnline",void 0);Ee([b({type:Boolean})],de.prototype,"forcedOffline",void 0);Ee([b({type:Object})],de.prototype,"apiProvider",void 0);Ee([me([])],de.prototype,"messageContexts",void 0);Ee([me(void 0)],de.prototype,"session",void 0);Ee([H()],de.prototype,"localesConfiguration",void 0);var bn=class extends dt{async listMySearches(){let{session:e}=B.getState();return Nc(e,fe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var xn=class extends dt{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ff="ft-user-assets",vn=Ot.get({name:ff,initialState:{savedSearches:void 0,bookmarks:void 0}}),ps=class{constructor(){this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new xn,this.savedSearchesService=new bn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();Re((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),vn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),vn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();vn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;vn.actions.bookmarks(r)}}},Sd=new ps;var us=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new us;var fs=class{highlightHtml(e,r,n){da(e,r,n)}};window.FluidTopicsHighlightHtmlService=new fs;var hs=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=B.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return Fr.format(e,(n=r?.locale)!==null&&n!==void 0?n:B.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new hs;var To=class{static get(e,r){var n,i,a,s;let l=B.getState(),{lang:d,region:u}=(i=(n=l.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new $r(l.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,r??`${d}-${u}`)}};var Sn=class extends Yr{async sendDocumentStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send document.start_display event"),console.debug(r)})}async sendTopicStartDisplayEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send topic.start_display event"),console.debug(r)})}async sendKhubSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send khub.search event"),console.debug(r)})}async sendDocumentSearchEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send document.search event"),console.debug(r)})}async sendSearchPageSelectEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send search_page.select event"),console.debug(r)})}async sendSearchResultOpenContextMenuEvent(e){return(await this.awaitApi).sendEvents([e]).catch(r=>{console.info("Failed to send search_result.open_context_menu event"),console.debug(r)})}};var ms=class{urlToSearchRequest(e){return To.get().parse(e)}searchRequestToUrl(e){return To.get().serialize(e)}};window.FluidTopicsUrlService=new ms;var dr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};dr.eventName="change";var ys=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Od=new ys;var On=class t extends ht{static build(){return new t(window.history,Od,()=>window.location,!1)}constructor(e,r,n,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Re(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new dr(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(i,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(dr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(dr.eventName,e)}currentItem(){return po(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return po(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return po(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=On.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});K("ft-app-context")(de);var Cn=class extends dt{constructor(e){super(!0,e),this.sortObjectFields=(r,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([i],[a])=>i.localeCompare(a)))}async launchSearch(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,i)=>n.id.localeCompare(i.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(r),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((n,i)=>n.localeCompare(i))}}).sort((r,n)=>r.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var hf=t=>t.request.virtualField===sr.TITLE_ONLY&&t.request.scope===Dr.DOCUMENTS,Xr=class t extends Event{constructor(){super(t.eventName)}};Xr.eventName="search-context-clear-all-filters";var Lo=class t{static build(e,r){return new t(bd(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ae(10),this.searchDebouncer=new ae(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(i=>({id:i}))}),this.suggestDebouncer=new ae(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=r??new Cn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=_r(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=_r(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var r;let n=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(l=>l.lang==s);a(e)||(e=a(i)?i:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let r=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(sr.TITLE_ONLY),this.store.actions.setRequestScope(Dr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(sr.EVERYWHERE),this.store.actions.setRequestScope(Dr.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return hf(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Xr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(n=>n.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:r,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:r}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.dateFilter),...r.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,r,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:n}},s=[...i.filter(l=>!l.rangeFilter),...i.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.rangeFilter),...r.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,n,i,a;try{if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=xr(this.service.launchSearch(e));let s=await this.cancelableSearch;if(s.paging.currentPage<=1)this.store.actions.results(s.results),this.store.actions.facets(s.facets),this.store.actions.spellcheck(s.spellcheck);else{let l=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(s.results);this.store.actions.results(l),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(s.paging.currentPage-1)*((i=e.paging.perPage)!==null&&i!==void 0?i:20)+1}`})}this.store.actions.paging(s.paging)}}catch(s){s instanceof et||(console.error(s),(a=this.errorHandler)===null||a===void 0||a.call(this,s))}}async fetchSuggestData(e){var r;try{(r=this.cancelableSuggest)===null||r===void 0||r.cancel(),this.cancelableSuggest=xr(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof et)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var mf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},bs=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Cd=Symbol("registerInterval"),gs=Symbol("registerAttempts"),yf=40;function gf(t){class e extends t{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[gs]=0,this[Cd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[gs]>yf?window.clearInterval(this[Cd]):(this[gs]++,this.dispatchEvent(new bs))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return mf([H()],e.prototype,"stateManager",void 0),e}var En=class extends gf(We){};function Ed(t){return t.rootNodes.map(e=>wd(e))}function wd(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(r=>wd(r,t.selected)),count:t.totalResultsCount}}var Ad=I`
|
|
2063
2063
|
`;function Rd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var bf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Nd=Symbol("i18nAttributes"),Td=Symbol("i18nListAttributes"),_d=Symbol("i18nProperties"),wn=Symbol("i18nContexts"),_o=Symbol("i18nUnsubs");function Rn(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?gn:Qr}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let l=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...l)}customI18n(a,s){if(Rd(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(h,f,y)=>y?.context&&y.key&&a(h,f,y)?{...y,message:this.i18n({context:y.context,key:y.key,...h})}:y;(s=this[Nd])===null||s===void 0||s.forEach((h,f)=>d[f]=u(h,f,d[f])),(l=this[Td])===null||l===void 0||l.forEach((h,f)=>{var y;return d[f]=(y=d[f])===null||y===void 0?void 0:y.map(x=>u(h,f,x))})}updateI18nProperties(a){var s;(s=this[_d])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[wn].set(d,{isCustomContext:l}),this[_o].has(d)||this[_o].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[wn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[wn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[_o].forEach(a=>a()),this[_o].clear()}}return e=wn,r=_o,bf([b({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Ld=class extends Rn(z){},An=class extends Rn(We){};var Po=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Qe=class extends An{constructor(){super(),this.editorMode=!1,this.addStore(B)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":W:k`
|
|
2064
2064
|
<span class="ft-i18n">
|
|
2065
2065
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-facet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Search facet for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-filter": "1.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.
|
|
24
|
-
"@fluid-topics/ft-search-context": "1.
|
|
25
|
-
"@fluid-topics/ft-tree-selector": "1.
|
|
26
|
-
"@fluid-topics/ft-typography": "1.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.
|
|
22
|
+
"@fluid-topics/ft-filter": "1.3.0",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.3.0",
|
|
24
|
+
"@fluid-topics/ft-search-context": "1.3.0",
|
|
25
|
+
"@fluid-topics/ft-tree-selector": "1.3.0",
|
|
26
|
+
"@fluid-topics/ft-typography": "1.3.0",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.3.0",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@fluid-topics/public-api": "1.0.98"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "cc982effbf27c0483e03961ad450fd2057a108b2"
|
|
34
34
|
}
|