@fluid-topics/ft-reader-saved-bookmarks 2.2.18 → 2.2.19

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.
@@ -39,7 +39,8 @@ export class FtReaderSavedBookmarks extends withI18n(FtReaderComponent) {
39
39
  return ids;
40
40
  }
41
41
  static bookmarksFromMap(state, self) {
42
- var _a, _b;
42
+ var _a;
43
+ var _b;
43
44
  return (_b = (_a = state.bookmarks) === null || _a === void 0 ? void 0 : _a.filter((b) => b.mapId === self.mapId).sort((b1, b2) => b1.title.localeCompare(b2.title))) !== null && _b !== void 0 ? _b : [];
44
45
  }
45
46
  static filterRemainingTocIdsInBookmarks(s, self) {
@@ -326,7 +326,7 @@
326
326
  ${(0,yo.unsafeHTML)(this.resolvedIcon)}
327
327
  <slot ?hidden=${r}></slot>
328
328
  </i>
329
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case Ce.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case Ce.material:this.resolvedIcon=this.value||Pt.nothing;break;default:this.resolvedIcon=(r=dt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};Y.elementDefinitions={};Y.styles=po;Mt([(0,we.property)()],Y.prototype,"variant",void 0);Mt([(0,we.property)()],Y.prototype,"value",void 0);Mt([(0,we.property)({reflect:!0,attribute:"aria-hidden"})],Y.prototype,"ariaHidden",void 0);Mt([(0,we.state)()],Y.prototype,"resolvedIcon",void 0);Mt([(0,we.query)("slot")],Y.prototype,"slottedContent",void 0);var xo=y(w());var go={"ft-icon":Y};(0,xo.customElements)(go);var ei=y(z());var vo=y(z(),1);var Dn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},zc=e=>({fromAttribute:t=>{if(t==null)return It(e);try{return JSON.parse(t)}catch{return It(e)}},toAttribute:t=>JSON.stringify(t)});function Eo(e,t){return(0,vo.property)({type:Object,converter:zc(e),hasChanged:Ut,...t??{}})}function Kc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pt(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(!pt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=o=>Object.keys(o).filter(a=>o[a]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let o=s[n];if(!pt(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return Kc(e,t)}catch{return!1}}function Ut(e,t){return!pt(e,t)}function It(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mr(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Ao=y(z(),1);var Pn=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Ut,attribute:!1,...t};(0,Ao.property)(s)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var yr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Xe=y(z(),1);var gr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){i(a);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 So=y(V(),1);var xr=globalThis,Wc=xr.ShadowRoot&&(xr.ShadyCSS===void 0||xr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bo=(e,t)=>{if(Wc)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=xr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var vr=class extends So.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return bo(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Dn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function _o(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var ht=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Oo,Co=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Ro=Symbol("exportpartsDebouncer"),To=Symbol("dynamicDependenciesLoaded"),ft=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ft.eventName="exportparts-updated";var pe=class extends vr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Oo]=new gr(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ro].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.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[wo]=this.constructor.name,this[Co]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[Co])}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 r=this.constructor;r[To]||(r[To]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ft.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ft.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 ft)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=_o(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}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 r,n,i,s,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let m=(s=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],v=(a=(o=p.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],A=[...m,...v].filter(c).map(x=>x.trim());for(let x of A)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>l.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Oo=Ro;ht([(0,Xe.property)()],pe.prototype,"exportpartsPrefix",void 0);ht([Eo([])],pe.prototype,"exportpartsPrefixes",void 0);ht([(0,Xe.property)({reflect:!0})],pe.prototype,"exportparts",void 0);ht([(0,Xe.property)()],pe.prototype,"customStylesheet",void 0);ht([(0,Xe.property)()],pe.prototype,"elementToFocus",void 0);ht([(0,Xe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function Er(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var $t=Symbol("internalReduxEventsUnsubscribers"),Te=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),Gc=mr(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Je].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Je].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Je].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Je].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[Te].has(o.store):this[Te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[Te].set(o,a.subscribe(()=>this.updateFromStores())),this[$t].set(o,[]),Er(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=p=>this[u](p);a.addEventListener(l.eventName,d),this[$t].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Te].has(o)&&this[Te].get(o)(),this[Te].delete(o),(a=this[$t].get(o))===null||a===void 0||a.forEach(c=>c()),this[$t].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Te,r=Je,n=$t,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),No=class extends Gc(pe){};function H(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 qc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lo=qc,Mn=()=>Math.random().toString(36).substring(7).split("").join("."),Yc={INIT:`@@redux/INIT${Mn()}`,REPLACE:`@@redux/REPLACE${Mn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mn()}`},Ar=Yc;function br(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 In(e,t,r){if(typeof e!="function")throw new Error(H(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(H(1));return r(In)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,c=!1;function l(){o===s&&(o=new Map,s.forEach((x,b)=>{o.set(b,x)}))}function u(){if(c)throw new Error(H(3));return i}function d(x){if(typeof x!="function")throw new Error(H(4));if(c)throw new Error(H(5));let b=!0;l();let T=a++;return o.set(T,x),function(){if(b){if(c)throw new Error(H(6));b=!1,l(),o.delete(T),s=null}}}function p(x){if(!br(x))throw new Error(H(7));if(typeof x.type>"u")throw new Error(H(8));if(typeof x.type!="string")throw new Error(H(17));if(c)throw new Error(H(9));try{c=!0,i=n(i,x)}finally{c=!1}return(s=o).forEach(T=>{T()}),x}function m(x){if(typeof x!="function")throw new Error(H(10));n=x,p({type:Ar.REPLACE})}function v(){let x=d;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(H(11));function T(){let _=b;_.next&&_.next(u())}return T(),{unsubscribe:x(T)}},[Lo](){return this}}}return p({type:Ar.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Lo]:v}}function Xc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ar.INIT})>"u")throw new Error(H(12));if(typeof r(void 0,{type:Ar.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function ko(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,s;try{Xc(r)}catch(o){s=o}return function(a={},c){if(s)throw s;let l=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],m=r[p],v=a[p],A=m(v,c);if(typeof A>"u"){let x=c&&c.type;throw new Error(H(14))}u[p]=A,l=l||A!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Bt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Do(...e){return t=>(r,n)=>{let i=t(r,n),s=()=>{throw new Error(H(15))},o={getState:i.getState,dispatch:(c,...l)=>s(c,...l)},a=e.map(c=>c(o));return s=Bt(...a)(i.dispatch),{...i,dispatch:s}}}function Po(e){return br(e)&&"type"in e&&typeof e.type=="string"}var jo=Symbol.for("immer-nothing"),Mo=Symbol.for("immer-draftable"),F=Symbol.for("immer-state");function ce(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var X=Object,yt=X.getPrototypeOf,wr="constructor",kr="prototype",Hn="configurable",Tr="enumerable",_r="writable",Ht="value",fe=e=>!!e&&!!e[F];function J(e){return e?zo(e)||Pr(e)||!!e[Mo]||!!e[wr]?.[Mo]||Mr(e)||Ir(e):!1}var Jc=X[kr][wr].toString(),Io=new WeakMap;function zo(e){if(!e||!qn(e))return!1;let t=yt(e);if(t===null||t===X[kr])return!0;let r=X.hasOwnProperty.call(t,wr)&&t[wr];if(r===Object)return!0;if(!mt(r))return!1;let n=Io.get(r);return n===void 0&&(n=Function.toString.call(r),Io.set(r,n)),n===Jc}function Dr(e,t,r=!0){jt(e)===0?(r?Reflect.ownKeys(e):X.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function jt(e){let t=e[F];return t?t.type_:Pr(e)?1:Mr(e)?2:Ir(e)?3:0}var Un=(e,t,r=jt(e))=>r===2?e.has(t):X[kr].hasOwnProperty.call(e,t),Fn=(e,t,r=jt(e))=>r===2?e.get(t):e[t],Or=(e,t,r,n=jt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Qc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pr=Array.isArray,Mr=e=>e instanceof Map,Ir=e=>e instanceof Set,qn=e=>typeof e=="object",mt=e=>typeof e=="function",$n=e=>typeof e=="boolean";function Zc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var xe=e=>e.copy_||e.base_;var Yn=e=>e.modified_?e.copy_:e.base_;function Vn(e,t){if(Mr(e))return new Map(e);if(Ir(e))return new Set(e);if(Pr(e))return Array[kr].slice.call(e);let r=zo(e);if(t===!0||t==="class_only"&&!r){let n=X.getOwnPropertyDescriptors(e);delete n[F];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let o=i[s],a=n[o];a[_r]===!1&&(a[_r]=!0,a[Hn]=!0),(a.get||a.set)&&(n[o]={[Hn]:!0,[_r]:!0,[Tr]:a[Tr],[Ht]:e[o]})}return X.create(yt(e),n)}else{let n=yt(e);if(n!==null&&r)return{...e};let i=X.create(n);return X.assign(i,e)}}function Xn(e,t=!1){return Ur(e)||fe(e)||!J(e)||(jt(e)>1&&X.defineProperties(e,{set:Sr,add:Sr,clear:Sr,delete:Sr}),X.freeze(e),t&&Dr(e,(r,n)=>{Xn(n,!0)},!1)),e}function el(){ce(2)}var Sr={[Ht]:el};function Ur(e){return e===null||!qn(e)?!0:X.isFrozen(e)}var Rr="MapSet",jn="Patches",Uo="ArrayMethods",Ko={};function Qe(e){let t=Ko[e];return t||ce(0,e),t}var $o=e=>!!Ko[e];var Ft,Wo=()=>Ft,tl=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$o(Rr)?Qe(Rr):void 0,arrayMethodsPlugin_:$o(Uo)?Qe(Uo):void 0});function Bo(e,t){t&&(e.patchPlugin_=Qe(jn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zn(e){Kn(e),e.drafts_.forEach(rl),e.drafts_=null}function Kn(e){e===Ft&&(Ft=e.parent_)}var Ho=e=>Ft=tl(Ft,e);function rl(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fo(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[F].modified_&&(zn(t),ce(4)),J(e)&&(e=Vo(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Vo(t,r);return nl(t,e,!0),zn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jo?e:void 0}function Vo(e,t){if(Ur(t))return t;let r=t[F];if(!r)return Nr(t,e.handledSet_,e);if(!$r(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Yo(r,e)}return r.copy_}function nl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xn(t,r)}function Go(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var $r=(e,t)=>e.scope_===t,il=[];function qo(e,t,r,n){let i=xe(e),s=e.type_;if(n!==void 0&&Fn(i,n,s)===t){Or(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Dr(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??il;for(let a of o)Or(i,a,r,s)}function sl(e,t,r){e.callbacks_.push(function(i){let s=t;if(!s||!$r(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let o=Yn(s);qo(e,s.draft_??s,o,r),Yo(s,i)})}function Yo(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Go(e)}}function ol(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];$r(i,n)&&i.callbacks_.push(function(){Cr(e);let o=Yn(i);qo(e,r,o,t)})}else J(r)&&e.callbacks_.push(function(){let s=xe(e);e.type_===3?s.has(r)&&Nr(r,n.handledSet_,n):Fn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nr(Fn(e.copy_,t,e.type_),n.handledSet_,n)})}function Nr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!J(e)||Ur(e)||(t.add(e),Dr(e,(n,i)=>{if(fe(i)){let s=i[F];if($r(s,r)){let o=Yn(s);Or(e,n,o,e.type_),Go(s)}}else J(i)&&Nr(i,t,r)})),e}function al(e,t){let r=Pr(e),n={type_:r?1:0,scope_:t?t.scope_:Wo(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=Lr;r&&(i=[n],s=Vt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Lr={get(e,t){if(t===F)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=xe(e);if(!Un(i,t,e.type_))return ll(e,i,t);let s=i[t];if(e.finalized_||!J(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Zc(t))return s;if(s===Bn(e.base_,t)||cl(e,t,s)){Cr(e);let o=e.type_===1?+t:t,a=Gn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in xe(e)},ownKeys(e){return Reflect.ownKeys(xe(e))},set(e,t,r){let n=Xo(xe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Bn(xe(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Qc(r,i)&&(r!==void 0||Un(e.base_,t,e.type_)))return!0;Cr(e),Wn(e)}return e.copy_[t]===r&&(r!==void 0||Un(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ol(e,t,r)),!0},deleteProperty(e,t){return Cr(e),Bn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[_r]:!0,[Hn]:e.type_!==1||t!=="length",[Tr]:n[Tr],[Ht]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return yt(e.base_)},setPrototypeOf(){ce(12)}},Vt={};for(let e in Lr){let t=Lr[e];Vt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Vt.deleteProperty=function(e,t){return Vt.set.call(this,e,t,void 0)};Vt.set=function(e,t,r){return Lr.set.call(this,e[0],t,r,e[0])};function Bn(e,t){let r=e[F];return(r?xe(r):e)[t]}function cl(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!J(r)||r[F]?!1:e.baseRefs_.has(r)}function ll(e,t,r){let n=Xo(t,r);return n?Ht in n?n[Ht]:n.get?.call(e.draft_):void 0}function Xo(e,t){if(!(t in e))return;let r=yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=yt(r)}}function Wn(e){e.modified_||(e.modified_=!0,e.parent_&&Wn(e.parent_))}function Cr(e){e.copy_||(e.assigned_=new Map,e.copy_=Vn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ul=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(mt(t)&&!mt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}mt(r)||ce(6),n!==void 0&&!mt(n)&&ce(7);let i;if(J(t)){let s=Ho(this),o=Gn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?zn(s):Kn(s)}return Bo(s,n),Fo(i,s)}else if(!t||!qn(t)){if(i=r(t),i===void 0&&(i=t),i===jo&&(i=void 0),this.autoFreeze_&&Xn(i,!0),n){let s=[],o=[];Qe(jn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(mt(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},$n(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),$n(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),$n(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){J(e)||ce(8),fe(e)&&(e=Jo(e));let t=Ho(this),r=Gn(t,e,void 0);return r[F].isManual_=!0,Kn(t),r}finishDraft(e,t){let r=e&&e[F];(!r||!r.isManual_)&&ce(9);let{scope_:n}=r;return Bo(n,t),Fo(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 r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Qe(jn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Gn(e,t,r,n){let[i,s]=Mr(t)?Qe(Rr).proxyMap_(t,r):Ir(t)?Qe(Rr).proxySet_(t,r):al(t,r);return(r?.scope_??Wo()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?sl(r,s,n):s.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:l}=c;s.modified_&&l&&l.generatePatches_(s,[],c)}),i}function Jo(e){return fe(e)||ce(10,e),Qo(e)}function Qo(e){if(!J(e)||Ur(e))return e;let t=e[F],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Vn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Vn(e,!0);return Dr(r,(i,s)=>{Or(r,i,Qo(s))},n),t&&(t.finalized_=!1),r}var dl=globalThis.Iterator,Bp=typeof dl?.from=="function";var pl=new ul,Jn=pl.produce;function Zo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var ea=Zo(),ta=Zo;var fl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Bt:Bt.apply(null,arguments)},Wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hl=e=>e&&typeof e.match=="function";function Oe(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(ve(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Po(n)&&n.type===e,r}var oa=class zt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,zt.prototype)}static get[Symbol.species](){return zt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new zt(...t[0].concat(this)):new zt(...t.concat(this))}};function ra(e){return J(e)?Jn(e,()=>{}):e}function Br(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function ml(e){return typeof e=="boolean"}var yl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new oa;return r&&(ml(r)?o.push(ea):o.push(ta(r.extraArgument))),o},gl="RTK_autoBatch";var na=e=>t=>{setTimeout(t,e)},xl=(e,t)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=e(i),o=setTimeout(i,t)},vl=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,s=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?xl(window.requestAnimationFrame,100):na(10):e.type==="callback"?e.queueNotification:na(e.timeout),l=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[gl],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},El=e=>function(r){let{autoBatch:n=!0}=r??{},i=new oa(e);return n&&i.push(vl(typeof n=="object"?n:void 0)),i};function aa(e){let t=yl(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(br(r))c=ko(r);else throw new Error(ve(1));let l;typeof n=="function"?l=n(t):l=t();let u=Bt;i&&(u=fl({trace:!1,...typeof i=="object"&&i}));let d=Do(...l),p=El(d),m=typeof a=="function"?a(p):p(),v=u(...m);return In(c,o,v)}function ca(e){let t={},r=[],n,i={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(ve(28));if(a in t)throw new Error(ve(29));return t[a]=o,i},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,r,n]}function Al(e){return typeof e=="function"}function bl(e,t){let[r,n,i]=ca(t),s;if(Al(e))s=()=>ra(e());else{let a=ra(e);s=()=>a}function o(a=s(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,d)=>{if(d)if(fe(u)){let m=d(u,c);return m===void 0?u:m}else{if(J(u))return Jn(u,p=>d(p,c));{let p=d(u,c);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return o.getInitialState=s,o}var Sl=(e,t)=>hl(e)?e.match(t):e(t);function _l(...e){return t=>e.some(r=>Sl(r,t))}var Cl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wl=(e=21)=>{let t="",r=e;for(;r--;)t+=Cl[Math.random()*64|0];return t},Tl=["name","message","stack","code"],Qn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ia=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ol=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Tl)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},sa="External signal was aborted",Rl=(()=>{function e(t,r,n){let i=Oe(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Oe(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Oe(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||Ol)(c||"Rejected"),meta:{...p||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,p)=>{let m=n?.idGenerator?n.idGenerator(c):wl(),v=new AbortController,A,x;function b(E){x=E,v.abort()}l&&(l.aborted?b(sa):l.addEventListener("abort",()=>b(sa),{once:!0}));let T=(async function(){let E;try{let C=n?.condition?.(c,{getState:d,extra:p});if(Ll(C)&&(C=await C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let L=new Promise((O,k)=>{A=()=>{k({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(s(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:d,extra:p}))),E=await Promise.race([L,Promise.resolve(r(c,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:b,rejectWithValue:((O,k)=>new Qn(O,k)),fulfillWithValue:((O,k)=>new ia(O,k))})).then(O=>{if(O instanceof Qn)throw O;return O instanceof ia?i(O.payload,m,c,O.meta):i(O,m,c)})])}catch(C){E=C instanceof Qn?o(null,m,c,C.payload,C.meta):o(C,m,c)}finally{A&&v.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(T,{abort:b,requestId:m,arg:c,unwrap(){return T.then(Nl)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:_l(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Nl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ll(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var la=Symbol.for("rtk-slice-createasyncthunk"),qp={[la]:Rl};function kl(e,t){return`${e}/${t}`}function Dl({creators:e}={}){let t=e?.asyncThunk?.[la];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(ve(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Ml()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,_){let C=typeof E=="string"?E:E.type;if(!C)throw new Error(ve(12));if(C in c.sliceCaseReducersByType)throw new Error(ve(13));return c.sliceCaseReducersByType[C]=_,l},addMatcher(E,_){return c.sliceMatchers.push({matcher:E,reducer:_}),l},exposeAction(E,_){return c.actionCreators[E]=_,l},exposeCaseReducer(E,_){return c.sliceCaseReducersByName[E]=_,l}};a.forEach(E=>{let _=o[E],C={reducerName:E,type:kl(i,E),createNotation:typeof n.reducers=="function"};Ul(_)?Bl(C,_,l,t):Il(C,_,l)});function u(){let[E={},_=[],C=void 0]=typeof n.extraReducers=="function"?ca(n.extraReducers):[n.extraReducers],L={...E,...c.sliceCaseReducersByType};return bl(n.initialState,O=>{for(let k in L)O.addCase(k,L[k]);for(let k of c.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of _)O.addMatcher(k.matcher,k.reducer);C&&O.addDefaultCase(C)})}let d=E=>E,p=new Map,m=new WeakMap,v;function A(E,_){return v||(v=u()),v(E,_)}function x(){return v||(v=u()),v.getInitialState()}function b(E,_=!1){function C(O){let k=O[E];return typeof k>"u"&&_&&(k=Br(m,C,x)),k}function L(O=d){let k=Br(p,_,()=>new WeakMap);return Br(k,O,()=>{let Tt={};for(let[Q,De]of Object.entries(n.selectors??{}))Tt[Q]=Pl(De,O,()=>Br(m,O,x),_);return Tt})}return{reducerPath:E,getSelectors:L,get selectors(){return L(C)},selectSlice:C}}let T={name:i,reducer:A,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...b(s),injectInto(E,{reducerPath:_,...C}={}){let L=_??s;return E.inject({reducerPath:L,reducer:A},C),{...T,...b(L,!0)}}};return T}}function Pl(e,t,r,n){function i(s,...o){let a=t(s);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return i.unwrapped=e,i}var ua=Dl();function Ml(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Il({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!$l(n))throw new Error(ve(17));s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?Oe(e,o):Oe(e))}function Ul(e){return e._reducerDefinitionType==="asyncThunk"}function $l(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Bl({type:e,reducerName:t},r,n,i){if(!i)throw new Error(ve(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=i(e,s,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Hr,pending:a||Hr,rejected:c||Hr,settled:l||Hr})}function Hr(){}var da="listener",pa="completed",fa="cancelled",Yp=`task-${fa}`,Xp=`task-${pa}`,Jp=`${da}-${fa}`,Qp=`${da}-${pa}`;var{assign:ha}=Object;var Zn="listenerMiddleware";var Hl=ha(Oe(`${Zn}/add`),{withTypes:()=>Hl}),Zp=Oe(`${Zn}/removeAll`),Fl=ha(Oe(`${Zn}/remove`),{withTypes:()=>Fl});function ve(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 Vl=mr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Fr=class extends Vl(Object){};window.ftReduxStores||(window.ftReduxStores={});var ma=class e extends Fr{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Er(s))return s;if(i==null)return;let o=ua({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=aa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=It(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[i.name]=new e(o,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new yr,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let c=o,l=s[c];return l?(...u)=>{let d=l(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{let d=c,p=this.getState()[d];pt(p,u)||this.setState({[d]:i(u)})}}}),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 Vr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?c:i?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ya=y(w()),jr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Rf=(0,ya.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(S)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?a=>Vr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jr([(0,ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jr([(0,ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jr([Pn({store:S.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),jr([Pn({store:S.name})],t.prototype,"uiLocale",void 0),t});var ti=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ti;var te=y(w());var ga,gt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},jl=Symbol("clearAfterUnitTest"),zr=class extends(0,te.withEventBus)(q){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ga]=()=>{this.defaultMessages={},this.cache=new te.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,te.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),o=this.resolveContext(s);return new te.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof te.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new gt({loadedContexts:t})),this.dispatchEvent(new gt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new gt({loadedContexts:[t]})),this.dispatchEvent(new gt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,te.delay)(0).then(()=>n()).catch(()=>null)))}};ga=jl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var xt=window.FluidTopicsI18nService,Kr=window.FluidTopicsCustomI18nService;var xa=y(w()),ri=class{highlightHtml(t,r,n){(0,xa.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ri;var va=y(w());var ni=class{isDate(t){var r,n,i,s;return(s=(i=((n=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,o;if(t==null)return"";try{return va.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new ni;var Ea=y(w());var Kt=class{static get(t,r){var n,i,s,o;let a=S.getState(),{lang:c,region:l}=(s=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new Ea.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var ii=class{urlToSearchRequest(t){return Kt.get().parse(t)}searchRequestToUrl(t){return Kt.get().serialize(t)}};window.FluidTopicsUrlService=new ii;var Ee=y(w());var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Ze.eventName="before-location-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};et.eventName="change";var si=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Aa=new si;var Wr=class e extends Ee.WithEventBus{static build(){return new e(window.history,Aa,()=>window.location,!1)}constructor(t,r,n,i){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&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,Ee.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new et(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,o,a])=>{let c=new Ze(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:c.detail.nextLocation.href};n.apply(i,[u,o,u.href]),this.setCurrentState(u,!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 r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Ze.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Ze.eventName,t)}addHistoryChangeListener(t){this.addEventListener(et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(et.eventName,t)}currentItem(){return(0,Ee.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,Ee.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ee.deepCopy)(r.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,Ee.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 r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wr.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 ba=y(V());var Sa=ba.css`
329
+ `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case Ce.file_format:this.resolvedIcon=(t=h[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case Ce.material:this.resolvedIcon=this.value||Pt.nothing;break;default:this.resolvedIcon=(r=dt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};Y.elementDefinitions={};Y.styles=po;Mt([(0,we.property)()],Y.prototype,"variant",void 0);Mt([(0,we.property)()],Y.prototype,"value",void 0);Mt([(0,we.property)({reflect:!0,attribute:"aria-hidden"})],Y.prototype,"ariaHidden",void 0);Mt([(0,we.state)()],Y.prototype,"resolvedIcon",void 0);Mt([(0,we.query)("slot")],Y.prototype,"slottedContent",void 0);var xo=y(w());var go={"ft-icon":Y};(0,xo.customElements)(go);var ei=y(z());var vo=y(z(),1);var Dn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},zc=e=>({fromAttribute:t=>{if(t==null)return It(e);try{return JSON.parse(t)}catch{return It(e)}},toAttribute:t=>JSON.stringify(t)});function Eo(e,t){return(0,vo.property)({type:Object,converter:zc(e),hasChanged:Ut,...t??{}})}function Kc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pt(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(!pt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=o=>Object.keys(o).filter(a=>o[a]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let o=s[n];if(!pt(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return Kc(e,t)}catch{return!1}}function Ut(e,t){return!pt(e,t)}function It(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mr(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Ao=y(z(),1);var Pn=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Ut,attribute:!1,...t};(0,Ao.property)(s)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var yr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Xe=y(z(),1);var gr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){i(a);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 So=y(V(),1);var xr=globalThis,Wc=xr.ShadowRoot&&(xr.ShadyCSS===void 0||xr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bo=(e,t)=>{if(Wc)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=xr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var vr=class extends So.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return bo(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Dn(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function _o(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var ht=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Oo,Co=Symbol("constructorPrototype"),wo=Symbol("constructorName"),Ro=Symbol("exportpartsDebouncer"),To=Symbol("dynamicDependenciesLoaded"),ft=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ft.eventName="exportparts-updated";var pe=class extends vr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Oo]=new gr(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Ro].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.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[wo]=this.constructor.name,this[Co]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[wo]&&Object.setPrototypeOf(this,this[Co])}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 r=this.constructor;r[To]||(r[To]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ft.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ft.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 ft)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=_o(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}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 r,n,i,s,o,a;let c=p=>p!=null&&p.trim().length>0,l=t.filter(c).map(p=>p.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let m=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(i=p.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],A=[...m,...v].filter(c).map(x=>x.trim());for(let x of A)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>l.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Oo=Ro;ht([(0,Xe.property)()],pe.prototype,"exportpartsPrefix",void 0);ht([Eo([])],pe.prototype,"exportpartsPrefixes",void 0);ht([(0,Xe.property)({reflect:!0})],pe.prototype,"exportparts",void 0);ht([(0,Xe.property)()],pe.prototype,"customStylesheet",void 0);ht([(0,Xe.property)()],pe.prototype,"elementToFocus",void 0);ht([(0,Xe.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function Er(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var $t=Symbol("internalReduxEventsUnsubscribers"),Te=Symbol("internalStoresUnsubscribers"),Je=Symbol("internalStores"),Gc=mr(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Je].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Je].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Je].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Je].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Je].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Je].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[Te].has(o.store):this[Te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[Te].set(o,a.subscribe(()=>this.updateFromStores())),this[$t].set(o,[]),Er(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=p=>this[u](p);a.addEventListener(l.eventName,d),this[$t].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Te].has(o)&&this[Te].get(o)(),this[Te].delete(o),(a=this[$t].get(o))===null||a===void 0||a.forEach(c=>c()),this[$t].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Te,r=Je,n=$t,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),No=class extends Gc(pe){};function H(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 qc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Lo=qc,Mn=()=>Math.random().toString(36).substring(7).split("").join("."),Yc={INIT:`@@redux/INIT${Mn()}`,REPLACE:`@@redux/REPLACE${Mn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Mn()}`},Ar=Yc;function br(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 In(e,t,r){if(typeof e!="function")throw new Error(H(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(H(1));return r(In)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,c=!1;function l(){o===s&&(o=new Map,s.forEach((x,b)=>{o.set(b,x)}))}function u(){if(c)throw new Error(H(3));return i}function d(x){if(typeof x!="function")throw new Error(H(4));if(c)throw new Error(H(5));let b=!0;l();let T=a++;return o.set(T,x),function(){if(b){if(c)throw new Error(H(6));b=!1,l(),o.delete(T),s=null}}}function p(x){if(!br(x))throw new Error(H(7));if(typeof x.type>"u")throw new Error(H(8));if(typeof x.type!="string")throw new Error(H(17));if(c)throw new Error(H(9));try{c=!0,i=n(i,x)}finally{c=!1}return(s=o).forEach(T=>{T()}),x}function m(x){if(typeof x!="function")throw new Error(H(10));n=x,p({type:Ar.REPLACE})}function v(){let x=d;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(H(11));function T(){let _=b;_.next&&_.next(u())}return T(),{unsubscribe:x(T)}},[Lo](){return this}}}return p({type:Ar.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Lo]:v}}function Xc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ar.INIT})>"u")throw new Error(H(12));if(typeof r(void 0,{type:Ar.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function ko(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,s;try{Xc(r)}catch(o){s=o}return function(a={},c){if(s)throw s;let l=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],m=r[p],v=a[p],A=m(v,c);if(typeof A>"u"){let x=c&&c.type;throw new Error(H(14))}u[p]=A,l=l||A!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Bt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Do(...e){return t=>(r,n)=>{let i=t(r,n),s=()=>{throw new Error(H(15))},o={getState:i.getState,dispatch:(c,...l)=>s(c,...l)},a=e.map(c=>c(o));return s=Bt(...a)(i.dispatch),{...i,dispatch:s}}}function Po(e){return br(e)&&"type"in e&&typeof e.type=="string"}var jo=Symbol.for("immer-nothing"),Mo=Symbol.for("immer-draftable"),F=Symbol.for("immer-state");function ce(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var X=Object,yt=X.getPrototypeOf,wr="constructor",kr="prototype",Hn="configurable",Tr="enumerable",_r="writable",Ht="value",fe=e=>!!e&&!!e[F];function J(e){return e?zo(e)||Pr(e)||!!e[Mo]||!!e[wr]?.[Mo]||Mr(e)||Ir(e):!1}var Jc=X[kr][wr].toString(),Io=new WeakMap;function zo(e){if(!e||!qn(e))return!1;let t=yt(e);if(t===null||t===X[kr])return!0;let r=X.hasOwnProperty.call(t,wr)&&t[wr];if(r===Object)return!0;if(!mt(r))return!1;let n=Io.get(r);return n===void 0&&(n=Function.toString.call(r),Io.set(r,n)),n===Jc}function Dr(e,t,r=!0){jt(e)===0?(r?Reflect.ownKeys(e):X.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function jt(e){let t=e[F];return t?t.type_:Pr(e)?1:Mr(e)?2:Ir(e)?3:0}var Un=(e,t,r=jt(e))=>r===2?e.has(t):X[kr].hasOwnProperty.call(e,t),Fn=(e,t,r=jt(e))=>r===2?e.get(t):e[t],Or=(e,t,r,n=jt(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Qc(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pr=Array.isArray,Mr=e=>e instanceof Map,Ir=e=>e instanceof Set,qn=e=>typeof e=="object",mt=e=>typeof e=="function",$n=e=>typeof e=="boolean";function Zc(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var xe=e=>e.copy_||e.base_;var Yn=e=>e.modified_?e.copy_:e.base_;function Vn(e,t){if(Mr(e))return new Map(e);if(Ir(e))return new Set(e);if(Pr(e))return Array[kr].slice.call(e);let r=zo(e);if(t===!0||t==="class_only"&&!r){let n=X.getOwnPropertyDescriptors(e);delete n[F];let i=Reflect.ownKeys(n);for(let s=0;s<i.length;s++){let o=i[s],a=n[o];a[_r]===!1&&(a[_r]=!0,a[Hn]=!0),(a.get||a.set)&&(n[o]={[Hn]:!0,[_r]:!0,[Tr]:a[Tr],[Ht]:e[o]})}return X.create(yt(e),n)}else{let n=yt(e);if(n!==null&&r)return{...e};let i=X.create(n);return X.assign(i,e)}}function Xn(e,t=!1){return Ur(e)||fe(e)||!J(e)||(jt(e)>1&&X.defineProperties(e,{set:Sr,add:Sr,clear:Sr,delete:Sr}),X.freeze(e),t&&Dr(e,(r,n)=>{Xn(n,!0)},!1)),e}function el(){ce(2)}var Sr={[Ht]:el};function Ur(e){return e===null||!qn(e)?!0:X.isFrozen(e)}var Rr="MapSet",jn="Patches",Uo="ArrayMethods",Ko={};function Qe(e){let t=Ko[e];return t||ce(0,e),t}var $o=e=>!!Ko[e];var Ft,Wo=()=>Ft,tl=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$o(Rr)?Qe(Rr):void 0,arrayMethodsPlugin_:$o(Uo)?Qe(Uo):void 0});function Bo(e,t){t&&(e.patchPlugin_=Qe(jn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zn(e){Kn(e),e.drafts_.forEach(rl),e.drafts_=null}function Kn(e){e===Ft&&(Ft=e.parent_)}var Ho=e=>Ft=tl(Ft,e);function rl(e){let t=e[F];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fo(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[F].modified_&&(zn(t),ce(4)),J(e)&&(e=Vo(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[F].base_,e,t)}else e=Vo(t,r);return nl(t,e,!0),zn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==jo?e:void 0}function Vo(e,t){if(Ur(t))return t;let r=t[F];if(!r)return Nr(t,e.handledSet_,e);if(!$r(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Yo(r,e)}return r.copy_}function nl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xn(t,r)}function Go(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var $r=(e,t)=>e.scope_===t,il=[];function qo(e,t,r,n){let i=xe(e),s=e.type_;if(n!==void 0&&Fn(i,n,s)===t){Or(i,n,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Dr(i,(c,l)=>{if(fe(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??il;for(let a of o)Or(i,a,r,s)}function sl(e,t,r){e.callbacks_.push(function(i){let s=t;if(!s||!$r(s,i))return;i.mapSetPlugin_?.fixSetContents(s);let o=Yn(s);qo(e,s.draft_??s,o,r),Yo(s,i)})}function Yo(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Go(e)}}function ol(e,t,r){let{scope_:n}=e;if(fe(r)){let i=r[F];$r(i,n)&&i.callbacks_.push(function(){Cr(e);let o=Yn(i);qo(e,r,o,t)})}else J(r)&&e.callbacks_.push(function(){let s=xe(e);e.type_===3?s.has(r)&&Nr(r,n.handledSet_,n):Fn(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nr(Fn(e.copy_,t,e.type_),n.handledSet_,n)})}function Nr(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||fe(e)||t.has(e)||!J(e)||Ur(e)||(t.add(e),Dr(e,(n,i)=>{if(fe(i)){let s=i[F];if($r(s,r)){let o=Yn(s);Or(e,n,o,e.type_),Go(s)}}else J(i)&&Nr(i,t,r)})),e}function al(e,t){let r=Pr(e),n={type_:r?1:0,scope_:t?t.scope_:Wo(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,s=Lr;r&&(i=[n],s=Vt);let{revoke:o,proxy:a}=Proxy.revocable(i,s);return n.draft_=a,n.revoke_=o,[a,n]}var Lr={get(e,t){if(t===F)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=xe(e);if(!Un(i,t,e.type_))return ll(e,i,t);let s=i[t];if(e.finalized_||!J(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Zc(t))return s;if(s===Bn(e.base_,t)||cl(e,t,s)){Cr(e);let o=e.type_===1?+t:t,a=Gn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in xe(e)},ownKeys(e){return Reflect.ownKeys(xe(e))},set(e,t,r){let n=Xo(xe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Bn(xe(e),t),s=i?.[F];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Qc(r,i)&&(r!==void 0||Un(e.base_,t,e.type_)))return!0;Cr(e),Wn(e)}return e.copy_[t]===r&&(r!==void 0||Un(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ol(e,t,r)),!0},deleteProperty(e,t){return Cr(e),Bn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[_r]:!0,[Hn]:e.type_!==1||t!=="length",[Tr]:n[Tr],[Ht]:r[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return yt(e.base_)},setPrototypeOf(){ce(12)}},Vt={};for(let e in Lr){let t=Lr[e];Vt[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Vt.deleteProperty=function(e,t){return Vt.set.call(this,e,t,void 0)};Vt.set=function(e,t,r){return Lr.set.call(this,e[0],t,r,e[0])};function Bn(e,t){let r=e[F];return(r?xe(r):e)[t]}function cl(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!J(r)||r[F]?!1:e.baseRefs_.has(r)}function ll(e,t,r){let n=Xo(t,r);return n?Ht in n?n[Ht]:n.get?.call(e.draft_):void 0}function Xo(e,t){if(!(t in e))return;let r=yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=yt(r)}}function Wn(e){e.modified_||(e.modified_=!0,e.parent_&&Wn(e.parent_))}function Cr(e){e.copy_||(e.assigned_=new Map,e.copy_=Vn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ul=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(mt(t)&&!mt(r)){let s=r;r=t;let o=this;return function(c=s,...l){return o.produce(c,u=>r.call(this,u,...l))}}mt(r)||ce(6),n!==void 0&&!mt(n)&&ce(7);let i;if(J(t)){let s=Ho(this),o=Gn(s,t,void 0),a=!0;try{i=r(o),a=!1}finally{a?zn(s):Kn(s)}return Bo(s,n),Fo(i,s)}else if(!t||!qn(t)){if(i=r(t),i===void 0&&(i=t),i===jo&&(i=void 0),this.autoFreeze_&&Xn(i,!0),n){let s=[],o=[];Qe(jn).generateReplacementPatches_(t,i,{patches_:s,inversePatches_:o}),n(s,o)}return i}else ce(1,t)},this.produceWithPatches=(t,r)=>{if(mt(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,i;return[this.produce(t,r,(o,a)=>{n=o,i=a}),n,i]},$n(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),$n(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),$n(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){J(e)||ce(8),fe(e)&&(e=Jo(e));let t=Ho(this),r=Gn(t,e,void 0);return r[F].isManual_=!0,Kn(t),r}finishDraft(e,t){let r=e&&e[F];(!r||!r.isManual_)&&ce(9);let{scope_:n}=r;return Bo(n,t),Fo(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 r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=Qe(jn).applyPatches_;return fe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Gn(e,t,r,n){let[i,s]=Mr(t)?Qe(Rr).proxyMap_(t,r):Ir(t)?Qe(Rr).proxySet_(t,r):al(t,r);return(r?.scope_??Wo()).drafts_.push(i),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?sl(r,s,n):s.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:l}=c;s.modified_&&l&&l.generatePatches_(s,[],c)}),i}function Jo(e){return fe(e)||ce(10,e),Qo(e)}function Qo(e){if(!J(e)||Ur(e))return e;let t=e[F],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Vn(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Vn(e,!0);return Dr(r,(i,s)=>{Or(r,i,Qo(s))},n),t&&(t.finalized_=!1),r}var dl=globalThis.Iterator,Bp=typeof dl?.from=="function";var pl=new ul,Jn=pl.produce;function Zo(e){return({dispatch:r,getState:n})=>i=>s=>typeof s=="function"?s(r,n,e):i(s)}var ea=Zo(),ta=Zo;var fl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Bt:Bt.apply(null,arguments)},Wp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},hl=e=>e&&typeof e.match=="function";function Oe(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(ve(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Po(n)&&n.type===e,r}var oa=class zt extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,zt.prototype)}static get[Symbol.species](){return zt}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new zt(...t[0].concat(this)):new zt(...t.concat(this))}};function ra(e){return J(e)?Jn(e,()=>{}):e}function Br(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function ml(e){return typeof e=="boolean"}var yl=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{},o=new oa;return r&&(ml(r)?o.push(ea):o.push(ta(r.extraArgument))),o},gl="RTK_autoBatch";var na=e=>t=>{setTimeout(t,e)},xl=(e,t)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=e(i),o=setTimeout(i,t)},vl=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,s=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?xl(window.requestAnimationFrame,100):na(10):e.type==="callback"?e.queueNotification:na(e.timeout),l=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[gl],s=!i,s&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},El=e=>function(r){let{autoBatch:n=!0}=r??{},i=new oa(e);return n&&i.push(vl(typeof n=="object"?n:void 0)),i};function aa(e){let t=yl(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(br(r))c=ko(r);else throw new Error(ve(1));let l;typeof n=="function"?l=n(t):l=t();let u=Bt;i&&(u=fl({trace:!1,...typeof i=="object"&&i}));let d=Do(...l),p=El(d),m=typeof a=="function"?a(p):p(),v=u(...m);return In(c,o,v)}function ca(e){let t={},r=[],n,i={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(ve(28));if(a in t)throw new Error(ve(29));return t[a]=o,i},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),i},addMatcher(s,o){return r.push({matcher:s,reducer:o}),i},addDefaultCase(s){return n=s,i}};return e(i),[t,r,n]}function Al(e){return typeof e=="function"}function bl(e,t){let[r,n,i]=ca(t),s;if(Al(e))s=()=>ra(e());else{let a=ra(e);s=()=>a}function o(a=s(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,d)=>{if(d)if(fe(u)){let m=d(u,c);return m===void 0?u:m}else{if(J(u))return Jn(u,p=>d(p,c));{let p=d(u,c);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return o.getInitialState=s,o}var Sl=(e,t)=>hl(e)?e.match(t):e(t);function _l(...e){return t=>e.some(r=>Sl(r,t))}var Cl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wl=(e=21)=>{let t="",r=e;for(;r--;)t+=Cl[Math.random()*64|0];return t},Tl=["name","message","stack","code"],Qn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ia=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ol=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Tl)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},sa="External signal was aborted",Rl=(()=>{function e(t,r,n){let i=Oe(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=Oe(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=Oe(t+"/rejected",(c,l,u,d,p)=>({payload:d,error:(n&&n.serializeError||Ol)(c||"Rejected"),meta:{...p||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,p)=>{let m=n?.idGenerator?n.idGenerator(c):wl(),v=new AbortController,A,x;function b(E){x=E,v.abort()}l&&(l.aborted?b(sa):l.addEventListener("abort",()=>b(sa),{once:!0}));let T=(async function(){let E;try{let C=n?.condition?.(c,{getState:d,extra:p});if(Ll(C)&&(C=await C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let L=new Promise((O,k)=>{A=()=>{k({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(s(m,c,n?.getPendingMeta?.({requestId:m,arg:c},{getState:d,extra:p}))),E=await Promise.race([L,Promise.resolve(r(c,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:b,rejectWithValue:((O,k)=>new Qn(O,k)),fulfillWithValue:((O,k)=>new ia(O,k))})).then(O=>{if(O instanceof Qn)throw O;return O instanceof ia?i(O.payload,m,c,O.meta):i(O,m,c)})])}catch(C){E=C instanceof Qn?o(null,m,c,C.payload,C.meta):o(C,m,c)}finally{A&&v.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(T,{abort:b,requestId:m,arg:c,unwrap(){return T.then(Nl)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:i,settled:_l(o,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Nl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ll(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var la=Symbol.for("rtk-slice-createasyncthunk"),qp={[la]:Rl};function kl(e,t){return`${e}/${t}`}function Dl({creators:e}={}){let t=e?.asyncThunk?.[la];return function(n){let{name:i,reducerPath:s=i}=n;if(!i)throw new Error(ve(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Ml()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,_){let C=typeof E=="string"?E:E.type;if(!C)throw new Error(ve(12));if(C in c.sliceCaseReducersByType)throw new Error(ve(13));return c.sliceCaseReducersByType[C]=_,l},addMatcher(E,_){return c.sliceMatchers.push({matcher:E,reducer:_}),l},exposeAction(E,_){return c.actionCreators[E]=_,l},exposeCaseReducer(E,_){return c.sliceCaseReducersByName[E]=_,l}};a.forEach(E=>{let _=o[E],C={reducerName:E,type:kl(i,E),createNotation:typeof n.reducers=="function"};Ul(_)?Bl(C,_,l,t):Il(C,_,l)});function u(){let[E={},_=[],C=void 0]=typeof n.extraReducers=="function"?ca(n.extraReducers):[n.extraReducers],L={...E,...c.sliceCaseReducersByType};return bl(n.initialState,O=>{for(let k in L)O.addCase(k,L[k]);for(let k of c.sliceMatchers)O.addMatcher(k.matcher,k.reducer);for(let k of _)O.addMatcher(k.matcher,k.reducer);C&&O.addDefaultCase(C)})}let d=E=>E,p=new Map,m=new WeakMap,v;function A(E,_){return v||(v=u()),v(E,_)}function x(){return v||(v=u()),v.getInitialState()}function b(E,_=!1){function C(O){let k=O[E];return typeof k>"u"&&_&&(k=Br(m,C,x)),k}function L(O=d){let k=Br(p,_,()=>new WeakMap);return Br(k,O,()=>{let Tt={};for(let[Q,De]of Object.entries(n.selectors??{}))Tt[Q]=Pl(De,O,()=>Br(m,O,x),_);return Tt})}return{reducerPath:E,getSelectors:L,get selectors(){return L(C)},selectSlice:C}}let T={name:i,reducer:A,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...b(s),injectInto(E,{reducerPath:_,...C}={}){let L=_??s;return E.inject({reducerPath:L,reducer:A},C),{...T,...b(L,!0)}}};return T}}function Pl(e,t,r,n){function i(s,...o){let a=t(s);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return i.unwrapped=e,i}var ua=Dl();function Ml(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Il({type:e,reducerName:t,createNotation:r},n,i){let s,o;if("reducer"in n){if(r&&!$l(n))throw new Error(ve(17));s=n.reducer,o=n.prepare}else s=n;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?Oe(e,o):Oe(e))}function Ul(e){return e._reducerDefinitionType==="asyncThunk"}function $l(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Bl({type:e,reducerName:t},r,n,i){if(!i)throw new Error(ve(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=i(e,s,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Hr,pending:a||Hr,rejected:c||Hr,settled:l||Hr})}function Hr(){}var da="listener",pa="completed",fa="cancelled",Yp=`task-${fa}`,Xp=`task-${pa}`,Jp=`${da}-${fa}`,Qp=`${da}-${pa}`;var{assign:ha}=Object;var Zn="listenerMiddleware";var Hl=ha(Oe(`${Zn}/add`),{withTypes:()=>Hl}),Zp=Oe(`${Zn}/removeAll`),Fl=ha(Oe(`${Zn}/remove`),{withTypes:()=>Fl});function ve(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 Vl=mr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Fr=class extends Vl(Object){};window.ftReduxStores||(window.ftReduxStores={});var ma=class e extends Fr{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Er(s))return s;if(i==null)return;let o=ua({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=aa({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=It(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[i.name]=new e(o,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new yr,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let c=o,l=s[c];return l?(...u)=>{let d=l(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{let d=c,p=this.getState()[d];pt(p,u)||this.setState({[d]:i(u)})}}}),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 Vr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?c:i?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ya=y(w()),jr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Rf=(0,ya.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(S)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?a=>Vr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jr([(0,ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jr([(0,ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jr([Pn({store:S.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),jr([Pn({store:S.name})],t.prototype,"uiLocale",void 0),t});var ti=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ti;var te=y(w());var ga,gt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},jl=Symbol("clearAfterUnitTest"),zr=class extends(0,te.withEventBus)(q){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ga]=()=>{this.defaultMessages={},this.cache=new te.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,te.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let s=t.toLowerCase(),o=this.resolveContext(s);return new te.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof te.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new gt({loadedContexts:t})),this.dispatchEvent(new gt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new gt({loadedContexts:[t]})),this.dispatchEvent(new gt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,te.delay)(0).then(()=>n()).catch(()=>null)))}};ga=jl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var xt=window.FluidTopicsI18nService,Kr=window.FluidTopicsCustomI18nService;var xa=y(w()),ri=class{highlightHtml(t,r,n){(0,xa.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ri;var va=y(w());var ni=class{isDate(t){var r,n,i,s;return(s=(n=((i=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,o;if(t==null)return"";try{return va.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new ni;var Ea=y(w());var Kt=class{static get(t,r){var n,i,s,o;let a=S.getState(),{lang:c,region:l}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Ea.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${c}-${l}`)}};var ii=class{urlToSearchRequest(t){return Kt.get().parse(t)}searchRequestToUrl(t){return Kt.get().serialize(t)}};window.FluidTopicsUrlService=new ii;var Ee=y(w());var Ze=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Ze.eventName="before-location-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};et.eventName="change";var si=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Aa=new si;var Wr=class e extends Ee.WithEventBus{static build(){return new e(window.history,Aa,()=>window.location,!1)}constructor(t,r,n,i){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&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,Ee.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new et(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,o,a])=>{let c=new Ze(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:c.detail.nextLocation.href};n.apply(i,[u,o,u.href]),this.setCurrentState(u,!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 r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Ze.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Ze.eventName,t)}addHistoryChangeListener(t){this.addEventListener(et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(et.eventName,t)}currentItem(){return(0,Ee.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,Ee.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ee.deepCopy)(r.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,Ee.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 r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wr.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 ba=y(V());var Sa=ba.css`
330
330
  `;var wa=y(V()),j=y(z()),nt=y(w());var tt=y(w());function _a(e,t){let{authenticationRequired:r,session:n}=S.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Gr=class extends ut{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var oi=class e extends tt.FtStateManager{static build(t){return new e(S,t)}constructor(t,r){super(),this.store=t,this.cache=new tt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gr,this.cleanSessionDebouncer=new tt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new tt.Debouncer(500),this.apiProvider=r??(()=>qe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ge.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ge.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 r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});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 r=await this.cache.get("availableContentLocales",()=>_a(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.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,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new kt(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 Ys(S.getState().session,...t)}},Ca=oi.build();var rt=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Wt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:s}of n){let o=i.deref(),a=s.deref();o===void 0||a===void 0||o.dispatchEvent(new rt(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(r);s===void 0&&i.callbacks.set(r,s=new WeakSet),s.has(n)||(s.add(n),i.requests.push({elementRef:new WeakRef(r),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 $=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},R=class extends nt.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=Ca,this.contextRoot=new Wt}render(){return wa.html`
331
331
  <slot></slot>
332
332
  `}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 r;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=>xt.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")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};R.elementDefinitions={};R.styles=Sa;$([(0,j.property)()],R.prototype,"baseUrl",void 0);$([(0,j.property)()],R.prototype,"tenantId",void 0);$([(0,j.property)()],R.prototype,"apiIntegrationIdentifier",void 0);$([(0,j.property)()],R.prototype,"apiIntegrationAppVersion",void 0);$([(0,j.property)()],R.prototype,"uiLocale",void 0);$([(0,nt.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);$([(0,nt.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"editorMode",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"noCustom",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);$([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);$([(0,j.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomCode",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"withManualResources",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);$([(0,j.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);$([(0,nt.jsonProperty)([])],R.prototype,"messageContexts",void 0);$([(0,nt.jsonProperty)(void 0)],R.prototype,"session",void 0);var Oa=y(w());var Ta={"ft-app-context":R};(0,Oa.customElements)(Ta);var qr=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?Kr:xt}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return o=>({context:this.name,key:s,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var Et=y(w());var Ra=y(z());var ai=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[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},vt=new ai;var Wl=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},qt=Symbol("i18nAttributes"),Na=Symbol("i18nListAttributes"),La=Symbol("i18nProperties"),Yr=Symbol("i18nContexts"),Gt=Symbol("i18nUnsubs"),Qr=(0,Et.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?Kr:xt}i18n(s){let{context:o,key:a,message:c}=s,{custom:l,args:u,argsProvider:d}=s;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let p=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...p)}return c}async awaitI18n(s){let{context:o,custom:a}=s;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(s)}customI18n(s,o){if(vt.isI18nKey(s)){let[a,c]=s.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((o,a,c)=>s.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===s}),this.updateI18nProperties(o=>o.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var o,a;let c=this,l=(u,d,p)=>p?.context&&p.key&&s(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[qt])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Na])===null||a===void 0||a.forEach((u,d)=>{var p;return c[d]=(p=c[d])===null||p===void 0?void 0:p.map(m=>l(u,d,m))})}updateI18nProperties(s){var o;(o=this[La])===null||o===void 0||o.forEach((a,c)=>{s(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(s,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,o,a)}addI18nContext(s,o,a){let c=(typeof s=="string"?s:s.name).toLowerCase();a=typeof s=="string"?a:s.custom,this[Yr].set(c,{isCustomContext:a}),this[Gt].has(c)||this[Gt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(s){return this[Yr].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Yr].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Gt].forEach(s=>s()),this[Gt].clear()}}return t=Yr,r=Gt,Wl([(0,Ra.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Xr=class extends Qr(Et.FtLitElement){},Jr=class extends Qr(Et.FtLitElementRedux){};var ka=y(V());var Da=ka.css`