@fluid-topics/ft-search-result-missing-terms 1.2.24 → 1.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`;var Pt=E(U());var rn=E(U());var uo=E(Y()),G=E(K()),X=E(U());var io=E(Y());var co=io.css`
|
|
8
8
|
`;var lt=E(U()),Ka="ft-app-info",Yt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Va={session:(r,t)=>{(0,lt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.dispatchEvent(new Yt(t.payload)),0))}},w=lt.FtReduxStore.get({name:Ka,reducers:Va,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ie=E(U());var Xt=E(U());var ve=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=w.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var te=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Xt.CacheRegistry,this.cache=t?i.commonCache:new Xt.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ve.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ve.await()}clearCache(){this.cache.clearAll()}};var so,Za=Symbol("clearAfterUnitTest"),dt=class extends te{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[so]=()=>{this.defaultMessages={},this.cache=new ie.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ie.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let c=t.toLowerCase(),l=this.resolveContext(c);return new ie.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ie.delay)(0).then(()=>o()).catch(()=>null)))}};so=Za;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends dt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends dt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Se=window.FluidTopicsI18nService,lo=window.FluidTopicsCustomI18nService;var z=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},_=class extends X.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=()=>ve.get(),this.messageContexts=[],this.cache=new X.CacheRegistry,this.cleanSessionDebouncer=new X.Debouncer}render(){return uo.html`
|
|
9
9
|
<slot></slot>
|
|
10
|
-
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Se.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};_.elementDefinitions={};_.styles=co;z([(0,G.property)()],_.prototype,"baseUrl",void 0);z([(0,G.property)()],_.prototype,"apiIntegrationIdentifier",void 0);z([(0,G.property)()],_.prototype,"uiLocale",void 0);z([(0,X.jsonProperty)(null)],_.prototype,"availableUiLocales",void 0);z([(0,X.jsonProperty)(null)],_.prototype,"metadataConfiguration",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"editorMode",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"noCustom",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"openExternalDocumentInNewTab",void 0);z([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],_.prototype,"noCustomComponent",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"withManualResources",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"navigatorOnline",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"forcedOffline",void 0);z([(0,G.property)({type:Object})],_.prototype,"apiProvider",void 0);z([(0,X.jsonProperty)([])],_.prototype,"messageContexts",void 0);z([(0,X.jsonProperty)(void 0)],_.prototype,"session",void 0);z([(0,G.state)()],_.prototype,"localesConfiguration",void 0);var _i=E(K());function qa(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!ut(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!ut(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(i=Object.keys(r),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var c=i[n];if(!ut(r[c],t[c]))return!1}return!0}return r!==r&&t!==t}function ut(r,t){try{return qa(r,t)}catch{return!1}}function pt(r,t){return!ut(r,t)}var Ya=E(K(),1);var ft=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Ze=E(K(),1);var po=E(K(),1);function fo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,po.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:pt,...t??{}})}var ht=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var yo=E(Y(),1);var yt=window,Xa=yt.ShadowRoot&&(yt.ShadyCSS===void 0||yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tc=Symbol();var ho=(r,t)=>{Xa?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=yt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var gt=class extends yo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ho(n,t.elementStyles),n}};var mt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},xo,go=Symbol("constructorPrototype"),mo=Symbol("constructorName"),vo=Symbol("exportpartsDebouncer"),bo=Symbol("dynamicDependenciesLoaded"),ce=class extends gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[xo]=new ht(5),this[mo]=this.constructor.name,this[go]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[mo]&&Object.setPrototypeOf(this,this[go])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[bo]||(t[bo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[vo].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};xo=vo;mt([(0,Ze.property)()],ce.prototype,"exportpartsPrefix",void 0);mt([fo([])],ce.prototype,"exportpartsPrefixes",void 0);mt([(0,Ze.property)()],ce.prototype,"customStylesheet",void 0);mt([(0,Ze.state)()],ce.prototype,"useAdoptedStyleSheets",void 0);function qe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var So,Oo,Co,Ye=Symbol("internalReduxEventsUnsubscribers"),se=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores"),Xe=class extends ce{constructor(){super(...arguments),this[So]=new Map,this[Oo]=new Map,this[Co]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Oe].get(t)}addStore(t,o){var n;o=(n=o??(qe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Oe].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[se].has(t.store):this[se].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[se].set(t,o.subscribe(()=>this.updateFromStores())),this[Ye].set(t,[]),qe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[Ye].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[se].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[se].has(t)&&this[se].get(t)(),this[se].delete(t),(o=this[Ye].get(t))===null||o===void 0||o.forEach(n=>n()),this[Ye].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};So=se,Oo=Oe,Co=Ye;Xe.reduxProperties=new Map;Xe.reduxReactiveProperties=new Set;Xe.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function re(r){return!!r&&!!r[F]}function Q(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ai}(r)||Array.isArray(r)||!!r[Lo]||!!(!((t=r.constructor)===null||t===void 0)&&t[Lo])||ir(r)||cr(r))}function Ce(r,t,o){o===void 0&&(o=!1),Pe(r)===0?(o?Object.keys:Le)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Pe(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:ir(r)?2:cr(r)?3:0}function Re(r,t){return Pe(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Qa(r,t){return Pe(r)===2?r.get(t):r[t]}function Po(r,t,o){var n=Pe(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function To(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function ir(r){return oi&&r instanceof Map}function cr(r){return ni&&r instanceof Set}function le(r){return r.o||r.t}function sr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=_o(r);delete t[F];for(var o=Le(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function lr(r,t){return t===void 0&&(t=!1),dr(r)||re(r)||!Q(r)||(Pe(r)>1&&(r.set=r.add=r.clear=r.delete=Ja),Object.freeze(r),t&&Ce(r,function(o,n){return lr(n,!0)},!0)),r}function Ja(){V(2)}function dr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ee(r){var t=ar[r];return t||V(18,r),t}function ei(r,t){ar[r]||(ar[r]=t)}function rr(){return Je}function Qt(r,t){t&&(ee("Patches"),r.u=[],r.s=[],r.v=t)}function bt(r){or(r),r.p.forEach(ti),r.p=null}function or(r){r===Je&&(Je=r.l)}function Eo(r){return Je={p:[],l:Je,h:r,m:!0,_:0}}function ti(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function Jt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ee("ES5").S(t,r,n),n?(o[F].P&&(bt(t),V(4)),Q(r)&&(r=xt(t,r),t.l||vt(t,r)),t.u&&ee("Patches").M(o[F].t,r,t.u,t.s)):r=xt(t,o,[]),bt(t),t.u&&t.v(t.u,t.s),r!==ko?r:void 0}function xt(r,t,o){if(dr(t))return t;var n=t[F];if(!n)return Ce(t,function(d,p){return wo(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return vt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=sr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ce(c,function(d,p){return wo(r,n,i,d,p,o,l)}),vt(r,i,!1),o&&r.u&&ee("Patches").N(n,o,r.u,r.s)}return n.o}function wo(r,t,o,n,i,c,l){if(re(i)){var d=xt(r,i,c&&t&&t.i!==3&&!Re(t.R,n)?c.concat(n):void 0);if(Po(o,n,d),!re(d))return;r.m=!1}else l&&o.add(i);if(Q(i)&&!dr(i)){if(!r.h.D&&r._<1)return;xt(r,i),t&&t.A.l||vt(r,i)}}function vt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&lr(t,o)}function er(r,t){var o=r[F];return(o?le(o):r)[t]}function Ao(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function de(r){r.P||(r.P=!0,r.l&&de(r.l))}function tr(r){r.o||(r.o=sr(r.t))}function nr(r,t,o){var n=ir(t)?ee("MapSet").F(t,o):cr(t)?ee("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:rr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=et;l&&(p=[d],u=Qe);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):ee("ES5").J(t,o);return(o?o.A:rr()).p.push(n),n}function ri(r){return re(r)||V(22,r),function t(o){if(!Q(o))return o;var n,i=o[F],c=Pe(o);if(i){if(!i.P&&(i.i<4||!ee("ES5").K(i)))return i.t;i.I=!0,n=No(o,c),i.I=!1}else n=No(o,c);return Ce(n,function(l,d){i&&Qa(i.t,l)===d||Po(n,l,t(d))}),c===3?new Set(n):n}(r)}function No(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return sr(r)}function Fo(){function r(l,d){var p=c[l];return p?p.enumerable=d:c[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return et.get(u,l)},set:function(u){var y=this[F];et.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&de(p);break;case 4:o(p)&&de(p)}}}function o(l){for(var d=l.t,p=l.k,u=Le(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!Re(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!To(v,m))return!0}}var S=!!d[F];return u.length!==Le(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(le(l)))}var c={};ei("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=_o(m);delete S[F];for(var R=Le(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:rr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?re(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ce(v,function(L){L!==F&&(m[L]!==void 0||Re(m,L)?b[L]||u(v[L]):(b[L]=!0,de(h)))}),Ce(m,function(L){v[L]!==void 0||Re(v,L)||(b[L]=!1,de(h))});else if(S===5){if(n(h)&&(de(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),T=0;T<N;T++)v.hasOwnProperty(T)||(b[T]=!0),b[T]===void 0&&u(v[T])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Io,Je,ur=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",oi=typeof Map<"u",ni=typeof Set<"u",Ro=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ko=ur?Symbol.for("immer-nothing"):((Io={})["immer-nothing"]=!0,Io),Lo=ur?Symbol.for("immer-draftable"):"__$immer_draftable",F=ur?Symbol.for("immer-state"):"__$immer_state";var ai=""+Object.prototype.constructor,Le=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,_o=Object.getOwnPropertyDescriptors||function(r){var t={};return Le(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},ar={},et={get:function(r,t){if(t===F)return r;var o=le(r);if(!Re(o,t))return function(i,c,l){var d,p=Ao(c,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!Q(n)?n:n===er(r.t,t)?(tr(r),r.o[t]=nr(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=Ao(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=er(le(r),t),c=i?.[F];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(To(o,i)&&(o!==void 0||Re(r.t,t)))return!0;tr(r),de(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return er(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,tr(r),de(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},Qe={};Ce(et,function(r,t){Qe[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qe.deleteProperty=function(r,t){return Qe.set.call(this,r,t,void 0)},Qe.set=function(r,t,o){return et.set.call(this,r[0],t,o,r[0])};var ii=function(){function r(o){var n=this;this.O=Ro,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),T=1;T<A;T++)N[T-1]=arguments[T];return p.produce(S,function(L){var M;return(M=c).call.apply(M,[R,L].concat(N))})}}var u;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),Q(i)){var y=Eo(n),h=nr(n,i,void 0),m=!0;try{u=c(h),m=!1}finally{m?bt(y):or(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qt(y,l),Jt(S,y)},function(S){throw bt(y),S}):(Qt(y,l),Jt(u,y))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===ko&&(u=void 0),n.D&&lr(u,!0),l){var v=[],b=[];ee("Patches").M(i,u,v,b),l(v,b)}return u}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,c,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Q(o)||V(8),re(o)&&(o=ri(o));var n=Eo(this),i=nr(this,o,void 0);return i[F].C=!0,or(n),i},t.finishDraft=function(o,n){var i=o&&o[F],c=i.A;return Qt(c,n),Jt(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Ro&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=ee("Patches").$;return re(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),j=new ii,ci=j.produce,Gc=j.produceWithPatches.bind(j),jc=j.setAutoFreeze.bind(j),Kc=j.setUseProxies.bind(j),Vc=j.applyPatches.bind(j),Zc=j.createDraft.bind(j),qc=j.finishDraft.bind(j),St=ci;function ue(r){"@babel/helpers - typeof";return ue=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},ue(r)}function pr(r,t){if(ue(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(ue(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function fr(r){var t=pr(r,"string");return ue(t)==="symbol"?t:String(t)}function hr(r,t,o){return t=fr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Uo(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ot(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Uo(Object(o),!0).forEach(function(n){hr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Uo(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function H(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Do=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),yr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ct={INIT:"@@redux/INIT"+yr(),REPLACE:"@@redux/REPLACE"+yr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yr()}};function si(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function gr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(H(1));return o(gr)(r,t)}if(typeof r!="function")throw new Error(H(2));var i=r,c=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(H(3));return c}function h(S){if(typeof S!="function")throw new Error(H(4));if(p)throw new Error(H(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error(H(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!si(S))throw new Error(H(7));if(typeof S.type>"u")throw new Error(H(8));if(p)throw new Error(H(9));try{p=!0,c=i(c,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(H(10));i=S,m({type:Ct.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(H(11));function T(){N.next&&N.next(y())}T();var L=R(T);return{unsubscribe:L}}},S[Do]=function(){return this},S}return m({type:Ct.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[Do]=b,n}function li(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Ct.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof o(void 0,{type:Ct.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function Bo(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{li(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var T=y&&y.type;throw new Error(H(14))}v[S]=N,m=m||N!==A}return m=m||c.length!==Object.keys(u).length,m?v:u}}function Te(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Mo(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(H(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return c=Te.apply(void 0,d)(i.dispatch),Ot(Ot({},i),{},{dispatch:c})}}}function Wo(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var zo=Wo();zo.withExtraArgument=Wo;var mr=zo;var Ko=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),di=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Fe=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ui=Object.defineProperty,pi=Object.defineProperties,fi=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable,$o=function(r,t,o){return t in r?ui(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))hi.call(t,o)&&$o(r,o,t[o]);if(Ho)for(var n=0,i=Ho(t);n<i.length;n++){var o=i[n];yi.call(t,o)&&$o(r,o,t[o])}return r},br=function(r,t){return pi(r,fi(t))},gi=function(r,t,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,l)};d((o=o.apply(r,t)).next())})};var mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Te:Te.apply(null,arguments)},fs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var xi=function(r){Ko(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Fe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Fe([void 0],o.concat(this))))},t}(Array),vi=function(r){Ko(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Fe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Fe([void 0],o.concat(this))))},t}(Array);function Sr(r){return Q(r)?St(r,function(){}):r}function Si(r){return typeof r=="boolean"}function Oi(){return function(t){return Ci(t)}}function Ci(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new xi;if(o&&(Si(o)?d.push(mr):d.push(mr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var xr=!0;function Vo(r){var t=Oi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(bi(i))v=Bo(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 b=l;if(typeof b=="function"&&(b=b(t),!xr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Mo.apply(void 0,b),R=Te;p&&(R=mi(pe({trace:!xr},typeof p=="object"&&p)));var A=new vi(S),N=A;Array.isArray(m)?N=Fe([S],m):typeof m=="function"&&(N=m(A));var T=R.apply(void 0,N);return gr(v,y,T)}function fe(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Zo(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Ei(r){return typeof r=="function"}function wi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Zo(t):[t,o,n],c=i[0],l=i[1],d=i[2],p;if(Ei(r))p=function(){return Sr(r())};else{var u=Sr(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=Fe([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(re(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(Q(b))return St(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function Ai(r,t){return r+"/"+t}function qo(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Sr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],m=Ai(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[m]=v,d[y]=b?fe(m,b):fe(m)});function p(){var y=typeof r.extraReducers=="function"?Zo(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=pe(pe({},m),l);return wi(o,function(N){for(var T in A)N.addCase(T,A[T]);for(var L=0,M=b;L<M.length;L++){var q=M[L];N.addMatcher(q.matcher,q.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Ni="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ii=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ni[Math.random()*64|0];return t},Ri=["name","message","stack","code"],vr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Go=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Li=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ri;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},ms=function(){function r(t,o,n){var i=fe(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:br(pe({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),c=fe(t+"/pending",function(y,h,m){return{payload:void 0,meta:br(pe({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=fe(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||Li)(y||"Rejected"),meta:br(pe({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):Ii(),S=new p,R,A=!1;function N(L){R=L,S.abort()}var T=function(){return gi(this,null,function(){var L,M,q,me,$,be,Ie;return di(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),me=(L=n?.condition)==null?void 0:L.call(n,y,{getState:m,extra:v}),Ti(me)?[4,me]:[3,2];case 1:me=f.sent(),f.label=2;case 2:if(me===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,$=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:R||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([$,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,C){return new vr(g,C)},fulfillWithValue:function(g,C){return new Go(g,C)}})).then(function(g){if(g instanceof vr)throw g;return g instanceof Go?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return q=f.sent(),[3,5];case 4:return be=f.sent(),q=be instanceof vr?l(null,b,y,be.payload,be.meta):l(be,b,y),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(q)&&q.meta.condition,Ie||h(q),[2,q]}})})}();return Object.assign(T,{abort:N,requestId:b,arg:y,unwrap:function(){return T.then(Pi)}})}}return Object.assign(u,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Pi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ti(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Yo="listener",Xo="completed",Qo="cancelled",bs="task-"+Qo,xs="task-"+Xo,vs=Yo+"-"+Qo,Ss=Yo+"-"+Xo;var Or="listenerMiddleware";var Os=fe(Or+"/add"),Cs=fe(Or+"/removeAll"),Es=fe(Or+"/remove");var jo,ws=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(jo||(jo=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Fi=function(r){return function(t){setTimeout(t,r)}},As=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fi(10);Fo();function ki(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Et=class extends ki(Object){};window.ftReduxStores||(window.ftReduxStores={});var Jo=class r extends Et{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(qe(c))return c;if(i==null)return;let l=qo({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Vo({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new ft;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let d=c,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}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 It=E(U());var wt=class extends te{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var At=class extends te{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ui="ft-user-assets",Nt=It.FtReduxStore.get({name:Ui,initialState:{savedSearches:void 0,bookmarks:void 0}}),Cr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new At,this.savedSearchesService=new wt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,It.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Nt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Nt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Nt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Nt.actions.bookmarks(o)}}},cl=new Cr;var Er=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Er;var en=E(U()),wr=class{highlightHtml(t,o,n){(0,en.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new wr;var tn=E(U());var Ar=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return tn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new Ar;var Di=E(U());(0,rn.customElement)("ft-app-context")(_);var nn=E(K()),Bi=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Nr=Symbol("i18nAttributes"),Ir=Symbol("i18nListAttributes"),Rt=Symbol("i18nProperties"),Rr=Symbol("i18nManualContexts"),tt=Symbol("i18nUnsubs");function Tt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?lo:Se}i18n(c,l,...d){var p;if(typeof c=="string")return this.i18nService.resolveMessage(c,l,...d);let u=(p=c.args)!==null&&p!==void 0?p:c.argsProvider?c.argsProvider(this):[];return this.i18nService.resolveMessage(c.context,c.key,...u)}onI18nUpdate(c){var l,d,p;(l=this[Nr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,u,c))}),(d=this[Ir])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,u,c))}),(p=this[Rt])===null||p===void 0||p.forEach((u,y)=>{u.context.toLowerCase()===c.toLowerCase()&&(this[y]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(c,l){return{...c,message:this.i18n({context:c.context,key:c.key,...l})}}getI18nAttributeMessage(c,l,d){var p;let u=!d||((p=c.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return c.context&&c.key&&u?this.buildI18nAttributeMessage(c,l):c}update(c){var l,d,p;super.update(c),(l=this[Nr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(c.has(y)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,c,y),this[y]=this.getI18nAttributeMessage(h,u))}),(d=this[Ir])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);(c.has(y)||u.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,c,y),this.getI18nAttributeMessage(m,u))))}),(p=this[Rt])===null||p===void 0||p.forEach((u,y)=>{u.argsProvider!=null&&(this[y]=this.i18n(u))})}getI18nAttributeValue(c){return this[c]}getI18nListAttributeValues(c){return this[c]}addI18nContextIfNeeded(c,l,d){c.context&&c.key&&l.has(d)&&this.addI18nContext(c.context)}addI18nMessagesAndSubscribe(c,l){c=c.toLowerCase(),this[tt].has(c)||this[tt].set(c,this.i18nService.subscribe(c,()=>this.onI18nUpdate(c))),this.i18nService.prepareContext(c,l??{}),this.onI18nUpdate(c)}connectedCallback(){var c,l,d,p,u,y;super.connectedCallback(),new Set([...(l=(c=this[Rt])===null||c===void 0?void 0:c.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[Nr])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(u=this[Ir])===null||u===void 0?void 0:u.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[Rr].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(c,l){this[Rr].set(c,l??{}),this.addI18nMessagesAndSubscribe(c,l)}addI18nContext(c,l){this.addI18nMessages(typeof c=="string"?c:c.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[tt].forEach(c=>c()),this[tt].clear()}}return t=Rr,o=tt,Bi([(0,nn.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var on=class extends Tt(Pt.FtLitElement){},Lt=class extends Tt(Pt.FtLitElementRedux){};var rt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends Lt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Ft.nothing:Ft.html`
|
|
10
|
+
`}update(t){var o,n,i,c,l;super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>Se.addContext(d)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(w.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),w.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),w.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};_.elementDefinitions={};_.styles=co;z([(0,G.property)()],_.prototype,"baseUrl",void 0);z([(0,G.property)()],_.prototype,"apiIntegrationIdentifier",void 0);z([(0,G.property)()],_.prototype,"uiLocale",void 0);z([(0,X.jsonProperty)(null)],_.prototype,"availableUiLocales",void 0);z([(0,X.jsonProperty)(null)],_.prototype,"metadataConfiguration",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"editorMode",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"noCustom",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"openExternalDocumentInNewTab",void 0);z([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],_.prototype,"noCustomComponent",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"withManualResources",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"navigatorOnline",void 0);z([(0,G.property)({type:Boolean})],_.prototype,"forcedOffline",void 0);z([(0,G.property)({type:Object})],_.prototype,"apiProvider",void 0);z([(0,X.jsonProperty)([])],_.prototype,"messageContexts",void 0);z([(0,X.jsonProperty)(void 0)],_.prototype,"session",void 0);z([(0,G.state)()],_.prototype,"localesConfiguration",void 0);var _i=E(K());function qa(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!ut(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!ut(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!ut(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function ut(r,t){try{return qa(r,t)}catch{return!1}}function pt(r,t){return!ut(r,t)}var Ya=E(K(),1);var ft=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Ze=E(K(),1);var po=E(K(),1);function fo(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,po.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:pt,...t??{}})}var ht=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var yo=E(Y(),1);var yt=window,Xa=yt.ShadowRoot&&(yt.ShadyCSS===void 0||yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tc=Symbol();var ho=(r,t)=>{Xa?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=yt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)})};var gt=class extends yo.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ho(n,t.elementStyles),n}};var mt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},xo,go=Symbol("constructorPrototype"),mo=Symbol("constructorName"),vo=Symbol("exportpartsDebouncer"),bo=Symbol("dynamicDependenciesLoaded"),ce=class extends gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[xo]=new ht(5),this[mo]=this.constructor.name,this[go]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[mo]&&Object.setPrototypeOf(this,this[go])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[bo]||(t[bo]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[vo].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let p=m=>m!=null&&m.trim().length>0,u=t.filter(p).map(m=>m.trim());if(u.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(p).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>u.map(v=>`${m}:${v}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};xo=vo;mt([(0,Ze.property)()],ce.prototype,"exportpartsPrefix",void 0);mt([fo([])],ce.prototype,"exportpartsPrefixes",void 0);mt([(0,Ze.property)()],ce.prototype,"customStylesheet",void 0);mt([(0,Ze.state)()],ce.prototype,"useAdoptedStyleSheets",void 0);function qe(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var So,Oo,Co,Ye=Symbol("internalReduxEventsUnsubscribers"),se=Symbol("internalStoresUnsubscribers"),Oe=Symbol("internalStores"),Xe=class extends ce{constructor(){super(...arguments),this[So]=new Map,this[Oo]=new Map,this[Co]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Oe].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Oe].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Oe].get(t)}addStore(t,o){var n;o=(n=o??(qe(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Oe].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Oe].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Oe].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[se].has(t.store):this[se].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[se].set(t,o.subscribe(()=>this.updateFromStores())),this[Ye].set(t,[]),qe(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,c)=>{if(typeof this[c]=="function"&&(!i.store||o.name===i.store)){let l=d=>this[c](d);o.addEventListener(i.eventName,l),this[Ye].get(t).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[se].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[se].has(t)&&this[se].get(t)(),this[se].delete(t),(o=this[Ye].get(t))===null||o===void 0||o.forEach(n=>n()),this[Ye].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};So=se,Oo=Oe,Co=Ye;Xe.reduxProperties=new Map;Xe.reduxReactiveProperties=new Set;Xe.reduxEventListeners=new Map;function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function re(r){return!!r&&!!r[F]}function Q(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ai}(r)||Array.isArray(r)||!!r[Lo]||!!(!((t=r.constructor)===null||t===void 0)&&t[Lo])||ir(r)||cr(r))}function Ce(r,t,o){o===void 0&&(o=!1),Pe(r)===0?(o?Object.keys:Le)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Pe(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:ir(r)?2:cr(r)?3:0}function Re(r,t){return Pe(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Qa(r,t){return Pe(r)===2?r.get(t):r[t]}function Po(r,t,o){var n=Pe(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function To(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function ir(r){return oi&&r instanceof Map}function cr(r){return ni&&r instanceof Set}function le(r){return r.o||r.t}function sr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=_o(r);delete t[F];for(var o=Le(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function lr(r,t){return t===void 0&&(t=!1),dr(r)||re(r)||!Q(r)||(Pe(r)>1&&(r.set=r.add=r.clear=r.delete=Ja),Object.freeze(r),t&&Ce(r,function(o,n){return lr(n,!0)},!0)),r}function Ja(){V(2)}function dr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ee(r){var t=ar[r];return t||V(18,r),t}function ei(r,t){ar[r]||(ar[r]=t)}function rr(){return Je}function Qt(r,t){t&&(ee("Patches"),r.u=[],r.s=[],r.v=t)}function bt(r){or(r),r.p.forEach(ti),r.p=null}function or(r){r===Je&&(Je=r.l)}function Eo(r){return Je={p:[],l:Je,h:r,m:!0,_:0}}function ti(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function Jt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ee("ES5").S(t,r,n),n?(o[F].P&&(bt(t),V(4)),Q(r)&&(r=xt(t,r),t.l||vt(t,r)),t.u&&ee("Patches").M(o[F].t,r,t.u,t.s)):r=xt(t,o,[]),bt(t),t.u&&t.v(t.u,t.s),r!==ko?r:void 0}function xt(r,t,o){if(dr(t))return t;var n=t[F];if(!n)return Ce(t,function(d,p){return wo(r,n,t,d,p,o)},!0),t;if(n.A!==r)return t;if(!n.P)return vt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=sr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ce(c,function(d,p){return wo(r,n,i,d,p,o,l)}),vt(r,i,!1),o&&r.u&&ee("Patches").N(n,o,r.u,r.s)}return n.o}function wo(r,t,o,n,i,c,l){if(re(i)){var d=xt(r,i,c&&t&&t.i!==3&&!Re(t.R,n)?c.concat(n):void 0);if(Po(o,n,d),!re(d))return;r.m=!1}else l&&o.add(i);if(Q(i)&&!dr(i)){if(!r.h.D&&r._<1)return;xt(r,i),t&&t.A.l||vt(r,i)}}function vt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&lr(t,o)}function er(r,t){var o=r[F];return(o?le(o):r)[t]}function Ao(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function de(r){r.P||(r.P=!0,r.l&&de(r.l))}function tr(r){r.o||(r.o=sr(r.t))}function nr(r,t,o){var n=ir(t)?ee("MapSet").F(t,o):cr(t)?ee("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:rr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},p=d,u=et;l&&(p=[d],u=Qe);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(t,o):ee("ES5").J(t,o);return(o?o.A:rr()).p.push(n),n}function ri(r){return re(r)||V(22,r),function t(o){if(!Q(o))return o;var n,i=o[F],c=Pe(o);if(i){if(!i.P&&(i.i<4||!ee("ES5").K(i)))return i.t;i.I=!0,n=No(o,c),i.I=!1}else n=No(o,c);return Ce(n,function(l,d){i&&Qa(i.t,l)===d||Po(n,l,t(d))}),c===3?new Set(n):n}(r)}function No(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return sr(r)}function Fo(){function r(l,d){var p=c[l];return p?p.enumerable=d:c[l]=p={configurable:!0,enumerable:d,get:function(){var u=this[F];return et.get(u,l)},set:function(u){var y=this[F];et.set(y,l,u)}},p}function t(l){for(var d=l.length-1;d>=0;d--){var p=l[d][F];if(!p.P)switch(p.i){case 5:n(p)&&de(p);break;case 4:o(p)&&de(p)}}}function o(l){for(var d=l.t,p=l.k,u=Le(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==F){var m=d[h];if(m===void 0&&!Re(d,h))return!0;var v=p[h],b=v&&v[F];if(b?b.t!==m:!To(v,m))return!0}}var S=!!d[F];return u.length!==Le(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var u=0;u<d.length;u++)if(!d.hasOwnProperty(u))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(le(l)))}var c={};ei("ES5",{J:function(l,d){var p=Array.isArray(l),u=function(h,m){if(h){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=_o(m);delete S[F];for(var R=Le(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,h||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),y={i:p?5:4,A:d?d.A:rr(),P:!1,I:!1,R:{},l:d,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,F,{value:y,writable:!0}),u},S:function(l,d,p){p?re(d)&&d[F].A===l&&t(l.p):(l.u&&function u(y){if(y&&typeof y=="object"){var h=y[F];if(h){var m=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Ce(v,function(L){L!==F&&(m[L]!==void 0||Re(m,L)?b[L]||u(v[L]):(b[L]=!0,de(h)))}),Ce(m,function(L){v[L]!==void 0||Re(v,L)||(b[L]=!1,de(h))});else if(S===5){if(n(h)&&(de(h),b.length=!0),v.length<m.length)for(var R=v.length;R<m.length;R++)b[R]=!1;else for(var A=m.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,m.length),T=0;T<N;T++)v.hasOwnProperty(T)||(b[T]=!0),b[T]===void 0&&u(v[T])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Io,Je,ur=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",oi=typeof Map<"u",ni=typeof Set<"u",Ro=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ko=ur?Symbol.for("immer-nothing"):((Io={})["immer-nothing"]=!0,Io),Lo=ur?Symbol.for("immer-draftable"):"__$immer_draftable",F=ur?Symbol.for("immer-state"):"__$immer_state";var ai=""+Object.prototype.constructor,Le=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,_o=Object.getOwnPropertyDescriptors||function(r){var t={};return Le(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},ar={},et={get:function(r,t){if(t===F)return r;var o=le(r);if(!Re(o,t))return function(i,c,l){var d,p=Ao(c,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!Q(n)?n:n===er(r.t,t)?(tr(r),r.o[t]=nr(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=Ao(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=er(le(r),t),c=i?.[F];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(To(o,i)&&(o!==void 0||Re(r.t,t)))return!0;tr(r),de(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return er(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,tr(r),de(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},Qe={};Ce(et,function(r,t){Qe[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qe.deleteProperty=function(r,t){return Qe.set.call(this,r,t,void 0)},Qe.set=function(r,t,o){return et.set.call(this,r[0],t,o,r[0])};var ii=function(){function r(o){var n=this;this.O=Ro,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var p=n;return function(S){var R=this;S===void 0&&(S=d);for(var A=arguments.length,N=Array(A>1?A-1:0),T=1;T<A;T++)N[T-1]=arguments[T];return p.produce(S,function(L){var M;return(M=c).call.apply(M,[R,L].concat(N))})}}var u;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),Q(i)){var y=Eo(n),h=nr(n,i,void 0),m=!0;try{u=c(h),m=!1}finally{m?bt(y):or(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qt(y,l),Jt(S,y)},function(S){throw bt(y),S}):(Qt(y,l),Jt(u,y))}if(!i||typeof i!="object"){if((u=c(i))===void 0&&(u=i),u===ko&&(u=void 0),n.D&&lr(u,!0),l){var v=[],b=[];ee("Patches").M(i,u,v,b),l(v,b)}return u}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,p=n.produce(i,c,function(u,y){l=u,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,l,d]}):[p,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Q(o)||V(8),re(o)&&(o=ri(o));var n=Eo(this),i=nr(this,o,void 0);return i[F].C=!0,or(n),i},t.finishDraft=function(o,n){var i=o&&o[F],c=i.A;return Qt(c,n),Jt(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Ro&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=ee("Patches").$;return re(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),j=new ii,ci=j.produce,Gc=j.produceWithPatches.bind(j),jc=j.setAutoFreeze.bind(j),Kc=j.setUseProxies.bind(j),Vc=j.applyPatches.bind(j),Zc=j.createDraft.bind(j),qc=j.finishDraft.bind(j),St=ci;function ue(r){"@babel/helpers - typeof";return ue=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},ue(r)}function pr(r,t){if(ue(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(ue(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function fr(r){var t=pr(r,"string");return ue(t)==="symbol"?t:String(t)}function hr(r,t,o){return t=fr(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Uo(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ot(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Uo(Object(o),!0).forEach(function(n){hr(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Uo(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function H(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Do=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),yr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ct={INIT:"@@redux/INIT"+yr(),REPLACE:"@@redux/REPLACE"+yr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+yr()}};function si(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function gr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(H(1));return o(gr)(r,t)}if(typeof r!="function")throw new Error(H(2));var i=r,c=t,l=[],d=l,p=!1;function u(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(H(3));return c}function h(S){if(typeof S!="function")throw new Error(H(4));if(p)throw new Error(H(5));var R=!0;return u(),d.push(S),function(){if(R){if(p)throw new Error(H(6));R=!1,u();var N=d.indexOf(S);d.splice(N,1),l=null}}}function m(S){if(!si(S))throw new Error(H(7));if(typeof S.type>"u")throw new Error(H(8));if(p)throw new Error(H(9));try{p=!0,c=i(c,S)}finally{p=!1}for(var R=l=d,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(H(10));i=S,m({type:Ct.REPLACE})}function b(){var S,R=h;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(H(11));function T(){N.next&&N.next(y())}T();var L=R(T);return{unsubscribe:L}}},S[Do]=function(){return this},S}return m({type:Ct.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:v},n[Do]=b,n}function li(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Ct.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof o(void 0,{type:Ct.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function Bo(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{li(o)}catch(p){d=p}return function(u,y){if(u===void 0&&(u={}),d)throw d;if(0)var h;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],R=o[S],A=u[S],N=R(A,y);if(typeof N>"u"){var T=y&&y.type;throw new Error(H(14))}v[S]=N,m=m||N!==A}return m=m||c.length!==Object.keys(u).length,m?v:u}}function Te(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Mo(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(H(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(p){return p(l)});return c=Te.apply(void 0,d)(i.dispatch),Ot(Ot({},i),{},{dispatch:c})}}}function Wo(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var zo=Wo();zo.withExtraArgument=Wo;var mr=zo;var Ko=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),di=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=u[0]&2?i.return:u[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,u[1])).done)return c;switch(i=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){o.label=u[1];break}if(u[0]===6&&o.label<c[1]){o.label=c[1],c=u;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(u);break}c[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(r,o)}catch(y){u=[6,y],i=0}finally{n=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Fe=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ui=Object.defineProperty,pi=Object.defineProperties,fi=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable,$o=function(r,t,o){return t in r?ui(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))hi.call(t,o)&&$o(r,o,t[o]);if(Ho)for(var n=0,i=Ho(t);n<i.length;n++){var o=i[n];yi.call(t,o)&&$o(r,o,t[o])}return r},br=function(r,t){return pi(r,fi(t))},gi=function(r,t,o){return new Promise(function(n,i){var c=function(p){try{d(o.next(p))}catch(u){i(u)}},l=function(p){try{d(o.throw(p))}catch(u){i(u)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(c,l)};d((o=o.apply(r,t)).next())})};var mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Te:Te.apply(null,arguments)},fs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function bi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var xi=function(r){Ko(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Fe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Fe([void 0],o.concat(this))))},t}(Array),vi=function(r){Ko(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||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 o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Fe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Fe([void 0],o.concat(this))))},t}(Array);function Sr(r){return Q(r)?St(r,function(){}):r}function Si(r){return typeof r=="boolean"}function Oi(){return function(t){return Ci(t)}}function Ci(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new xi;if(o&&(Si(o)?d.push(mr):d.push(mr.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var u}return d}var xr=!0;function Vo(r){var t=Oi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,p=d===void 0?!0:d,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if(bi(i))v=Bo(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 b=l;if(typeof b=="function"&&(b=b(t),!xr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!xr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Mo.apply(void 0,b),R=Te;p&&(R=mi(pe({trace:!xr},typeof p=="object"&&p)));var A=new vi(S),N=A;Array.isArray(m)?N=Fe([S],m):typeof m=="function"&&(N=m(A));var T=R.apply(void 0,N);return gr(v,y,T)}function fe(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Zo(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Ei(r){return typeof r=="function"}function wi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Zo(t):[t,o,n],c=i[0],l=i[1],d=i[2],p;if(Ei(r))p=function(){return Sr(r())};else{var u=Sr(r);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var v=Fe([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(re(b)){var R=b,A=S(R,m);return A===void 0?b:A}else{if(Q(b))return St(b,function(N){return S(N,m)});var A=S(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},h)}return y.getInitialState=p,y}function Ai(r,t){return r+"/"+t}function qo(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Sr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],m=Ai(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[m]=v,d[y]=b?fe(m,b):fe(m)});function p(){var y=typeof r.extraReducers=="function"?Zo(r.extraReducers):[r.extraReducers],h=y[0],m=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],R=S===void 0?void 0:S,A=pe(pe({},m),l);return wi(o,function(N){for(var T in A)N.addCase(T,A[T]);for(var L=0,M=b;L<M.length;L++){var q=M[L];N.addMatcher(q.matcher,q.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:t,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:d,caseReducers:c,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Ni="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ii=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=Ni[Math.random()*64|0];return t},Ri=["name","message","stack","code"],vr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Go=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Li=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=Ri;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},ms=function(){function r(t,o,n){var i=fe(t+"/fulfilled",function(y,h,m,v){return{payload:y,meta:br(pe({},v||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),c=fe(t+"/pending",function(y,h,m){return{payload:void 0,meta:br(pe({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=fe(t+"/rejected",function(y,h,m,v,b){return{payload:v,error:(n&&n.serializeError||Li)(y||"Rejected"),meta:br(pe({},b||{}),{arg:m,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,v){var b=n?.idGenerator?n.idGenerator(y):Ii(),S=new p,R,A=!1;function N(L){R=L,S.abort()}var T=function(){return gi(this,null,function(){var L,M,q,me,$,be,Ie;return di(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),me=(L=n?.condition)==null?void 0:L.call(n,y,{getState:m,extra:v}),Ti(me)?[4,me]:[3,2];case 1:me=f.sent(),f.label=2;case 2:if(me===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,$=new Promise(function(g,C){return S.signal.addEventListener("abort",function(){return C({name:"AbortError",message:R||"Aborted"})})}),h(c(b,y,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:b,arg:y},{getState:m,extra:v}))),[4,Promise.race([$,Promise.resolve(o(y,{dispatch:h,getState:m,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(g,C){return new vr(g,C)},fulfillWithValue:function(g,C){return new Go(g,C)}})).then(function(g){if(g instanceof vr)throw g;return g instanceof Go?i(g.payload,b,y,g.meta):i(g,b,y)})])];case 3:return q=f.sent(),[3,5];case 4:return be=f.sent(),q=be instanceof vr?l(null,b,y,be.payload,be.meta):l(be,b,y),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&l.match(q)&&q.meta.condition,Ie||h(q),[2,q]}})})}();return Object.assign(T,{abort:N,requestId:b,arg:y,unwrap:function(){return T.then(Pi)}})}}return Object.assign(u,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function Pi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ti(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Yo="listener",Xo="completed",Qo="cancelled",bs="task-"+Qo,xs="task-"+Xo,vs=Yo+"-"+Qo,Ss=Yo+"-"+Xo;var Or="listenerMiddleware";var Os=fe(Or+"/add"),Cs=fe(Or+"/removeAll"),Es=fe(Or+"/remove");var jo,ws=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(jo||(jo=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Fi=function(r){return function(t){setTimeout(t,r)}},As=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fi(10);Fo();function ki(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Et=class extends ki(Object){};window.ftReduxStores||(window.ftReduxStores={});var Jo=class r extends Et{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(qe(c))return c;if(i==null)return;let l=qo({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Vo({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[i.name]=new r(l,d)}constructor(t,o){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new ft;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,l)=>{let d=c,p=i[d];return p?(...u)=>{let y=p(...u.map(n));return this.reduxStore.dispatch(y),y}:u=>{this.setState({[d]:n(u)})}}})}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 It=E(U());var wt=class extends te{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var At=class extends te{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ui="ft-user-assets",Nt=It.FtReduxStore.get({name:Ui,initialState:{savedSearches:void 0,bookmarks:void 0}}),Cr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new At,this.savedSearchesService=new wt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,It.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Nt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Nt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Nt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Nt.actions.bookmarks(o)}}},cl=new Cr;var Er=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Er;var en=E(U()),wr=class{highlightHtml(t,o,n){(0,en.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new wr;var tn=E(U());var Ar=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return tn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new Ar;var Di=E(U());(0,rn.customElement)("ft-app-context")(_);var nn=E(K()),Bi=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Nr=Symbol("i18nAttributes"),Ir=Symbol("i18nListAttributes"),Rt=Symbol("i18nProperties"),Rr=Symbol("i18nManualContexts"),tt=Symbol("i18nUnsubs");function Tt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?lo:Se}i18n(c,l,...d){var p;if(typeof c=="string")return this.i18nService.resolveMessage(c,l,...d);let u=(p=c.args)!==null&&p!==void 0?p:c.argsProvider?c.argsProvider(this):[];return this.i18nService.resolveMessage(c.context,c.key,...u)}onI18nUpdate(c){var l,d,p;(l=this[Nr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,u,c))}),(d=this[Ir])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,u,c))}),(p=this[Rt])===null||p===void 0||p.forEach((u,y)=>{u.context.toLowerCase()===c.toLowerCase()&&(this[y]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(c,l){return{...c,message:this.i18n({context:c.context,key:c.key,...l})}}getI18nAttributeMessage(c,l,d){var p;let u=!d||((p=c.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return c.context&&c.key&&u?this.buildI18nAttributeMessage(c,l):c}update(c){var l,d,p;super.update(c),(l=this[Nr])===null||l===void 0||l.forEach((u,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(c.has(y)||u.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,c,y),this[y]=this.getI18nAttributeMessage(h,u))}),(d=this[Ir])===null||d===void 0||d.forEach((u,y)=>{let h=this.getI18nListAttributeValues(y);(c.has(y)||u.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,c,y),this.getI18nAttributeMessage(m,u))))}),(p=this[Rt])===null||p===void 0||p.forEach((u,y)=>{u.argsProvider!=null&&(this[y]=this.i18n(u))})}getI18nAttributeValue(c){return this[c]}getI18nListAttributeValues(c){return this[c]}addI18nContextIfNeeded(c,l,d){c.context&&c.key&&l.has(d)&&this.addI18nContext(c.context)}addI18nMessagesAndSubscribe(c,l){c=c.toLowerCase(),this[tt].has(c)||this[tt].set(c,this.i18nService.subscribe(c,()=>this.onI18nUpdate(c))),this.i18nService.prepareContext(c,l??{}),this.onI18nUpdate(c)}connectedCallback(){var c,l,d,p,u,y;super.connectedCallback(),new Set([...(l=(c=this[Rt])===null||c===void 0?void 0:c.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[Nr])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(u=this[Ir])===null||u===void 0?void 0:u.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[Rr].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(c,l){this[Rr].set(c,l??{}),this.addI18nMessagesAndSubscribe(c,l)}addI18nContext(c,l){this.addI18nMessages(typeof c=="string"?c:c.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[tt].forEach(c=>c()),this[tt].clear()}}return t=Rr,o=tt,Bi([(0,nn.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var on=class extends Tt(Pt.FtLitElement){},Lt=class extends Tt(Pt.FtLitElementRedux){};var rt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},J=class extends Lt{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Ft.nothing:Ft.html`
|
|
11
11
|
<span class="ft-i18n">
|
|
12
12
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
13
13
|
</span>
|