@fluid-topics/ft-reader-attachments 1.1.100 → 1.1.101

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.
@@ -229,7 +229,7 @@
229
229
  `;var Dt=S(R());var un=S(R());var So=S(M()),j=S($()),q=S(R());var go=S(M());var bo=go.css`
230
230
  `;var mt=S(R()),Za="ft-app-info",Qt=class extends CustomEvent{constructor(r){super("authentication-change",{detail:r})}},Fa={session:(t,r)=>{(0,mt.deepEqual)(t.session,r.payload)||(t.session=r.payload,setTimeout(()=>C.eventBus.dispatchEvent(new Qt(r.payload)),0))}},C=mt.FtReduxStore.get({name:Za,reducers:Fa,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var de=S(R());var er=S(R());var Se=class t{static get(r){let{baseUrl:o,apiIntegrationIdentifier:n}=C.getState(),a=r??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(r){return new Promise(o=>{let n=t.get(r);if(n)o(n);else{let a=C.subscribe(()=>{n=t.get(r),n&&(a(),o(n))})}})}};var se=class{constructor(r=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new er.CacheRegistry,this.cache=r?a.commonCache:new er.CacheRegistry}get api(){var r;return(r=this.overrideApi)!==null&&r!==void 0?r:Se.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Se.await()}clearCache(){this.cache.clearAll()}};var xo,Va=Symbol("clearAfterUnitTest"),yt=class extends se{constructor(r){super(),this.messageContextProvider=r,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[xo]=()=>{this.defaultMessages={},this.cache=new de.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:r}=C.getState();this.currentUiLocale!==r&&(this.currentUiLocale=r,this.cache.clearAll(),this.notifyAll())}addContext(r){let o=r.name.toLowerCase();this.cache.setFinal(o,r),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(r,o){var n;if(r=r.toLowerCase(),Object.keys(o).length>0){let a={...(n=this.defaultMessages[r])!==null&&n!==void 0?n:{},...o};(0,de.deepEqual)(this.defaultMessages[r],a)||(this.defaultMessages[r]=a,await this.notify(r))}await this.fetchContext(r)}resolveMessage(r,o,...n){var a,i,l;r=r.toLowerCase(),this.fetchContext(r);let d=(i=(a=this.cache.getNow(r))===null||a===void 0?void 0:a.messages)!==null&&i!==void 0?i:{};return new de.ParametrizedLabelResolver((l=this.defaultMessages[r])!==null&&l!==void 0?l:{},d).resolve(o,...n)}async fetchContext(r){if(!this.cache.has(r))try{await this.cache.get(r,()=>this.messageContextProvider(this.currentUiLocale,r)),await this.notify(r)}catch(o){console.error(o)}}subscribe(r,o){var n;return r=r.toLowerCase(),this.listeners[r]=(n=this.listeners[r])!==null&&n!==void 0?n:new Set,this.listeners[r].add(o),()=>{var a;return(a=this.listeners[r])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(r=>this.notify(r)))}async notify(r){this.listeners[r]!=null&&await Promise.all([...this.listeners[r].values()].map(o=>(0,de.delay)(0).then(()=>o()).catch(()=>null)))}};xo=Va;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yt{constructor(){super(async(t,r)=>(await this.awaitApi).getFluidTopicsMessageContext(t,r))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yt{constructor(){super(async(t,r)=>(await this.awaitApi).getCustomMessageContext(t,r))}});var Pe=window.FluidTopicsI18nService,vo=window.FluidTopicsCustomI18nService;var B=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},k=class extends q.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Se.get(),this.messageContexts=[],this.cache=new q.CacheRegistry,this.cleanSessionDebouncer=new q.Debouncer}render(){return So.html`
231
231
  <slot></slot>
