@fluid-topics/ft-search-saved-searches 1.3.2 → 1.3.4

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.
@@ -1592,7 +1592,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1592
1592
  color: inherit;
1593
1593
  }
1594
1594
  `;var ul=b(L());var Ws=b(G()),Ne=b(oe()),Ge=b(L());var Fs=b(G());var Us=Fs.css`
1595
- `;var yo=b(L()),ld="ft-app-info",ho=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ho.eventName="authentication-change";var dd={session:(e,t)=>{(0,yo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>k.dispatchEvent(new ho(t.payload)),0))}},k=yo.FtReduxStore.get({name:ld,reducers:dd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Je=b(L());var Tn=b(L());var Dt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=k.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=k.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var _r=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dt.await()}};var ct=class extends _r{constructor(t=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?a.commonCache:new Tn.CacheRegistry}clearCache(){this.cache.clearAll()}};var Ms,ud=Symbol("clearAfterUnitTest"),mo=class extends ct{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ms]=()=>{this.defaultMessages={},this.cache=new Je.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=k.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(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Je.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),c=this.resolveContext(i);return new Je.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t))}catch(a){!(a instanceof Je.CanceledPromiseError)&&o&&console.error(a)}return o&&await this.notify(t),n}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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.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,Je.delay)(0).then(()=>o()).catch(()=>null)))}};Ms=ud;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends mo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends mo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var cr=window.FluidTopicsI18nService,go=window.FluidTopicsCustomI18nService;var ge=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},ee=class extends Ge.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Dt.get(),this.messageContexts=[],this.cache=new Ge.CacheRegistry,this.cleanSessionDebouncer=new Ge.Debouncer}render(){return Ws.html`
1595
+ `;var yo=b(L()),ld="ft-app-info",ho=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ho.eventName="authentication-change";var dd={session:(e,t)=>{(0,yo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>k.dispatchEvent(new ho(t.payload)),0))}},k=yo.FtReduxStore.get({name:ld,reducers:dd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Je=b(L());var Tn=b(L());var Dt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=k.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=k.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var _r=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dt.await()}};var ct=class extends _r{constructor(t=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?a.commonCache:new Tn.CacheRegistry}clearCache(){this.cache.clearAll()}};var Ms,ud=Symbol("clearAfterUnitTest"),mo=class extends ct{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ms]=()=>{this.defaultMessages={},this.cache=new Je.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=k.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(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Je.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),c=this.resolveContext(i);return new Je.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Je.CanceledPromiseError)&&o&&console.error(a)}return n}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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.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,Je.delay)(0).then(()=>o()).catch(()=>null)))}};Ms=ud;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends mo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends mo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var cr=window.FluidTopicsI18nService,go=window.FluidTopicsCustomI18nService;var ge=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},ee=class extends Ge.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Dt.get(),this.messageContexts=[],this.cache=new Ge.CacheRegistry,this.cleanSessionDebouncer=new Ge.Debouncer}render(){return Ws.html`
1596
1596
  <slot></slot>
