@fluid-topics/ft-confirm-button 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.
|
@@ -1127,7 +1127,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
1127
1127
|
`;var Qo=S(P());var Rc=S(P());var Wi=S(B()),dt=S(K()),Ct=S(P());var Ti=S(B());var $i=Ti.css`
|
|
1128
1128
|
`;var Po=S(P()),ml="ft-app-info",kr=class extends CustomEvent{constructor(o){super("authentication-change",{detail:o})}},gl={session:(e,o)=>{(0,Po.deepEqual)(e.session,o.payload)||(e.session=o.payload,setTimeout(()=>L.dispatchEvent(new kr(o.payload)),0))}},L=Po.FtReduxStore.get({name:ml,reducers:gl,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 Xt=S(P());var Tr=S(P());var ue=class e{static get(o){let{baseUrl:r,apiIntegrationIdentifier:n}=L.getState(),i=o??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(o){return new Promise(r=>{let n=e.get(o);if(n)r(n);else{let i=L.subscribe(()=>{n=e.get(o),n&&(i(),r(n))})}})}};var Yt=class{constructor(o=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Tr.CacheRegistry,this.cache=o?i.commonCache:new Tr.CacheRegistry}get api(){var o;return(o=this.overrideApi)!==null&&o!==void 0?o:ue.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ue.await()}clearCache(){this.cache.clearAll()}};var Bi,bl=Symbol("clearAfterUnitTest"),ko=class extends Yt{constructor(o){super(),this.messageContextProvider=o,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bi]=()=>{this.defaultMessages={},this.cache=new Xt.CacheRegistry,this.listeners={}},this.currentUiLocale=L.getState().uiLocale,L.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:o}=L.getState();this.currentUiLocale!==o&&(this.currentUiLocale=o,this.cache.clearAll(),this.notifyAll())}addContext(o){let r=o.name.toLowerCase();this.cache.setFinal(r,o),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(o,r){var n;if(o=o.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[o])!==null&&n!==void 0?n:{},...r};(0,Xt.deepEqual)(this.defaultMessages[o],i)||(this.defaultMessages[o]=i,await this.notify(o))}await this.fetchContext(o)}resolveContext(o){var r,n;return this.fetchContext(o),(n=(r=this.cache.getNow(o))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(o,r){let n=o.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(o,r,...n){var i;let a=o.toLowerCase(),l=this.resolveContext(a);return new Xt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},l).resolve(r,...n)}async fetchContext(o){if(!this.cache.has(o))try{await this.cache.get(o,()=>this.messageContextProvider(this.currentUiLocale,o)),await this.notify(o)}catch(r){console.error(r)}}subscribe(o,r){var n;return o=o.toLowerCase(),this.listeners[o]=(n=this.listeners[o])!==null&&n!==void 0?n:new Set,this.listeners[o].add(r),()=>{var i;return(i=this.listeners[o])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(o=>this.notify(o)))}async notify(o){this.listeners[o]!=null&&await Promise.all([...this.listeners[o].values()].map(r=>(0,Xt.delay)(0).then(()=>r()).catch(()=>null)))}};Bi=bl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ko{constructor(){super(async(e,o)=>(await this.awaitApi).getFluidTopicsMessageContext(e,o))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ko{constructor(){super(async(e,o)=>(await this.awaitApi).getCustomMessageContext(e,o))}});var ye=window.FluidTopicsI18nService,_i=window.FluidTopicsCustomI18nService;var Q=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},H=class extends Ct.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=()=>ue.get(),this.messageContexts=[],this.cache=new Ct.CacheRegistry,this.cleanSessionDebouncer=new Ct.Debouncer}render(){return Wi.html`
|
|
1129
1129
|
<slot></slot>
|
|
1130
|
-
`}update(o){var r,n,i,a,l;super.update(o),o.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),o.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),o.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),o.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),o.has("noCustom")&&L.actions.noCustom(this.noCustom),o.has("editorMode")&&L.actions.editorMode(this.editorMode),o.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),o.has("session")&&L.actions.session(this.session),o.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>ye.addContext(d)),o.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),o.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),o.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),o.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),L.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.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 o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},o.idleTimeoutInMillis),o})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};H.elementDefinitions={};H.styles=$i;Q([(0,dt.property)()],H.prototype,"baseUrl",void 0);Q([(0,dt.property)()],H.prototype,"apiIntegrationIdentifier",void 0);Q([(0,dt.property)()],H.prototype,"uiLocale",void 0);Q([(0,Ct.jsonProperty)(null)],H.prototype,"availableUiLocales",void 0);Q([(0,Ct.jsonProperty)(null)],H.prototype,"metadataConfiguration",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"editorMode",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"noCustom",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,dt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomComponent",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"withManualResources",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"navigatorOnline",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"forcedOffline",void 0);Q([(0,dt.property)({type:Object})],H.prototype,"apiProvider",void 0);Q([(0,Ct.jsonProperty)([])],H.prototype,"messageContexts",void 0);Q([(0,Ct.jsonProperty)(void 0)],H.prototype,"session",void 0);Q([(0,dt.state)()],H.prototype,"localesConfiguration",void 0);var as=S(K());function xl(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!To(e[n],o[n]))return!1;return!0}if(e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;for(n of e.entries())if(!To(n[1],o.get(n[0])))return!1;return!0}if(e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(i=Object.keys(e),r=i.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){var a=i[n];if(!To(e[a],o[a]))return!1}return!0}return e!==e&&o!==o}function To(e,o){try{return xl(e,o)}catch{return!1}}function $o(e,o){return!To(e,o)}var vl=S(K(),1);var Bo=class{constructor(){this.queue=[]}add(o,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==o.type)),this.queue.push(o)}consume(o){let r=this.queue.find(n=>n.type===o);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var eo=S(K(),1);var Di=S(K(),1);function zi(e,o){let r=()=>JSON.parse(JSON.stringify(e));return(0,Di.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:$o,...o??{}})}var _o=class{constructor(o=0){this.timeout=o,this.callbacks=[]}run(o,r){return this.callbacks=[o],this.debounce(r)}queue(o,r){return this.callbacks.push(o),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(o){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),o??this.timeout),this.promise}async runCallbacks(){var o,r;let n=[...this.callbacks];this.callbacks=[];let i=(o=this.rejectPromise)!==null&&o!==void 0?o:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ui=S(B(),1);var Wo=window,Sl=Wo.ShadowRoot&&(Wo.ShadyCSS===void 0||Wo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xh=Symbol();var Mi=(e,o)=>{Sl?e.adoptedStyleSheets=o.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):o.forEach(r=>{let n=document.createElement("style"),i=Wo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})};var Do=class extends Ui.LitElement{createRenderRoot(){let o=this.constructor;o.elementDefinitions&&!o.registry&&(o.registry=new CustomElementRegistry,Object.entries(o.elementDefinitions).forEach(([i,a])=>o.registry.define(i,a)));let r={...o.shadowRootOptions,customElements:o.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Mi(n,o.elementStyles),n}};var zo=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},ji,Hi=Symbol("constructorPrototype"),Gi=Symbol("constructorName"),Ki=Symbol("exportpartsDebouncer"),Fi=Symbol("dynamicDependenciesLoaded"),Jt=class extends Do{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ji]=new _o(5),this[Gi]=this.constructor.name,this[Hi]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Gi]&&Object.setPrototypeOf(this,this[Hi])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let o=this.constructor;o[Fi]||(o[Fi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(o){super.updated(o),this.updateComplete.then(()=>{this.contentAvailableCallback(o),this.applyCustomStylesheet(o),this.scheduleExportpartsUpdate()})}contentAvailableCallback(o){}applyCustomStylesheet(o){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(o.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var o,r,n;(!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ki].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(o){var r,n,i,a,l,d;let p=m=>m!=null&&m.trim().length>0,f=o.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(p).map(v=>v.trim()).forEach(v=>y.add(v))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>f.map(b=>`${m}:${b}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ji=Ki;zo([(0,eo.property)()],Jt.prototype,"exportpartsPrefix",void 0);zo([zi([])],Jt.prototype,"exportpartsPrefixes",void 0);zo([(0,eo.property)()],Jt.prototype,"customStylesheet",void 0);zo([(0,eo.state)()],Jt.prototype,"useAdoptedStyleSheets",void 0);function oo(e){var o;return(o=e?.isFtReduxStore)!==null&&o!==void 0?o:!1}var Zi,Vi,qi,ro=Symbol("internalReduxEventsUnsubscribers"),Qt=Symbol("internalStoresUnsubscribers"),he=Symbol("internalStores"),no=class extends Jt{constructor(){super(...arguments),this[Zi]=new Map,this[Vi]=new Map,this[qi]=new Map}get reduxConstructor(){return this.constructor}update(o){super.update(o),[...this.reduxConstructor.reduxReactiveProperties].some(r=>o.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[he].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[he].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[he].get(o)}addStore(o,r){var n;r=(n=r??(oo(o)?o.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[he].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}removeStore(o){let r=typeof o=="string"?o:o.name;this.unsubscribeFromStore(r),this[he].delete(r)}setupStores(){this.unsubscribeFromStores(),this[he].forEach((o,r)=>this.subscribeToStore(r,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(o.store);i&&(o.store?this[Qt].has(o.store):this[Qt].size>0)&&(this[r]=o.selector(i.getState(),this))}})}subscribeToStore(o,r){var n;this[Qt].set(o,r.subscribe(()=>this.updateFromStores())),this[ro].set(o,[]),oo(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let l=d=>this[a](d);r.addEventListener(i.eventName,l),this[ro].get(o).push(()=>r.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Qt].forEach((o,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(o){var r;this[Qt].has(o)&&this[Qt].get(o)(),this[Qt].delete(o),(r=this[ro].get(o))===null||r===void 0||r.forEach(n=>n()),this[ro].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Zi=Qt,Vi=he,qi=ro;no.reduxProperties=new Map;no.reduxReactiveProperties=new Set;no.reduxEventListeners=new Map;function St(e){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Mt(e){return!!e&&!!e[D]}function wt(e){var o;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ll}(e)||Array.isArray(e)||!!e[oc]||!!(!((o=e.constructor)===null||o===void 0)&&o[oc])||Hr(e)||Gr(e))}function me(e,o,r){r===void 0&&(r=!1),Be(e)===0?(r?Object.keys:$e)(e).forEach(function(n){r&&typeof n=="symbol"||o(n,e[n],e)}):e.forEach(function(n,i){return o(i,n,e)})}function Be(e){var o=e[D];return o?o.i>3?o.i-4:o.i:Array.isArray(e)?1:Hr(e)?2:Gr(e)?3:0}function Te(e,o){return Be(e)===2?e.has(o):Object.prototype.hasOwnProperty.call(e,o)}function Ol(e,o){return Be(e)===2?e.get(o):e[o]}function rc(e,o,r){var n=Be(e);n===2?e.set(o,r):n===3?e.add(r):e[o]=r}function nc(e,o){return e===o?e!==0||1/e==1/o:e!=e&&o!=o}function Hr(e){return Al&&e instanceof Map}function Gr(e){return Rl&&e instanceof Set}function te(e){return e.o||e.t}function Fr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var o=cc(e);delete o[D];for(var r=$e(o),n=0;n<r.length;n++){var i=r[n],a=o[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(o[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),o)}function jr(e,o){return o===void 0&&(o=!1),Kr(e)||Mt(e)||!wt(e)||(Be(e)>1&&(e.set=e.add=e.clear=e.delete=Cl),Object.freeze(e),o&&me(e,function(r,n){return jr(n,!0)},!0)),e}function Cl(){St(2)}function Kr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Pt(e){var o=Ur[e];return o||St(18,e),o}function wl(e,o){Ur[e]||(Ur[e]=o)}function Dr(){return io}function $r(e,o){o&&(Pt("Patches"),e.u=[],e.s=[],e.v=o)}function Mo(e){zr(e),e.p.forEach(El),e.p=null}function zr(e){e===io&&(io=e.l)}function Yi(e){return io={p:[],l:io,h:e,m:!0,_:0}}function El(e){var o=e[D];o.i===0||o.i===1?o.j():o.g=!0}function Br(e,o){o._=o.p.length;var r=o.p[0],n=e!==void 0&&e!==r;return o.h.O||Pt("ES5").S(o,e,n),n?(r[D].P&&(Mo(o),St(4)),wt(e)&&(e=Uo(o,e),o.l||Ho(o,e)),o.u&&Pt("Patches").M(r[D].t,e,o.u,o.s)):e=Uo(o,r,[]),Mo(o),o.u&&o.v(o.u,o.s),e!==ic?e:void 0}function Uo(e,o,r){if(Kr(o))return o;var n=o[D];if(!n)return me(o,function(d,p){return Xi(e,n,o,d,p,r)},!0),o;if(n.A!==e)return o;if(!n.P)return Ho(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Fr(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),me(a,function(d,p){return Xi(e,n,i,d,p,r,l)}),Ho(e,i,!1),r&&e.u&&Pt("Patches").N(n,r,e.u,e.s)}return n.o}function Xi(e,o,r,n,i,a,l){if(Mt(i)){var d=Uo(e,i,a&&o&&o.i!==3&&!Te(o.R,n)?a.concat(n):void 0);if(rc(r,n,d),!Mt(d))return;e.m=!1}else l&&r.add(i);if(wt(i)&&!Kr(i)){if(!e.h.D&&e._<1)return;Uo(e,i),o&&o.A.l||Ho(e,i)}}function Ho(e,o,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&jr(o,r)}function _r(e,o){var r=e[D];return(r?te(r):e)[o]}function Ji(e,o){if(o in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,o);if(n)return n;r=Object.getPrototypeOf(r)}}function ee(e){e.P||(e.P=!0,e.l&&ee(e.l))}function Wr(e){e.o||(e.o=Fr(e.t))}function Mr(e,o,r){var n=Hr(o)?Pt("MapSet").F(o,r):Gr(o)?Pt("MapSet").T(o,r):e.O?function(i,a){var l=Array.isArray(i),d={i:l?1:0,A:a?a.A:Dr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=d,f=co;l&&(p=[d],f=ao);var y=Proxy.revocable(p,f),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(o,r):Pt("ES5").J(o,r);return(r?r.A:Dr()).p.push(n),n}function Nl(e){return Mt(e)||St(22,e),function o(r){if(!wt(r))return r;var n,i=r[D],a=Be(r);if(i){if(!i.P&&(i.i<4||!Pt("ES5").K(i)))return i.t;i.I=!0,n=Qi(r,a),i.I=!1}else n=Qi(r,a);return me(n,function(l,d){i&&Ol(i.t,l)===d||rc(n,l,o(d))}),a===3?new Set(n):n}(e)}function Qi(e,o){switch(o){case 2:return new Map(e);case 3:return Array.from(e)}return Fr(e)}function ac(){function e(l,d){var p=a[l];return p?p.enumerable=d:a[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[D];return co.get(f,l)},set:function(f){var y=this[D];co.set(y,l,f)}},p}function o(l){for(var d=l.length-1;d>=0;d--){var p=l[d][D];if(!p.P)switch(p.i){case 5:n(p)&&ee(p);break;case 4:r(p)&&ee(p)}}}function r(l){for(var d=l.t,p=l.k,f=$e(p),y=f.length-1;y>=0;y--){var h=f[y];if(h!==D){var m=d[h];if(m===void 0&&!Te(d,h))return!0;var b=p[h],g=b&&b[D];if(g?g.t!==m:!nc(b,m))return!0}}var v=!!d[D];return f.length!==$e(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&St(3,JSON.stringify(te(l)))}var a={};wl("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=cc(m);delete v[D];for(var R=$e(v),E=0;E<R.length;E++){var N=R[E];v[N]=e(N,h||!!v[N].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),y={i:p?5:4,A:d?d.A:Dr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,D,{value:y,writable:!0}),f},S:function(l,d,p){p?Mt(d)&&d[D].A===l&&o(l.p):(l.u&&function f(y){if(y&&typeof y=="object"){var h=y[D];if(h){var m=h.t,b=h.k,g=h.R,v=h.i;if(v===4)me(b,function(T){T!==D&&(m[T]!==void 0||Te(m,T)?g[T]||f(b[T]):(g[T]=!0,ee(h)))}),me(m,function(T){b[T]!==void 0||Te(b,T)||(g[T]=!1,ee(h))});else if(v===5){if(n(h)&&(ee(h),g.length=!0),b.length<m.length)for(var R=b.length;R<m.length;R++)g[R]=!1;else for(var E=m.length;E<b.length;E++)g[E]=!0;for(var N=Math.min(b.length,m.length),I=0;I<N;I++)b.hasOwnProperty(I)||(g[I]=!0),g[I]===void 0&&f(b[I])}}}}(l.p[0]),o(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var tc,io,Zr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Al=typeof Map<"u",Rl=typeof Set<"u",ec=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ic=Zr?Symbol.for("immer-nothing"):((tc={})["immer-nothing"]=!0,tc),oc=Zr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Zr?Symbol.for("immer-state"):"__$immer_state";var Ll=""+Object.prototype.constructor,$e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,cc=Object.getOwnPropertyDescriptors||function(e){var o={};return $e(e).forEach(function(r){o[r]=Object.getOwnPropertyDescriptor(e,r)}),o},Ur={},co={get:function(e,o){if(o===D)return e;var r=te(e);if(!Te(r,o))return function(i,a,l){var d,p=Ji(a,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(e,r,o);var n=r[o];return e.I||!wt(n)?n:n===_r(e.t,o)?(Wr(e),e.o[o]=Mr(e.A.h,n,e)):n},has:function(e,o){return o in te(e)},ownKeys:function(e){return Reflect.ownKeys(te(e))},set:function(e,o,r){var n=Ji(te(e),o);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=_r(te(e),o),a=i?.[D];if(a&&a.t===r)return e.o[o]=r,e.R[o]=!1,!0;if(nc(r,i)&&(r!==void 0||Te(e.t,o)))return!0;Wr(e),ee(e)}return e.o[o]===r&&(r!==void 0||o in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[o])||(e.o[o]=r,e.R[o]=!0),!0},deleteProperty:function(e,o){return _r(e.t,o)!==void 0||o in e.t?(e.R[o]=!1,Wr(e),ee(e)):delete e.R[o],e.o&&delete e.o[o],!0},getOwnPropertyDescriptor:function(e,o){var r=te(e),n=Reflect.getOwnPropertyDescriptor(r,o);return n&&{writable:!0,configurable:e.i!==1||o!=="length",enumerable:n.enumerable,value:r[o]}},defineProperty:function(){St(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){St(12)}},ao={};me(co,function(e,o){ao[e]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}}),ao.deleteProperty=function(e,o){return ao.set.call(this,e,o,void 0)},ao.set=function(e,o,r){return co.set.call(this,e[0],o,r,e[0])};var Il=function(){function e(r){var n=this;this.O=ec,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var d=a;a=i;var p=n;return function(v){var R=this;v===void 0&&(v=d);for(var E=arguments.length,N=Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];return p.produce(v,function(T){var $;return($=a).call.apply($,[R,T].concat(N))})}}var f;if(typeof a!="function"&&St(6),l!==void 0&&typeof l!="function"&&St(7),wt(i)){var y=Yi(n),h=Mr(n,i,void 0),m=!0;try{f=a(h),m=!1}finally{m?Mo(y):zr(y)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return $r(y,l),Br(v,y)},function(v){throw Mo(y),v}):($r(y,l),Br(f,y))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===ic&&(f=void 0),n.D&&jr(f,!0),l){var b=[],g=[];Pt("Patches").M(i,f,b,g),l(b,g)}return f}St(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){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(f,function(b){return i.apply(void 0,[b].concat(h))})};var l,d,p=n.produce(i,a,function(f,y){l=f,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var o=e.prototype;return o.createDraft=function(r){wt(r)||St(8),Mt(r)&&(r=Nl(r));var n=Yi(this),i=Mr(this,r,void 0);return i[D].C=!0,zr(n),i},o.finishDraft=function(r,n){var i=r&&r[D],a=i.A;return $r(a,n),Br(void 0,a)},o.setAutoFreeze=function(r){this.D=r},o.setUseProxies=function(r){r&&!ec&&St(20),this.O=r},o.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Pt("Patches").$;return Mt(r)?l(r,n):this.produce(r,function(d){return l(d,n)})},e}(),mt=new Il,Pl=mt.produce,sm=mt.produceWithPatches.bind(mt),dm=mt.setAutoFreeze.bind(mt),fm=mt.setUseProxies.bind(mt),pm=mt.applyPatches.bind(mt),um=mt.createDraft.bind(mt),ym=mt.finishDraft.bind(mt),Go=Pl;function oe(e){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},oe(e)}function Vr(e,o){if(oe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,o||"default");if(oe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(e)}function qr(e){var o=Vr(e,"string");return oe(o)==="symbol"?o:String(o)}function Yr(e,o,r){return o=qr(o),o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function lc(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fo(e){for(var o=1;o<arguments.length;o++){var r=arguments[o]!=null?arguments[o]:{};o%2?lc(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var sc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Xr=function(){return Math.random().toString(36).substring(7).split("").join(".")},jo={INIT:"@@redux/INIT"+Xr(),REPLACE:"@@redux/REPLACE"+Xr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xr()}};function kl(e){if(typeof e!="object"||e===null)return!1;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(e)===o}function Jr(e,o,r){var n;if(typeof o=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(tt(0));if(typeof o=="function"&&typeof r>"u"&&(r=o,o=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(tt(1));return r(Jr)(e,o)}if(typeof e!="function")throw new Error(tt(2));var i=e,a=o,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(tt(3));return a}function h(v){if(typeof v!="function")throw new Error(tt(4));if(p)throw new Error(tt(5));var R=!0;return f(),d.push(v),function(){if(R){if(p)throw new Error(tt(6));R=!1,f();var N=d.indexOf(v);d.splice(N,1),l=null}}}function m(v){if(!kl(v))throw new Error(tt(7));if(typeof v.type>"u")throw new Error(tt(8));if(p)throw new Error(tt(9));try{p=!0,a=i(a,v)}finally{p=!1}for(var R=l=d,E=0;E<R.length;E++){var N=R[E];N()}return v}function b(v){if(typeof v!="function")throw new Error(tt(10));i=v,m({type:jo.REPLACE})}function g(){var v,R=h;return v={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(tt(11));function I(){N.next&&N.next(y())}I();var T=R(I);return{unsubscribe:T}}},v[sc]=function(){return this},v}return m({type:jo.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:b},n[sc]=g,n}function Tl(e){Object.keys(e).forEach(function(o){var r=e[o],n=r(void 0,{type:jo.INIT});if(typeof n>"u")throw new Error(tt(12));if(typeof r(void 0,{type:jo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(tt(13))})}function dc(e){for(var o=Object.keys(e),r={},n=0;n<o.length;n++){var i=o[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),l,d;try{Tl(r)}catch(p){d=p}return function(f,y){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,b={},g=0;g<a.length;g++){var v=a[g],R=r[v],E=f[v],N=R(E,y);if(typeof N>"u"){var I=y&&y.type;throw new Error(tt(14))}b[v]=N,m=m||N!==E}return m=m||a.length!==Object.keys(f).length,m?b:f}}function _e(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return o.length===0?function(n){return n}:o.length===1?o[0]:o.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function fc(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(tt(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},d=o.map(function(p){return p(l)});return a=_e.apply(void 0,d)(i.dispatch),Fo(Fo({},i),{},{dispatch:a})}}}function pc(e){var o=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,a,e):l(d)}}};return o}var uc=pc();uc.withExtraArgument=pc;var Qr=uc;var bc=function(){var e=function(o,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$l=function(e,o){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(y){return p([f,y])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=o.call(e,r)}catch(y){f=[6,y],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},We=function(e,o){for(var r=0,n=o.length,i=e.length;r<n;r++,i++)e[i]=o[r];return e},Bl=Object.defineProperty,_l=Object.defineProperties,Wl=Object.getOwnPropertyDescriptors,yc=Object.getOwnPropertySymbols,Dl=Object.prototype.hasOwnProperty,zl=Object.prototype.propertyIsEnumerable,hc=function(e,o,r){return o in e?Bl(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r},re=function(e,o){for(var r in o||(o={}))Dl.call(o,r)&&hc(e,r,o[r]);if(yc)for(var n=0,i=yc(o);n<i.length;n++){var r=i[n];zl.call(o,r)&&hc(e,r,o[r])}return e},tn=function(e,o){return _l(e,Wl(o))},Ml=function(e,o,r){return new Promise(function(n,i){var a=function(p){try{d(r.next(p))}catch(f){i(f)}},l=function(p){try{d(r.throw(p))}catch(f){i(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,l)};d((r=r.apply(e,o)).next())})};var Ul=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_e:_e.apply(null,arguments)},km=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Hl(e){if(typeof e!="object"||e===null)return!1;var o=Object.getPrototypeOf(e);if(o===null)return!0;for(var r=o;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return o===r}var Gl=function(e){bc(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,o.prototype),i}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,We([void 0],r[0].concat(this)))):new(o.bind.apply(o,We([void 0],r.concat(this))))},o}(Array),Fl=function(e){bc(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,o.prototype),i}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,We([void 0],r[0].concat(this)))):new(o.bind.apply(o,We([void 0],r.concat(this))))},o}(Array);function rn(e){return wt(e)?Go(e,function(){}):e}function jl(e){return typeof e=="boolean"}function Kl(){return function(o){return Zl(o)}}function Zl(e){e===void 0&&(e={});var o=e.thunk,r=o===void 0?!0:o,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,l=a===void 0?!0:a,d=new Gl;if(r&&(jl(r)?d.push(Qr):d.push(Qr.withExtraArgument(r.extraArgument))),0){if(i)var p;if(l)var f}return d}var en=!0;function xc(e){var o=Kl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,l=a===void 0?o():a,d=r.devTools,p=d===void 0?!0:d,f=r.preloadedState,y=f===void 0?void 0:f,h=r.enhancers,m=h===void 0?void 0:h,b;if(typeof i=="function")b=i;else if(Hl(i))b=dc(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 g=l;if(typeof g=="function"&&(g=g(o),!en&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!en&&g.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=fc.apply(void 0,g),R=_e;p&&(R=Ul(re({trace:!en},typeof p=="object"&&p)));var E=new Fl(v),N=E;Array.isArray(m)?N=We([v],m):typeof m=="function"&&(N=m(E));var I=R.apply(void 0,N);return Jr(b,y,I)}function ne(e,o){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(o){var a=o.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return re(re({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function vc(e){var o={},r=[],n,i={addCase:function(a,l){var d=typeof a=="string"?a:a.type;if(d in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[d]=l,i},addMatcher:function(a,l){return r.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[o,r,n]}function Vl(e){return typeof e=="function"}function ql(e,o,r,n){r===void 0&&(r=[]);var i=typeof o=="function"?vc(o):[o,r,n],a=i[0],l=i[1],d=i[2],p;if(Vl(e))p=function(){return rn(e())};else{var f=rn(e);p=function(){return f}}function y(h,m){h===void 0&&(h=p());var b=We([a[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,v){if(v)if(Mt(g)){var R=g,E=v(R,m);return E===void 0?g:E}else{if(wt(g))return Go(g,function(N){return v(N,m)});var E=v(g,m);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return g},h)}return y.getInitialState=p,y}function Yl(e,o){return e+"/"+o}function Sc(e){var o=e.name;if(!o)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},l={},d={};i.forEach(function(y){var h=n[y],m=Yl(o,y),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,a[y]=b,l[m]=b,d[y]=g?ne(m,g):ne(m)});function p(){var y=typeof e.extraReducers=="function"?vc(e.extraReducers):[e.extraReducers],h=y[0],m=h===void 0?{}:h,b=y[1],g=b===void 0?[]:b,v=y[2],R=v===void 0?void 0:v,E=re(re({},m),l);return ql(r,function(N){for(var I in E)N.addCase(I,E[I]);for(var T=0,$=g;T<$.length;T++){var gt=$[T];N.addMatcher(gt.matcher,gt.reducer)}R&&N.addDefaultCase(R)})}var f;return{name:o,reducer:function(y,h){return f||(f=p()),f(y,h)},actions:d,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Xl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jl=function(e){e===void 0&&(e=21);for(var o="",r=e;r--;)o+=Xl[Math.random()*64|0];return o},Ql=["name","message","stack","code"],on=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),mc=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),ts=function(e){if(typeof e=="object"&&e!==null){for(var o={},r=0,n=Ql;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(o[i]=e[i])}return o}return{message:String(e)}},_m=function(){function e(o,r,n){var i=ne(o+"/fulfilled",function(y,h,m,b){return{payload:y,meta:tn(re({},b||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=ne(o+"/pending",function(y,h,m){return{payload:void 0,meta:tn(re({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ne(o+"/rejected",function(y,h,m,b,g){return{payload:b,error:(n&&n.serializeError||ts)(y||"Rejected"),meta:tn(re({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!b,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 f(y){return function(h,m,b){var g=n?.idGenerator?n.idGenerator(y):Jl(),v=new p,R,E=!1;function N(T){R=T,v.abort()}var I=function(){return Ml(this,null,function(){var T,$,gt,Ht,cr,Gt,pt;return $l(this,function(bt){switch(bt.label){case 0:return bt.trys.push([0,4,,5]),Ht=(T=n?.condition)==null?void 0:T.call(n,y,{getState:m,extra:b}),os(Ht)?[4,Ht]:[3,2];case 1:Ht=bt.sent(),bt.label=2;case 2:if(Ht===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,cr=new Promise(function(ut,ae){return v.signal.addEventListener("abort",function(){return ae({name:"AbortError",message:R||"Aborted"})})}),h(a(g,y,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:g,arg:y},{getState:m,extra:b}))),[4,Promise.race([cr,Promise.resolve(r(y,{dispatch:h,getState:m,extra:b,requestId:g,signal:v.signal,abort:N,rejectWithValue:function(ut,ae){return new on(ut,ae)},fulfillWithValue:function(ut,ae){return new mc(ut,ae)}})).then(function(ut){if(ut instanceof on)throw ut;return ut instanceof mc?i(ut.payload,g,y,ut.meta):i(ut,g,y)})])];case 3:return gt=bt.sent(),[3,5];case 4:return Gt=bt.sent(),gt=Gt instanceof on?l(null,g,y,Gt.payload,Gt.meta):l(Gt,g,y),[3,5];case 5:return pt=n&&!n.dispatchConditionRejection&&l.match(gt)&>.meta.condition,pt||h(gt),[2,gt]}})})}();return Object.assign(I,{abort:N,requestId:g,arg:y,unwrap:function(){return I.then(es)}})}}return Object.assign(f,{pending:a,rejected:l,fulfilled:i,typePrefix:o})}return e.withTypes=function(){return e},e}();function es(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function os(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oc="listener",Cc="completed",wc="cancelled",Wm="task-"+wc,Dm="task-"+Cc,zm=Oc+"-"+wc,Mm=Oc+"-"+Cc;var nn="listenerMiddleware";var Um=ne(nn+"/add"),Hm=ne(nn+"/removeAll"),Gm=ne(nn+"/remove");var gc,Fm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(gc||(gc=Promise.resolve())).then(e).catch(function(o){return setTimeout(function(){throw o},0)})},rs=function(e){return function(o){setTimeout(o,e)}},jm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:rs(10);ac();function ns(e,o){return class extends e{constructor(){super(...arguments),this.eventBus=o??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var Ko=class extends ns(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ec=class e extends Ko{static get(o){var r;let n=typeof o=="string"?o:o.name,i=typeof o=="string"?void 0:o,a=window.ftReduxStores[n];if(oo(a))return a;if(i==null)return;let l=Sc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),d=xc({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[i.name]=new e(l,d)}constructor(o,r){super(),this.reduxSlice=o,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Bo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let d=a,p=i[d];return p?(...f)=>{let y=p(...f.map(n));return this.reduxStore.dispatch(y),y}:f=>{this.setState({[d]:n(f)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(o){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(o).join("_"),overwrites:o})}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(o){throw new Error("Not implemented yet.")}subscribe(o){return this.reduxStore.subscribe(o)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Yo=S(P());var Zo=class extends Yt{async listMySearches(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(o.profile.userId),5*60*1e3):[]}};var Vo=class extends Yt{async listMyBookmarks(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(o.profile.userId),5*60*1e3):[]}};var is="ft-user-assets",qo=Yo.FtReduxStore.get({name:is,initialState:{savedSearches:void 0,bookmarks:void 0}}),an=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vo,this.savedSearchesService=new Zo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var o;let{session:r}=L.getState();(0,Yo.deepEqual)((o=this.currentSession)===null||o===void 0?void 0:o.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),qo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let o=await this.savedSearchesService.listMySearches();qo.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var o;if(this.bookmarksAreUsed){let r=!((o=this.currentSession)===null||o===void 0)&&o.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;qo.actions.bookmarks(r)}}},Ng=new an;var cn=class{addCommand(o,r=!1){L.commands.add(o,r)}consumeCommand(o){return L.commands.consume(o)}};window.FluidTopicsAppInfoStoreService=new cn;var Nc=S(P()),ln=class{highlightHtml(o,r,n){(0,Nc.highlightHtml)(o,r,n)}};window.FluidTopicsHighlightHtmlService=new ln;var Ac=S(P());var sn=class{isDate(o){var r,n,i,a;return(a=(i=((n=(r=L.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(o,r){var n,i,a;return Ac.DateFormatter.format(o,(n=r?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new sn;var cs=S(P());(0,Rc.customElement)("ft-app-context")(H);var Ic=S(K()),ls=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},dn=Symbol("i18nAttributes"),fn=Symbol("i18nListAttributes"),Xo=Symbol("i18nProperties"),pn=Symbol("i18nManualContexts"),lo=Symbol("i18nUnsubs");function tr(e){var o,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?_i:ye}i18n(a,l,...d){var p;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...d);let f=(p=a.args)!==null&&p!==void 0?p:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...f)}onI18nUpdate(a){var l,d,p;(l=this[dn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,f,a))}),(d=this[fn])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,f,a))}),(p=this[Xo])===null||p===void 0||p.forEach((f,y)=>{f.context.toLowerCase()===a.toLowerCase()&&(this[y]=this.i18n(f))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,d){var p;let f=!d||((p=a.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return a.context&&a.key&&f?this.buildI18nAttributeMessage(a,l):a}update(a){var l,d,p;super.update(a),(l=this[dn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(a.has(y)||f.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,a,y),this[y]=this.getI18nAttributeMessage(h,f))}),(d=this[fn])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);(a.has(y)||f.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,a,y),this.getI18nAttributeMessage(m,f))))}),(p=this[Xo])===null||p===void 0||p.forEach((f,y)=>{f.argsProvider!=null&&(this[y]=this.i18n(f))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,d){a.context&&a.key&&l.has(d)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[lo].has(a)||this[lo].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,d,p,f,y;super.connectedCallback(),new Set([...(l=(a=this[Xo])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[dn])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(f=this[fn])===null||f===void 0?void 0:f.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[pn].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(a,l){this[pn].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[lo].forEach(a=>a()),this[lo].clear()}}return o=pn,r=lo,ls([(0,Ic.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Lc=class extends tr(Qo.FtLitElement){},Jo=class extends tr(Qo.FtLitElementRedux){};var so=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},Et=class extends Jo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":er.nothing:er.html`
|
|
1130
|
+
`}update(o){var r,n,i,a,l;super.update(o),o.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),o.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),o.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),o.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),o.has("noCustom")&&L.actions.noCustom(this.noCustom),o.has("editorMode")&&L.actions.editorMode(this.editorMode),o.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),o.has("session")&&L.actions.session(this.session),o.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>ye.addContext(d)),o.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),o.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),o.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),o.has("localesConfiguration")&&(L.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),L.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),L.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.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 o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},o.idleTimeoutInMillis),o})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};H.elementDefinitions={};H.styles=$i;Q([(0,dt.property)()],H.prototype,"baseUrl",void 0);Q([(0,dt.property)()],H.prototype,"apiIntegrationIdentifier",void 0);Q([(0,dt.property)()],H.prototype,"uiLocale",void 0);Q([(0,Ct.jsonProperty)(null)],H.prototype,"availableUiLocales",void 0);Q([(0,Ct.jsonProperty)(null)],H.prototype,"metadataConfiguration",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"editorMode",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"noCustom",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,dt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomComponent",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"withManualResources",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"navigatorOnline",void 0);Q([(0,dt.property)({type:Boolean})],H.prototype,"forcedOffline",void 0);Q([(0,dt.property)({type:Object})],H.prototype,"apiProvider",void 0);Q([(0,Ct.jsonProperty)([])],H.prototype,"messageContexts",void 0);Q([(0,Ct.jsonProperty)(void 0)],H.prototype,"session",void 0);Q([(0,dt.state)()],H.prototype,"localesConfiguration",void 0);var as=S(K());function xl(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!To(e[n],o[n]))return!1;return!0}if(e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;for(n of e.entries())if(!To(n[1],o.get(n[0])))return!1;return!0}if(e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(n of e.entries())if(!o.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();let a=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=a(e),r=i.length,r!==a(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=r;n--!==0;){let l=i[n];if(!To(e[l],o[l]))return!1}return!0}return e!==e&&o!==o||e==null&&o==null}function To(e,o){try{return xl(e,o)}catch{return!1}}function $o(e,o){return!To(e,o)}var vl=S(K(),1);var Bo=class{constructor(){this.queue=[]}add(o,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==o.type)),this.queue.push(o)}consume(o){let r=this.queue.find(n=>n.type===o);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var eo=S(K(),1);var Di=S(K(),1);function zi(e,o){let r=()=>JSON.parse(JSON.stringify(e));return(0,Di.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:$o,...o??{}})}var _o=class{constructor(o=0){this.timeout=o,this.callbacks=[]}run(o,r){return this.callbacks=[o],this.debounce(r)}queue(o,r){return this.callbacks.push(o),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(o){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),o??this.timeout),this.promise}async runCallbacks(){var o,r;let n=[...this.callbacks];this.callbacks=[];let i=(o=this.rejectPromise)!==null&&o!==void 0?o:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ui=S(B(),1);var Wo=window,Sl=Wo.ShadowRoot&&(Wo.ShadyCSS===void 0||Wo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xh=Symbol();var Mi=(e,o)=>{Sl?e.adoptedStyleSheets=o.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):o.forEach(r=>{let n=document.createElement("style"),i=Wo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)})};var Do=class extends Ui.LitElement{createRenderRoot(){let o=this.constructor;o.elementDefinitions&&!o.registry&&(o.registry=new CustomElementRegistry,Object.entries(o.elementDefinitions).forEach(([i,a])=>o.registry.define(i,a)));let r={...o.shadowRootOptions,customElements:o.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Mi(n,o.elementStyles),n}};var zo=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},ji,Hi=Symbol("constructorPrototype"),Gi=Symbol("constructorName"),Ki=Symbol("exportpartsDebouncer"),Fi=Symbol("dynamicDependenciesLoaded"),Jt=class extends Do{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ji]=new _o(5),this[Gi]=this.constructor.name,this[Hi]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Gi]&&Object.setPrototypeOf(this,this[Hi])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let o=this.constructor;o[Fi]||(o[Fi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(o){super.updated(o),this.updateComplete.then(()=>{this.contentAvailableCallback(o),this.applyCustomStylesheet(o),this.scheduleExportpartsUpdate()})}contentAvailableCallback(o){}applyCustomStylesheet(o){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(o.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var o,r,n;(!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ki].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(o){var r,n,i,a,l,d;let p=m=>m!=null&&m.trim().length>0,f=o.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],g=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...b,...g).filter(p).map(v=>v.trim()).forEach(v=>y.add(v))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(m=>f.map(b=>`${m}:${b}--${m}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};ji=Ki;zo([(0,eo.property)()],Jt.prototype,"exportpartsPrefix",void 0);zo([zi([])],Jt.prototype,"exportpartsPrefixes",void 0);zo([(0,eo.property)()],Jt.prototype,"customStylesheet",void 0);zo([(0,eo.state)()],Jt.prototype,"useAdoptedStyleSheets",void 0);function oo(e){var o;return(o=e?.isFtReduxStore)!==null&&o!==void 0?o:!1}var Zi,Vi,qi,ro=Symbol("internalReduxEventsUnsubscribers"),Qt=Symbol("internalStoresUnsubscribers"),he=Symbol("internalStores"),no=class extends Jt{constructor(){super(...arguments),this[Zi]=new Map,this[Vi]=new Map,this[qi]=new Map}get reduxConstructor(){return this.constructor}update(o){super.update(o),[...this.reduxConstructor.reduxReactiveProperties].some(r=>o.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[he].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[he].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[he].get(o)}addStore(o,r){var n;r=(n=r??(oo(o)?o.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[he].set(r,o),this.subscribeToStore(r,o),this.updateFromStores()}removeStore(o){let r=typeof o=="string"?o:o.name;this.unsubscribeFromStore(r),this[he].delete(r)}setupStores(){this.unsubscribeFromStores(),this[he].forEach((o,r)=>this.subscribeToStore(r,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let i=this.getStore(o.store);i&&(o.store?this[Qt].has(o.store):this[Qt].size>0)&&(this[r]=o.selector(i.getState(),this))}})}subscribeToStore(o,r){var n;this[Qt].set(o,r.subscribe(()=>this.updateFromStores())),this[ro].set(o,[]),oo(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||r.name===i.store)){let l=d=>this[a](d);r.addEventListener(i.eventName,l),this[ro].get(o).push(()=>r.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Qt].forEach((o,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(o){var r;this[Qt].has(o)&&this[Qt].get(o)(),this[Qt].delete(o),(r=this[ro].get(o))===null||r===void 0||r.forEach(n=>n()),this[ro].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Zi=Qt,Vi=he,qi=ro;no.reduxProperties=new Map;no.reduxReactiveProperties=new Set;no.reduxEventListeners=new Map;function St(e){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Mt(e){return!!e&&!!e[D]}function wt(e){var o;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ll}(e)||Array.isArray(e)||!!e[oc]||!!(!((o=e.constructor)===null||o===void 0)&&o[oc])||Hr(e)||Gr(e))}function me(e,o,r){r===void 0&&(r=!1),Be(e)===0?(r?Object.keys:$e)(e).forEach(function(n){r&&typeof n=="symbol"||o(n,e[n],e)}):e.forEach(function(n,i){return o(i,n,e)})}function Be(e){var o=e[D];return o?o.i>3?o.i-4:o.i:Array.isArray(e)?1:Hr(e)?2:Gr(e)?3:0}function Te(e,o){return Be(e)===2?e.has(o):Object.prototype.hasOwnProperty.call(e,o)}function Ol(e,o){return Be(e)===2?e.get(o):e[o]}function rc(e,o,r){var n=Be(e);n===2?e.set(o,r):n===3?e.add(r):e[o]=r}function nc(e,o){return e===o?e!==0||1/e==1/o:e!=e&&o!=o}function Hr(e){return Al&&e instanceof Map}function Gr(e){return Rl&&e instanceof Set}function te(e){return e.o||e.t}function Fr(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var o=cc(e);delete o[D];for(var r=$e(o),n=0;n<r.length;n++){var i=r[n],a=o[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(o[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),o)}function jr(e,o){return o===void 0&&(o=!1),Kr(e)||Mt(e)||!wt(e)||(Be(e)>1&&(e.set=e.add=e.clear=e.delete=Cl),Object.freeze(e),o&&me(e,function(r,n){return jr(n,!0)},!0)),e}function Cl(){St(2)}function Kr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Pt(e){var o=Ur[e];return o||St(18,e),o}function wl(e,o){Ur[e]||(Ur[e]=o)}function Dr(){return io}function $r(e,o){o&&(Pt("Patches"),e.u=[],e.s=[],e.v=o)}function Mo(e){zr(e),e.p.forEach(El),e.p=null}function zr(e){e===io&&(io=e.l)}function Yi(e){return io={p:[],l:io,h:e,m:!0,_:0}}function El(e){var o=e[D];o.i===0||o.i===1?o.j():o.g=!0}function Br(e,o){o._=o.p.length;var r=o.p[0],n=e!==void 0&&e!==r;return o.h.O||Pt("ES5").S(o,e,n),n?(r[D].P&&(Mo(o),St(4)),wt(e)&&(e=Uo(o,e),o.l||Ho(o,e)),o.u&&Pt("Patches").M(r[D].t,e,o.u,o.s)):e=Uo(o,r,[]),Mo(o),o.u&&o.v(o.u,o.s),e!==ic?e:void 0}function Uo(e,o,r){if(Kr(o))return o;var n=o[D];if(!n)return me(o,function(d,p){return Xi(e,n,o,d,p,r)},!0),o;if(n.A!==e)return o;if(!n.P)return Ho(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Fr(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),me(a,function(d,p){return Xi(e,n,i,d,p,r,l)}),Ho(e,i,!1),r&&e.u&&Pt("Patches").N(n,r,e.u,e.s)}return n.o}function Xi(e,o,r,n,i,a,l){if(Mt(i)){var d=Uo(e,i,a&&o&&o.i!==3&&!Te(o.R,n)?a.concat(n):void 0);if(rc(r,n,d),!Mt(d))return;e.m=!1}else l&&r.add(i);if(wt(i)&&!Kr(i)){if(!e.h.D&&e._<1)return;Uo(e,i),o&&o.A.l||Ho(e,i)}}function Ho(e,o,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&jr(o,r)}function _r(e,o){var r=e[D];return(r?te(r):e)[o]}function Ji(e,o){if(o in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,o);if(n)return n;r=Object.getPrototypeOf(r)}}function ee(e){e.P||(e.P=!0,e.l&&ee(e.l))}function Wr(e){e.o||(e.o=Fr(e.t))}function Mr(e,o,r){var n=Hr(o)?Pt("MapSet").F(o,r):Gr(o)?Pt("MapSet").T(o,r):e.O?function(i,a){var l=Array.isArray(i),d={i:l?1:0,A:a?a.A:Dr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=d,f=co;l&&(p=[d],f=ao);var y=Proxy.revocable(p,f),h=y.revoke,m=y.proxy;return d.k=m,d.j=h,m}(o,r):Pt("ES5").J(o,r);return(r?r.A:Dr()).p.push(n),n}function Nl(e){return Mt(e)||St(22,e),function o(r){if(!wt(r))return r;var n,i=r[D],a=Be(r);if(i){if(!i.P&&(i.i<4||!Pt("ES5").K(i)))return i.t;i.I=!0,n=Qi(r,a),i.I=!1}else n=Qi(r,a);return me(n,function(l,d){i&&Ol(i.t,l)===d||rc(n,l,o(d))}),a===3?new Set(n):n}(e)}function Qi(e,o){switch(o){case 2:return new Map(e);case 3:return Array.from(e)}return Fr(e)}function ac(){function e(l,d){var p=a[l];return p?p.enumerable=d:a[l]=p={configurable:!0,enumerable:d,get:function(){var f=this[D];return co.get(f,l)},set:function(f){var y=this[D];co.set(y,l,f)}},p}function o(l){for(var d=l.length-1;d>=0;d--){var p=l[d][D];if(!p.P)switch(p.i){case 5:n(p)&&ee(p);break;case 4:r(p)&&ee(p)}}}function r(l){for(var d=l.t,p=l.k,f=$e(p),y=f.length-1;y>=0;y--){var h=f[y];if(h!==D){var m=d[h];if(m===void 0&&!Te(d,h))return!0;var b=p[h],g=b&&b[D];if(g?g.t!==m:!nc(b,m))return!0}}var v=!!d[D];return f.length!==$e(d).length+(v?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(d,d.length-1);if(p&&!p.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&St(3,JSON.stringify(te(l)))}var a={};wl("ES5",{J:function(l,d){var p=Array.isArray(l),f=function(h,m){if(h){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=cc(m);delete v[D];for(var R=$e(v),E=0;E<R.length;E++){var N=R[E];v[N]=e(N,h||!!v[N].enumerable)}return Object.create(Object.getPrototypeOf(m),v)}(p,l),y={i:p?5:4,A:d?d.A:Dr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,D,{value:y,writable:!0}),f},S:function(l,d,p){p?Mt(d)&&d[D].A===l&&o(l.p):(l.u&&function f(y){if(y&&typeof y=="object"){var h=y[D];if(h){var m=h.t,b=h.k,g=h.R,v=h.i;if(v===4)me(b,function(T){T!==D&&(m[T]!==void 0||Te(m,T)?g[T]||f(b[T]):(g[T]=!0,ee(h)))}),me(m,function(T){b[T]!==void 0||Te(b,T)||(g[T]=!1,ee(h))});else if(v===5){if(n(h)&&(ee(h),g.length=!0),b.length<m.length)for(var R=b.length;R<m.length;R++)g[R]=!1;else for(var E=m.length;E<b.length;E++)g[E]=!0;for(var N=Math.min(b.length,m.length),I=0;I<N;I++)b.hasOwnProperty(I)||(g[I]=!0),g[I]===void 0&&f(b[I])}}}}(l.p[0]),o(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var tc,io,Zr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Al=typeof Map<"u",Rl=typeof Set<"u",ec=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ic=Zr?Symbol.for("immer-nothing"):((tc={})["immer-nothing"]=!0,tc),oc=Zr?Symbol.for("immer-draftable"):"__$immer_draftable",D=Zr?Symbol.for("immer-state"):"__$immer_state";var Ll=""+Object.prototype.constructor,$e=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,cc=Object.getOwnPropertyDescriptors||function(e){var o={};return $e(e).forEach(function(r){o[r]=Object.getOwnPropertyDescriptor(e,r)}),o},Ur={},co={get:function(e,o){if(o===D)return e;var r=te(e);if(!Te(r,o))return function(i,a,l){var d,p=Ji(a,l);return p?"value"in p?p.value:(d=p.get)===null||d===void 0?void 0:d.call(i.k):void 0}(e,r,o);var n=r[o];return e.I||!wt(n)?n:n===_r(e.t,o)?(Wr(e),e.o[o]=Mr(e.A.h,n,e)):n},has:function(e,o){return o in te(e)},ownKeys:function(e){return Reflect.ownKeys(te(e))},set:function(e,o,r){var n=Ji(te(e),o);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=_r(te(e),o),a=i?.[D];if(a&&a.t===r)return e.o[o]=r,e.R[o]=!1,!0;if(nc(r,i)&&(r!==void 0||Te(e.t,o)))return!0;Wr(e),ee(e)}return e.o[o]===r&&(r!==void 0||o in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[o])||(e.o[o]=r,e.R[o]=!0),!0},deleteProperty:function(e,o){return _r(e.t,o)!==void 0||o in e.t?(e.R[o]=!1,Wr(e),ee(e)):delete e.R[o],e.o&&delete e.o[o],!0},getOwnPropertyDescriptor:function(e,o){var r=te(e),n=Reflect.getOwnPropertyDescriptor(r,o);return n&&{writable:!0,configurable:e.i!==1||o!=="length",enumerable:n.enumerable,value:r[o]}},defineProperty:function(){St(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){St(12)}},ao={};me(co,function(e,o){ao[e]=function(){return arguments[0]=arguments[0][0],o.apply(this,arguments)}}),ao.deleteProperty=function(e,o){return ao.set.call(this,e,o,void 0)},ao.set=function(e,o,r){return co.set.call(this,e[0],o,r,e[0])};var Il=function(){function e(r){var n=this;this.O=ec,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var d=a;a=i;var p=n;return function(v){var R=this;v===void 0&&(v=d);for(var E=arguments.length,N=Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];return p.produce(v,function(T){var $;return($=a).call.apply($,[R,T].concat(N))})}}var f;if(typeof a!="function"&&St(6),l!==void 0&&typeof l!="function"&&St(7),wt(i)){var y=Yi(n),h=Mr(n,i,void 0),m=!0;try{f=a(h),m=!1}finally{m?Mo(y):zr(y)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(v){return $r(y,l),Br(v,y)},function(v){throw Mo(y),v}):($r(y,l),Br(f,y))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===ic&&(f=void 0),n.D&&jr(f,!0),l){var b=[],g=[];Pt("Patches").M(i,f,b,g),l(b,g)}return f}St(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){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(f,function(b){return i.apply(void 0,[b].concat(h))})};var l,d,p=n.produce(i,a,function(f,y){l=f,d=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,d]}):[p,l,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var o=e.prototype;return o.createDraft=function(r){wt(r)||St(8),Mt(r)&&(r=Nl(r));var n=Yi(this),i=Mr(this,r,void 0);return i[D].C=!0,zr(n),i},o.finishDraft=function(r,n){var i=r&&r[D],a=i.A;return $r(a,n),Br(void 0,a)},o.setAutoFreeze=function(r){this.D=r},o.setUseProxies=function(r){r&&!ec&&St(20),this.O=r},o.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Pt("Patches").$;return Mt(r)?l(r,n):this.produce(r,function(d){return l(d,n)})},e}(),mt=new Il,Pl=mt.produce,sm=mt.produceWithPatches.bind(mt),dm=mt.setAutoFreeze.bind(mt),fm=mt.setUseProxies.bind(mt),pm=mt.applyPatches.bind(mt),um=mt.createDraft.bind(mt),ym=mt.finishDraft.bind(mt),Go=Pl;function oe(e){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},oe(e)}function Vr(e,o){if(oe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,o||"default");if(oe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(e)}function qr(e){var o=Vr(e,"string");return oe(o)==="symbol"?o:String(o)}function Yr(e,o,r){return o=qr(o),o in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}function lc(e,o){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fo(e){for(var o=1;o<arguments.length;o++){var r=arguments[o]!=null?arguments[o]:{};o%2?lc(Object(r),!0).forEach(function(n){Yr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var sc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Xr=function(){return Math.random().toString(36).substring(7).split("").join(".")},jo={INIT:"@@redux/INIT"+Xr(),REPLACE:"@@redux/REPLACE"+Xr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xr()}};function kl(e){if(typeof e!="object"||e===null)return!1;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(e)===o}function Jr(e,o,r){var n;if(typeof o=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(tt(0));if(typeof o=="function"&&typeof r>"u"&&(r=o,o=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(tt(1));return r(Jr)(e,o)}if(typeof e!="function")throw new Error(tt(2));var i=e,a=o,l=[],d=l,p=!1;function f(){d===l&&(d=l.slice())}function y(){if(p)throw new Error(tt(3));return a}function h(v){if(typeof v!="function")throw new Error(tt(4));if(p)throw new Error(tt(5));var R=!0;return f(),d.push(v),function(){if(R){if(p)throw new Error(tt(6));R=!1,f();var N=d.indexOf(v);d.splice(N,1),l=null}}}function m(v){if(!kl(v))throw new Error(tt(7));if(typeof v.type>"u")throw new Error(tt(8));if(p)throw new Error(tt(9));try{p=!0,a=i(a,v)}finally{p=!1}for(var R=l=d,E=0;E<R.length;E++){var N=R[E];N()}return v}function b(v){if(typeof v!="function")throw new Error(tt(10));i=v,m({type:jo.REPLACE})}function g(){var v,R=h;return v={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(tt(11));function I(){N.next&&N.next(y())}I();var T=R(I);return{unsubscribe:T}}},v[sc]=function(){return this},v}return m({type:jo.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:b},n[sc]=g,n}function Tl(e){Object.keys(e).forEach(function(o){var r=e[o],n=r(void 0,{type:jo.INIT});if(typeof n>"u")throw new Error(tt(12));if(typeof r(void 0,{type:jo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(tt(13))})}function dc(e){for(var o=Object.keys(e),r={},n=0;n<o.length;n++){var i=o[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),l,d;try{Tl(r)}catch(p){d=p}return function(f,y){if(f===void 0&&(f={}),d)throw d;if(0)var h;for(var m=!1,b={},g=0;g<a.length;g++){var v=a[g],R=r[v],E=f[v],N=R(E,y);if(typeof N>"u"){var I=y&&y.type;throw new Error(tt(14))}b[v]=N,m=m||N!==E}return m=m||a.length!==Object.keys(f).length,m?b:f}}function _e(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return o.length===0?function(n){return n}:o.length===1?o[0]:o.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function fc(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(tt(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},d=o.map(function(p){return p(l)});return a=_e.apply(void 0,d)(i.dispatch),Fo(Fo({},i),{},{dispatch:a})}}}function pc(e){var o=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,a,e):l(d)}}};return o}var uc=pc();uc.withExtraArgument=pc;var Qr=uc;var bc=function(){var e=function(o,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(o,r)};return function(o,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),$l=function(e,o){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(y){return p([f,y])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=o.call(e,r)}catch(y){f=[6,y],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},We=function(e,o){for(var r=0,n=o.length,i=e.length;r<n;r++,i++)e[i]=o[r];return e},Bl=Object.defineProperty,_l=Object.defineProperties,Wl=Object.getOwnPropertyDescriptors,yc=Object.getOwnPropertySymbols,Dl=Object.prototype.hasOwnProperty,zl=Object.prototype.propertyIsEnumerable,hc=function(e,o,r){return o in e?Bl(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r},re=function(e,o){for(var r in o||(o={}))Dl.call(o,r)&&hc(e,r,o[r]);if(yc)for(var n=0,i=yc(o);n<i.length;n++){var r=i[n];zl.call(o,r)&&hc(e,r,o[r])}return e},tn=function(e,o){return _l(e,Wl(o))},Ml=function(e,o,r){return new Promise(function(n,i){var a=function(p){try{d(r.next(p))}catch(f){i(f)}},l=function(p){try{d(r.throw(p))}catch(f){i(f)}},d=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,l)};d((r=r.apply(e,o)).next())})};var Ul=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_e:_e.apply(null,arguments)},km=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Hl(e){if(typeof e!="object"||e===null)return!1;var o=Object.getPrototypeOf(e);if(o===null)return!0;for(var r=o;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return o===r}var Gl=function(e){bc(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,o.prototype),i}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,We([void 0],r[0].concat(this)))):new(o.bind.apply(o,We([void 0],r.concat(this))))},o}(Array),Fl=function(e){bc(o,e);function o(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,o.prototype),i}return Object.defineProperty(o,Symbol.species,{get:function(){return o},enumerable:!1,configurable:!0}),o.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},o.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(o.bind.apply(o,We([void 0],r[0].concat(this)))):new(o.bind.apply(o,We([void 0],r.concat(this))))},o}(Array);function rn(e){return wt(e)?Go(e,function(){}):e}function jl(e){return typeof e=="boolean"}function Kl(){return function(o){return Zl(o)}}function Zl(e){e===void 0&&(e={});var o=e.thunk,r=o===void 0?!0:o,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,l=a===void 0?!0:a,d=new Gl;if(r&&(jl(r)?d.push(Qr):d.push(Qr.withExtraArgument(r.extraArgument))),0){if(i)var p;if(l)var f}return d}var en=!0;function xc(e){var o=Kl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,l=a===void 0?o():a,d=r.devTools,p=d===void 0?!0:d,f=r.preloadedState,y=f===void 0?void 0:f,h=r.enhancers,m=h===void 0?void 0:h,b;if(typeof i=="function")b=i;else if(Hl(i))b=dc(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 g=l;if(typeof g=="function"&&(g=g(o),!en&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!en&&g.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=fc.apply(void 0,g),R=_e;p&&(R=Ul(re({trace:!en},typeof p=="object"&&p)));var E=new Fl(v),N=E;Array.isArray(m)?N=We([v],m):typeof m=="function"&&(N=m(E));var I=R.apply(void 0,N);return Jr(b,y,I)}function ne(e,o){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(o){var a=o.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return re(re({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function vc(e){var o={},r=[],n,i={addCase:function(a,l){var d=typeof a=="string"?a:a.type;if(d in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[d]=l,i},addMatcher:function(a,l){return r.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[o,r,n]}function Vl(e){return typeof e=="function"}function ql(e,o,r,n){r===void 0&&(r=[]);var i=typeof o=="function"?vc(o):[o,r,n],a=i[0],l=i[1],d=i[2],p;if(Vl(e))p=function(){return rn(e())};else{var f=rn(e);p=function(){return f}}function y(h,m){h===void 0&&(h=p());var b=We([a[m.type]],l.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[d]),b.reduce(function(g,v){if(v)if(Mt(g)){var R=g,E=v(R,m);return E===void 0?g:E}else{if(wt(g))return Go(g,function(N){return v(N,m)});var E=v(g,m);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return g},h)}return y.getInitialState=p,y}function Yl(e,o){return e+"/"+o}function Sc(e){var o=e.name;if(!o)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},l={},d={};i.forEach(function(y){var h=n[y],m=Yl(o,y),b,g;"reducer"in h?(b=h.reducer,g=h.prepare):b=h,a[y]=b,l[m]=b,d[y]=g?ne(m,g):ne(m)});function p(){var y=typeof e.extraReducers=="function"?vc(e.extraReducers):[e.extraReducers],h=y[0],m=h===void 0?{}:h,b=y[1],g=b===void 0?[]:b,v=y[2],R=v===void 0?void 0:v,E=re(re({},m),l);return ql(r,function(N){for(var I in E)N.addCase(I,E[I]);for(var T=0,$=g;T<$.length;T++){var gt=$[T];N.addMatcher(gt.matcher,gt.reducer)}R&&N.addDefaultCase(R)})}var f;return{name:o,reducer:function(y,h){return f||(f=p()),f(y,h)},actions:d,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Xl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jl=function(e){e===void 0&&(e=21);for(var o="",r=e;r--;)o+=Xl[Math.random()*64|0];return o},Ql=["name","message","stack","code"],on=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),mc=function(){function e(o,r){this.payload=o,this.meta=r}return e}(),ts=function(e){if(typeof e=="object"&&e!==null){for(var o={},r=0,n=Ql;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(o[i]=e[i])}return o}return{message:String(e)}},_m=function(){function e(o,r,n){var i=ne(o+"/fulfilled",function(y,h,m,b){return{payload:y,meta:tn(re({},b||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=ne(o+"/pending",function(y,h,m){return{payload:void 0,meta:tn(re({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=ne(o+"/rejected",function(y,h,m,b,g){return{payload:b,error:(n&&n.serializeError||ts)(y||"Rejected"),meta:tn(re({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!b,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 f(y){return function(h,m,b){var g=n?.idGenerator?n.idGenerator(y):Jl(),v=new p,R,E=!1;function N(T){R=T,v.abort()}var I=function(){return Ml(this,null,function(){var T,$,gt,Ht,cr,Gt,pt;return $l(this,function(bt){switch(bt.label){case 0:return bt.trys.push([0,4,,5]),Ht=(T=n?.condition)==null?void 0:T.call(n,y,{getState:m,extra:b}),os(Ht)?[4,Ht]:[3,2];case 1:Ht=bt.sent(),bt.label=2;case 2:if(Ht===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,cr=new Promise(function(ut,ae){return v.signal.addEventListener("abort",function(){return ae({name:"AbortError",message:R||"Aborted"})})}),h(a(g,y,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:g,arg:y},{getState:m,extra:b}))),[4,Promise.race([cr,Promise.resolve(r(y,{dispatch:h,getState:m,extra:b,requestId:g,signal:v.signal,abort:N,rejectWithValue:function(ut,ae){return new on(ut,ae)},fulfillWithValue:function(ut,ae){return new mc(ut,ae)}})).then(function(ut){if(ut instanceof on)throw ut;return ut instanceof mc?i(ut.payload,g,y,ut.meta):i(ut,g,y)})])];case 3:return gt=bt.sent(),[3,5];case 4:return Gt=bt.sent(),gt=Gt instanceof on?l(null,g,y,Gt.payload,Gt.meta):l(Gt,g,y),[3,5];case 5:return pt=n&&!n.dispatchConditionRejection&&l.match(gt)&>.meta.condition,pt||h(gt),[2,gt]}})})}();return Object.assign(I,{abort:N,requestId:g,arg:y,unwrap:function(){return I.then(es)}})}}return Object.assign(f,{pending:a,rejected:l,fulfilled:i,typePrefix:o})}return e.withTypes=function(){return e},e}();function es(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function os(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oc="listener",Cc="completed",wc="cancelled",Wm="task-"+wc,Dm="task-"+Cc,zm=Oc+"-"+wc,Mm=Oc+"-"+Cc;var nn="listenerMiddleware";var Um=ne(nn+"/add"),Hm=ne(nn+"/removeAll"),Gm=ne(nn+"/remove");var gc,Fm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(gc||(gc=Promise.resolve())).then(e).catch(function(o){return setTimeout(function(){throw o},0)})},rs=function(e){return function(o){setTimeout(o,e)}},jm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:rs(10);ac();function ns(e,o){return class extends e{constructor(){super(...arguments),this.eventBus=o??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}var Ko=class extends ns(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ec=class e extends Ko{static get(o){var r;let n=typeof o=="string"?o:o.name,i=typeof o=="string"?void 0:o,a=window.ftReduxStores[n];if(oo(a))return a;if(i==null)return;let l=Sc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),d=xc({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[i.name]=new e(l,d)}constructor(o,r){super(),this.reduxSlice=o,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Bo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,l)=>{let d=a,p=i[d];return p?(...f)=>{let y=p(...f.map(n));return this.reduxStore.dispatch(y),y}:f=>{this.setState({[d]:n(f)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(o){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(o).join("_"),overwrites:o})}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(o){throw new Error("Not implemented yet.")}subscribe(o){return this.reduxStore.subscribe(o)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Yo=S(P());var Zo=class extends Yt{async listMySearches(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(o.profile.userId),5*60*1e3):[]}};var Vo=class extends Yt{async listMyBookmarks(){let o=L.getState().session;return o?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(o.profile.userId),5*60*1e3):[]}};var is="ft-user-assets",qo=Yo.FtReduxStore.get({name:is,initialState:{savedSearches:void 0,bookmarks:void 0}}),an=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vo,this.savedSearchesService=new Zo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var o;let{session:r}=L.getState();(0,Yo.deepEqual)((o=this.currentSession)===null||o===void 0?void 0:o.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),qo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let o=await this.savedSearchesService.listMySearches();qo.actions.savedSearches(o)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var o;if(this.bookmarksAreUsed){let r=!((o=this.currentSession)===null||o===void 0)&&o.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;qo.actions.bookmarks(r)}}},Ng=new an;var cn=class{addCommand(o,r=!1){L.commands.add(o,r)}consumeCommand(o){return L.commands.consume(o)}};window.FluidTopicsAppInfoStoreService=new cn;var Nc=S(P()),ln=class{highlightHtml(o,r,n){(0,Nc.highlightHtml)(o,r,n)}};window.FluidTopicsHighlightHtmlService=new ln;var Ac=S(P());var sn=class{isDate(o){var r,n,i,a;return(a=(i=((n=(r=L.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(o,r){var n,i,a;return Ac.DateFormatter.format(o,(n=r?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new sn;var cs=S(P());(0,Rc.customElement)("ft-app-context")(H);var Ic=S(K()),ls=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},dn=Symbol("i18nAttributes"),fn=Symbol("i18nListAttributes"),Xo=Symbol("i18nProperties"),pn=Symbol("i18nManualContexts"),lo=Symbol("i18nUnsubs");function tr(e){var o,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[o]=new Map,this[r]=new Map}get i18nService(){return this.useCustomMessageContexts?_i:ye}i18n(a,l,...d){var p;if(typeof a=="string")return this.i18nService.resolveMessage(a,l,...d);let f=(p=a.args)!==null&&p!==void 0?p:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...f)}onI18nUpdate(a){var l,d,p;(l=this[dn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,f,a))}),(d=this[fn])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(m=>this.getI18nAttributeMessage(m,f,a))}),(p=this[Xo])===null||p===void 0||p.forEach((f,y)=>{f.context.toLowerCase()===a.toLowerCase()&&(this[y]=this.i18n(f))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,l){return{...a,message:this.i18n({context:a.context,key:a.key,...l})}}getI18nAttributeMessage(a,l,d){var p;let f=!d||((p=a.context)===null||p===void 0?void 0:p.toLowerCase())===d.toLowerCase();return a.context&&a.key&&f?this.buildI18nAttributeMessage(a,l):a}update(a){var l,d,p;super.update(a),(l=this[dn])===null||l===void 0||l.forEach((f,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(a.has(y)||f.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,a,y),this[y]=this.getI18nAttributeMessage(h,f))}),(d=this[fn])===null||d===void 0||d.forEach((f,y)=>{let h=this.getI18nListAttributeValues(y);(a.has(y)||f.argsProvider!=null)&&(this[y]=h?.map(m=>(this.addI18nContextIfNeeded(m,a,y),this.getI18nAttributeMessage(m,f))))}),(p=this[Xo])===null||p===void 0||p.forEach((f,y)=>{f.argsProvider!=null&&(this[y]=this.i18n(f))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,l,d){a.context&&a.key&&l.has(d)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,l){a=a.toLowerCase(),this[lo].has(a)||this[lo].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,l??{}),this.onI18nUpdate(a)}connectedCallback(){var a,l,d,p,f,y;super.connectedCallback(),new Set([...(l=(a=this[Xo])===null||a===void 0?void 0:a.values())!==null&&l!==void 0?l:[],...[...(p=(d=this[dn])===null||d===void 0?void 0:d.keys())!==null&&p!==void 0?p:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(f=this[fn])===null||f===void 0?void 0:f.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[pn].forEach((h,m)=>{this.addI18nMessages(m,h)})}addI18nMessages(a,l){this[pn].set(a,l??{}),this.addI18nMessagesAndSubscribe(a,l)}addI18nContext(a,l){this.addI18nMessages(typeof a=="string"?a:a.name,l)}disconnectedCallback(){super.disconnectedCallback(),this[lo].forEach(a=>a()),this[lo].clear()}}return o=pn,r=lo,ls([(0,Ic.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Lc=class extends tr(Qo.FtLitElement){},Jo=class extends tr(Qo.FtLitElementRedux){};var so=function(e,o,r,n){var i=arguments.length,a=i<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,o,r,n);else for(var d=e.length-1;d>=0;d--)(l=e[d])&&(a=(i<3?l(a):i>3?l(o,r,a):l(o,r))||a);return i>3&&a&&Object.defineProperty(o,r,a),a},Et=class extends Jo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":er.nothing:er.html`
|
|
1131
1131
|
<span class="ft-i18n">
|
|
1132
1132
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1133
1133
|
</span>
|