@fluid-topics/ft-reader-metadata 1.1.99 → 1.1.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1262,7 +1262,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1262
1262
|
`}};dt.elementDefinitions={"ft-typography":ne};dt.styles=Ls;(0,Rr.customElement)("ft-floating-menu")(ct);(0,Rr.customElement)("ftds-floating-menu")(Qt);(0,Rr.customElement)("ft-floating-menu-item")(Oe);(0,Rr.customElement)("ft-floating-menu-label")(dt);var Yg=g(Ms(),1);var $s;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})($s||($s={}));var Us;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Us||(Us={}));var Bs;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Bs||(Bs={}));var Ws;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT"})(Ws||(Ws={}));var zs;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(zs||(zs={}));var Fs;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Fs||(Fs={}));var Hs;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Hs||(Hs={}));var Vs;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Vs||(Vs={}));var js;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(js||(js={}));var Gs;(function(e){e.ASC="ASC",e.DESC="DESC"})(Gs||(Gs={}));var Ks;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ks||(Ks={}));var Zs;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Zs||(Zs={}));var qs;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(qs||(qs={}));var fo;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(fo||(fo={}));var Ys;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(Ys||(Ys={}));var er;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(er||(er={}));var Xs;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS"})(Xs||(Xs={}));var se;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN",e.DEVELOPER="DEVELOPER"})(se||(se={}));var Js;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Js||(Js={}));var Gg={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.DEVELOPER]:[se.BETA_USER,se.DEBUG_USER]};function zc(e){var t,o,n,i,a;return((i=(o=(t=e.map)===null||t===void 0?void 0:t.openMode)!==null&&o!==void 0?o:(n=e.topic)===null||n===void 0?void 0:n.openMode)!==null&&i!==void 0?i:(a=e.document)===null||a===void 0?void 0:a.openMode)===fo.EXTERNAL}function bn(e){var t,o,n,i,a;if(zc(e))return(i=(o=(t=e.map)===null||t===void 0?void 0:t.originUrl)!==null&&o!==void 0?o:(n=e.topic)===null||n===void 0?void 0:n.originUrl)!==null&&i!==void 0?i:(a=e.document)===null||a===void 0?void 0:a.originUrl;switch(e.type){case er.MAP:return e.map.readerUrl;case er.DOCUMENT:return e.document.viewerUrl;case er.TOPIC:return e.topic.readerUrl}return""}var ic=g(el());var Mo=g(P());var Jl=g(P());var il=g(B()),De=g(q()),We=g(P());var tl=g(B());var rl=tl.css`
|
|
1263
1263
|
`;var uo=g(P()),Fc="ft-app-info",xn=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Hc={session:(e,t)=>{(0,uo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>_.eventBus.dispatchEvent(new xn(t.payload)),0))}},_=uo.FtReduxStore.get({name:Fc,reducers:Hc,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var ft=g(P());var vn=g(P());var Pt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=_.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=_.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var pt=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new vn.CacheRegistry,this.cache=t?i.commonCache:new vn.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Pt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Pt.await()}clearCache(){this.cache.clearAll()}};var ol,Vc=Symbol("clearAfterUnitTest"),ho=class extends pt{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ol]=()=>{this.defaultMessages={},this.cache=new ft.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ft.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var i,a,s;t=t.toLowerCase(),this.fetchContext(t);let c=(a=(i=this.cache.getNow(t))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new ft.ParametrizedLabelResolver((s=this.defaultMessages[t])!==null&&s!==void 0?s:{},c).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ft.delay)(0).then(()=>o()).catch(()=>null)))}};ol=Vc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ho{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ho{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var tr=window.FluidTopicsI18nService,nl=window.FluidTopicsCustomI18nService;var ye=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},X=class extends We.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=()=>Pt.get(),this.messageContexts=[],this.cache=new We.CacheRegistry,this.cleanSessionDebouncer=new We.Debouncer}render(){return il.html`
|
|
1264
1264
|
<slot></slot>
|
|
1265
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&_.actions.noCustom(this.noCustom),t.has("editorMode")&&_.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&_.actions.session(this.session),t.has("availableUiLocales")&&_.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>tr.addContext(o)),t.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};X.elementDefinitions={};X.styles=rl;ye([(0,De.property)()],X.prototype,"baseUrl",void 0);ye([(0,De.property)()],X.prototype,"apiIntegrationIdentifier",void 0);ye([(0,De.property)()],X.prototype,"uiLocale",void 0);ye([(0,We.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);ye([(0,We.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"editorMode",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"noCustom",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);ye([(0,De.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"withManualResources",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);ye([(0,De.property)({type:Object})],X.prototype,"apiProvider",void 0);ye([(0,We.jsonProperty)([])],X.prototype,"messageContexts",void 0);ye([(0,We.jsonProperty)(void 0)],X.prototype,"session",void 0);var Kn=g(q());function jc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!mo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!mo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!mo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function mo(e,t){try{return jc(e,t)}catch{return!1}}function yo(e,t){return!mo(e,t)}var al=g(q(),1);var Sn=e=>{let t=e??{};return(o,n)=>{var i;let a={hasChanged:yo,attribute:!1,...t};(0,al.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:c=>c[n],store:t.store})}};var go=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Nr=g(q(),1);var sl=g(q(),1);function ll(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,sl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:yo,...t??{}})}var bo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);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 dl=g(B(),1);var xo=window,Gc=xo.ShadowRoot&&(xo.ShadyCSS===void 0||xo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Db=Symbol();var cl=(e,t)=>{Gc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=xo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var vo=class extends dl.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return cl(n,t.elementStyles),n}};var So=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},hl,pl=Symbol("constructorPrototype"),fl=Symbol("constructorName"),ml=Symbol("exportpartsDebouncer"),ul=Symbol("dynamicDependenciesLoaded"),ut=class extends vo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[hl]=new bo(5),this[fl]=this.constructor.name,this[pl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fl]&&Object.setPrototypeOf(this,this[pl])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[ul]||(t[ul]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ml].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,a,s,c;let p=y=>y!=null&&y.trim().length>0,f=t.filter(p).map(y=>y.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let m=[...u.values()].flatMap(y=>f.map(x=>`${y}:${x}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};hl=ml;So([(0,Nr.property)()],ut.prototype,"exportpartsPrefix",void 0);So([ll([])],ut.prototype,"exportpartsPrefixes",void 0);So([(0,Nr.property)()],ut.prototype,"customStylesheet",void 0);So([(0,Nr.state)()],ut.prototype,"useAdoptedStyleSheets",void 0);function Tr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var yl,gl,bl,Oo=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),It=Symbol("internalStores"),Pr=class extends ut{constructor(){super(...arguments),this[yl]=new Map,this[gl]=new Map,this[bl]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[It].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[It].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[It].get(t)}addStore(t,o){var n;o=(n=o??(Tr(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[It].delete(o)}setupStore(t,o){this[It].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[It].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ht].has(t.store):this[ht].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ht].set(t,o.subscribe(()=>this.updateFromStores())),Tr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Oo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ht].forEach((t,o)=>this.unsubscribeFromStore(o)),this[Oo].forEach(t=>t()),this[Oo]=[]}unsubscribeFromStore(t){this[ht].has(t)&&this[ht].get(t)(),this[ht].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};yl=ht,gl=It,bl=Oo;Pr.reduxProperties=new Map;Pr.reduxReactiveProperties=new Set;Pr.reduxEventListeners=new Map;function Me(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function rt(e){return!!e&&!!e[G]}function ze(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ed}(e)||Array.isArray(e)||!!e[wl]||!!(!((t=e.constructor)===null||t===void 0)&&t[wl])||Pn(e)||In(e))}function Lt(e,t,o){o===void 0&&(o=!1),nr(e)===0?(o?Object.keys:or)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function nr(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Pn(e)?2:In(e)?3:0}function rr(e,t){return nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Kc(e,t){return nr(e)===2?e.get(t):e[t]}function Al(e,t,o){var n=nr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Rl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Pn(e){return Jc&&e instanceof Map}function In(e){return Qc&&e instanceof Set}function mt(e){return e.o||e.t}function Ln(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pl(e);delete t[G];for(var o=or(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function _n(e,t){return t===void 0&&(t=!1),kn(e)||rt(e)||!ze(e)||(nr(e)>1&&(e.set=e.add=e.clear=e.delete=Zc),Object.freeze(e),t&&Lt(e,function(o,n){return _n(n,!0)},!0)),e}function Zc(){Me(2)}function kn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ke(e){var t=Tn[e];return t||Me(18,e),t}function qc(e,t){Tn[e]||(Tn[e]=t)}function An(){return Lr}function On(e,t){t&&(Ke("Patches"),e.u=[],e.s=[],e.v=t)}function Co(e){Rn(e),e.p.forEach(Yc),e.p=null}function Rn(e){e===Lr&&(Lr=e.l)}function xl(e){return Lr={p:[],l:Lr,h:e,m:!0,_:0}}function Yc(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Cn(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ke("ES5").S(t,e,n),n?(o[G].P&&(Co(t),Me(4)),ze(e)&&(e=Eo(t,e),t.l||wo(t,e)),t.u&&Ke("Patches").M(o[G].t,e,t.u,t.s)):e=Eo(t,o,[]),Co(t),t.u&&t.v(t.u,t.s),e!==Tl?e:void 0}function Eo(e,t,o){if(kn(t))return t;var n=t[G];if(!n)return Lt(t,function(c,p){return vl(e,n,t,c,p,o)},!0),t;if(n.A!==e)return t;if(!n.P)return wo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ln(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Lt(a,function(c,p){return vl(e,n,i,c,p,o,s)}),wo(e,i,!1),o&&e.u&&Ke("Patches").N(n,o,e.u,e.s)}return n.o}function vl(e,t,o,n,i,a,s){if(rt(i)){var c=Eo(e,i,a&&t&&t.i!==3&&!rr(t.R,n)?a.concat(n):void 0);if(Al(o,n,c),!rt(c))return;e.m=!1}else s&&o.add(i);if(ze(i)&&!kn(i)){if(!e.h.D&&e._<1)return;Eo(e,i),t&&t.A.l||wo(e,i)}}function wo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&_n(t,o)}function En(e,t){var o=e[G];return(o?mt(o):e)[t]}function Sl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function yt(e){e.P||(e.P=!0,e.l&&yt(e.l))}function wn(e){e.o||(e.o=Ln(e.t))}function Nn(e,t,o){var n=Pn(t)?Ke("MapSet").F(t,o):In(t)?Ke("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:An(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=_r;s&&(p=[c],f=Ir);var u=Proxy.revocable(p,f),m=u.revoke,y=u.proxy;return c.k=y,c.j=m,y}(t,o):Ke("ES5").J(t,o);return(o?o.A:An()).p.push(n),n}function Xc(e){return rt(e)||Me(22,e),function t(o){if(!ze(o))return o;var n,i=o[G],a=nr(o);if(i){if(!i.P&&(i.i<4||!Ke("ES5").K(i)))return i.t;i.I=!0,n=Ol(o,a),i.I=!1}else n=Ol(o,a);return Lt(n,function(s,c){i&&Kc(i.t,s)===c||Al(n,s,t(c))}),a===3?new Set(n):n}(e)}function Ol(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ln(e)}function Nl(){function e(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[G];return _r.get(f,s)},set:function(f){var u=this[G];_r.set(u,s,f)}},p}function t(s){for(var c=s.length-1;c>=0;c--){var p=s[c][G];if(!p.P)switch(p.i){case 5:n(p)&&yt(p);break;case 4:o(p)&&yt(p)}}}function o(s){for(var c=s.t,p=s.k,f=or(p),u=f.length-1;u>=0;u--){var m=f[u];if(m!==G){var y=c[m];if(y===void 0&&!rr(c,m))return!0;var x=p[m],b=x&&x[G];if(b?b.t!==y:!Rl(x,y))return!0}}var S=!!c[G];return f.length!==or(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Me(3,JSON.stringify(mt(s)))}var a={};qc("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(m,y){if(m){for(var x=Array(y.length),b=0;b<y.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var S=Pl(y);delete S[G];for(var R=or(S),w=0;w<R.length;w++){var A=R[w];S[A]=e(A,m||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(y),S)}(p,s),u={i:p?5:4,A:c?c.A:An(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,G,{value:u,writable:!0}),f},S:function(s,c,p){p?rt(c)&&c[G].A===s&&t(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var m=u[G];if(m){var y=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Lt(x,function(I){I!==G&&(y[I]!==void 0||rr(y,I)?b[I]||f(x[I]):(b[I]=!0,yt(m)))}),Lt(y,function(I){x[I]!==void 0||rr(x,I)||(b[I]=!1,yt(m))});else if(S===5){if(n(m)&&(yt(m),b.length=!0),x.length<y.length)for(var R=x.length;R<y.length;R++)b[R]=!1;else for(var w=y.length;w<x.length;w++)b[w]=!0;for(var A=Math.min(x.length,y.length),L=0;L<A;L++)x.hasOwnProperty(L)||(b[L]=!0),b[L]===void 0&&f(x[L])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Cl,Lr,Dn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Jc=typeof Map<"u",Qc=typeof Set<"u",El=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Tl=Dn?Symbol.for("immer-nothing"):((Cl={})["immer-nothing"]=!0,Cl),wl=Dn?Symbol.for("immer-draftable"):"__$immer_draftable",G=Dn?Symbol.for("immer-state"):"__$immer_state";var ed=""+Object.prototype.constructor,or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pl=Object.getOwnPropertyDescriptors||function(e){var t={};return or(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},Tn={},_r={get:function(e,t){if(t===G)return e;var o=mt(e);if(!rr(o,t))return function(i,a,s){var c,p=Sl(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!ze(n)?n:n===En(e.t,t)?(wn(e),e.o[t]=Nn(e.A.h,n,e)):n},has:function(e,t){return t in mt(e)},ownKeys:function(e){return Reflect.ownKeys(mt(e))},set:function(e,t,o){var n=Sl(mt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=En(mt(e),t),a=i?.[G];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Rl(o,i)&&(o!==void 0||rr(e.t,t)))return!0;wn(e),yt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return En(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,wn(e),yt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=mt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Me(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Me(12)}},Ir={};Lt(_r,function(e,t){Ir[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ir.deleteProperty=function(e,t){return Ir.set.call(this,e,t,void 0)},Ir.set=function(e,t,o){return _r.set.call(this,e[0],t,o,e[0])};var td=function(){function e(o){var n=this;this.O=El,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var R=this;S===void 0&&(S=c);for(var w=arguments.length,A=Array(w>1?w-1:0),L=1;L<w;L++)A[L-1]=arguments[L];return p.produce(S,function(I){var z;return(z=a).call.apply(z,[R,I].concat(A))})}}var f;if(typeof a!="function"&&Me(6),s!==void 0&&typeof s!="function"&&Me(7),ze(i)){var u=xl(n),m=Nn(n,i,void 0),y=!0;try{f=a(m),y=!1}finally{y?Co(u):Rn(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return On(u,s),Cn(S,u)},function(S){throw Co(u),S}):(On(u,s),Cn(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Tl&&(f=void 0),n.D&&_n(f,!0),s){var x=[],b=[];Ke("Patches").M(i,f,x,b),s(x,b)}return f}Me(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,m=Array(u>1?u-1:0),y=1;y<u;y++)m[y-1]=arguments[y];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(f,u){s=f,c=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){ze(o)||Me(8),rt(o)&&(o=Xc(o));var n=xl(this),i=Nn(this,o,void 0);return i[G].C=!0,Rn(n),i},t.finishDraft=function(o,n){var i=o&&o[G],a=i.A;return On(a,n),Cn(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!El&&Me(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Ke("Patches").$;return rt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},e}(),Pe=new td,rd=Pe.produce,Kb=Pe.produceWithPatches.bind(Pe),Zb=Pe.setAutoFreeze.bind(Pe),qb=Pe.setUseProxies.bind(Pe),Yb=Pe.applyPatches.bind(Pe),Xb=Pe.createDraft.bind(Pe),Jb=Pe.finishDraft.bind(Pe),Ao=rd;function gt(e){"@babel/helpers - typeof";return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(e)}function Mn(e,t){if(gt(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(gt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $n(e){var t=Mn(e,"string");return gt(t)==="symbol"?t:String(t)}function Un(e,t,o){return t=$n(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Il(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Ro(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Il(Object(o),!0).forEach(function(n){Un(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Il(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function pe(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 Ll=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bn=function(){return Math.random().toString(36).substring(7).split("").join(".")},No={INIT:"@@redux/INIT"+Bn(),REPLACE:"@@redux/REPLACE"+Bn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bn()}};function od(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Wn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(pe(1));return o(Wn)(e,t)}if(typeof e!="function")throw new Error(pe(2));var i=e,a=t,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function u(){if(p)throw new Error(pe(3));return a}function m(S){if(typeof S!="function")throw new Error(pe(4));if(p)throw new Error(pe(5));var R=!0;return f(),c.push(S),function(){if(R){if(p)throw new Error(pe(6));R=!1,f();var A=c.indexOf(S);c.splice(A,1),s=null}}}function y(S){if(!od(S))throw new Error(pe(7));if(typeof S.type>"u")throw new Error(pe(8));if(p)throw new Error(pe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var R=s=c,w=0;w<R.length;w++){var A=R[w];A()}return S}function x(S){if(typeof S!="function")throw new Error(pe(10));i=S,y({type:No.REPLACE})}function b(){var S,R=m;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(pe(11));function L(){A.next&&A.next(u())}L();var I=R(L);return{unsubscribe:I}}},S[Ll]=function(){return this},S}return y({type:No.INIT}),n={dispatch:y,subscribe:m,getState:u,replaceReducer:x},n[Ll]=b,n}function nd(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:No.INIT});if(typeof n>"u")throw new Error(pe(12));if(typeof o(void 0,{type:No.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function _l(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,c;try{nd(o)}catch(p){c=p}return function(f,u){if(f===void 0&&(f={}),c)throw c;if(0)var m;for(var y=!1,x={},b=0;b<a.length;b++){var S=a[b],R=o[S],w=f[S],A=R(w,u);if(typeof A>"u"){var L=u&&u.type;throw new Error(pe(14))}x[S]=A,y=y||A!==w}return y=y||a.length!==Object.keys(f).length,y?x:f}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function kl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(pe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(p){return p(s)});return a=ir.apply(void 0,c)(i.dispatch),Ro(Ro({},i),{},{dispatch:a})}}}function Dl(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,e):s(c)}}};return t}var Ml=Dl();Ml.withExtraArgument=Dl;var zn=Ml;var zl=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),id=function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,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 o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(e,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ar=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},ad=Object.defineProperty,sd=Object.defineProperties,ld=Object.getOwnPropertyDescriptors,$l=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,dd=Object.prototype.propertyIsEnumerable,Ul=function(e,t,o){return t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},bt=function(e,t){for(var o in t||(t={}))cd.call(t,o)&&Ul(e,o,t[o]);if($l)for(var n=0,i=$l(t);n<i.length;n++){var o=i[n];dd.call(t,o)&&Ul(e,o,t[o])}return e},Fn=function(e,t){return sd(e,ld(t))},pd=function(e,t,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(e,t)).next())})};var fd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function ud(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var hd=function(e){zl(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ar([void 0],o[0].concat(this)))):new(t.bind.apply(t,ar([void 0],o.concat(this))))},t}(Array),md=function(e){zl(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ar([void 0],o[0].concat(this)))):new(t.bind.apply(t,ar([void 0],o.concat(this))))},t}(Array);function jn(e){return ze(e)?Ao(e,function(){}):e}function yd(e){return typeof e=="boolean"}function gd(){return function(t){return bd(t)}}function bd(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,c=new hd;if(o&&(yd(o)?c.push(zn):c.push(zn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var Hn=!0;function Fl(e){var t=gd(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,u=f===void 0?void 0:f,m=o.enhancers,y=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(ud(i))x=_l(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=s;if(typeof b=="function"&&(b=b(t),!Hn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hn&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kl.apply(void 0,b),R=ir;p&&(R=fd(bt({trace:!Hn},typeof p=="object"&&p)));var w=new md(S),A=w;Array.isArray(y)?A=ar([S],y):typeof y=="function"&&(A=y(w));var L=R.apply(void 0,A);return Wn(x,u,L)}function xt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return bt(bt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function Hl(e){var t={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function xd(e){return typeof e=="function"}function vd(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Hl(t):[t,o,n],a=i[0],s=i[1],c=i[2],p;if(xd(e))p=function(){return jn(e())};else{var f=jn(e);p=function(){return f}}function u(m,y){m===void 0&&(m=p());var x=ar([a[y.type]],s.filter(function(b){var S=b.matcher;return S(y)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(rt(b)){var R=b,w=S(R,y);return w===void 0?b:w}else{if(ze(b))return Ao(b,function(A){return S(A,y)});var w=S(b,y);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},m)}return u.getInitialState=p,u}function Sd(e,t){return e+"/"+t}function Vl(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:jn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(u){var m=n[u],y=Sd(t,u),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[u]=x,s[y]=x,c[u]=b?xt(y,b):xt(y)});function p(){var u=typeof e.extraReducers=="function"?Hl(e.extraReducers):[e.extraReducers],m=u[0],y=m===void 0?{}:m,x=u[1],b=x===void 0?[]:x,S=u[2],R=S===void 0?void 0:S,w=bt(bt({},y),s);return vd(o,function(A){for(var L in w)A.addCase(L,w[L]);for(var I=0,z=b;I<z.length;I++){var ge=z[I];A.addMatcher(ge.matcher,ge.reducer)}R&&A.addDefaultCase(R)})}var f;return{name:t,reducer:function(u,m){return f||(f=p()),f(u,m)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Od="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cd=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Od[Math.random()*64|0];return t},Ed=["name","message","stack","code"],Vn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Bl=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),wd=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Ed;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},vx=function(){function e(t,o,n){var i=xt(t+"/fulfilled",function(u,m,y,x){return{payload:u,meta:Fn(bt({},x||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=xt(t+"/pending",function(u,m,y){return{payload:void 0,meta:Fn(bt({},y||{}),{arg:m,requestId:u,requestStatus:"pending"})}}),s=xt(t+"/rejected",function(u,m,y,x,b){return{payload:x,error:(n&&n.serializeError||wd)(u||"Rejected"),meta:Fn(bt({},b||{}),{arg:y,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(m,y,x){var b=n?.idGenerator?n.idGenerator(u):Cd(),S=new p,R,w=!1;function A(I){R=I,S.abort()}var L=function(){return pd(this,null,function(){var I,z,ge,re,sr,Ie,h;return id(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),re=(I=n?.condition)==null?void 0:I.call(n,u,{getState:y,extra:x}),Rd(re)?[4,re]:[3,2];case 1:re=v.sent(),v.label=2;case 2:if(re===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,sr=new Promise(function(N,V){return S.signal.addEventListener("abort",function(){return V({name:"AbortError",message:R||"Aborted"})})}),m(a(b,u,(z=n?.getPendingMeta)==null?void 0:z.call(n,{requestId:b,arg:u},{getState:y,extra:x}))),[4,Promise.race([sr,Promise.resolve(o(u,{dispatch:m,getState:y,extra:x,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(N,V){return new Vn(N,V)},fulfillWithValue:function(N,V){return new Bl(N,V)}})).then(function(N){if(N instanceof Vn)throw N;return N instanceof Bl?i(N.payload,b,u,N.meta):i(N,b,u)})])];case 3:return ge=v.sent(),[3,5];case 4:return Ie=v.sent(),ge=Ie instanceof Vn?s(null,b,u,Ie.payload,Ie.meta):s(Ie,b,u),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(ge)&&ge.meta.condition,h||m(ge),[2,ge]}})})}();return Object.assign(L,{abort:A,requestId:b,arg:u,unwrap:function(){return L.then(Ad)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ad(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Rd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jl="listener",Gl="completed",Kl="cancelled",Sx="task-"+Kl,Ox="task-"+Gl,Cx=jl+"-"+Kl,Ex=jl+"-"+Gl;var Gn="listenerMiddleware";var wx=xt(Gn+"/add"),Ax=xt(Gn+"/removeAll"),Rx=xt(Gn+"/remove");var Wl,Nx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Wl||(Wl=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Nd=function(e){return function(t){setTimeout(t,e)}},Tx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Nd(10);Nl();window.ftReduxStores||(window.ftReduxStores={});var Zl=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(Tr(a))return a;if(i==null)return;let s=Vl({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Fl({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new e(s,c)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new go,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var To=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getDateFormat(n,i)):t}static getDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}};var Po=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};function ql(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}formatDateValues(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n?.key))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?this.formatMetadataDates(n):n}formatMetadataDates(n){return{key:n.key,label:n.label,values:n.values.map(i=>To.format(i,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat)),hierarchicalValues:n.hierarchicalValues}}}return Po([(0,Kn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Po([(0,Kn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Po([Sn({store:_.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Po([Sn({store:_.name})],t.prototype,"uiLocale",void 0),t}var ko=g(P());var Io=class extends pt{async listMySearches(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Lo=class extends pt{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Td="ft-user-assets",_o=ko.FtReduxStore.get({name:Td,initialState:{savedSearches:void 0,bookmarks:void 0}}),Zn=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Io,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=_.getState();(0,ko.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_o.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_o.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_o.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_o.actions.bookmarks(o)}}},rv=new Zn;var qn=class{addCommand(t,o=!1){_.commands.add(t,o)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Yl=g(P()),Yn=class{highlightHtml(t,o){(0,Yl.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new Yn;var Xl=g(P());var Xn=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Xl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Xn;(0,Jl.customElement)("ft-app-context")(X);var ec=g(q()),Pd=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Jn=Symbol("i18nAttributes"),_t=Symbol("i18nProperties"),kr=Symbol("i18nUnsubs");function $o(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?nl:tr}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[Jn])===null||a===void 0||a.forEach((c,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,u,c)}),(s=this[_t])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Jn])===null||a===void 0||a.forEach((c,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,c))}),(s=this[_t])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[_t])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Jn])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[kr].has(i)||this[kr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[kr].forEach(i=>i()),this[kr].clear()}}return t=kr,Pd([(0,ec.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Ql=class extends $o(Mo.FtLitElement){},Do=class extends $o(Mo.FtLitElementRedux){};var nc=g(P());var Uo=g(B()),Bo=g(q()),Wo=g(P());var tc=g(B());var rc=tc.css`
|
|
1265
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&_.actions.noCustom(this.noCustom),t.has("editorMode")&&_.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&_.actions.session(this.session),t.has("availableUiLocales")&&_.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>tr.addContext(o)),t.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};X.elementDefinitions={};X.styles=rl;ye([(0,De.property)()],X.prototype,"baseUrl",void 0);ye([(0,De.property)()],X.prototype,"apiIntegrationIdentifier",void 0);ye([(0,De.property)()],X.prototype,"uiLocale",void 0);ye([(0,We.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);ye([(0,We.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"editorMode",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"noCustom",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);ye([(0,De.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"withManualResources",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);ye([(0,De.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);ye([(0,De.property)({type:Object})],X.prototype,"apiProvider",void 0);ye([(0,We.jsonProperty)([])],X.prototype,"messageContexts",void 0);ye([(0,We.jsonProperty)(void 0)],X.prototype,"session",void 0);var Kn=g(q());function jc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!mo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!mo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!mo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function mo(e,t){try{return jc(e,t)}catch{return!1}}function yo(e,t){return!mo(e,t)}var al=g(q(),1);var Sn=e=>{let t=e??{};return(o,n)=>{var i;let a={hasChanged:yo,attribute:!1,...t};(0,al.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:c=>c[n],store:t.store})}};var go=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Nr=g(q(),1);var sl=g(q(),1);function ll(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,sl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:yo,...t??{}})}var bo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);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 dl=g(B(),1);var xo=window,Gc=xo.ShadowRoot&&(xo.ShadyCSS===void 0||xo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Db=Symbol();var cl=(e,t)=>{Gc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=xo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var vo=class extends dl.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return cl(n,t.elementStyles),n}};var So=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},hl,pl=Symbol("constructorPrototype"),fl=Symbol("constructorName"),ml=Symbol("exportpartsDebouncer"),ul=Symbol("dynamicDependenciesLoaded"),ut=class extends vo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[hl]=new bo(5),this[fl]=this.constructor.name,this[pl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fl]&&Object.setPrototypeOf(this,this[pl])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[ul]||(t[ul]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ml].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,a,s,c;let p=y=>y!=null&&y.trim().length>0,f=t.filter(p).map(y=>y.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let m=[...u.values()].flatMap(y=>f.map(x=>`${y}:${x}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};hl=ml;So([(0,Nr.property)()],ut.prototype,"exportpartsPrefix",void 0);So([ll([])],ut.prototype,"exportpartsPrefixes",void 0);So([(0,Nr.property)()],ut.prototype,"customStylesheet",void 0);So([(0,Nr.state)()],ut.prototype,"useAdoptedStyleSheets",void 0);function Tr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var yl,gl,bl,Oo=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),It=Symbol("internalStores"),Pr=class extends ut{constructor(){super(...arguments),this[yl]=new Map,this[gl]=new Map,this[bl]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[It].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[It].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[It].get(t)}addStore(t,o){var n;o=(n=o??(Tr(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[It].delete(o)}setupStore(t,o){this[It].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[It].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[ht].has(t.store):this[ht].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[ht].set(t,o.subscribe(()=>this.updateFromStores())),Tr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.eventBus.addEventListener(i.eventName,s),this[Oo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ht].forEach((t,o)=>this.unsubscribeFromStore(o)),this[Oo].forEach(t=>t()),this[Oo]=[]}unsubscribeFromStore(t){this[ht].has(t)&&this[ht].get(t)(),this[ht].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};yl=ht,gl=It,bl=Oo;Pr.reduxProperties=new Map;Pr.reduxReactiveProperties=new Set;Pr.reduxEventListeners=new Map;function Me(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function rt(e){return!!e&&!!e[G]}function ze(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ed}(e)||Array.isArray(e)||!!e[wl]||!!(!((t=e.constructor)===null||t===void 0)&&t[wl])||Pn(e)||In(e))}function Lt(e,t,o){o===void 0&&(o=!1),nr(e)===0?(o?Object.keys:or)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function nr(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Pn(e)?2:In(e)?3:0}function rr(e,t){return nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Kc(e,t){return nr(e)===2?e.get(t):e[t]}function Al(e,t,o){var n=nr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Rl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Pn(e){return Jc&&e instanceof Map}function In(e){return Qc&&e instanceof Set}function mt(e){return e.o||e.t}function Ln(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pl(e);delete t[G];for(var o=or(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function _n(e,t){return t===void 0&&(t=!1),kn(e)||rt(e)||!ze(e)||(nr(e)>1&&(e.set=e.add=e.clear=e.delete=Zc),Object.freeze(e),t&&Lt(e,function(o,n){return _n(n,!0)},!0)),e}function Zc(){Me(2)}function kn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ke(e){var t=Tn[e];return t||Me(18,e),t}function qc(e,t){Tn[e]||(Tn[e]=t)}function An(){return Lr}function On(e,t){t&&(Ke("Patches"),e.u=[],e.s=[],e.v=t)}function Co(e){Rn(e),e.p.forEach(Yc),e.p=null}function Rn(e){e===Lr&&(Lr=e.l)}function xl(e){return Lr={p:[],l:Lr,h:e,m:!0,_:0}}function Yc(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Cn(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ke("ES5").S(t,e,n),n?(o[G].P&&(Co(t),Me(4)),ze(e)&&(e=Eo(t,e),t.l||wo(t,e)),t.u&&Ke("Patches").M(o[G].t,e,t.u,t.s)):e=Eo(t,o,[]),Co(t),t.u&&t.v(t.u,t.s),e!==Tl?e:void 0}function Eo(e,t,o){if(kn(t))return t;var n=t[G];if(!n)return Lt(t,function(c,p){return vl(e,n,t,c,p,o)},!0),t;if(n.A!==e)return t;if(!n.P)return wo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ln(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Lt(a,function(c,p){return vl(e,n,i,c,p,o,s)}),wo(e,i,!1),o&&e.u&&Ke("Patches").N(n,o,e.u,e.s)}return n.o}function vl(e,t,o,n,i,a,s){if(rt(i)){var c=Eo(e,i,a&&t&&t.i!==3&&!rr(t.R,n)?a.concat(n):void 0);if(Al(o,n,c),!rt(c))return;e.m=!1}else s&&o.add(i);if(ze(i)&&!kn(i)){if(!e.h.D&&e._<1)return;Eo(e,i),t&&t.A.l||wo(e,i)}}function wo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&_n(t,o)}function En(e,t){var o=e[G];return(o?mt(o):e)[t]}function Sl(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function yt(e){e.P||(e.P=!0,e.l&&yt(e.l))}function wn(e){e.o||(e.o=Ln(e.t))}function Nn(e,t,o){var n=Pn(t)?Ke("MapSet").F(t,o):In(t)?Ke("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:An(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=_r;s&&(p=[c],f=Ir);var u=Proxy.revocable(p,f),m=u.revoke,y=u.proxy;return c.k=y,c.j=m,y}(t,o):Ke("ES5").J(t,o);return(o?o.A:An()).p.push(n),n}function Xc(e){return rt(e)||Me(22,e),function t(o){if(!ze(o))return o;var n,i=o[G],a=nr(o);if(i){if(!i.P&&(i.i<4||!Ke("ES5").K(i)))return i.t;i.I=!0,n=Ol(o,a),i.I=!1}else n=Ol(o,a);return Lt(n,function(s,c){i&&Kc(i.t,s)===c||Al(n,s,t(c))}),a===3?new Set(n):n}(e)}function Ol(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ln(e)}function Nl(){function e(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[G];return _r.get(f,s)},set:function(f){var u=this[G];_r.set(u,s,f)}},p}function t(s){for(var c=s.length-1;c>=0;c--){var p=s[c][G];if(!p.P)switch(p.i){case 5:n(p)&&yt(p);break;case 4:o(p)&&yt(p)}}}function o(s){for(var c=s.t,p=s.k,f=or(p),u=f.length-1;u>=0;u--){var m=f[u];if(m!==G){var y=c[m];if(y===void 0&&!rr(c,m))return!0;var x=p[m],b=x&&x[G];if(b?b.t!==y:!Rl(x,y))return!0}}var S=!!c[G];return f.length!==or(c).length+(S?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Me(3,JSON.stringify(mt(s)))}var a={};qc("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(m,y){if(m){for(var x=Array(y.length),b=0;b<y.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var S=Pl(y);delete S[G];for(var R=or(S),w=0;w<R.length;w++){var A=R[w];S[A]=e(A,m||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(y),S)}(p,s),u={i:p?5:4,A:c?c.A:An(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,G,{value:u,writable:!0}),f},S:function(s,c,p){p?rt(c)&&c[G].A===s&&t(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var m=u[G];if(m){var y=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Lt(x,function(I){I!==G&&(y[I]!==void 0||rr(y,I)?b[I]||f(x[I]):(b[I]=!0,yt(m)))}),Lt(y,function(I){x[I]!==void 0||rr(x,I)||(b[I]=!1,yt(m))});else if(S===5){if(n(m)&&(yt(m),b.length=!0),x.length<y.length)for(var R=x.length;R<y.length;R++)b[R]=!1;else for(var w=y.length;w<x.length;w++)b[w]=!0;for(var A=Math.min(x.length,y.length),L=0;L<A;L++)x.hasOwnProperty(L)||(b[L]=!0),b[L]===void 0&&f(x[L])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Cl,Lr,Dn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Jc=typeof Map<"u",Qc=typeof Set<"u",El=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Tl=Dn?Symbol.for("immer-nothing"):((Cl={})["immer-nothing"]=!0,Cl),wl=Dn?Symbol.for("immer-draftable"):"__$immer_draftable",G=Dn?Symbol.for("immer-state"):"__$immer_state";var ed=""+Object.prototype.constructor,or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pl=Object.getOwnPropertyDescriptors||function(e){var t={};return or(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},Tn={},_r={get:function(e,t){if(t===G)return e;var o=mt(e);if(!rr(o,t))return function(i,a,s){var c,p=Sl(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!ze(n)?n:n===En(e.t,t)?(wn(e),e.o[t]=Nn(e.A.h,n,e)):n},has:function(e,t){return t in mt(e)},ownKeys:function(e){return Reflect.ownKeys(mt(e))},set:function(e,t,o){var n=Sl(mt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=En(mt(e),t),a=i?.[G];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Rl(o,i)&&(o!==void 0||rr(e.t,t)))return!0;wn(e),yt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return En(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,wn(e),yt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=mt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Me(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Me(12)}},Ir={};Lt(_r,function(e,t){Ir[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ir.deleteProperty=function(e,t){return Ir.set.call(this,e,t,void 0)},Ir.set=function(e,t,o){return _r.set.call(this,e[0],t,o,e[0])};var td=function(){function e(o){var n=this;this.O=El,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(S){var R=this;S===void 0&&(S=c);for(var w=arguments.length,A=Array(w>1?w-1:0),L=1;L<w;L++)A[L-1]=arguments[L];return p.produce(S,function(I){var z;return(z=a).call.apply(z,[R,I].concat(A))})}}var f;if(typeof a!="function"&&Me(6),s!==void 0&&typeof s!="function"&&Me(7),ze(i)){var u=xl(n),m=Nn(n,i,void 0),y=!0;try{f=a(m),y=!1}finally{y?Co(u):Rn(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return On(u,s),Cn(S,u)},function(S){throw Co(u),S}):(On(u,s),Cn(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Tl&&(f=void 0),n.D&&_n(f,!0),s){var x=[],b=[];Ke("Patches").M(i,f,x,b),s(x,b)}return f}Me(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,m=Array(u>1?u-1:0),y=1;y<u;y++)m[y-1]=arguments[y];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(f,u){s=f,c=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){ze(o)||Me(8),rt(o)&&(o=Xc(o));var n=xl(this),i=Nn(this,o,void 0);return i[G].C=!0,Rn(n),i},t.finishDraft=function(o,n){var i=o&&o[G],a=i.A;return On(a,n),Cn(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!El&&Me(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Ke("Patches").$;return rt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},e}(),Pe=new td,rd=Pe.produce,Kb=Pe.produceWithPatches.bind(Pe),Zb=Pe.setAutoFreeze.bind(Pe),qb=Pe.setUseProxies.bind(Pe),Yb=Pe.applyPatches.bind(Pe),Xb=Pe.createDraft.bind(Pe),Jb=Pe.finishDraft.bind(Pe),Ao=rd;function gt(e){"@babel/helpers - typeof";return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(e)}function Mn(e,t){if(gt(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(gt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $n(e){var t=Mn(e,"string");return gt(t)==="symbol"?t:String(t)}function Un(e,t,o){return t=$n(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Il(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Ro(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Il(Object(o),!0).forEach(function(n){Un(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Il(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function pe(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 Ll=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bn=function(){return Math.random().toString(36).substring(7).split("").join(".")},No={INIT:"@@redux/INIT"+Bn(),REPLACE:"@@redux/REPLACE"+Bn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bn()}};function od(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Wn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(pe(1));return o(Wn)(e,t)}if(typeof e!="function")throw new Error(pe(2));var i=e,a=t,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function u(){if(p)throw new Error(pe(3));return a}function m(S){if(typeof S!="function")throw new Error(pe(4));if(p)throw new Error(pe(5));var R=!0;return f(),c.push(S),function(){if(R){if(p)throw new Error(pe(6));R=!1,f();var A=c.indexOf(S);c.splice(A,1),s=null}}}function y(S){if(!od(S))throw new Error(pe(7));if(typeof S.type>"u")throw new Error(pe(8));if(p)throw new Error(pe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var R=s=c,w=0;w<R.length;w++){var A=R[w];A()}return S}function x(S){if(typeof S!="function")throw new Error(pe(10));i=S,y({type:No.REPLACE})}function b(){var S,R=m;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(pe(11));function L(){A.next&&A.next(u())}L();var I=R(L);return{unsubscribe:I}}},S[Ll]=function(){return this},S}return y({type:No.INIT}),n={dispatch:y,subscribe:m,getState:u,replaceReducer:x},n[Ll]=b,n}function nd(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:No.INIT});if(typeof n>"u")throw new Error(pe(12));if(typeof o(void 0,{type:No.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function _l(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,c;try{nd(o)}catch(p){c=p}return function(f,u){if(f===void 0&&(f={}),c)throw c;if(0)var m;for(var y=!1,x={},b=0;b<a.length;b++){var S=a[b],R=o[S],w=f[S],A=R(w,u);if(typeof A>"u"){var L=u&&u.type;throw new Error(pe(14))}x[S]=A,y=y||A!==w}return y=y||a.length!==Object.keys(f).length,y?x:f}}function ir(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function kl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(pe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(p){return p(s)});return a=ir.apply(void 0,c)(i.dispatch),Ro(Ro({},i),{},{dispatch:a})}}}function Dl(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,e):s(c)}}};return t}var Ml=Dl();Ml.withExtraArgument=Dl;var zn=Ml;var zl=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),id=function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,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 o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(e,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ar=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},ad=Object.defineProperty,sd=Object.defineProperties,ld=Object.getOwnPropertyDescriptors,$l=Object.getOwnPropertySymbols,cd=Object.prototype.hasOwnProperty,dd=Object.prototype.propertyIsEnumerable,Ul=function(e,t,o){return t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},bt=function(e,t){for(var o in t||(t={}))cd.call(t,o)&&Ul(e,o,t[o]);if($l)for(var n=0,i=$l(t);n<i.length;n++){var o=i[n];dd.call(t,o)&&Ul(e,o,t[o])}return e},Fn=function(e,t){return sd(e,ld(t))},pd=function(e,t,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(e,t)).next())})};var fd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ir:ir.apply(null,arguments)},yx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function ud(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var hd=function(e){zl(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ar([void 0],o[0].concat(this)))):new(t.bind.apply(t,ar([void 0],o.concat(this))))},t}(Array),md=function(e){zl(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ar([void 0],o[0].concat(this)))):new(t.bind.apply(t,ar([void 0],o.concat(this))))},t}(Array);function jn(e){return ze(e)?Ao(e,function(){}):e}function yd(e){return typeof e=="boolean"}function gd(){return function(t){return bd(t)}}function bd(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,c=new hd;if(o&&(yd(o)?c.push(zn):c.push(zn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var Hn=!0;function Fl(e){var t=gd(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,u=f===void 0?void 0:f,m=o.enhancers,y=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(ud(i))x=_l(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=s;if(typeof b=="function"&&(b=b(t),!Hn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hn&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kl.apply(void 0,b),R=ir;p&&(R=fd(bt({trace:!Hn},typeof p=="object"&&p)));var w=new md(S),A=w;Array.isArray(y)?A=ar([S],y):typeof y=="function"&&(A=y(w));var L=R.apply(void 0,A);return Wn(x,u,L)}function xt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return bt(bt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function Hl(e){var t={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function xd(e){return typeof e=="function"}function vd(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Hl(t):[t,o,n],a=i[0],s=i[1],c=i[2],p;if(xd(e))p=function(){return jn(e())};else{var f=jn(e);p=function(){return f}}function u(m,y){m===void 0&&(m=p());var x=ar([a[y.type]],s.filter(function(b){var S=b.matcher;return S(y)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(rt(b)){var R=b,w=S(R,y);return w===void 0?b:w}else{if(ze(b))return Ao(b,function(A){return S(A,y)});var w=S(b,y);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},m)}return u.getInitialState=p,u}function Sd(e,t){return e+"/"+t}function Vl(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:jn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(u){var m=n[u],y=Sd(t,u),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[u]=x,s[y]=x,c[u]=b?xt(y,b):xt(y)});function p(){var u=typeof e.extraReducers=="function"?Hl(e.extraReducers):[e.extraReducers],m=u[0],y=m===void 0?{}:m,x=u[1],b=x===void 0?[]:x,S=u[2],R=S===void 0?void 0:S,w=bt(bt({},y),s);return vd(o,function(A){for(var L in w)A.addCase(L,w[L]);for(var I=0,z=b;I<z.length;I++){var ge=z[I];A.addMatcher(ge.matcher,ge.reducer)}R&&A.addDefaultCase(R)})}var f;return{name:t,reducer:function(u,m){return f||(f=p()),f(u,m)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Od="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Cd=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Od[Math.random()*64|0];return t},Ed=["name","message","stack","code"],Vn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Bl=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),wd=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Ed;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},vx=function(){function e(t,o,n){var i=xt(t+"/fulfilled",function(u,m,y,x){return{payload:u,meta:Fn(bt({},x||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=xt(t+"/pending",function(u,m,y){return{payload:void 0,meta:Fn(bt({},y||{}),{arg:m,requestId:u,requestStatus:"pending"})}}),s=xt(t+"/rejected",function(u,m,y,x,b){return{payload:x,error:(n&&n.serializeError||wd)(u||"Rejected"),meta:Fn(bt({},b||{}),{arg:y,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(m,y,x){var b=n?.idGenerator?n.idGenerator(u):Cd(),S=new p,R,w=!1;function A(I){R=I,S.abort()}var L=function(){return pd(this,null,function(){var I,z,ge,re,sr,Ie,h;return id(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),re=(I=n?.condition)==null?void 0:I.call(n,u,{getState:y,extra:x}),Rd(re)?[4,re]:[3,2];case 1:re=v.sent(),v.label=2;case 2:if(re===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,sr=new Promise(function(N,V){return S.signal.addEventListener("abort",function(){return V({name:"AbortError",message:R||"Aborted"})})}),m(a(b,u,(z=n?.getPendingMeta)==null?void 0:z.call(n,{requestId:b,arg:u},{getState:y,extra:x}))),[4,Promise.race([sr,Promise.resolve(o(u,{dispatch:m,getState:y,extra:x,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(N,V){return new Vn(N,V)},fulfillWithValue:function(N,V){return new Bl(N,V)}})).then(function(N){if(N instanceof Vn)throw N;return N instanceof Bl?i(N.payload,b,u,N.meta):i(N,b,u)})])];case 3:return ge=v.sent(),[3,5];case 4:return Ie=v.sent(),ge=Ie instanceof Vn?s(null,b,u,Ie.payload,Ie.meta):s(Ie,b,u),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(ge)&&ge.meta.condition,h||m(ge),[2,ge]}})})}();return Object.assign(L,{abort:A,requestId:b,arg:u,unwrap:function(){return L.then(Ad)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ad(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Rd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jl="listener",Gl="completed",Kl="cancelled",Sx="task-"+Kl,Ox="task-"+Gl,Cx=jl+"-"+Kl,Ex=jl+"-"+Gl;var Gn="listenerMiddleware";var wx=xt(Gn+"/add"),Ax=xt(Gn+"/removeAll"),Rx=xt(Gn+"/remove");var Wl,Nx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Wl||(Wl=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Nd=function(e){return function(t){setTimeout(t,e)}},Tx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Nd(10);Nl();window.ftReduxStores||(window.ftReduxStores={});var Zl=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(Tr(a))return a;if(i==null)return;let s=Vl({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Fl({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new e(s,c)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new go,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var To=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getDateFormat(n,i)):t}static getDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}};var Po=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};function ql(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}formatDateValues(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n?.key))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?this.formatMetadataDates(n):n}formatMetadataDates(n){return{key:n.key,label:n.label,values:n.values.map(i=>To.format(i,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat)),hierarchicalValues:n.hierarchicalValues}}}return Po([(0,Kn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Po([(0,Kn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Po([Sn({store:_.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Po([Sn({store:_.name})],t.prototype,"uiLocale",void 0),t}var ko=g(P());var Io=class extends pt{async listMySearches(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Lo=class extends pt{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Td="ft-user-assets",_o=ko.FtReduxStore.get({name:Td,initialState:{savedSearches:void 0,bookmarks:void 0}}),Zn=class{constructor(){this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Io,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=_.getState();(0,ko.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_o.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_o.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_o.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;_o.actions.bookmarks(o)}}},rv=new Zn;var qn=class{addCommand(t,o=!1){_.commands.add(t,o)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Yl=g(P()),Yn=class{highlightHtml(t,o,n){(0,Yl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Yn;var Xl=g(P());var Xn=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Xl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Xn;(0,Jl.customElement)("ft-app-context")(X);var ec=g(q()),Pd=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Jn=Symbol("i18nAttributes"),_t=Symbol("i18nProperties"),kr=Symbol("i18nUnsubs");function $o(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?nl:tr}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[Jn])===null||a===void 0||a.forEach((c,p)=>{var f;let u=this.getI18nAttributeValue(p);((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,u,c)}),(s=this[_t])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Jn])===null||a===void 0||a.forEach((c,p)=>{let f=this.getI18nAttributeValue(p);f?.context&&f.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(f.context),this.updateI18nAttributeMessage(p,f,c))}),(s=this[_t])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[_t])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Jn])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[kr].has(i)||this[kr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[kr].forEach(i=>i()),this[kr].clear()}}return t=kr,Pd([(0,ec.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Ql=class extends $o(Mo.FtLitElement){},Do=class extends $o(Mo.FtLitElementRedux){};var nc=g(P());var Uo=g(B()),Bo=g(q()),Wo=g(P());var tc=g(B());var rc=tc.css`
|
|
1266
1266
|
`;var Dr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Fe=class extends Do{constructor(){super(),this.editorMode=!1,this.addStore(_)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Uo.nothing:Uo.html`
|
|
1267
1267
|
<span class="ft-i18n">
|
|
1268
1268
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|