@fluid-topics/ft-reader-page-title 2.0.33 → 2.0.34

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.
@@ -123,7 +123,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ftds-con
123
123
  </${Fe(this.element)}>
124
124
  `:Me`
125
125
  <slot part="text" class="ftds-typography ftds-typography--${this.variant}"></slot>
126
- `}};Ee.styles=[...Sn];Cn([(0,Lr.property)()],Ee.prototype,"element",void 0);Cn([(0,Lr.property)()],Ee.prototype,"variant",void 0);var En=A(D());var An={"ft-typography":se,"ftds-typography":Ee};(0,En.customElements)(An);var ro=A(Z());var wn=A(Z(),1);var kr=r=>t=>{window.customElements.get(r)||window.customElements.define(r,t)};function In(r,t){return(0,wn.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return pt(r);try{return JSON.parse(o)}catch{return pt(r)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ht,...t??{}})}function Ki(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Pt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Pt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Pt(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Pt(r,t){try{return Ki(r,t)}catch{return!1}}function ht(r,t){return!Pt(r,t)}function pt(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function _t(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var Rn=A(Z(),1);var Pr=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:ht,attribute:!1,...t};(0,Rn.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Nt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var we=A(Z(),1);var Dt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ln=A(ee(),1);var Ut=globalThis,Vi=Ut.ShadowRoot&&(Ut.ShadyCSS===void 0||Ut.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Tn=(r,t)=>{if(Vi)r.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),i=Ut.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Ft=class extends Ln.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Tn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){kr(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function kn(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Xe=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Dn,Pn=Symbol("constructorPrototype"),_n=Symbol("constructorName"),Un=Symbol("exportpartsDebouncer"),Nn=Symbol("dynamicDependenciesLoaded"),Ye=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Ye.eventName="exportparts-updated";var oe=class extends Ft{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Dn]=new Dt(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Un].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[_n]=this.constructor.name,this[Pn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[_n]&&Object.setPrototypeOf(this,this[Pn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Nn]||(o[Nn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ye.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ye.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Ye)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=kn(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,l,d;let u=g=>g!=null&&g.trim().length>0,f=t.filter(u).map(g=>g.trim());if(f.length===0){this.exportparts=void 0;return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(g=>f.map(v=>`${g}:${v}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};Dn=Un;Xe([(0,we.property)()],oe.prototype,"exportpartsPrefix",void 0);Xe([In([])],oe.prototype,"exportpartsPrefixes",void 0);Xe([(0,we.property)({reflect:!0})],oe.prototype,"exportparts",void 0);Xe([(0,we.property)()],oe.prototype,"customStylesheet",void 0);Xe([(0,we.property)()],oe.prototype,"elementToFocus",void 0);Xe([(0,we.state)()],oe.prototype,"useAdoptedStyleSheets",void 0);function Mt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var yt=Symbol("internalReduxEventsUnsubscribers"),pe=Symbol("internalStoresUnsubscribers"),Ie=Symbol("internalStores"),Zi=_t(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ie].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ie].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ie].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ie].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ie].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let f=this.getStore(l.store);f&&(l.store?this[pe].has(l.store):this[pe].size>0)&&(this[d]=l.selector(f.getState(),this))}})}subscribeToStore(l,d){var u;this[pe].set(l,d.subscribe(()=>this.updateFromStores())),this[yt].set(l,[]),Mt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let y=g=>this[h](g);d.addEventListener(f.eventName,y),this[yt].get(l).push(()=>d.removeEventListener(f.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[pe].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[pe].has(l)&&this[pe].get(l)(),this[pe].delete(l),(d=this[yt].get(l))===null||d===void 0||d.forEach(u=>u()),this[yt].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=pe,o=Ie,n=yt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Fn=class extends Zi(oe){};function Y(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[_]}function te(r){var t;return!!r&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===rs})(r)||Array.isArray(r)||!!r[jn]||!!(!((t=r.constructor)===null||t===void 0)&&t[jn])||zr(r)||Gr(r))}function Re(r,t,o){o===void 0&&(o=!1),et(r)===0?(o?Object.keys:Qe)(r).forEach((function(n){o&&typeof n=="symbol"||t(n,r[n],r)})):r.forEach((function(n,i){return t(i,n,r)}))}function et(r){var t=r[_];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:zr(r)?2:Gr(r)?3:0}function Je(r,t){return et(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function qi(r,t){return et(r)===2?r.get(t):r[t]}function $n(r,t,o){var n=et(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Kn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function zr(r){return es&&r instanceof Map}function Gr(r){return ts&&r instanceof Set}function he(r){return r.o||r.t}function Wr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=qn(r);delete t[_];for(var o=Qe(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function jr(r,t){return t===void 0&&(t=!1),$r(r)||le(r)||!te(r)||(et(r)>1&&(r.set=r.add=r.clear=r.delete=Yi),Object.freeze(r),t&&Re(r,(function(o,n){return jr(n,!0)}),!0)),r}function Yi(){Y(2)}function $r(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ne(r){var t=Hr[r];return t||Y(18,r),t}function Xi(r,t){Hr[r]||(Hr[r]=t)}function Fr(){return mt}function _r(r,t){t&&(ne("Patches"),r.u=[],r.s=[],r.v=t)}function Bt(r){Mr(r),r.p.forEach(Ji),r.p=null}function Mr(r){r===mt&&(mt=r.l)}function Mn(r){return mt={p:[],l:mt,h:r,m:!0,_:0}}function Ji(r){var t=r[_];t.i===0||t.i===1?t.j():t.g=!0}function Nr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ne("ES5").S(t,r,n),n?(o[_].P&&(Bt(t),Y(4)),te(r)&&(r=Ht(t,r),t.l||zt(t,r)),t.u&&ne("Patches").M(o[_].t,r,t.u,t.s)):r=Ht(t,o,[]),Bt(t),t.u&&t.v(t.u,t.s),r!==Zn?r:void 0}function Ht(r,t,o){if($r(t))return t;var n=t[_];if(!n)return Re(t,(function(d,u){return Bn(r,n,t,d,u,o)}),!0),t;if(n.A!==r)return t;if(!n.P)return zt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Wr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Re(s,(function(d,u){return Bn(r,n,i,d,u,o,l)})),zt(r,i,!1),o&&r.u&&ne("Patches").N(n,o,r.u,r.s)}return n.o}function Bn(r,t,o,n,i,s,l){if(le(i)){var d=Ht(r,i,s&&t&&t.i!==3&&!Je(t.R,n)?s.concat(n):void 0);if($n(o,n,d),!le(d))return;r.m=!1}else l&&o.add(i);if(te(i)&&!$r(i)){if(!r.h.D&&r._<1)return;Ht(r,i),t&&t.A.l||zt(r,i)}}function zt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&jr(t,o)}function Dr(r,t){var o=r[_];return(o?he(o):r)[t]}function Hn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ye(r){r.P||(r.P=!0,r.l&&ye(r.l))}function Ur(r){r.o||(r.o=Wr(r.t))}function Br(r,t,o){var n=zr(t)?ne("MapSet").F(t,o):Gr(t)?ne("MapSet").T(t,o):r.O?(function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:Fr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,f=bt;l&&(u=[d],f=gt);var h=Proxy.revocable(u,f),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g})(t,o):ne("ES5").J(t,o);return(o?o.A:Fr()).p.push(n),n}function Qi(r){return le(r)||Y(22,r),(function t(o){if(!te(o))return o;var n,i=o[_],s=et(o);if(i){if(!i.P&&(i.i<4||!ne("ES5").K(i)))return i.t;i.I=!0,n=zn(o,s),i.I=!1}else n=zn(o,s);return Re(n,(function(l,d){i&&qi(i.t,l)===d||$n(n,l,t(d))})),s===3?new Set(n):n})(r)}function zn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Wr(r)}function Vn(){function r(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var f=this[_];return bt.get(f,l)},set:function(f){var h=this[_];bt.set(h,l,f)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][_];if(!u.P)switch(u.i){case 5:n(u)&&ye(u);break;case 4:o(u)&&ye(u)}}}function o(l){for(var d=l.t,u=l.k,f=Qe(u),h=f.length-1;h>=0;h--){var y=f[h];if(y!==_){var g=d[y];if(g===void 0&&!Je(d,y))return!0;var v=u[y],b=v&&v[_];if(b?b.t!==g:!Kn(v,g))return!0}}var S=!!d[_];return f.length!==Qe(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Y(3,JSON.stringify(he(l)))}var s={};Xi("ES5",{J:function(l,d){var u=Array.isArray(l),f=(function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=qn(g);delete S[_];for(var w=Qe(S),I=0;I<w.length;I++){var R=w[I];S[R]=r(R,y||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(g),S)})(u,l),h={i:u?5:4,A:d?d.A:Fr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,_,{value:h,writable:!0}),f},S:function(l,d,u){u?le(d)&&d[_].A===l&&t(l.p):(l.u&&(function f(h){if(h&&typeof h=="object"){var y=h[_];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Re(v,(function(L){L!==_&&(g[L]!==void 0||Je(g,L)?b[L]||f(v[L]):(b[L]=!0,ye(y)))})),Re(g,(function(L){v[L]!==void 0||Je(v,L)||(b[L]=!1,ye(y))}));else if(S===5){if(n(y)&&(ye(y),b.length=!0),v.length<g.length)for(var w=v.length;w<g.length;w++)b[w]=!1;else for(var I=g.length;I<v.length;I++)b[I]=!0;for(var R=Math.min(v.length,g.length),P=0;P<R;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&f(v[P])}}}})(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Gn,mt,Kr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",es=typeof Map<"u",ts=typeof Set<"u",Wn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zn=Kr?Symbol.for("immer-nothing"):((Gn={})["immer-nothing"]=!0,Gn),jn=Kr?Symbol.for("immer-draftable"):"__$immer_draftable",_=Kr?Symbol.for("immer-state"):"__$immer_state";var rs=""+Object.prototype.constructor,Qe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(r){var t={};return Qe(r).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)})),t},Hr={},bt={get:function(r,t){if(t===_)return r;var o=he(r);if(!Je(o,t))return(function(i,s,l){var d,u=Hn(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0})(r,o,t);var n=o[t];return r.I||!te(n)?n:n===Dr(r.t,t)?(Ur(r),r.o[t]=Br(r.A.h,n,r)):n},has:function(r,t){return t in he(r)},ownKeys:function(r){return Reflect.ownKeys(he(r))},set:function(r,t,o){var n=Hn(he(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Dr(he(r),t),s=i?.[_];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Kn(o,i)&&(o!==void 0||Je(r.t,t)))return!0;Ur(r),ye(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Dr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Ur(r),ye(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=he(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Y(12)}},gt={};Re(bt,(function(r,t){gt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gt.deleteProperty=function(r,t){return gt.set.call(this,r,t,void 0)},gt.set=function(r,t,o){return bt.set.call(this,r[0],t,o,r[0])};var os=(function(){function r(o){var n=this;this.O=Wn,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var I=arguments.length,R=Array(I>1?I-1:0),P=1;P<I;P++)R[P-1]=arguments[P];return u.produce(S,(function(L){var B;return(B=s).call.apply(B,[w,L].concat(R))}))}}var f;if(typeof s!="function"&&Y(6),l!==void 0&&typeof l!="function"&&Y(7),te(i)){var h=Mn(n),y=Br(n,i,void 0),g=!0;try{f=s(y),g=!1}finally{g?Bt(h):Mr(h)}return typeof Promise<"u"&&f instanceof Promise?f.then((function(S){return _r(h,l),Nr(S,h)}),(function(S){throw Bt(h),S})):(_r(h,l),Nr(f,h))}if(!i||typeof i!="object"){if((f=s(i))===void 0&&(f=i),f===Zn&&(f=void 0),n.D&&jr(f,!0),l){var v=[],b=[];ne("Patches").M(i,f,v,b),l(v,b)}return f}Y(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(f){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(f,(function(v){return i.apply(void 0,[v].concat(y))}))};var l,d,u=n.produce(i,s,(function(f,h){l=f,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(f){return[f,l,d]})):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){te(o)||Y(8),le(o)&&(o=Qi(o));var n=Mn(this),i=Br(this,o,void 0);return i[_].C=!0,Mr(n),i},t.finishDraft=function(o,n){var i=o&&o[_],s=i.A;return _r(s,n),Nr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Wn&&Y(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=ne("Patches").$;return le(o)?l(o,n):this.produce(o,(function(d){return l(d,n)}))},r})(),j=new os,ns=j.produce,pp=j.produceWithPatches.bind(j),hp=j.setAutoFreeze.bind(j),yp=j.setUseProxies.bind(j),gp=j.applyPatches.bind(j),mp=j.createDraft.bind(j),bp=j.finishDraft.bind(j),Gt=ns;function Te(r){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(r)}function Yn(r,t){if(Te(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Te(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Xn(r){var t=Yn(r,"string");return Te(t)=="symbol"?t:t+""}function Jn(r,t,o){return(t=Xn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Qn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Vr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Qn(Object(o),!0).forEach(function(n){Jn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Qn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var ea=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Zr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wt={INIT:"@@redux/INIT"+Zr(),REPLACE:"@@redux/REPLACE"+Zr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zr()}};function as(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function qr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(qr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,s=t,l=[],d=l,u=!1;function f(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(z(3));return s}function y(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var w=!0;return f(),d.push(S),function(){if(w){if(u)throw new Error(z(6));w=!1,f();var R=d.indexOf(S);d.splice(R,1),l=null}}}function g(S){if(!as(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=l=d,I=0;I<w.length;I++){var R=w[I];R()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,g({type:Wt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(z(11));function P(){R.next&&R.next(h())}P();var L=w(P);return{unsubscribe:L}}},S[ea]=function(){return this},S}return g({type:Wt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[ea]=b,n}function is(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Wt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Wt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function ta(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{is(o)}catch(u){d=u}return function(f,h){if(f===void 0&&(f={}),d)throw d;if(0)var y;for(var g=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],I=f[S],R=w(I,h);if(typeof R>"u"){var P=h&&h.type;throw new Error(z(14))}v[S]=R,g=g||R!==I}return g=g||s.length!==Object.keys(f).length,g?v:f}}function tt(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ra(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return s=tt.apply(void 0,d)(i.dispatch),Vr(Vr({},i),{},{dispatch:s})}}}function oa(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var na=oa();na.withExtraArgument=oa;var Yr=na;var la=(function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),ss=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(h){return u([f,h])}}function u(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=f[0]&2?i.return:f[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,f[1])).done)return s;switch(i=0,s&&(f=[f[0]&2,s.value]),f[0]){case 0:case 1:s=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){o.label=f[1];break}if(f[0]===6&&o.label<s[1]){o.label=s[1],s=f;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(f);break}s[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(r,o)}catch(h){f=[6,h],i=0}finally{n=s=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},rt=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},cs=Object.defineProperty,ls=Object.defineProperties,ds=Object.getOwnPropertyDescriptors,aa=Object.getOwnPropertySymbols,us=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,ia=function(r,t,o){return t in r?cs(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ge=function(r,t){for(var o in t||(t={}))us.call(t,o)&&ia(r,o,t[o]);if(aa)for(var n=0,i=aa(t);n<i.length;n++){var o=i[n];fs.call(t,o)&&ia(r,o,t[o])}return r},Xr=function(r,t){return ls(r,ds(t))},ps=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(f){i(f)}},l=function(u){try{d(o.throw(u))}catch(f){i(f)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(r,t)).next())})};var hs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?tt:tt.apply(null,arguments)},Up=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function ys(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function me(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ge(ge({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}var gs=(function(r){la(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,rt([void 0],o[0].concat(this)))):new(t.bind.apply(t,rt([void 0],o.concat(this))))},t})(Array),ms=(function(r){la(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,rt([void 0],o[0].concat(this)))):new(t.bind.apply(t,rt([void 0],o.concat(this))))},t})(Array);function eo(r){return te(r)?Gt(r,function(){}):r}function bs(r){return typeof r=="boolean"}function xs(){return function(t){return vs(t)}}function vs(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=r.actionCreatorCheck,u=d===void 0?!0:d,f=new gs;if(o&&(bs(o)?f.push(Yr):f.push(Yr.withExtraArgument(o.extraArgument))),0){if(i)var h;if(l)var y;if(u)var g}return f}var Jr=!0;function da(r){var t=xs(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,f=o.preloadedState,h=f===void 0?void 0:f,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(ys(i))v=ta(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Jr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Jr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=ra.apply(void 0,b),w=tt;u&&(w=hs(ge({trace:!Jr},typeof u=="object"&&u)));var I=new ms(S),R=I;Array.isArray(g)?R=rt([S],g):typeof g=="function"&&(R=g(I));var P=w.apply(void 0,R);return qr(v,h,P)}function ua(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function Ss(r){return typeof r=="function"}function Cs(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?ua(t):[t,o,n],s=i[0],l=i[1],d=i[2],u;if(Ss(r))u=function(){return eo(r())};else{var f=eo(r);u=function(){return f}}function h(y,g){y===void 0&&(y=u());var v=rt([s[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var w=b,I=S(w,g);return I===void 0?b:I}else{if(te(b))return Gt(b,function(R){return S(R,g)});var I=S(b,g);if(I===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return b},y)}return h.getInitialState=u,h}function Os(r,t){return r+"/"+t}function fa(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:eo(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],g=Os(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[g]=v,d[h]=b?me(g,b):me(g)});function u(){var h=typeof r.extraReducers=="function"?ua(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,I=ge(ge({},g),l);return Cs(o,function(R){for(var P in I)R.addCase(P,I[P]);for(var L=0,B=b;L<B.length;L++){var Q=B[L];R.addMatcher(Q.matcher,Q.reducer)}w&&R.addDefaultCase(w)})}var f;return{name:t,reducer:function(h,y){return f||(f=u()),f(h,y)},actions:d,caseReducers:s,getInitialState:function(){return f||(f=u()),f.getInitialState()}}}var As="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Es=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=As[Math.random()*64|0];return t},ws=["name","message","stack","code"],Qr=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),sa=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),Is=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ws;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Hp=(function(){function r(t,o,n){var i=me(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Xr(ge({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(h,y,g){return{payload:void 0,meta:Xr(ge({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=me(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||Is)(h||"Rejected"),meta:Xr(ge({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function f(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):Es(),S=new u,w,I=!1;function R(L){w=L,S.abort()}var P=(function(){return ps(this,null,function(){var L,B,Q,xe,W,ve,Ne;return ss(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),xe=(L=n?.condition)==null?void 0:L.call(n,h,{getState:g,extra:v}),Ts(xe)?[4,xe]:[3,2];case 1:xe=p.sent(),p.label=2;case 2:if(xe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,W=new Promise(function(m,O){return S.signal.addEventListener("abort",function(){return O({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([W,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(m,O){return new Qr(m,O)},fulfillWithValue:function(m,O){return new sa(m,O)}})).then(function(m){if(m instanceof Qr)throw m;return m instanceof sa?i(m.payload,b,h,m.meta):i(m,b,h)})])];case 3:return Q=p.sent(),[3,5];case 4:return ve=p.sent(),Q=ve instanceof Qr?l(null,b,h,ve.payload,ve.meta):l(ve,b,h),[3,5];case 5:return Ne=n&&!n.dispatchConditionRejection&&l.match(Q)&&Q.meta.condition,Ne||y(Q),[2,Q]}})})})();return Object.assign(P,{abort:R,requestId:b,arg:h,unwrap:function(){return P.then(Rs)}})}}return Object.assign(f,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r})();function Rs(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ts(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var pa="listener",ha="completed",ya="cancelled",zp="task-"+ya,Gp="task-"+ha,Wp=pa+"-"+ya,jp=pa+"-"+ha;var to="listenerMiddleware";var $p=me(to+"/add"),Kp=me(to+"/removeAll"),Vp=me(to+"/remove");var ca,Zp=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(ca||(ca=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ls=function(r){return function(t){setTimeout(t,r)}},qp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ls(10);Vn();var ks=_t(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),jt=class extends ks(Object){};window.ftReduxStores||(window.ftReduxStores={});var ga=class r extends jt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Mt(s))return s;if(i==null)return;let l=fa({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=da({reducer:(u,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=pt(l.getInitialState());for(let y of f.keeping)h[y]=(u??h)[y];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...f.overwrites};return l.reducer(u,f)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Nt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,f=s[u];return f?(...h)=>{let y=f(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var $t=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let l=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(l),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(l);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Kt=A(D()),Ps="ft-app-info",ot=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};ot.eventName="authentication-change";var xt=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};xt.eventName="ui-locale-changed";var _s={session:(r,t)=>{(0,Kt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>E.dispatchEvent(new ot(t.payload)),0))}},E=Kt.FtReduxStore.get({name:Ps,reducers:_s,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ma=A(D()),Vt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Oh=(0,ma.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>$t.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Vt([(0,ro.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Vt([(0,ro.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Vt([Pr({store:E.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Vt([Pr({store:E.name})],t.prototype,"uiLocale",void 0),t});var Ds=A(xa(),1);var va;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(va||(va={}));var Sa;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(Sa||(Sa={}));var Ca;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Oa||(Oa={}));var Aa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Aa||(Aa={}));var Ea;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Ea||(Ea={}));var wa;(function(r){r.OFFICIAL="OFFICIAL",r.AI="AI"})(wa||(wa={}));var Ia;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Ia||(Ia={}));var Ra;(function(r){r.STANDARD="STANDARD",r.STRUCTURAL="STRUCTURAL"})(Ra||(Ra={}));var Ta;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(Ta||(Ta={}));var La;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(La||(La={}));var ka;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(ka||(ka={}));var Pa;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Pa||(Pa={}));var _a;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_a||(_a={}));var Na;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Na||(Na={}));var Da;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Da||(Da={}));var Ua;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(Ua||(Ua={}));var Fa;(function(r){r.ASC="ASC",r.DESC="DESC"})(Fa||(Fa={}));var Ma;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Ma||(Ma={}));var Ba;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Ba||(Ba={}));var Ha;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ha||(Ha={}));var za;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(za||(za={}));var Ga;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ga||(Ga={}));var Wa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Wa||(Wa={}));var ja;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ja||(ja={}));var $a;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($a||($a={}));var Ka;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ka||(Ka={}));var F;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(F||(F={}));var X;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(X||(X={}));var Va;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(Va||(Va={}));var Za;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Za||(Za={}));var qa;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(qa||(qa={}));var Ya;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ya||(Ya={}));var Xa;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Xa||(Xa={}));var Ja;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Ja||(Ja={}));var Qa;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Qa||(Qa={}));var ei;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(ei||(ei={}));var ti;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(ti||(ti={}));var ri;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var Ns={[F.PERSONAL_BOOK_SHARE_USER]:[F.PERSONAL_BOOK_USER],[F.HTML_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.PDF_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.KHUB_ADMIN]:[F.CONTENT_PUBLISHER],[F.ADMIN]:[F.KHUB_ADMIN,F.USERS_ADMIN,F.PORTAL_ADMIN,F.BEHAVIOR_DATA_USER],[F.GENERATIVE_AI_EXPORT_USER]:[F.GENERATIVE_AI_USER]};function oi(r,t){return r===t||(Ns[r]??[]).some(o=>oi(o,t))}function ni(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>oi(n,t))}var er=A(D());var oo=A(D());var Le=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=E.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=E.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var at=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Le.await()}};var $=class extends at{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new oo.CacheRegistry,this.cache=t?i.commonCache:new oo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Yt=class extends ${async listMySearches(){let{session:t}=E.getState();return ni(t,F.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Xt=class extends ${async listMyBookmarks(){let t=E.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=E.getState().session;return!!t?.sessionAuthenticated}};var Qt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=E.getState().session;return!!t?.sessionAuthenticated}};var Us="ft-user-assets",Fs={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(X).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;ao(r,o,[...no(r,o),i]),ai(r,o,1,n),ii(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;ao(r,o,no(r,o).map(i=>i.id===n.id?n:i)),ii(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;ao(r,o,no(r,o).filter(s=>s.id!==i)),ai(r,o,-1,n)}},si={[X.SEARCHES]:"savedSearches",[X.BOOKMARKS]:"bookmarks",[X.BOOKS]:void 0,[X.COLLECTIONS]:void 0},no=(r,t)=>{var o;let n=si[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},ao=(r,t,o)=>{let n=si[t];n&&(r[n]=o)},ai=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===X.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},ii=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=er.FtReduxStore.get({name:Us,reducers:Fs,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(X).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),io=class{constructor(t=new Jt,o=new Qt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Xt,this.savedSearchesService=new Yt,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=E.getState();(0,er.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),K.actions.clearAssetCount(),K.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),K.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),K.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();K.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();K.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===X.BOOKMARKS&&o&&K.actions.clearBookmarkCountByMap(),K.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},Ms=new io;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ms);var so=class{addCommand(t,o=!1){E.commands.add(t,o)}consumeCommand(t){return E.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new so;var J=A(D());var ci,it=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Bs=Symbol("clearAfterUnitTest"),tr=class extends(0,J.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ci]=()=>{this.defaultMessages={},this.cache=new J.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=E.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,J.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new J.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof J.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new it({loadedContexts:t})),this.dispatchEvent(new it({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new it({loadedContexts:[t]})),this.dispatchEvent(new it({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,J.delay)(0).then(()=>n()).catch(()=>null)))}};ci=Bs;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var st=window.FluidTopicsI18nService,rr=window.FluidTopicsCustomI18nService;var li=A(D()),co=class{highlightHtml(t,o,n){(0,li.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new co;var di=A(D());var lo=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=E.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,l;if(t==null)return"";try{return di.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:E.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(l=o?.onlyTime)!==null&&l!==void 0?l:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new lo;var ui=A(D());var vt=class{static get(t,o){var n,i;let s=E.getState(),{lang:l,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ui.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var uo=class{urlToSearchRequest(t){return vt.get().parse(t)}searchRequestToUrl(t){return vt.get().serialize(t)}};window.FluidTopicsUrlService=new uo;var de=A(D());var ke=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};ke.eventName="change";var fo=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},fi=new fo;var or=class r extends de.WithEventBus{static build(){return new r(window.history,fi,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ke(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let u=o(),f={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[f,l,d]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(ke.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ke.eventName,t)}currentItem(){return(0,de.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,de.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var pi=A(ee());var hi=pi.css`
126
+ `}};Ee.styles=[...Sn];Cn([(0,Lr.property)()],Ee.prototype,"element",void 0);Cn([(0,Lr.property)()],Ee.prototype,"variant",void 0);var En=A(D());var An={"ft-typography":se,"ftds-typography":Ee};(0,En.customElements)(An);var ro=A(Z());var wn=A(Z(),1);var kr=r=>t=>{window.customElements.get(r)||window.customElements.define(r,t)};function In(r,t){return(0,wn.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return pt(r);try{return JSON.parse(o)}catch{return pt(r)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ht,...t??{}})}function Ki(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Pt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Pt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let i=l=>Object.keys(l).filter(d=>l[d]!=null),s=i(r);if(o=s.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){let l=s[n];if(!Pt(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Pt(r,t){try{return Ki(r,t)}catch{return!1}}function ht(r,t){return!Pt(r,t)}function pt(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function _t(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var Rn=A(Z(),1);var Pr=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:ht,attribute:!1,...t};(0,Rn.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Nt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var we=A(Z(),1);var Dt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ln=A(ee(),1);var Ut=globalThis,Vi=Ut.ShadowRoot&&(Ut.ShadyCSS===void 0||Ut.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Tn=(r,t)=>{if(Vi)r.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),i=Ut.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Ft=class extends Ln.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Tn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){kr(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function kn(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Xe=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Dn,Pn=Symbol("constructorPrototype"),_n=Symbol("constructorName"),Un=Symbol("exportpartsDebouncer"),Nn=Symbol("dynamicDependenciesLoaded"),Ye=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Ye.eventName="exportparts-updated";var oe=class extends Ft{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Dn]=new Dt(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Un].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[_n]=this.constructor.name,this[Pn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[_n]&&Object.setPrototypeOf(this,this[Pn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Nn]||(o[Nn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ye.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ye.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Ye)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=kn(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,l,d;let u=g=>g!=null&&g.trim().length>0,f=t.filter(u).map(g=>g.trim());if(f.length===0){this.exportparts=void 0;return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(g=>f.map(v=>`${g}:${v}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};Dn=Un;Xe([(0,we.property)()],oe.prototype,"exportpartsPrefix",void 0);Xe([In([])],oe.prototype,"exportpartsPrefixes",void 0);Xe([(0,we.property)({reflect:!0})],oe.prototype,"exportparts",void 0);Xe([(0,we.property)()],oe.prototype,"customStylesheet",void 0);Xe([(0,we.property)()],oe.prototype,"elementToFocus",void 0);Xe([(0,we.state)()],oe.prototype,"useAdoptedStyleSheets",void 0);function Mt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var yt=Symbol("internalReduxEventsUnsubscribers"),pe=Symbol("internalStoresUnsubscribers"),Ie=Symbol("internalStores"),Zi=_t(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ie].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ie].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ie].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ie].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ie].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let f=this.getStore(l.store);f&&(l.store?this[pe].has(l.store):this[pe].size>0)&&(this[d]=l.selector(f.getState(),this))}})}subscribeToStore(l,d){var u;this[pe].set(l,d.subscribe(()=>this.updateFromStores())),this[yt].set(l,[]),Mt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let y=g=>this[h](g);d.addEventListener(f.eventName,y),this[yt].get(l).push(()=>d.removeEventListener(f.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[pe].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[pe].has(l)&&this[pe].get(l)(),this[pe].delete(l),(d=this[yt].get(l))===null||d===void 0||d.forEach(u=>u()),this[yt].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=pe,o=Ie,n=yt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Fn=class extends Zi(oe){};function Y(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[_]}function te(r){var t;return!!r&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===rs})(r)||Array.isArray(r)||!!r[jn]||!!(!((t=r.constructor)===null||t===void 0)&&t[jn])||zr(r)||Gr(r))}function Re(r,t,o){o===void 0&&(o=!1),et(r)===0?(o?Object.keys:Qe)(r).forEach((function(n){o&&typeof n=="symbol"||t(n,r[n],r)})):r.forEach((function(n,i){return t(i,n,r)}))}function et(r){var t=r[_];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:zr(r)?2:Gr(r)?3:0}function Je(r,t){return et(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function qi(r,t){return et(r)===2?r.get(t):r[t]}function $n(r,t,o){var n=et(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Kn(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function zr(r){return es&&r instanceof Map}function Gr(r){return ts&&r instanceof Set}function he(r){return r.o||r.t}function Wr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=qn(r);delete t[_];for(var o=Qe(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function jr(r,t){return t===void 0&&(t=!1),$r(r)||le(r)||!te(r)||(et(r)>1&&(r.set=r.add=r.clear=r.delete=Yi),Object.freeze(r),t&&Re(r,(function(o,n){return jr(n,!0)}),!0)),r}function Yi(){Y(2)}function $r(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ne(r){var t=Hr[r];return t||Y(18,r),t}function Xi(r,t){Hr[r]||(Hr[r]=t)}function Fr(){return mt}function _r(r,t){t&&(ne("Patches"),r.u=[],r.s=[],r.v=t)}function Bt(r){Mr(r),r.p.forEach(Ji),r.p=null}function Mr(r){r===mt&&(mt=r.l)}function Mn(r){return mt={p:[],l:mt,h:r,m:!0,_:0}}function Ji(r){var t=r[_];t.i===0||t.i===1?t.j():t.g=!0}function Nr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ne("ES5").S(t,r,n),n?(o[_].P&&(Bt(t),Y(4)),te(r)&&(r=Ht(t,r),t.l||zt(t,r)),t.u&&ne("Patches").M(o[_].t,r,t.u,t.s)):r=Ht(t,o,[]),Bt(t),t.u&&t.v(t.u,t.s),r!==Zn?r:void 0}function Ht(r,t,o){if($r(t))return t;var n=t[_];if(!n)return Re(t,(function(d,u){return Bn(r,n,t,d,u,o)}),!0),t;if(n.A!==r)return t;if(!n.P)return zt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Wr(n.k):n.o,s=i,l=!1;n.i===3&&(s=new Set(i),i.clear(),l=!0),Re(s,(function(d,u){return Bn(r,n,i,d,u,o,l)})),zt(r,i,!1),o&&r.u&&ne("Patches").N(n,o,r.u,r.s)}return n.o}function Bn(r,t,o,n,i,s,l){if(le(i)){var d=Ht(r,i,s&&t&&t.i!==3&&!Je(t.R,n)?s.concat(n):void 0);if($n(o,n,d),!le(d))return;r.m=!1}else l&&o.add(i);if(te(i)&&!$r(i)){if(!r.h.D&&r._<1)return;Ht(r,i),t&&t.A.l||zt(r,i)}}function zt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&jr(t,o)}function Dr(r,t){var o=r[_];return(o?he(o):r)[t]}function Hn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ye(r){r.P||(r.P=!0,r.l&&ye(r.l))}function Ur(r){r.o||(r.o=Wr(r.t))}function Br(r,t,o){var n=zr(t)?ne("MapSet").F(t,o):Gr(t)?ne("MapSet").T(t,o):r.O?(function(i,s){var l=Array.isArray(i),d={i:l?1:0,A:s?s.A:Fr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,f=bt;l&&(u=[d],f=gt);var h=Proxy.revocable(u,f),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g})(t,o):ne("ES5").J(t,o);return(o?o.A:Fr()).p.push(n),n}function Qi(r){return le(r)||Y(22,r),(function t(o){if(!te(o))return o;var n,i=o[_],s=et(o);if(i){if(!i.P&&(i.i<4||!ne("ES5").K(i)))return i.t;i.I=!0,n=zn(o,s),i.I=!1}else n=zn(o,s);return Re(n,(function(l,d){i&&qi(i.t,l)===d||$n(n,l,t(d))})),s===3?new Set(n):n})(r)}function zn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Wr(r)}function Vn(){function r(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var f=this[_];return bt.get(f,l)},set:function(f){var h=this[_];bt.set(h,l,f)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][_];if(!u.P)switch(u.i){case 5:n(u)&&ye(u);break;case 4:o(u)&&ye(u)}}}function o(l){for(var d=l.t,u=l.k,f=Qe(u),h=f.length-1;h>=0;h--){var y=f[h];if(y!==_){var g=d[y];if(g===void 0&&!Je(d,y))return!0;var v=u[y],b=v&&v[_];if(b?b.t!==g:!Kn(v,g))return!0}}var S=!!d[_];return f.length!==Qe(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Y(3,JSON.stringify(he(l)))}var s={};Xi("ES5",{J:function(l,d){var u=Array.isArray(l),f=(function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=qn(g);delete S[_];for(var w=Qe(S),I=0;I<w.length;I++){var R=w[I];S[R]=r(R,y||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(g),S)})(u,l),h={i:u?5:4,A:d?d.A:Fr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,_,{value:h,writable:!0}),f},S:function(l,d,u){u?le(d)&&d[_].A===l&&t(l.p):(l.u&&(function f(h){if(h&&typeof h=="object"){var y=h[_];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Re(v,(function(L){L!==_&&(g[L]!==void 0||Je(g,L)?b[L]||f(v[L]):(b[L]=!0,ye(y)))})),Re(g,(function(L){v[L]!==void 0||Je(v,L)||(b[L]=!1,ye(y))}));else if(S===5){if(n(y)&&(ye(y),b.length=!0),v.length<g.length)for(var w=v.length;w<g.length;w++)b[w]=!1;else for(var I=g.length;I<v.length;I++)b[I]=!0;for(var R=Math.min(v.length,g.length),P=0;P<R;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&f(v[P])}}}})(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Gn,mt,Kr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",es=typeof Map<"u",ts=typeof Set<"u",Wn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zn=Kr?Symbol.for("immer-nothing"):((Gn={})["immer-nothing"]=!0,Gn),jn=Kr?Symbol.for("immer-draftable"):"__$immer_draftable",_=Kr?Symbol.for("immer-state"):"__$immer_state";var rs=""+Object.prototype.constructor,Qe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(r){var t={};return Qe(r).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)})),t},Hr={},bt={get:function(r,t){if(t===_)return r;var o=he(r);if(!Je(o,t))return(function(i,s,l){var d,u=Hn(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0})(r,o,t);var n=o[t];return r.I||!te(n)?n:n===Dr(r.t,t)?(Ur(r),r.o[t]=Br(r.A.h,n,r)):n},has:function(r,t){return t in he(r)},ownKeys:function(r){return Reflect.ownKeys(he(r))},set:function(r,t,o){var n=Hn(he(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Dr(he(r),t),s=i?.[_];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Kn(o,i)&&(o!==void 0||Je(r.t,t)))return!0;Ur(r),ye(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Dr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Ur(r),ye(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=he(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Y(12)}},gt={};Re(bt,(function(r,t){gt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gt.deleteProperty=function(r,t){return gt.set.call(this,r,t,void 0)},gt.set=function(r,t,o){return bt.set.call(this,r[0],t,o,r[0])};var os=(function(){function r(o){var n=this;this.O=Wn,this.D=!0,this.produce=function(i,s,l){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var I=arguments.length,R=Array(I>1?I-1:0),P=1;P<I;P++)R[P-1]=arguments[P];return u.produce(S,(function(L){var B;return(B=s).call.apply(B,[w,L].concat(R))}))}}var f;if(typeof s!="function"&&Y(6),l!==void 0&&typeof l!="function"&&Y(7),te(i)){var h=Mn(n),y=Br(n,i,void 0),g=!0;try{f=s(y),g=!1}finally{g?Bt(h):Mr(h)}return typeof Promise<"u"&&f instanceof Promise?f.then((function(S){return _r(h,l),Nr(S,h)}),(function(S){throw Bt(h),S})):(_r(h,l),Nr(f,h))}if(!i||typeof i!="object"){if((f=s(i))===void 0&&(f=i),f===Zn&&(f=void 0),n.D&&jr(f,!0),l){var v=[],b=[];ne("Patches").M(i,f,v,b),l(v,b)}return f}Y(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(f){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(f,(function(v){return i.apply(void 0,[v].concat(y))}))};var l,d,u=n.produce(i,s,(function(f,h){l=f,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(f){return[f,l,d]})):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){te(o)||Y(8),le(o)&&(o=Qi(o));var n=Mn(this),i=Br(this,o,void 0);return i[_].C=!0,Mr(n),i},t.finishDraft=function(o,n){var i=o&&o[_],s=i.A;return _r(s,n),Nr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Wn&&Y(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var l=ne("Patches").$;return le(o)?l(o,n):this.produce(o,(function(d){return l(d,n)}))},r})(),j=new os,ns=j.produce,pp=j.produceWithPatches.bind(j),hp=j.setAutoFreeze.bind(j),yp=j.setUseProxies.bind(j),gp=j.applyPatches.bind(j),mp=j.createDraft.bind(j),bp=j.finishDraft.bind(j),Gt=ns;function Te(r){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(r)}function Yn(r,t){if(Te(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Te(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Xn(r){var t=Yn(r,"string");return Te(t)=="symbol"?t:t+""}function Jn(r,t,o){return(t=Xn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Qn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Vr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Qn(Object(o),!0).forEach(function(n){Jn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Qn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var ea=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Zr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wt={INIT:"@@redux/INIT"+Zr(),REPLACE:"@@redux/REPLACE"+Zr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zr()}};function as(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function qr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(qr)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,s=t,l=[],d=l,u=!1;function f(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(z(3));return s}function y(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var w=!0;return f(),d.push(S),function(){if(w){if(u)throw new Error(z(6));w=!1,f();var R=d.indexOf(S);d.splice(R,1),l=null}}}function g(S){if(!as(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=l=d,I=0;I<w.length;I++){var R=w[I];R()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,g({type:Wt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(z(11));function P(){R.next&&R.next(h())}P();var L=w(P);return{unsubscribe:L}}},S[ea]=function(){return this},S}return g({type:Wt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[ea]=b,n}function is(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Wt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Wt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function ta(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),l,d;try{is(o)}catch(u){d=u}return function(f,h){if(f===void 0&&(f={}),d)throw d;if(0)var y;for(var g=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],I=f[S],R=w(I,h);if(typeof R>"u"){var P=h&&h.type;throw new Error(z(14))}v[S]=R,g=g||R!==I}return g=g||s.length!==Object.keys(f).length,g?v:f}}function tt(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ra(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return s=tt.apply(void 0,d)(i.dispatch),Vr(Vr({},i),{},{dispatch:s})}}}function oa(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,s,r):l(d)}}};return t}var na=oa();na.withExtraArgument=oa;var Yr=na;var la=(function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),ss=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(h){return u([f,h])}}function u(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=f[0]&2?i.return:f[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,f[1])).done)return s;switch(i=0,s&&(f=[f[0]&2,s.value]),f[0]){case 0:case 1:s=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){o.label=f[1];break}if(f[0]===6&&o.label<s[1]){o.label=s[1],s=f;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(f);break}s[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(r,o)}catch(h){f=[6,h],i=0}finally{n=s=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},rt=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},cs=Object.defineProperty,ls=Object.defineProperties,ds=Object.getOwnPropertyDescriptors,aa=Object.getOwnPropertySymbols,us=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,ia=function(r,t,o){return t in r?cs(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ge=function(r,t){for(var o in t||(t={}))us.call(t,o)&&ia(r,o,t[o]);if(aa)for(var n=0,i=aa(t);n<i.length;n++){var o=i[n];fs.call(t,o)&&ia(r,o,t[o])}return r},Xr=function(r,t){return ls(r,ds(t))},ps=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(f){i(f)}},l=function(u){try{d(o.throw(u))}catch(f){i(f)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(r,t)).next())})};var hs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?tt:tt.apply(null,arguments)},Up=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function ys(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function me(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ge(ge({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}var gs=(function(r){la(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,rt([void 0],o[0].concat(this)))):new(t.bind.apply(t,rt([void 0],o.concat(this))))},t})(Array),ms=(function(r){la(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,rt([void 0],o[0].concat(this)))):new(t.bind.apply(t,rt([void 0],o.concat(this))))},t})(Array);function eo(r){return te(r)?Gt(r,function(){}):r}function bs(r){return typeof r=="boolean"}function xs(){return function(t){return vs(t)}}function vs(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,l=s===void 0?!0:s,d=r.actionCreatorCheck,u=d===void 0?!0:d,f=new gs;if(o&&(bs(o)?f.push(Yr):f.push(Yr.withExtraArgument(o.extraArgument))),0){if(i)var h;if(l)var y;if(u)var g}return f}var Jr=!0;function da(r){var t=xs(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,l=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,f=o.preloadedState,h=f===void 0?void 0:f,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(ys(i))v=ta(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Jr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Jr&&b.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=ra.apply(void 0,b),w=tt;u&&(w=hs(ge({trace:!Jr},typeof u=="object"&&u)));var I=new ms(S),R=I;Array.isArray(g)?R=rt([S],g):typeof g=="function"&&(R=g(I));var P=w.apply(void 0,R);return qr(v,h,P)}function ua(r){var t={},o=[],n,i={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function Ss(r){return typeof r=="function"}function Cs(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?ua(t):[t,o,n],s=i[0],l=i[1],d=i[2],u;if(Ss(r))u=function(){return eo(r())};else{var f=eo(r);u=function(){return f}}function h(y,g){y===void 0&&(y=u());var v=rt([s[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var w=b,I=S(w,g);return I===void 0?b:I}else{if(te(b))return Gt(b,function(R){return S(R,g)});var I=S(b,g);if(I===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return b},y)}return h.getInitialState=u,h}function Os(r,t){return r+"/"+t}function fa(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:eo(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},l={},d={};i.forEach(function(h){var y=n[h],g=Os(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,l[g]=v,d[h]=b?me(g,b):me(g)});function u(){var h=typeof r.extraReducers=="function"?ua(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,I=ge(ge({},g),l);return Cs(o,function(R){for(var P in I)R.addCase(P,I[P]);for(var L=0,B=b;L<B.length;L++){var Q=B[L];R.addMatcher(Q.matcher,Q.reducer)}w&&R.addDefaultCase(w)})}var f;return{name:t,reducer:function(h,y){return f||(f=u()),f(h,y)},actions:d,caseReducers:s,getInitialState:function(){return f||(f=u()),f.getInitialState()}}}var As="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Es=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=As[Math.random()*64|0];return t},ws=["name","message","stack","code"],Qr=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),sa=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),Is=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ws;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Hp=(function(){function r(t,o,n){var i=me(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Xr(ge({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(h,y,g){return{payload:void 0,meta:Xr(ge({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=me(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||Is)(h||"Rejected"),meta:Xr(ge({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function f(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):Es(),S=new u,w,I=!1;function R(L){w=L,S.abort()}var P=(function(){return ps(this,null,function(){var L,B,Q,xe,W,ve,Ne;return ss(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),xe=(L=n?.condition)==null?void 0:L.call(n,h,{getState:g,extra:v}),Ts(xe)?[4,xe]:[3,2];case 1:xe=p.sent(),p.label=2;case 2:if(xe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,W=new Promise(function(m,O){return S.signal.addEventListener("abort",function(){return O({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([W,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(m,O){return new Qr(m,O)},fulfillWithValue:function(m,O){return new sa(m,O)}})).then(function(m){if(m instanceof Qr)throw m;return m instanceof sa?i(m.payload,b,h,m.meta):i(m,b,h)})])];case 3:return Q=p.sent(),[3,5];case 4:return ve=p.sent(),Q=ve instanceof Qr?l(null,b,h,ve.payload,ve.meta):l(ve,b,h),[3,5];case 5:return Ne=n&&!n.dispatchConditionRejection&&l.match(Q)&&Q.meta.condition,Ne||y(Q),[2,Q]}})})})();return Object.assign(P,{abort:R,requestId:b,arg:h,unwrap:function(){return P.then(Rs)}})}}return Object.assign(f,{pending:s,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r})();function Rs(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Ts(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var pa="listener",ha="completed",ya="cancelled",zp="task-"+ya,Gp="task-"+ha,Wp=pa+"-"+ya,jp=pa+"-"+ha;var to="listenerMiddleware";var $p=me(to+"/add"),Kp=me(to+"/removeAll"),Vp=me(to+"/remove");var ca,Zp=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(ca||(ca=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ls=function(r){return function(t){setTimeout(t,r)}},qp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ls(10);Vn();var ks=_t(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),jt=class extends ks(Object){};window.ftReduxStores||(window.ftReduxStores={});var ga=class r extends jt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Mt(s))return s;if(i==null)return;let l=fa({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=da({reducer:(u,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=pt(l.getInitialState());for(let y of f.keeping)h[y]=(u??h)[y];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...f.overwrites};return l.reducer(u,f)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Nt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,f=s[u];return f?(...h)=>{let y=f(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var $t=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let l=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(l),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(l);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Kt=A(D()),Ps="ft-app-info",ot=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};ot.eventName="authentication-change";var xt=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};xt.eventName="ui-locale-changed";var _s={session:(r,t)=>{(0,Kt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>E.dispatchEvent(new ot(t.payload)),0))}},E=Kt.FtReduxStore.get({name:Ps,reducers:_s,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ma=A(D()),Vt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Oh=(0,ma.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>$t.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Vt([(0,ro.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Vt([(0,ro.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Vt([Pr({store:E.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Vt([Pr({store:E.name})],t.prototype,"uiLocale",void 0),t});var Ds=A(xa(),1);var va;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(va||(va={}));var Sa;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(Sa||(Sa={}));var Ca;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Oa||(Oa={}));var Aa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Aa||(Aa={}));var Ea;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Ea||(Ea={}));var wa;(function(r){r.OFFICIAL="OFFICIAL",r.AI="AI"})(wa||(wa={}));var Ia;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Ia||(Ia={}));var Ra;(function(r){r.STANDARD="STANDARD",r.STRUCTURAL="STRUCTURAL"})(Ra||(Ra={}));var Ta;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(Ta||(Ta={}));var La;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(La||(La={}));var ka;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(ka||(ka={}));var Pa;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Pa||(Pa={}));var _a;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_a||(_a={}));var Na;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Na||(Na={}));var Da;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Da||(Da={}));var Ua;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(Ua||(Ua={}));var Fa;(function(r){r.ASC="ASC",r.DESC="DESC"})(Fa||(Fa={}));var Ma;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Ma||(Ma={}));var Ba;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Ba||(Ba={}));var Ha;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ha||(Ha={}));var za;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(za||(za={}));var Ga;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ga||(Ga={}));var Wa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Wa||(Wa={}));var ja;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ja||(ja={}));var $a;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($a||($a={}));var Ka;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ka||(Ka={}));var F;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(F||(F={}));var X;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(X||(X={}));var Va;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(Va||(Va={}));var Za;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Za||(Za={}));var qa;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(qa||(qa={}));var Ya;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ya||(Ya={}));var Xa;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Xa||(Xa={}));var Ja;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Ja||(Ja={}));var Qa;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Qa||(Qa={}));var ei;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(ei||(ei={}));var ti;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(ti||(ti={}));var ri;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ri||(ri={}));var Ns={[F.PERSONAL_BOOK_SHARE_USER]:[F.PERSONAL_BOOK_USER],[F.HTML_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.PDF_EXPORT_USER]:[F.PERSONAL_BOOK_USER],[F.KHUB_ADMIN]:[F.CONTENT_PUBLISHER],[F.ADMIN]:[F.KHUB_ADMIN,F.USERS_ADMIN,F.PORTAL_ADMIN,F.BEHAVIOR_DATA_USER],[F.GENERATIVE_AI_EXPORT_USER]:[F.GENERATIVE_AI_USER]};function oi(r,t){return r===t||(Ns[r]??[]).some(o=>oi(o,t))}function ni(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>oi(n,t))}var er=A(D());var oo=A(D());var Le=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=E.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=E.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var at=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Le.await()}};var $=class extends at{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new oo.CacheRegistry,this.cache=t?i.commonCache:new oo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Yt=class extends ${async listMySearches(){let{session:t}=E.getState();return ni(t,F.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Xt=class extends ${async listMyBookmarks(){let t=E.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=E.getState().session;return!!t?.sessionAuthenticated}};var Qt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=E.getState().session;return!!t?.sessionAuthenticated}};var Us="ft-user-assets",Fs={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(X).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;ao(r,o,[...no(r,o),i]),ai(r,o,1,n),ii(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;ao(r,o,no(r,o).map(i=>i.id===n.id?n:i)),ii(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;ao(r,o,no(r,o).filter(s=>s.id!==i)),ai(r,o,-1,n)}},si={[X.SEARCHES]:"savedSearches",[X.BOOKMARKS]:"bookmarks",[X.BOOKS]:void 0,[X.COLLECTIONS]:void 0},no=(r,t)=>{var o;let n=si[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},ao=(r,t,o)=>{let n=si[t];n&&(r[n]=o)},ai=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===X.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},ii=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=er.FtReduxStore.get({name:Us,reducers:Fs,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(X).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),io=class{constructor(t=new Jt,o=new Qt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Xt,this.savedSearchesService=new Yt,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=E.getState();(0,er.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),K.actions.clearAssetCount(),K.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),K.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),K.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();K.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();K.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===X.BOOKMARKS&&o&&K.actions.clearBookmarkCountByMap(),K.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},Ms=new io;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ms);var so=class{addCommand(t,o=!1){E.commands.add(t,o)}consumeCommand(t){return E.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new so;var J=A(D());var ci,it=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Bs=Symbol("clearAfterUnitTest"),tr=class extends(0,J.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ci]=()=>{this.defaultMessages={},this.cache=new J.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=E.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,J.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),l=this.resolveContext(s);return new J.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof J.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new it({loadedContexts:t})),this.dispatchEvent(new it({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new it({loadedContexts:[t]})),this.dispatchEvent(new it({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,J.delay)(0).then(()=>n()).catch(()=>null)))}};ci=Bs;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var st=window.FluidTopicsI18nService,rr=window.FluidTopicsCustomI18nService;var li=A(D()),co=class{highlightHtml(t,o,n){(0,li.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new co;var di=A(D());var lo=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=E.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,l;if(t==null)return"";try{return di.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:E.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(l=o?.onlyTime)!==null&&l!==void 0?l:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new lo;var ui=A(D());var vt=class{static get(t,o){var n,i;let s=E.getState(),{lang:l,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ui.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var uo=class{urlToSearchRequest(t){return vt.get().parse(t)}searchRequestToUrl(t){return vt.get().serialize(t)}};window.FluidTopicsUrlService=new uo;var de=A(D());var ke=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};ke.eventName="change";var fo=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},fi=new fo;var or=class r extends de.WithEventBus{static build(){return new r(window.history,fi,()=>window.location,!1)}constructor(t,o,n,i){var s,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ke(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,l,d])=>{let u=o(),f={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[f,l,d]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(ke.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ke.eventName,t)}currentItem(){return(0,de.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,de.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var pi=A(ee());var hi=pi.css`
127
127
  `;var mi=A(ee()),V=A(Z()),_e=A(D());var Pe=A(D());function yi(r,t){let{authenticationRequired:o,session:n}=E.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):r()}var nr=class extends at{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var po=class r extends Pe.FtStateManager{static build(t){return new r(E,t)}constructor(t,o){super(),this.store=t,this.cache=new Pe.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new nr,this.cleanSessionDebouncer=new Pe.Debouncer,this.reloadDebouncer=new Pe.Debouncer(500),this.apiProvider=o??(()=>Le.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(ot.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>yi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,i,s,l;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((i=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsSearchLanguage((s=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&s!==void 0?s:!1),this.store.actions.uiLanguageSetsReaderLanguage((l=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&l!==void 0?l:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new xt(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},gi=po.build();var G=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},U=class extends _e.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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=gi}render(){return mi.html`
128
128
  <slot></slot>
129
129
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService()}disconnectedCallback(){super.disconnectedCallback()}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>st.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=hi;G([(0,V.property)()],U.prototype,"baseUrl",void 0);G([(0,V.property)()],U.prototype,"apiIntegrationIdentifier",void 0);G([(0,V.property)()],U.prototype,"apiIntegrationAppVersion",void 0);G([(0,V.property)()],U.prototype,"uiLocale",void 0);G([(0,_e.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);G([(0,_e.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"editorMode",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"noCustom",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);G([(0,V.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],U.prototype,"noCustomComponent",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"withManualResources",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);G([(0,V.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);G([(0,_e.jsonProperty)([])],U.prototype,"messageContexts",void 0);G([(0,_e.jsonProperty)(void 0)],U.prototype,"session",void 0);var xi=A(D());var bi={"ft-app-context":U};(0,xi.customElements)(bi);var ar=class r{static build(t){return new r(t)}static buildCustom(t){return new r(t,!0)}static fromGwt(t){return new r(t)}get service(){return this.custom?rr:st}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return l=>({context:this.name,key:s,custom:this.custom,args:typeof l=="function"?void 0:l,argsProvider:typeof l=="function"?l:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var ct=A(D());var Ci=A(Z());var ho=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},vi=new ho;var Hs=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(s=(i<3?l(s):i>3?l(t,o,s):l(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},zs=Symbol("i18nAttributes"),Gs=Symbol("i18nListAttributes"),Oi=Symbol("i18nProperties"),ir=Symbol("i18nContexts"),St=Symbol("i18nUnsubs"),cr=(0,ct.applyMixinOnce)(Symbol("withI18n"),function(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?rr:st}i18n(s){let{context:l,key:d,message:u}=s,{custom:f,args:h,argsProvider:y}=s;if(l&&d){this.hasI18nContext(l)||this.addI18nContext(l,void 0,f);let g=h??(y?y(this):[]);return this.getI18nService(f).resolveMessage(l,d,...g)}return u}async awaitI18n(s){let{context:l,custom:d}=s;return l&&await this.getI18nService(d).prepareContext(l),this.i18n(s)}customI18n(s,l){if(vi.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((l,d,u)=>s.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((l,d,u)=>{var f;return((f=u?.context)===null||f===void 0?void 0:f.toLowerCase())===s}),this.updateI18nProperties(l=>l.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var l,d;let u=this,f=(h,y,g)=>g?.context&&g.key&&s(h,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(l=this[zs])===null||l===void 0||l.forEach((h,y)=>u[y]=f(h,y,u[y])),(d=this[Gs])===null||d===void 0||d.forEach((h,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(v=>f(h,y,v))})}updateI18nProperties(s){var l;(l=this[Oi])===null||l===void 0||l.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,l,d)}addI18nContext(s,l,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[ir].set(u,{isCustomContext:d}),this[St].has(u)||this[St].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(s){return this[ir].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ir].forEach((s,l)=>this.addI18nContext(l,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[St].forEach(s=>s()),this[St].clear()}}return t=ir,o=St,Hs([(0,Ci.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Si=class extends cr(ct.FtLitElement){},sr=class extends cr(ct.FtLitElementRedux){};var Ai=A(ee());var Ei=Ai.css`