@fluid-topics/ft-reader-metadata 1.2.24 → 1.2.26

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.
@@ -1500,7 +1500,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1500
1500
  `}};ye.elementDefinitions={"ft-typography":it};ye.styles=Hs;(0,Pr.customElement)("ft-floating-menu")(he);(0,Pr.customElement)("ftds-floating-menu")(ir);(0,Pr.customElement)("ft-floating-menu-item")(wt);(0,Pr.customElement)("ft-floating-menu-label")(ye);var rd=b(Ks(),1);var Zs;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Zs||(Zs={}));var qs;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(qs||(qs={}));var Ys;(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"})(Ys||(Ys={}));var Xs;(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"})(Xs||(Xs={}));var Js;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Js||(Js={}));var Qs;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Qs||(Qs={}));var tc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(tc||(tc={}));var ec;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ec||(ec={}));var rc;(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"})(rc||(rc={}));var oc;(function(t){t.ASC="ASC",t.DESC="DESC"})(oc||(oc={}));var nc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(nc||(nc={}));var ac;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ac||(ac={}));var ic;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ic||(ic={}));var So;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(So||(So={}));var sc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(sc||(sc={}));var cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(cc||(cc={}));var cr;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(cr||(cr={}));var lc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(lc||(lc={}));var nt;(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.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",t.DEVELOPER="DEVELOPER"})(nt||(nt={}));var dc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(dc||(dc={}));var pc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(pc||(pc={}));var Db={[nt.PERSONAL_BOOK_SHARE_USER]:[nt.PERSONAL_BOOK_USER],[nt.HTML_EXPORT_USER]:[nt.PERSONAL_BOOK_USER],[nt.PDF_EXPORT_USER]:[nt.PERSONAL_BOOK_USER],[nt.KHUB_ADMIN]:[nt.CONTENT_PUBLISHER],[nt.ADMIN]:[nt.KHUB_ADMIN,nt.USERS_ADMIN,nt.PORTAL_ADMIN],[nt.DEVELOPER]:[nt.BETA_USER,nt.DEBUG_USER],[nt.GENERATIVE_AI_EXPORT_USER]:[nt.GENERATIVE_AI_USER]};function od(t){var e,o,n,a,i;return((a=(o=(e=t.map)===null||e===void 0?void 0:e.openMode)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.openMode)!==null&&a!==void 0?a:(i=t.document)===null||i===void 0?void 0:i.openMode)===So.EXTERNAL}function Rn(t){var e,o,n,a,i;if(od(t))return(a=(o=(e=t.map)===null||e===void 0?void 0:e.originUrl)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.originUrl)!==null&&a!==void 0?a:(i=t.document)===null||i===void 0?void 0:i.originUrl;switch(t.type){case cr.MAP:return t.map.readerUrl;case cr.DOCUMENT:return t.document.viewerUrl;case cr.TOPIC:return t.topic.readerUrl}return""}var bl=b(uc());var Go=b(T());var pl=b(T());var bc=b(F()),At=b(Q()),zt=b(T());var hc=b(F());var yc=hc.css`
1501
1501
  `;var Oo=b(T()),nd="ft-app-info",Nn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},ad={session:(t,e)=>{(0,Oo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>_.dispatchEvent(new Nn(e.payload)),0))}},_=Oo.FtReduxStore.get({name:nd,reducers:ad,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var be=b(T());var Ln=b(T());var $e=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=_.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=_.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var ge=class{constructor(e=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Ln.CacheRegistry,this.cache=e?a.commonCache:new Ln.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:$e.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$e.await()}clearCache(){this.cache.clearAll()}};var mc,id=Symbol("clearAfterUnitTest"),Co=class extends ge{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[mc]=()=>{this.defaultMessages={},this.cache=new be.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=_.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(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,be.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}await 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(),c=this.resolveContext(i);return new be.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},c).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}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,be.delay)(0).then(()=>o()).catch(()=>null)))}};mc=id;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Me=window.FluidTopicsI18nService,gc=window.FluidTopicsCustomI18nService;var yt=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},J=class extends zt.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=()=>$e.get(),this.messageContexts=[],this.cache=new zt.CacheRegistry,this.cleanSessionDebouncer=new zt.Debouncer}render(){return bc.html`
1502
1502
  <slot></slot>