1597
1597
  `}update(t){var o,n,a,i,c;super.update(t),t.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&k.actions.noCustom(this.noCustom),t.has("editorMode")&&k.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&k.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(d=>cr.addContext(d)),t.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&k.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(k.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),k.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),k.actions.searchInAllLanguagesAllowed((c=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&c!==void 0?c:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ee.elementDefinitions={};ee.styles=Us;ge([(0,Ne.property)()],ee.prototype,"baseUrl",void 0);ge([(0,Ne.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);ge([(0,Ne.property)()],ee.prototype,"uiLocale",void 0);ge([(0,Ge.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);ge([(0,Ge.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"editorMode",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"noCustom",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);ge([(0,Ne.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],ee.prototype,"noCustomComponent",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);ge([(0,Ne.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);ge([(0,Ne.property)({type:Object})],ee.prototype,"apiProvider",void 0);ge([(0,Ge.jsonProperty)([])],ee.prototype,"messageContexts",void 0);ge([(0,Ge.jsonProperty)(void 0)],ee.prototype,"session",void 0);ge([(0,Ne.state)()],ee.prototype,"localesConfiguration",void 0);var Qd=b(oe());function pd(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,a;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!bo(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(!bo(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();let i=c=>Object.keys(c).filter(d=>c[d]!=null);if(a=i(e),o=a.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){let c=a[n];if(!bo(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function bo(e,t){try{return pd(e,t)}catch{return!1}}function xo(e,t){return!bo(e,t)}var fd=b(oe(),1);var vo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(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}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var lr=b(oe(),1);var Hs=b(oe(),1);function zs(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,Hs.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:xo,...t??{}})}var So=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(d){a(d);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var js=b(G(),1);var Oo=globalThis,hd=Oo.ShadowRoot&&(Oo.ShadyCSS===void 0||Oo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rx=Symbol();var Gs=(e,t)=>{if(hd)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Oo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Co=class extends js.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Gs(n,t.elementStyles),n}};function Vs(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var kr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ys,Ks=Symbol("constructorPrototype"),Zs=Symbol("constructorName"),Xs=Symbol("exportpartsDebouncer"),qs=Symbol("dynamicDependenciesLoaded"),lt=class extends Co{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ys]=new So(5),this[Zs]=this.constructor.name,this[Ks]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Zs]&&Object.setPrototypeOf(this,this[Ks])}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[qs]||(t[qs]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=Vs(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var 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[Xs].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,c,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(d=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(C=>C.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...S,...v).filter(u).map(C=>C.trim()).forEach(C=>m.add(C))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(g=>p.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Ys=Xs;kr([(0,lr.property)()],lt.prototype,"exportpartsPrefix",void 0);kr([zs([])],lt.prototype,"exportpartsPrefixes",void 0);kr([(0,lr.property)()],lt.prototype,"customStylesheet",void 0);kr([(0,lr.property)()],lt.prototype,"elementToFocus",void 0);kr([(0,lr.state)()],lt.prototype,"useAdoptedStyleSheets",void 0);function Dr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Qs,Js,ec,Br=Symbol("internalReduxEventsUnsubscribers"),xt=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),$r=class extends lt{constructor(){super(...arguments),this[Qs]=new Map,this[Js]=new Map,this[ec]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Bt].get(t)}addStore(t,o){var n;o=(n=o??(Dr(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Bt].set(o,t),this.subscribeToStore(o,t),this.updateFromStores()}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Bt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Bt].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 a=this.getStore(t.store);a&&(t.store?this[xt].has(t.store):this[xt].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[xt].set(t,o.subscribe(()=>this.updateFromStores())),this[Br].set(t,[]),Dr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=d=>this[i](d);o.addEventListener(a.eventName,c),this[Br].get(t).push(()=>o.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[xt].forEach((t,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(t){var o;this[xt].has(t)&&this[xt].get(t)(),this[xt].delete(t),(o=this[Br].get(t))===null||o===void 0||o.forEach(n=>n()),this[Br].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Qs=xt,Js=Bt,ec=Br;$r.reduxProperties=new Map;$r.reduxReactiveProperties=new Set;$r.reduxEventListeners=new Map;function $e(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 a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function dt(e){return!!e&&!!e[Y]}function je(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 a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Od}(e)||Array.isArray(e)||!!e[sc]||!!(!((t=e.constructor)===null||t===void 0)&&t[sc])||Fn(e)||Un(e))}function $t(e,t,o){o===void 0&&(o=!1),pr(e)===0?(o?Object.keys:ur)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function pr(e){var t=e[Y];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Fn(e)?2:Un(e)?3:0}function dr(e,t){return pr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yd(e,t){return pr(e)===2?e.get(t):e[t]}function cc(e,t,o){var n=pr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function lc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fn(e){return vd&&e instanceof Map}function Un(e){return Sd&&e instanceof Set}function vt(e){return e.o||e.t}function Mn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pc(e);delete t[Y];for(var o=ur(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Wn(e,t){return t===void 0&&(t=!1),Hn(e)||dt(e)||!je(e)||(pr(e)>1&&(e.set=e.add=e.clear=e.delete=md),Object.freeze(e),t&&$t(e,function(o,n){return Wn(n,!0)},!0)),e}function md(){$e(2)}function Hn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function et(e){var t=$n[e];return t||$e(18,e),t}function gd(e,t){$n[e]||($n[e]=t)}function kn(){return Ur}function Ln(e,t){t&&(et("Patches"),e.u=[],e.s=[],e.v=t)}function Eo(e){Dn(e),e.p.forEach(bd),e.p=null}function Dn(e){e===Ur&&(Ur=e.l)}function tc(e){return Ur={p:[],l:Ur,h:e,m:!0,_:0}}function bd(e){var t=e[Y];t.i===0||t.i===1?t.j():t.g=!0}function In(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||et("ES5").S(t,e,n),n?(o[Y].P&&(Eo(t),$e(4)),je(e)&&(e=wo(t,e),t.l||Ao(t,e)),t.u&&et("Patches").M(o[Y].t,e,t.u,t.s)):e=wo(t,o,[]),Eo(t),t.u&&t.v(t.u,t.s),e!==uc?e:void 0}function wo(e,t,o){if(Hn(t))return t;var n=t[Y];if(!n)return $t(t,function(d,u){return rc(e,n,t,d,u,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Ao(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Mn(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),$t(i,function(d,u){return rc(e,n,a,d,u,o,c)}),Ao(e,a,!1),o&&e.u&&et("Patches").N(n,o,e.u,e.s)}return n.o}function rc(e,t,o,n,a,i,c){if(dt(a)){var d=wo(e,a,i&&t&&t.i!==3&&!dr(t.R,n)?i.concat(n):void 0);if(cc(o,n,d),!dt(d))return;e.m=!1}else c&&o.add(a);if(je(a)&&!Hn(a)){if(!e.h.D&&e._<1)return;wo(e,a),t&&t.A.l||Ao(e,a)}}function Ao(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Wn(t,o)}function Pn(e,t){var o=e[Y];return(o?vt(o):e)[t]}function oc(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 St(e){e.P||(e.P=!0,e.l&&St(e.l))}function _n(e){e.o||(e.o=Mn(e.t))}function Bn(e,t,o){var n=Fn(t)?et("MapSet").F(t,o):Un(t)?et("MapSet").T(t,o):e.O?function(a,i){var c=Array.isArray(a),d={i:c?1:0,A:i?i.A:kn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=d,p=Mr;c&&(u=[d],p=Fr);var m=Proxy.revocable(u,p),y=m.revoke,g=m.proxy;return d.k=g,d.j=y,g}(t,o):et("ES5").J(t,o);return(o?o.A:kn()).p.push(n),n}function xd(e){return dt(e)||$e(22,e),function t(o){if(!je(o))return o;var n,a=o[Y],i=pr(o);if(a){if(!a.P&&(a.i<4||!et("ES5").K(a)))return a.t;a.I=!0,n=nc(o,i),a.I=!1}else n=nc(o,i);return $t(n,function(c,d){a&&yd(a.t,c)===d||cc(n,c,t(d))}),i===3?new Set(n):n}(e)}function nc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Mn(e)}function dc(){function e(c,d){var u=i[c];return u?u.enumerable=d:i[c]=u={configurable:!0,enumerable:d,get:function(){var p=this[Y];return Mr.get(p,c)},set:function(p){var m=this[Y];Mr.set(m,c,p)}},u}function t(c){for(var d=c.length-1;d>=0;d--){var u=c[d][Y];if(!u.P)switch(u.i){case 5:n(u)&&St(u);break;case 4:o(u)&&St(u)}}}function o(c){for(var d=c.t,u=c.k,p=ur(u),m=p.length-1;m>=0;m--){var y=p[m];if(y!==Y){var g=d[y];if(g===void 0&&!dr(d,y))return!0;var S=u[y],v=S&&S[Y];if(v?v.t!==g:!lc(S,g))return!0}}var C=!!d[Y];return p.length!==ur(d).length+(C?0:1)}function n(c){var d=c.k;if(d.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&$e(3,JSON.stringify(vt(c)))}var i={};gd("ES5",{J:function(c,d){var u=Array.isArray(c),p=function(y,g){if(y){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,e(v,!0));return S}var C=pc(g);delete C[Y];for(var T=ur(C),R=0;R<T.length;R++){var N=T[R];C[N]=e(N,y||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(g),C)}(u,c),m={i:u?5:4,A:d?d.A:kn(),P:!1,I:!1,R:{},l:d,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Y,{value:m,writable:!0}),p},S:function(c,d,u){u?dt(d)&&d[Y].A===c&&t(c.p):(c.u&&function p(m){if(m&&typeof m=="object"){var y=m[Y];if(y){var g=y.t,S=y.k,v=y.R,C=y.i;if(C===4)$t(S,function(U){U!==Y&&(g[U]!==void 0||dr(g,U)?v[U]||p(S[U]):(v[U]=!0,St(y)))}),$t(g,function(U){S[U]!==void 0||dr(S,U)||(v[U]=!1,St(y))});else if(C===5){if(n(y)&&(St(y),v.length=!0),S.length<g.length)for(var T=S.length;T<g.length;T++)v[T]=!1;else for(var R=g.length;R<S.length;R++)v[R]=!0;for(var N=Math.min(S.length,g.length),B=0;B<N;B++)S.hasOwnProperty(B)||(v[B]=!0),v[B]===void 0&&p(S[B])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var ac,Ur,zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",vd=typeof Map<"u",Sd=typeof Set<"u",ic=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",uc=zn?Symbol.for("immer-nothing"):((ac={})["immer-nothing"]=!0,ac),sc=zn?Symbol.for("immer-draftable"):"__$immer_draftable",Y=zn?Symbol.for("immer-state"):"__$immer_state";var Od=""+Object.prototype.constructor,ur=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pc=Object.getOwnPropertyDescriptors||function(e){var t={};return ur(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},$n={},Mr={get:function(e,t){if(t===Y)return e;var o=vt(e);if(!dr(o,t))return function(a,i,c){var d,u=oc(i,c);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(a.k):void 0}(e,o,t);var n=o[t];return e.I||!je(n)?n:n===Pn(e.t,t)?(_n(e),e.o[t]=Bn(e.A.h,n,e)):n},has:function(e,t){return t in vt(e)},ownKeys:function(e){return Reflect.ownKeys(vt(e))},set:function(e,t,o){var n=oc(vt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Pn(vt(e),t),i=a?.[Y];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(lc(o,a)&&(o!==void 0||dr(e.t,t)))return!0;_n(e),St(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 Pn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,_n(e),St(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=vt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){$e(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){$e(12)}},Fr={};$t(Mr,function(e,t){Fr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Fr.deleteProperty=function(e,t){return Fr.set.call(this,e,t,void 0)},Fr.set=function(e,t,o){return Mr.set.call(this,e[0],t,o,e[0])};var Cd=function(){function e(o){var n=this;this.O=ic,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var d=i;i=a;var u=n;return function(C){var T=this;C===void 0&&(C=d);for(var R=arguments.length,N=Array(R>1?R-1:0),B=1;B<R;B++)N[B-1]=arguments[B];return u.produce(C,function(U){var W;return(W=i).call.apply(W,[T,U].concat(N))})}}var p;if(typeof i!="function"&&$e(6),c!==void 0&&typeof c!="function"&&$e(7),je(a)){var m=tc(n),y=Bn(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?Eo(m):Dn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return Ln(m,c),In(C,m)},function(C){throw Eo(m),C}):(Ln(m,c),In(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===uc&&(p=void 0),n.D&&Wn(p,!0),c){var S=[],v=[];et("Patches").M(a,p,S,v),c(S,v)}return p}$e(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(y))})};var c,d,u=n.produce(a,i,function(p,m){c=p,d=m});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,c,d]}):[u,c,d]},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){je(o)||$e(8),dt(o)&&(o=xd(o));var n=tc(this),a=Bn(this,o,void 0);return a[Y].C=!0,Dn(n),a},t.finishDraft=function(o,n){var a=o&&o[Y],i=a.A;return Ln(i,n),In(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ic&&$e(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var c=et("Patches").$;return dt(o)?c(o,n):this.produce(o,function(d){return c(d,n)})},e}(),Ie=new Cd,Ed=Ie.produce,mx=Ie.produceWithPatches.bind(Ie),gx=Ie.setAutoFreeze.bind(Ie),bx=Ie.setUseProxies.bind(Ie),xx=Ie.applyPatches.bind(Ie),vx=Ie.createDraft.bind(Ie),Sx=Ie.finishDraft.bind(Ie),Ro=Ed;function Ft(e){"@babel/helpers - typeof";return Ft=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},Ft(e)}function fc(e,t){if(Ft(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hc(e){var t=fc(e,"string");return Ft(t)=="symbol"?t:t+""}function yc(e,t,o){return(t=hc(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function mc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Gn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?mc(Object(o),!0).forEach(function(n){yc(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):mc(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function be(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 gc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),jn=function(){return Math.random().toString(36).substring(7).split("").join(".")},No={INIT:"@@redux/INIT"+jn(),REPLACE:"@@redux/REPLACE"+jn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+jn()}};function wd(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 Vn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(be(1));return o(Vn)(e,t)}if(typeof e!="function")throw new Error(be(2));var a=e,i=t,c=[],d=c,u=!1;function p(){d===c&&(d=c.slice())}function m(){if(u)throw new Error(be(3));return i}function y(C){if(typeof C!="function")throw new Error(be(4));if(u)throw new Error(be(5));var T=!0;return p(),d.push(C),function(){if(T){if(u)throw new Error(be(6));T=!1,p();var N=d.indexOf(C);d.splice(N,1),c=null}}}function g(C){if(!wd(C))throw new Error(be(7));if(typeof C.type>"u")throw new Error(be(8));if(u)throw new Error(be(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var T=c=d,R=0;R<T.length;R++){var N=T[R];N()}return C}function S(C){if(typeof C!="function")throw new Error(be(10));a=C,g({type:No.REPLACE})}function v(){var C,T=y;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(be(11));function B(){N.next&&N.next(m())}B();var U=T(B);return{unsubscribe:U}}},C[gc]=function(){return this},C}return g({type:No.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[gc]=v,n}function Ad(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(be(12));if(typeof o(void 0,{type:No.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function bc(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),c,d;try{Ad(o)}catch(u){d=u}return function(p,m){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var g=!1,S={},v=0;v<i.length;v++){var C=i[v],T=o[C],R=p[C],N=T(R,m);if(typeof N>"u"){var B=m&&m.type;throw new Error(be(14))}S[C]=N,g=g||N!==R}return g=g||i.length!==Object.keys(p).length,g?S:p}}function fr(){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,a){return function(){return n(a.apply(void 0,arguments))}})}function xc(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(be(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},d=t.map(function(u){return u(c)});return i=fr.apply(void 0,d)(a.dispatch),Gn(Gn({},a),{},{dispatch:i})}}}function vc(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(d){return typeof d=="function"?d(a,i,e):c(d)}}};return t}var Sc=vc();Sc.withExtraArgument=vc;var Kn=Sc;var Ac=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},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)}}(),Rd=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},hr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},Nd=Object.defineProperty,Td=Object.defineProperties,Ld=Object.getOwnPropertyDescriptors,Oc=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,Pd=Object.prototype.propertyIsEnumerable,Cc=function(e,t,o){return t in e?Nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},Ot=function(e,t){for(var o in t||(t={}))Id.call(t,o)&&Cc(e,o,t[o]);if(Oc)for(var n=0,a=Oc(t);n<a.length;n++){var o=a[n];Pd.call(t,o)&&Cc(e,o,t[o])}return e},Zn=function(e,t){return Td(e,Ld(t))},_d=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{d(o.next(u))}catch(p){a(p)}},c=function(u){try{d(o.throw(u))}catch(p){a(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,c)};d((o=o.apply(e,t)).next())})};var kd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fr:fr.apply(null,arguments)},Ux=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Dd(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 Bd=function(e){Ac(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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,hr([void 0],o[0].concat(this)))):new(t.bind.apply(t,hr([void 0],o.concat(this))))},t}(Array),$d=function(e){Ac(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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,hr([void 0],o[0].concat(this)))):new(t.bind.apply(t,hr([void 0],o.concat(this))))},t}(Array);function Xn(e){return je(e)?Ro(e,function(){}):e}function Fd(e){return typeof e=="boolean"}function Ud(){return function(t){return Md(t)}}function Md(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,c=i===void 0?!0:i,d=new Bd;if(o&&(Fd(o)?d.push(Kn):d.push(Kn.withExtraArgument(o.extraArgument))),0){if(a)var u;if(c)var p}return d}var qn=!0;function Rc(e){var t=Ud(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?t():i,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,m=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(Dd(a))S=bc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=c;if(typeof v=="function"&&(v=v(t),!qn&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qn&&v.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=xc.apply(void 0,v),T=fr;u&&(T=kd(Ot({trace:!qn},typeof u=="object"&&u)));var R=new $d(C),N=R;Array.isArray(g)?N=hr([C],g):typeof g=="function"&&(N=g(R));var B=T.apply(void 0,N);return Vn(S,m,B)}function Ct(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Ot(Ot({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.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 Nc(e){var t={},o=[],n,a={addCase:function(i,c){var d=typeof i=="string"?i:i.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function Wd(e){return typeof e=="function"}function Hd(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Nc(t):[t,o,n],i=a[0],c=a[1],d=a[2],u;if(Wd(e))u=function(){return Xn(e())};else{var p=Xn(e);u=function(){return p}}function m(y,g){y===void 0&&(y=u());var S=hr([i[g.type]],c.filter(function(v){var C=v.matcher;return C(g)}).map(function(v){var C=v.reducer;return C}));return S.filter(function(v){return!!v}).length===0&&(S=[d]),S.reduce(function(v,C){if(C)if(dt(v)){var T=v,R=C(T,g);return R===void 0?v:R}else{if(je(v))return Ro(v,function(N){return C(N,g)});var R=C(v,g);if(R===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return v},y)}return m.getInitialState=u,m}function zd(e,t){return e+"/"+t}function Tc(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:Xn(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},c={},d={};a.forEach(function(m){var y=n[m],g=zd(t,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,c[g]=S,d[m]=v?Ct(g,v):Ct(g)});function u(){var m=typeof e.extraReducers=="function"?Nc(e.extraReducers):[e.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,C=m[2],T=C===void 0?void 0:C,R=Ot(Ot({},g),c);return Hd(o,function(N){for(var B in R)N.addCase(B,R[B]);for(var U=0,W=v;U<W.length;U++){var Oe=W[U];N.addMatcher(Oe.matcher,Oe.reducer)}T&&N.addDefaultCase(T)})}var p;return{name:t,reducer:function(m,y){return p||(p=u()),p(m,y)},actions:d,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Gd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jd=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=Gd[Math.random()*64|0];return t},Vd=["name","message","stack","code"],Yn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Ec=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Kd=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Vd;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},zx=function(){function e(t,o,n){var a=Ct(t+"/fulfilled",function(m,y,g,S){return{payload:m,meta:Zn(Ot({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=Ct(t+"/pending",function(m,y,g){return{payload:void 0,meta:Zn(Ot({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),c=Ct(t+"/rejected",function(m,y,g,S,v){return{payload:S,error:(n&&n.serializeError||Kd)(m||"Rejected"),meta:Zn(Ot({},v||{}),{arg:g,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(y,g,S){var v=n?.idGenerator?n.idGenerator(m):jd(),C=new u,T,R=!1;function N(U){T=U,C.abort()}var B=function(){return _d(this,null,function(){var U,W,Oe,Ze,xe,qe,pe;return Rd(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Ze=(U=n?.condition)==null?void 0:U.call(n,m,{getState:g,extra:S}),qd(Ze)?[4,Ze]:[3,2];case 1:Ze=h.sent(),h.label=2;case 2:if(Ze===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,xe=new Promise(function(x,_){return C.signal.addEventListener("abort",function(){return _({name:"AbortError",message:T||"Aborted"})})}),y(i(v,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:v,arg:m},{getState:g,extra:S}))),[4,Promise.race([xe,Promise.resolve(o(m,{dispatch:y,getState:g,extra:S,requestId:v,signal:C.signal,abort:N,rejectWithValue:function(x,_){return new Yn(x,_)},fulfillWithValue:function(x,_){return new Ec(x,_)}})).then(function(x){if(x instanceof Yn)throw x;return x instanceof Ec?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return Oe=h.sent(),[3,5];case 4:return qe=h.sent(),Oe=qe instanceof Yn?c(null,v,m,qe.payload,qe.meta):c(qe,v,m),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&c.match(Oe)&&Oe.meta.condition,pe||y(Oe),[2,Oe]}})})}();return Object.assign(B,{abort:N,requestId:v,arg:m,unwrap:function(){return B.then(Zd)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Zd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Lc="listener",Ic="completed",Pc="cancelled",Gx="task-"+Pc,jx="task-"+Ic,Vx=Lc+"-"+Pc,Kx=Lc+"-"+Ic;var Qn="listenerMiddleware";var Zx=Ct(Qn+"/add"),qx=Ct(Qn+"/removeAll"),Yx=Ct(Qn+"/remove");var wc,Xx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(wc||(wc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Yd=function(e){return function(t){setTimeout(t,e)}},Qx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Yd(10);dc();function Xd(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var To=class extends Xd(Object){};window.ftReduxStores||(window.ftReduxStores={});var _c=class e extends To{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Dr(i))return i;if(a==null)return;let c=Tc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=Rc({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:c.reducer(u,p)});return window.ftReduxStores[a.name]=new e(c,d,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,c,d)=>{let u=c,p=i[u];return p?(...m)=>{let y=p(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}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 Do=b(L());var eu=b(Dc(),1);var Bc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Bc||(Bc={}));var $c;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})($c||($c={}));var Fc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.MAP_ATTACHMENT="MAP_ATTACHMENT",e.RESOURCE="RESOURCE"})(Fc||(Fc={}));var Uc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.MAP_ATTACHMENT="MAP_ATTACHMENT",e.RESOURCE="RESOURCE"})(Uc||(Uc={}));var Mc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Mc||(Mc={}));var Wc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Wc||(Wc={}));var Hc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",e.GEN_AI__RATE="GEN_AI__RATE",e.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",e.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Hc||(Hc={}));var zc;(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"})(zc||(zc={}));var Gc;(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"})(Gc||(Gc={}));var jc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(jc||(jc={}));var Vc;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Vc||(Vc={}));var Kc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Kc||(Kc={}));var Zc;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Zc||(Zc={}));var qc;(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"})(qc||(qc={}));var Yc;(function(e){e.ASC="ASC",e.DESC="DESC"})(Yc||(Yc={}));var Xc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Xc||(Xc={}));var Wr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Wr||(Wr={}));var Qc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(Qc||(Qc={}));var Jc;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Jc||(Jc={}));var el;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(el||(el={}));var mr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(mr||(mr={}));var tl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(tl||(tl={}));var Hr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Hr||(Hr={}));var re;(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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_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.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(re||(re={}));var rl;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(rl||(rl={}));var ol;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(ol||(ol={}));var nl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(nl||(nl={}));var al;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(al||(al={}));var Jd={[re.PERSONAL_BOOK_SHARE_USER]:[re.PERSONAL_BOOK_USER],[re.HTML_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.PDF_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.KHUB_ADMIN]:[re.CONTENT_PUBLISHER],[re.ADMIN]:[re.KHUB_ADMIN,re.USERS_ADMIN,re.PORTAL_ADMIN],[re.GENERATIVE_AI_EXPORT_USER]:[re.GENERATIVE_AI_USER]};function il(e,t){return e===t||(Jd[e]??[]).some(o=>il(o,t))}function Po(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>il(n,t))}var _o=class extends ct{async listMySearches(){let{session:t}=k.getState();return Po(t,re.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ko=class extends ct{async listMyBookmarks(){let t=k.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var tu="ft-user-assets",Ut=Do.FtReduxStore.get({name:tu,initialState:{savedSearches:void 0,bookmarks:void 0}}),Jn=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ko,this.savedSearchesService=new _o,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=k.getState();(0,Do.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(),Ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ut.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;Ut.actions.bookmarks(o)}}},ea=new Jn;var ta=class{addCommand(t,o=!1){k.commands.add(t,o)}consumeCommand(t){return k.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ta;var sl=b(L()),ra=class{highlightHtml(t,o,n){(0,sl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ra;var cl=b(L());var oa=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return cl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new oa;var ll=b(L());var Mt=class{static get(t,o){var n,a,i,c;let d=k.getState(),{lang:u,region:p}=(a=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new ll.SearchPlaceConverter(d.baseUrl,(c=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&c!==void 0?c:{},t??20,d.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var na=class{urlToSearchRequest(t){return Mt.get().parse(t)}searchRequestToUrl(t){return Mt.get().serialize(t)}};window.FluidTopicsUrlService=new na;var wt=b(L());var Wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Wt.eventName="change";var aa=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},dl=new aa;var Bo=class e extends wt.WithEventBus{static build(){return new e(window.history,dl,()=>window.location,!1)}constructor(t,o,n,a){var i,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,wt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Wt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,c,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(a,[p,c,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Wt.eventName,t)}currentItem(){return(0,wt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,wt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,wt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Bo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});(0,ul.customElement)("ft-app-context")(ee);var Nl=b(fl());var ml=b(L()),gl=b(oe());var $o=b(L());var hl=b(L());var ia=class e extends Event{constructor(){super(e.eventName)}};ia.eventName="search-context-clear-all-filters";var ru=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},ca=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},yl=Symbol("registerInterval"),sa=Symbol("registerAttempts"),ou=40;function nu(e){class t extends e{setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[sa]=0,this[yl]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[sa]>ou?window.clearInterval(this[yl]):(this[sa]++,this.dispatchEvent(new ca))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ru([(0,gl.state)()],t.prototype,"stateManager",void 0),t}var Fo=class extends nu(ml.FtLitElementRedux){};var Al=b(L());var zo=b(G()),Go=b(oe()),jo=b(L());var bl=b(G());var xl=bl.css`
