@fluid-topics/ft-copy-block 1.1.99 → 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.
@@ -865,7 +865,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
865
865
  `;var jo=v(L());var dc=v(L());var va=v($()),de=v(K()),ge=v(L());var ya=v($());var ga=ya.css`
866
866
  `;var Oo=v(L()),Vc="ft-app-info",xr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Yc={session:(e,t)=>{(0,Oo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>P.eventBus.dispatchEvent(new xr(t.payload)),0))}},P=Oo.FtReduxStore.get({name:Vc,reducers:Yc,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 He=v(L());var vr=v(L());var nt=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=P.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=P.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Ue=class{constructor(t=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new vr.CacheRegistry,this.cache=t?i.commonCache:new vr.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:nt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):nt.await()}clearCache(){this.cache.clearAll()}};var ba,qc=Symbol("clearAfterUnitTest"),Co=class extends Ue{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ba]=()=>{this.defaultMessages={},this.cache=new He.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=P.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,He.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,r,...n){var i,a,c;t=t.toLowerCase(),this.fetchContext(t);let s=(a=(i=this.cache.getNow(t))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new He.ParametrizedLabelResolver((c=this.defaultMessages[t])!==null&&c!==void 0?c:{},s).resolve(r,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(r){console.error(r)}}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(r=>(0,He.delay)(0).then(()=>r()).catch(()=>null)))}};ba=qc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Co{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Co{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Nt=window.FluidTopicsI18nService,xa=window.FluidTopicsCustomI18nService;var X=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},M=class extends ge.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=()=>nt.get(),this.messageContexts=[],this.cache=new ge.CacheRegistry,this.cleanSessionDebouncer=new ge.Debouncer}render(){return va.html`
867
867
  <slot></slot>