1503
- `}update(e){var o,n,a,i,c;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Me.addContext(l)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((c=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&c!==void 0?c:!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())}};J.elementDefinitions={};J.styles=yc;yt([(0,At.property)()],J.prototype,"baseUrl",void 0);yt([(0,At.property)()],J.prototype,"apiIntegrationIdentifier",void 0);yt([(0,At.property)()],J.prototype,"uiLocale",void 0);yt([(0,zt.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);yt([(0,zt.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"editorMode",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"noCustom",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);yt([(0,At.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],J.prototype,"noCustomComponent",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"withManualResources",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);yt([(0,At.property)({type:Object})],J.prototype,"apiProvider",void 0);yt([(0,zt.jsonProperty)([])],J.prototype,"messageContexts",void 0);yt([(0,zt.jsonProperty)(void 0)],J.prototype,"session",void 0);yt([(0,At.state)()],J.prototype,"localesConfiguration",void 0);var ra=b(Q());function sd(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(!Eo(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(!Eo(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();if(a=Object.keys(t),o=a.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!Eo(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Eo(t,e){try{return sd(t,e)}catch{return!1}}function _r(t,e){return!Eo(t,e)}var xc=b(Q(),1);var In=t=>{let e=t??{};return(o,n)=>{var a;let i={hasChanged:_r,attribute:!1,...e};(0,xc.property)(i)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[n],store:e.store})}};var wo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==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}};var kr=b(Q(),1);var vc=b(Q(),1);function Sc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,vc.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:_r,...e??{}})}var Ao=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 c of n)try{await c()}catch(l){a(l);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 Cc=b(F(),1);var Ro=window,cd=Ro.ShadowRoot&&(Ro.ShadyCSS===void 0||Ro.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ex=Symbol();var Oc=(t,e)=>{cd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),a=Ro.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)})};var No=class extends Cc.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 Oc(n,e.elementStyles),n}};var Lo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Rc,Ec=Symbol("constructorPrototype"),wc=Symbol("constructorName"),Nc=Symbol("exportpartsDebouncer"),Ac=Symbol("dynamicDependenciesLoaded"),xe=class extends No{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Rc]=new Ao(5),this[wc]=this.constructor.name,this[Ec]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wc]&&Object.setPrototypeOf(this,this[Ec])}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[Ac]||(e[Ac]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}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[Nc].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,c,l;let f=g=>g!=null&&g.trim().length>0,p=e.filter(f).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(l=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...S,...v).filter(f).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let u=[...y.values()].flatMap(g=>p.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...u].join(", "))}};Rc=Nc;Lo([(0,kr.property)()],xe.prototype,"exportpartsPrefix",void 0);Lo([Sc([])],xe.prototype,"exportpartsPrefixes",void 0);Lo([(0,kr.property)()],xe.prototype,"customStylesheet",void 0);Lo([(0,kr.state)()],xe.prototype,"useAdoptedStyleSheets",void 0);function Br(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Lc,Ic,Tc,Dr=Symbol("internalReduxEventsUnsubscribers"),ve=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),$r=class extends xe{constructor(){super(...arguments),this[Lc]=new Map,this[Ic]=new Map,this[Tc]=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[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ue].get(e)}addStore(e,o){var n;o=(n=o??(Br(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].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[ve].has(e.store):this[ve].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[ve].set(e,o.subscribe(()=>this.updateFromStores())),this[Dr].set(e,[]),Br(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=l=>this[i](l);o.addEventListener(a.eventName,c),this[Dr].get(e).push(()=>o.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[ve].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[ve].has(e)&&this[ve].get(e)(),this[ve].delete(e),(o=this[Dr].get(e))===null||o===void 0||o.forEach(n=>n()),this[Dr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Lc=ve,Ic=Ue,Tc=Dr;$r.reduxProperties=new Map;$r.reduxReactiveProperties=new Set;$r.reduxEventListeners=new Map;function Ut(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(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ie(t){return!!t&&!!t[Z]}function Ht(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)===md}(t)||Array.isArray(t)||!!t[Mc]||!!(!((e=t.constructor)===null||e===void 0)&&e[Mc])||Un(t)||Wn(t))}function We(t,e,o){o===void 0&&(o=!1),pr(t)===0?(o?Object.keys:dr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function pr(t){var e=t[Z];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Un(t)?2:Wn(t)?3:0}function lr(t,e){return pr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ld(t,e){return pr(t)===2?t.get(e):t[e]}function Uc(t,e,o){var n=pr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Wc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Un(t){return hd&&t instanceof Map}function Wn(t){return yd&&t instanceof Set}function Se(t){return t.o||t.t}function Fn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Hc(t);delete e[Z];for(var o=dr(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 zn(t,e){return e===void 0&&(e=!1),Hn(t)||ie(t)||!Ht(t)||(pr(t)>1&&(t.set=t.add=t.clear=t.delete=dd),Object.freeze(t),e&&We(t,function(o,n){return zn(n,!0)},!0)),t}function dd(){Ut(2)}function Hn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=Mn[t];return e||Ut(18,t),e}function pd(t,e){Mn[t]||(Mn[t]=e)}function Bn(){return Ur}function Tn(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Io(t){Dn(t),t.p.forEach(fd),t.p=null}function Dn(t){t===Ur&&(Ur=t.l)}function Pc(t){return Ur={p:[],l:Ur,h:t,m:!0,_:0}}function fd(t){var e=t[Z];e.i===0||e.i===1?e.j():e.g=!0}function Pn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,n),n?(o[Z].P&&(Io(e),Ut(4)),Ht(t)&&(t=To(e,t),e.l||Po(e,t)),e.u&&Yt("Patches").M(o[Z].t,t,e.u,e.s)):t=To(e,o,[]),Io(e),e.u&&e.v(e.u,e.s),t!==zc?t:void 0}function To(t,e,o){if(Hn(e))return e;var n=e[Z];if(!n)return We(e,function(l,f){return _c(t,n,e,l,f,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Po(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Fn(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),We(i,function(l,f){return _c(t,n,a,l,f,o,c)}),Po(t,a,!1),o&&t.u&&Yt("Patches").N(n,o,t.u,t.s)}return n.o}function _c(t,e,o,n,a,i,c){if(ie(a)){var l=To(t,a,i&&e&&e.i!==3&&!lr(e.R,n)?i.concat(n):void 0);if(Uc(o,n,l),!ie(l))return;t.m=!1}else c&&o.add(a);if(Ht(a)&&!Hn(a)){if(!t.h.D&&t._<1)return;To(t,a),e&&e.A.l||Po(t,a)}}function Po(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&zn(e,o)}function _n(t,e){var o=t[Z];return(o?Se(o):t)[e]}function kc(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 Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function kn(t){t.o||(t.o=Fn(t.t))}function $n(t,e,o){var n=Un(e)?Yt("MapSet").F(e,o):Wn(e)?Yt("MapSet").T(e,o):t.O?function(a,i){var c=Array.isArray(a),l={i:c?1:0,A:i?i.A:Bn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,p=Wr;c&&(f=[l],p=Mr);var y=Proxy.revocable(f,p),u=y.revoke,g=y.proxy;return l.k=g,l.j=u,g}(e,o):Yt("ES5").J(e,o);return(o?o.A:Bn()).p.push(n),n}function ud(t){return ie(t)||Ut(22,t),function e(o){if(!Ht(o))return o;var n,a=o[Z],i=pr(o);if(a){if(!a.P&&(a.i<4||!Yt("ES5").K(a)))return a.t;a.I=!0,n=Bc(o,i),a.I=!1}else n=Bc(o,i);return We(n,function(c,l){a&&ld(a.t,c)===l||Uc(n,c,e(l))}),i===3?new Set(n):n}(t)}function Bc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Fn(t)}function Fc(){function t(c,l){var f=i[c];return f?f.enumerable=l:i[c]=f={configurable:!0,enumerable:l,get:function(){var p=this[Z];return Wr.get(p,c)},set:function(p){var y=this[Z];Wr.set(y,c,p)}},f}function e(c){for(var l=c.length-1;l>=0;l--){var f=c[l][Z];if(!f.P)switch(f.i){case 5:n(f)&&Oe(f);break;case 4:o(f)&&Oe(f)}}}function o(c){for(var l=c.t,f=c.k,p=dr(f),y=p.length-1;y>=0;y--){var u=p[y];if(u!==Z){var g=l[u];if(g===void 0&&!lr(l,u))return!0;var S=f[u],v=S&&S[Z];if(v?v.t!==g:!Wc(S,g))return!0}}var O=!!l[Z];return p.length!==dr(l).length+(O?0:1)}function n(c){var l=c.k;if(l.length!==c.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&Ut(3,JSON.stringify(Se(c)))}var i={};pd("ES5",{J:function(c,l){var f=Array.isArray(c),p=function(u,g){if(u){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Hc(g);delete O[Z];for(var L=dr(O),R=0;R<L.length;R++){var N=L[R];O[N]=t(N,u||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(f,c),y={i:f?5:4,A:l?l.A:Bn(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Z,{value:y,writable:!0}),p},S:function(c,l,f){f?ie(l)&&l[Z].A===c&&e(c.p):(c.u&&function p(y){if(y&&typeof y=="object"){var u=y[Z];if(u){var g=u.t,S=u.k,v=u.R,O=u.i;if(O===4)We(S,function($){$!==Z&&(g[$]!==void 0||lr(g,$)?v[$]||p(S[$]):(v[$]=!0,Oe(u)))}),We(g,function($){S[$]!==void 0||lr(S,$)||(v[$]=!1,Oe(u))});else if(O===5){if(n(u)&&(Oe(u),v.length=!0),S.length<g.length)for(var L=S.length;L<g.length;L++)v[L]=!1;else for(var R=g.length;R<S.length;R++)v[R]=!0;for(var N=Math.min(S.length,g.length),k=0;k<N;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&p(S[k])}}}}(c.p[0]),e(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var Dc,Ur,Gn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hd=typeof Map<"u",yd=typeof Set<"u",$c=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zc=Gn?Symbol.for("immer-nothing"):((Dc={})["immer-nothing"]=!0,Dc),Mc=Gn?Symbol.for("immer-draftable"):"__$immer_draftable",Z=Gn?Symbol.for("immer-state"):"__$immer_state";var md=""+Object.prototype.constructor,dr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Hc=Object.getOwnPropertyDescriptors||function(t){var e={};return dr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Mn={},Wr={get:function(t,e){if(e===Z)return t;var o=Se(t);if(!lr(o,e))return function(a,i,c){var l,f=kc(i,c);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!Ht(n)?n:n===_n(t.t,e)?(kn(t),t.o[e]=$n(t.A.h,n,t)):n},has:function(t,e){return e in Se(t)},ownKeys:function(t){return Reflect.ownKeys(Se(t))},set:function(t,e,o){var n=kc(Se(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=_n(Se(t),e),i=a?.[Z];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Wc(o,a)&&(o!==void 0||lr(t.t,e)))return!0;kn(t),Oe(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 _n(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,kn(t),Oe(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Se(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ut(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ut(12)}},Mr={};We(Wr,function(t,e){Mr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Mr.deleteProperty=function(t,e){return Mr.set.call(this,t,e,void 0)},Mr.set=function(t,e,o){return Wr.set.call(this,t[0],e,o,t[0])};var gd=function(){function t(o){var n=this;this.O=$c,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(O){var L=this;O===void 0&&(O=l);for(var R=arguments.length,N=Array(R>1?R-1:0),k=1;k<R;k++)N[k-1]=arguments[k];return f.produce(O,function($){var U;return(U=i).call.apply(U,[L,$].concat(N))})}}var p;if(typeof i!="function"&&Ut(6),c!==void 0&&typeof c!="function"&&Ut(7),Ht(a)){var y=Pc(n),u=$n(n,a,void 0),g=!0;try{p=i(u),g=!1}finally{g?Io(y):Dn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return Tn(y,c),Pn(O,y)},function(O){throw Io(y),O}):(Tn(y,c),Pn(p,y))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===zc&&(p=void 0),n.D&&zn(p,!0),c){var S=[],v=[];Yt("Patches").M(a,p,S,v),c(S,v)}return p}Ut(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var y=arguments.length,u=Array(y>1?y-1:0),g=1;g<y;g++)u[g-1]=arguments[g];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(u))})};var c,l,f=n.produce(a,i,function(p,y){c=p,l=y});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,c,l]}):[f,c,l]},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){Ht(o)||Ut(8),ie(o)&&(o=ud(o));var n=Pc(this),a=$n(this,o,void 0);return a[Z].C=!0,Dn(n),a},e.finishDraft=function(o,n){var a=o&&o[Z],i=a.A;return Tn(i,n),Pn(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!$c&&Ut(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 c=Yt("Patches").$;return ie(o)?c(o,n):this.produce(o,function(l){return c(l,n)})},t}(),kt=new gd,bd=kt.produce,Dx=kt.produceWithPatches.bind(kt),$x=kt.setAutoFreeze.bind(kt),Mx=kt.setUseProxies.bind(kt),Ux=kt.applyPatches.bind(kt),Wx=kt.createDraft.bind(kt),Fx=kt.finishDraft.bind(kt),_o=bd;function Ce(t){"@babel/helpers - typeof";return Ce=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},Ce(t)}function Vn(t,e){if(Ce(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Ce(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jn(t){var e=Vn(t,"string");return Ce(e)==="symbol"?e:String(e)}function Kn(t,e,o){return e=jn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Gc(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 ko(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Gc(Object(o),!0).forEach(function(n){Kn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Gc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function mt(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"}(),Zn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Bo={INIT:"@@redux/INIT"+Zn(),REPLACE:"@@redux/REPLACE"+Zn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zn()}};function xd(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 qn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(mt(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(mt(1));return o(qn)(t,e)}if(typeof t!="function")throw new Error(mt(2));var a=t,i=e,c=[],l=c,f=!1;function p(){l===c&&(l=c.slice())}function y(){if(f)throw new Error(mt(3));return i}function u(O){if(typeof O!="function")throw new Error(mt(4));if(f)throw new Error(mt(5));var L=!0;return p(),l.push(O),function(){if(L){if(f)throw new Error(mt(6));L=!1,p();var N=l.indexOf(O);l.splice(N,1),c=null}}}function g(O){if(!xd(O))throw new Error(mt(7));if(typeof O.type>"u")throw new Error(mt(8));if(f)throw new Error(mt(9));try{f=!0,i=a(i,O)}finally{f=!1}for(var L=c=l,R=0;R<L.length;R++){var N=L[R];N()}return O}function S(O){if(typeof O!="function")throw new Error(mt(10));a=O,g({type:Bo.REPLACE})}function v(){var O,L=u;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(mt(11));function k(){N.next&&N.next(y())}k();var $=L(k);return{unsubscribe:$}}},O[Vc]=function(){return this},O}return g({type:Bo.INIT}),n={dispatch:g,subscribe:u,getState:y,replaceReducer:S},n[Vc]=v,n}function vd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Bo.INIT});if(typeof n>"u")throw new Error(mt(12));if(typeof o(void 0,{type:Bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(mt(13))})}function jc(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),c,l;try{vd(o)}catch(f){l=f}return function(p,y){if(p===void 0&&(p={}),l)throw l;if(0)var u;for(var g=!1,S={},v=0;v<i.length;v++){var O=i[v],L=o[O],R=p[O],N=L(R,y);if(typeof N>"u"){var k=y&&y.type;throw new Error(mt(14))}S[O]=N,g=g||N!==R}return g=g||i.length!==Object.keys(p).length,g?S:p}}function fr(){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 Kc(){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(mt(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(f){return f(c)});return i=fr.apply(void 0,l)(a.dispatch),ko(ko({},a),{},{dispatch:i})}}}function Zc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(l){return typeof l=="function"?l(a,i,t):c(l)}}};return e}var qc=Zc();qc.withExtraArgument=Zc;var Yn=qc;var tl=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)}}(),Sd=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},ur=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},Od=Object.defineProperty,Cd=Object.defineProperties,Ed=Object.getOwnPropertyDescriptors,Yc=Object.getOwnPropertySymbols,wd=Object.prototype.hasOwnProperty,Ad=Object.prototype.propertyIsEnumerable,Xc=function(t,e,o){return e in t?Od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ee=function(t,e){for(var o in e||(e={}))wd.call(e,o)&&Xc(t,o,e[o]);if(Yc)for(var n=0,a=Yc(e);n<a.length;n++){var o=a[n];Ad.call(e,o)&&Xc(t,o,e[o])}return t},Xn=function(t,e){return Cd(t,Ed(e))},Rd=function(t,e,o){return new Promise(function(n,a){var i=function(f){try{l(o.next(f))}catch(p){a(p)}},c=function(f){try{l(o.throw(f))}catch(p){a(p)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,c)};l((o=o.apply(t,e)).next())})};var Nd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fr:fr.apply(null,arguments)},av=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ld(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 Id=function(t){tl(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,ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,ur([void 0],o.concat(this))))},e}(Array),Td=function(t){tl(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,ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,ur([void 0],o.concat(this))))},e}(Array);function ta(t){return Ht(t)?_o(t,function(){}):t}function Pd(t){return typeof t=="boolean"}function _d(){return function(e){return kd(e)}}function kd(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,c=i===void 0?!0:i,l=new Id;if(o&&(Pd(o)?l.push(Yn):l.push(Yn.withExtraArgument(o.extraArgument))),0){if(a)var f;if(c)var p}return l}var Jn=!0;function el(t){var e=_d(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?e():i,l=o.devTools,f=l===void 0?!0:l,p=o.preloadedState,y=p===void 0?void 0:p,u=o.enhancers,g=u===void 0?void 0:u,S;if(typeof a=="function")S=a;else if(Ld(a))S=jc(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=c;if(typeof v=="function"&&(v=v(e),!Jn&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Jn&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Kc.apply(void 0,v),L=fr;f&&(L=Nd(Ee({trace:!Jn},typeof f=="object"&&f)));var R=new Td(O),N=R;Array.isArray(g)?N=ur([O],g):typeof g=="function"&&(N=g(R));var k=L.apply(void 0,N);return qn(S,y,k)}function we(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 Ee(Ee({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 rl(t){var e={},o=[],n,a={addCase:function(i,c){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function Bd(t){return typeof t=="function"}function Dd(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?rl(e):[e,o,n],i=a[0],c=a[1],l=a[2],f;if(Bd(t))f=function(){return ta(t())};else{var p=ta(t);f=function(){return p}}function y(u,g){u===void 0&&(u=f());var S=ur([i[g.type]],c.filter(function(v){var O=v.matcher;return O(g)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[l]),S.reduce(function(v,O){if(O)if(ie(v)){var L=v,R=O(L,g);return R===void 0?v:R}else{if(Ht(v))return _o(v,function(N){return O(N,g)});var R=O(v,g);if(R===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return v},u)}return y.getInitialState=f,y}function $d(t,e){return t+"/"+e}function ol(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:ta(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},c={},l={};a.forEach(function(y){var u=n[y],g=$d(e,y),S,v;"reducer"in u?(S=u.reducer,v=u.prepare):S=u,i[y]=S,c[g]=S,l[y]=v?we(g,v):we(g)});function f(){var y=typeof t.extraReducers=="function"?rl(t.extraReducers):[t.extraReducers],u=y[0],g=u===void 0?{}:u,S=y[1],v=S===void 0?[]:S,O=y[2],L=O===void 0?void 0:O,R=Ee(Ee({},g),c);return Dd(o,function(N){for(var k in R)N.addCase(k,R[k]);for(var $=0,U=v;$<U.length;$++){var vt=U[$];N.addMatcher(vt.matcher,vt.reducer)}L&&N.addDefaultCase(L)})}var p;return{name:e,reducer:function(y,u){return p||(p=f()),p(y,u)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Md="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ud=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Md[Math.random()*64|0];return e},Wd=["name","message","stack","code"],Qn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Jc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Fd=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Wd;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},lv=function(){function t(e,o,n){var a=we(e+"/fulfilled",function(y,u,g,S){return{payload:y,meta:Xn(Ee({},S||{}),{arg:g,requestId:u,requestStatus:"fulfilled"})}}),i=we(e+"/pending",function(y,u,g){return{payload:void 0,meta:Xn(Ee({},g||{}),{arg:u,requestId:y,requestStatus:"pending"})}}),c=we(e+"/rejected",function(y,u,g,S,v){return{payload:S,error:(n&&n.serializeError||Fd)(y||"Rejected"),meta:Xn(Ee({},v||{}),{arg:g,requestId:u,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(u,g,S){var v=n?.idGenerator?n.idGenerator(y):Ud(),O=new f,L,R=!1;function N($){L=$,O.abort()}var k=function(){return Rd(this,null,function(){var $,U,vt,Vt,gt,jt,pt;return Sd(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),Vt=($=n?.condition)==null?void 0:$.call(n,y,{getState:g,extra:S}),Hd(Vt)?[4,Vt]:[3,2];case 1:Vt=m.sent(),m.label=2;case 2:if(Vt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,gt=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:L||"Aborted"})})}),u(i(v,y,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:v,arg:y},{getState:g,extra:S}))),[4,Promise.race([gt,Promise.resolve(o(y,{dispatch:u,getState:g,extra:S,requestId:v,signal:O.signal,abort:N,rejectWithValue:function(x,P){return new Qn(x,P)},fulfillWithValue:function(x,P){return new Jc(x,P)}})).then(function(x){if(x instanceof Qn)throw x;return x instanceof Jc?a(x.payload,v,y,x.meta):a(x,v,y)})])];case 3:return vt=m.sent(),[3,5];case 4:return jt=m.sent(),vt=jt instanceof Qn?c(null,v,y,jt.payload,jt.meta):c(jt,v,y),[3,5];case 5:return pt=n&&!n.dispatchConditionRejection&&c.match(vt)&&vt.meta.condition,pt||u(vt),[2,vt]}})})}();return Object.assign(k,{abort:N,requestId:v,arg:y,unwrap:function(){return k.then(zd)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function zd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Hd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var nl="listener",al="completed",il="cancelled",dv="task-"+il,pv="task-"+al,fv=nl+"-"+il,uv=nl+"-"+al;var ea="listenerMiddleware";var hv=we(ea+"/add"),yv=we(ea+"/removeAll"),mv=we(ea+"/remove");var Qc,gv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Qc||(Qc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Gd=function(t){return function(e){setTimeout(e,t)}},bv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gd(10);Fc();function Vd(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 Do=class extends Vd(Object){};window.ftReduxStores||(window.ftReduxStores={});var sl=class t extends Do{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(Br(i))return i;if(a==null)return;let c=ol({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=el({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:c.reducer(f,p)});return window.ftReduxStores[a.name]=new t(c,l)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wo;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,i,c)=>{let l=i,f=a[l];return f?(...p)=>{let y=f(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[l]:n(p)})}}})}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 $o=class{static format(e,o,n,a){return window.moment?window.moment(e).locale(o).format(this.getDateFormat(n,a)):e}static getDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}};var Mo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i};function cl(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Mo([(0,ra.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Mo([(0,ra.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Mo([In({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Mo([In({store:_.name})],e.prototype,"uiLocale",void 0),e}var zo=b(T());var Uo=class extends ge{async listMySearches(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Wo=class extends ge{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var jd="ft-user-assets",Fo=zo.FtReduxStore.get({name:jd,initialState:{savedSearches:void 0,bookmarks:void 0}}),oa=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Wo,this.savedSearchesService=new Uo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();(0,zo.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(),Fo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fo.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;Fo.actions.bookmarks(o)}}},Xv=new oa;var na=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new na;var ll=b(T()),aa=class{highlightHtml(e,o,n){(0,ll.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new aa;var dl=b(T());var ia=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return dl.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ia;var Kd=b(T());(0,pl.customElement)("ft-app-context")(J);var ul=b(Q()),Zd=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},sa=Symbol("i18nAttributes"),ca=Symbol("i18nListAttributes"),Fe=Symbol("i18nProperties"),la=Symbol("i18nManualContexts"),Fr=Symbol("i18nUnsubs");function Vo(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?gc:Me}i18n(i,c,...l){var f;if(typeof i=="string")return this.i18nService.resolveMessage(i,c,...l);let p=(f=i.args)!==null&&f!==void 0?f:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var c,l,f;(c=this[sa])===null||c===void 0||c.forEach((p,y)=>{let u=this.getI18nAttributeValue(y);u&&(this[y]=this.getI18nAttributeMessage(u,p,i))}),(l=this[ca])===null||l===void 0||l.forEach((p,y)=>{let u=this.getI18nListAttributeValues(y);this[y]=u?.map(g=>this.getI18nAttributeMessage(g,p,i))}),(f=this[Fe])===null||f===void 0||f.forEach((p,y)=>{p.context.toLowerCase()===i.toLowerCase()&&(this[y]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(i,c){return{...i,message:this.i18n({context:i.context,key:i.key,...c})}}getI18nAttributeMessage(i,c,l){var f;let p=!l||((f=i.context)===null||f===void 0?void 0:f.toLowerCase())===l.toLowerCase();return i.context&&i.key&&p?this.buildI18nAttributeMessage(i,c):i}update(i){var c,l,f;super.update(i),(c=this[sa])===null||c===void 0||c.forEach((p,y)=>{let u=this.getI18nAttributeValue(y);u?.context&&u.key&&(i.has(y)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(u,i,y),this[y]=this.getI18nAttributeMessage(u,p))}),(l=this[ca])===null||l===void 0||l.forEach((p,y)=>{let u=this.getI18nListAttributeValues(y);(i.has(y)||p.argsProvider!=null)&&(this[y]=u?.map(g=>(this.addI18nContextIfNeeded(g,i,y),this.getI18nAttributeMessage(g,p))))}),(f=this[Fe])===null||f===void 0||f.forEach((p,y)=>{p.argsProvider!=null&&(this[y]=this.i18n(p))})}getI18nAttributeValue(i){return this[i]}getI18nListAttributeValues(i){return this[i]}addI18nContextIfNeeded(i,c,l){i.context&&i.key&&c.has(l)&&this.addI18nContext(i.context)}addI18nMessagesAndSubscribe(i,c){i=i.toLowerCase(),this[Fr].has(i)||this[Fr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,c??{}),this.onI18nUpdate(i)}connectedCallback(){var i,c,l,f,p,y;super.connectedCallback(),new Set([...(c=(i=this[Fe])===null||i===void 0?void 0:i.values())!==null&&c!==void 0?c:[],...[...(f=(l=this[sa])===null||l===void 0?void 0:l.keys())!==null&&f!==void 0?f:[]].map(u=>this.getI18nAttributeValue(u)),...[...(y=(p=this[ca])===null||p===void 0?void 0:p.keys())!==null&&y!==void 0?y:[]].flatMap(u=>this.getI18nListAttributeValues(u))].map(u=>u?.context)).forEach(u=>u&&this.addI18nMessages(u)),this[la].forEach((u,g)=>{this.addI18nMessages(g,u)})}addI18nMessages(i,c){this[la].set(i,c??{}),this.addI18nMessagesAndSubscribe(i,c)}addI18nContext(i,c){this.addI18nMessages(typeof i=="string"?i:i.name,c)}disconnectedCallback(){super.disconnectedCallback(),this[Fr].forEach(i=>i()),this[Fr].clear()}}return e=la,o=Fr,Zd([(0,ul.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var fl=class extends Vo(Go.FtLitElement){},Ho=class extends Vo(Go.FtLitElementRedux){};var gl=b(T());var jo=b(F()),Ko=b(Q()),Zo=b(T());var hl=b(F());var yl=hl.css`
1503
+ `}update(e){var o,n,a,i,c;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Me.addContext(l)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((c=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&c!==void 0?c:!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())}};J.elementDefinitions={};J.styles=yc;yt([(0,At.property)()],J.prototype,"baseUrl",void 0);yt([(0,At.property)()],J.prototype,"apiIntegrationIdentifier",void 0);yt([(0,At.property)()],J.prototype,"uiLocale",void 0);yt([(0,zt.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);yt([(0,zt.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"editorMode",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"noCustom",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);yt([(0,At.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],J.prototype,"noCustomComponent",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"withManualResources",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);yt([(0,At.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);yt([(0,At.property)({type:Object})],J.prototype,"apiProvider",void 0);yt([(0,zt.jsonProperty)([])],J.prototype,"messageContexts",void 0);yt([(0,zt.jsonProperty)(void 0)],J.prototype,"session",void 0);yt([(0,At.state)()],J.prototype,"localesConfiguration",void 0);var ra=b(Q());function sd(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(!Eo(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(!Eo(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=c=>Object.keys(c).filter(l=>c[l]!=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 c=a[n];if(!Eo(t[c],e[c]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Eo(t,e){try{return sd(t,e)}catch{return!1}}function _r(t,e){return!Eo(t,e)}var xc=b(Q(),1);var In=t=>{let e=t??{};return(o,n)=>{var a;let i={hasChanged:_r,attribute:!1,...e};(0,xc.property)(i)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[n],store:e.store})}};var wo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==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}};var kr=b(Q(),1);var vc=b(Q(),1);function Sc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,vc.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:_r,...e??{}})}var Ao=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 c of n)try{await c()}catch(l){a(l);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 Cc=b(F(),1);var Ro=window,cd=Ro.ShadowRoot&&(Ro.ShadyCSS===void 0||Ro.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ex=Symbol();var Oc=(t,e)=>{cd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),a=Ro.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)})};var No=class extends Cc.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 Oc(n,e.elementStyles),n}};var Lo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Rc,Ec=Symbol("constructorPrototype"),wc=Symbol("constructorName"),Nc=Symbol("exportpartsDebouncer"),Ac=Symbol("dynamicDependenciesLoaded"),xe=class extends No{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Rc]=new Ao(5),this[wc]=this.constructor.name,this[Ec]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wc]&&Object.setPrototypeOf(this,this[Ec])}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[Ac]||(e[Ac]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}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[Nc].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,c,l;let f=g=>g!=null&&g.trim().length>0,p=e.filter(f).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(l=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...S,...v).filter(f).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let u=[...y.values()].flatMap(g=>p.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...u].join(", "))}};Rc=Nc;Lo([(0,kr.property)()],xe.prototype,"exportpartsPrefix",void 0);Lo([Sc([])],xe.prototype,"exportpartsPrefixes",void 0);Lo([(0,kr.property)()],xe.prototype,"customStylesheet",void 0);Lo([(0,kr.state)()],xe.prototype,"useAdoptedStyleSheets",void 0);function Br(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Lc,Ic,Tc,Dr=Symbol("internalReduxEventsUnsubscribers"),ve=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),$r=class extends xe{constructor(){super(...arguments),this[Lc]=new Map,this[Ic]=new Map,this[Tc]=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[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ue].get(e)}addStore(e,o){var n;o=(n=o??(Br(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].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[ve].has(e.store):this[ve].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[ve].set(e,o.subscribe(()=>this.updateFromStores())),this[Dr].set(e,[]),Br(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=l=>this[i](l);o.addEventListener(a.eventName,c),this[Dr].get(e).push(()=>o.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[ve].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[ve].has(e)&&this[ve].get(e)(),this[ve].delete(e),(o=this[Dr].get(e))===null||o===void 0||o.forEach(n=>n()),this[Dr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Lc=ve,Ic=Ue,Tc=Dr;$r.reduxProperties=new Map;$r.reduxReactiveProperties=new Set;$r.reduxEventListeners=new Map;function Ut(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(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ie(t){return!!t&&!!t[Z]}function Ht(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)===md}(t)||Array.isArray(t)||!!t[Mc]||!!(!((e=t.constructor)===null||e===void 0)&&e[Mc])||Un(t)||Wn(t))}function We(t,e,o){o===void 0&&(o=!1),pr(t)===0?(o?Object.keys:dr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function pr(t){var e=t[Z];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Un(t)?2:Wn(t)?3:0}function lr(t,e){return pr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ld(t,e){return pr(t)===2?t.get(e):t[e]}function Uc(t,e,o){var n=pr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Wc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Un(t){return hd&&t instanceof Map}function Wn(t){return yd&&t instanceof Set}function Se(t){return t.o||t.t}function Fn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Hc(t);delete e[Z];for(var o=dr(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 zn(t,e){return e===void 0&&(e=!1),Hn(t)||ie(t)||!Ht(t)||(pr(t)>1&&(t.set=t.add=t.clear=t.delete=dd),Object.freeze(t),e&&We(t,function(o,n){return zn(n,!0)},!0)),t}function dd(){Ut(2)}function Hn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=Mn[t];return e||Ut(18,t),e}function pd(t,e){Mn[t]||(Mn[t]=e)}function Bn(){return Ur}function Tn(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Io(t){Dn(t),t.p.forEach(fd),t.p=null}function Dn(t){t===Ur&&(Ur=t.l)}function Pc(t){return Ur={p:[],l:Ur,h:t,m:!0,_:0}}function fd(t){var e=t[Z];e.i===0||e.i===1?e.j():e.g=!0}function Pn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,n),n?(o[Z].P&&(Io(e),Ut(4)),Ht(t)&&(t=To(e,t),e.l||Po(e,t)),e.u&&Yt("Patches").M(o[Z].t,t,e.u,e.s)):t=To(e,o,[]),Io(e),e.u&&e.v(e.u,e.s),t!==zc?t:void 0}function To(t,e,o){if(Hn(e))return e;var n=e[Z];if(!n)return We(e,function(l,f){return _c(t,n,e,l,f,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Po(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Fn(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),We(i,function(l,f){return _c(t,n,a,l,f,o,c)}),Po(t,a,!1),o&&t.u&&Yt("Patches").N(n,o,t.u,t.s)}return n.o}function _c(t,e,o,n,a,i,c){if(ie(a)){var l=To(t,a,i&&e&&e.i!==3&&!lr(e.R,n)?i.concat(n):void 0);if(Uc(o,n,l),!ie(l))return;t.m=!1}else c&&o.add(a);if(Ht(a)&&!Hn(a)){if(!t.h.D&&t._<1)return;To(t,a),e&&e.A.l||Po(t,a)}}function Po(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&zn(e,o)}function _n(t,e){var o=t[Z];return(o?Se(o):t)[e]}function kc(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 Oe(t){t.P||(t.P=!0,t.l&&Oe(t.l))}function kn(t){t.o||(t.o=Fn(t.t))}function $n(t,e,o){var n=Un(e)?Yt("MapSet").F(e,o):Wn(e)?Yt("MapSet").T(e,o):t.O?function(a,i){var c=Array.isArray(a),l={i:c?1:0,A:i?i.A:Bn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,p=Wr;c&&(f=[l],p=Mr);var y=Proxy.revocable(f,p),u=y.revoke,g=y.proxy;return l.k=g,l.j=u,g}(e,o):Yt("ES5").J(e,o);return(o?o.A:Bn()).p.push(n),n}function ud(t){return ie(t)||Ut(22,t),function e(o){if(!Ht(o))return o;var n,a=o[Z],i=pr(o);if(a){if(!a.P&&(a.i<4||!Yt("ES5").K(a)))return a.t;a.I=!0,n=Bc(o,i),a.I=!1}else n=Bc(o,i);return We(n,function(c,l){a&&ld(a.t,c)===l||Uc(n,c,e(l))}),i===3?new Set(n):n}(t)}function Bc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Fn(t)}function Fc(){function t(c,l){var f=i[c];return f?f.enumerable=l:i[c]=f={configurable:!0,enumerable:l,get:function(){var p=this[Z];return Wr.get(p,c)},set:function(p){var y=this[Z];Wr.set(y,c,p)}},f}function e(c){for(var l=c.length-1;l>=0;l--){var f=c[l][Z];if(!f.P)switch(f.i){case 5:n(f)&&Oe(f);break;case 4:o(f)&&Oe(f)}}}function o(c){for(var l=c.t,f=c.k,p=dr(f),y=p.length-1;y>=0;y--){var u=p[y];if(u!==Z){var g=l[u];if(g===void 0&&!lr(l,u))return!0;var S=f[u],v=S&&S[Z];if(v?v.t!==g:!Wc(S,g))return!0}}var O=!!l[Z];return p.length!==dr(l).length+(O?0:1)}function n(c){var l=c.k;if(l.length!==c.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&Ut(3,JSON.stringify(Se(c)))}var i={};pd("ES5",{J:function(c,l){var f=Array.isArray(c),p=function(u,g){if(u){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Hc(g);delete O[Z];for(var L=dr(O),R=0;R<L.length;R++){var N=L[R];O[N]=t(N,u||!!O[N].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(f,c),y={i:f?5:4,A:l?l.A:Bn(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Z,{value:y,writable:!0}),p},S:function(c,l,f){f?ie(l)&&l[Z].A===c&&e(c.p):(c.u&&function p(y){if(y&&typeof y=="object"){var u=y[Z];if(u){var g=u.t,S=u.k,v=u.R,O=u.i;if(O===4)We(S,function($){$!==Z&&(g[$]!==void 0||lr(g,$)?v[$]||p(S[$]):(v[$]=!0,Oe(u)))}),We(g,function($){S[$]!==void 0||lr(S,$)||(v[$]=!1,Oe(u))});else if(O===5){if(n(u)&&(Oe(u),v.length=!0),S.length<g.length)for(var L=S.length;L<g.length;L++)v[L]=!1;else for(var R=g.length;R<S.length;R++)v[R]=!0;for(var N=Math.min(S.length,g.length),k=0;k<N;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&p(S[k])}}}}(c.p[0]),e(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var Dc,Ur,Gn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hd=typeof Map<"u",yd=typeof Set<"u",$c=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",zc=Gn?Symbol.for("immer-nothing"):((Dc={})["immer-nothing"]=!0,Dc),Mc=Gn?Symbol.for("immer-draftable"):"__$immer_draftable",Z=Gn?Symbol.for("immer-state"):"__$immer_state";var md=""+Object.prototype.constructor,dr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Hc=Object.getOwnPropertyDescriptors||function(t){var e={};return dr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Mn={},Wr={get:function(t,e){if(e===Z)return t;var o=Se(t);if(!lr(o,e))return function(a,i,c){var l,f=kc(i,c);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!Ht(n)?n:n===_n(t.t,e)?(kn(t),t.o[e]=$n(t.A.h,n,t)):n},has:function(t,e){return e in Se(t)},ownKeys:function(t){return Reflect.ownKeys(Se(t))},set:function(t,e,o){var n=kc(Se(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=_n(Se(t),e),i=a?.[Z];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Wc(o,a)&&(o!==void 0||lr(t.t,e)))return!0;kn(t),Oe(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 _n(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,kn(t),Oe(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Se(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ut(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ut(12)}},Mr={};We(Wr,function(t,e){Mr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Mr.deleteProperty=function(t,e){return Mr.set.call(this,t,e,void 0)},Mr.set=function(t,e,o){return Wr.set.call(this,t[0],e,o,t[0])};var gd=function(){function t(o){var n=this;this.O=$c,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(O){var L=this;O===void 0&&(O=l);for(var R=arguments.length,N=Array(R>1?R-1:0),k=1;k<R;k++)N[k-1]=arguments[k];return f.produce(O,function($){var U;return(U=i).call.apply(U,[L,$].concat(N))})}}var p;if(typeof i!="function"&&Ut(6),c!==void 0&&typeof c!="function"&&Ut(7),Ht(a)){var y=Pc(n),u=$n(n,a,void 0),g=!0;try{p=i(u),g=!1}finally{g?Io(y):Dn(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return Tn(y,c),Pn(O,y)},function(O){throw Io(y),O}):(Tn(y,c),Pn(p,y))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===zc&&(p=void 0),n.D&&zn(p,!0),c){var S=[],v=[];Yt("Patches").M(a,p,S,v),c(S,v)}return p}Ut(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var y=arguments.length,u=Array(y>1?y-1:0),g=1;g<y;g++)u[g-1]=arguments[g];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(u))})};var c,l,f=n.produce(a,i,function(p,y){c=p,l=y});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,c,l]}):[f,c,l]},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){Ht(o)||Ut(8),ie(o)&&(o=ud(o));var n=Pc(this),a=$n(this,o,void 0);return a[Z].C=!0,Dn(n),a},e.finishDraft=function(o,n){var a=o&&o[Z],i=a.A;return Tn(i,n),Pn(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!$c&&Ut(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 c=Yt("Patches").$;return ie(o)?c(o,n):this.produce(o,function(l){return c(l,n)})},t}(),kt=new gd,bd=kt.produce,Dx=kt.produceWithPatches.bind(kt),$x=kt.setAutoFreeze.bind(kt),Mx=kt.setUseProxies.bind(kt),Ux=kt.applyPatches.bind(kt),Wx=kt.createDraft.bind(kt),Fx=kt.finishDraft.bind(kt),_o=bd;function Ce(t){"@babel/helpers - typeof";return Ce=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},Ce(t)}function Vn(t,e){if(Ce(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Ce(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jn(t){var e=Vn(t,"string");return Ce(e)==="symbol"?e:String(e)}function Kn(t,e,o){return e=jn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Gc(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 ko(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Gc(Object(o),!0).forEach(function(n){Kn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Gc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function mt(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"}(),Zn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Bo={INIT:"@@redux/INIT"+Zn(),REPLACE:"@@redux/REPLACE"+Zn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zn()}};function xd(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 qn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(mt(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(mt(1));return o(qn)(t,e)}if(typeof t!="function")throw new Error(mt(2));var a=t,i=e,c=[],l=c,f=!1;function p(){l===c&&(l=c.slice())}function y(){if(f)throw new Error(mt(3));return i}function u(O){if(typeof O!="function")throw new Error(mt(4));if(f)throw new Error(mt(5));var L=!0;return p(),l.push(O),function(){if(L){if(f)throw new Error(mt(6));L=!1,p();var N=l.indexOf(O);l.splice(N,1),c=null}}}function g(O){if(!xd(O))throw new Error(mt(7));if(typeof O.type>"u")throw new Error(mt(8));if(f)throw new Error(mt(9));try{f=!0,i=a(i,O)}finally{f=!1}for(var L=c=l,R=0;R<L.length;R++){var N=L[R];N()}return O}function S(O){if(typeof O!="function")throw new Error(mt(10));a=O,g({type:Bo.REPLACE})}function v(){var O,L=u;return O={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(mt(11));function k(){N.next&&N.next(y())}k();var $=L(k);return{unsubscribe:$}}},O[Vc]=function(){return this},O}return g({type:Bo.INIT}),n={dispatch:g,subscribe:u,getState:y,replaceReducer:S},n[Vc]=v,n}function vd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Bo.INIT});if(typeof n>"u")throw new Error(mt(12));if(typeof o(void 0,{type:Bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(mt(13))})}function jc(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),c,l;try{vd(o)}catch(f){l=f}return function(p,y){if(p===void 0&&(p={}),l)throw l;if(0)var u;for(var g=!1,S={},v=0;v<i.length;v++){var O=i[v],L=o[O],R=p[O],N=L(R,y);if(typeof N>"u"){var k=y&&y.type;throw new Error(mt(14))}S[O]=N,g=g||N!==R}return g=g||i.length!==Object.keys(p).length,g?S:p}}function fr(){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 Kc(){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(mt(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(f){return f(c)});return i=fr.apply(void 0,l)(a.dispatch),ko(ko({},a),{},{dispatch:i})}}}function Zc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(l){return typeof l=="function"?l(a,i,t):c(l)}}};return e}var qc=Zc();qc.withExtraArgument=Zc;var Yn=qc;var tl=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)}}(),Sd=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},ur=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},Od=Object.defineProperty,Cd=Object.defineProperties,Ed=Object.getOwnPropertyDescriptors,Yc=Object.getOwnPropertySymbols,wd=Object.prototype.hasOwnProperty,Ad=Object.prototype.propertyIsEnumerable,Xc=function(t,e,o){return e in t?Od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ee=function(t,e){for(var o in e||(e={}))wd.call(e,o)&&Xc(t,o,e[o]);if(Yc)for(var n=0,a=Yc(e);n<a.length;n++){var o=a[n];Ad.call(e,o)&&Xc(t,o,e[o])}return t},Xn=function(t,e){return Cd(t,Ed(e))},Rd=function(t,e,o){return new Promise(function(n,a){var i=function(f){try{l(o.next(f))}catch(p){a(p)}},c=function(f){try{l(o.throw(f))}catch(p){a(p)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,c)};l((o=o.apply(t,e)).next())})};var Nd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fr:fr.apply(null,arguments)},av=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ld(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 Id=function(t){tl(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,ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,ur([void 0],o.concat(this))))},e}(Array),Td=function(t){tl(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,ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,ur([void 0],o.concat(this))))},e}(Array);function ta(t){return Ht(t)?_o(t,function(){}):t}function Pd(t){return typeof t=="boolean"}function _d(){return function(e){return kd(e)}}function kd(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,c=i===void 0?!0:i,l=new Id;if(o&&(Pd(o)?l.push(Yn):l.push(Yn.withExtraArgument(o.extraArgument))),0){if(a)var f;if(c)var p}return l}var Jn=!0;function el(t){var e=_d(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?e():i,l=o.devTools,f=l===void 0?!0:l,p=o.preloadedState,y=p===void 0?void 0:p,u=o.enhancers,g=u===void 0?void 0:u,S;if(typeof a=="function")S=a;else if(Ld(a))S=jc(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=c;if(typeof v=="function"&&(v=v(e),!Jn&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Jn&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Kc.apply(void 0,v),L=fr;f&&(L=Nd(Ee({trace:!Jn},typeof f=="object"&&f)));var R=new Td(O),N=R;Array.isArray(g)?N=ur([O],g):typeof g=="function"&&(N=g(R));var k=L.apply(void 0,N);return qn(S,y,k)}function we(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 Ee(Ee({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 rl(t){var e={},o=[],n,a={addCase:function(i,c){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function Bd(t){return typeof t=="function"}function Dd(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?rl(e):[e,o,n],i=a[0],c=a[1],l=a[2],f;if(Bd(t))f=function(){return ta(t())};else{var p=ta(t);f=function(){return p}}function y(u,g){u===void 0&&(u=f());var S=ur([i[g.type]],c.filter(function(v){var O=v.matcher;return O(g)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[l]),S.reduce(function(v,O){if(O)if(ie(v)){var L=v,R=O(L,g);return R===void 0?v:R}else{if(Ht(v))return _o(v,function(N){return O(N,g)});var R=O(v,g);if(R===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return v},u)}return y.getInitialState=f,y}function $d(t,e){return t+"/"+e}function ol(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:ta(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},c={},l={};a.forEach(function(y){var u=n[y],g=$d(e,y),S,v;"reducer"in u?(S=u.reducer,v=u.prepare):S=u,i[y]=S,c[g]=S,l[y]=v?we(g,v):we(g)});function f(){var y=typeof t.extraReducers=="function"?rl(t.extraReducers):[t.extraReducers],u=y[0],g=u===void 0?{}:u,S=y[1],v=S===void 0?[]:S,O=y[2],L=O===void 0?void 0:O,R=Ee(Ee({},g),c);return Dd(o,function(N){for(var k in R)N.addCase(k,R[k]);for(var $=0,U=v;$<U.length;$++){var vt=U[$];N.addMatcher(vt.matcher,vt.reducer)}L&&N.addDefaultCase(L)})}var p;return{name:e,reducer:function(y,u){return p||(p=f()),p(y,u)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var Md="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ud=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Md[Math.random()*64|0];return e},Wd=["name","message","stack","code"],Qn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Jc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Fd=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Wd;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},lv=function(){function t(e,o,n){var a=we(e+"/fulfilled",function(y,u,g,S){return{payload:y,meta:Xn(Ee({},S||{}),{arg:g,requestId:u,requestStatus:"fulfilled"})}}),i=we(e+"/pending",function(y,u,g){return{payload:void 0,meta:Xn(Ee({},g||{}),{arg:u,requestId:y,requestStatus:"pending"})}}),c=we(e+"/rejected",function(y,u,g,S,v){return{payload:S,error:(n&&n.serializeError||Fd)(y||"Rejected"),meta:Xn(Ee({},v||{}),{arg:g,requestId:u,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(u,g,S){var v=n?.idGenerator?n.idGenerator(y):Ud(),O=new f,L,R=!1;function N($){L=$,O.abort()}var k=function(){return Rd(this,null,function(){var $,U,vt,Vt,gt,jt,pt;return Sd(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),Vt=($=n?.condition)==null?void 0:$.call(n,y,{getState:g,extra:S}),Hd(Vt)?[4,Vt]:[3,2];case 1:Vt=m.sent(),m.label=2;case 2:if(Vt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,gt=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:L||"Aborted"})})}),u(i(v,y,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:v,arg:y},{getState:g,extra:S}))),[4,Promise.race([gt,Promise.resolve(o(y,{dispatch:u,getState:g,extra:S,requestId:v,signal:O.signal,abort:N,rejectWithValue:function(x,P){return new Qn(x,P)},fulfillWithValue:function(x,P){return new Jc(x,P)}})).then(function(x){if(x instanceof Qn)throw x;return x instanceof Jc?a(x.payload,v,y,x.meta):a(x,v,y)})])];case 3:return vt=m.sent(),[3,5];case 4:return jt=m.sent(),vt=jt instanceof Qn?c(null,v,y,jt.payload,jt.meta):c(jt,v,y),[3,5];case 5:return pt=n&&!n.dispatchConditionRejection&&c.match(vt)&&vt.meta.condition,pt||u(vt),[2,vt]}})})}();return Object.assign(k,{abort:N,requestId:v,arg:y,unwrap:function(){return k.then(zd)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function zd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Hd(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var nl="listener",al="completed",il="cancelled",dv="task-"+il,pv="task-"+al,fv=nl+"-"+il,uv=nl+"-"+al;var ea="listenerMiddleware";var hv=we(ea+"/add"),yv=we(ea+"/removeAll"),mv=we(ea+"/remove");var Qc,gv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Qc||(Qc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Gd=function(t){return function(e){setTimeout(e,t)}},bv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gd(10);Fc();function Vd(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 Do=class extends Vd(Object){};window.ftReduxStores||(window.ftReduxStores={});var sl=class t extends Do{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(Br(i))return i;if(a==null)return;let c=ol({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=el({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:c.reducer(f,p)});return window.ftReduxStores[a.name]=new t(c,l)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wo;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,i,c)=>{let l=i,f=a[l];return f?(...p)=>{let y=f(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[l]:n(p)})}}})}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 $o=class{static format(e,o,n,a){return window.moment?window.moment(e).locale(o).format(this.getDateFormat(n,a)):e}static getDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}};var Mo=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i};function cl(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Mo([(0,ra.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Mo([(0,ra.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Mo([In({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Mo([In({store:_.name})],e.prototype,"uiLocale",void 0),e}var zo=b(T());var Uo=class extends ge{async listMySearches(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Wo=class extends ge{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var jd="ft-user-assets",Fo=zo.FtReduxStore.get({name:jd,initialState:{savedSearches:void 0,bookmarks:void 0}}),oa=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Wo,this.savedSearchesService=new Uo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();(0,zo.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(),Fo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fo.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;Fo.actions.bookmarks(o)}}},Xv=new oa;var na=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new na;var ll=b(T()),aa=class{highlightHtml(e,o,n){(0,ll.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new aa;var dl=b(T());var ia=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return dl.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ia;var Kd=b(T());(0,pl.customElement)("ft-app-context")(J);var ul=b(Q()),Zd=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},sa=Symbol("i18nAttributes"),ca=Symbol("i18nListAttributes"),Fe=Symbol("i18nProperties"),la=Symbol("i18nManualContexts"),Fr=Symbol("i18nUnsubs");function Vo(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?gc:Me}i18n(i,c,...l){var f;if(typeof i=="string")return this.i18nService.resolveMessage(i,c,...l);let p=(f=i.args)!==null&&f!==void 0?f:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var c,l,f;(c=this[sa])===null||c===void 0||c.forEach((p,y)=>{let u=this.getI18nAttributeValue(y);u&&(this[y]=this.getI18nAttributeMessage(u,p,i))}),(l=this[ca])===null||l===void 0||l.forEach((p,y)=>{let u=this.getI18nListAttributeValues(y);this[y]=u?.map(g=>this.getI18nAttributeMessage(g,p,i))}),(f=this[Fe])===null||f===void 0||f.forEach((p,y)=>{p.context.toLowerCase()===i.toLowerCase()&&(this[y]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(i,c){return{...i,message:this.i18n({context:i.context,key:i.key,...c})}}getI18nAttributeMessage(i,c,l){var f;let p=!l||((f=i.context)===null||f===void 0?void 0:f.toLowerCase())===l.toLowerCase();return i.context&&i.key&&p?this.buildI18nAttributeMessage(i,c):i}update(i){var c,l,f;super.update(i),(c=this[sa])===null||c===void 0||c.forEach((p,y)=>{let u=this.getI18nAttributeValue(y);u?.context&&u.key&&(i.has(y)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(u,i,y),this[y]=this.getI18nAttributeMessage(u,p))}),(l=this[ca])===null||l===void 0||l.forEach((p,y)=>{let u=this.getI18nListAttributeValues(y);(i.has(y)||p.argsProvider!=null)&&(this[y]=u?.map(g=>(this.addI18nContextIfNeeded(g,i,y),this.getI18nAttributeMessage(g,p))))}),(f=this[Fe])===null||f===void 0||f.forEach((p,y)=>{p.argsProvider!=null&&(this[y]=this.i18n(p))})}getI18nAttributeValue(i){return this[i]}getI18nListAttributeValues(i){return this[i]}addI18nContextIfNeeded(i,c,l){i.context&&i.key&&c.has(l)&&this.addI18nContext(i.context)}addI18nMessagesAndSubscribe(i,c){i=i.toLowerCase(),this[Fr].has(i)||this[Fr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,c??{}),this.onI18nUpdate(i)}connectedCallback(){var i,c,l,f,p,y;super.connectedCallback(),new Set([...(c=(i=this[Fe])===null||i===void 0?void 0:i.values())!==null&&c!==void 0?c:[],...[...(f=(l=this[sa])===null||l===void 0?void 0:l.keys())!==null&&f!==void 0?f:[]].map(u=>this.getI18nAttributeValue(u)),...[...(y=(p=this[ca])===null||p===void 0?void 0:p.keys())!==null&&y!==void 0?y:[]].flatMap(u=>this.getI18nListAttributeValues(u))].map(u=>u?.context)).forEach(u=>u&&this.addI18nMessages(u)),this[la].forEach((u,g)=>{this.addI18nMessages(g,u)})}addI18nMessages(i,c){this[la].set(i,c??{}),this.addI18nMessagesAndSubscribe(i,c)}addI18nContext(i,c){this.addI18nMessages(typeof i=="string"?i:i.name,c)}disconnectedCallback(){super.disconnectedCallback(),this[Fr].forEach(i=>i()),this[Fr].clear()}}return e=la,o=Fr,Zd([(0,ul.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var fl=class extends Vo(Go.FtLitElement){},Ho=class extends Vo(Go.FtLitElementRedux){};var gl=b(T());var jo=b(F()),Ko=b(Q()),Zo=b(T());var hl=b(F());var yl=hl.css`
1504
1504
  `;var zr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(c=t[l])&&(i=(a<3?c(i):a>3?c(e,o,i):c(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Gt=class extends Ho{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":jo.nothing:jo.html`
1505
1505
  <span class="ft-i18n">
1506
1506
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}