@fluid-topics/ft-modal 2.2.18 → 2.2.20

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.
@@ -167,7 +167,7 @@ Also for action icons.`,i.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
167
167
  </${Fo(this.element)}>
168
168
  `:Ho`
169
169
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
170
- `}};ne.styles=[mi,gi,bi,xi,Si,vi,Ci,Ei,Oi,Ai,wi];_i([(0,zo.property)()],ne.prototype,"element",void 0);_i([(0,zo.property)()],ne.prototype,"variant",void 0);var Li=g(T());var Ti={"ft-typography":ne};(0,Li.customElements)(Ti);var un=g(te());var ki=g(te(),1);var Go=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},cl=e=>({fromAttribute:t=>{if(t==null)return Xt(e);try{return JSON.parse(t)}catch{return Xt(e)}},toAttribute:t=>JSON.stringify(t)});function Ni(e,t){return(0,ki.property)({type:Object,converter:cl(e),hasChanged:Jt,...t??{}})}function ll(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!_t(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(!_t(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 a=c=>Object.keys(c).filter(d=>c[d]!=null),s=a(e);if(o=s.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!_t(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function _t(e,t){try{return ll(e,t)}catch{return!1}}function Jt(e,t){return!_t(e,t)}function Xt(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function _r(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var Ii=g(te(),1);var Wo=e=>{let t=e??{};return(o,n)=>{var a;let s={hasChanged:Jt,attribute:!1,...t};(0,Ii.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(d=>d[n]),store:t.store})}};var Rr=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 st=g(te(),1);var Tr=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),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Di=g(z(),1);var Lr=globalThis,dl=Lr.ShadowRoot&&(Lr.ShadyCSS===void 0||Lr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Pi=(e,t)=>{if(dl)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Lr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var kr=class extends Di.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Pi(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Go(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Mi(e,t,...o){var n;let a=e.querySelector(t);for(let s of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var Tt=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},$i,Ui=Symbol("constructorPrototype"),Bi=Symbol("constructorName"),Hi=Symbol("exportpartsDebouncer"),Fi=Symbol("dynamicDependenciesLoaded"),Rt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Rt.eventName="exportparts-updated";var Ae=class extends kr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[$i]=new Tr(5),this.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[Hi].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Bi]=this.constructor.name,this[Ui]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Bi]&&Object.setPrototypeOf(this,this[Ui])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Fi]||(o[Fi]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Rt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Rt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Rt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];o=Mi(this.shadowRoot,...s)}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(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,a,s,c,d;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let f=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=(s=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&s!==void 0?s:[],C=(d=(c=y.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[],O=[...x,...C].filter(u).map(v=>v.trim());for(let v of O)f.add(v)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(y=>p.map(x=>`${y}:${x}--${y}`));this.exportparts=[...this.part,...h].join(", ")}};$i=Hi;Tt([(0,st.property)()],Ae.prototype,"exportpartsPrefix",void 0);Tt([Ni([])],Ae.prototype,"exportpartsPrefixes",void 0);Tt([(0,st.property)({reflect:!0})],Ae.prototype,"exportparts",void 0);Tt([(0,st.property)()],Ae.prototype,"customStylesheet",void 0);Tt([(0,st.property)()],Ae.prototype,"elementToFocus",void 0);Tt([(0,st.state)()],Ae.prototype,"useAdoptedStyleSheets",void 0);function Nr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Qt=Symbol("internalReduxEventsUnsubscribers"),He=Symbol("internalStoresUnsubscribers"),ct=Symbol("internalStores"),ul=_r(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ct].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[ct].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[ct].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[ct].delete(d)}setupStores(){this.unsubscribeFromStores(),this[ct].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[He].has(c.store):this[He].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[He].set(c,d.subscribe(()=>this.updateFromStores())),this[Qt].set(c,[]),Nr(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||d.name===p.store)){let h=y=>this[f](y);d.addEventListener(p.eventName,h),this[Qt].get(c).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[He].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[He].has(c)&&this[He].get(c)(),this[He].delete(c),(d=this[Qt].get(c))===null||d===void 0||d.forEach(u=>u()),this[Qt].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=He,o=ct,n=Qt,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zi=class extends ul(Ae){};function q(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 pl=typeof Symbol=="function"&&Symbol.observable||"@@observable",Gi=pl,Vo=()=>Math.random().toString(36).substring(7).split("").join("."),fl={INIT:`@@redux/INIT${Vo()}`,REPLACE:`@@redux/REPLACE${Vo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vo()}`},Ir=fl;function Pr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ko(e,t,o){if(typeof e!="function")throw new Error(q(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(q(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(q(1));return o(Ko)(e,t)}let n=e,a=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((v,A)=>{c.set(A,v)}))}function f(){if(u)throw new Error(q(3));return a}function h(v){if(typeof v!="function")throw new Error(q(4));if(u)throw new Error(q(5));let A=!0;p();let I=d++;return c.set(I,v),function(){if(A){if(u)throw new Error(q(6));A=!1,p(),c.delete(I),s=null}}}function y(v){if(!Pr(v))throw new Error(q(7));if(typeof v.type>"u")throw new Error(q(8));if(typeof v.type!="string")throw new Error(q(17));if(u)throw new Error(q(9));try{u=!0,a=n(a,v)}finally{u=!1}return(s=c).forEach(I=>{I()}),v}function x(v){if(typeof v!="function")throw new Error(q(10));n=v,y({type:Ir.REPLACE})}function C(){let v=h;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(q(11));function I(){let R=A;R.next&&R.next(f())}return I(),{unsubscribe:v(I)}},[Gi](){return this}}}return y({type:Ir.INIT}),{dispatch:y,subscribe:h,getState:f,replaceReducer:x,[Gi]:C}}function hl(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Ir.INIT})>"u")throw new Error(q(12));if(typeof o(void 0,{type:Ir.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(q(13))})}function Wi(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),a,s;try{hl(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let y=n[h],x=o[y],C=d[y],O=x(C,u);if(typeof O>"u"){let v=u&&u.type;throw new Error(q(14))}f[y]=O,p=p||O!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function er(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function Vi(...e){return t=>(o,n)=>{let a=t(o,n),s=()=>{throw new Error(q(15))},c={getState:a.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=er(...d)(a.dispatch),{...a,dispatch:s}}}function Ki(e){return Pr(e)&&"type"in e&&typeof e.type=="string"}var ta=Symbol.for("immer-nothing"),ji=Symbol.for("immer-draftable"),X=Symbol.for("immer-state");function xe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ie=Object,kt=ie.getPrototypeOf,Br="constructor",Wr="prototype",Yo="configurable",Fr="enumerable",Mr="writable",tr="value",we=e=>!!e&&!!e[X];function ae(e){return e?ra(e)||Kr(e)||!!e[ji]||!!e[Br]?.[ji]||jr(e)||Zr(e):!1}var yl=ie[Wr][Br].toString(),Zi=new WeakMap;function ra(e){if(!e||!nn(e))return!1;let t=kt(e);if(t===null||t===ie[Wr])return!0;let o=ie.hasOwnProperty.call(t,Br)&&t[Br];if(o===Object)return!0;if(!Lt(o))return!1;let n=Zi.get(o);return n===void 0&&(n=Function.toString.call(o),Zi.set(o,n)),n===yl}function Vr(e,t,o=!0){nr(e)===0?(o?Reflect.ownKeys(e):ie.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function nr(e){let t=e[X];return t?t.type_:Kr(e)?1:jr(e)?2:Zr(e)?3:0}var jo=(e,t,o=nr(e))=>o===2?e.has(t):ie[Wr].hasOwnProperty.call(e,t),Xo=(e,t,o=nr(e))=>o===2?e.get(t):e[t],$r=(e,t,o,n=nr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function ml(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Kr=Array.isArray,jr=e=>e instanceof Map,Zr=e=>e instanceof Set,nn=e=>typeof e=="object",Lt=e=>typeof e=="function",Zo=e=>typeof e=="boolean";function gl(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ne=e=>e.copy_||e.base_;var an=e=>e.modified_?e.copy_:e.base_;function Jo(e,t){if(jr(e))return new Map(e);if(Zr(e))return new Set(e);if(Kr(e))return Array[Wr].slice.call(e);let o=ra(e);if(t===!0||t==="class_only"&&!o){let n=ie.getOwnPropertyDescriptors(e);delete n[X];let a=Reflect.ownKeys(n);for(let s=0;s<a.length;s++){let c=a[s],d=n[c];d[Mr]===!1&&(d[Mr]=!0,d[Yo]=!0),(d.get||d.set)&&(n[c]={[Yo]:!0,[Mr]:!0,[Fr]:d[Fr],[tr]:e[c]})}return ie.create(kt(e),n)}else{let n=kt(e);if(n!==null&&o)return{...e};let a=ie.create(n);return ie.assign(a,e)}}function sn(e,t=!1){return qr(e)||we(e)||!ae(e)||(nr(e)>1&&ie.defineProperties(e,{set:Dr,add:Dr,clear:Dr,delete:Dr}),ie.freeze(e),t&&Vr(e,(o,n)=>{sn(n,!0)},!1)),e}function bl(){xe(2)}var Dr={[tr]:bl};function qr(e){return e===null||!nn(e)?!0:ie.isFrozen(e)}var Hr="MapSet",Qo="Patches",qi="ArrayMethods",oa={};function lt(e){let t=oa[e];return t||xe(0,e),t}var Yi=e=>!!oa[e];var rr,na=()=>rr,xl=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Yi(Hr)?lt(Hr):void 0,arrayMethodsPlugin_:Yi(qi)?lt(qi):void 0});function Xi(e,t){t&&(e.patchPlugin_=lt(Qo),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function en(e){tn(e),e.drafts_.forEach(Sl),e.drafts_=null}function tn(e){e===rr&&(rr=e.parent_)}var Ji=e=>rr=xl(rr,e);function Sl(e){let t=e[X];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qi(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[X].modified_&&(en(t),xe(4)),ae(e)&&(e=ea(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(o[X].base_,e,t)}else e=ea(t,o);return vl(t,e,!0),en(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ta?e:void 0}function ea(e,t){if(qr(t))return t;let o=t[X];if(!o)return zr(t,e.handledSet_,e);if(!Yr(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);sa(o,e)}return o.copy_}function vl(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&sn(t,o)}function ia(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Yr=(e,t)=>e.scope_===t,Cl=[];function aa(e,t,o,n){let a=Ne(e),s=e.type_;if(n!==void 0&&Xo(a,n,s)===t){$r(a,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;Vr(a,(u,p)=>{if(we(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??Cl;for(let d of c)$r(a,d,o,s)}function El(e,t,o){e.callbacks_.push(function(a){let s=t;if(!s||!Yr(s,a))return;a.mapSetPlugin_?.fixSetContents(s);let c=an(s);aa(e,s.draft_??s,c,o),sa(s,a)})}function sa(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}ia(e)}}function Ol(e,t,o){let{scope_:n}=e;if(we(o)){let a=o[X];Yr(a,n)&&a.callbacks_.push(function(){Ur(e);let c=an(a);aa(e,o,c,t)})}else ae(o)&&e.callbacks_.push(function(){let s=Ne(e);e.type_===3?s.has(o)&&zr(o,n.handledSet_,n):Xo(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&zr(Xo(e.copy_,t,e.type_),n.handledSet_,n)})}function zr(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||we(e)||t.has(e)||!ae(e)||qr(e)||(t.add(e),Vr(e,(n,a)=>{if(we(a)){let s=a[X];if(Yr(s,o)){let c=an(s);$r(e,n,c,e.type_),ia(s)}}else ae(a)&&zr(a,t,o)})),e}function Al(e,t){let o=Kr(e),n={type_:o?1:0,scope_:t?t.scope_:na(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,s=Gr;o&&(a=[n],s=or);let{revoke:c,proxy:d}=Proxy.revocable(a,s);return n.draft_=d,n.revoke_=c,[d,n]}var Gr={get(e,t){if(t===X)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let a=Ne(e);if(!jo(a,t,e.type_))return _l(e,a,t);let s=a[t];if(e.finalized_||!ae(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&gl(t))return s;if(s===qo(e.base_,t)||wl(e,t,s)){Ur(e);let c=e.type_===1?+t:t,d=on(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in Ne(e)},ownKeys(e){return Reflect.ownKeys(Ne(e))},set(e,t,o){let n=ca(Ne(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let a=qo(Ne(e),t),s=a?.[X];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(ml(o,a)&&(o!==void 0||jo(e.base_,t,e.type_)))return!0;Ur(e),rn(e)}return e.copy_[t]===o&&(o!==void 0||jo(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Ol(e,t,o)),!0},deleteProperty(e,t){return Ur(e),qo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),rn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=Ne(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[Mr]:!0,[Yo]:e.type_!==1||t!=="length",[Fr]:n[Fr],[tr]:o[t]}},defineProperty(){xe(11)},getPrototypeOf(e){return kt(e.base_)},setPrototypeOf(){xe(12)}},or={};for(let e in Gr){let t=Gr[e];or[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}or.deleteProperty=function(e,t){return or.set.call(this,e,t,void 0)};or.set=function(e,t,o){return Gr.set.call(this,e[0],t,o,e[0])};function qo(e,t){let o=e[X];return(o?Ne(o):e)[t]}function wl(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ae(o)||o[X]?!1:e.baseRefs_.has(o)}function _l(e,t,o){let n=ca(t,o);return n?tr in n?n[tr]:n.get?.call(e.draft_):void 0}function ca(e,t){if(!(t in e))return;let o=kt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=kt(o)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function Ur(e){e.copy_||(e.assigned_=new Map,e.copy_=Jo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(Lt(t)&&!Lt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}Lt(o)||xe(6),n!==void 0&&!Lt(n)&&xe(7);let a;if(ae(t)){let s=Ji(this),c=on(s,t,void 0),d=!0;try{a=o(c),d=!1}finally{d?en(s):tn(s)}return Xi(s,n),Qi(a,s)}else if(!t||!nn(t)){if(a=o(t),a===void 0&&(a=t),a===ta&&(a=void 0),this.autoFreeze_&&sn(a,!0),n){let s=[],c=[];lt(Qo).generateReplacementPatches_(t,a,{patches_:s,inversePatches_:c}),n(s,c)}return a}else xe(1,t)},this.produceWithPatches=(t,o)=>{if(Lt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,a;return[this.produce(t,o,(c,d)=>{n=c,a=d}),n,a]},Zo(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Zo(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Zo(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ae(e)||xe(8),we(e)&&(e=la(e));let t=Ji(this),o=on(t,e,void 0);return o[X].isManual_=!0,tn(t),o}finishDraft(e,t){let o=e&&e[X];(!o||!o.isManual_)&&xe(9);let{scope_:n}=o;return Xi(n,t),Qi(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let a=t[o];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}o>-1&&(t=t.slice(o+1));let n=lt(Qo).applyPatches_;return we(e)?n(e,t):this.produce(e,a=>n(a,t))}};function on(e,t,o,n){let[a,s]=jr(t)?lt(Hr).proxyMap_(t,o):Zr(t)?lt(Hr).proxySet_(t,o):Al(t,o);return(o?.scope_??na()).drafts_.push(a),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?El(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),a}function la(e){return we(e)||xe(10,e),da(e)}function da(e){if(!ae(e)||qr(e))return e;let t=e[X],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Jo(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Jo(e,!0);return Vr(o,(a,s)=>{$r(o,a,da(s))},n),t&&(t.finalized_=!1),o}var Tl=globalThis.Iterator,Cm=typeof Tl?.from=="function";var Ll=new Rl,cn=Ll.produce;function ua(e){return({dispatch:o,getState:n})=>a=>s=>typeof s=="function"?s(o,n,e):a(s)}var pa=ua(),fa=ua;var kl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},Tm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Nl=e=>e&&typeof e.match=="function";function ze(e,t){function o(...n){if(t){let a=t(...n);if(!a)throw new Error(Ie(0));return{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=()=>`${e}`,o.type=e,o.match=n=>Ki(n)&&n.type===e,o}var ba=class ir extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ir.prototype)}static get[Symbol.species](){return ir}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ir(...t[0].concat(this)):new ir(...t.concat(this))}};function ha(e){return ae(e)?cn(e,()=>{}):e}function Xr(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function Il(e){return typeof e=="boolean"}var Pl=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:s=!0}=t??{},c=new ba;return o&&(Il(o)?c.push(pa):c.push(fa(o.extraArgument))),c},Dl="RTK_autoBatch";var ya=e=>t=>{setTimeout(t,e)},Ml=(e,t)=>o=>{let n=!1,a=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(c),o())},s=e(a),c=setTimeout(a,t)},Ul=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),a=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ml(window.requestAnimationFrame,100):ya(10):e.type==="callback"?e.queueNotification:ya(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>a&&f(),y=n.subscribe(h);return d.add(f),()=>{y(),d.delete(f)}},dispatch(f){try{return a=!f?.meta?.[Dl],s=!a,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{a=!0}}})},Bl=e=>function(o){let{autoBatch:n=!0}=o??{},a=new ba(e);return n&&a.push(Ul(typeof n=="object"?n:void 0)),a};function xa(e){let t=Pl(),{reducer:o=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(Pr(o))u=Wi(o);else throw new Error(Ie(1));let p;typeof n=="function"?p=n(t):p=t();let f=er;a&&(f=kl({trace:!1,...typeof a=="object"&&a}));let h=Vi(...p),y=Bl(h),x=typeof d=="function"?d(y):y(),C=f(...x);return Ko(u,c,C)}function Sa(e){let t={},o=[],n,a={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(Ie(28));if(d in t)throw new Error(Ie(29));return t[d]=c,a},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),a},addMatcher(s,c){return o.push({matcher:s,reducer:c}),a},addDefaultCase(s){return n=s,a}};return e(a),[t,o,n]}function Fl(e){return typeof e=="function"}function $l(e,t){let[o,n,a]=Sa(t),s;if(Fl(e))s=()=>ha(e());else{let d=ha(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[a]),p.reduce((f,h)=>{if(h)if(we(f)){let x=h(f,u);return x===void 0?f:x}else{if(ae(f))return cn(f,y=>h(y,u));{let y=h(f,u);if(y===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return f},d)}return c.getInitialState=s,c}var Hl=(e,t)=>Nl(e)?e.match(t):e(t);function zl(...e){return t=>e.some(o=>Hl(o,t))}var Gl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wl=(e=21)=>{let t="",o=e;for(;o--;)t+=Gl[Math.random()*64|0];return t},Vl=["name","message","stack","code"],ln=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ma=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Kl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of Vl)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},ga="External signal was aborted",jl=(()=>{function e(t,o,n){let a=ze(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=ze(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=ze(t+"/rejected",(u,p,f,h,y)=>({payload:h,error:(n&&n.serializeError||Kl)(u||"Rejected"),meta:{...y||{},arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,y)=>{let x=n?.idGenerator?n.idGenerator(u):Wl(),C=new AbortController,O,v;function A(E){v=E,C.abort()}p&&(p.aborted?A(ga):p.addEventListener("abort",()=>A(ga),{once:!0}));let I=(async function(){let E;try{let L=n?.condition?.(u,{getState:h,extra:y});if(ql(L)&&(L=await L),L===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let $=new Promise((M,H)=>{O=()=>{H({name:"AbortError",message:v||"Aborted"})},C.signal.addEventListener("abort",O,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:y}))),E=await Promise.race([$,Promise.resolve(o(u,{dispatch:f,getState:h,extra:y,requestId:x,signal:C.signal,abort:A,rejectWithValue:((M,H)=>new ln(M,H)),fulfillWithValue:((M,H)=>new ma(M,H))})).then(M=>{if(M instanceof ln)throw M;return M instanceof ma?a(M.payload,x,u,M.meta):a(M,x,u)})])}catch(L){E=L instanceof ln?c(null,x,u,L.payload,L.meta):c(L,x,u)}finally{O&&C.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(I,{abort:A,requestId:x,arg:u,unwrap(){return I.then(Zl)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:a,settled:zl(c,a),typePrefix:t})}return e.withTypes=()=>e,e})();function Zl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ql(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var va=Symbol.for("rtk-slice-createasyncthunk"),km={[va]:jl};function Yl(e,t){return`${e}/${t}`}function Xl({creators:e}={}){let t=e?.asyncThunk?.[va];return function(n){let{name:a,reducerPath:s=a}=n;if(!a)throw new Error(Ie(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(Ql()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,R){let L=typeof E=="string"?E:E.type;if(!L)throw new Error(Ie(12));if(L in u.sliceCaseReducersByType)throw new Error(Ie(13));return u.sliceCaseReducersByType[L]=R,p},addMatcher(E,R){return u.sliceMatchers.push({matcher:E,reducer:R}),p},exposeAction(E,R){return u.actionCreators[E]=R,p},exposeCaseReducer(E,R){return u.sliceCaseReducersByName[E]=R,p}};d.forEach(E=>{let R=c[E],L={reducerName:E,type:Yl(a,E),createNotation:typeof n.reducers=="function"};td(R)?od(L,R,p,t):ed(L,R,p)});function f(){let[E={},R=[],L=void 0]=typeof n.extraReducers=="function"?Sa(n.extraReducers):[n.extraReducers],$={...E,...u.sliceCaseReducersByType};return $l(n.initialState,M=>{for(let H in $)M.addCase(H,$[H]);for(let H of u.sliceMatchers)M.addMatcher(H.matcher,H.reducer);for(let H of R)M.addMatcher(H.matcher,H.reducer);L&&M.addDefaultCase(L)})}let h=E=>E,y=new Map,x=new WeakMap,C;function O(E,R){return C||(C=f()),C(E,R)}function v(){return C||(C=f()),C.getInitialState()}function A(E,R=!1){function L(M){let H=M[E];return typeof H>"u"&&R&&(H=Xr(x,L,v)),H}function $(M=h){let H=Xr(y,R,()=>new WeakMap);return Xr(H,M,()=>{let Gt={};for(let[ce,Ze]of Object.entries(n.selectors??{}))Gt[ce]=Jl(Ze,M,()=>Xr(x,M,v),R);return Gt})}return{reducerPath:E,getSelectors:$,get selectors(){return $(L)},selectSlice:L}}let I={name:a,reducer:O,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...A(s),injectInto(E,{reducerPath:R,...L}={}){let $=R??s;return E.inject({reducerPath:$,reducer:O},L),{...I,...A($,!0)}}};return I}}function Jl(e,t,o,n){function a(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return a.unwrapped=e,a}var Ca=Xl();function Ql(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function ed({type:e,reducerName:t,createNotation:o},n,a){let s,c;if("reducer"in n){if(o&&!rd(n))throw new Error(Ie(17));s=n.reducer,c=n.prepare}else s=n;a.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?ze(e,c):ze(e))}function td(e){return e._reducerDefinitionType==="asyncThunk"}function rd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function od({type:e,reducerName:t},o,n,a){if(!a)throw new Error(Ie(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=a(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||Jr,pending:d||Jr,rejected:u||Jr,settled:p||Jr})}function Jr(){}var Ea="listener",Oa="completed",Aa="cancelled",Nm=`task-${Aa}`,Im=`task-${Oa}`,Pm=`${Ea}-${Aa}`,Dm=`${Ea}-${Oa}`;var{assign:wa}=Object;var dn="listenerMiddleware";var nd=wa(ze(`${dn}/add`),{withTypes:()=>nd}),Mm=ze(`${dn}/removeAll`),id=wa(ze(`${dn}/remove`),{withTypes:()=>id});function Ie(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ad=_r(Symbol("withEventBus"),function(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)}}}),Qr=class extends ad(Object){};window.ftReduxStores||(window.ftReduxStores={});var _a=class e extends Qr{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Nr(s))return s;if(a==null)return;let c=Ca({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=xa({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Xt(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return 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 Rr,this.injectInto=(s,c)=>this.reduxSlice.injectInto(s,c),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...f)=>{let h=p(...f.map(a));return this.reduxStore.dispatch(h),h}:f=>{let h=u,y=this.getState()[h];_t(y,f)||this.setState({[h]:a(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var eo=class{static format(t,o,n,a,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!s)):this.getIntlDateTime(t,o,n,a,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:a?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var to=g(T()),sd="ft-app-info",dt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};dt.eventName="authentication-change";var ar=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ar.eventName="ui-locale-changed";var cd={session:(e,t)=>{(0,to.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new dt(t.payload)),0))}},w=to.FtReduxStore.get({name:sd,reducers:cd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ra=g(T()),ro=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},pg=(0,Ra.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>eo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ro([(0,un.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ro([(0,un.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ro([Wo({store:w.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ro([Wo({store:w.name})],t.prototype,"uiLocale",void 0),t});var Ta;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ta||(Ta={}));var La;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(La||(La={}));var ka;(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.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(ka||(ka={}));var Na;(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.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Na||(Na={}));var Ia;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ia||(Ia={}));var Pa;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Pa||(Pa={}));var Da;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Da||(Da={}));var Ma;(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.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_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__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(Ma||(Ma={}));var Ua;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ua||(Ua={}));var Ba;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ba||(Ba={}));var Fa;(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"})(Fa||(Fa={}));var $a;(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",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})($a||($a={}));var Ha;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ha||(Ha={}));var za;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(za||(za={}));var Ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ga||(Ga={}));var Wa;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Wa||(Wa={}));var Va;(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"})(Va||(Va={}));var Ka;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Ka||(Ka={}));var ja;(function(e){e.ASC="ASC",e.DESC="DESC"})(ja||(ja={}));var Za;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Za||(Za={}));var qa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(qa||(qa={}));var Ya;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ya||(Ya={}));var Xa;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Xa||(Xa={}));var Ja;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ja||(Ja={}));var Qa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Qa||(Qa={}));var es;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(es||(es={}));var ts;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ts||(ts={}));var rs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rs||(rs={}));var W;(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.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(W||(W={}));var de;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(de||(de={}));var os;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(os||(os={}));var ns;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ns||(ns={}));var is;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(is||(is={}));var as;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(as||(as={}));var ss;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ss||(ss={}));var cs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(cs||(cs={}));var ls;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ls||(ls={}));var ds;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(ds||(ds={}));var us;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(us||(us={}));var ps;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ps||(ps={}));var fs;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hs||(hs={}));var ld={[W.PERSONAL_BOOK_SHARE_USER]:[W.PERSONAL_BOOK_USER],[W.HTML_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.PDF_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.KHUB_ADMIN]:[W.CONTENT_PUBLISHER],[W.ADMIN]:[W.KHUB_ADMIN,W.USERS_ADMIN,W.PORTAL_ADMIN,W.BEHAVIOR_DATA_USER],[W.GENERATIVE_AI_EXPORT_USER]:[W.GENERATIVE_AI_USER]};function ys(e,t){return e===t||(ld[e]??[]).some(o=>ys(o,t))}function pn(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=>ys(n,t))}function ms(e,...t){return e==null?!1:t.some(o=>pn(e,o))}var so=g(T());var fn=g(T());var ut=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.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=w.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var Nt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ut.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ut.await()}};var se=class extends Nt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new fn.CacheRegistry,this.cache=t?a.commonCache:new fn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var oo=class extends se{async listMySearches(){let{session:t}=w.getState();return pn(t,W.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var no=class extends se{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var io=class extends se{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var ao=class extends se{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var dd="ft-user-assets",ud={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(de).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;yn(e,o,[...hn(e,o),a]),gs(e,o,1,n),bs(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;yn(e,o,hn(e,o).map(a=>a.id===n.id?n:a)),bs(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;yn(e,o,hn(e,o).filter(s=>s.id!==a)),gs(e,o,-1,n)}},xs={[de.SEARCHES]:"savedSearches",[de.BOOKMARKS]:"bookmarks",[de.BOOKS]:void 0,[de.COLLECTIONS]:void 0},hn=(e,t)=>{var o;let n=xs[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},yn=(e,t,o)=>{let n=xs[t];n&&(e[n]=o)},gs=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===de.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},bs=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Q=so.FtReduxStore.get({name:dd,reducers:ud,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(de).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),mn=class{constructor(t=new io,o=new ao){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new no,this.savedSearchesService=new oo,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,so.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Q.actions.clearAssetCount(),Q.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Q.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Q.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Q.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Q.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Q.getState().assetCounts.allAsset[t]!==o.count&&Q.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Q.getState().assetCounts.bookmarkByMap[t]!==o.count&&Q.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Q.getState().assetCounts.bookmarkByMap).length!==0;t===de.BOOKMARKS&&o&&Q.actions.clearBookmarkCountByMap(),Q.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}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;Q.actions.bookmarks(o)}}},pd=new mn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pd);var gn=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gn;var ue=g(T());var Ss,It=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},fd=Symbol("clearAfterUnitTest"),co=class extends(0,ue.withEventBus)(se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ss]=()=>{this.defaultMessages={},this.cache=new ue.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ue.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 s=t.toLowerCase(),c=this.resolveContext(s);return new ue.ParametrizedLabelResolver((a=this.defaultMessages[s])!==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 ue.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(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new It({loadedContexts:t})),this.dispatchEvent(new It({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new It({loadedContexts:[t]})),this.dispatchEvent(new It({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ue.delay)(0).then(()=>n()).catch(()=>null)))}};Ss=fd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends co{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends co{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pt=window.FluidTopicsI18nService,lo=window.FluidTopicsCustomI18nService;var vs=g(T()),bn=class{highlightHtml(t,o,n){(0,vs.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new bn;var Cs=g(T());var xn=class{isDate(t){var o,n,a,s;return(s=(a=((n=(o=w.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&&s!==void 0?s:!1}format(t,o){var n,a,s,c;if(t==null)return"";try{return Cs.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new xn;var Es=g(T());var sr=class{static get(t,o){var n,a,s,c;let d=w.getState(),{lang:u,region:p}=(s=(a=(n=d.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new Es.SearchPlaceConverter(d.baseUrl,t??20,(c=d.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed,o??`${u}-${p}`)}};var Sn=class{urlToSearchRequest(t){return sr.get().parse(t)}searchRequestToUrl(t){return sr.get().serialize(t)}};window.FluidTopicsUrlService=new Sn;var Pe=g(T());var pt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};pt.eventName="before-location-change";var ft=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};ft.eventName="change";var vn=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))}},Os=new vn;var uo=class e extends Pe.WithEventBus{static build(){return new e(window.history,Os,()=>window.location,!1)}constructor(t,o,n,a){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.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,Pe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new ft(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[s,c,d])=>{let u=new pt(new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin));this.dispatchEvent(u);let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...s,index:p,href:u.detail.nextLocation.href};n.apply(a,[f,c,f.href]),this.setCurrentState(f,!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)}addBeforeLocationChangeListener(t){this.addEventListener(pt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(pt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(ft.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ft.eventName,t)}currentItem(){return(0,Pe.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,Pe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Pe.deepCopy)(o.find(n=>t(n)))}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,Pe.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,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(a=s),s++;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,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=uo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var As=g(z());var ws=As.css`
170
+ `}};ne.styles=[mi,gi,bi,xi,Si,vi,Ci,Ei,Oi,Ai,wi];_i([(0,zo.property)()],ne.prototype,"element",void 0);_i([(0,zo.property)()],ne.prototype,"variant",void 0);var Li=g(T());var Ti={"ft-typography":ne};(0,Li.customElements)(Ti);var un=g(te());var ki=g(te(),1);var Go=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},cl=e=>({fromAttribute:t=>{if(t==null)return Xt(e);try{return JSON.parse(t)}catch{return Xt(e)}},toAttribute:t=>JSON.stringify(t)});function Ni(e,t){return(0,ki.property)({type:Object,converter:cl(e),hasChanged:Jt,...t??{}})}function ll(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!_t(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(!_t(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 a=c=>Object.keys(c).filter(d=>c[d]!=null),s=a(e);if(o=s.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let c=s[n];if(!_t(e[c],t[c]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function _t(e,t){try{return ll(e,t)}catch{return!1}}function Jt(e,t){return!_t(e,t)}function Xt(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function _r(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var Ii=g(te(),1);var Wo=e=>{let t=e??{};return(o,n)=>{var a;let s={hasChanged:Jt,attribute:!1,...t};(0,Ii.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(d=>d[n]),store:t.store})}};var Rr=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 st=g(te(),1);var Tr=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),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Di=g(z(),1);var Lr=globalThis,dl=Lr.ShadowRoot&&(Lr.ShadyCSS===void 0||Lr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Pi=(e,t)=>{if(dl)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Lr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var kr=class extends Di.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Pi(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Go(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function Mi(e,t,...o){var n;let a=e.querySelector(t);for(let s of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var Tt=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},$i,Ui=Symbol("constructorPrototype"),Bi=Symbol("constructorName"),Hi=Symbol("exportpartsDebouncer"),Fi=Symbol("dynamicDependenciesLoaded"),Rt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Rt.eventName="exportparts-updated";var Ae=class extends kr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[$i]=new Tr(5),this.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[Hi].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Bi]=this.constructor.name,this[Ui]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Bi]&&Object.setPrototypeOf(this,this[Ui])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Fi]||(o[Fi]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Rt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Rt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Rt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];o=Mi(this.shadowRoot,...s)}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(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,a,s,c,d;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let f=new Set;for(let y of(s=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let x=(c=(n=y.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&c!==void 0?c:[],C=(d=(a=y.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(v=>v.split(":")[1]))!==null&&d!==void 0?d:[],O=[...x,...C].filter(u).map(v=>v.trim());for(let v of O)f.add(v)}if(f.size===0){this.exportparts=void 0;return}let h=[...f.values()].flatMap(y=>p.map(x=>`${y}:${x}--${y}`));this.exportparts=[...this.part,...h].join(", ")}};$i=Hi;Tt([(0,st.property)()],Ae.prototype,"exportpartsPrefix",void 0);Tt([Ni([])],Ae.prototype,"exportpartsPrefixes",void 0);Tt([(0,st.property)({reflect:!0})],Ae.prototype,"exportparts",void 0);Tt([(0,st.property)()],Ae.prototype,"customStylesheet",void 0);Tt([(0,st.property)()],Ae.prototype,"elementToFocus",void 0);Tt([(0,st.state)()],Ae.prototype,"useAdoptedStyleSheets",void 0);function Nr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Qt=Symbol("internalReduxEventsUnsubscribers"),He=Symbol("internalStoresUnsubscribers"),ct=Symbol("internalStores"),ul=_r(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ct].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[ct].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[ct].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[ct].delete(d)}setupStores(){this.unsubscribeFromStores(),this[ct].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[He].has(c.store):this[He].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[He].set(c,d.subscribe(()=>this.updateFromStores())),this[Qt].set(c,[]),Nr(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||d.name===p.store)){let h=y=>this[f](y);d.addEventListener(p.eventName,h),this[Qt].get(c).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[He].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[He].has(c)&&this[He].get(c)(),this[He].delete(c),(d=this[Qt].get(c))===null||d===void 0||d.forEach(u=>u()),this[Qt].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=He,o=ct,n=Qt,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zi=class extends ul(Ae){};function q(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 pl=typeof Symbol=="function"&&Symbol.observable||"@@observable",Gi=pl,Vo=()=>Math.random().toString(36).substring(7).split("").join("."),fl={INIT:`@@redux/INIT${Vo()}`,REPLACE:`@@redux/REPLACE${Vo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Vo()}`},Ir=fl;function Pr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ko(e,t,o){if(typeof e!="function")throw new Error(q(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(q(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(q(1));return o(Ko)(e,t)}let n=e,a=t,s=new Map,c=s,d=0,u=!1;function p(){c===s&&(c=new Map,s.forEach((v,A)=>{c.set(A,v)}))}function f(){if(u)throw new Error(q(3));return a}function h(v){if(typeof v!="function")throw new Error(q(4));if(u)throw new Error(q(5));let A=!0;p();let I=d++;return c.set(I,v),function(){if(A){if(u)throw new Error(q(6));A=!1,p(),c.delete(I),s=null}}}function y(v){if(!Pr(v))throw new Error(q(7));if(typeof v.type>"u")throw new Error(q(8));if(typeof v.type!="string")throw new Error(q(17));if(u)throw new Error(q(9));try{u=!0,a=n(a,v)}finally{u=!1}return(s=c).forEach(I=>{I()}),v}function x(v){if(typeof v!="function")throw new Error(q(10));n=v,y({type:Ir.REPLACE})}function C(){let v=h;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(q(11));function I(){let R=A;R.next&&R.next(f())}return I(),{unsubscribe:v(I)}},[Gi](){return this}}}return y({type:Ir.INIT}),{dispatch:y,subscribe:h,getState:f,replaceReducer:x,[Gi]:C}}function hl(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Ir.INIT})>"u")throw new Error(q(12));if(typeof o(void 0,{type:Ir.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(q(13))})}function Wi(e){let t=Object.keys(e),o={};for(let c=0;c<t.length;c++){let d=t[c];typeof e[d]=="function"&&(o[d]=e[d])}let n=Object.keys(o),a,s;try{hl(o)}catch(c){s=c}return function(d={},u){if(s)throw s;let p=!1,f={};for(let h=0;h<n.length;h++){let y=n[h],x=o[y],C=d[y],O=x(C,u);if(typeof O>"u"){let v=u&&u.type;throw new Error(q(14))}f[y]=O,p=p||O!==C}return p=p||n.length!==Object.keys(d).length,p?f:d}}function er(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function Vi(...e){return t=>(o,n)=>{let a=t(o,n),s=()=>{throw new Error(q(15))},c={getState:a.getState,dispatch:(u,...p)=>s(u,...p)},d=e.map(u=>u(c));return s=er(...d)(a.dispatch),{...a,dispatch:s}}}function Ki(e){return Pr(e)&&"type"in e&&typeof e.type=="string"}var ta=Symbol.for("immer-nothing"),ji=Symbol.for("immer-draftable"),X=Symbol.for("immer-state");function xe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ie=Object,kt=ie.getPrototypeOf,Br="constructor",Wr="prototype",Yo="configurable",Fr="enumerable",Mr="writable",tr="value",we=e=>!!e&&!!e[X];function ae(e){return e?ra(e)||Kr(e)||!!e[ji]||!!e[Br]?.[ji]||jr(e)||Zr(e):!1}var yl=ie[Wr][Br].toString(),Zi=new WeakMap;function ra(e){if(!e||!nn(e))return!1;let t=kt(e);if(t===null||t===ie[Wr])return!0;let o=ie.hasOwnProperty.call(t,Br)&&t[Br];if(o===Object)return!0;if(!Lt(o))return!1;let n=Zi.get(o);return n===void 0&&(n=Function.toString.call(o),Zi.set(o,n)),n===yl}function Vr(e,t,o=!0){nr(e)===0?(o?Reflect.ownKeys(e):ie.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function nr(e){let t=e[X];return t?t.type_:Kr(e)?1:jr(e)?2:Zr(e)?3:0}var jo=(e,t,o=nr(e))=>o===2?e.has(t):ie[Wr].hasOwnProperty.call(e,t),Xo=(e,t,o=nr(e))=>o===2?e.get(t):e[t],$r=(e,t,o,n=nr(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function ml(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Kr=Array.isArray,jr=e=>e instanceof Map,Zr=e=>e instanceof Set,nn=e=>typeof e=="object",Lt=e=>typeof e=="function",Zo=e=>typeof e=="boolean";function gl(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ne=e=>e.copy_||e.base_;var an=e=>e.modified_?e.copy_:e.base_;function Jo(e,t){if(jr(e))return new Map(e);if(Zr(e))return new Set(e);if(Kr(e))return Array[Wr].slice.call(e);let o=ra(e);if(t===!0||t==="class_only"&&!o){let n=ie.getOwnPropertyDescriptors(e);delete n[X];let a=Reflect.ownKeys(n);for(let s=0;s<a.length;s++){let c=a[s],d=n[c];d[Mr]===!1&&(d[Mr]=!0,d[Yo]=!0),(d.get||d.set)&&(n[c]={[Yo]:!0,[Mr]:!0,[Fr]:d[Fr],[tr]:e[c]})}return ie.create(kt(e),n)}else{let n=kt(e);if(n!==null&&o)return{...e};let a=ie.create(n);return ie.assign(a,e)}}function sn(e,t=!1){return qr(e)||we(e)||!ae(e)||(nr(e)>1&&ie.defineProperties(e,{set:Dr,add:Dr,clear:Dr,delete:Dr}),ie.freeze(e),t&&Vr(e,(o,n)=>{sn(n,!0)},!1)),e}function bl(){xe(2)}var Dr={[tr]:bl};function qr(e){return e===null||!nn(e)?!0:ie.isFrozen(e)}var Hr="MapSet",Qo="Patches",qi="ArrayMethods",oa={};function lt(e){let t=oa[e];return t||xe(0,e),t}var Yi=e=>!!oa[e];var rr,na=()=>rr,xl=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Yi(Hr)?lt(Hr):void 0,arrayMethodsPlugin_:Yi(qi)?lt(qi):void 0});function Xi(e,t){t&&(e.patchPlugin_=lt(Qo),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function en(e){tn(e),e.drafts_.forEach(Sl),e.drafts_=null}function tn(e){e===rr&&(rr=e.parent_)}var Ji=e=>rr=xl(rr,e);function Sl(e){let t=e[X];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Qi(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[X].modified_&&(en(t),xe(4)),ae(e)&&(e=ea(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(o[X].base_,e,t)}else e=ea(t,o);return vl(t,e,!0),en(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ta?e:void 0}function ea(e,t){if(qr(t))return t;let o=t[X];if(!o)return zr(t,e.handledSet_,e);if(!Yr(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);sa(o,e)}return o.copy_}function vl(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&sn(t,o)}function ia(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Yr=(e,t)=>e.scope_===t,Cl=[];function aa(e,t,o,n){let a=Ne(e),s=e.type_;if(n!==void 0&&Xo(a,n,s)===t){$r(a,n,o,s);return}if(!e.draftLocations_){let d=e.draftLocations_=new Map;Vr(a,(u,p)=>{if(we(p)){let f=d.get(p)||[];f.push(u),d.set(p,f)}})}let c=e.draftLocations_.get(t)??Cl;for(let d of c)$r(a,d,o,s)}function El(e,t,o){e.callbacks_.push(function(a){let s=t;if(!s||!Yr(s,a))return;a.mapSetPlugin_?.fixSetContents(s);let c=an(s);aa(e,s.draft_??s,c,o),sa(s,a)})}function sa(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}ia(e)}}function Ol(e,t,o){let{scope_:n}=e;if(we(o)){let a=o[X];Yr(a,n)&&a.callbacks_.push(function(){Ur(e);let c=an(a);aa(e,o,c,t)})}else ae(o)&&e.callbacks_.push(function(){let s=Ne(e);e.type_===3?s.has(o)&&zr(o,n.handledSet_,n):Xo(s,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&zr(Xo(e.copy_,t,e.type_),n.handledSet_,n)})}function zr(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||we(e)||t.has(e)||!ae(e)||qr(e)||(t.add(e),Vr(e,(n,a)=>{if(we(a)){let s=a[X];if(Yr(s,o)){let c=an(s);$r(e,n,c,e.type_),ia(s)}}else ae(a)&&zr(a,t,o)})),e}function Al(e,t){let o=Kr(e),n={type_:o?1:0,scope_:t?t.scope_:na(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,s=Gr;o&&(a=[n],s=or);let{revoke:c,proxy:d}=Proxy.revocable(a,s);return n.draft_=d,n.revoke_=c,[d,n]}var Gr={get(e,t){if(t===X)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let a=Ne(e);if(!jo(a,t,e.type_))return _l(e,a,t);let s=a[t];if(e.finalized_||!ae(s)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&gl(t))return s;if(s===qo(e.base_,t)||wl(e,t,s)){Ur(e);let c=e.type_===1?+t:t,d=on(e.scope_,s,e,c);return e.copy_[c]=d}return s},has(e,t){return t in Ne(e)},ownKeys(e){return Reflect.ownKeys(Ne(e))},set(e,t,o){let n=ca(Ne(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let a=qo(Ne(e),t),s=a?.[X];if(s&&s.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(ml(o,a)&&(o!==void 0||jo(e.base_,t,e.type_)))return!0;Ur(e),rn(e)}return e.copy_[t]===o&&(o!==void 0||jo(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),Ol(e,t,o)),!0},deleteProperty(e,t){return Ur(e),qo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),rn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=Ne(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[Mr]:!0,[Yo]:e.type_!==1||t!=="length",[Fr]:n[Fr],[tr]:o[t]}},defineProperty(){xe(11)},getPrototypeOf(e){return kt(e.base_)},setPrototypeOf(){xe(12)}},or={};for(let e in Gr){let t=Gr[e];or[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}or.deleteProperty=function(e,t){return or.set.call(this,e,t,void 0)};or.set=function(e,t,o){return Gr.set.call(this,e[0],t,o,e[0])};function qo(e,t){let o=e[X];return(o?Ne(o):e)[t]}function wl(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ae(o)||o[X]?!1:e.baseRefs_.has(o)}function _l(e,t,o){let n=ca(t,o);return n?tr in n?n[tr]:n.get?.call(e.draft_):void 0}function ca(e,t){if(!(t in e))return;let o=kt(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=kt(o)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function Ur(e){e.copy_||(e.assigned_=new Map,e.copy_=Jo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rl=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(Lt(t)&&!Lt(o)){let s=o;o=t;let c=this;return function(u=s,...p){return c.produce(u,f=>o.call(this,f,...p))}}Lt(o)||xe(6),n!==void 0&&!Lt(n)&&xe(7);let a;if(ae(t)){let s=Ji(this),c=on(s,t,void 0),d=!0;try{a=o(c),d=!1}finally{d?en(s):tn(s)}return Xi(s,n),Qi(a,s)}else if(!t||!nn(t)){if(a=o(t),a===void 0&&(a=t),a===ta&&(a=void 0),this.autoFreeze_&&sn(a,!0),n){let s=[],c=[];lt(Qo).generateReplacementPatches_(t,a,{patches_:s,inversePatches_:c}),n(s,c)}return a}else xe(1,t)},this.produceWithPatches=(t,o)=>{if(Lt(t))return(c,...d)=>this.produceWithPatches(c,u=>t(u,...d));let n,a;return[this.produce(t,o,(c,d)=>{n=c,a=d}),n,a]},Zo(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Zo(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Zo(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ae(e)||xe(8),we(e)&&(e=la(e));let t=Ji(this),o=on(t,e,void 0);return o[X].isManual_=!0,tn(t),o}finishDraft(e,t){let o=e&&e[X];(!o||!o.isManual_)&&xe(9);let{scope_:n}=o;return Xi(n,t),Qi(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let a=t[o];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}o>-1&&(t=t.slice(o+1));let n=lt(Qo).applyPatches_;return we(e)?n(e,t):this.produce(e,a=>n(a,t))}};function on(e,t,o,n){let[a,s]=jr(t)?lt(Hr).proxyMap_(t,o):Zr(t)?lt(Hr).proxySet_(t,o):Al(t,o);return(o?.scope_??na()).drafts_.push(a),s.callbacks_=o?.callbacks_??[],s.key_=n,o&&n!==void 0?El(o,s,n):s.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:p}=u;s.modified_&&p&&p.generatePatches_(s,[],u)}),a}function la(e){return we(e)||xe(10,e),da(e)}function da(e){if(!ae(e)||qr(e))return e;let t=e[X],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Jo(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Jo(e,!0);return Vr(o,(a,s)=>{$r(o,a,da(s))},n),t&&(t.finalized_=!1),o}var Tl=globalThis.Iterator,Cm=typeof Tl?.from=="function";var Ll=new Rl,cn=Ll.produce;function ua(e){return({dispatch:o,getState:n})=>a=>s=>typeof s=="function"?s(o,n,e):a(s)}var pa=ua(),fa=ua;var kl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},Tm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Nl=e=>e&&typeof e.match=="function";function ze(e,t){function o(...n){if(t){let a=t(...n);if(!a)throw new Error(Ie(0));return{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=()=>`${e}`,o.type=e,o.match=n=>Ki(n)&&n.type===e,o}var ba=class ir extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ir.prototype)}static get[Symbol.species](){return ir}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ir(...t[0].concat(this)):new ir(...t.concat(this))}};function ha(e){return ae(e)?cn(e,()=>{}):e}function Xr(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function Il(e){return typeof e=="boolean"}var Pl=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:s=!0}=t??{},c=new ba;return o&&(Il(o)?c.push(pa):c.push(fa(o.extraArgument))),c},Dl="RTK_autoBatch";var ya=e=>t=>{setTimeout(t,e)},Ml=(e,t)=>o=>{let n=!1,a=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(c),o())},s=e(a),c=setTimeout(a,t)},Ul=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),a=!0,s=!1,c=!1,d=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ml(window.requestAnimationFrame,100):ya(10):e.type==="callback"?e.queueNotification:ya(e.timeout),p=()=>{c=!1,s&&(s=!1,d.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){let h=()=>a&&f(),y=n.subscribe(h);return d.add(f),()=>{y(),d.delete(f)}},dispatch(f){try{return a=!f?.meta?.[Dl],s=!a,s&&(c||(c=!0,u(p))),n.dispatch(f)}finally{a=!0}}})},Bl=e=>function(o){let{autoBatch:n=!0}=o??{},a=new ba(e);return n&&a.push(Ul(typeof n=="object"?n:void 0)),a};function xa(e){let t=Pl(),{reducer:o=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:s=!0,preloadedState:c=void 0,enhancers:d=void 0}=e||{},u;if(typeof o=="function")u=o;else if(Pr(o))u=Wi(o);else throw new Error(Ie(1));let p;typeof n=="function"?p=n(t):p=t();let f=er;a&&(f=kl({trace:!1,...typeof a=="object"&&a}));let h=Vi(...p),y=Bl(h),x=typeof d=="function"?d(y):y(),C=f(...x);return Ko(u,c,C)}function Sa(e){let t={},o=[],n,a={addCase(s,c){let d=typeof s=="string"?s:s.type;if(!d)throw new Error(Ie(28));if(d in t)throw new Error(Ie(29));return t[d]=c,a},addAsyncThunk(s,c){return c.pending&&(t[s.pending.type]=c.pending),c.rejected&&(t[s.rejected.type]=c.rejected),c.fulfilled&&(t[s.fulfilled.type]=c.fulfilled),c.settled&&o.push({matcher:s.settled,reducer:c.settled}),a},addMatcher(s,c){return o.push({matcher:s,reducer:c}),a},addDefaultCase(s){return n=s,a}};return e(a),[t,o,n]}function Fl(e){return typeof e=="function"}function $l(e,t){let[o,n,a]=Sa(t),s;if(Fl(e))s=()=>ha(e());else{let d=ha(e);s=()=>d}function c(d=s(),u){let p=[o[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return p.filter(f=>!!f).length===0&&(p=[a]),p.reduce((f,h)=>{if(h)if(we(f)){let x=h(f,u);return x===void 0?f:x}else{if(ae(f))return cn(f,y=>h(y,u));{let y=h(f,u);if(y===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return f},d)}return c.getInitialState=s,c}var Hl=(e,t)=>Nl(e)?e.match(t):e(t);function zl(...e){return t=>e.some(o=>Hl(o,t))}var Gl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wl=(e=21)=>{let t="",o=e;for(;o--;)t+=Gl[Math.random()*64|0];return t},Vl=["name","message","stack","code"],ln=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ma=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Kl=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of Vl)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},ga="External signal was aborted",jl=(()=>{function e(t,o,n){let a=ze(t+"/fulfilled",(u,p,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:p,requestStatus:"fulfilled"}})),s=ze(t+"/pending",(u,p,f)=>({payload:void 0,meta:{...f||{},arg:p,requestId:u,requestStatus:"pending"}})),c=ze(t+"/rejected",(u,p,f,h,y)=>({payload:h,error:(n&&n.serializeError||Kl)(u||"Rejected"),meta:{...y||{},arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function d(u,{signal:p}={}){return(f,h,y)=>{let x=n?.idGenerator?n.idGenerator(u):Wl(),C=new AbortController,O,v;function A(E){v=E,C.abort()}p&&(p.aborted?A(ga):p.addEventListener("abort",()=>A(ga),{once:!0}));let I=(async function(){let E;try{let L=n?.condition?.(u,{getState:h,extra:y});if(ql(L)&&(L=await L),L===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let $=new Promise((M,H)=>{O=()=>{H({name:"AbortError",message:v||"Aborted"})},C.signal.addEventListener("abort",O,{once:!0})});f(s(x,u,n?.getPendingMeta?.({requestId:x,arg:u},{getState:h,extra:y}))),E=await Promise.race([$,Promise.resolve(o(u,{dispatch:f,getState:h,extra:y,requestId:x,signal:C.signal,abort:A,rejectWithValue:((M,H)=>new ln(M,H)),fulfillWithValue:((M,H)=>new ma(M,H))})).then(M=>{if(M instanceof ln)throw M;return M instanceof ma?a(M.payload,x,u,M.meta):a(M,x,u)})])}catch(L){E=L instanceof ln?c(null,x,u,L.payload,L.meta):c(L,x,u)}finally{O&&C.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||f(E),E})();return Object.assign(I,{abort:A,requestId:x,arg:u,unwrap(){return I.then(Zl)}})}}return Object.assign(d,{pending:s,rejected:c,fulfilled:a,settled:zl(c,a),typePrefix:t})}return e.withTypes=()=>e,e})();function Zl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ql(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var va=Symbol.for("rtk-slice-createasyncthunk"),km={[va]:jl};function Yl(e,t){return`${e}/${t}`}function Xl({creators:e}={}){let t=e?.asyncThunk?.[va];return function(n){let{name:a,reducerPath:s=a}=n;if(!a)throw new Error(Ie(11));typeof process<"u";let c=(typeof n.reducers=="function"?n.reducers(Ql()):n.reducers)||{},d=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,R){let L=typeof E=="string"?E:E.type;if(!L)throw new Error(Ie(12));if(L in u.sliceCaseReducersByType)throw new Error(Ie(13));return u.sliceCaseReducersByType[L]=R,p},addMatcher(E,R){return u.sliceMatchers.push({matcher:E,reducer:R}),p},exposeAction(E,R){return u.actionCreators[E]=R,p},exposeCaseReducer(E,R){return u.sliceCaseReducersByName[E]=R,p}};d.forEach(E=>{let R=c[E],L={reducerName:E,type:Yl(a,E),createNotation:typeof n.reducers=="function"};td(R)?od(L,R,p,t):ed(L,R,p)});function f(){let[E={},R=[],L=void 0]=typeof n.extraReducers=="function"?Sa(n.extraReducers):[n.extraReducers],$={...E,...u.sliceCaseReducersByType};return $l(n.initialState,M=>{for(let H in $)M.addCase(H,$[H]);for(let H of u.sliceMatchers)M.addMatcher(H.matcher,H.reducer);for(let H of R)M.addMatcher(H.matcher,H.reducer);L&&M.addDefaultCase(L)})}let h=E=>E,y=new Map,x=new WeakMap,C;function O(E,R){return C||(C=f()),C(E,R)}function v(){return C||(C=f()),C.getInitialState()}function A(E,R=!1){function L(M){let H=M[E];return typeof H>"u"&&R&&(H=Xr(x,L,v)),H}function $(M=h){let H=Xr(y,R,()=>new WeakMap);return Xr(H,M,()=>{let Gt={};for(let[ce,Ze]of Object.entries(n.selectors??{}))Gt[ce]=Jl(Ze,M,()=>Xr(x,M,v),R);return Gt})}return{reducerPath:E,getSelectors:$,get selectors(){return $(L)},selectSlice:L}}let I={name:a,reducer:O,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...A(s),injectInto(E,{reducerPath:R,...L}={}){let $=R??s;return E.inject({reducerPath:$,reducer:O},L),{...I,...A($,!0)}}};return I}}function Jl(e,t,o,n){function a(s,...c){let d=t(s);return typeof d>"u"&&n&&(d=o()),e(d,...c)}return a.unwrapped=e,a}var Ca=Xl();function Ql(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function ed({type:e,reducerName:t,createNotation:o},n,a){let s,c;if("reducer"in n){if(o&&!rd(n))throw new Error(Ie(17));s=n.reducer,c=n.prepare}else s=n;a.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,c?ze(e,c):ze(e))}function td(e){return e._reducerDefinitionType==="asyncThunk"}function rd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function od({type:e,reducerName:t},o,n,a){if(!a)throw new Error(Ie(18));let{payloadCreator:s,fulfilled:c,pending:d,rejected:u,settled:p,options:f}=o,h=a(e,s,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),d&&n.addCase(h.pending,d),u&&n.addCase(h.rejected,u),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:c||Jr,pending:d||Jr,rejected:u||Jr,settled:p||Jr})}function Jr(){}var Ea="listener",Oa="completed",Aa="cancelled",Nm=`task-${Aa}`,Im=`task-${Oa}`,Pm=`${Ea}-${Aa}`,Dm=`${Ea}-${Oa}`;var{assign:wa}=Object;var dn="listenerMiddleware";var nd=wa(ze(`${dn}/add`),{withTypes:()=>nd}),Mm=ze(`${dn}/removeAll`),id=wa(ze(`${dn}/remove`),{withTypes:()=>id});function Ie(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ad=_r(Symbol("withEventBus"),function(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)}}}),Qr=class extends ad(Object){};window.ftReduxStores||(window.ftReduxStores={});var _a=class e extends Qr{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Nr(s))return s;if(a==null)return;let c=Ca({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=xa({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Xt(c.getInitialState());for(let h of p.keeping)f[h]=(u??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return 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 Rr,this.injectInto=(s,c)=>this.reduxSlice.injectInto(s,c),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...f)=>{let h=p(...f.map(a));return this.reduxStore.dispatch(h),h}:f=>{let h=u,y=this.getState()[h];_t(y,f)||this.setState({[h]:a(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var eo=class{static format(t,o,n,a,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!s)):this.getIntlDateTime(t,o,n,a,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:a?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var to=g(T()),sd="ft-app-info",dt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};dt.eventName="authentication-change";var ar=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ar.eventName="ui-locale-changed";var cd={session:(e,t)=>{(0,to.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new dt(t.payload)),0))}},w=to.FtReduxStore.get({name:sd,reducers:cd,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ra=g(T()),ro=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},pg=(0,Ra.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>eo.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ro([(0,un.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ro([(0,un.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ro([Wo({store:w.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ro([Wo({store:w.name})],t.prototype,"uiLocale",void 0),t});var Ta;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ta||(Ta={}));var La;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(La||(La={}));var ka;(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.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(ka||(ka={}));var Na;(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.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Na||(Na={}));var Ia;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ia||(Ia={}));var Pa;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Pa||(Pa={}));var Da;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Da||(Da={}));var Ma;(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.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_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__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(Ma||(Ma={}));var Ua;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ua||(Ua={}));var Ba;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ba||(Ba={}));var Fa;(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"})(Fa||(Fa={}));var $a;(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",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})($a||($a={}));var Ha;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ha||(Ha={}));var za;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(za||(za={}));var Ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ga||(Ga={}));var Wa;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Wa||(Wa={}));var Va;(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"})(Va||(Va={}));var Ka;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Ka||(Ka={}));var ja;(function(e){e.ASC="ASC",e.DESC="DESC"})(ja||(ja={}));var Za;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Za||(Za={}));var qa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(qa||(qa={}));var Ya;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ya||(Ya={}));var Xa;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Xa||(Xa={}));var Ja;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ja||(Ja={}));var Qa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Qa||(Qa={}));var es;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(es||(es={}));var ts;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ts||(ts={}));var rs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(rs||(rs={}));var W;(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.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(W||(W={}));var de;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(de||(de={}));var os;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(os||(os={}));var ns;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ns||(ns={}));var is;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(is||(is={}));var as;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(as||(as={}));var ss;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ss||(ss={}));var cs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(cs||(cs={}));var ls;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ls||(ls={}));var ds;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(ds||(ds={}));var us;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(us||(us={}));var ps;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ps||(ps={}));var fs;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(fs||(fs={}));var hs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hs||(hs={}));var ld={[W.PERSONAL_BOOK_SHARE_USER]:[W.PERSONAL_BOOK_USER],[W.HTML_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.PDF_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.KHUB_ADMIN]:[W.CONTENT_PUBLISHER],[W.ADMIN]:[W.KHUB_ADMIN,W.USERS_ADMIN,W.PORTAL_ADMIN,W.BEHAVIOR_DATA_USER],[W.GENERATIVE_AI_EXPORT_USER]:[W.GENERATIVE_AI_USER]};function ys(e,t){return e===t||(ld[e]??[]).some(o=>ys(o,t))}function pn(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=>ys(n,t))}function ms(e,...t){return e==null?!1:t.some(o=>pn(e,o))}var so=g(T());var fn=g(T());var ut=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.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=w.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var Nt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ut.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ut.await()}};var se=class extends Nt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new fn.CacheRegistry,this.cache=t?a.commonCache:new fn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var oo=class extends se{async listMySearches(){let{session:t}=w.getState();return pn(t,W.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var no=class extends se{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var io=class extends se{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var ao=class extends se{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var dd="ft-user-assets",ud={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(de).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;yn(e,o,[...hn(e,o),a]),gs(e,o,1,n),bs(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;yn(e,o,hn(e,o).map(a=>a.id===n.id?n:a)),bs(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;yn(e,o,hn(e,o).filter(s=>s.id!==a)),gs(e,o,-1,n)}},xs={[de.SEARCHES]:"savedSearches",[de.BOOKMARKS]:"bookmarks",[de.BOOKS]:void 0,[de.COLLECTIONS]:void 0},hn=(e,t)=>{var o;let n=xs[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},yn=(e,t,o)=>{let n=xs[t];n&&(e[n]=o)},gs=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===de.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},bs=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Q=so.FtReduxStore.get({name:dd,reducers:ud,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(de).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),mn=class{constructor(t=new io,o=new ao){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new no,this.savedSearchesService=new oo,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,so.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Q.actions.clearAssetCount(),Q.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Q.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Q.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Q.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Q.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Q.getState().assetCounts.allAsset[t]!==o.count&&Q.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Q.getState().assetCounts.bookmarkByMap[t]!==o.count&&Q.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Q.getState().assetCounts.bookmarkByMap).length!==0;t===de.BOOKMARKS&&o&&Q.actions.clearBookmarkCountByMap(),Q.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}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;Q.actions.bookmarks(o)}}},pd=new mn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pd);var gn=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gn;var ue=g(T());var Ss,It=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},fd=Symbol("clearAfterUnitTest"),co=class extends(0,ue.withEventBus)(se){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ss]=()=>{this.defaultMessages={},this.cache=new ue.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ue.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 s=t.toLowerCase(),c=this.resolveContext(s);return new ue.ParametrizedLabelResolver((a=this.defaultMessages[s])!==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 ue.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(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new It({loadedContexts:t})),this.dispatchEvent(new It({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new It({loadedContexts:[t]})),this.dispatchEvent(new It({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ue.delay)(0).then(()=>n()).catch(()=>null)))}};Ss=fd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends co{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends co{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pt=window.FluidTopicsI18nService,lo=window.FluidTopicsCustomI18nService;var vs=g(T()),bn=class{highlightHtml(t,o,n){(0,vs.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new bn;var Cs=g(T());var xn=class{isDate(t){var o,n,a,s;return(s=(n=((a=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]).find(d=>d.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,o){var n,a,s,c;if(t==null)return"";try{return Cs.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new xn;var Es=g(T());var sr=class{static get(t,o){var n,a,s,c;let d=w.getState(),{lang:u,region:p}=(c=(a=(n=d.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&c!==void 0?c:{lang:"en",region:"US"};return new Es.SearchPlaceConverter(d.baseUrl,t??20,(s=d.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,o??`${u}-${p}`)}};var Sn=class{urlToSearchRequest(t){return sr.get().parse(t)}searchRequestToUrl(t){return sr.get().serialize(t)}};window.FluidTopicsUrlService=new Sn;var Pe=g(T());var pt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};pt.eventName="before-location-change";var ft=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};ft.eventName="change";var vn=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))}},Os=new vn;var uo=class e extends Pe.WithEventBus{static build(){return new e(window.history,Os,()=>window.location,!1)}constructor(t,o,n,a){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.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,Pe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new ft(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[s,c,d])=>{let u=new pt(new URL(typeof d=="string"?d:(d??this.windowLocation()).href,window.location.origin));this.dispatchEvent(u);let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...s,index:p,href:u.detail.nextLocation.href};n.apply(a,[f,c,f.href]),this.setCurrentState(f,!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)}addBeforeLocationChangeListener(t){this.addEventListener(pt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(pt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(ft.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ft.eventName,t)}currentItem(){return(0,Pe.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,Pe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Pe.deepCopy)(o.find(n=>t(n)))}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,Pe.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,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(a=s),s++;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,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=uo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var As=g(z());var ws=As.css`
171
171
  `;var Ts=g(z()),ee=g(te()),mt=g(T());var ht=g(T());function _s(e,t){let{authenticationRequired:o,session:n}=w.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var po=class extends Nt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Cn=class e extends ht.FtStateManager{static build(t){return new e(w,t)}constructor(t,o){super(),this.store=t,this.cache=new ht.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new po,this.cleanSessionDebouncer=new ht.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new ht.Debouncer(500),this.apiProvider=o??(()=>ut.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(dt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(dt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>_s(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,o){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:o}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new ar(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return ms(w.getState().session,...t)}},Rs=Cn.build();var yt=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var cr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:s}of n){let c=a.deref(),d=s.deref();c===void 0||d===void 0||c.dispatchEvent(new yt(t.context,c,d,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let s=a.callbacks.get(o);s===void 0&&a.callbacks.set(o,s=new WeakSet),s.has(n)||(s.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Z=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},B=class extends mt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Rs,this.contextRoot=new cr}render(){return Ts.html`
172
172
  <slot></slot>
173
173
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Pt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};B.elementDefinitions={};B.styles=ws;Z([(0,ee.property)()],B.prototype,"baseUrl",void 0);Z([(0,ee.property)()],B.prototype,"tenantId",void 0);Z([(0,ee.property)()],B.prototype,"apiIntegrationIdentifier",void 0);Z([(0,ee.property)()],B.prototype,"apiIntegrationAppVersion",void 0);Z([(0,ee.property)()],B.prototype,"uiLocale",void 0);Z([(0,mt.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);Z([(0,mt.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"editorMode",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"noCustom",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);Z([(0,ee.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomComponent",void 0);Z([(0,ee.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],B.prototype,"noCustomCode",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"withManualResources",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);Z([(0,ee.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);Z([(0,mt.jsonProperty)([])],B.prototype,"messageContexts",void 0);Z([(0,mt.jsonProperty)(void 0)],B.prototype,"session",void 0);var ks=g(T());var Ls={"ft-app-context":B};(0,ks.customElements)(Ls);var fo=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?lo:Pt}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let s=a;return c=>({context:this.name,key:s,custom:this.custom,args:typeof c=="function"?void 0:c,argsProvider:typeof c=="function"?c:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...s)=>this.service.resolveMessage(this.name,a,...s)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var Mt=g(T());var Ns=g(te());var En=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Dt=new En;var md=function(e,t,o,n){var a=arguments.length,s=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,o,n);else for(var d=e.length-1;d>=0;d--)(c=e[d])&&(s=(a<3?c(s):a>3?c(t,o,s):c(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s},dr=Symbol("i18nAttributes"),Is=Symbol("i18nListAttributes"),Ps=Symbol("i18nProperties"),ho=Symbol("i18nContexts"),lr=Symbol("i18nUnsubs"),go=(0,Mt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?lo:Pt}i18n(s){let{context:c,key:d,message:u}=s,{custom:p,args:f,argsProvider:h}=s;if(c&&d){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let y=f??(h?h(this):[]);return this.getI18nService(p).resolveMessage(c,d,...y)}return u}async awaitI18n(s){let{context:c,custom:d}=s;return c&&await this.getI18nService(d).prepareContext(c),this.i18n(s)}customI18n(s,c){if(Dt.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...c})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((c,d,u)=>s.has(d)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((c,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(c=>c.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var c,d;let u=this,p=(f,h,y)=>y?.context&&y.key&&s(f,h,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...f})}:y;(c=this[dr])===null||c===void 0||c.forEach((f,h)=>u[h]=p(f,h,u[h])),(d=this[Is])===null||d===void 0||d.forEach((f,h)=>{var y;return u[h]=(y=u[h])===null||y===void 0?void 0:y.map(x=>p(f,h,x))})}updateI18nProperties(s){var c;(c=this[Ps])===null||c===void 0||c.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,c,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,c,d)}addI18nContext(s,c,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[ho].set(u,{isCustomContext:d}),this[lr].has(u)||this[lr].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,c)}hasI18nContext(s){return this[ho].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ho].forEach((s,c)=>this.addI18nContext(c,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[lr].forEach(s=>s()),this[lr].clear()}}return t=ho,o=lr,md([(0,Ns.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),yo=class extends go(Mt.FtLitElement){},mo=class extends go(Mt.FtLitElementRedux){};var Ds=g(z());var Ms=Ds.css`