868
- `}update(t){super.update(t),t.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&P.actions.noCustom(this.noCustom),t.has("editorMode")&&P.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&P.actions.session(this.session),t.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>Nt.addContext(r)),t.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};M.elementDefinitions={};M.styles=ga;X([(0,de.property)()],M.prototype,"baseUrl",void 0);X([(0,de.property)()],M.prototype,"apiIntegrationIdentifier",void 0);X([(0,de.property)()],M.prototype,"uiLocale",void 0);X([(0,ge.jsonProperty)(null)],M.prototype,"availableUiLocales",void 0);X([(0,ge.jsonProperty)(null)],M.prototype,"metadataConfiguration",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"editorMode",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"noCustom",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"openExternalDocumentInNewTab",void 0);X([(0,de.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],M.prototype,"noCustomComponent",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"withManualResources",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"navigatorOnline",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"forcedOffline",void 0);X([(0,de.property)({type:Object})],M.prototype,"apiProvider",void 0);X([(0,ge.jsonProperty)([])],M.prototype,"messageContexts",void 0);X([(0,ge.jsonProperty)(void 0)],M.prototype,"session",void 0);var Dl=v(K());function Xc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!wo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!wo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!wo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wo(e,t){try{return Xc(e,t)}catch{return!1}}function Sr(e,t){return!wo(e,t)}var Jc=v(K(),1);var Eo=class{constructor(){this.queue=[]}add(t,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var Vt=v(K(),1);var Sa=v(K(),1);function Oa(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,Sa.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Sr,...t??{}})}var No=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(s){i(s);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wa=v($(),1);var Ao=window,Qc=Ao.ShadowRoot&&(Ao.ShadyCSS===void 0||Ao.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,om=Symbol();var Ca=(e,t)=>{Qc?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{let n=document.createElement("style"),i=Ao.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})};var Ro=class extends wa.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ca(n,t.elementStyles),n}};var Po=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Ra,Ea=Symbol("constructorPrototype"),Na=Symbol("constructorName"),Pa=Symbol("exportpartsDebouncer"),Aa=Symbol("dynamicDependenciesLoaded"),Ge=class extends Ro{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ra]=new No(5),this[Na]=this.constructor.name,this[Ea]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Na]&&Object.setPrototypeOf(this,this[Ea])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let t=this.constructor;t[Aa]||(t[Aa]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Pa].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var r,n,i,a,c,s;let d=m=>m!=null&&m.trim().length>0,p=t.filter(d).map(m=>m.trim());if(p.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],y=(s=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(b=>b.split(":")[1]))!==null&&s!==void 0?s:[];new Array(...g,...y).filter(d).map(b=>b.trim()).forEach(b=>u.add(b))}if(u.size===0){this.removeAttribute("exportparts");return}let h=[...u.values()].flatMap(m=>p.map(g=>`${m}:${g}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Ra=Pa;Po([(0,Vt.property)()],Ge.prototype,"exportpartsPrefix",void 0);Po([Oa([])],Ge.prototype,"exportpartsPrefixes",void 0);Po([(0,Vt.property)()],Ge.prototype,"customStylesheet",void 0);Po([(0,Vt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Yt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var La,Ia,Ta,Lo=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),it=Symbol("internalStores"),qt=class extends Ge{constructor(){super(...arguments),this[La]=new Map,this[Ia]=new Map,this[Ta]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(r=>t.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[it].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[it].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[it].get(t)}addStore(t,r){var n;r=(n=r??(Yt(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,t)}removeStore(t){let r=typeof t=="string"?t:t.name;this.unsubscribeFromStore(r),this[it].delete(r)}setupStore(t,r){this[it].set(t,r),this.subscribeToStore(t,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[it].forEach((t,r)=>this.subscribeToStore(r,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(t.store);i&&(t.store?this[je].has(t.store):this[je].size>0)&&(this[r]=t.selector(i.getState(),this))}})}subscribeToStore(t,r){var n;this[je].set(t,r.subscribe(()=>this.updateFromStores())),Yt(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let c=s=>this[a](s);r.eventBus.addEventListener(i.eventName,c),this[Lo].push(()=>r.eventBus.removeEventListener(i.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[je].forEach((t,r)=>this.unsubscribeFromStore(r)),this[Lo].forEach(t=>t()),this[Lo]=[]}unsubscribeFromStore(t){this[je].has(t)&&this[je].get(t)(),this[je].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};La=je,Ia=it,Ta=Lo;qt.reduxProperties=new Map;qt.reduxReactiveProperties=new Set;qt.reduxEventListeners=new Map;function pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ke(e){return!!e&&!!e[D]}function be(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===cl}(e)||Array.isArray(e)||!!e[Ma]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ma])||Lr(e)||Ir(e))}function at(e,t,r){r===void 0&&(r=!1),Pt(e)===0?(r?Object.keys:Rt)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Pt(e){var t=e[D];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Lr(e)?2:Ir(e)?3:0}function At(e,t){return Pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function el(e,t){return Pt(e)===2?e.get(t):e[t]}function za(e,t,r){var n=Pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ua(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Lr(e){return il&&e instanceof Map}function Ir(e){return al&&e instanceof Set}function Fe(e){return e.o||e.t}function Tr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ja(e);delete t[D];for(var r=Rt(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function kr(e,t){return t===void 0&&(t=!1),_r(e)||ke(e)||!be(e)||(Pt(e)>1&&(e.set=e.add=e.clear=e.delete=tl),Object.freeze(e),t&&at(e,function(r,n){return kr(n,!0)},!0)),e}function tl(){pe(2)}function _r(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function we(e){var t=Pr[e];return t||pe(18,e),t}function ol(e,t){Pr[e]||(Pr[e]=t)}function Nr(){return Jt}function Or(e,t){t&&(we("Patches"),e.u=[],e.s=[],e.v=t)}function Io(e){Ar(e),e.p.forEach(rl),e.p=null}function Ar(e){e===Jt&&(Jt=e.l)}function ka(e){return Jt={p:[],l:Jt,h:e,m:!0,_:0}}function rl(e){var t=e[D];t.i===0||t.i===1?t.j():t.g=!0}function Cr(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||we("ES5").S(t,e,n),n?(r[D].P&&(Io(t),pe(4)),be(e)&&(e=To(t,e),t.l||ko(t,e)),t.u&&we("Patches").M(r[D].t,e,t.u,t.s)):e=To(t,r,[]),Io(t),t.u&&t.v(t.u,t.s),e!==Ga?e:void 0}function To(e,t,r){if(_r(t))return t;var n=t[D];if(!n)return at(t,function(s,d){return _a(e,n,t,s,d,r)},!0),t;if(n.A!==e)return t;if(!n.P)return ko(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Tr(n.k):n.o,a=i,c=!1;n.i===3&&(a=new Set(i),i.clear(),c=!0),at(a,function(s,d){return _a(e,n,i,s,d,r,c)}),ko(e,i,!1),r&&e.u&&we("Patches").N(n,r,e.u,e.s)}return n.o}function _a(e,t,r,n,i,a,c){if(ke(i)){var s=To(e,i,a&&t&&t.i!==3&&!At(t.R,n)?a.concat(n):void 0);if(za(r,n,s),!ke(s))return;e.m=!1}else c&&r.add(i);if(be(i)&&!_r(i)){if(!e.h.D&&e._<1)return;To(e,i),t&&t.A.l||ko(e,i)}}function ko(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&kr(t,r)}function wr(e,t){var r=e[D];return(r?Fe(r):e)[t]}function Wa(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ke(e){e.P||(e.P=!0,e.l&&Ke(e.l))}function Er(e){e.o||(e.o=Tr(e.t))}function Rr(e,t,r){var n=Lr(t)?we("MapSet").F(t,r):Ir(t)?we("MapSet").T(t,r):e.O?function(i,a){var c=Array.isArray(i),s={i:c?1:0,A:a?a.A:Nr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=s,p=Qt;c&&(d=[s],p=Xt);var u=Proxy.revocable(d,p),h=u.revoke,m=u.proxy;return s.k=m,s.j=h,m}(t,r):we("ES5").J(t,r);return(r?r.A:Nr()).p.push(n),n}function nl(e){return ke(e)||pe(22,e),function t(r){if(!be(r))return r;var n,i=r[D],a=Pt(r);if(i){if(!i.P&&(i.i<4||!we("ES5").K(i)))return i.t;i.I=!0,n=Da(r,a),i.I=!1}else n=Da(r,a);return at(n,function(c,s){i&&el(i.t,c)===s||za(n,c,t(s))}),a===3?new Set(n):n}(e)}function Da(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Tr(e)}function Ha(){function e(c,s){var d=a[c];return d?d.enumerable=s:a[c]=d={configurable:!0,enumerable:s,get:function(){var p=this[D];return Qt.get(p,c)},set:function(p){var u=this[D];Qt.set(u,c,p)}},d}function t(c){for(var s=c.length-1;s>=0;s--){var d=c[s][D];if(!d.P)switch(d.i){case 5:n(d)&&Ke(d);break;case 4:r(d)&&Ke(d)}}}function r(c){for(var s=c.t,d=c.k,p=Rt(d),u=p.length-1;u>=0;u--){var h=p[u];if(h!==D){var m=s[h];if(m===void 0&&!At(s,h))return!0;var g=d[h],y=g&&g[D];if(y?y.t!==m:!Ua(g,m))return!0}}var b=!!s[D];return p.length!==Rt(s).length+(b?0:1)}function n(c){var s=c.k;if(s.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(s,s.length-1);if(d&&!d.get)return!0;for(var p=0;p<s.length;p++)if(!s.hasOwnProperty(p))return!0;return!1}function i(c){c.g&&pe(3,JSON.stringify(Fe(c)))}var a={};ol("ES5",{J:function(c,s){var d=Array.isArray(c),p=function(h,m){if(h){for(var g=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var b=ja(m);delete b[D];for(var N=Rt(b),C=0;C<N.length;C++){var w=N[C];b[w]=e(w,h||!!b[w].enumerable)}return Object.create(Object.getPrototypeOf(m),b)}(d,c),u={i:d?5:4,A:s?s.A:Nr(),P:!1,I:!1,R:{},l:s,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,D,{value:u,writable:!0}),p},S:function(c,s,d){d?ke(s)&&s[D].A===c&&t(c.p):(c.u&&function p(u){if(u&&typeof u=="object"){var h=u[D];if(h){var m=h.t,g=h.k,y=h.R,b=h.i;if(b===4)at(g,function(I){I!==D&&(m[I]!==void 0||At(m,I)?y[I]||p(g[I]):(y[I]=!0,Ke(h)))}),at(m,function(I){g[I]!==void 0||At(g,I)||(y[I]=!1,Ke(h))});else if(b===5){if(n(h)&&(Ke(h),y.length=!0),g.length<m.length)for(var N=g.length;N<m.length;N++)y[N]=!1;else for(var C=m.length;C<g.length;C++)y[C]=!0;for(var w=Math.min(g.length,m.length),A=0;A<w;A++)g.hasOwnProperty(A)||(y[A]=!0),y[A]===void 0&&p(g[A])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?r(c):n(c)}})}var $a,Jt,Wr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",il=typeof Map<"u",al=typeof Set<"u",Ba=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ga=Wr?Symbol.for("immer-nothing"):(($a={})["immer-nothing"]=!0,$a),Ma=Wr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Wr?Symbol.for("immer-state"):"__$immer_state";var cl=""+Object.prototype.constructor,Rt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ja=Object.getOwnPropertyDescriptors||function(e){var t={};return Rt(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Pr={},Qt={get:function(e,t){if(t===D)return e;var r=Fe(e);if(!At(r,t))return function(i,a,c){var s,d=Wa(a,c);return d?"value"in d?d.value:(s=d.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!be(n)?n:n===wr(e.t,t)?(Er(e),e.o[t]=Rr(e.A.h,n,e)):n},has:function(e,t){return t in Fe(e)},ownKeys:function(e){return Reflect.ownKeys(Fe(e))},set:function(e,t,r){var n=Wa(Fe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=wr(Fe(e),t),a=i?.[D];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Ua(r,i)&&(r!==void 0||At(e.t,t)))return!0;Er(e),Ke(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return wr(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Er(e),Ke(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Fe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},Xt={};at(Qt,function(e,t){Xt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xt.deleteProperty=function(e,t){return Xt.set.call(this,e,t,void 0)},Xt.set=function(e,t,r){return Qt.set.call(this,e[0],t,r,e[0])};var ll=function(){function e(r){var n=this;this.O=Ba,this.D=!0,this.produce=function(i,a,c){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var d=n;return function(b){var N=this;b===void 0&&(b=s);for(var C=arguments.length,w=Array(C>1?C-1:0),A=1;A<C;A++)w[A-1]=arguments[A];return d.produce(b,function(I){var _;return(_=a).call.apply(_,[N,I].concat(w))})}}var p;if(typeof a!="function"&&pe(6),c!==void 0&&typeof c!="function"&&pe(7),be(i)){var u=ka(n),h=Rr(n,i,void 0),m=!0;try{p=a(h),m=!1}finally{m?Io(u):Ar(u)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(b){return Or(u,c),Cr(b,u)},function(b){throw Io(u),b}):(Or(u,c),Cr(p,u))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Ga&&(p=void 0),n.D&&kr(p,!0),c){var g=[],y=[];we("Patches").M(i,p,g,y),c(g,y)}return p}pe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){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(p,function(g){return i.apply(void 0,[g].concat(h))})};var c,s,d=n.produce(i,a,function(p,u){c=p,s=u});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,s]}):[d,c,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){be(r)||pe(8),ke(r)&&(r=nl(r));var n=ka(this),i=Rr(this,r,void 0);return i[D].C=!0,Ar(n),i},t.finishDraft=function(r,n){var i=r&&r[D],a=i.A;return Or(a,n),Cr(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Ba&&pe(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var c=we("Patches").$;return ke(r)?c(r,n):this.produce(r,function(s){return c(s,n)})},e}(),ie=new ll,sl=ie.produce,hm=ie.produceWithPatches.bind(ie),mm=ie.setAutoFreeze.bind(ie),ym=ie.setUseProxies.bind(ie),gm=ie.applyPatches.bind(ie),bm=ie.createDraft.bind(ie),xm=ie.finishDraft.bind(ie),_o=sl;function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function Dr(e,t){if(Ze(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ze(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $r(e){var t=Dr(e,"string");return Ze(t)==="symbol"?t:String(t)}function Br(e,t,r){return t=$r(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fa(Object(r),!0).forEach(function(n){Br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ka=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Mr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Do={INIT:"@@redux/INIT"+Mr(),REPLACE:"@@redux/REPLACE"+Mr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Mr()}};function fl(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Z(1));return r(zr)(e,t)}if(typeof e!="function")throw new Error(Z(2));var i=e,a=t,c=[],s=c,d=!1;function p(){s===c&&(s=c.slice())}function u(){if(d)throw new Error(Z(3));return a}function h(b){if(typeof b!="function")throw new Error(Z(4));if(d)throw new Error(Z(5));var N=!0;return p(),s.push(b),function(){if(N){if(d)throw new Error(Z(6));N=!1,p();var w=s.indexOf(b);s.splice(w,1),c=null}}}function m(b){if(!fl(b))throw new Error(Z(7));if(typeof b.type>"u")throw new Error(Z(8));if(d)throw new Error(Z(9));try{d=!0,a=i(a,b)}finally{d=!1}for(var N=c=s,C=0;C<N.length;C++){var w=N[C];w()}return b}function g(b){if(typeof b!="function")throw new Error(Z(10));i=b,m({type:Do.REPLACE})}function y(){var b,N=h;return b={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(Z(11));function A(){w.next&&w.next(u())}A();var I=N(A);return{unsubscribe:I}}},b[Ka]=function(){return this},b}return m({type:Do.INIT}),n={dispatch:m,subscribe:h,getState:u,replaceReducer:g},n[Ka]=y,n}function dl(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Do.INIT});if(typeof n>"u")throw new Error(Z(12));if(typeof r(void 0,{type:Do.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function Za(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),c,s;try{dl(r)}catch(d){s=d}return function(p,u){if(p===void 0&&(p={}),s)throw s;if(0)var h;for(var m=!1,g={},y=0;y<a.length;y++){var b=a[y],N=r[b],C=p[b],w=N(C,u);if(typeof w>"u"){var A=u&&u.type;throw new Error(Z(14))}g[b]=w,m=m||w!==C}return m=m||a.length!==Object.keys(p).length,m?g:p}}function Lt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Va(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Z(15))},c={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=t.map(function(d){return d(c)});return a=Lt.apply(void 0,s)(i.dispatch),Wo(Wo({},i),{},{dispatch:a})}}}function Ya(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(c){return function(s){return typeof s=="function"?s(i,a,e):c(s)}}};return t}var qa=Ya();qa.withExtraArgument=Ya;var Ur=qa;var tc=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pl=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,c;return c={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(p){return function(u){return d([p,u])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(u){p=[6,u],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},It=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},ul=Object.defineProperty,hl=Object.defineProperties,ml=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertySymbols,yl=Object.prototype.hasOwnProperty,gl=Object.prototype.propertyIsEnumerable,Ja=function(e,t,r){return t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Ve=function(e,t){for(var r in t||(t={}))yl.call(t,r)&&Ja(e,r,t[r]);if(Xa)for(var n=0,i=Xa(t);n<i.length;n++){var r=i[n];gl.call(t,r)&&Ja(e,r,t[r])}return e},Hr=function(e,t){return hl(e,ml(t))},bl=function(e,t,r){return new Promise(function(n,i){var a=function(d){try{s(r.next(d))}catch(p){i(p)}},c=function(d){try{s(r.throw(d))}catch(p){i(p)}},s=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,c)};s((r=r.apply(e,t)).next())})};var xl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lt:Lt.apply(null,arguments)},$m=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function vl(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Sl=function(e){tc(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,It([void 0],r[0].concat(this)))):new(t.bind.apply(t,It([void 0],r.concat(this))))},t}(Array),Ol=function(e){tc(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,It([void 0],r[0].concat(this)))):new(t.bind.apply(t,It([void 0],r.concat(this))))},t}(Array);function Fr(e){return be(e)?_o(e,function(){}):e}function Cl(e){return typeof e=="boolean"}function wl(){return function(t){return El(t)}}function El(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,c=a===void 0?!0:a,s=new Sl;if(r&&(Cl(r)?s.push(Ur):s.push(Ur.withExtraArgument(r.extraArgument))),0){if(i)var d;if(c)var p}return s}var Gr=!0;function oc(e){var t=wl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,c=a===void 0?t():a,s=r.devTools,d=s===void 0?!0:s,p=r.preloadedState,u=p===void 0?void 0:p,h=r.enhancers,m=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(vl(i))g=Za(i);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 y=c;if(typeof y=="function"&&(y=y(t),!Gr&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gr&&y.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var b=Va.apply(void 0,y),N=Lt;d&&(N=xl(Ve({trace:!Gr},typeof d=="object"&&d)));var C=new Ol(b),w=C;Array.isArray(m)?w=It([b],m):typeof m=="function"&&(w=m(C));var A=N.apply(void 0,w);return zr(g,u,A)}function Ye(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Ve(Ve({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function rc(e){var t={},r=[],n,i={addCase:function(a,c){var s=typeof a=="string"?a:a.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=c,i},addMatcher:function(a,c){return r.push({matcher:a,reducer:c}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function Nl(e){return typeof e=="function"}function Al(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?rc(t):[t,r,n],a=i[0],c=i[1],s=i[2],d;if(Nl(e))d=function(){return Fr(e())};else{var p=Fr(e);d=function(){return p}}function u(h,m){h===void 0&&(h=d());var g=It([a[m.type]],c.filter(function(y){var b=y.matcher;return b(m)}).map(function(y){var b=y.reducer;return b}));return g.filter(function(y){return!!y}).length===0&&(g=[s]),g.reduce(function(y,b){if(b)if(ke(y)){var N=y,C=b(N,m);return C===void 0?y:C}else{if(be(y))return _o(y,function(w){return b(w,m)});var C=b(y,m);if(C===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return y},h)}return u.getInitialState=d,u}function Rl(e,t){return e+"/"+t}function nc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Fr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},c={},s={};i.forEach(function(u){var h=n[u],m=Rl(t,u),g,y;"reducer"in h?(g=h.reducer,y=h.prepare):g=h,a[u]=g,c[m]=g,s[u]=y?Ye(m,y):Ye(m)});function d(){var u=typeof e.extraReducers=="function"?rc(e.extraReducers):[e.extraReducers],h=u[0],m=h===void 0?{}:h,g=u[1],y=g===void 0?[]:g,b=u[2],N=b===void 0?void 0:b,C=Ve(Ve({},m),c);return Al(r,function(w){for(var A in C)w.addCase(A,C[A]);for(var I=0,_=y;I<_.length;I++){var ae=_[I];w.addMatcher(ae.matcher,ae.reducer)}N&&w.addDefaultCase(N)})}var p;return{name:t,reducer:function(u,h){return p||(p=d()),p(u,h)},actions:s,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Pl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ll=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Pl[Math.random()*64|0];return t},Il=["name","message","stack","code"],jr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Qa=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Tl=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Il;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},Um=function(){function e(t,r,n){var i=Ye(t+"/fulfilled",function(u,h,m,g){return{payload:u,meta:Hr(Ve({},g||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=Ye(t+"/pending",function(u,h,m){return{payload:void 0,meta:Hr(Ve({},m||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),c=Ye(t+"/rejected",function(u,h,m,g,y){return{payload:g,error:(n&&n.serializeError||Tl)(u||"Rejected"),meta:Hr(Ve({},y||{}),{arg:m,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),s=!1,d=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 p(u){return function(h,m,g){var y=n?.idGenerator?n.idGenerator(u):Ll(),b=new d,N,C=!1;function w(I){N=I,b.abort()}var A=function(){return bl(this,null,function(){var I,_,ae,_e,Yo,We,te;return pl(this,function(ce){switch(ce.label){case 0:return ce.trys.push([0,4,,5]),_e=(I=n?.condition)==null?void 0:I.call(n,u,{getState:m,extra:g}),_l(_e)?[4,_e]:[3,2];case 1:_e=ce.sent(),ce.label=2;case 2:if(_e===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,Yo=new Promise(function(oe,qe){return b.signal.addEventListener("abort",function(){return qe({name:"AbortError",message:N||"Aborted"})})}),h(a(y,u,(_=n?.getPendingMeta)==null?void 0:_.call(n,{requestId:y,arg:u},{getState:m,extra:g}))),[4,Promise.race([Yo,Promise.resolve(r(u,{dispatch:h,getState:m,extra:g,requestId:y,signal:b.signal,abort:w,rejectWithValue:function(oe,qe){return new jr(oe,qe)},fulfillWithValue:function(oe,qe){return new Qa(oe,qe)}})).then(function(oe){if(oe instanceof jr)throw oe;return oe instanceof Qa?i(oe.payload,y,u,oe.meta):i(oe,y,u)})])];case 3:return ae=ce.sent(),[3,5];case 4:return We=ce.sent(),ae=We instanceof jr?c(null,y,u,We.payload,We.meta):c(We,y,u),[3,5];case 5:return te=n&&!n.dispatchConditionRejection&&c.match(ae)&&ae.meta.condition,te||h(ae),[2,ae]}})})}();return Object.assign(A,{abort:w,requestId:y,arg:u,unwrap:function(){return A.then(kl)}})}}return Object.assign(p,{pending:a,rejected:c,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function kl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _l(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ic="listener",ac="completed",cc="cancelled",Hm="task-"+cc,Gm="task-"+ac,jm=ic+"-"+cc,Fm=ic+"-"+ac;var Kr="listenerMiddleware";var Km=Ye(Kr+"/add"),Zm=Ye(Kr+"/removeAll"),Vm=Ye(Kr+"/remove");var ec,Ym=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ec||(ec=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wl=function(e){return function(t){setTimeout(t,e)}},qm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wl(10);Ha();window.ftReduxStores||(window.ftReduxStores={});var lc=class e{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(Yt(a))return a;if(i==null)return;let c=nc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),s=oc({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[i.name]=new e(c,s)}constructor(t,r){this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Eo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let c=i,s=n[c];return s?(...d)=>{let p=s(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var zo=v(L());var $o=class extends Ue{async listMySearches(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bo=class extends Ue{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var $l="ft-user-assets",Mo=zo.FtReduxStore.get({name:$l,initialState:{savedSearches:void 0,bookmarks:void 0}}),Zr=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bo,this.savedSearchesService=new $o,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=P.getState();(0,zo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Mo.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mo.actions.bookmarks(r)}}},Ey=new Zr;var Vr=class{addCommand(t,r=!1){P.commands.add(t,r)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Vr;var sc=v(L()),Yr=class{highlightHtml(t,r){(0,sc.highlightHtml)(t,r)}};window.FluidTopicsHighlightHtmlService=new Yr;var fc=v(L());var qr=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(s=>s.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return fc.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new qr;(0,dc.customElement)("ft-app-context")(M);var pc=v(K()),Bl=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Xr=Symbol("i18nAttributes"),Uo=Symbol("i18nProperties"),eo=Symbol("i18nUnsubs");function uc(e){var t;class r extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?xa:Nt}i18n(i,a,...c){var s;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...c);let d=(s=i.args)!==null&&s!==void 0?s:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...d)}onI18nUpdate(i){var a,c;(a=this[Xr])===null||a===void 0||a.forEach((s,d)=>{var p;let u=this.getI18nAttributeValue(d);((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(d,u,s)}),(c=this[Uo])===null||c===void 0||c.forEach((s,d)=>{s.context.toLowerCase()===i.toLowerCase()&&(this[d]=this.i18n(s))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,c){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...c})}}update(i){var a,c;super.update(i),(a=this[Xr])===null||a===void 0||a.forEach((s,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(i.has(d)||s.argsProvider!=null)&&(i.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,s))}),(c=this[Uo])===null||c===void 0||c.forEach((s,d)=>{s.argsProvider!=null&&(this[d]=this.i18n(s))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,c,s;super.connectedCallback(),new Set([...(a=(i=this[Uo])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(s=(c=this[Xr])===null||c===void 0?void 0:c.keys())!==null&&s!==void 0?s:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(i,a){i=i.toLowerCase(),this[eo].has(i)||this[eo].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[eo].forEach(i=>i()),this[eo].clear()}}return t=eo,Bl([(0,pc.property)({type:Boolean})],r.prototype,"useCustomMessageContexts",void 0),r}var Ho=class extends uc(jo.FtLitElement){},Go=class extends uc(jo.FtLitElementRedux){};var to=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},xe=class extends Go{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Fo.nothing:Fo.html`
868
+ `}update(t){super.update(t),t.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&P.actions.noCustom(this.noCustom),t.has("editorMode")&&P.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&P.actions.session(this.session),t.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>Nt.addContext(r)),t.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};M.elementDefinitions={};M.styles=ga;X([(0,de.property)()],M.prototype,"baseUrl",void 0);X([(0,de.property)()],M.prototype,"apiIntegrationIdentifier",void 0);X([(0,de.property)()],M.prototype,"uiLocale",void 0);X([(0,ge.jsonProperty)(null)],M.prototype,"availableUiLocales",void 0);X([(0,ge.jsonProperty)(null)],M.prototype,"metadataConfiguration",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"editorMode",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"noCustom",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"openExternalDocumentInNewTab",void 0);X([(0,de.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],M.prototype,"noCustomComponent",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"withManualResources",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"navigatorOnline",void 0);X([(0,de.property)({type:Boolean})],M.prototype,"forcedOffline",void 0);X([(0,de.property)({type:Object})],M.prototype,"apiProvider",void 0);X([(0,ge.jsonProperty)([])],M.prototype,"messageContexts",void 0);X([(0,ge.jsonProperty)(void 0)],M.prototype,"session",void 0);var Dl=v(K());function Xc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!wo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!wo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!wo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wo(e,t){try{return Xc(e,t)}catch{return!1}}function Sr(e,t){return!wo(e,t)}var Jc=v(K(),1);var Eo=class{constructor(){this.queue=[]}add(t,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var Vt=v(K(),1);var Sa=v(K(),1);function Oa(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,Sa.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Sr,...t??{}})}var No=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(s){i(s);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wa=v($(),1);var Ao=window,Qc=Ao.ShadowRoot&&(Ao.ShadyCSS===void 0||Ao.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,om=Symbol();var Ca=(e,t)=>{Qc?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{let n=document.createElement("style"),i=Ao.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})};var Ro=class extends wa.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Ca(n,t.elementStyles),n}};var Po=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Ra,Ea=Symbol("constructorPrototype"),Na=Symbol("constructorName"),Pa=Symbol("exportpartsDebouncer"),Aa=Symbol("dynamicDependenciesLoaded"),Ge=class extends Ro{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ra]=new No(5),this[Na]=this.constructor.name,this[Ea]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Na]&&Object.setPrototypeOf(this,this[Ea])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let t=this.constructor;t[Aa]||(t[Aa]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Pa].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var r,n,i,a,c,s;let d=m=>m!=null&&m.trim().length>0,p=t.filter(d).map(m=>m.trim());if(p.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],y=(s=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(b=>b.split(":")[1]))!==null&&s!==void 0?s:[];new Array(...g,...y).filter(d).map(b=>b.trim()).forEach(b=>u.add(b))}if(u.size===0){this.removeAttribute("exportparts");return}let h=[...u.values()].flatMap(m=>p.map(g=>`${m}:${g}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};Ra=Pa;Po([(0,Vt.property)()],Ge.prototype,"exportpartsPrefix",void 0);Po([Oa([])],Ge.prototype,"exportpartsPrefixes",void 0);Po([(0,Vt.property)()],Ge.prototype,"customStylesheet",void 0);Po([(0,Vt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Yt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var La,Ia,Ta,Lo=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),it=Symbol("internalStores"),qt=class extends Ge{constructor(){super(...arguments),this[La]=new Map,this[Ia]=new Map,this[Ta]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(r=>t.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[it].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[it].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[it].get(t)}addStore(t,r){var n;r=(n=r??(Yt(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this.setupStore(r,t)}removeStore(t){let r=typeof t=="string"?t:t.name;this.unsubscribeFromStore(r),this[it].delete(r)}setupStore(t,r){this[it].set(t,r),this.subscribeToStore(t,r),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[it].forEach((t,r)=>this.subscribeToStore(r,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(t.store);i&&(t.store?this[je].has(t.store):this[je].size>0)&&(this[r]=t.selector(i.getState(),this))}})}subscribeToStore(t,r){var n;this[je].set(t,r.subscribe(()=>this.updateFromStores())),Yt(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let c=s=>this[a](s);r.eventBus.addEventListener(i.eventName,c),this[Lo].push(()=>r.eventBus.removeEventListener(i.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[je].forEach((t,r)=>this.unsubscribeFromStore(r)),this[Lo].forEach(t=>t()),this[Lo]=[]}unsubscribeFromStore(t){this[je].has(t)&&this[je].get(t)(),this[je].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};La=je,Ia=it,Ta=Lo;qt.reduxProperties=new Map;qt.reduxReactiveProperties=new Set;qt.reduxEventListeners=new Map;function pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ke(e){return!!e&&!!e[D]}function be(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===cl}(e)||Array.isArray(e)||!!e[Ma]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ma])||Lr(e)||Ir(e))}function at(e,t,r){r===void 0&&(r=!1),Pt(e)===0?(r?Object.keys:Rt)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Pt(e){var t=e[D];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Lr(e)?2:Ir(e)?3:0}function At(e,t){return Pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function el(e,t){return Pt(e)===2?e.get(t):e[t]}function za(e,t,r){var n=Pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ua(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Lr(e){return il&&e instanceof Map}function Ir(e){return al&&e instanceof Set}function Fe(e){return e.o||e.t}function Tr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ja(e);delete t[D];for(var r=Rt(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function kr(e,t){return t===void 0&&(t=!1),_r(e)||ke(e)||!be(e)||(Pt(e)>1&&(e.set=e.add=e.clear=e.delete=tl),Object.freeze(e),t&&at(e,function(r,n){return kr(n,!0)},!0)),e}function tl(){pe(2)}function _r(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function we(e){var t=Pr[e];return t||pe(18,e),t}function ol(e,t){Pr[e]||(Pr[e]=t)}function Nr(){return Jt}function Or(e,t){t&&(we("Patches"),e.u=[],e.s=[],e.v=t)}function Io(e){Ar(e),e.p.forEach(rl),e.p=null}function Ar(e){e===Jt&&(Jt=e.l)}function ka(e){return Jt={p:[],l:Jt,h:e,m:!0,_:0}}function rl(e){var t=e[D];t.i===0||t.i===1?t.j():t.g=!0}function Cr(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||we("ES5").S(t,e,n),n?(r[D].P&&(Io(t),pe(4)),be(e)&&(e=To(t,e),t.l||ko(t,e)),t.u&&we("Patches").M(r[D].t,e,t.u,t.s)):e=To(t,r,[]),Io(t),t.u&&t.v(t.u,t.s),e!==Ga?e:void 0}function To(e,t,r){if(_r(t))return t;var n=t[D];if(!n)return at(t,function(s,d){return _a(e,n,t,s,d,r)},!0),t;if(n.A!==e)return t;if(!n.P)return ko(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Tr(n.k):n.o,a=i,c=!1;n.i===3&&(a=new Set(i),i.clear(),c=!0),at(a,function(s,d){return _a(e,n,i,s,d,r,c)}),ko(e,i,!1),r&&e.u&&we("Patches").N(n,r,e.u,e.s)}return n.o}function _a(e,t,r,n,i,a,c){if(ke(i)){var s=To(e,i,a&&t&&t.i!==3&&!At(t.R,n)?a.concat(n):void 0);if(za(r,n,s),!ke(s))return;e.m=!1}else c&&r.add(i);if(be(i)&&!_r(i)){if(!e.h.D&&e._<1)return;To(e,i),t&&t.A.l||ko(e,i)}}function ko(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&kr(t,r)}function wr(e,t){var r=e[D];return(r?Fe(r):e)[t]}function Wa(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ke(e){e.P||(e.P=!0,e.l&&Ke(e.l))}function Er(e){e.o||(e.o=Tr(e.t))}function Rr(e,t,r){var n=Lr(t)?we("MapSet").F(t,r):Ir(t)?we("MapSet").T(t,r):e.O?function(i,a){var c=Array.isArray(i),s={i:c?1:0,A:a?a.A:Nr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=s,p=Qt;c&&(d=[s],p=Xt);var u=Proxy.revocable(d,p),h=u.revoke,m=u.proxy;return s.k=m,s.j=h,m}(t,r):we("ES5").J(t,r);return(r?r.A:Nr()).p.push(n),n}function nl(e){return ke(e)||pe(22,e),function t(r){if(!be(r))return r;var n,i=r[D],a=Pt(r);if(i){if(!i.P&&(i.i<4||!we("ES5").K(i)))return i.t;i.I=!0,n=Da(r,a),i.I=!1}else n=Da(r,a);return at(n,function(c,s){i&&el(i.t,c)===s||za(n,c,t(s))}),a===3?new Set(n):n}(e)}function Da(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Tr(e)}function Ha(){function e(c,s){var d=a[c];return d?d.enumerable=s:a[c]=d={configurable:!0,enumerable:s,get:function(){var p=this[D];return Qt.get(p,c)},set:function(p){var u=this[D];Qt.set(u,c,p)}},d}function t(c){for(var s=c.length-1;s>=0;s--){var d=c[s][D];if(!d.P)switch(d.i){case 5:n(d)&&Ke(d);break;case 4:r(d)&&Ke(d)}}}function r(c){for(var s=c.t,d=c.k,p=Rt(d),u=p.length-1;u>=0;u--){var h=p[u];if(h!==D){var m=s[h];if(m===void 0&&!At(s,h))return!0;var g=d[h],y=g&&g[D];if(y?y.t!==m:!Ua(g,m))return!0}}var b=!!s[D];return p.length!==Rt(s).length+(b?0:1)}function n(c){var s=c.k;if(s.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(s,s.length-1);if(d&&!d.get)return!0;for(var p=0;p<s.length;p++)if(!s.hasOwnProperty(p))return!0;return!1}function i(c){c.g&&pe(3,JSON.stringify(Fe(c)))}var a={};ol("ES5",{J:function(c,s){var d=Array.isArray(c),p=function(h,m){if(h){for(var g=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var b=ja(m);delete b[D];for(var N=Rt(b),C=0;C<N.length;C++){var w=N[C];b[w]=e(w,h||!!b[w].enumerable)}return Object.create(Object.getPrototypeOf(m),b)}(d,c),u={i:d?5:4,A:s?s.A:Nr(),P:!1,I:!1,R:{},l:s,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,D,{value:u,writable:!0}),p},S:function(c,s,d){d?ke(s)&&s[D].A===c&&t(c.p):(c.u&&function p(u){if(u&&typeof u=="object"){var h=u[D];if(h){var m=h.t,g=h.k,y=h.R,b=h.i;if(b===4)at(g,function(I){I!==D&&(m[I]!==void 0||At(m,I)?y[I]||p(g[I]):(y[I]=!0,Ke(h)))}),at(m,function(I){g[I]!==void 0||At(g,I)||(y[I]=!1,Ke(h))});else if(b===5){if(n(h)&&(Ke(h),y.length=!0),g.length<m.length)for(var N=g.length;N<m.length;N++)y[N]=!1;else for(var C=m.length;C<g.length;C++)y[C]=!0;for(var w=Math.min(g.length,m.length),A=0;A<w;A++)g.hasOwnProperty(A)||(y[A]=!0),y[A]===void 0&&p(g[A])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?r(c):n(c)}})}var $a,Jt,Wr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",il=typeof Map<"u",al=typeof Set<"u",Ba=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ga=Wr?Symbol.for("immer-nothing"):(($a={})["immer-nothing"]=!0,$a),Ma=Wr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Wr?Symbol.for("immer-state"):"__$immer_state";var cl=""+Object.prototype.constructor,Rt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ja=Object.getOwnPropertyDescriptors||function(e){var t={};return Rt(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Pr={},Qt={get:function(e,t){if(t===D)return e;var r=Fe(e);if(!At(r,t))return function(i,a,c){var s,d=Wa(a,c);return d?"value"in d?d.value:(s=d.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!be(n)?n:n===wr(e.t,t)?(Er(e),e.o[t]=Rr(e.A.h,n,e)):n},has:function(e,t){return t in Fe(e)},ownKeys:function(e){return Reflect.ownKeys(Fe(e))},set:function(e,t,r){var n=Wa(Fe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=wr(Fe(e),t),a=i?.[D];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Ua(r,i)&&(r!==void 0||At(e.t,t)))return!0;Er(e),Ke(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return wr(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Er(e),Ke(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Fe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},Xt={};at(Qt,function(e,t){Xt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xt.deleteProperty=function(e,t){return Xt.set.call(this,e,t,void 0)},Xt.set=function(e,t,r){return Qt.set.call(this,e[0],t,r,e[0])};var ll=function(){function e(r){var n=this;this.O=Ba,this.D=!0,this.produce=function(i,a,c){if(typeof i=="function"&&typeof a!="function"){var s=a;a=i;var d=n;return function(b){var N=this;b===void 0&&(b=s);for(var C=arguments.length,w=Array(C>1?C-1:0),A=1;A<C;A++)w[A-1]=arguments[A];return d.produce(b,function(I){var _;return(_=a).call.apply(_,[N,I].concat(w))})}}var p;if(typeof a!="function"&&pe(6),c!==void 0&&typeof c!="function"&&pe(7),be(i)){var u=ka(n),h=Rr(n,i,void 0),m=!0;try{p=a(h),m=!1}finally{m?Io(u):Ar(u)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(b){return Or(u,c),Cr(b,u)},function(b){throw Io(u),b}):(Or(u,c),Cr(p,u))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Ga&&(p=void 0),n.D&&kr(p,!0),c){var g=[],y=[];we("Patches").M(i,p,g,y),c(g,y)}return p}pe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){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(p,function(g){return i.apply(void 0,[g].concat(h))})};var c,s,d=n.produce(i,a,function(p,u){c=p,s=u});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,s]}):[d,c,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){be(r)||pe(8),ke(r)&&(r=nl(r));var n=ka(this),i=Rr(this,r,void 0);return i[D].C=!0,Ar(n),i},t.finishDraft=function(r,n){var i=r&&r[D],a=i.A;return Or(a,n),Cr(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Ba&&pe(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var c=we("Patches").$;return ke(r)?c(r,n):this.produce(r,function(s){return c(s,n)})},e}(),ie=new ll,sl=ie.produce,hm=ie.produceWithPatches.bind(ie),mm=ie.setAutoFreeze.bind(ie),ym=ie.setUseProxies.bind(ie),gm=ie.applyPatches.bind(ie),bm=ie.createDraft.bind(ie),xm=ie.finishDraft.bind(ie),_o=sl;function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function Dr(e,t){if(Ze(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ze(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $r(e){var t=Dr(e,"string");return Ze(t)==="symbol"?t:String(t)}function Br(e,t,r){return t=$r(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fa(Object(r),!0).forEach(function(n){Br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ka=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Mr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Do={INIT:"@@redux/INIT"+Mr(),REPLACE:"@@redux/REPLACE"+Mr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Mr()}};function fl(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function zr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Z(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Z(1));return r(zr)(e,t)}if(typeof e!="function")throw new Error(Z(2));var i=e,a=t,c=[],s=c,d=!1;function p(){s===c&&(s=c.slice())}function u(){if(d)throw new Error(Z(3));return a}function h(b){if(typeof b!="function")throw new Error(Z(4));if(d)throw new Error(Z(5));var N=!0;return p(),s.push(b),function(){if(N){if(d)throw new Error(Z(6));N=!1,p();var w=s.indexOf(b);s.splice(w,1),c=null}}}function m(b){if(!fl(b))throw new Error(Z(7));if(typeof b.type>"u")throw new Error(Z(8));if(d)throw new Error(Z(9));try{d=!0,a=i(a,b)}finally{d=!1}for(var N=c=s,C=0;C<N.length;C++){var w=N[C];w()}return b}function g(b){if(typeof b!="function")throw new Error(Z(10));i=b,m({type:Do.REPLACE})}function y(){var b,N=h;return b={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(Z(11));function A(){w.next&&w.next(u())}A();var I=N(A);return{unsubscribe:I}}},b[Ka]=function(){return this},b}return m({type:Do.INIT}),n={dispatch:m,subscribe:h,getState:u,replaceReducer:g},n[Ka]=y,n}function dl(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Do.INIT});if(typeof n>"u")throw new Error(Z(12));if(typeof r(void 0,{type:Do.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Z(13))})}function Za(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),c,s;try{dl(r)}catch(d){s=d}return function(p,u){if(p===void 0&&(p={}),s)throw s;if(0)var h;for(var m=!1,g={},y=0;y<a.length;y++){var b=a[y],N=r[b],C=p[b],w=N(C,u);if(typeof w>"u"){var A=u&&u.type;throw new Error(Z(14))}g[b]=w,m=m||w!==C}return m=m||a.length!==Object.keys(p).length,m?g:p}}function Lt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Va(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Z(15))},c={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},s=t.map(function(d){return d(c)});return a=Lt.apply(void 0,s)(i.dispatch),Wo(Wo({},i),{},{dispatch:a})}}}function Ya(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(c){return function(s){return typeof s=="function"?s(i,a,e):c(s)}}};return t}var qa=Ya();qa.withExtraArgument=Ya;var Ur=qa;var tc=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pl=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,c;return c={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function s(p){return function(u){return d([p,u])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(u){p=[6,u],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},It=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},ul=Object.defineProperty,hl=Object.defineProperties,ml=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertySymbols,yl=Object.prototype.hasOwnProperty,gl=Object.prototype.propertyIsEnumerable,Ja=function(e,t,r){return t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Ve=function(e,t){for(var r in t||(t={}))yl.call(t,r)&&Ja(e,r,t[r]);if(Xa)for(var n=0,i=Xa(t);n<i.length;n++){var r=i[n];gl.call(t,r)&&Ja(e,r,t[r])}return e},Hr=function(e,t){return hl(e,ml(t))},bl=function(e,t,r){return new Promise(function(n,i){var a=function(d){try{s(r.next(d))}catch(p){i(p)}},c=function(d){try{s(r.throw(d))}catch(p){i(p)}},s=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,c)};s((r=r.apply(e,t)).next())})};var xl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lt:Lt.apply(null,arguments)},$m=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function vl(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Sl=function(e){tc(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,It([void 0],r[0].concat(this)))):new(t.bind.apply(t,It([void 0],r.concat(this))))},t}(Array),Ol=function(e){tc(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,It([void 0],r[0].concat(this)))):new(t.bind.apply(t,It([void 0],r.concat(this))))},t}(Array);function Fr(e){return be(e)?_o(e,function(){}):e}function Cl(e){return typeof e=="boolean"}function wl(){return function(t){return El(t)}}function El(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,c=a===void 0?!0:a,s=new Sl;if(r&&(Cl(r)?s.push(Ur):s.push(Ur.withExtraArgument(r.extraArgument))),0){if(i)var d;if(c)var p}return s}var Gr=!0;function oc(e){var t=wl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,c=a===void 0?t():a,s=r.devTools,d=s===void 0?!0:s,p=r.preloadedState,u=p===void 0?void 0:p,h=r.enhancers,m=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(vl(i))g=Za(i);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 y=c;if(typeof y=="function"&&(y=y(t),!Gr&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gr&&y.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var b=Va.apply(void 0,y),N=Lt;d&&(N=xl(Ve({trace:!Gr},typeof d=="object"&&d)));var C=new Ol(b),w=C;Array.isArray(m)?w=It([b],m):typeof m=="function"&&(w=m(C));var A=N.apply(void 0,w);return zr(g,u,A)}function Ye(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Ve(Ve({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function rc(e){var t={},r=[],n,i={addCase:function(a,c){var s=typeof a=="string"?a:a.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=c,i},addMatcher:function(a,c){return r.push({matcher:a,reducer:c}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function Nl(e){return typeof e=="function"}function Al(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?rc(t):[t,r,n],a=i[0],c=i[1],s=i[2],d;if(Nl(e))d=function(){return Fr(e())};else{var p=Fr(e);d=function(){return p}}function u(h,m){h===void 0&&(h=d());var g=It([a[m.type]],c.filter(function(y){var b=y.matcher;return b(m)}).map(function(y){var b=y.reducer;return b}));return g.filter(function(y){return!!y}).length===0&&(g=[s]),g.reduce(function(y,b){if(b)if(ke(y)){var N=y,C=b(N,m);return C===void 0?y:C}else{if(be(y))return _o(y,function(w){return b(w,m)});var C=b(y,m);if(C===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return C}return y},h)}return u.getInitialState=d,u}function Rl(e,t){return e+"/"+t}function nc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Fr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},c={},s={};i.forEach(function(u){var h=n[u],m=Rl(t,u),g,y;"reducer"in h?(g=h.reducer,y=h.prepare):g=h,a[u]=g,c[m]=g,s[u]=y?Ye(m,y):Ye(m)});function d(){var u=typeof e.extraReducers=="function"?rc(e.extraReducers):[e.extraReducers],h=u[0],m=h===void 0?{}:h,g=u[1],y=g===void 0?[]:g,b=u[2],N=b===void 0?void 0:b,C=Ve(Ve({},m),c);return Al(r,function(w){for(var A in C)w.addCase(A,C[A]);for(var I=0,_=y;I<_.length;I++){var ae=_[I];w.addMatcher(ae.matcher,ae.reducer)}N&&w.addDefaultCase(N)})}var p;return{name:t,reducer:function(u,h){return p||(p=d()),p(u,h)},actions:s,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Pl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ll=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Pl[Math.random()*64|0];return t},Il=["name","message","stack","code"],jr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Qa=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Tl=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Il;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},Um=function(){function e(t,r,n){var i=Ye(t+"/fulfilled",function(u,h,m,g){return{payload:u,meta:Hr(Ve({},g||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=Ye(t+"/pending",function(u,h,m){return{payload:void 0,meta:Hr(Ve({},m||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),c=Ye(t+"/rejected",function(u,h,m,g,y){return{payload:g,error:(n&&n.serializeError||Tl)(u||"Rejected"),meta:Hr(Ve({},y||{}),{arg:m,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),s=!1,d=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 p(u){return function(h,m,g){var y=n?.idGenerator?n.idGenerator(u):Ll(),b=new d,N,C=!1;function w(I){N=I,b.abort()}var A=function(){return bl(this,null,function(){var I,_,ae,_e,Yo,We,te;return pl(this,function(ce){switch(ce.label){case 0:return ce.trys.push([0,4,,5]),_e=(I=n?.condition)==null?void 0:I.call(n,u,{getState:m,extra:g}),_l(_e)?[4,_e]:[3,2];case 1:_e=ce.sent(),ce.label=2;case 2:if(_e===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,Yo=new Promise(function(oe,qe){return b.signal.addEventListener("abort",function(){return qe({name:"AbortError",message:N||"Aborted"})})}),h(a(y,u,(_=n?.getPendingMeta)==null?void 0:_.call(n,{requestId:y,arg:u},{getState:m,extra:g}))),[4,Promise.race([Yo,Promise.resolve(r(u,{dispatch:h,getState:m,extra:g,requestId:y,signal:b.signal,abort:w,rejectWithValue:function(oe,qe){return new jr(oe,qe)},fulfillWithValue:function(oe,qe){return new Qa(oe,qe)}})).then(function(oe){if(oe instanceof jr)throw oe;return oe instanceof Qa?i(oe.payload,y,u,oe.meta):i(oe,y,u)})])];case 3:return ae=ce.sent(),[3,5];case 4:return We=ce.sent(),ae=We instanceof jr?c(null,y,u,We.payload,We.meta):c(We,y,u),[3,5];case 5:return te=n&&!n.dispatchConditionRejection&&c.match(ae)&&ae.meta.condition,te||h(ae),[2,ae]}})})}();return Object.assign(A,{abort:w,requestId:y,arg:u,unwrap:function(){return A.then(kl)}})}}return Object.assign(p,{pending:a,rejected:c,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function kl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _l(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ic="listener",ac="completed",cc="cancelled",Hm="task-"+cc,Gm="task-"+ac,jm=ic+"-"+cc,Fm=ic+"-"+ac;var Kr="listenerMiddleware";var Km=Ye(Kr+"/add"),Zm=Ye(Kr+"/removeAll"),Vm=Ye(Kr+"/remove");var ec,Ym=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ec||(ec=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wl=function(e){return function(t){setTimeout(t,e)}},qm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wl(10);Ha();window.ftReduxStores||(window.ftReduxStores={});var lc=class e{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(Yt(a))return a;if(i==null)return;let c=nc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),s=oc({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[i.name]=new e(c,s)}constructor(t,r){this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Eo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let c=i,s=n[c];return s?(...d)=>{let p=s(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var zo=v(L());var $o=class extends Ue{async listMySearches(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Bo=class extends Ue{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var $l="ft-user-assets",Mo=zo.FtReduxStore.get({name:$l,initialState:{savedSearches:void 0,bookmarks:void 0}}),Zr=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bo,this.savedSearchesService=new $o,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=P.getState();(0,zo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Mo.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mo.actions.bookmarks(r)}}},Ey=new Zr;var Vr=class{addCommand(t,r=!1){P.commands.add(t,r)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Vr;var sc=v(L()),Yr=class{highlightHtml(t,r,n){(0,sc.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Yr;var fc=v(L());var qr=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(s=>s.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return fc.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new qr;(0,dc.customElement)("ft-app-context")(M);var pc=v(K()),Bl=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Xr=Symbol("i18nAttributes"),Uo=Symbol("i18nProperties"),eo=Symbol("i18nUnsubs");function uc(e){var t;class r extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?xa:Nt}i18n(i,a,...c){var s;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...c);let d=(s=i.args)!==null&&s!==void 0?s:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...d)}onI18nUpdate(i){var a,c;(a=this[Xr])===null||a===void 0||a.forEach((s,d)=>{var p;let u=this.getI18nAttributeValue(d);((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(d,u,s)}),(c=this[Uo])===null||c===void 0||c.forEach((s,d)=>{s.context.toLowerCase()===i.toLowerCase()&&(this[d]=this.i18n(s))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,c){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...c})}}update(i){var a,c;super.update(i),(a=this[Xr])===null||a===void 0||a.forEach((s,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(i.has(d)||s.argsProvider!=null)&&(i.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,s))}),(c=this[Uo])===null||c===void 0||c.forEach((s,d)=>{s.argsProvider!=null&&(this[d]=this.i18n(s))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,c,s;super.connectedCallback(),new Set([...(a=(i=this[Uo])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(s=(c=this[Xr])===null||c===void 0?void 0:c.keys())!==null&&s!==void 0?s:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(i,a){i=i.toLowerCase(),this[eo].has(i)||this[eo].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[eo].forEach(i=>i()),this[eo].clear()}}return t=eo,Bl([(0,pc.property)({type:Boolean})],r.prototype,"useCustomMessageContexts",void 0),r}var Ho=class extends uc(jo.FtLitElement){},Go=class extends uc(jo.FtLitElementRedux){};var to=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(c=e[s])&&(a=(i<3?c(a):i>3?c(t,r,a):c(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},xe=class extends Go{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Fo.nothing:Fo.html`
869
869
  <span class="ft-i18n">
870
870
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
871
871
  </span>