@fluid-topics/ft-combobox 2.2.39 → 2.2.41
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.
- package/build/ft-combobox.light.js +1 -1
- package/build/ft-combobox.min.js +2 -2
- package/package.json +11 -11
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
${(0,Cs.unsafeHTML)(this.resolvedIcon)}
|
|
572
572
|
<slot ?hidden=${i}></slot>
|
|
573
573
|
</i>
|
|
574
|
-
`}getTextContent(){var e,i;return(i=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&i!==void 0?i:""}update(e){super.update(e),["value","variant"].some(i=>e.has(i))&&this.resolveIcon()}resolveIcon(){var e,i;let r=this.value||this.getTextContent();switch(this.variant){case Ne.file_format:this.resolvedIcon=(e=m[r.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:r;break;case Ne.material:this.resolvedIcon=this.value||vi.nothing;break;default:this.resolvedIcon=(i=Ie[r.replace("-","_").toUpperCase()])!==null&&i!==void 0?i:r;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};Z.elementDefinitions={};Z.styles=ns;Si([(0,ut.property)()],Z.prototype,"variant",void 0);Si([(0,ut.property)()],Z.prototype,"value",void 0);Si([(0,ut.property)({reflect:!0,attribute:"aria-hidden"})],Z.prototype,"ariaHidden",void 0);Si([(0,ut.state)()],Z.prototype,"resolvedIcon",void 0);Si([(0,ut.query)("slot")],Z.prototype,"slottedContent",void 0);var Ts=f(E());var ws={"ft-icon":Z};(0,Ts.customElements)(ws);var jn=f(re());var Os=f(re(),1);var An=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},su=t=>({fromAttribute:e=>{if(e==null)return Ei(t);try{return JSON.parse(e)}catch{return Ei(t)}},toAttribute:e=>JSON.stringify(e)});function Rs(t,e){return(0,Os.property)({type:Object,converter:su(t),hasChanged:Ai,...e??{}})}function au(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!Yt(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Yt(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!Yt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Yt(t,e){try{return au(t,e)}catch{return!1}}function Ai(t,e){return!Yt(t,e)}function Ei(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ir(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var Ls=f(re(),1);var _n=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:Ai,attribute:!1,...e};(0,Ls.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var rr=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var Ot=f(re(),1);var nr=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sr=f(j(),1);var or=class extends sr.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return(0,sr.adoptStyles)(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){An(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Ps(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var Zt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Is,ks=Symbol("constructorPrototype"),Ds=Symbol("constructorName"),Ms=Symbol("exportpartsDebouncer"),Ns=Symbol("dynamicDependenciesLoaded"),Xt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Xt.eventName="exportparts-updated";var Ye=class extends or{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Is]=new nr(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Ms].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ds]=this.constructor.name,this[ks]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ds]&&Object.setPrototypeOf(this,this[ks])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[Ns]||(i[Ns]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Xt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Xt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Xt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Ps(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(o=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let g=(s=(r=p.getAttribute("part"))===null||r===void 0?void 0:r.split(" "))!==null&&s!==void 0?s:[],x=(a=(n=p.getAttribute("exportparts"))===null||n===void 0?void 0:n.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],T=[...g,...x].filter(l).map(b=>b.trim());for(let b of T)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Is=Ms;Zt([(0,Ot.property)()],Ye.prototype,"exportpartsPrefix",void 0);Zt([Rs([])],Ye.prototype,"exportpartsPrefixes",void 0);Zt([(0,Ot.property)({reflect:!0})],Ye.prototype,"exportparts",void 0);Zt([(0,Ot.property)()],Ye.prototype,"customStylesheet",void 0);Zt([(0,Ot.property)()],Ye.prototype,"elementToFocus",void 0);Zt([(0,Ot.state)()],Ye.prototype,"useAdoptedStyleSheets",void 0);function ar(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _i=Symbol("internalReduxEventsUnsubscribers"),dt=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),lu=ir(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[dt].has(s.store):this[dt].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l,c;this[dt].set(s,a.subscribe(()=>this.updateFromStores())),this[_i].set(s,[]),ar(a)&&(!((l=a.deprecatedKeys)===null||l===void 0)&&l.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let p=g=>this[d](g);a.addEventListener(u.eventName,p),this[_i].get(s).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[dt].has(s)&&this[dt].get(s)(),this[dt].delete(s),(a=this[_i].get(s))===null||a===void 0||a.forEach(l=>l()),this[_i].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=dt,i=Rt,r=_i,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),$s=class extends lu(Ye){};function de(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var cu=typeof Symbol=="function"&&Symbol.observable||"@@observable",Us=cu,Cn=()=>Math.random().toString(36).substring(7).split("").join("."),uu={INIT:`@@redux/INIT${Cn()}`,REPLACE:`@@redux/REPLACE${Cn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Cn()}`},lr=uu;function cr(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function wn(t,e,i){if(typeof t!="function")throw new Error(de(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(de(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(de(1));return i(wn)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((b,R)=>{s.set(R,b)}))}function u(){if(l)throw new Error(de(3));return n}function d(b){if(typeof b!="function")throw new Error(de(4));if(l)throw new Error(de(5));let R=!0;c();let V=a++;return s.set(V,b),function(){if(R){if(l)throw new Error(de(6));R=!1,c(),s.delete(V),o=null}}}function p(b){if(!cr(b))throw new Error(de(7));if(typeof b.type>"u")throw new Error(de(8));if(typeof b.type!="string")throw new Error(de(17));if(l)throw new Error(de(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(V=>{V()}),b}function g(b){if(typeof b!="function")throw new Error(de(10));r=b,p({type:lr.REPLACE})}function x(){let b=d;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(de(11));function V(){let S=R;S.next&&S.next(u())}return V(),{unsubscribe:b(V)}},[Us](){return this}}}return p({type:lr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[Us]:x}}function du(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:lr.INIT})>"u")throw new Error(de(12));if(typeof i(void 0,{type:lr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(de(13))})}function Tn(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{du(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<r.length;d++){let p=r[d],g=i[p],x=a[p],T=g(x,l);if(typeof T>"u"){let b=l&&l.type;throw new Error(de(14))}u[p]=T,c=c||T!==x}return c=c||r.length!==Object.keys(a).length,c?u:a}}function Ci(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function Fs(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(de(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Ci(...a)(n.dispatch),{...n,dispatch:o}}}function Vs(t){return cr(t)&&"type"in t&&typeof t.type=="string"}var Ys=Symbol.for("immer-nothing"),Bs=Symbol.for("immer-draftable"),me=Symbol.for("immer-state");function ze(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Oe=Object,Qt=Oe.getPrototypeOf,fr="constructor",xr="prototype",Pn="configurable",hr="enumerable",dr="writable",wi="value",Xe=t=>!!t&&!!t[me];function Re(t){return t?Xs(t)||Sr(t)||!!t[Bs]||!!t[fr]?.[Bs]||Er(t)||Li(t):!1}var pu=Oe[xr][fr].toString(),Hs=new WeakMap;function Xs(t){if(!t||!Fn(t))return!1;let e=Qt(t);if(e===null||e===Oe[xr])return!0;let i=Oe.hasOwnProperty.call(e,fr)&&e[fr];if(i===Object)return!0;if(!Jt(i))return!1;let r=Hs.get(i);return r===void 0&&(r=Function.toString.call(i),Hs.set(i,r)),r===pu}function vr(t,e,i=!0){Ri(t)===0?(i?Reflect.ownKeys(t):Oe.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function Ri(t){let e=t[me];return e?e.type_:Sr(t)?1:Er(t)?2:Li(t)?3:0}var On=(t,e,i=Ri(t))=>i===2?t.has(e):Oe[xr].hasOwnProperty.call(t,e),kn=(t,e,i=Ri(t))=>i===2?t.get(e):t[e],mr=(t,e,i,r=Ri(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function fu(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Sr=Array.isArray,Er=t=>t instanceof Map,Li=t=>t instanceof Set,Fn=t=>typeof t=="object",Jt=t=>typeof t=="function",Rn=t=>typeof t=="boolean";function hu(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var rt=t=>t.copy_||t.base_;var Vn=t=>t.modified_?t.copy_:t.base_;function Dn(t,e){if(Er(t))return new Map(t);if(Li(t))return new Set(t);if(Sr(t))return Array[xr].slice.call(t);let i=Xs(t);if(e===!0||e==="class_only"&&!i){let r=Oe.getOwnPropertyDescriptors(t);delete r[me];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[dr]===!1&&(a[dr]=!0,a[Pn]=!0),(a.get||a.set)&&(r[s]={[Pn]:!0,[dr]:!0,[hr]:a[hr],[wi]:t[s]})}return Oe.create(Qt(t),r)}else{let r=Qt(t);if(r!==null&&i)return{...t};let n=Oe.create(r);return Oe.assign(n,t)}}function Ar(t,e=!1){return _r(t)||Xe(t)||!Re(t)||(Ri(t)>1&&Oe.defineProperties(t,{set:ur,add:ur,clear:ur,delete:ur}),Oe.freeze(t),e&&vr(t,(i,r)=>{Ar(r,!0)},!1)),t}function mu(){ze(2)}var ur={[wi]:mu};function _r(t){return t===null||!Fn(t)?!0:Oe.isFrozen(t)}var gr="MapSet",Nn="Patches",zs="ArrayMethods",Zs={};function Lt(t){let e=Zs[t];return e||ze(0,t),e}var js=t=>!!Zs[t];var Ti,Js=()=>Ti,gu=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:js(gr)?Lt(gr):void 0,arrayMethodsPlugin_:js(zs)?Lt(zs):void 0});function Ws(t,e){e&&(t.patchPlugin_=Lt(Nn),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function In(t){Mn(t),t.drafts_.forEach(yu),t.drafts_=null}function Mn(t){t===Ti&&(Ti=t.parent_)}var Ks=t=>Ti=gu(Ti,t);function yu(t){let e=t[me];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Gs(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[me].modified_&&(In(e),ze(4)),Re(t)&&(t=qs(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[me].base_,t,e)}else t=qs(e,i);return bu(e,t,!0),In(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ys?t:void 0}function qs(t,e){if(_r(e))return e;let i=e[me];if(!i)return yr(e,t.handledSet_,t);if(!Cr(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);ta(i,t)}return i.copy_}function bu(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ar(e,i)}function Qs(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Cr=(t,e)=>t.scope_===e,xu=[];function ea(t,e,i,r){let n=rt(t),o=t.type_;if(r!==void 0&&kn(n,r,o)===e){mr(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;vr(n,(l,c)=>{if(Xe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??xu;for(let a of s)mr(n,a,i,o)}function vu(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!Cr(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=Vn(o);ea(t,o.draft_??o,s,i),ta(o,n)})}function ta(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}Qs(t)}}function Su(t,e,i){let{scope_:r}=t;if(Xe(i)){let n=i[me];Cr(n,r)&&n.callbacks_.push(function(){pr(t);let s=Vn(n);ea(t,i,s,e)})}else Re(i)&&t.callbacks_.push(function(){let o=rt(t);t.type_===3?o.has(i)&&yr(i,r.handledSet_,r):kn(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&yr(kn(t.copy_,e,t.type_),r.handledSet_,r)})}function yr(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||Xe(t)||e.has(t)||!Re(t)||_r(t)||(e.add(t),vr(t,(r,n)=>{if(Xe(n)){let o=n[me];if(Cr(o,i)){let s=Vn(o);mr(t,r,s,t.type_),Qs(o)}}else Re(n)&&yr(n,e,i)})),t}function Eu(t,e){let i=Sr(t),r={type_:i?1:0,scope_:e?e.scope_:Js(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=br;i&&(n=[r],o=Oi);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var br={get(t,e){if(e===me)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=rt(t);if(!On(n,e,t.type_))return _u(t,n,e);let o=n[e];if(t.finalized_||!Re(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&hu(e))return o;if(o===Ln(t.base_,e)||Au(t,e,o)){pr(t);let s=t.type_===1?+e:e,a=Un(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in rt(t)},ownKeys(t){return Reflect.ownKeys(rt(t))},set(t,e,i){let r=ia(rt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Ln(rt(t),e),o=n?.[me];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.delete(e),!0;if(fu(i,n)&&(i!==void 0||On(t.base_,e,t.type_)))return!0;pr(t),$n(t)}return t.copy_[e]===i&&(i!==void 0||On(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),Su(t,e,i)),!0},deleteProperty(t,e){return pr(t),Ln(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),$n(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=rt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[dr]:!0,[Pn]:t.type_!==1||e!=="length",[hr]:r[hr],[wi]:i[e]}},defineProperty(){ze(11)},getPrototypeOf(t){return Qt(t.base_)},setPrototypeOf(){ze(12)}},Oi={};for(let t in br){let e=br[t];Oi[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}Oi.deleteProperty=function(t,e){return Oi.set.call(this,t,e,void 0)};Oi.set=function(t,e,i){return br.set.call(this,t[0],e,i,t[0])};function Ln(t,e){let i=t[me];return(i?rt(i):t)[e]}function Au(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||!Re(i)||i[me]?!1:t.baseRefs_.has(i)}function _u(t,e,i){let r=ia(e,i);return r?wi in r?r[wi]:r.get?.call(t.draft_):void 0}function ia(t,e){if(!(e in t))return;let i=Qt(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=Qt(i)}}function $n(t){t.modified_||(t.modified_=!0,t.parent_&&$n(t.parent_))}function pr(t){t.copy_||(t.assigned_=new Map,t.copy_=Dn(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Cu=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(Jt(e)&&!Jt(i)){let o=i;i=e;let s=this;return function(l=o,...c){return s.produce(l,u=>i.call(this,u,...c))}}Jt(i)||ze(6),r!==void 0&&!Jt(r)&&ze(7);let n;if(Re(e)){let o=Ks(this),s=Un(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?In(o):Mn(o)}return Ws(o,r),Gs(n,o)}else if(!e||!Fn(e)){if(n=i(e),n===void 0&&(n=e),n===Ys&&(n=void 0),this.autoFreeze_&&Ar(n,!0),r){let o=[],s=[];Lt(Nn).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else ze(1,e)},this.produceWithPatches=(e,i)=>{if(Jt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Rn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Rn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Rn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Re(t)||ze(8),Xe(t)&&(t=ra(t));let e=Ks(this),i=Un(e,t,void 0);return i[me].isManual_=!0,Mn(e),i}finishDraft(t,e){let i=t&&t[me];(!i||!i.isManual_)&&ze(9);let{scope_:r}=i;return Ws(r,e),Gs(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Lt(Nn).applyPatches_;return Xe(t)?r(t,e):this.produce(t,n=>r(n,e))}};function Un(t,e,i,r){let[n,o]=Er(e)?Lt(gr).proxyMap_(e,i):Li(e)?Lt(gr).proxySet_(e,i):Eu(e,i);return(i?.scope_??Js()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?vu(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function ra(t){return Xe(t)||ze(10,t),na(t)}function na(t){if(!Re(t)||_r(t))return t;let e=t[me],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=Dn(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=Dn(t,!0);let n=i;return Li(i)&&(i=new Set),vr(n,(o,s)=>{mr(i,o,na(s))},r),e&&(e.finalized_=!1),i}var wu=globalThis.Iterator,Uf=typeof wu?.from=="function";var Tu=new Cu,Bn=Tu.produce;function oa(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var sa=oa(),aa=oa;var Ou=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ci:Ci.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Ru=t=>t&&typeof t.match=="function";function pt(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(Ze(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Vs(r)&&r.type===t,i}var pa=class Pi extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Pi.prototype)}static get[Symbol.species](){return Pi}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Pi(...e[0].concat(this)):new Pi(...e.concat(this))}};function la(t){return Re(t)?Bn(t,()=>{}):t}function wr(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Lu(t){return typeof t=="boolean"}var Pu=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new pa;return i&&(Lu(i)?s.push(sa):s.push(aa(i.extraArgument))),s},ku="RTK_autoBatch";var ca=t=>e=>{setTimeout(e,t)},Du=(t,e)=>i=>{let r=!1,n,o,s=()=>{r||(r=!0,cancelAnimationFrame(n),clearTimeout(o),i())};n=t(s),o=setTimeout(s,e)},Nu=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Du(window.requestAnimationFrame,100):ca(10):t.type==="callback"?t.queueNotification:ca(t.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>n&&u(),p=r.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[ku],o=!n,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{n=!0}}})},Iu=t=>function(i){let{autoBatch:r=!0}=i??{},n=new pa(t);return r&&n.push(Nu(typeof r=="object"?r:void 0)),n};function fa(t){let e=Pu(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(cr(i))l=Tn(i);else throw new Error(Ze(1));let c;typeof r=="function"?c=r(e):c=e();let u=Ci;n&&(u=Ou({trace:!1,...typeof n=="object"&&n}));let d=Fs(...c),p=Iu(d),g=typeof a=="function"?a(p):p(),x=u(...g);return wn(l,s,x)}function ha(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ze(28));if(a in e)throw new Error(Ze(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Mu(t){return typeof t=="function"}function $u(t,e){let[i,r,n]=ha(e),o;if(Mu(t))o=()=>la(t());else{let a=la(t);o=()=>a}function s(a=o(),l){let c=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Xe(u)){let p=d(u,l);return p===void 0?u:p}else{if(Re(u))return Bn(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw new Error(Ze(9))}return p}}return u},a)}return s.getInitialState=o,s}var Uu=(t,e)=>Ru(t)?t.match(e):t(e);function Fu(...t){return e=>t.some(i=>Uu(i,e))}var Vu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bu=(t=21)=>{let e="",i=t;for(;i--;)e+=Vu[Math.random()*64|0];return e},Hu=["name","message","stack","code"],Hn=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},ua=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},zu=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of Hu)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},da="External signal was aborted",ju=(()=>{function t(e,i,r){let n=pt(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=pt(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=pt(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(r&&r.serializeError||zu)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:d!==void 0,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let g=r?.idGenerator?r.idGenerator(l):Bu(),x=new AbortController,T,b;function R(v){b=v,x.abort()}c&&(c.aborted?R(da):c.addEventListener("abort",()=>R(da),{once:!0}));let V=(async function(){let v;try{let S=r?.condition?.(l,{getState:d,extra:p});if(Ku(S)&&(S=await S),S===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(x.signal.aborted)throw{name:"AbortError",message:b||"Aborted"};let z=new Promise((U,ie)=>{T=()=>{ie({name:"AbortError",message:b||"Aborted"})},x.signal.addEventListener("abort",T,{once:!0})});u(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),v=await Promise.race([z,Promise.resolve(i(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:x.signal,abort:R,rejectWithValue:((U,ie)=>new Hn(U,ie)),fulfillWithValue:((U,ie)=>new ua(U,ie))})).then(U=>{if(U instanceof Hn)throw U;return U instanceof ua?n(U.payload,g,l,U.meta):n(U,g,l)})])}catch(S){v=S instanceof Hn?s(null,g,l,S.payload,S.meta):s(S,g,l)}finally{T&&x.signal.removeEventListener("abort",T)}return r&&!r.dispatchConditionRejection&&s.match(v)&&v.meta.condition||u(v),v})();return Object.assign(V,{abort:R,requestId:g,arg:l,unwrap(){return V.then(Wu)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Fu(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Wu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ma=Symbol.for("rtk-slice-createasyncthunk"),Kf={[ma]:ju};function Gu(t,e){return`${t}/${e}`}function qu({creators:t}={}){let e=t?.asyncThunk?.[ma];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(Ze(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(Xu()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(v,S){let z=typeof v=="string"?v:v.type;if(!z)throw new Error(Ze(12));if(z in l.sliceCaseReducersByType)throw new Error(Ze(13));return l.sliceCaseReducersByType[z]=S,c},addMatcher(v,S){return l.sliceMatchers.push({matcher:v,reducer:S}),c},exposeAction(v,S){return l.actionCreators[v]=S,c},exposeCaseReducer(v,S){return l.sliceCaseReducersByName[v]=S,c}};a.forEach(v=>{let S=s[v],z={reducerName:v,type:Gu(n,v),createNotation:typeof r.reducers=="function"};Ju(S)?ed(z,S,c,e):Zu(z,S,c)});function u(){let[v={},S=[],z=void 0]=typeof r.extraReducers=="function"?ha(r.extraReducers):[r.extraReducers],U={...v,...l.sliceCaseReducersByType};return $u(r.initialState,ie=>{for(let he in U)ie.addCase(he,U[he]);for(let he of l.sliceMatchers)ie.addMatcher(he.matcher,he.reducer);for(let he of S)ie.addMatcher(he.matcher,he.reducer);z&&ie.addDefaultCase(z)})}let d=v=>v,p=new Map,g=new WeakMap,x;function T(v,S){return x||(x=u()),x(v,S)}function b(){return x||(x=u()),x.getInitialState()}function R(v,S=!1){function z(ie){let he=ie[v];return typeof he>"u"&&S&&(he=wr(g,z,b)),he}function U(ie=d){return wr(wr(p,S,()=>new WeakMap),ie,()=>{let he={};for(let[Gi,ke]of Object.entries(r.selectors??{}))he[Gi]=Yu(ke,ie,()=>wr(g,ie,b),S);return he})}return{reducerPath:v,getSelectors:U,get selectors(){return U(z)},selectSlice:z}}let V={name:n,reducer:T,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...R(o),injectInto(v,{reducerPath:S,...z}={}){let U=S??o;return v.inject({reducerPath:U,reducer:T},z),{...V,...R(U,!0)}}};return V}}function Yu(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var ga=qu();function Xu(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function Zu({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!Qu(r))throw new Error(Ze(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?pt(t,s):pt(t))}function Ju(t){return t._reducerDefinitionType==="asyncThunk"}function Qu(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ed({type:t,reducerName:e},i,r,n){if(!n)throw new Error(Ze(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=i,d=n(t,o,u);r.exposeAction(e,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(e,{fulfilled:s||Tr,pending:a||Tr,rejected:l||Tr,settled:c||Tr})}function Tr(){}var ya="listener",ba="completed",xa="cancelled",Gf=`task-${xa}`,qf=`task-${ba}`,Yf=`${ya}-${xa}`,Xf=`${ya}-${ba}`;var{assign:va}=Object;var zn="listenerMiddleware";var td=va(pt(`${zn}/add`),{withTypes:()=>td}),Zf=pt(`${zn}/removeAll`),id=va(pt(`${zn}/remove`),{withTypes:()=>id});function Ze(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var rd=ir(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),Or=class extends rd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Sa=class t extends Or{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if(ar(o))return o;if(n==null)return;let s=ga({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=fa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Ei(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus,n.deprecatedKeys)}constructor(e,i,r,n){super(),this.reduxSlice=e,this.reduxStore=i,this.deprecatedKeys=n,this.isFtReduxStore=!0,this.commands=new rr,this.injectInto=(s,a)=>this.reduxSlice.injectInto(s,a),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let o=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,l)=>{let c=a,u=s[c];return u?(...d)=>{let p=u(...d.map(o));return this.reduxStore.dispatch(p),p}:d=>{let p=c,g=this.getState()[p];Yt(g,d)||this.setState({[p]:o(d)})}}}),this.eventBus=r??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}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 Rr=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var Lr=f(E()),nd="ft-app-info",Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pt.eventName="authentication-change";var ki=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ki.eventName="ui-locale-changed";var od={session:(t,e)=>{(0,Lr.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new Pt(e.payload)),0))}},P=Lr.FtReduxStore.get({name:nd,reducers:od,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ea=f(E()),Pr=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Th=(0,Ea.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Rr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pr([(0,jn.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Pr([(0,jn.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Pr([_n({store:P.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Pr([_n({store:P.name})],e.prototype,"uiLocale",void 0),e});var Aa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Aa||(Aa={}));var _a;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(_a||(_a={}));var Ca;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var wa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(wa||(wa={}));var Ta;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ta||(Ta={}));var Oa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Oa||(Oa={}));var Ra;(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Ra||(Ra={}));var La;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(La||(La={}));var Pa;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Pa||(Pa={}));var ka;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ka||(ka={}));var Da;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER",t.DOC_DIFF="DOC_DIFF"})(Da||(Da={}));var Na;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Na||(Na={}));var Ia;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ia||(Ia={}));var Ma;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ma||(Ma={}));var $a;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($a||($a={}));var Ua;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ua||(Ua={}));var Fa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Fa||(Fa={}));var Va;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Va||(Va={}));var Ba;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ba||(Ba={}));var Ha;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ha||(Ha={}));var za;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(za||(za={}));var ja;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ja||(ja={}));var Wa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wa||(Wa={}));var Ka;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ka||(Ka={}));var Ga;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ga||(Ga={}));var qa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(qa||(qa={}));var Ya;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ya||(Ya={}));var Xa;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Xa||(Xa={}));var te;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(te||(te={}));var Me;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var Za;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Za||(Za={}));var Ja;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Ja||(Ja={}));var Qa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Qa||(Qa={}));var el;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(el||(el={}));var tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(tl||(tl={}));var il;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(il||(il={}));var rl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(rl||(rl={}));var nl;(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(nl||(nl={}));var ol;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ol||(ol={}));var sl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(sl||(sl={}));var al;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(al||(al={}));var ll;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ll||(ll={}));var cl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(cl||(cl={}));var sd={[te.PERSONAL_BOOK_SHARE_USER]:[te.PERSONAL_BOOK_USER],[te.HTML_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.PDF_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.KHUB_ADMIN]:[te.CONTENT_PUBLISHER],[te.ADMIN]:[te.KHUB_ADMIN,te.USERS_ADMIN,te.PORTAL_ADMIN,te.BEHAVIOR_DATA_USER],[te.GENERATIVE_AI_EXPORT_USER]:[te.GENERATIVE_AI_USER]};function ul(t,e){return t===e||(sd[t]??[]).some(i=>ul(i,e))}function Wn(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(r=>ul(r,e))}function dl(t,...e){return t==null?!1:e.some(i=>Wn(t,i))}var Mr=f(E());var Kn=f(E());var kt=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=P.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=P.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var ei=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:kt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):kt.await()}};var Le=class extends ei{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new Kn.CacheRegistry,this.cache=e?n.commonCache:new Kn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var kr=class extends Le{async listMySearches(){let{session:e}=P.getState();return Wn(e,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Dr=class extends Le{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Nr=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var Ir=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var ad="ft-user-assets",ld={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(Me).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;qn(t,i,[...Gn(t,i),n]),pl(t,i,1,r),fl(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;qn(t,i,Gn(t,i).map(n=>n.id===r.id?r:n)),fl(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;qn(t,i,Gn(t,i).filter(o=>o.id!==n)),pl(t,i,-1,r)}},hl={[Me.SEARCHES]:"savedSearches",[Me.BOOKMARKS]:"bookmarks",[Me.BOOKS]:void 0,[Me.COLLECTIONS]:void 0},Gn=(t,e)=>{var i;let r=hl[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},qn=(t,e,i)=>{let r=hl[e];r&&(t[r]=i)},pl=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===Me.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},fl=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},xe=Mr.FtReduxStore.get({name:ad,reducers:ld,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Me).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Yn=class{constructor(e=new Nr,i=new Ir){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Dr,this.savedSearchesService=new kr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=P.getState();(0,Mr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),xe.actions.clearAssetCount(),xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();xe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();xe.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&xe.getState().assetCounts.allAsset[e]!==i.count&&xe.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&xe.getState().assetCounts.bookmarkByMap[e]!==i.count&&xe.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys(xe.getState().assetCounts.bookmarkByMap).length!==0;e===Me.BOOKMARKS&&i&&xe.actions.clearBookmarkCountByMap(),xe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xe.actions.bookmarks(i)}}},cd=new Yn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cd);var Xn=class{addCommand(e,i=!1){P.commands.add(e,i)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Xn;var $e=f(E());var ml,ti=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ud=Symbol("clearAfterUnitTest"),$r=class extends(0,$e.withEventBus)(Le){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ml]=()=>{this.defaultMessages={},this.cache=new $e.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,$e.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new $e.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof $e.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new ti({loadedContexts:e})),this.dispatchEvent(new ti({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new ti({loadedContexts:[e]})),this.dispatchEvent(new ti({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,$e.delay)(0).then(()=>r()).catch(()=>null)))}};ml=ud;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $r{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $r{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ii=window.FluidTopicsI18nService,Ur=window.FluidTopicsCustomI18nService;var gl=f(E()),Zn=class{highlightHtml(e,i,r){(0,gl.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new Zn;var yl=f(E());var Jn=class{isDate(e){var i,r,n,o;return(o=(r=((n=(i=P.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||r===void 0?void 0:r.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return yl.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:P.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Jn;var bl=f(E());var Di=class{static get(e,i,{baseUrl:r,localesConfiguration:n,availableContentLocales:o}=P.getState()){var s;if(!i||o.length>0&&!o.some(a=>a.lang===i)){let a=n?.defaultLocales.defaultContentLocale;i=a?`${a.lang}-${a.region}`:(s=o[0])===null||s===void 0?void 0:s.lang}return new bl.SearchPlaceConverter(r,e??20,n?.allLanguagesAllowed,i,o)}};var Qn=class{urlToSearchRequest(e){return Di.get().parse(e)}searchRequestToUrl(e){return Di.get().serialize(e)}};window.FluidTopicsUrlService=new Qn;var nt=f(E());var Dt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Dt.eventName="before-location-change";var Nt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Nt.eventName="change";var eo=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},xl=new eo;var Fr=class t extends nt.WithEventBus{static build(){return new t(window.history,xl,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,nt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),c=new Dt(l);this.dispatchEvent(c);let u=i(),d={...u===this.currentIndex?this.currentState:void 0,...o,index:u,href:c.detail.nextLocation.href};r.apply(n,[d,s,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.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(e){for(let i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addBeforeLocationChangeListener(e){this.addEventListener(Dt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Dt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Nt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Nt.eventName,e)}currentItem(){return(0,nt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,nt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,nt.deepCopy)(i.find(r=>e(r)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,nt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var vl=f(j());var Sl=vl.css`
|
|
574
|
+
`}getTextContent(){var e,i;return(i=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&i!==void 0?i:""}update(e){super.update(e),["value","variant"].some(i=>e.has(i))&&this.resolveIcon()}resolveIcon(){var e,i;let r=this.value||this.getTextContent();switch(this.variant){case Ne.file_format:this.resolvedIcon=(e=m[r.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:r;break;case Ne.material:this.resolvedIcon=this.value||vi.nothing;break;default:this.resolvedIcon=(i=Ie[r.replace("-","_").toUpperCase()])!==null&&i!==void 0?i:r;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};Z.elementDefinitions={};Z.styles=ns;Si([(0,ut.property)()],Z.prototype,"variant",void 0);Si([(0,ut.property)()],Z.prototype,"value",void 0);Si([(0,ut.property)({reflect:!0,attribute:"aria-hidden"})],Z.prototype,"ariaHidden",void 0);Si([(0,ut.state)()],Z.prototype,"resolvedIcon",void 0);Si([(0,ut.query)("slot")],Z.prototype,"slottedContent",void 0);var Ts=f(E());var ws={"ft-icon":Z};(0,Ts.customElements)(ws);var jn=f(re());var Os=f(re(),1);var An=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},su=t=>({fromAttribute:e=>{if(e==null)return Ei(t);try{return JSON.parse(e)}catch{return Ei(t)}},toAttribute:e=>JSON.stringify(e)});function Rs(t,e){return(0,Os.property)({type:Object,converter:su(t),hasChanged:Ai,...e??{}})}function au(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!Yt(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!Yt(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!Yt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Yt(t,e){try{return au(t,e)}catch{return!1}}function Ai(t,e){return!Yt(t,e)}function Ei(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ir(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var Ls=f(re(),1);var _n=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:Ai,attribute:!1,...e};(0,Ls.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var rr=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var Ot=f(re(),1);var nr=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sr=f(j(),1);var or=class extends sr.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return(0,sr.adoptStyles)(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){An(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Ps(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var Zt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Is,ks=Symbol("constructorPrototype"),Ds=Symbol("constructorName"),Ms=Symbol("exportpartsDebouncer"),Ns=Symbol("dynamicDependenciesLoaded"),Xt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Xt.eventName="exportparts-updated";var Ye=class extends or{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Is]=new nr(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Ms].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ds]=this.constructor.name,this[ks]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ds]&&Object.setPrototypeOf(this,this[ks])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[Ns]||(i[Ns]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Xt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Xt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Xt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Ps(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(o=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let g=(s=(r=p.getAttribute("part"))===null||r===void 0?void 0:r.split(" "))!==null&&s!==void 0?s:[],x=(a=(n=p.getAttribute("exportparts"))===null||n===void 0?void 0:n.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],T=[...g,...x].filter(l).map(b=>b.trim());for(let b of T)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Is=Ms;Zt([(0,Ot.property)()],Ye.prototype,"exportpartsPrefix",void 0);Zt([Rs([])],Ye.prototype,"exportpartsPrefixes",void 0);Zt([(0,Ot.property)({reflect:!0})],Ye.prototype,"exportparts",void 0);Zt([(0,Ot.property)()],Ye.prototype,"customStylesheet",void 0);Zt([(0,Ot.property)()],Ye.prototype,"elementToFocus",void 0);Zt([(0,Ot.state)()],Ye.prototype,"useAdoptedStyleSheets",void 0);function ar(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _i=Symbol("internalReduxEventsUnsubscribers"),dt=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),lu=ir(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[dt].has(s.store):this[dt].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l,c;this[dt].set(s,a.subscribe(()=>this.updateFromStores())),this[_i].set(s,[]),ar(a)&&(!((l=a.deprecatedKeys)===null||l===void 0)&&l.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let p=g=>this[d](g);a.addEventListener(u.eventName,p),this[_i].get(s).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[dt].has(s)&&this[dt].get(s)(),this[dt].delete(s),(a=this[_i].get(s))===null||a===void 0||a.forEach(l=>l()),this[_i].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=dt,i=Rt,r=_i,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),$s=class extends lu(Ye){};function de(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var cu=typeof Symbol=="function"&&Symbol.observable||"@@observable",Us=cu,Cn=()=>Math.random().toString(36).substring(7).split("").join("."),uu={INIT:`@@redux/INIT${Cn()}`,REPLACE:`@@redux/REPLACE${Cn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Cn()}`},lr=uu;function cr(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function wn(t,e,i){if(typeof t!="function")throw new Error(de(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(de(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(de(1));return i(wn)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((b,R)=>{s.set(R,b)}))}function u(){if(l)throw new Error(de(3));return n}function d(b){if(typeof b!="function")throw new Error(de(4));if(l)throw new Error(de(5));let R=!0;c();let V=a++;return s.set(V,b),function(){if(R){if(l)throw new Error(de(6));R=!1,c(),s.delete(V),o=null}}}function p(b){if(!cr(b))throw new Error(de(7));if(typeof b.type>"u")throw new Error(de(8));if(typeof b.type!="string")throw new Error(de(17));if(l)throw new Error(de(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(V=>{V()}),b}function g(b){if(typeof b!="function")throw new Error(de(10));r=b,p({type:lr.REPLACE})}function x(){let b=d;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(de(11));function V(){let S=R;S.next&&S.next(u())}return V(),{unsubscribe:b(V)}},[Us](){return this}}}return p({type:lr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[Us]:x}}function du(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:lr.INIT})>"u")throw new Error(de(12));if(typeof i(void 0,{type:lr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(de(13))})}function Tn(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{du(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<r.length;d++){let p=r[d],g=i[p],x=a[p],T=g(x,l);if(typeof T>"u"){let b=l&&l.type;throw new Error(de(14))}u[p]=T,c=c||T!==x}return c=c||r.length!==Object.keys(a).length,c?u:a}}function Ci(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function Fs(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(de(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Ci(...a)(n.dispatch),{...n,dispatch:o}}}function Vs(t){return cr(t)&&"type"in t&&typeof t.type=="string"}var Ys=Symbol.for("immer-nothing"),Bs=Symbol.for("immer-draftable"),me=Symbol.for("immer-state");function ze(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Oe=Object,Qt=Oe.getPrototypeOf,fr="constructor",xr="prototype",Pn="configurable",hr="enumerable",dr="writable",wi="value",Xe=t=>!!t&&!!t[me];function Re(t){return t?Xs(t)||Sr(t)||!!t[Bs]||!!t[fr]?.[Bs]||Er(t)||Li(t):!1}var pu=Oe[xr][fr].toString(),Hs=new WeakMap;function Xs(t){if(!t||!Fn(t))return!1;let e=Qt(t);if(e===null||e===Oe[xr])return!0;let i=Oe.hasOwnProperty.call(e,fr)&&e[fr];if(i===Object)return!0;if(!Jt(i))return!1;let r=Hs.get(i);return r===void 0&&(r=Function.toString.call(i),Hs.set(i,r)),r===pu}function vr(t,e,i=!0){Ri(t)===0?(i?Reflect.ownKeys(t):Oe.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function Ri(t){let e=t[me];return e?e.type_:Sr(t)?1:Er(t)?2:Li(t)?3:0}var On=(t,e,i=Ri(t))=>i===2?t.has(e):Oe[xr].hasOwnProperty.call(t,e),kn=(t,e,i=Ri(t))=>i===2?t.get(e):t[e],mr=(t,e,i,r=Ri(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function fu(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Sr=Array.isArray,Er=t=>t instanceof Map,Li=t=>t instanceof Set,Fn=t=>typeof t=="object",Jt=t=>typeof t=="function",Rn=t=>typeof t=="boolean";function hu(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var rt=t=>t.copy_||t.base_;var Vn=t=>t.modified_?t.copy_:t.base_;function Dn(t,e){if(Er(t))return new Map(t);if(Li(t))return new Set(t);if(Sr(t))return Array[xr].slice.call(t);let i=Xs(t);if(e===!0||e==="class_only"&&!i){let r=Oe.getOwnPropertyDescriptors(t);delete r[me];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[dr]===!1&&(a[dr]=!0,a[Pn]=!0),(a.get||a.set)&&(r[s]={[Pn]:!0,[dr]:!0,[hr]:a[hr],[wi]:t[s]})}return Oe.create(Qt(t),r)}else{let r=Qt(t);if(r!==null&&i)return{...t};let n=Oe.create(r);return Oe.assign(n,t)}}function Ar(t,e=!1){return _r(t)||Xe(t)||!Re(t)||(Ri(t)>1&&Oe.defineProperties(t,{set:ur,add:ur,clear:ur,delete:ur}),Oe.freeze(t),e&&vr(t,(i,r)=>{Ar(r,!0)},!1)),t}function mu(){ze(2)}var ur={[wi]:mu};function _r(t){return t===null||!Fn(t)?!0:Oe.isFrozen(t)}var gr="MapSet",Nn="Patches",zs="ArrayMethods",Zs={};function Lt(t){let e=Zs[t];return e||ze(0,t),e}var js=t=>!!Zs[t];var Ti,Js=()=>Ti,gu=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:js(gr)?Lt(gr):void 0,arrayMethodsPlugin_:js(zs)?Lt(zs):void 0});function Ws(t,e){e&&(t.patchPlugin_=Lt(Nn),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function In(t){Mn(t),t.drafts_.forEach(yu),t.drafts_=null}function Mn(t){t===Ti&&(Ti=t.parent_)}var Ks=t=>Ti=gu(Ti,t);function yu(t){let e=t[me];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Gs(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[me].modified_&&(In(e),ze(4)),Re(t)&&(t=qs(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[me].base_,t,e)}else t=qs(e,i);return bu(e,t,!0),In(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ys?t:void 0}function qs(t,e){if(_r(e))return e;let i=e[me];if(!i)return yr(e,t.handledSet_,t);if(!Cr(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);ta(i,t)}return i.copy_}function bu(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ar(e,i)}function Qs(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Cr=(t,e)=>t.scope_===e,xu=[];function ea(t,e,i,r){let n=rt(t),o=t.type_;if(r!==void 0&&kn(n,r,o)===e){mr(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;vr(n,(l,c)=>{if(Xe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??xu;for(let a of s)mr(n,a,i,o)}function vu(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!Cr(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=Vn(o);ea(t,o.draft_??o,s,i),ta(o,n)})}function ta(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}Qs(t)}}function Su(t,e,i){let{scope_:r}=t;if(Xe(i)){let n=i[me];Cr(n,r)&&n.callbacks_.push(function(){pr(t);let s=Vn(n);ea(t,i,s,e)})}else Re(i)&&t.callbacks_.push(function(){let o=rt(t);t.type_===3?o.has(i)&&yr(i,r.handledSet_,r):kn(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&yr(kn(t.copy_,e,t.type_),r.handledSet_,r)})}function yr(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||Xe(t)||e.has(t)||!Re(t)||_r(t)||(e.add(t),vr(t,(r,n)=>{if(Xe(n)){let o=n[me];if(Cr(o,i)){let s=Vn(o);mr(t,r,s,t.type_),Qs(o)}}else Re(n)&&yr(n,e,i)})),t}function Eu(t,e){let i=Sr(t),r={type_:i?1:0,scope_:e?e.scope_:Js(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=br;i&&(n=[r],o=Oi);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var br={get(t,e){if(e===me)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=rt(t);if(!On(n,e,t.type_))return _u(t,n,e);let o=n[e];if(t.finalized_||!Re(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&hu(e))return o;if(o===Ln(t.base_,e)||Au(t,e,o)){pr(t);let s=t.type_===1?+e:e,a=Un(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in rt(t)},ownKeys(t){return Reflect.ownKeys(rt(t))},set(t,e,i){let r=ia(rt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Ln(rt(t),e),o=n?.[me];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.delete(e),!0;if(fu(i,n)&&(i!==void 0||On(t.base_,e,t.type_)))return!0;pr(t),$n(t)}return t.copy_[e]===i&&(i!==void 0||On(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),Su(t,e,i)),!0},deleteProperty(t,e){return pr(t),Ln(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),$n(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=rt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[dr]:!0,[Pn]:t.type_!==1||e!=="length",[hr]:r[hr],[wi]:i[e]}},defineProperty(){ze(11)},getPrototypeOf(t){return Qt(t.base_)},setPrototypeOf(){ze(12)}},Oi={};for(let t in br){let e=br[t];Oi[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}Oi.deleteProperty=function(t,e){return Oi.set.call(this,t,e,void 0)};Oi.set=function(t,e,i){return br.set.call(this,t[0],e,i,t[0])};function Ln(t,e){let i=t[me];return(i?rt(i):t)[e]}function Au(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||!Re(i)||i[me]?!1:t.baseRefs_.has(i)}function _u(t,e,i){let r=ia(e,i);return r?wi in r?r[wi]:r.get?.call(t.draft_):void 0}function ia(t,e){if(!(e in t))return;let i=Qt(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=Qt(i)}}function $n(t){t.modified_||(t.modified_=!0,t.parent_&&$n(t.parent_))}function pr(t){t.copy_||(t.assigned_=new Map,t.copy_=Dn(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Cu=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(Jt(e)&&!Jt(i)){let o=i;i=e;let s=this;return function(l=o,...c){return s.produce(l,u=>i.call(this,u,...c))}}Jt(i)||ze(6),r!==void 0&&!Jt(r)&&ze(7);let n;if(Re(e)){let o=Ks(this),s=Un(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?In(o):Mn(o)}return Ws(o,r),Gs(n,o)}else if(!e||!Fn(e)){if(n=i(e),n===void 0&&(n=e),n===Ys&&(n=void 0),this.autoFreeze_&&Ar(n,!0),r){let o=[],s=[];Lt(Nn).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else ze(1,e)},this.produceWithPatches=(e,i)=>{if(Jt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Rn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Rn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Rn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Re(t)||ze(8),Xe(t)&&(t=ra(t));let e=Ks(this),i=Un(e,t,void 0);return i[me].isManual_=!0,Mn(e),i}finishDraft(t,e){let i=t&&t[me];(!i||!i.isManual_)&&ze(9);let{scope_:r}=i;return Ws(r,e),Gs(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Lt(Nn).applyPatches_;return Xe(t)?r(t,e):this.produce(t,n=>r(n,e))}};function Un(t,e,i,r){let[n,o]=Er(e)?Lt(gr).proxyMap_(e,i):Li(e)?Lt(gr).proxySet_(e,i):Eu(e,i);return(i?.scope_??Js()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?vu(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function ra(t){return Xe(t)||ze(10,t),na(t)}function na(t){if(!Re(t)||_r(t))return t;let e=t[me],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=Dn(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=Dn(t,!0);let n=i;return Li(i)&&(i=new Set),vr(n,(o,s)=>{mr(i,o,na(s))},r),e&&(e.finalized_=!1),i}var wu=globalThis.Iterator,Uf=typeof wu?.from=="function";var Tu=new Cu,Bn=Tu.produce;function oa(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var sa=oa(),aa=oa;var Ou=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ci:Ci.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Ru=t=>t&&typeof t.match=="function";function pt(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(Ze(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Vs(r)&&r.type===t,i}var pa=class Pi extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Pi.prototype)}static get[Symbol.species](){return Pi}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Pi(...e[0].concat(this)):new Pi(...e.concat(this))}};function la(t){return Re(t)?Bn(t,()=>{}):t}function wr(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Lu(t){return typeof t=="boolean"}var Pu=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new pa;return i&&(Lu(i)?s.push(sa):s.push(aa(i.extraArgument))),s},ku="RTK_autoBatch";var ca=t=>e=>{setTimeout(e,t)},Du=(t,e)=>i=>{let r=!1,n,o,s=()=>{r||(r=!0,cancelAnimationFrame(n),clearTimeout(o),i())};n=t(s),o=setTimeout(s,e)},Nu=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Du(window.requestAnimationFrame,100):ca(10):t.type==="callback"?t.queueNotification:ca(t.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>n&&u(),p=r.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[ku],o=!n,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{n=!0}}})},Iu=t=>function(i){let{autoBatch:r=!0}=i??{},n=new pa(t);return r&&n.push(Nu(typeof r=="object"?r:void 0)),n};function fa(t){let e=Pu(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(cr(i))l=Tn(i);else throw new Error(Ze(1));let c;typeof r=="function"?c=r(e):c=e();let u=Ci;n&&(u=Ou({trace:!1,...typeof n=="object"&&n}));let d=Fs(...c),p=Iu(d),g=typeof a=="function"?a(p):p(),x=u(...g);return wn(l,s,x)}function ha(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ze(28));if(a in e)throw new Error(Ze(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Mu(t){return typeof t=="function"}function $u(t,e){let[i,r,n]=ha(e),o;if(Mu(t))o=()=>la(t());else{let a=la(t);o=()=>a}function s(a=o(),l){let c=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Xe(u)){let p=d(u,l);return p===void 0?u:p}else{if(Re(u))return Bn(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw new Error(Ze(9))}return p}}return u},a)}return s.getInitialState=o,s}var Uu=(t,e)=>Ru(t)?t.match(e):t(e);function Fu(...t){return e=>t.some(i=>Uu(i,e))}var Vu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bu=(t=21)=>{let e="",i=t;for(;i--;)e+=Vu[Math.random()*64|0];return e},Hu=["name","message","stack","code"],Hn=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},ua=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},zu=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of Hu)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},da="External signal was aborted",ju=(()=>{function t(e,i,r){let n=pt(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=pt(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=pt(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(r&&r.serializeError||zu)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:d!==void 0,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let g=r?.idGenerator?r.idGenerator(l):Bu(),x=new AbortController,T,b;function R(v){b=v,x.abort()}c&&(c.aborted?R(da):c.addEventListener("abort",()=>R(da),{once:!0}));let V=(async function(){let v;try{let S=r?.condition?.(l,{getState:d,extra:p});if(Ku(S)&&(S=await S),S===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(x.signal.aborted)throw{name:"AbortError",message:b||"Aborted"};let z=new Promise((U,ie)=>{T=()=>{ie({name:"AbortError",message:b||"Aborted"})},x.signal.addEventListener("abort",T,{once:!0})});u(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),v=await Promise.race([z,Promise.resolve(i(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:x.signal,abort:R,rejectWithValue:((U,ie)=>new Hn(U,ie)),fulfillWithValue:((U,ie)=>new ua(U,ie))})).then(U=>{if(U instanceof Hn)throw U;return U instanceof ua?n(U.payload,g,l,U.meta):n(U,g,l)})])}catch(S){v=S instanceof Hn?s(null,g,l,S.payload,S.meta):s(S,g,l)}finally{T&&x.signal.removeEventListener("abort",T)}return r&&!r.dispatchConditionRejection&&s.match(v)&&v.meta.condition||u(v),v})();return Object.assign(V,{abort:R,requestId:g,arg:l,unwrap(){return V.then(Wu)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Fu(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Wu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ma=Symbol.for("rtk-slice-createasyncthunk"),Kf={[ma]:ju};function Gu(t,e){return`${t}/${e}`}function qu({creators:t}={}){let e=t?.asyncThunk?.[ma];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(Ze(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(Xu()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(v,S){let z=typeof v=="string"?v:v.type;if(!z)throw new Error(Ze(12));if(z in l.sliceCaseReducersByType)throw new Error(Ze(13));return l.sliceCaseReducersByType[z]=S,c},addMatcher(v,S){return l.sliceMatchers.push({matcher:v,reducer:S}),c},exposeAction(v,S){return l.actionCreators[v]=S,c},exposeCaseReducer(v,S){return l.sliceCaseReducersByName[v]=S,c}};a.forEach(v=>{let S=s[v],z={reducerName:v,type:Gu(n,v),createNotation:typeof r.reducers=="function"};Ju(S)?ed(z,S,c,e):Zu(z,S,c)});function u(){let[v={},S=[],z=void 0]=typeof r.extraReducers=="function"?ha(r.extraReducers):[r.extraReducers],U={...v,...l.sliceCaseReducersByType};return $u(r.initialState,ie=>{for(let he in U)ie.addCase(he,U[he]);for(let he of l.sliceMatchers)ie.addMatcher(he.matcher,he.reducer);for(let he of S)ie.addMatcher(he.matcher,he.reducer);z&&ie.addDefaultCase(z)})}let d=v=>v,p=new Map,g=new WeakMap,x;function T(v,S){return x||(x=u()),x(v,S)}function b(){return x||(x=u()),x.getInitialState()}function R(v,S=!1){function z(ie){let he=ie[v];return typeof he>"u"&&S&&(he=wr(g,z,b)),he}function U(ie=d){return wr(wr(p,S,()=>new WeakMap),ie,()=>{let he={};for(let[Gi,ke]of Object.entries(r.selectors??{}))he[Gi]=Yu(ke,ie,()=>wr(g,ie,b),S);return he})}return{reducerPath:v,getSelectors:U,get selectors(){return U(z)},selectSlice:z}}let V={name:n,reducer:T,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...R(o),injectInto(v,{reducerPath:S,...z}={}){let U=S??o;return v.inject({reducerPath:U,reducer:T},z),{...V,...R(U,!0)}}};return V}}function Yu(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var ga=qu();function Xu(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function Zu({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!Qu(r))throw new Error(Ze(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?pt(t,s):pt(t))}function Ju(t){return t._reducerDefinitionType==="asyncThunk"}function Qu(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ed({type:t,reducerName:e},i,r,n){if(!n)throw new Error(Ze(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=i,d=n(t,o,u);r.exposeAction(e,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(e,{fulfilled:s||Tr,pending:a||Tr,rejected:l||Tr,settled:c||Tr})}function Tr(){}var ya="listener",ba="completed",xa="cancelled",Gf=`task-${xa}`,qf=`task-${ba}`,Yf=`${ya}-${xa}`,Xf=`${ya}-${ba}`;var{assign:va}=Object;var zn="listenerMiddleware";var td=va(pt(`${zn}/add`),{withTypes:()=>td}),Zf=pt(`${zn}/removeAll`),id=va(pt(`${zn}/remove`),{withTypes:()=>id});function Ze(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var rd=ir(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),Or=class extends rd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Sa=class t extends Or{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if(ar(o))return o;if(n==null)return;let s=ga({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=fa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Ei(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus,n.deprecatedKeys)}constructor(e,i,r,n){super(),this.reduxSlice=e,this.reduxStore=i,this.deprecatedKeys=n,this.isFtReduxStore=!0,this.commands=new rr,this.injectInto=(s,a)=>this.reduxSlice.injectInto(s,a),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let o=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,l)=>{let c=a,u=s[c];return u?(...d)=>{let p=u(...d.map(o));return this.reduxStore.dispatch(p),p}:d=>{let p=c,g=this.getState()[p];Yt(g,d)||this.setState({[p]:o(d)})}}}),this.eventBus=r??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}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 Rr=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var Lr=f(E()),nd="ft-app-info",Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pt.eventName="authentication-change";var ki=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ki.eventName="ui-locale-changed";var od={session:(t,e)=>{(0,Lr.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new Pt(e.payload)),0))}},P=Lr.FtReduxStore.get({name:nd,reducers:od,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ea=f(E()),Pr=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Th=(0,Ea.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Rr.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pr([(0,jn.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Pr([(0,jn.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Pr([_n({store:P.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Pr([_n({store:P.name})],e.prototype,"uiLocale",void 0),e});var Aa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Aa||(Aa={}));var _a;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(_a||(_a={}));var Ca;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var wa;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(wa||(wa={}));var Ta;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ta||(Ta={}));var Oa;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Oa||(Oa={}));var Ra;(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Ra||(Ra={}));var La;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(La||(La={}));var Pa;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Pa||(Pa={}));var ka;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ka||(ka={}));var Da;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER",t.DOC_DIFF="DOC_DIFF"})(Da||(Da={}));var Na;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Na||(Na={}));var Ia;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ia||(Ia={}));var Ma;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ma||(Ma={}));var $a;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($a||($a={}));var Ua;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ua||(Ua={}));var Fa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Fa||(Fa={}));var Va;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Va||(Va={}));var Ba;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ba||(Ba={}));var Ha;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ha||(Ha={}));var za;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(za||(za={}));var ja;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ja||(ja={}));var Wa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wa||(Wa={}));var Ka;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ka||(Ka={}));var Ga;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ga||(Ga={}));var qa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(qa||(qa={}));var Ya;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ya||(Ya={}));var Xa;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Xa||(Xa={}));var te;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(te||(te={}));var Me;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var Za;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Za||(Za={}));var Ja;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Ja||(Ja={}));var Qa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Qa||(Qa={}));var el;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(el||(el={}));var tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(tl||(tl={}));var il;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(il||(il={}));var rl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(rl||(rl={}));var nl;(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(nl||(nl={}));var ol;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ol||(ol={}));var sl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(sl||(sl={}));var al;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(al||(al={}));var ll;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ll||(ll={}));var cl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(cl||(cl={}));var sd={[te.PERSONAL_BOOK_SHARE_USER]:[te.PERSONAL_BOOK_USER],[te.HTML_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.PDF_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.KHUB_ADMIN]:[te.CONTENT_PUBLISHER],[te.ADMIN]:[te.KHUB_ADMIN,te.USERS_ADMIN,te.PORTAL_ADMIN,te.BEHAVIOR_DATA_USER],[te.GENERATIVE_AI_EXPORT_USER]:[te.GENERATIVE_AI_USER]};function ul(t,e){return t===e||(sd[t]??[]).some(i=>ul(i,e))}function Wn(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(r=>ul(r,e))}function dl(t,...e){return t==null?!1:e.some(i=>Wn(t,i))}var Mr=f(E());var Kn=f(E());var kt=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=P.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=P.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var ei=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:kt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):kt.await()}};var Le=class extends ei{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new Kn.CacheRegistry,this.cache=e?n.commonCache:new Kn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var kr=class extends Le{async listMySearches(){let{session:e}=P.getState();return Wn(e,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Dr=class extends Le{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Nr=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var Ir=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var ad="ft-user-assets",ld={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(Me).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;qn(t,i,[...Gn(t,i),n]),pl(t,i,1,r),fl(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;qn(t,i,Gn(t,i).map(n=>n.id===r.id?r:n)),fl(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;qn(t,i,Gn(t,i).filter(o=>o.id!==n)),pl(t,i,-1,r)}},hl={[Me.SEARCHES]:"savedSearches",[Me.BOOKMARKS]:"bookmarks",[Me.BOOKS]:void 0,[Me.COLLECTIONS]:void 0},Gn=(t,e)=>{var i;let r=hl[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},qn=(t,e,i)=>{let r=hl[e];r&&(t[r]=i)},pl=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===Me.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},fl=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},xe=Mr.FtReduxStore.get({name:ad,reducers:ld,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Me).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Yn=class{constructor(e=new Nr,i=new Ir){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Dr,this.savedSearchesService=new kr,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=P.getState();(0,Mr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),xe.actions.clearAssetCount(),xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();xe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();xe.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&xe.getState().assetCounts.allAsset[e]!==i.count&&xe.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&xe.getState().assetCounts.bookmarkByMap[e]!==i.count&&xe.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys(xe.getState().assetCounts.bookmarkByMap).length!==0;e===Me.BOOKMARKS&&i&&xe.actions.clearBookmarkCountByMap(),xe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xe.actions.bookmarks(i)}}},cd=new Yn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cd);var Xn=class{addCommand(e,i=!1){P.commands.add(e,i)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Xn;var $e=f(E());var ml,ti=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ud=Symbol("clearAfterUnitTest"),$r=class extends(0,$e.withEventBus)(Le){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ml]=()=>{this.defaultMessages={},this.cache=new $e.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,$e.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new $e.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof $e.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new ti({loadedContexts:e})),this.dispatchEvent(new ti({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new ti({loadedContexts:[e]})),this.dispatchEvent(new ti({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,$e.delay)(0).then(()=>r()).catch(()=>null)))}};ml=ud;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $r{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $r{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ii=window.FluidTopicsI18nService,Ur=window.FluidTopicsCustomI18nService;var gl=f(E()),Zn=class{highlightHtml(e,i,r){(0,gl.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new Zn;var yl=f(E());var Jn=class{isDate(e){var i,r,n,o;return(o=(r=((n=(i=P.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||r===void 0?void 0:r.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return yl.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:P.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Jn;var bl=f(E());var Di=class{static get(e,i,{baseUrl:r,localesConfiguration:n,availableContentLocales:o}=P.getState()){var s;if(i==="all"&&n?.allLanguagesAllowed)i=void 0;else if(!i||o.length>0&&!o.some(a=>a.lang===i)){let a=n?.defaultLocales.defaultContentLocale;i=a?`${a.lang}-${a.region}`:(s=o[0])===null||s===void 0?void 0:s.lang}return new bl.SearchPlaceConverter(r,e??20,n?.allLanguagesAllowed,i,o)}};var Qn=class{urlToSearchRequest(e){return Di.get().parse(e)}searchRequestToUrl(e){return Di.get().serialize(e)}};window.FluidTopicsUrlService=new Qn;var nt=f(E());var Dt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Dt.eventName="before-location-change";var Nt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Nt.eventName="change";var eo=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},xl=new eo;var Fr=class t extends nt.WithEventBus{static build(){return new t(window.history,xl,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,nt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),c=new Dt(l);this.dispatchEvent(c);let u=i(),d={...u===this.currentIndex?this.currentState:void 0,...o,index:u,href:c.detail.nextLocation.href};r.apply(n,[d,s,d.href]),this.setCurrentState(d,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.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(e){for(let i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addBeforeLocationChangeListener(e){this.addEventListener(Dt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Dt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Nt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Nt.eventName,e)}currentItem(){return(0,nt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,nt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,nt.deepCopy)(i.find(r=>e(r)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,nt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var vl=f(j());var Sl=vl.css`
|
|
575
575
|
`;var _l=f(j()),ve=f(re()),Mt=f(E());var Je=f(E());function El(t,e){let{authenticationRequired:i,session:r}=P.getState();return i&&!r?.sessionAuthenticated?Promise.resolve(e):t()}var Vr=class extends ei{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var to=class t extends Je.FtStateManager{static build(e){return new t(P,e)}constructor(e,i){super(),this.store=e,this.cache=new Je.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Vr,this.knownContexts=new Je.AbstractRegistry,this.knownCustomComponents=new Je.AbstractRegistry,this.cleanSessionDebouncer=new Je.Debouncer,this.reloadConfiguration=()=>{var r;(r=this.cache)===null||r===void 0||r.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Je.Debouncer(500),this.apiProvider=i??(()=>kt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Pt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Pt.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 e=await this.cache.get("session",async()=>{let i=await this.apiProvider().getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},i.idleTimeoutInMillis),i});this.setSession(e)}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 e;let i=await this.cache.get("availableContentLocales",()=>El(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=i.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,i){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:i}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new ki(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return dl(P.getState().session,...e)}},Al=to.build();var It=class extends Event{constructor(e,i,r,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i,this.callback=r,this.subscribe=n??!1}};var Ni=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let i=this.pendingContextRequests.get(e.context);if(i===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:r}=i;for(let{elementRef:n,callbackRef:o}of r){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new It(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let i=e.contextTarget??e.composedPath()[0],r=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(i);o===void 0&&n.callbacks.set(i,o=new WeakSet),o.has(r)||(o.add(r),n.requests.push({elementRef:new WeakRef(i),callbackRef:new WeakRef(r)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var ae=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},G=class extends Mt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Al,this.contextRoot=new Ni}render(){return _l.html`
|
|
576
576
|
<slot></slot>
|
|
577
577
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var i;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>ii.addContext(r)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((i=this.stateManager)===null||i===void 0||i.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};G.elementDefinitions={};G.styles=Sl;ae([(0,ve.property)()],G.prototype,"baseUrl",void 0);ae([(0,ve.property)()],G.prototype,"tenantId",void 0);ae([(0,ve.property)()],G.prototype,"apiIntegrationIdentifier",void 0);ae([(0,ve.property)()],G.prototype,"apiIntegrationAppVersion",void 0);ae([(0,ve.property)()],G.prototype,"uiLocale",void 0);ae([(0,Mt.jsonProperty)(null)],G.prototype,"availableUiLocales",void 0);ae([(0,Mt.jsonProperty)(null)],G.prototype,"metadataConfiguration",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"editorMode",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"noCustom",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"openExternalDocumentInNewTab",void 0);ae([(0,ve.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],G.prototype,"noCustomComponent",void 0);ae([(0,ve.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],G.prototype,"noCustomCode",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"withManualResources",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"navigatorOnline",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"forcedOffline",void 0);ae([(0,ve.property)({type:Boolean})],G.prototype,"authenticationRequired",void 0);ae([(0,Mt.jsonProperty)([])],G.prototype,"messageContexts",void 0);ae([(0,Mt.jsonProperty)(void 0)],G.prototype,"session",void 0);var wl=f(E());var Cl={"ft-app-context":G};(0,wl.customElements)(Cl);var ri=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Ur:ii}constructor(e,i=!1){this.name=e,this.custom=i,this.properties=new Proxy({},{get:(r,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(r,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(r,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(r,n)=>()=>n}),this.attributes=new Proxy({},{get:(r,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var oi=f(E());var Tl=f(re());var io=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[i,r]=e.split(".");return{context:i,key:r,custom:i!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},ni=new io;var fd=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Mi=Symbol("i18nAttributes"),Ol=Symbol("i18nListAttributes"),Rl=Symbol("i18nProperties"),Br=Symbol("i18nContexts"),Ii=Symbol("i18nUnsubs"),si=(0,oi.applyMixinOnce)(Symbol("withI18n"),function(t){var e,i;class r extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[i]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?Ur:ii}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(ni.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Mi])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Ol])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(g=>c(u,d,g))})}updateI18nProperties(o){var s;(s=this[Rl])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Br].set(l,{isCustomContext:a}),this[Ii].has(l)||this[Ii].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Br].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Br].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ii].forEach(o=>o()),this[Ii].clear()}}return e=Br,i=Ii,fd([(0,Tl.property)({type:Boolean})],r.prototype,"useCustomMessageContexts",void 0),r}),Hr=class extends si(oi.FtLitElement){},zr=class extends si(oi.FtLitElementRedux){};var Ll=f(j());var Pl=Ll.css`
|