232
- `}update(r){super.update(r),r.has("baseUrl")&&(C.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&C.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("uiLocale")&&C.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&C.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&C.actions.noCustom(this.noCustom),r.has("editorMode")&&C.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&C.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&C.actions.session(this.session),r.has("availableUiLocales")&&C.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Pe.addContext(o)),r.has("openExternalDocumentInNewTab")&&C.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&C.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&C.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};k.elementDefinitions={};k.styles=bo;B([(0,j.property)()],k.prototype,"baseUrl",void 0);B([(0,j.property)()],k.prototype,"apiIntegrationIdentifier",void 0);B([(0,j.property)()],k.prototype,"uiLocale",void 0);B([(0,q.jsonProperty)(null)],k.prototype,"availableUiLocales",void 0);B([(0,q.jsonProperty)(null)],k.prototype,"metadataConfiguration",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"editorMode",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"noCustom",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"openExternalDocumentInNewTab",void 0);B([(0,j.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],k.prototype,"noCustomComponent",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"withManualResources",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"navigatorOnline",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"forcedOffline",void 0);B([(0,j.property)({type:Object})],k.prototype,"apiProvider",void 0);B([(0,q.jsonProperty)([])],k.prototype,"messageContexts",void 0);B([(0,q.jsonProperty)(void 0)],k.prototype,"session",void 0);var Ti=S($());function Ya(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,a;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!gt(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!gt(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(a=Object.keys(t),o=a.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!gt(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}function gt(t,r){try{return Ya(t,r)}catch{return!1}}function tr(t,r){return!gt(t,r)}var qa=S($(),1);var bt=class{constructor(){this.queue=[]}add(r,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==r.type)),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Qe=S($(),1);var Oo=S($(),1);function Co(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Oo.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:tr,...r??{}})}var xt=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);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 Eo=S(M(),1);var vt=window,Xa=vt.ShadowRoot&&(vt.ShadyCSS===void 0||vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ac=Symbol();var wo=(t,r)=>{Xa?t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):r.forEach(o=>{let n=document.createElement("style"),a=vt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)})};var St=class extends Eo.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,i])=>r.registry.define(a,i)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return wo(n,r.elementStyles),n}};var Ot=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Io,No=Symbol("constructorPrototype"),Ao=Symbol("constructorName"),Lo=Symbol("exportpartsDebouncer"),Ro=Symbol("dynamicDependenciesLoaded"),pe=class extends St{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Io]=new xt(5),this[Ao]=this.constructor.name,this[No]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ao]&&Object.setPrototypeOf(this,this[No])}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 r=this.constructor;r[Ro]||(r[Ro]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}applyCustomStylesheet(r){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(r.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 r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Lo].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(r){var o,n,a,i,l,d;let p=m=>m!=null&&m.trim().length>0,f=r.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...x,...g).filter(p).map(v=>v.trim()).forEach(v=>u.add(v))}if(u.size===0){this.removeAttribute("exportparts");return}let h=[...u.values()].flatMap(m=>f.map(x=>`${m}:${x}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Io=Lo;Ot([(0,Qe.property)()],pe.prototype,"exportpartsPrefix",void 0);Ot([Co([])],pe.prototype,"exportpartsPrefixes",void 0);Ot([(0,Qe.property)()],pe.prototype,"customStylesheet",void 0);Ot([(0,Qe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function et(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var Po,_o,ko,Ct=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores"),tt=class extends pe{constructor(){super(...arguments),this[Po]=new Map,this[_o]=new Map,this[ko]=[]}get reduxConstructor(){return this.constructor}update(r){super.update(r),[...this.reduxConstructor.reduxReactiveProperties].some(o=>r.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(r){return r==null?this.getUnnamedStore():this[Oe].get(r)}addStore(r,o){var n;o=(n=o??(et(r)?r.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,r)}removeStore(r){let o=typeof r=="string"?r:r.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStore(r,o){this[Oe].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((r,o)=>this.subscribeToStore(o,r)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((r,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(r.store);a&&(r.store?this[fe].has(r.store):this[fe].size>0)&&(this[o]=r.selector(a.getState(),this))}})}subscribeToStore(r,o){var n;this[fe].set(r,o.subscribe(()=>this.updateFromStores())),et(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 l=d=>this[i](d);o.eventBus.addEventListener(a.eventName,l),this[Ct].push(()=>o.eventBus.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(r)}unsubscribeFromStores(){this[fe].forEach((r,o)=>this.unsubscribeFromStore(o)),this[Ct].forEach(r=>r()),this[Ct]=[]}unsubscribeFromStore(r){this[fe].has(r)&&this[fe].get(r)(),this[fe].delete(r)}onStoreAvailable(r){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Po=fe,_o=Oe,ko=Ct;tt.reduxProperties=new Map;tt.reduxReactiveProperties=new Set;tt.reduxEventListeners=new Map;function Z(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(t){return!!t&&!!t[L]}function X(t){var r;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)===ai}(t)||Array.isArray(t)||!!t[zo]||!!(!((r=t.constructor)===null||r===void 0)&&r[zo])||dr(t)||pr(t))}function Ce(t,r,o){o===void 0&&(o=!1),Te(t)===0?(o?Object.keys:ke)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,a){return r(a,n,t)})}function Te(t){var r=t[L];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:dr(t)?2:pr(t)?3:0}function _e(t,r){return Te(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Ja(t,r){return Te(t)===2?t.get(r):t[r]}function $o(t,r,o){var n=Te(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function Ho(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function dr(t){return oi&&t instanceof Map}function pr(t){return ni&&t instanceof Set}function ue(t){return t.o||t.t}function fr(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=jo(t);delete r[L];for(var o=ke(r),n=0;n<o.length;n++){var a=o[n],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),r)}function ur(t,r){return r===void 0&&(r=!1),hr(t)||ne(t)||!X(t)||(Te(t)>1&&(t.set=t.add=t.clear=t.delete=Qa),Object.freeze(t),r&&Ce(t,function(o,n){return ur(n,!0)},!0)),t}function Qa(){Z(2)}function hr(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function te(t){var r=sr[t];return r||Z(18,t),r}function ei(t,r){sr[t]||(sr[t]=r)}function ir(){return ot}function rr(t,r){r&&(te("Patches"),t.u=[],t.s=[],t.v=r)}function wt(t){cr(t),t.p.forEach(ti),t.p=null}function cr(t){t===ot&&(ot=t.l)}function To(t){return ot={p:[],l:ot,h:t,m:!0,_:0}}function ti(t){var r=t[L];r.i===0||r.i===1?r.j():r.g=!0}function or(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||te("ES5").S(r,t,n),n?(o[L].P&&(wt(r),Z(4)),X(t)&&(t=Et(r,t),r.l||Nt(r,t)),r.u&&te("Patches").M(o[L].t,t,r.u,r.s)):t=Et(r,o,[]),wt(r),r.u&&r.v(r.u,r.s),t!==Ko?t:void 0}function Et(t,r,o){if(hr(r))return r;var n=r[L];if(!n)return Ce(r,function(d,p){return Wo(t,n,r,d,p,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Nt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=fr(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),Ce(i,function(d,p){return Wo(t,n,a,d,p,o,l)}),Nt(t,a,!1),o&&t.u&&te("Patches").N(n,o,t.u,t.s)}return n.o}function Wo(t,r,o,n,a,i,l){if(ne(a)){var d=Et(t,a,i&&r&&r.i!==3&&!_e(r.R,n)?i.concat(n):void 0);if($o(o,n,d),!ne(d))return;t.m=!1}else l&&o.add(a);if(X(a)&&!hr(a)){if(!t.h.D&&t._<1)return;Et(t,a),r&&r.A.l||Nt(t,a)}}function Nt(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ur(r,o)}function nr(t,r){var o=t[L];return(o?ue(o):t)[r]}function Do(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function he(t){t.P||(t.P=!0,t.l&&he(t.l))}function ar(t){t.o||(t.o=fr(t.t))}function lr(t,r,o){var n=dr(r)?te("MapSet").F(r,o):pr(r)?te("MapSet").T(r,o):t.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:ir(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=d,f=nt;l&&(p=[d],f=rt);var u=Proxy.revocable(p,f),h=u.revoke,m=u.proxy;return d.k=m,d.j=h,m}(r,o):te("ES5").J(r,o);return(o?o.A:ir()).p.push(n),n}function ri(t){return ne(t)||Z(22,t),function r(o){if(!X(o))return o;var n,a=o[L],i=Te(o);if(a){if(!a.P&&(a.i<4||!te("ES5").K(a)))return a.t;a.I=!0,n=Uo(o,i),a.I=!1}else n=Uo(o,i);return Ce(n,function(l,d){a&&Ja(a.t,l)===d||$o(n,l,r(d))}),i===3?new Set(n):n}(t)}function Uo(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return fr(t)}function Go(){function t(l,d){var p=i[l];return p?p.enumerable=d:i[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[L];return nt.get(f,l)},set:function(f){var u=this[L];nt.set(u,l,f)}},p}function r(l){for(var d=l.length-1;d>=0;d--){var p=l[d][L];if(!p.P)switch(p.i){case 5:n(p)&&he(p);break;case 4:o(p)&&he(p)}}}function o(l){for(var d=l.t,p=l.k,f=ke(p),u=f.length-1;u>=0;u--){var h=f[u];if(h!==L){var m=d[h];if(m===void 0&&!_e(d,h))return!0;var x=p[h],g=x&&x[L];if(g?g.t!==m:!Ho(x,m))return!0}}var v=!!d[L];return f.length!==ke(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function a(l){l.g&&Z(3,JSON.stringify(ue(l)))}var i={};ei("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var x=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(x,""+g,t(g,!0));return x}var v=jo(m);delete v[L];for(var N=ke(v),w=0;w<N.length;w++){var E=N[w];v[E]=t(E,h||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),u={i:p?5:4,A:d?d.A:ir(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,L,{value:u,writable:!0}),f},S:function(l,d,p){p?ne(d)&&d[L].A===l&&r(l.p):(l.u&&function f(u){if(u&&typeof u=="object"){var h=u[L];if(h){var m=h.t,x=h.k,g=h.R,v=h.i;if(v===4)Ce(x,function(A){A!==L&&(m[A]!==void 0||_e(m,A)?g[A]||f(x[A]):(g[A]=!0,he(h)))}),Ce(m,function(A){x[A]!==void 0||_e(x,A)||(g[A]=!1,he(h))});else if(v===5){if(n(h)&&(he(h),g.length=!0),x.length<m.length)for(var N=x.length;N<m.length;N++)g[N]=!1;else for(var w=m.length;w<x.length;w++)g[w]=!0;for(var E=Math.min(x.length,m.length),P=0;P<E;P++)x.hasOwnProperty(P)||(g[P]=!0),g[P]===void 0&&f(x[P])}}}}(l.p[0]),r(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Mo,ot,mr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",oi=typeof Map<"u",ni=typeof Set<"u",Bo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ko=mr?Symbol.for("immer-nothing"):((Mo={})["immer-nothing"]=!0,Mo),zo=mr?Symbol.for("immer-draftable"):"__$immer_draftable",L=mr?Symbol.for("immer-state"):"__$immer_state";var ai=""+Object.prototype.constructor,ke=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,jo=Object.getOwnPropertyDescriptors||function(t){var r={};return ke(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},sr={},nt={get:function(t,r){if(r===L)return t;var o=ue(t);if(!_e(o,r))return function(a,i,l){var d,p=Do(i,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(a.k):void 0}(t,o,r);var n=o[r];return t.I||!X(n)?n:n===nr(t.t,r)?(ar(t),t.o[r]=lr(t.A.h,n,t)):n},has:function(t,r){return r in ue(t)},ownKeys:function(t){return Reflect.ownKeys(ue(t))},set:function(t,r,o){var n=Do(ue(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=nr(ue(t),r),i=a?.[L];if(i&&i.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(Ho(o,a)&&(o!==void 0||_e(t.t,r)))return!0;ar(t),he(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return nr(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,ar(t),he(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=ue(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){Z(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Z(12)}},rt={};Ce(nt,function(t,r){rt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),rt.deleteProperty=function(t,r){return rt.set.call(this,t,r,void 0)},rt.set=function(t,r,o){return nt.set.call(this,t[0],r,o,t[0])};var ii=function(){function t(o){var n=this;this.O=Bo,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var p=n;return function(v){var N=this;v===void 0&&(v=d);for(var w=arguments.length,E=Array(w>1?w-1:0),P=1;P<w;P++)E[P-1]=arguments[P];return p.produce(v,function(A){var le;return(le=i).call.apply(le,[N,A].concat(E))})}}var f;if(typeof i!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),X(a)){var u=To(n),h=lr(n,a,void 0),m=!0;try{f=i(h),m=!1}finally{m?wt(u):cr(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return rr(u,l),or(v,u)},function(v){throw wt(u),v}):(rr(u,l),or(f,u))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ko&&(f=void 0),n.D&&ur(f,!0),l){var x=[],g=[];te("Patches").M(a,f,x,g),l(x,g)}return f}Z(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var u=arguments.length,h=Array(u>1?u-1:0),m=1;m<u;m++)h[m-1]=arguments[m];return n.produceWithPatches(f,function(x){return a.apply(void 0,[x].concat(h))})};var l,d,p=n.produce(a,i,function(f,u){l=f,d=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){X(o)||Z(8),ne(o)&&(o=ri(o));var n=To(this),a=lr(this,o,void 0);return a[L].C=!0,cr(n),a},r.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return rr(i,n),or(void 0,i)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!Bo&&Z(20),this.O=o},r.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 l=te("Patches").$;return ne(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},t}(),H=new ii,ci=H.produce,Bc=H.produceWithPatches.bind(H),zc=H.setAutoFreeze.bind(H),$c=H.setUseProxies.bind(H),Hc=H.applyPatches.bind(H),Gc=H.createDraft.bind(H),Kc=H.finishDraft.bind(H),At=ci;function me(t){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},me(t)}function yr(t,r){if(me(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(me(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function gr(t){var r=yr(t,"string");return me(r)==="symbol"?r:String(r)}function br(t,r,o){return r=gr(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Zo(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Rt(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?Zo(Object(o),!0).forEach(function(n){br(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Zo(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function U(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 Fo=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xr=function(){return Math.random().toString(36).substring(7).split("").join(".")},It={INIT:"@@redux/INIT"+xr(),REPLACE:"@@redux/REPLACE"+xr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xr()}};function li(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function vr(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(U(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(U(1));return o(vr)(t,r)}if(typeof t!="function")throw new Error(U(2));var a=t,i=r,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function u(){if(p)throw new Error(U(3));return i}function h(v){if(typeof v!="function")throw new Error(U(4));if(p)throw new Error(U(5));var N=!0;return f(),d.push(v),function(){if(N){if(p)throw new Error(U(6));N=!1,f();var E=d.indexOf(v);d.splice(E,1),l=null}}}function m(v){if(!li(v))throw new Error(U(7));if(typeof v.type>"u")throw new Error(U(8));if(p)throw new Error(U(9));try{p=!0,i=a(i,v)}finally{p=!1}for(var N=l=d,w=0;w<N.length;w++){var E=N[w];E()}return v}function x(v){if(typeof v!="function")throw new Error(U(10));a=v,m({type:It.REPLACE})}function g(){var v,N=h;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(U(11));function P(){E.next&&E.next(u())}P();var A=N(P);return{unsubscribe:A}}},v[Fo]=function(){return this},v}return m({type:It.INIT}),n={dispatch:m,subscribe:h,getState:u,replaceReducer:x},n[Fo]=g,n}function si(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:It.INIT});if(typeof n>"u")throw new Error(U(12));if(typeof o(void 0,{type:It.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(U(13))})}function Vo(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var a=r[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),l,d;try{si(o)}catch(p){d=p}return function(f,u){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,x={},g=0;g<i.length;g++){var v=i[g],N=o[v],w=f[v],E=N(w,u);if(typeof E>"u"){var P=u&&u.type;throw new Error(U(14))}x[v]=E,m=m||E!==w}return m=m||i.length!==Object.keys(f).length,m?x:f}}function We(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Yo(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(U(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=r.map(function(p){return p(l)});return i=We.apply(void 0,d)(a.dispatch),Rt(Rt({},a),{},{dispatch:i})}}}function qo(t){var r=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,t):l(d)}}};return r}var Xo=qo();Xo.withExtraArgument=qo;var Sr=Xo;var rn=function(){var t=function(r,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(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),di=function(t,r){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,a=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){o.label=f[1];break}if(f[0]===6&&o.label<i[1]){o.label=i[1],i=f;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(f);break}i[2]&&o.ops.pop(),o.trys.pop();continue}f=r.call(t,o)}catch(u){f=[6,u],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},De=function(t,r){for(var o=0,n=r.length,a=t.length;o<n;o++,a++)t[a]=r[o];return t},pi=Object.defineProperty,fi=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,Qo=function(t,r,o){return r in t?pi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},ye=function(t,r){for(var o in r||(r={}))hi.call(r,o)&&Qo(t,o,r[o]);if(Jo)for(var n=0,a=Jo(r);n<a.length;n++){var o=a[n];mi.call(r,o)&&Qo(t,o,r[o])}return t},Or=function(t,r){return fi(t,ui(r))},yi=function(t,r,o){return new Promise(function(n,a){var i=function(p){try{d(o.next(p))}catch(f){a(f)}},l=function(p){try{d(o.throw(p))}catch(f){a(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};d((o=o.apply(t,r)).next())})};var gi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},ll=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function bi(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var xi=function(t){rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,De([void 0],o[0].concat(this)))):new(r.bind.apply(r,De([void 0],o.concat(this))))},r}(Array),vi=function(t){rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,De([void 0],o[0].concat(this)))):new(r.bind.apply(r,De([void 0],o.concat(this))))},r}(Array);function Er(t){return X(t)?At(t,function(){}):t}function Si(t){return typeof t=="boolean"}function Oi(){return function(r){return Ci(r)}}function Ci(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,l=i===void 0?!0:i,d=new xi;if(o&&(Si(o)?d.push(Sr):d.push(Sr.withExtraArgument(o.extraArgument))),0){if(a)var p;if(l)var f}return d}var Cr=!0;function on(t){var r=Oi(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?r():i,d=o.devTools,p=d===void 0?!0:d,f=o.preloadedState,u=f===void 0?void 0:f,h=o.enhancers,m=h===void 0?void 0:h,x;if(typeof a=="function")x=a;else if(bi(a))x=Vo(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 g=l;if(typeof g=="function"&&(g=g(r),!Cr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cr&&g.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Yo.apply(void 0,g),N=We;p&&(N=gi(ye({trace:!Cr},typeof p=="object"&&p)));var w=new vi(v),E=w;Array.isArray(m)?E=De([v],m):typeof m=="function"&&(E=m(w));var P=N.apply(void 0,E);return vr(x,u,P)}function ge(t,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var i=r.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ye(ye({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 nn(t){var r={},o=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[r,o,n]}function wi(t){return typeof t=="function"}function Ei(t,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?nn(r):[r,o,n],i=a[0],l=a[1],d=a[2],p;if(wi(t))p=function(){return Er(t())};else{var f=Er(t);p=function(){return f}}function u(h,m){h===void 0&&(h=p());var x=De([i[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return x.filter(function(g){return!!g}).length===0&&(x=[d]),x.reduce(function(g,v){if(v)if(ne(g)){var N=g,w=v(N,m);return w===void 0?g:w}else{if(X(g))return At(g,function(E){return v(E,m)});var w=v(g,m);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},h)}return u.getInitialState=p,u}function Ni(t,r){return t+"/"+r}function an(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Er(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(u){var h=n[u],m=Ni(r,u),x,g;"reducer"in h?(x=h.reducer,g=h.prepare):x=h,i[u]=x,l[m]=x,d[u]=g?ge(m,g):ge(m)});function p(){var u=typeof t.extraReducers=="function"?nn(t.extraReducers):[t.extraReducers],h=u[0],m=h===void 0?{}:h,x=u[1],g=x===void 0?[]:x,v=u[2],N=v===void 0?void 0:v,w=ye(ye({},m),l);return Ei(o,function(E){for(var P in w)E.addCase(P,w[P]);for(var A=0,le=g;A<le.length;A++){var re=le[A];E.addMatcher(re.matcher,re.reducer)}N&&E.addDefaultCase(N)})}var f;return{name:r,reducer:function(u,h){return f||(f=p()),f(u,h)},actions:d,caseReducers:i,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ai="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ri=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Ai[Math.random()*64|0];return r},Ii=["name","message","stack","code"],wr=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),en=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),Li=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Ii;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(r[a]=t[a])}return r}return{message:String(t)}},fl=function(){function t(r,o,n){var a=ge(r+"/fulfilled",function(u,h,m,x){return{payload:u,meta:Or(ye({},x||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=ge(r+"/pending",function(u,h,m){return{payload:void 0,meta:Or(ye({},m||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),l=ge(r+"/rejected",function(u,h,m,x,g){return{payload:x,error:(n&&n.serializeError||Li)(u||"Rejected"),meta:Or(ye({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(h,m,x){var g=n?.idGenerator?n.idGenerator(u):Ri(),v=new p,N,w=!1;function E(A){N=A,v.abort()}var P=function(){return yi(this,null,function(){var A,le,re,qe,Zr,Xe,Fr;return di(this,function(Ie){switch(Ie.label){case 0:return Ie.trys.push([0,4,,5]),qe=(A=n?.condition)==null?void 0:A.call(n,u,{getState:m,extra:x}),_i(qe)?[4,qe]:[3,2];case 1:qe=Ie.sent(),Ie.label=2;case 2:if(qe===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,Zr=new Promise(function(Y,Je){return v.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:N||"Aborted"})})}),h(i(g,u,(le=n?.getPendingMeta)==null?void 0:le.call(n,{requestId:g,arg:u},{getState:m,extra:x}))),[4,Promise.race([Zr,Promise.resolve(o(u,{dispatch:h,getState:m,extra:x,requestId:g,signal:v.signal,abort:E,rejectWithValue:function(Y,Je){return new wr(Y,Je)},fulfillWithValue:function(Y,Je){return new en(Y,Je)}})).then(function(Y){if(Y instanceof wr)throw Y;return Y instanceof en?a(Y.payload,g,u,Y.meta):a(Y,g,u)})])];case 3:return re=Ie.sent(),[3,5];case 4:return Xe=Ie.sent(),re=Xe instanceof wr?l(null,g,u,Xe.payload,Xe.meta):l(Xe,g,u),[3,5];case 5:return Fr=n&&!n.dispatchConditionRejection&&l.match(re)&&re.meta.condition,Fr||h(re),[2,re]}})})}();return Object.assign(P,{abort:E,requestId:g,arg:u,unwrap:function(){return P.then(Pi)}})}}return Object.assign(f,{pending:i,rejected:l,fulfilled:a,typePrefix:r})}return t.withTypes=function(){return t},t}();function Pi(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function _i(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var cn="listener",ln="completed",sn="cancelled",ul="task-"+sn,hl="task-"+ln,ml=cn+"-"+sn,yl=cn+"-"+ln;var Nr="listenerMiddleware";var gl=ge(Nr+"/add"),bl=ge(Nr+"/removeAll"),xl=ge(Nr+"/remove");var tn,vl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(tn||(tn=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},ki=function(t){return function(r){setTimeout(r,t)}},Sl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ki(10);Go();window.ftReduxStores||(window.ftReduxStores={});var dn=class t{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,i=window.ftReduxStores[n];if(et(i))return i;if(a==null)return;let l=an({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=on({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[a.name]=new t(l,d)}constructor(r,o){this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new bt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let l=a,d=n[l];return d?(...p)=>{let f=d(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[l]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var kt=S(R());var Lt=class extends se{async listMySearches(){let r=C.getState().session;return r?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(r.profile.userId),5*60*1e3):[]}};var Pt=class extends se{async listMyBookmarks(){let r=C.getState().session;return r?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(r.profile.userId),5*60*1e3):[]}};var Wi="ft-user-assets",_t=kt.FtReduxStore.get({name:Wi,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ar=class{constructor(){this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pt,this.savedSearchesService=new Lt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=C.getState();(0,kt.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_t.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_t.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();_t.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_t.actions.bookmarks(o)}}},ql=new Ar;var Rr=class{addCommand(r,o=!1){C.commands.add(r,o)}consumeCommand(r){return C.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new Rr;var pn=S(R()),Ir=class{highlightHtml(r,o){(0,pn.highlightHtml)(r,o)}};window.FluidTopicsHighlightHtmlService=new Ir;var fn=S(R());var Lr=class{isDate(r){var o,n,a,i;return(i=(a=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===r))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(r,o){var n,a,i;return fn.DateFormatter.format(r,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Lr;(0,un.customElement)("ft-app-context")(k);var mn=S($()),Di=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Pr=Symbol("i18nAttributes"),Tt=Symbol("i18nProperties"),at=Symbol("i18nUnsubs");function Ut(t){var r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?vo:Pe}i18n(a,i,...l){var d;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...l);let p=(d=a.args)!==null&&d!==void 0?d:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var i,l;(i=this[Pr])===null||i===void 0||i.forEach((d,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(p,u,d)}),(l=this[Tt])===null||l===void 0||l.forEach((d,p)=>{d.context.toLowerCase()===a.toLowerCase()&&(this[p]=this.i18n(d))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,l){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...l})}}update(a){var i,l;super.update(a),(i=this[Pr])===null||i===void 0||i.forEach((d,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(a.has(p)||d.argsProvider!=null)&&(a.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,d))}),(l=this[Tt])===null||l===void 0||l.forEach((d,p)=>{d.argsProvider!=null&&(this[p]=this.i18n(d))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,l,d;super.connectedCallback(),new Set([...(i=(a=this[Tt])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(d=(l=this[Pr])===null||l===void 0?void 0:l.keys())!==null&&d!==void 0?d:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(a,i){a=a.toLowerCase(),this[at].has(a)||this[at].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[at].forEach(a=>a()),this[at].clear()}}return r=at,Di([(0,mn.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var hn=class extends Ut(Dt.FtLitElement){},Wt=class extends Ut(Dt.FtLitElementRedux){};var it=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},J=class extends Wt{constructor(){super(),this.editorMode=!1,this.addStore(C)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Mt.nothing:Mt.html`
232
+ `}update(r){super.update(r),r.has("baseUrl")&&(C.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&C.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("uiLocale")&&C.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&C.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&C.actions.noCustom(this.noCustom),r.has("editorMode")&&C.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&C.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&C.actions.session(this.session),r.has("availableUiLocales")&&C.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Pe.addContext(o)),r.has("openExternalDocumentInNewTab")&&C.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&C.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&C.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};k.elementDefinitions={};k.styles=bo;B([(0,j.property)()],k.prototype,"baseUrl",void 0);B([(0,j.property)()],k.prototype,"apiIntegrationIdentifier",void 0);B([(0,j.property)()],k.prototype,"uiLocale",void 0);B([(0,q.jsonProperty)(null)],k.prototype,"availableUiLocales",void 0);B([(0,q.jsonProperty)(null)],k.prototype,"metadataConfiguration",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"editorMode",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"noCustom",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"openExternalDocumentInNewTab",void 0);B([(0,j.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],k.prototype,"noCustomComponent",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"withManualResources",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"navigatorOnline",void 0);B([(0,j.property)({type:Boolean})],k.prototype,"forcedOffline",void 0);B([(0,j.property)({type:Object})],k.prototype,"apiProvider",void 0);B([(0,q.jsonProperty)([])],k.prototype,"messageContexts",void 0);B([(0,q.jsonProperty)(void 0)],k.prototype,"session",void 0);var Ti=S($());function Ya(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,a;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!gt(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!gt(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(a=Object.keys(t),o=a.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!gt(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}function gt(t,r){try{return Ya(t,r)}catch{return!1}}function tr(t,r){return!gt(t,r)}var qa=S($(),1);var bt=class{constructor(){this.queue=[]}add(r,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==r.type)),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Qe=S($(),1);var Oo=S($(),1);function Co(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Oo.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:tr,...r??{}})}var xt=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);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 Eo=S(M(),1);var vt=window,Xa=vt.ShadowRoot&&(vt.ShadyCSS===void 0||vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ac=Symbol();var wo=(t,r)=>{Xa?t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):r.forEach(o=>{let n=document.createElement("style"),a=vt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)})};var St=class extends Eo.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,i])=>r.registry.define(a,i)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return wo(n,r.elementStyles),n}};var Ot=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Io,No=Symbol("constructorPrototype"),Ao=Symbol("constructorName"),Lo=Symbol("exportpartsDebouncer"),Ro=Symbol("dynamicDependenciesLoaded"),pe=class extends St{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Io]=new xt(5),this[Ao]=this.constructor.name,this[No]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ao]&&Object.setPrototypeOf(this,this[No])}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 r=this.constructor;r[Ro]||(r[Ro]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}applyCustomStylesheet(r){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(r.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 r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Lo].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(r){var o,n,a,i,l,d;let p=m=>m!=null&&m.trim().length>0,f=r.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...x,...g).filter(p).map(v=>v.trim()).forEach(v=>u.add(v))}if(u.size===0){this.removeAttribute("exportparts");return}let h=[...u.values()].flatMap(m=>f.map(x=>`${m}:${x}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Io=Lo;Ot([(0,Qe.property)()],pe.prototype,"exportpartsPrefix",void 0);Ot([Co([])],pe.prototype,"exportpartsPrefixes",void 0);Ot([(0,Qe.property)()],pe.prototype,"customStylesheet",void 0);Ot([(0,Qe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function et(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var Po,_o,ko,Ct=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores"),tt=class extends pe{constructor(){super(...arguments),this[Po]=new Map,this[_o]=new Map,this[ko]=[]}get reduxConstructor(){return this.constructor}update(r){super.update(r),[...this.reduxConstructor.reduxReactiveProperties].some(o=>r.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(r){return r==null?this.getUnnamedStore():this[Oe].get(r)}addStore(r,o){var n;o=(n=o??(et(r)?r.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,r)}removeStore(r){let o=typeof r=="string"?r:r.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStore(r,o){this[Oe].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((r,o)=>this.subscribeToStore(o,r)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((r,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let a=this.getStore(r.store);a&&(r.store?this[fe].has(r.store):this[fe].size>0)&&(this[o]=r.selector(a.getState(),this))}})}subscribeToStore(r,o){var n;this[fe].set(r,o.subscribe(()=>this.updateFromStores())),et(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 l=d=>this[i](d);o.eventBus.addEventListener(a.eventName,l),this[Ct].push(()=>o.eventBus.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(r)}unsubscribeFromStores(){this[fe].forEach((r,o)=>this.unsubscribeFromStore(o)),this[Ct].forEach(r=>r()),this[Ct]=[]}unsubscribeFromStore(r){this[fe].has(r)&&this[fe].get(r)(),this[fe].delete(r)}onStoreAvailable(r){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Po=fe,_o=Oe,ko=Ct;tt.reduxProperties=new Map;tt.reduxReactiveProperties=new Set;tt.reduxEventListeners=new Map;function Z(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(t){return!!t&&!!t[L]}function X(t){var r;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)===ai}(t)||Array.isArray(t)||!!t[zo]||!!(!((r=t.constructor)===null||r===void 0)&&r[zo])||dr(t)||pr(t))}function Ce(t,r,o){o===void 0&&(o=!1),Te(t)===0?(o?Object.keys:ke)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,a){return r(a,n,t)})}function Te(t){var r=t[L];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:dr(t)?2:pr(t)?3:0}function _e(t,r){return Te(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Ja(t,r){return Te(t)===2?t.get(r):t[r]}function $o(t,r,o){var n=Te(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function Ho(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function dr(t){return oi&&t instanceof Map}function pr(t){return ni&&t instanceof Set}function ue(t){return t.o||t.t}function fr(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=jo(t);delete r[L];for(var o=ke(r),n=0;n<o.length;n++){var a=o[n],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),r)}function ur(t,r){return r===void 0&&(r=!1),hr(t)||ne(t)||!X(t)||(Te(t)>1&&(t.set=t.add=t.clear=t.delete=Qa),Object.freeze(t),r&&Ce(t,function(o,n){return ur(n,!0)},!0)),t}function Qa(){Z(2)}function hr(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function te(t){var r=sr[t];return r||Z(18,t),r}function ei(t,r){sr[t]||(sr[t]=r)}function ir(){return ot}function rr(t,r){r&&(te("Patches"),t.u=[],t.s=[],t.v=r)}function wt(t){cr(t),t.p.forEach(ti),t.p=null}function cr(t){t===ot&&(ot=t.l)}function To(t){return ot={p:[],l:ot,h:t,m:!0,_:0}}function ti(t){var r=t[L];r.i===0||r.i===1?r.j():r.g=!0}function or(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||te("ES5").S(r,t,n),n?(o[L].P&&(wt(r),Z(4)),X(t)&&(t=Et(r,t),r.l||Nt(r,t)),r.u&&te("Patches").M(o[L].t,t,r.u,r.s)):t=Et(r,o,[]),wt(r),r.u&&r.v(r.u,r.s),t!==Ko?t:void 0}function Et(t,r,o){if(hr(r))return r;var n=r[L];if(!n)return Ce(r,function(d,p){return Wo(t,n,r,d,p,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Nt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=fr(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),Ce(i,function(d,p){return Wo(t,n,a,d,p,o,l)}),Nt(t,a,!1),o&&t.u&&te("Patches").N(n,o,t.u,t.s)}return n.o}function Wo(t,r,o,n,a,i,l){if(ne(a)){var d=Et(t,a,i&&r&&r.i!==3&&!_e(r.R,n)?i.concat(n):void 0);if($o(o,n,d),!ne(d))return;t.m=!1}else l&&o.add(a);if(X(a)&&!hr(a)){if(!t.h.D&&t._<1)return;Et(t,a),r&&r.A.l||Nt(t,a)}}function Nt(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ur(r,o)}function nr(t,r){var o=t[L];return(o?ue(o):t)[r]}function Do(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function he(t){t.P||(t.P=!0,t.l&&he(t.l))}function ar(t){t.o||(t.o=fr(t.t))}function lr(t,r,o){var n=dr(r)?te("MapSet").F(r,o):pr(r)?te("MapSet").T(r,o):t.O?function(a,i){var l=Array.isArray(a),d={i:l?1:0,A:i?i.A:ir(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=d,f=nt;l&&(p=[d],f=rt);var u=Proxy.revocable(p,f),h=u.revoke,m=u.proxy;return d.k=m,d.j=h,m}(r,o):te("ES5").J(r,o);return(o?o.A:ir()).p.push(n),n}function ri(t){return ne(t)||Z(22,t),function r(o){if(!X(o))return o;var n,a=o[L],i=Te(o);if(a){if(!a.P&&(a.i<4||!te("ES5").K(a)))return a.t;a.I=!0,n=Uo(o,i),a.I=!1}else n=Uo(o,i);return Ce(n,function(l,d){a&&Ja(a.t,l)===d||$o(n,l,r(d))}),i===3?new Set(n):n}(t)}function Uo(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return fr(t)}function Go(){function t(l,d){var p=i[l];return p?p.enumerable=d:i[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[L];return nt.get(f,l)},set:function(f){var u=this[L];nt.set(u,l,f)}},p}function r(l){for(var d=l.length-1;d>=0;d--){var p=l[d][L];if(!p.P)switch(p.i){case 5:n(p)&&he(p);break;case 4:o(p)&&he(p)}}}function o(l){for(var d=l.t,p=l.k,f=ke(p),u=f.length-1;u>=0;u--){var h=f[u];if(h!==L){var m=d[h];if(m===void 0&&!_e(d,h))return!0;var x=p[h],g=x&&x[L];if(g?g.t!==m:!Ho(x,m))return!0}}var v=!!d[L];return f.length!==ke(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function a(l){l.g&&Z(3,JSON.stringify(ue(l)))}var i={};ei("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var x=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(x,""+g,t(g,!0));return x}var v=jo(m);delete v[L];for(var N=ke(v),w=0;w<N.length;w++){var E=N[w];v[E]=t(E,h||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),u={i:p?5:4,A:d?d.A:ir(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,L,{value:u,writable:!0}),f},S:function(l,d,p){p?ne(d)&&d[L].A===l&&r(l.p):(l.u&&function f(u){if(u&&typeof u=="object"){var h=u[L];if(h){var m=h.t,x=h.k,g=h.R,v=h.i;if(v===4)Ce(x,function(A){A!==L&&(m[A]!==void 0||_e(m,A)?g[A]||f(x[A]):(g[A]=!0,he(h)))}),Ce(m,function(A){x[A]!==void 0||_e(x,A)||(g[A]=!1,he(h))});else if(v===5){if(n(h)&&(he(h),g.length=!0),x.length<m.length)for(var N=x.length;N<m.length;N++)g[N]=!1;else for(var w=m.length;w<x.length;w++)g[w]=!0;for(var E=Math.min(x.length,m.length),P=0;P<E;P++)x.hasOwnProperty(P)||(g[P]=!0),g[P]===void 0&&f(x[P])}}}}(l.p[0]),r(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Mo,ot,mr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",oi=typeof Map<"u",ni=typeof Set<"u",Bo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ko=mr?Symbol.for("immer-nothing"):((Mo={})["immer-nothing"]=!0,Mo),zo=mr?Symbol.for("immer-draftable"):"__$immer_draftable",L=mr?Symbol.for("immer-state"):"__$immer_state";var ai=""+Object.prototype.constructor,ke=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,jo=Object.getOwnPropertyDescriptors||function(t){var r={};return ke(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},sr={},nt={get:function(t,r){if(r===L)return t;var o=ue(t);if(!_e(o,r))return function(a,i,l){var d,p=Do(i,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(a.k):void 0}(t,o,r);var n=o[r];return t.I||!X(n)?n:n===nr(t.t,r)?(ar(t),t.o[r]=lr(t.A.h,n,t)):n},has:function(t,r){return r in ue(t)},ownKeys:function(t){return Reflect.ownKeys(ue(t))},set:function(t,r,o){var n=Do(ue(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=nr(ue(t),r),i=a?.[L];if(i&&i.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(Ho(o,a)&&(o!==void 0||_e(t.t,r)))return!0;ar(t),he(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return nr(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,ar(t),he(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=ue(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){Z(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Z(12)}},rt={};Ce(nt,function(t,r){rt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),rt.deleteProperty=function(t,r){return rt.set.call(this,t,r,void 0)},rt.set=function(t,r,o){return nt.set.call(this,t[0],r,o,t[0])};var ii=function(){function t(o){var n=this;this.O=Bo,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var p=n;return function(v){var N=this;v===void 0&&(v=d);for(var w=arguments.length,E=Array(w>1?w-1:0),P=1;P<w;P++)E[P-1]=arguments[P];return p.produce(v,function(A){var le;return(le=i).call.apply(le,[N,A].concat(E))})}}var f;if(typeof i!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),X(a)){var u=To(n),h=lr(n,a,void 0),m=!0;try{f=i(h),m=!1}finally{m?wt(u):cr(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return rr(u,l),or(v,u)},function(v){throw wt(u),v}):(rr(u,l),or(f,u))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ko&&(f=void 0),n.D&&ur(f,!0),l){var x=[],g=[];te("Patches").M(a,f,x,g),l(x,g)}return f}Z(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var u=arguments.length,h=Array(u>1?u-1:0),m=1;m<u;m++)h[m-1]=arguments[m];return n.produceWithPatches(f,function(x){return a.apply(void 0,[x].concat(h))})};var l,d,p=n.produce(a,i,function(f,u){l=f,d=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){X(o)||Z(8),ne(o)&&(o=ri(o));var n=To(this),a=lr(this,o,void 0);return a[L].C=!0,cr(n),a},r.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return rr(i,n),or(void 0,i)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!Bo&&Z(20),this.O=o},r.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 l=te("Patches").$;return ne(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},t}(),H=new ii,ci=H.produce,Bc=H.produceWithPatches.bind(H),zc=H.setAutoFreeze.bind(H),$c=H.setUseProxies.bind(H),Hc=H.applyPatches.bind(H),Gc=H.createDraft.bind(H),Kc=H.finishDraft.bind(H),At=ci;function me(t){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},me(t)}function yr(t,r){if(me(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(me(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function gr(t){var r=yr(t,"string");return me(r)==="symbol"?r:String(r)}function br(t,r,o){return r=gr(r),r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function Zo(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Rt(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?Zo(Object(o),!0).forEach(function(n){br(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Zo(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function U(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 Fo=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xr=function(){return Math.random().toString(36).substring(7).split("").join(".")},It={INIT:"@@redux/INIT"+xr(),REPLACE:"@@redux/REPLACE"+xr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xr()}};function li(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function vr(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(U(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(U(1));return o(vr)(t,r)}if(typeof t!="function")throw new Error(U(2));var a=t,i=r,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function u(){if(p)throw new Error(U(3));return i}function h(v){if(typeof v!="function")throw new Error(U(4));if(p)throw new Error(U(5));var N=!0;return f(),d.push(v),function(){if(N){if(p)throw new Error(U(6));N=!1,f();var E=d.indexOf(v);d.splice(E,1),l=null}}}function m(v){if(!li(v))throw new Error(U(7));if(typeof v.type>"u")throw new Error(U(8));if(p)throw new Error(U(9));try{p=!0,i=a(i,v)}finally{p=!1}for(var N=l=d,w=0;w<N.length;w++){var E=N[w];E()}return v}function x(v){if(typeof v!="function")throw new Error(U(10));a=v,m({type:It.REPLACE})}function g(){var v,N=h;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(U(11));function P(){E.next&&E.next(u())}P();var A=N(P);return{unsubscribe:A}}},v[Fo]=function(){return this},v}return m({type:It.INIT}),n={dispatch:m,subscribe:h,getState:u,replaceReducer:x},n[Fo]=g,n}function si(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:It.INIT});if(typeof n>"u")throw new Error(U(12));if(typeof o(void 0,{type:It.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(U(13))})}function Vo(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var a=r[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),l,d;try{si(o)}catch(p){d=p}return function(f,u){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,x={},g=0;g<i.length;g++){var v=i[g],N=o[v],w=f[v],E=N(w,u);if(typeof E>"u"){var P=u&&u.type;throw new Error(U(14))}x[v]=E,m=m||E!==w}return m=m||i.length!==Object.keys(f).length,m?x:f}}function We(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Yo(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(U(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=r.map(function(p){return p(l)});return i=We.apply(void 0,d)(a.dispatch),Rt(Rt({},a),{},{dispatch:i})}}}function qo(t){var r=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,i,t):l(d)}}};return r}var Xo=qo();Xo.withExtraArgument=qo;var Sr=Xo;var rn=function(){var t=function(r,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(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),di=function(t,r){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,a=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){o.label=f[1];break}if(f[0]===6&&o.label<i[1]){o.label=i[1],i=f;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(f);break}i[2]&&o.ops.pop(),o.trys.pop();continue}f=r.call(t,o)}catch(u){f=[6,u],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},De=function(t,r){for(var o=0,n=r.length,a=t.length;o<n;o++,a++)t[a]=r[o];return t},pi=Object.defineProperty,fi=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,Jo=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,Qo=function(t,r,o){return r in t?pi(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},ye=function(t,r){for(var o in r||(r={}))hi.call(r,o)&&Qo(t,o,r[o]);if(Jo)for(var n=0,a=Jo(r);n<a.length;n++){var o=a[n];mi.call(r,o)&&Qo(t,o,r[o])}return t},Or=function(t,r){return fi(t,ui(r))},yi=function(t,r,o){return new Promise(function(n,a){var i=function(p){try{d(o.next(p))}catch(f){a(f)}},l=function(p){try{d(o.throw(p))}catch(f){a(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};d((o=o.apply(t,r)).next())})};var gi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?We:We.apply(null,arguments)},ll=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function bi(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var xi=function(t){rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,De([void 0],o[0].concat(this)))):new(r.bind.apply(r,De([void 0],o.concat(this))))},r}(Array),vi=function(t){rn(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,De([void 0],o[0].concat(this)))):new(r.bind.apply(r,De([void 0],o.concat(this))))},r}(Array);function Er(t){return X(t)?At(t,function(){}):t}function Si(t){return typeof t=="boolean"}function Oi(){return function(r){return Ci(r)}}function Ci(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,l=i===void 0?!0:i,d=new xi;if(o&&(Si(o)?d.push(Sr):d.push(Sr.withExtraArgument(o.extraArgument))),0){if(a)var p;if(l)var f}return d}var Cr=!0;function on(t){var r=Oi(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?r():i,d=o.devTools,p=d===void 0?!0:d,f=o.preloadedState,u=f===void 0?void 0:f,h=o.enhancers,m=h===void 0?void 0:h,x;if(typeof a=="function")x=a;else if(bi(a))x=Vo(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 g=l;if(typeof g=="function"&&(g=g(r),!Cr&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cr&&g.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Yo.apply(void 0,g),N=We;p&&(N=gi(ye({trace:!Cr},typeof p=="object"&&p)));var w=new vi(v),E=w;Array.isArray(m)?E=De([v],m):typeof m=="function"&&(E=m(w));var P=N.apply(void 0,E);return vr(x,u,P)}function ge(t,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var i=r.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ye(ye({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 nn(t){var r={},o=[],n,a={addCase:function(i,l){var d=typeof i=="string"?i:i.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[r,o,n]}function wi(t){return typeof t=="function"}function Ei(t,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?nn(r):[r,o,n],i=a[0],l=a[1],d=a[2],p;if(wi(t))p=function(){return Er(t())};else{var f=Er(t);p=function(){return f}}function u(h,m){h===void 0&&(h=p());var x=De([i[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return x.filter(function(g){return!!g}).length===0&&(x=[d]),x.reduce(function(g,v){if(v)if(ne(g)){var N=g,w=v(N,m);return w===void 0?g:w}else{if(X(g))return At(g,function(E){return v(E,m)});var w=v(g,m);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},h)}return u.getInitialState=p,u}function Ni(t,r){return t+"/"+r}function an(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Er(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},l={},d={};a.forEach(function(u){var h=n[u],m=Ni(r,u),x,g;"reducer"in h?(x=h.reducer,g=h.prepare):x=h,i[u]=x,l[m]=x,d[u]=g?ge(m,g):ge(m)});function p(){var u=typeof t.extraReducers=="function"?nn(t.extraReducers):[t.extraReducers],h=u[0],m=h===void 0?{}:h,x=u[1],g=x===void 0?[]:x,v=u[2],N=v===void 0?void 0:v,w=ye(ye({},m),l);return Ei(o,function(E){for(var P in w)E.addCase(P,w[P]);for(var A=0,le=g;A<le.length;A++){var re=le[A];E.addMatcher(re.matcher,re.reducer)}N&&E.addDefaultCase(N)})}var f;return{name:r,reducer:function(u,h){return f||(f=p()),f(u,h)},actions:d,caseReducers:i,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ai="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ri=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Ai[Math.random()*64|0];return r},Ii=["name","message","stack","code"],wr=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),en=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),Li=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Ii;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(r[a]=t[a])}return r}return{message:String(t)}},fl=function(){function t(r,o,n){var a=ge(r+"/fulfilled",function(u,h,m,x){return{payload:u,meta:Or(ye({},x||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=ge(r+"/pending",function(u,h,m){return{payload:void 0,meta:Or(ye({},m||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),l=ge(r+"/rejected",function(u,h,m,x,g){return{payload:x,error:(n&&n.serializeError||Li)(u||"Rejected"),meta:Or(ye({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(h,m,x){var g=n?.idGenerator?n.idGenerator(u):Ri(),v=new p,N,w=!1;function E(A){N=A,v.abort()}var P=function(){return yi(this,null,function(){var A,le,re,qe,Zr,Xe,Fr;return di(this,function(Ie){switch(Ie.label){case 0:return Ie.trys.push([0,4,,5]),qe=(A=n?.condition)==null?void 0:A.call(n,u,{getState:m,extra:x}),_i(qe)?[4,qe]:[3,2];case 1:qe=Ie.sent(),Ie.label=2;case 2:if(qe===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,Zr=new Promise(function(Y,Je){return v.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:N||"Aborted"})})}),h(i(g,u,(le=n?.getPendingMeta)==null?void 0:le.call(n,{requestId:g,arg:u},{getState:m,extra:x}))),[4,Promise.race([Zr,Promise.resolve(o(u,{dispatch:h,getState:m,extra:x,requestId:g,signal:v.signal,abort:E,rejectWithValue:function(Y,Je){return new wr(Y,Je)},fulfillWithValue:function(Y,Je){return new en(Y,Je)}})).then(function(Y){if(Y instanceof wr)throw Y;return Y instanceof en?a(Y.payload,g,u,Y.meta):a(Y,g,u)})])];case 3:return re=Ie.sent(),[3,5];case 4:return Xe=Ie.sent(),re=Xe instanceof wr?l(null,g,u,Xe.payload,Xe.meta):l(Xe,g,u),[3,5];case 5:return Fr=n&&!n.dispatchConditionRejection&&l.match(re)&&re.meta.condition,Fr||h(re),[2,re]}})})}();return Object.assign(P,{abort:E,requestId:g,arg:u,unwrap:function(){return P.then(Pi)}})}}return Object.assign(f,{pending:i,rejected:l,fulfilled:a,typePrefix:r})}return t.withTypes=function(){return t},t}();function Pi(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function _i(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var cn="listener",ln="completed",sn="cancelled",ul="task-"+sn,hl="task-"+ln,ml=cn+"-"+sn,yl=cn+"-"+ln;var Nr="listenerMiddleware";var gl=ge(Nr+"/add"),bl=ge(Nr+"/removeAll"),xl=ge(Nr+"/remove");var tn,vl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(tn||(tn=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},ki=function(t){return function(r){setTimeout(r,t)}},Sl=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ki(10);Go();window.ftReduxStores||(window.ftReduxStores={});var dn=class t{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,i=window.ftReduxStores[n];if(et(i))return i;if(a==null)return;let l=an({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=on({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[a.name]=new t(l,d)}constructor(r,o){this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new bt,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let l=a,d=n[l];return d?(...p)=>{let f=d(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[l]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var kt=S(R());var Lt=class extends se{async listMySearches(){let r=C.getState().session;return r?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(r.profile.userId),5*60*1e3):[]}};var Pt=class extends se{async listMyBookmarks(){let r=C.getState().session;return r?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(r.profile.userId),5*60*1e3):[]}};var Wi="ft-user-assets",_t=kt.FtReduxStore.get({name:Wi,initialState:{savedSearches:void 0,bookmarks:void 0}}),Ar=class{constructor(){this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pt,this.savedSearchesService=new Lt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=C.getState();(0,kt.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_t.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_t.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();_t.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_t.actions.bookmarks(o)}}},ql=new Ar;var Rr=class{addCommand(r,o=!1){C.commands.add(r,o)}consumeCommand(r){return C.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new Rr;var pn=S(R()),Ir=class{highlightHtml(r,o,n){(0,pn.highlightHtml)(r,o,n)}};window.FluidTopicsHighlightHtmlService=new Ir;var fn=S(R());var Lr=class{isDate(r){var o,n,a,i;return(i=(a=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===r))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(r,o){var n,a,i;return fn.DateFormatter.format(r,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Lr;(0,un.customElement)("ft-app-context")(k);var mn=S($()),Di=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},Pr=Symbol("i18nAttributes"),Tt=Symbol("i18nProperties"),at=Symbol("i18nUnsubs");function Ut(t){var r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?vo:Pe}i18n(a,i,...l){var d;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...l);let p=(d=a.args)!==null&&d!==void 0?d:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var i,l;(i=this[Pr])===null||i===void 0||i.forEach((d,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(p,u,d)}),(l=this[Tt])===null||l===void 0||l.forEach((d,p)=>{d.context.toLowerCase()===a.toLowerCase()&&(this[p]=this.i18n(d))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,l){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...l})}}update(a){var i,l;super.update(a),(i=this[Pr])===null||i===void 0||i.forEach((d,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(a.has(p)||d.argsProvider!=null)&&(a.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,d))}),(l=this[Tt])===null||l===void 0||l.forEach((d,p)=>{d.argsProvider!=null&&(this[p]=this.i18n(d))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,l,d;super.connectedCallback(),new Set([...(i=(a=this[Tt])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(d=(l=this[Pr])===null||l===void 0?void 0:l.keys())!==null&&d!==void 0?d:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(a,i){a=a.toLowerCase(),this[at].has(a)||this[at].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[at].forEach(a=>a()),this[at].clear()}}return r=at,Di([(0,mn.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var hn=class extends Ut(Dt.FtLitElement){},Wt=class extends Ut(Dt.FtLitElementRedux){};var it=function(t,r,o,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(r,o,i):l(r,o))||i);return a>3&&i&&Object.defineProperty(r,o,i),i},J=class extends Wt{constructor(){super(),this.editorMode=!1,this.addStore(C)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Mt.nothing:Mt.html`
233
233
  <span class="ft-i18n">
234
234
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
235
235
  </span>