1598
1598
  `;var Wo=b(L());var El=b(oe());var au=b(L());function vl(e){return e.match(/^[\w-]+\.[\w-]+$/)}var iu=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Sl=Symbol("i18nAttributes"),Ol=Symbol("i18nListAttributes"),wl=Symbol("i18nProperties"),Uo=Symbol("i18nContexts"),zr=Symbol("i18nUnsubs");function Ho(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?go:cr}i18n(i){var c;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let d=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...d)}customI18n(i,c){if(vl(i)){let[d,u]=i.split(".");return this.i18n({custom:!0,context:d,key:u,...c})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((c,d,u)=>i.has(d)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((c,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(c=>c.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var c,d;let u=this,p=(m,y,g)=>g?.context&&g.key&&i(m,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,...m})}:g;(c=this[Sl])===null||c===void 0||c.forEach((m,y)=>u[y]=p(m,y,u[y])),(d=this[Ol])===null||d===void 0||d.forEach((m,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(S=>p(m,y,S))})}updateI18nProperties(i){var c;(c=this[wl])===null||c===void 0||c.forEach((d,u)=>{i(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(i,c,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,c,d)}addI18nContext(i,c,d){let u=(typeof i=="string"?i:i.name).toLowerCase();d=typeof i=="string"?d:i.custom,this[Uo].set(u,{isCustomContext:d}),this[zr].has(u)||this[zr].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,c)}hasI18nContext(i){return this[Uo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Uo].forEach((i,c)=>this.addI18nContext(c,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[zr].forEach(i=>i()),this[zr].clear()}}return t=Uo,o=zr,iu([(0,El.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Cl=class extends Ho(Wo.FtLitElement){},Mo=class extends Ho(Wo.FtLitElementRedux){};var Gr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Ve=class extends Mo{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":zo.nothing:zo.html`