@fluid-topics/ft-search-result-missing-terms 2.2.2 → 2.2.3

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.
@@ -1,18 +1,18 @@
1
- "use strict";(()=>{var po=Object.create;var fn=Object.defineProperty;var ho=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,yo=Object.prototype.hasOwnProperty;var ar=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var go=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fo(e))!yo.call(t,s)&&s!==r&&fn(t,s,{get:()=>e[s],enumerable:!(n=ho(e,s))||n.enumerable});return t};var m=(t,e,r)=>(r=t!=null?po(mo(t)):{},go(e||!t||!t.__esModule?fn(r,"default",{value:t,enumerable:!0}):r,t));var _=ar((Ua,mn)=>{mn.exports=ftGlobals.wcUtils});var Q=ar(($a,yn)=>{yn.exports=ftGlobals.lit});var H=ar((Ha,gn)=>{gn.exports=ftGlobals.litDecorators});var co=m(_());var He=m(Q()),io=m(H());function*Sn(t,e){let r=typeof e=="function";if(t!==void 0){let n=-1;for(let s of t)n>-1&&(yield r?e(n):e),n++,yield s}}function*En(t,e){if(t!==void 0){let r=0;for(let n of t)yield e(n,r++)}}var vn=m(Q());var An=vn.css`
1
+ "use strict";(()=>{var po=Object.create;var fn=Object.defineProperty;var ho=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,yo=Object.prototype.hasOwnProperty;var ar=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var go=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of fo(t))!yo.call(e,s)&&s!==r&&fn(e,s,{get:()=>t[s],enumerable:!(n=ho(t,s))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?po(mo(e)):{},go(t||!e||!e.__esModule?fn(r,"default",{value:e,enumerable:!0}):r,e));var _=ar(($a,mn)=>{mn.exports=ftGlobals.wcUtils});var Q=ar((Ha,yn)=>{yn.exports=ftGlobals.lit});var H=ar((Ba,gn)=>{gn.exports=ftGlobals.litDecorators});var co=m(_());var He=m(Q()),io=m(H());function*Sn(e,t){let r=typeof t=="function";if(e!==void 0){let n=-1;for(let s of e)n>-1&&(yield r?t(n):t),n++,yield s}}function*En(e,t){if(e!==void 0){let r=0;for(let n of e)yield t(n,r++)}}var vn=m(Q());var An=vn.css`
2
2
  [part="missing-term"] {
3
3
  text-decoration: line-through;
4
4
  }
5
- `;var Rr=m(H());var bn=m(H(),1);var cr=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function _n(t,e){return(0,bn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Be(t);try{return JSON.parse(r)}catch{return Be(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:je,...e??{}})}function So(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Se(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Se(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(t);if(r=i.length,r!==s(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Se(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Se(t,e){try{return So(t,e)}catch{return!1}}function je(t,e){return!Se(t,e)}function Be(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function it(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let s=e(n);return s[t]=!0,s}}var xn=m(H(),1);var lr=t=>{let e=t??{};return(r,n)=>{var s;let i={hasChanged:je,attribute:!1,...e};(0,xn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[n]),store:e.store})}};var ot=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var se=m(H(),1);var at=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wn=m(Q(),1);var ct=globalThis,Eo=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cn=(t,e)=>{if(Eo)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),s=ct.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,t.appendChild(n)}};var lt=class extends wn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Cn(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){cr(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Tn(t,e,...r){var n;let s=t.querySelector(e);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ve=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Mn,On=Symbol("constructorPrototype"),Rn=Symbol("constructorName"),Nn=Symbol("exportpartsDebouncer"),In=Symbol("dynamicDependenciesLoaded"),Ee=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Ee.eventName="exportparts-updated";var W=class extends lt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mn]=new at(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Nn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Rn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Rn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[In]||(r[In]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Ee.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Ee.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Ee)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Tn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(e){var r,n,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=e.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=h.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],v=(a=(o=h.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],R=[...g,...v].filter(c).map(E=>E.trim());for(let E of R)u.add(E)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(h=>l.map(g=>`${h}:${g}--${h}`));this.exportparts=[...this.part,...d].join(", ")}};Mn=Nn;ve([(0,se.property)()],W.prototype,"exportpartsPrefix",void 0);ve([_n([])],W.prototype,"exportpartsPrefixes",void 0);ve([(0,se.property)({reflect:!0})],W.prototype,"exportparts",void 0);ve([(0,se.property)()],W.prototype,"customStylesheet",void 0);ve([(0,se.property)()],W.prototype,"elementToFocus",void 0);ve([(0,se.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function ut(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ve=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ie=Symbol("internalStores"),vo=it(Symbol("withRedux"),function(t){var e,r,n;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ie].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ie].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ie].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ie].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ie].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[te].has(o.store):this[te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[te].set(o,a.subscribe(()=>this.updateFromStores())),this[Ve].set(o,[]),ut(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=h=>this[u](h);a.addEventListener(l.eventName,d),this[Ve].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[te].has(o)&&this[te].get(o)(),this[te].delete(o),(a=this[Ve].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ve].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=te,r=ie,n=Ve,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),kn=class extends vo(W){};function M(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Ao=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dn=Ao,ur=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${ur()}`,REPLACE:`@@redux/REPLACE${ur()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ur()}`},dt=bo;function pt(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function dr(t,e,r){if(typeof t!="function")throw new Error(M(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(dr)(t,e)}let n=t,s=e,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((E,I)=>{o.set(I,E)}))}function u(){if(c)throw new Error(M(3));return s}function d(E){if(typeof E!="function")throw new Error(M(4));if(c)throw new Error(M(5));let I=!0;l();let F=a++;return o.set(F,E),function(){if(I){if(c)throw new Error(M(6));I=!1,l(),o.delete(F),i=null}}}function h(E){if(!pt(E))throw new Error(M(7));if(typeof E.type>"u")throw new Error(M(8));if(typeof E.type!="string")throw new Error(M(17));if(c)throw new Error(M(9));try{c=!0,s=n(s,E)}finally{c=!1}return(i=o).forEach(F=>{F()}),E}function g(E){if(typeof E!="function")throw new Error(M(10));n=E,h({type:dt.REPLACE})}function v(){let E=d;return{subscribe(I){if(typeof I!="object"||I===null)throw new Error(M(11));function F(){let A=I;A.next&&A.next(u())}return F(),{unsubscribe:E(F)}},[Dn](){return this}}}return h({type:dt.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Dn]:v}}function _o(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:dt.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:dt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Ln(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let n=Object.keys(r),s,i;try{_o(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let h=n[d],g=r[h],v=a[h],R=g(v,c);if(typeof R>"u"){let E=c&&c.type;throw new Error(M(14))}u[h]=R,l=l||R!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function qe(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function Pn(...t){return e=>(r,n)=>{let s=e(r,n),i=()=>{throw new Error(M(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=t.map(c=>c(o));return i=qe(...a)(s.dispatch),{...s,dispatch:i}}}function Fn(t){return pt(t)&&"type"in t&&typeof t.type=="string"}var Kn=Symbol.for("immer-nothing"),Un=Symbol.for("immer-draftable"),k=Symbol.for("immer-state");function q(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var U=Object,be=U.getPrototypeOf,yt="constructor",bt="prototype",mr="configurable",gt="enumerable",ft="writable",ze="value",G=t=>!!t&&!!t[k];function $(t){return t?Wn(t)||xt(t)||!!t[Un]||!!t[yt]?.[Un]||Ct(t)||wt(t):!1}var xo=U[bt][yt].toString(),$n=new WeakMap;function Wn(t){if(!t||!_r(t))return!1;let e=be(t);if(e===null||e===U[bt])return!0;let r=U.hasOwnProperty.call(e,yt)&&e[yt];if(r===Object)return!0;if(!Ae(r))return!1;let n=$n.get(r);return n===void 0&&(n=Function.toString.call(r),$n.set(r,n)),n===xo}function _t(t,e,r=!0){Ge(t)===0?(r?Reflect.ownKeys(t):U.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((n,s)=>e(s,n,t))}function Ge(t){let e=t[k];return e?e.type_:xt(t)?1:Ct(t)?2:wt(t)?3:0}var pr=(t,e,r=Ge(t))=>r===2?t.has(e):U[bt].hasOwnProperty.call(t,e),yr=(t,e,r=Ge(t))=>r===2?t.get(e):t[e],St=(t,e,r,n=Ge(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function Co(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var xt=Array.isArray,Ct=t=>t instanceof Map,wt=t=>t instanceof Set,_r=t=>typeof t=="object",Ae=t=>typeof t=="function",hr=t=>typeof t=="boolean";function wo(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Y=t=>t.copy_||t.base_;var xr=t=>t.modified_?t.copy_:t.base_;function gr(t,e){if(Ct(t))return new Map(t);if(wt(t))return new Set(t);if(xt(t))return Array[bt].slice.call(t);let r=Wn(t);if(e===!0||e==="class_only"&&!r){let n=U.getOwnPropertyDescriptors(t);delete n[k];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[ft]===!1&&(a[ft]=!0,a[mr]=!0),(a.get||a.set)&&(n[o]={[mr]:!0,[ft]:!0,[gt]:a[gt],[ze]:t[o]})}return U.create(be(t),n)}else{let n=be(t);if(n!==null&&r)return{...t};let s=U.create(n);return U.assign(s,t)}}function Cr(t,e=!1){return Tt(t)||G(t)||!$(t)||(Ge(t)>1&&U.defineProperties(t,{set:ht,add:ht,clear:ht,delete:ht}),U.freeze(t),e&&_t(t,(r,n)=>{Cr(n,!0)},!1)),t}function To(){q(2)}var ht={[ze]:To};function Tt(t){return t===null||!_r(t)?!0:U.isFrozen(t)}var Et="MapSet",Sr="Patches",Hn="ArrayMethods",Gn={};function oe(t){let e=Gn[t];return e||q(0,t),e}var Bn=t=>!!Gn[t];var Ke,Qn=()=>Ke,Oo=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Bn(Et)?oe(Et):void 0,arrayMethodsPlugin_:Bn(Hn)?oe(Hn):void 0});function jn(t,e){e&&(t.patchPlugin_=oe(Sr),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Er(t){vr(t),t.drafts_.forEach(Ro),t.drafts_=null}function vr(t){t===Ke&&(Ke=t.parent_)}var Vn=t=>Ke=Oo(Ke,t);function Ro(t){let e=t[k];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function qn(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[k].modified_&&(Er(e),q(4)),$(t)&&(t=zn(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[k].base_,t,e)}else t=zn(e,r);return Io(e,t,!0),Er(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Kn?t:void 0}function zn(t,e){if(Tt(e))return e;let r=e[k];if(!r)return vt(e,t.handledSet_,t);if(!Ot(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);Jn(r,t)}return r.copy_}function Io(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Cr(e,r)}function Yn(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Ot=(t,e)=>t.scope_===e,Mo=[];function Xn(t,e,r,n){let s=Y(t),i=t.type_;if(n!==void 0&&yr(s,n,i)===e){St(s,n,r,i);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;_t(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=t.draftLocations_.get(e)??Mo;for(let a of o)St(s,a,r,i)}function No(t,e,r){t.callbacks_.push(function(s){let i=e;if(!i||!Ot(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=xr(i);Xn(t,i.draft_??i,o,r),Jn(i,s)})}function Jn(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let s=n.getPath(t);s&&n.generatePatches_(t,s,e)}Yn(t)}}function ko(t,e,r){let{scope_:n}=t;if(G(r)){let s=r[k];Ot(s,n)&&s.callbacks_.push(function(){mt(t);let o=xr(s);Xn(t,r,o,e)})}else $(r)&&t.callbacks_.push(function(){let i=Y(t);t.type_===3?i.has(r)&&vt(r,n.handledSet_,n):yr(i,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&vt(yr(t.copy_,e,t.type_),n.handledSet_,n)})}function vt(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(t)||e.has(t)||!$(t)||Tt(t)||(e.add(t),_t(t,(n,s)=>{if(G(s)){let i=s[k];if(Ot(i,r)){let o=xr(i);St(t,n,o,t.type_),Yn(i)}}else $(s)&&vt(s,e,r)})),t}function Do(t,e){let r=xt(t),n={type_:r?1:0,scope_:e?e.scope_:Qn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=At;r&&(s=[n],i=We);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var At={get(t,e){if(e===k)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=Y(t);if(!pr(s,e,t.type_))return Po(t,s,e);let i=s[e];if(t.finalized_||!$(i)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&wo(e))return i;if(i===fr(t.base_,e)||Lo(t,e,i)){mt(t);let o=t.type_===1?+e:e,a=br(t.scope_,i,t,o);return t.copy_[o]=a}return i},has(t,e){return e in Y(t)},ownKeys(t){return Reflect.ownKeys(Y(t))},set(t,e,r){let n=Zn(Y(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let s=fr(Y(t),e),i=s?.[k];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Co(r,s)&&(r!==void 0||pr(t.base_,e,t.type_)))return!0;mt(t),Ar(t)}return t.copy_[e]===r&&(r!==void 0||pr(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),ko(t,e,r)),!0},deleteProperty(t,e){return mt(t),fr(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Ar(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Y(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[ft]:!0,[mr]:t.type_!==1||e!=="length",[gt]:n[gt],[ze]:r[e]}},defineProperty(){q(11)},getPrototypeOf(t){return be(t.base_)},setPrototypeOf(){q(12)}},We={};for(let t in At){let e=At[t];We[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}We.deleteProperty=function(t,e){return We.set.call(this,t,e,void 0)};We.set=function(t,e,r){return At.set.call(this,t[0],e,r,t[0])};function fr(t,e){let r=t[k];return(r?Y(r):t)[e]}function Lo(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!$(r)||r[k]?!1:t.baseRefs_.has(r)}function Po(t,e,r){let n=Zn(e,r);return n?ze in n?n[ze]:n.get?.call(t.draft_):void 0}function Zn(t,e){if(!(e in t))return;let r=be(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=be(r)}}function Ar(t){t.modified_||(t.modified_=!0,t.parent_&&Ar(t.parent_))}function mt(t){t.copy_||(t.assigned_=new Map,t.copy_=gr(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Fo=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(Ae(e)&&!Ae(r)){let i=r;r=e;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ae(r)||q(6),n!==void 0&&!Ae(n)&&q(7);let s;if($(e)){let i=Vn(this),o=br(i,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):vr(i)}return jn(i,n),qn(s,i)}else if(!e||!_r(e)){if(s=r(e),s===void 0&&(s=e),s===Kn&&(s=void 0),this.autoFreeze_&&Cr(s,!0),n){let i=[],o=[];oe(Sr).generateReplacementPatches_(e,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else q(1,e)},this.produceWithPatches=(e,r)=>{if(Ae(e))return(o,...a)=>this.produceWithPatches(o,c=>e(c,...a));let n,s;return[this.produce(e,r,(o,a)=>{n=o,s=a}),n,s]},hr(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),hr(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),hr(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){$(t)||q(8),G(t)&&(t=es(t));let e=Vn(this),r=br(e,t,void 0);return r[k].isManual_=!0,vr(e),r}finishDraft(t,e){let r=t&&t[k];(!r||!r.isManual_)&&q(9);let{scope_:n}=r;return jn(n,e),qn(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let n=oe(Sr).applyPatches_;return G(t)?n(t,e):this.produce(t,s=>n(s,e))}};function br(t,e,r,n){let[s,i]=Ct(e)?oe(Et).proxyMap_(e,r):wt(e)?oe(Et).proxySet_(e,r):Do(e,r);return(r?.scope_??Qn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?No(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function es(t){return G(t)||q(10,t),ts(t)}function ts(t){if(!$(t)||Tt(t))return t;let e=t[k],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=gr(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=gr(t,!0);return _t(r,(s,i)=>{St(r,s,ts(i))},n),e&&(e.finalized_=!1),r}var Uo=new Fo,wr=Uo.produce;function rs(t){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,t):s(i)}var ns=rs(),ss=rs;var $o=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},Cc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Ho=t=>t&&typeof t.match=="function";function re(t,e){function r(...n){if(e){let s=e(...n);if(!s)throw new Error(X(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Fn(n)&&n.type===t,r}var ls=class Qe extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Qe(...e[0].concat(this)):new Qe(...e.concat(this))}};function is(t){return $(t)?wr(t,()=>{}):t}function Rt(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Bo(t){return typeof t=="boolean"}var jo=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=e??{},o=new ls;return r&&(Bo(r)?o.push(ns):o.push(ss(r.extraArgument))),o},Vo="RTK_autoBatch";var os=t=>e=>{setTimeout(e,t)},qo=(t,e)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=t(s),o=setTimeout(s,e)},zo=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),s=!0,i=!1,o=!1,a=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?qo(window.requestAnimationFrame,100):os(10):t.type==="callback"?t.queueNotification:os(t.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),h=n.subscribe(d);return a.add(u),()=>{h(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Ko=t=>function(r){let{autoBatch:n=!0}=r??{},s=new ls(t);return n&&s.push(zo(typeof n=="object"?n:void 0)),s};function us(t){let e=jo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},c;if(typeof r=="function")c=r;else if(pt(r))c=Ln(r);else throw new Error(X(1));let l;typeof n=="function"?l=n(e):l=e();let u=qe;s&&(u=$o({trace:!1,...typeof s=="object"&&s}));let d=Pn(...l),h=Ko(d),g=typeof a=="function"?a(h):h(),v=u(...g);return dr(c,o,v)}function ds(t){let e={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(X(28));if(a in e)throw new Error(X(29));return e[a]=o,s},addAsyncThunk(i,o){return o.pending&&(e[i.pending.type]=o.pending),o.rejected&&(e[i.rejected.type]=o.rejected),o.fulfilled&&(e[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return t(s),[e,r,n]}function Wo(t){return typeof t=="function"}function Go(t,e){let[r,n,s]=ds(e),i;if(Wo(t))i=()=>is(t());else{let a=is(t);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if($(u))return wr(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return o.getInitialState=i,o}var Qo=(t,e)=>Ho(t)?t.match(e):t(e);function Yo(...t){return e=>t.some(r=>Qo(r,e))}var Xo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Jo=(t=21)=>{let e="",r=t;for(;r--;)e+=Xo[Math.random()*64|0];return e},Zo=["name","message","stack","code"],Tr=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},as=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ea=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Zo)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},cs="External signal was aborted",ta=(()=>{function t(e,r,n){let s=re(e+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=re(e+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=re(e+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ea)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,h)=>{let g=n?.idGenerator?n.idGenerator(c):Jo(),v=new AbortController,R,E;function I(S){E=S,v.abort()}l&&(l.aborted?I(cs):l.addEventListener("abort",()=>I(cs),{once:!0}));let F=(async function(){let S;try{let b=n?.condition?.(c,{getState:d,extra:h});if(na(b)&&(b=await b),b===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let K=new Promise((C,T)=>{R=()=>{T({name:"AbortError",message:E||"Aborted"})},v.signal.addEventListener("abort",R,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([K,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:v.signal,abort:I,rejectWithValue:((C,T)=>new Tr(C,T)),fulfillWithValue:((C,T)=>new as(C,T))})).then(C=>{if(C instanceof Tr)throw C;return C instanceof as?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(b){S=b instanceof Tr?o(null,g,c,b.payload,b.meta):o(b,g,c)}finally{R&&v.signal.removeEventListener("abort",R)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(F,{abort:I,requestId:g,arg:c,unwrap(){return F.then(ra)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Yo(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function ra(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function na(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ps=Symbol.for("rtk-slice-createasyncthunk"),Tc={[ps]:ta};function sa(t,e){return`${t}/${e}`}function ia({creators:t}={}){let e=t?.asyncThunk?.[ps];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(X(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(aa()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,A){let b=typeof S=="string"?S:S.type;if(!b)throw new Error(X(12));if(b in c.sliceCaseReducersByType)throw new Error(X(13));return c.sliceCaseReducersByType[b]=A,l},addMatcher(S,A){return c.sliceMatchers.push({matcher:S,reducer:A}),l},exposeAction(S,A){return c.actionCreators[S]=A,l},exposeCaseReducer(S,A){return c.sliceCaseReducersByName[S]=A,l}};a.forEach(S=>{let A=o[S],b={reducerName:S,type:sa(s,S),createNotation:typeof n.reducers=="function"};la(A)?da(b,A,l,e):ca(b,A,l)});function u(){let[S={},A=[],b=void 0]=typeof n.extraReducers=="function"?ds(n.extraReducers):[n.extraReducers],K={...S,...c.sliceCaseReducersByType};return Go(n.initialState,C=>{for(let T in K)C.addCase(T,K[T]);for(let T of c.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of A)C.addMatcher(T.matcher,T.reducer);b&&C.addDefaultCase(b)})}let d=S=>S,h=new Map,g=new WeakMap,v;function R(S,A){return v||(v=u()),v(S,A)}function E(){return v||(v=u()),v.getInitialState()}function I(S,A=!1){function b(C){let T=C[S];return typeof T>"u"&&A&&(T=Rt(g,b,E)),T}function K(C=d){let T=Rt(h,A,()=>new WeakMap);return Rt(T,C,()=>{let hn={};for(let[lo,uo]of Object.entries(n.selectors??{}))hn[lo]=oa(uo,C,()=>Rt(g,C,E),A);return hn})}return{reducerPath:S,getSelectors:K,get selectors(){return K(b)},selectSlice:b}}let F={name:s,reducer:R,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:E,...I(i),injectInto(S,{reducerPath:A,...b}={}){let K=A??i;return S.inject({reducerPath:K,reducer:R},b),{...F,...I(K,!0)}}};return F}}function oa(t,e,r,n){function s(i,...o){let a=e(i);return typeof a>"u"&&n&&(a=r()),t(a,...o)}return s.unwrapped=t,s}var hs=ia();function aa(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function ca({type:t,reducerName:e,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!ua(n))throw new Error(X(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,o?re(t,o):re(t))}function la(t){return t._reducerDefinitionType==="asyncThunk"}function ua(t){return t._reducerDefinitionType==="reducerWithPrepare"}function da({type:t,reducerName:e},r,n,s){if(!s)throw new Error(X(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(t,i,u);n.exposeAction(e,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(e,{fulfilled:o||It,pending:a||It,rejected:c||It,settled:l||It})}function It(){}var fs="listener",ms="completed",ys="cancelled",Oc=`task-${ys}`,Rc=`task-${ms}`,Ic=`${fs}-${ys}`,Mc=`${fs}-${ms}`;var{assign:gs}=Object;var Or="listenerMiddleware";var pa=gs(re(`${Or}/add`),{withTypes:()=>pa}),Nc=re(`${Or}/removeAll`),ha=gs(re(`${Or}/remove`),{withTypes:()=>ha});function X(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fa=it(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Mt=class extends fa(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ss=class t extends Mt{static get(e){var r;let n=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(ut(i))return i;if(s==null)return;let o=hs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=us({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Be(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new t(o,a,s.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ot,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,h=this.getState()[d];Se(h,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Nt=class{static format(e,r,n,s,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(e,r,n,s,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,s,i){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var kt=m(_()),ma="ft-app-info",ae=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ae.eventName="authentication-change";var Ye=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ye.eventName="ui-locale-changed";var ya={session:(t,e)=>{(0,kt.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>y.dispatchEvent(new ae(e.payload)),0))}},y=kt.FtReduxStore.get({name:ma,reducers:ya,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Es=m(_()),Dt=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},cl=(0,Es.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(y)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Nt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Dt([(0,Rr.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Dt([(0,Rr.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Dt([lr({store:y.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),Dt([lr({store:y.name})],e.prototype,"uiLocale",void 0),e});var vs;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(vs||(vs={}));var As;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(As||(As={}));var bs;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(bs||(bs={}));var _s;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(_s||(_s={}));var xs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(xs||(xs={}));var Cs;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Cs||(Cs={}));var ws;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(ws||(ws={}));var Ts;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Ts||(Ts={}));var Os;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Os||(Os={}));var Rs;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Rs||(Rs={}));var Is;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Is||(Is={}));var Ms;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ms||(Ms={}));var Ns;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ns||(Ns={}));var ks;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(ks||(ks={}));var Ds;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ds||(Ds={}));var Ls;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ls||(Ls={}));var Ir;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Ir||(Ir={}));var Ps;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ps||(Ps={}));var Fs;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fs||(Fs={}));var Mr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Mr||(Mr={}));var Us;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Us||(Us={}));var $s;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})($s||($s={}));var Hs;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hs||(Hs={}));var Bs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bs||(Bs={}));var js;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(js||(js={}));var Nr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Nr||(Nr={}));var Vs;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vs||(Vs={}));var w;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(w||(w={}));var B;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(B||(B={}));var qs;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(qs||(qs={}));var zs;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zs||(zs={}));var Ks;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Ks||(Ks={}));var Ws;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Ws||(Ws={}));var Gs;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Gs||(Gs={}));var Qs;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qs||(Qs={}));var Ys;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ys||(Ys={}));var Xs;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Xs||(Xs={}));var Js;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Js||(Js={}));var Zs;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Zs||(Zs={}));var ei;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ei||(ei={}));var ti;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ti||(ti={}));var ga={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function ri(t,e){return t===e||(ga[t]??[]).some(r=>ri(r,e))}function kr(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>ri(n,e))}var $t=m(_());var Dr=m(_());var ce=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=y.getState(),s=e??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let s=y.subscribe(()=>{n=t.get(e),n&&(s(),r(n))})}})}};var _e=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ce.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ce.await()}};var L=class extends _e{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Dr.CacheRegistry,this.cache=e?s.commonCache:new Dr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Lt=class extends L{async listMySearches(){let{session:e}=y.getState();return kr(e,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Pt=class extends L{async listMyBookmarks(){let e=y.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Ft=class extends L{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=y.getState().session;return!!e?.sessionAuthenticated}};var Ut=class extends L{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=y.getState().session;return!!e?.sessionAuthenticated}};var Sa="ft-user-assets",Ea={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(B).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:s}=e.payload;Pr(t,r,[...Lr(t,r),s]),ni(t,r,1,n),si(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;Pr(t,r,Lr(t,r).map(s=>s.id===n.id?n:s)),si(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:s}=e.payload;Pr(t,r,Lr(t,r).filter(i=>i.id!==s)),ni(t,r,-1,n)}},ii={[B.SEARCHES]:"savedSearches",[B.BOOKMARKS]:"bookmarks",[B.BOOKS]:void 0,[B.COLLECTIONS]:void 0},Lr=(t,e)=>{var r;let n=ii[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},Pr=(t,e,r)=>{let n=ii[e];n&&(t[n]=r)},ni=(t,e,r,n)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===B.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},si=(t,e)=>{let r=t.assetLabels.map(s=>s.title),n=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...n)},D=$t.FtReduxStore.get({name:Sa,reducers:Ea,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(B).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fr=class{constructor(e=new Ft,r=new Ut){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pt,this.savedSearchesService=new Lt,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=y.getState();(0,$t.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),D.actions.clearAssetCount(),D.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),D.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),D.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();D.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();D.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&D.getState().assetCounts.allAsset[e]!==r.count&&D.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&D.getState().assetCounts.bookmarkByMap[e]!==r.count&&D.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(D.getState().assetCounts.bookmarkByMap).length!==0;e===B.BOOKMARKS&&r&&D.actions.clearBookmarkCountByMap(),D.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;D.actions.bookmarks(r)}}},va=new Fr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=va);var Ur=class{addCommand(e,r=!1){y.commands.add(e,r)}consumeCommand(e){return y.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ur;var j=m(_());var oi,xe=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Aa=Symbol("clearAfterUnitTest"),Ht=class extends(0,j.withEventBus)(L){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[oi]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=y.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var s;let i=e.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new xe({loadedContexts:e})),this.dispatchEvent(new xe({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new xe({loadedContexts:[e]})),this.dispatchEvent(new xe({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};oi=Aa;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ht{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ht{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ce=window.FluidTopicsI18nService,Bt=window.FluidTopicsCustomI18nService;var ai=m(_()),$r=class{highlightHtml(e,r,n){(0,ai.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new $r;var ci=m(_());var Hr=class{isDate(e){var r,n,s,i;return(i=(s=((n=(r=y.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(e,r){var n,s,i,o;if(e==null)return"";try{return ci.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:y.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Hr;var li=m(_());var Xe=class{static get(e,r){var n,s,i,o;let a=y.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new li.SearchPlaceConverter(a.baseUrl,e??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var Br=class{urlToSearchRequest(e){return Xe.get().parse(e)}searchRequestToUrl(e){return Xe.get().serialize(e)}};window.FluidTopicsUrlService=new Br;var J=m(_());var le=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};le.eventName="change";var jr=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},ui=new jr;var jt=class t extends J.WithEventBus{static build(){return new t(window.history,ui,()=>window.location,!1)}constructor(e,r,n,s){var i,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,J.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new le(this.currentItem())),0)}installProxies(){let e=r=>(n,s,[i,o,a])=>{let c=r(),l={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(s,[l,o,a]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(le.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(le.eventName,e)}currentItem(){return(0,J.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,J.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,J.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,J.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let s=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=jt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var di=m(Q());var pi=di.css`
6
- `;var fi=m(Q()),P=m(H()),pe=m(_());var ue=m(_());function hi(t,e){let{authenticationRequired:r,session:n}=y.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Vt=class extends _e{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vr=class t extends ue.FtStateManager{static build(e){return new t(y,e)}constructor(e,r){super(),this.store=e,this.cache=new ue.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Vt,this.cleanSessionDebouncer=new ue.Debouncer,this.reloadDebouncer=new ue.Debouncer(500),this.apiProvider=r??(()=>ce.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(ae.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>hi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ye(n)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},qr=Vr.build();var de=class extends Event{constructor(e,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var Je=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new de(e.context,o,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,s=this.pendingContextRequests.get(e.context);s===void 0&&this.pendingContextRequests.set(e.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var N=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},x=class extends pe.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=qr,this.contextRoot=new Je}render(){return fi.html`
5
+ `;var Rr=m(H());var bn=m(H(),1);var cr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function _n(e,t){return(0,bn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Be(e);try{return JSON.parse(r)}catch{return Be(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:je,...t??{}})}function So(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Se(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Se(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Se(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Se(e,t){try{return So(e,t)}catch{return!1}}function je(e,t){return!Se(e,t)}function Be(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function it(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var xn=m(H(),1);var lr=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:je,attribute:!1,...t};(0,xn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var ot=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var se=m(H(),1);var at=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wn=m(Q(),1);var ct=globalThis,Eo=ct.ShadowRoot&&(ct.ShadyCSS===void 0||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cn=(e,t)=>{if(Eo)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=ct.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var lt=class extends wn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Cn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){cr(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Tn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ve=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Mn,On=Symbol("constructorPrototype"),Rn=Symbol("constructorName"),Nn=Symbol("exportpartsDebouncer"),In=Symbol("dynamicDependenciesLoaded"),Ee=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ee.eventName="exportparts-updated";var W=class extends lt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Mn]=new at(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Nn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Rn]=this.constructor.name,this[On]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Rn]&&Object.setPrototypeOf(this,this[On])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[In]||(r[In]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ee.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ee.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 Ee)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Tn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=h=>h!=null&&h.trim().length>0,l=t.filter(c).map(h=>h.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let h of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=h.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],v=(a=(o=h.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],I=[...g,...v].filter(c).map(E=>E.trim());for(let E of I)u.add(E)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(h=>l.map(g=>`${h}:${g}--${h}`));this.exportparts=[...this.part,...d].join(", ")}};Mn=Nn;ve([(0,se.property)()],W.prototype,"exportpartsPrefix",void 0);ve([_n([])],W.prototype,"exportpartsPrefixes",void 0);ve([(0,se.property)({reflect:!0})],W.prototype,"exportparts",void 0);ve([(0,se.property)()],W.prototype,"customStylesheet",void 0);ve([(0,se.property)()],W.prototype,"elementToFocus",void 0);ve([(0,se.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function ut(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ve=Symbol("internalReduxEventsUnsubscribers"),te=Symbol("internalStoresUnsubscribers"),ie=Symbol("internalStores"),vo=it(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ie].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ie].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ie].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ie].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ie].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[te].has(o.store):this[te].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[te].set(o,a.subscribe(()=>this.updateFromStores())),this[Ve].set(o,[]),ut(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=h=>this[u](h);a.addEventListener(l.eventName,d),this[Ve].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[te].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[te].has(o)&&this[te].get(o)(),this[te].delete(o),(a=this[Ve].get(o))===null||a===void 0||a.forEach(c=>c()),this[Ve].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=te,r=ie,n=Ve,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),kn=class extends vo(W){};function N(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ao=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dn=Ao,ur=()=>Math.random().toString(36).substring(7).split("").join("."),bo={INIT:`@@redux/INIT${ur()}`,REPLACE:`@@redux/REPLACE${ur()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ur()}`},dt=bo;function pt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function dr(e,t,r){if(typeof e!="function")throw new Error(N(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(N(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(N(1));return r(dr)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((E,M)=>{o.set(M,E)}))}function u(){if(c)throw new Error(N(3));return s}function d(E){if(typeof E!="function")throw new Error(N(4));if(c)throw new Error(N(5));let M=!0;l();let F=a++;return o.set(F,E),function(){if(M){if(c)throw new Error(N(6));M=!1,l(),o.delete(F),i=null}}}function h(E){if(!pt(E))throw new Error(N(7));if(typeof E.type>"u")throw new Error(N(8));if(typeof E.type!="string")throw new Error(N(17));if(c)throw new Error(N(9));try{c=!0,s=n(s,E)}finally{c=!1}return(i=o).forEach(F=>{F()}),E}function g(E){if(typeof E!="function")throw new Error(N(10));n=E,h({type:dt.REPLACE})}function v(){let E=d;return{subscribe(M){if(typeof M!="object"||M===null)throw new Error(N(11));function F(){let A=M;A.next&&A.next(u())}return F(),{unsubscribe:E(F)}},[Dn](){return this}}}return h({type:dt.INIT}),{dispatch:h,subscribe:d,getState:u,replaceReducer:g,[Dn]:v}}function _o(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:dt.INIT})>"u")throw new Error(N(12));if(typeof r(void 0,{type:dt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(N(13))})}function Ln(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{_o(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let h=n[d],g=r[h],v=a[h],I=g(v,c);if(typeof I>"u"){let E=c&&c.type;throw new Error(N(14))}u[h]=I,l=l||I!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function qe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Pn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(N(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=qe(...a)(s.dispatch),{...s,dispatch:i}}}function Fn(e){return pt(e)&&"type"in e&&typeof e.type=="string"}var Kn=Symbol.for("immer-nothing"),Un=Symbol.for("immer-draftable"),k=Symbol.for("immer-state");function q(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var U=Object,be=U.getPrototypeOf,yt="constructor",bt="prototype",mr="configurable",gt="enumerable",ft="writable",ze="value",G=e=>!!e&&!!e[k];function $(e){return e?Wn(e)||xt(e)||!!e[Un]||!!e[yt]?.[Un]||Ct(e)||wt(e):!1}var xo=U[bt][yt].toString(),$n=new WeakMap;function Wn(e){if(!e||!_r(e))return!1;let t=be(e);if(t===null||t===U[bt])return!0;let r=U.hasOwnProperty.call(t,yt)&&t[yt];if(r===Object)return!0;if(!Ae(r))return!1;let n=$n.get(r);return n===void 0&&(n=Function.toString.call(r),$n.set(r,n)),n===xo}function _t(e,t,r=!0){Ge(e)===0?(r?Reflect.ownKeys(e):U.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Ge(e){let t=e[k];return t?t.type_:xt(e)?1:Ct(e)?2:wt(e)?3:0}var pr=(e,t,r=Ge(e))=>r===2?e.has(t):U[bt].hasOwnProperty.call(e,t),yr=(e,t,r=Ge(e))=>r===2?e.get(t):e[t],St=(e,t,r,n=Ge(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Co(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var xt=Array.isArray,Ct=e=>e instanceof Map,wt=e=>e instanceof Set,_r=e=>typeof e=="object",Ae=e=>typeof e=="function",hr=e=>typeof e=="boolean";function wo(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Y=e=>e.copy_||e.base_;var xr=e=>e.modified_?e.copy_:e.base_;function gr(e,t){if(Ct(e))return new Map(e);if(wt(e))return new Set(e);if(xt(e))return Array[bt].slice.call(e);let r=Wn(e);if(t===!0||t==="class_only"&&!r){let n=U.getOwnPropertyDescriptors(e);delete n[k];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[ft]===!1&&(a[ft]=!0,a[mr]=!0),(a.get||a.set)&&(n[o]={[mr]:!0,[ft]:!0,[gt]:a[gt],[ze]:e[o]})}return U.create(be(e),n)}else{let n=be(e);if(n!==null&&r)return{...e};let s=U.create(n);return U.assign(s,e)}}function Cr(e,t=!1){return Tt(e)||G(e)||!$(e)||(Ge(e)>1&&U.defineProperties(e,{set:ht,add:ht,clear:ht,delete:ht}),U.freeze(e),t&&_t(e,(r,n)=>{Cr(n,!0)},!1)),e}function To(){q(2)}var ht={[ze]:To};function Tt(e){return e===null||!_r(e)?!0:U.isFrozen(e)}var Et="MapSet",Sr="Patches",Hn="ArrayMethods",Gn={};function oe(e){let t=Gn[e];return t||q(0,e),t}var Bn=e=>!!Gn[e];var Ke,Qn=()=>Ke,Oo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Bn(Et)?oe(Et):void 0,arrayMethodsPlugin_:Bn(Hn)?oe(Hn):void 0});function jn(e,t){t&&(e.patchPlugin_=oe(Sr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){vr(e),e.drafts_.forEach(Ro),e.drafts_=null}function vr(e){e===Ke&&(Ke=e.parent_)}var Vn=e=>Ke=Oo(Ke,e);function Ro(e){let t=e[k];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function qn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[k].modified_&&(Er(t),q(4)),$(e)&&(e=zn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[k].base_,e,t)}else e=zn(t,r);return Io(t,e,!0),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Kn?e:void 0}function zn(e,t){if(Tt(t))return t;let r=t[k];if(!r)return vt(t,e.handledSet_,e);if(!Ot(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Jn(r,e)}return r.copy_}function Io(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cr(t,r)}function Yn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ot=(e,t)=>e.scope_===t,Mo=[];function Xn(e,t,r,n){let s=Y(e),i=e.type_;if(n!==void 0&&yr(s,n,i)===t){St(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;_t(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Mo;for(let a of o)St(s,a,r,i)}function No(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!Ot(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=xr(i);Xn(e,i.draft_??i,o,r),Jn(i,s)})}function Jn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Yn(e)}}function ko(e,t,r){let{scope_:n}=e;if(G(r)){let s=r[k];Ot(s,n)&&s.callbacks_.push(function(){mt(e);let o=xr(s);Xn(e,r,o,t)})}else $(r)&&e.callbacks_.push(function(){let i=Y(e);e.type_===3?i.has(r)&&vt(r,n.handledSet_,n):yr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&vt(yr(e.copy_,t,e.type_),n.handledSet_,n)})}function vt(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(e)||t.has(e)||!$(e)||Tt(e)||(t.add(e),_t(e,(n,s)=>{if(G(s)){let i=s[k];if(Ot(i,r)){let o=xr(i);St(e,n,o,e.type_),Yn(i)}}else $(s)&&vt(s,t,r)})),e}function Do(e,t){let r=xt(e),n={type_:r?1:0,scope_:t?t.scope_:Qn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=At;r&&(s=[n],i=We);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var At={get(e,t){if(t===k)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Y(e);if(!pr(s,t,e.type_))return Po(e,s,t);let i=s[t];if(e.finalized_||!$(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&wo(t))return i;if(i===fr(e.base_,t)||Lo(e,t,i)){mt(e);let o=e.type_===1?+t:t,a=br(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Y(e)},ownKeys(e){return Reflect.ownKeys(Y(e))},set(e,t,r){let n=Zn(Y(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=fr(Y(e),t),i=s?.[k];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Co(r,s)&&(r!==void 0||pr(e.base_,t,e.type_)))return!0;mt(e),Ar(e)}return e.copy_[t]===r&&(r!==void 0||pr(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ko(e,t,r)),!0},deleteProperty(e,t){return mt(e),fr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ar(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Y(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ft]:!0,[mr]:e.type_!==1||t!=="length",[gt]:n[gt],[ze]:r[t]}},defineProperty(){q(11)},getPrototypeOf(e){return be(e.base_)},setPrototypeOf(){q(12)}},We={};for(let e in At){let t=At[e];We[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}We.deleteProperty=function(e,t){return We.set.call(this,e,t,void 0)};We.set=function(e,t,r){return At.set.call(this,e[0],t,r,e[0])};function fr(e,t){let r=e[k];return(r?Y(r):e)[t]}function Lo(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!$(r)||r[k]?!1:e.baseRefs_.has(r)}function Po(e,t,r){let n=Zn(t,r);return n?ze in n?n[ze]:n.get?.call(e.draft_):void 0}function Zn(e,t){if(!(t in e))return;let r=be(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=be(r)}}function Ar(e){e.modified_||(e.modified_=!0,e.parent_&&Ar(e.parent_))}function mt(e){e.copy_||(e.assigned_=new Map,e.copy_=gr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Fo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ae(t)&&!Ae(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ae(r)||q(6),n!==void 0&&!Ae(n)&&q(7);let s;if($(t)){let i=Vn(this),o=br(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):vr(i)}return jn(i,n),qn(s,i)}else if(!t||!_r(t)){if(s=r(t),s===void 0&&(s=t),s===Kn&&(s=void 0),this.autoFreeze_&&Cr(s,!0),n){let i=[],o=[];oe(Sr).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else q(1,t)},this.produceWithPatches=(t,r)=>{if(Ae(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},hr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),hr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),hr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){$(e)||q(8),G(e)&&(e=es(e));let t=Vn(this),r=br(t,e,void 0);return r[k].isManual_=!0,vr(t),r}finishDraft(e,t){let r=e&&e[k];(!r||!r.isManual_)&&q(9);let{scope_:n}=r;return jn(n,t),qn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=oe(Sr).applyPatches_;return G(e)?n(e,t):this.produce(e,s=>n(s,t))}};function br(e,t,r,n){let[s,i]=Ct(t)?oe(Et).proxyMap_(t,r):wt(t)?oe(Et).proxySet_(t,r):Do(t,r);return(r?.scope_??Qn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?No(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function es(e){return G(e)||q(10,e),ts(e)}function ts(e){if(!$(e)||Tt(e))return e;let t=e[k],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gr(e,!0);return _t(r,(s,i)=>{St(r,s,ts(i))},n),t&&(t.finalized_=!1),r}var Uo=globalThis.Iterator,vc=typeof Uo?.from=="function";var $o=new Fo,wr=$o.produce;function rs(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var ns=rs(),ss=rs;var Ho=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},Tc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Bo=e=>e&&typeof e.match=="function";function re(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(X(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Fn(n)&&n.type===e,r}var ls=class Qe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Qe(...t[0].concat(this)):new Qe(...t.concat(this))}};function is(e){return $(e)?wr(e,()=>{}):e}function Rt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function jo(e){return typeof e=="boolean"}var Vo=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new ls;return r&&(jo(r)?o.push(ns):o.push(ss(r.extraArgument))),o},qo="RTK_autoBatch";var os=e=>t=>{setTimeout(t,e)},zo=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Ko=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zo(window.requestAnimationFrame,100):os(10):e.type==="callback"?e.queueNotification:os(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),h=n.subscribe(d);return a.add(u),()=>{h(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[qo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Wo=e=>function(r){let{autoBatch:n=!0}=r??{},s=new ls(e);return n&&s.push(Ko(typeof n=="object"?n:void 0)),s};function us(e){let t=Vo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(pt(r))c=Ln(r);else throw new Error(X(1));let l;typeof n=="function"?l=n(t):l=t();let u=qe;s&&(u=Ho({trace:!1,...typeof s=="object"&&s}));let d=Pn(...l),h=Wo(d),g=typeof a=="function"?a(h):h(),v=u(...g);return dr(c,o,v)}function ds(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(X(28));if(a in t)throw new Error(X(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Go(e){return typeof e=="function"}function Qo(e,t){let[r,n,s]=ds(t),i;if(Go(e))i=()=>is(e());else{let a=is(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if($(u))return wr(u,h=>d(h,c));{let h=d(u,c);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return o.getInitialState=i,o}var Yo=(e,t)=>Bo(e)?e.match(t):e(t);function Xo(...e){return t=>e.some(r=>Yo(r,t))}var Jo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zo=(e=21)=>{let t="",r=e;for(;r--;)t+=Jo[Math.random()*64|0];return t},ea=["name","message","stack","code"],Tr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},as=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ta=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ea)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},cs="External signal was aborted",ra=(()=>{function e(t,r,n){let s=re(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=re(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=re(t+"/rejected",(c,l,u,d,h)=>({payload:d,error:(n&&n.serializeError||ta)(c||"Rejected"),meta:{...h||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,h)=>{let g=n?.idGenerator?n.idGenerator(c):Zo(),v=new AbortController,I,E;function M(S){E=S,v.abort()}l&&(l.aborted?M(cs):l.addEventListener("abort",()=>M(cs),{once:!0}));let F=(async function(){let S;try{let b=n?.condition?.(c,{getState:d,extra:h});if(sa(b)&&(b=await b),b===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let K=new Promise((C,T)=>{I=()=>{T({name:"AbortError",message:E||"Aborted"})},v.signal.addEventListener("abort",I,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:h}))),S=await Promise.race([K,Promise.resolve(r(c,{dispatch:u,getState:d,extra:h,requestId:g,signal:v.signal,abort:M,rejectWithValue:((C,T)=>new Tr(C,T)),fulfillWithValue:((C,T)=>new as(C,T))})).then(C=>{if(C instanceof Tr)throw C;return C instanceof as?s(C.payload,g,c,C.meta):s(C,g,c)})])}catch(b){S=b instanceof Tr?o(null,g,c,b.payload,b.meta):o(b,g,c)}finally{I&&v.signal.removeEventListener("abort",I)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(F,{abort:M,requestId:g,arg:c,unwrap(){return F.then(na)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Xo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function na(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function sa(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ps=Symbol.for("rtk-slice-createasyncthunk"),Rc={[ps]:ra};function ia(e,t){return`${e}/${t}`}function oa({creators:e}={}){let t=e?.asyncThunk?.[ps];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(X(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(ca()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,A){let b=typeof S=="string"?S:S.type;if(!b)throw new Error(X(12));if(b in c.sliceCaseReducersByType)throw new Error(X(13));return c.sliceCaseReducersByType[b]=A,l},addMatcher(S,A){return c.sliceMatchers.push({matcher:S,reducer:A}),l},exposeAction(S,A){return c.actionCreators[S]=A,l},exposeCaseReducer(S,A){return c.sliceCaseReducersByName[S]=A,l}};a.forEach(S=>{let A=o[S],b={reducerName:S,type:ia(s,S),createNotation:typeof n.reducers=="function"};ua(A)?pa(b,A,l,t):la(b,A,l)});function u(){let[S={},A=[],b=void 0]=typeof n.extraReducers=="function"?ds(n.extraReducers):[n.extraReducers],K={...S,...c.sliceCaseReducersByType};return Qo(n.initialState,C=>{for(let T in K)C.addCase(T,K[T]);for(let T of c.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of A)C.addMatcher(T.matcher,T.reducer);b&&C.addDefaultCase(b)})}let d=S=>S,h=new Map,g=new WeakMap,v;function I(S,A){return v||(v=u()),v(S,A)}function E(){return v||(v=u()),v.getInitialState()}function M(S,A=!1){function b(C){let T=C[S];return typeof T>"u"&&A&&(T=Rt(g,b,E)),T}function K(C=d){let T=Rt(h,A,()=>new WeakMap);return Rt(T,C,()=>{let hn={};for(let[lo,uo]of Object.entries(n.selectors??{}))hn[lo]=aa(uo,C,()=>Rt(g,C,E),A);return hn})}return{reducerPath:S,getSelectors:K,get selectors(){return K(b)},selectSlice:b}}let F={name:s,reducer:I,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:E,...M(i),injectInto(S,{reducerPath:A,...b}={}){let K=A??i;return S.inject({reducerPath:K,reducer:I},b),{...F,...M(K,!0)}}};return F}}function aa(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var hs=oa();function ca(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function la({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!da(n))throw new Error(X(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?re(e,o):re(e))}function ua(e){return e._reducerDefinitionType==="asyncThunk"}function da(e){return e._reducerDefinitionType==="reducerWithPrepare"}function pa({type:e,reducerName:t},r,n,s){if(!s)throw new Error(X(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||It,pending:a||It,rejected:c||It,settled:l||It})}function It(){}var fs="listener",ms="completed",ys="cancelled",Ic=`task-${ys}`,Mc=`task-${ms}`,Nc=`${fs}-${ys}`,kc=`${fs}-${ms}`;var{assign:gs}=Object;var Or="listenerMiddleware";var ha=gs(re(`${Or}/add`),{withTypes:()=>ha}),Dc=re(`${Or}/removeAll`),fa=gs(re(`${Or}/remove`),{withTypes:()=>fa});function X(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ma=it(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Mt=class extends ma(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ss=class e extends Mt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(ut(i))return i;if(s==null)return;let o=hs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=us({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Be(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ot,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,h=this.getState()[d];Se(h,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Nt=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var kt=m(_()),ya="ft-app-info",ae=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ae.eventName="authentication-change";var Ye=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ye.eventName="ui-locale-changed";var ga={session:(e,t)=>{(0,kt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>y.dispatchEvent(new ae(t.payload)),0))}},y=kt.FtReduxStore.get({name:ya,reducers:ga,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Es=m(_()),Dt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ul=(0,Es.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(y)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Nt.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Dt([(0,Rr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Dt([(0,Rr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Dt([lr({store:y.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Dt([lr({store:y.name})],t.prototype,"uiLocale",void 0),t});var vs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(vs||(vs={}));var As;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(As||(As={}));var bs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(bs||(bs={}));var _s;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(_s||(_s={}));var xs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(xs||(xs={}));var Cs;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Cs||(Cs={}));var ws;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ws||(ws={}));var Ts;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ts||(Ts={}));var Os;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Os||(Os={}));var Rs;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Rs||(Rs={}));var Is;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Is||(Is={}));var Ms;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ms||(Ms={}));var Ns;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ns||(Ns={}));var ks;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ks||(ks={}));var Ds;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ds||(Ds={}));var Ls;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ls||(Ls={}));var Ir;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Ir||(Ir={}));var Ps;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ps||(Ps={}));var Fs;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Fs||(Fs={}));var Mr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Mr||(Mr={}));var Us;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Us||(Us={}));var $s;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})($s||($s={}));var Hs;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hs||(Hs={}));var Bs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Bs||(Bs={}));var js;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(js||(js={}));var Nr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Nr||(Nr={}));var Vs;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vs||(Vs={}));var w;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(w||(w={}));var B;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(B||(B={}));var qs;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(qs||(qs={}));var zs;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(zs||(zs={}));var Ks;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ks||(Ks={}));var Ws;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ws||(Ws={}));var Gs;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Gs||(Gs={}));var Qs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Qs||(Qs={}));var Ys;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ys||(Ys={}));var Xs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Xs||(Xs={}));var Js;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Js||(Js={}));var Zs;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Zs||(Zs={}));var ei;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(ei||(ei={}));var ti;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ti||(ti={}));var Sa={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function ri(e,t){return e===t||(Sa[e]??[]).some(r=>ri(r,t))}function kr(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ri(n,t))}var $t=m(_());var Dr=m(_());var ce=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=y.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=y.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var _e=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ce.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ce.await()}};var P=class extends _e{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Dr.CacheRegistry,this.cache=t?s.commonCache:new Dr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Lt=class extends P{async listMySearches(){let{session:t}=y.getState();return kr(t,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Pt=class extends P{async listMyBookmarks(){let t=y.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Ft=class extends P{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=y.getState().session;return!!t?.sessionAuthenticated}};var Ut=class extends P{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=y.getState().session;return!!t?.sessionAuthenticated}};var Ea="ft-user-assets",va={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(B).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Pr(e,r,[...Lr(e,r),s]),ni(e,r,1,n),si(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Pr(e,r,Lr(e,r).map(s=>s.id===n.id?n:s)),si(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Pr(e,r,Lr(e,r).filter(i=>i.id!==s)),ni(e,r,-1,n)}},ii={[B.SEARCHES]:"savedSearches",[B.BOOKMARKS]:"bookmarks",[B.BOOKS]:void 0,[B.COLLECTIONS]:void 0},Lr=(e,t)=>{var r;let n=ii[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Pr=(e,t,r)=>{let n=ii[t];n&&(e[n]=r)},ni=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===B.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},si=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},D=$t.FtReduxStore.get({name:Ea,reducers:va,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(B).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fr=class{constructor(t=new Ft,r=new Ut){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pt,this.savedSearchesService=new Lt,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=y.getState();(0,$t.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),D.actions.clearAssetCount(),D.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),D.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),D.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();D.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();D.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&D.getState().assetCounts.allAsset[t]!==r.count&&D.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&D.getState().assetCounts.bookmarkByMap[t]!==r.count&&D.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(D.getState().assetCounts.bookmarkByMap).length!==0;t===B.BOOKMARKS&&r&&D.actions.clearBookmarkCountByMap(),D.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 r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;D.actions.bookmarks(r)}}},Aa=new Fr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Aa);var Ur=class{addCommand(t,r=!1){y.commands.add(t,r)}consumeCommand(t){return y.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ur;var j=m(_());var oi,xe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ba=Symbol("clearAfterUnitTest"),Ht=class extends(0,j.withEventBus)(P){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[oi]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=y.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new xe({loadedContexts:t})),this.dispatchEvent(new xe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new xe({loadedContexts:[t]})),this.dispatchEvent(new xe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};oi=ba;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ht{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ht{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ce=window.FluidTopicsI18nService,Bt=window.FluidTopicsCustomI18nService;var ai=m(_()),$r=class{highlightHtml(t,r,n){(0,ai.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new $r;var ci=m(_());var Hr=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=y.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return ci.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:y.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Hr;var li=m(_());var Xe=class{static get(t,r){var n,s,i,o;let a=y.getState(),{lang:c,region:l}=(i=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new li.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${c}-${l}`)}};var Br=class{urlToSearchRequest(t){return Xe.get().parse(t)}searchRequestToUrl(t){return Xe.get().serialize(t)}};window.FluidTopicsUrlService=new Br;var J=m(_());var le=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};le.eventName="change";var jr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ui=new jr;var jt=class e extends J.WithEventBus{static build(){return new e(window.history,ui,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,J.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new le(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=r(),l={...c===this.currentIndex?this.currentState:void 0,...i,index:c,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(s,[l,o,a]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(le.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(le.eventName,t)}currentItem(){return(0,J.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,J.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,J.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,J.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=jt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var di=m(Q());var pi=di.css`
6
+ `;var fi=m(Q()),L=m(H()),pe=m(_());var ue=m(_());function hi(e,t){let{authenticationRequired:r,session:n}=y.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Vt=class extends _e{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Vr=class e extends ue.FtStateManager{static build(t){return new e(y,t)}constructor(t,r){super(),this.store=t,this.cache=new ue.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Vt,this.cleanSessionDebouncer=new ue.Debouncer,this.reloadDebouncer=new ue.Debouncer(500),this.apiProvider=r??(()=>ce.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(ae.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>hi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.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}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ye(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},qr=Vr.build();var de=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var Je=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new de(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var O=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},x=class extends pe.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=qr,this.contextRoot=new Je}render(){return fi.html`
7
7
  <slot></slot>
8
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Ce.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};x.elementDefinitions={};x.styles=pi;N([(0,P.property)()],x.prototype,"baseUrl",void 0);N([(0,P.property)()],x.prototype,"tenantId",void 0);N([(0,P.property)()],x.prototype,"apiIntegrationIdentifier",void 0);N([(0,P.property)()],x.prototype,"apiIntegrationAppVersion",void 0);N([(0,P.property)()],x.prototype,"uiLocale",void 0);N([(0,pe.jsonProperty)(null)],x.prototype,"availableUiLocales",void 0);N([(0,pe.jsonProperty)(null)],x.prototype,"metadataConfiguration",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"editorMode",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"noCustom",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"openExternalDocumentInNewTab",void 0);N([(0,P.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],x.prototype,"noCustomComponent",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"withManualResources",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"navigatorOnline",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"forcedOffline",void 0);N([(0,P.property)({type:Boolean})],x.prototype,"authenticationRequired",void 0);N([(0,pe.jsonProperty)([])],x.prototype,"messageContexts",void 0);N([(0,pe.jsonProperty)(void 0)],x.prototype,"session",void 0);var yi=m(_());var mi={"ft-app-context":x};(0,yi.customElements)(mi);var qt=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Bt:Ce}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var we=m(_());var Ei=m(H());var zr=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},gi=new zr;var xa=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Ca=Symbol("i18nAttributes"),wa=Symbol("i18nListAttributes"),vi=Symbol("i18nProperties"),zt=Symbol("i18nContexts"),Ze=Symbol("i18nUnsubs"),Wt=(0,we.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Bt:Ce}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let h=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...h)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(gi.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,h)=>h?.context&&h.key&&i(u,d,h)?{...h,message:this.i18n({context:h.context,key:h.key,custom:h.custom,...u})}:h;(o=this[Ca])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[wa])===null||a===void 0||a.forEach((u,d)=>{var h;return c[d]=(h=c[d])===null||h===void 0?void 0:h.map(g=>l(u,d,g))})}updateI18nProperties(i){var o;(o=this[vi])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[zt].set(c,{isCustomContext:a}),this[Ze].has(c)||this[Ze].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[zt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ze].forEach(i=>i()),this[Ze].clear()}}return e=zt,r=Ze,xa([(0,Ei.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Si=class extends Wt(we.FtLitElement){},Kt=class extends Wt(we.FtLitElementRedux){};var Ai=m(Q());var bi=Ai.css`
9
- `;var Gt=m(Q()),Qt=m(H()),Yt=m(_());var et=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},z=class extends Kt{constructor(){super(),this.editorMode=!1,this.addStore(y)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Gt.nothing:Gt.html`
8
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Ce.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};x.elementDefinitions={};x.styles=pi;O([(0,L.property)()],x.prototype,"baseUrl",void 0);O([(0,L.property)()],x.prototype,"tenantId",void 0);O([(0,L.property)()],x.prototype,"apiIntegrationIdentifier",void 0);O([(0,L.property)()],x.prototype,"apiIntegrationAppVersion",void 0);O([(0,L.property)()],x.prototype,"uiLocale",void 0);O([(0,pe.jsonProperty)(null)],x.prototype,"availableUiLocales",void 0);O([(0,pe.jsonProperty)(null)],x.prototype,"metadataConfiguration",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"editorMode",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"noCustom",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"openExternalDocumentInNewTab",void 0);O([(0,L.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],x.prototype,"noCustomComponent",void 0);O([(0,L.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],x.prototype,"noCustomCode",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"withManualResources",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"navigatorOnline",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"forcedOffline",void 0);O([(0,L.property)({type:Boolean})],x.prototype,"authenticationRequired",void 0);O([(0,pe.jsonProperty)([])],x.prototype,"messageContexts",void 0);O([(0,pe.jsonProperty)(void 0)],x.prototype,"session",void 0);var yi=m(_());var mi={"ft-app-context":x};(0,yi.customElements)(mi);var qt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Bt:Ce}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var we=m(_());var Ei=m(H());var zr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},gi=new zr;var Ca=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},wa=Symbol("i18nAttributes"),Ta=Symbol("i18nListAttributes"),vi=Symbol("i18nProperties"),zt=Symbol("i18nContexts"),Ze=Symbol("i18nUnsubs"),Wt=(0,we.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Bt:Ce}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let h=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...h)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(gi.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,h)=>h?.context&&h.key&&i(u,d,h)?{...h,message:this.i18n({context:h.context,key:h.key,custom:h.custom,...u})}:h;(o=this[wa])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Ta])===null||a===void 0||a.forEach((u,d)=>{var h;return c[d]=(h=c[d])===null||h===void 0?void 0:h.map(g=>l(u,d,g))})}updateI18nProperties(i){var o;(o=this[vi])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[zt].set(c,{isCustomContext:a}),this[Ze].has(c)||this[Ze].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[zt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ze].forEach(i=>i()),this[Ze].clear()}}return t=zt,r=Ze,Ca([(0,Ei.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Si=class extends Wt(we.FtLitElement){},Kt=class extends Wt(we.FtLitElementRedux){};var Ai=m(Q());var bi=Ai.css`
9
+ `;var Gt=m(Q()),Qt=m(H()),Yt=m(_());var et=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},z=class extends Kt{constructor(){super(),this.editorMode=!1,this.addStore(y)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Gt.nothing:Gt.html`
10
10
  <span class="ft-i18n">
11
11
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
12
12
  </span>
13
- `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};z.elementDefinitions={};z.styles=bi;et([(0,Yt.redux)()],z.prototype,"editorMode",void 0);et([(0,Qt.property)()],z.prototype,"context",void 0);et([(0,Qt.property)()],z.prototype,"key",void 0);et([(0,Yt.jsonProperty)([])],z.prototype,"args",void 0);et([(0,Qt.property)()],z.prototype,"defaultMessage",void 0);var xi=m(_());var _i={"ft-i18n":z};(0,xi.customElements)(_i);var rr=m(_());var Te=m(_()),Gr=m(H());var Kr;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Kr||(Kr={}));var he=m(_());var Ta=m(_());var Xt=class t extends Event{constructor(){super(t.eventName)}};Xt.eventName="search-context-clear-all-filters";var Ci=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Qr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},wi=Symbol("registerInterval"),Wr=Symbol("registerAttempts"),Oa=40,Ra=(0,Te.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,o;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(o=this.stateManager)===null||o===void 0||o.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Wr]=0,this.tryToRegisterToContext(),this[wi]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Wr]>Oa?window.clearInterval(this[wi]):(this[Wr]++,this.dispatchEvent(new Qr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ci([(0,Gr.state)()],e.prototype,"stateManager",void 0),Ci([(0,Gr.state)({hasChanged:Te.hasChanged})],e.prototype,"neededSearchRequests",void 0),e}),Jt=class extends Ra(Te.FtLitElementRedux){};var er=m(H()),Zt=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},Xr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Yr=Symbol("registerInterval"),Ia=(0,rr.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setResultStateManager(s){this.resultStateManager=s}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Yr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Yr]):this.dispatchEvent(new Xr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return e=Yr,Zt([(0,er.property)({attribute:!1})],r.prototype,"cluster",void 0),Zt([(0,er.property)({attribute:!1})],r.prototype,"result",void 0),Zt([(0,rr.numberProperty)()],r.prototype,"rank",void 0),Zt([(0,er.property)({attribute:!1,type:Boolean})],r.prototype,"openResultInNewTab",void 0),r}),tr=class extends Ia(Jt){};var Jr=qt.build("designedSearchResultMissingTermsMessages");var oo=m(_());var on=globalThis,Ti=t=>t,nr=on.trustedTypes,Oi=nr?nr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Di="$lit$",ne=`lit$${Math.random().toFixed(9).slice(2)}$`,Li="?"+ne,Ma=`<${Li}>`,ye=document,sr=()=>ye.createComment(""),rt=t=>t===null||typeof t!="object"&&typeof t!="function",an=Array.isArray,Na=t=>an(t)||typeof t?.[Symbol.iterator]=="function",Zr=`[
13
+ `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};z.elementDefinitions={};z.styles=bi;et([(0,Yt.redux)()],z.prototype,"editorMode",void 0);et([(0,Qt.property)()],z.prototype,"context",void 0);et([(0,Qt.property)()],z.prototype,"key",void 0);et([(0,Yt.jsonProperty)([])],z.prototype,"args",void 0);et([(0,Qt.property)()],z.prototype,"defaultMessage",void 0);var xi=m(_());var _i={"ft-i18n":z};(0,xi.customElements)(_i);var rr=m(_());var Te=m(_()),Gr=m(H());var Kr;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Kr||(Kr={}));var he=m(_());var Oa=m(_());var Xt=class e extends Event{constructor(){super(e.eventName)}};Xt.eventName="search-context-clear-all-filters";var Ci=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Qr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},wi=Symbol("registerInterval"),Wr=Symbol("registerAttempts"),Ra=40,Ia=(0,Te.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,o;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(o=this.stateManager)===null||o===void 0||o.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Wr]=0,this.tryToRegisterToContext(),this[wi]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Wr]>Ra?window.clearInterval(this[wi]):(this[Wr]++,this.dispatchEvent(new Qr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ci([(0,Gr.state)()],t.prototype,"stateManager",void 0),Ci([(0,Gr.state)({hasChanged:Te.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Jt=class extends Ia(Te.FtLitElementRedux){};var er=m(H()),Zt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Xr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Yr=Symbol("registerInterval"),Ma=(0,rr.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(s){this.resultStateManager=s}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Yr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Yr]):this.dispatchEvent(new Xr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Yr,Zt([(0,er.property)({attribute:!1})],r.prototype,"cluster",void 0),Zt([(0,er.property)({attribute:!1})],r.prototype,"result",void 0),Zt([(0,rr.numberProperty)()],r.prototype,"rank",void 0),Zt([(0,er.property)({attribute:!1,type:Boolean})],r.prototype,"openResultInNewTab",void 0),r}),tr=class extends Ma(Jt){};var Jr=qt.build("designedSearchResultMissingTermsMessages");var oo=m(_());var on=globalThis,Ti=e=>e,nr=on.trustedTypes,Oi=nr?nr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Di="$lit$",ne=`lit$${Math.random().toFixed(9).slice(2)}$`,Li="?"+ne,Na=`<${Li}>`,ye=document,sr=()=>ye.createComment(""),rt=e=>e===null||typeof e!="object"&&typeof e!="function",an=Array.isArray,ka=e=>an(e)||typeof e?.[Symbol.iterator]=="function",Zr=`[
14
14
  \f\r]`,tt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ri=/-->/g,Ii=/>/g,fe=RegExp(`>|${Zr}(?:([^\\s"'>=/]+)(${Zr}*=${Zr}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Mi=/'/g,Ni=/"/g,Pi=/^(?:script|style|textarea|title)$/i,cn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Fi=cn(1),Ui=cn(2),$i=cn(3),nt=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),ki=new WeakMap,me=ye.createTreeWalker(ye,129);function Hi(t,e){if(!an(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oi!==void 0?Oi.createHTML(e):e}var ka=(t,e)=>{let r=t.length-1,n=[],s,i=e===2?"<svg>":e===3?"<math>":"",o=tt;for(let a=0;a<r;a++){let c=t[a],l,u,d=-1,h=0;for(;h<c.length&&(o.lastIndex=h,u=o.exec(c),u!==null);)h=o.lastIndex,o===tt?u[1]==="!--"?o=Ri:u[1]!==void 0?o=Ii:u[2]!==void 0?(Pi.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=fe):u[3]!==void 0&&(o=fe):o===fe?u[0]===">"?(o=s??tt,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?fe:u[3]==='"'?Ni:Mi):o===Ni||o===Mi?o=fe:o===Ri||o===Ii?o=tt:(o=fe,s=void 0);let g=o===fe&&t[a+1].startsWith("/>")?" ":"";i+=o===tt?c+Ma:d>=0?(n.push(l),c.slice(0,d)+Di+c.slice(d)+ne+g):c+ne+(d===-2?a:g)}return[Hi(t,i+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},st=class t{constructor({strings:e,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=e.length-1,c=this.parts,[l,u]=ka(e,r);if(this.el=t.createElement(l,n),me.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=me.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(Di)){let h=u[o++],g=s.getAttribute(d).split(ne),v=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:v[2],strings:g,ctor:v[1]==="."?tn:v[1]==="?"?rn:v[1]==="@"?nn:Re}),s.removeAttribute(d)}else d.startsWith(ne)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(Pi.test(s.tagName)){let d=s.textContent.split(ne),h=d.length-1;if(h>0){s.textContent=nr?nr.emptyScript:"";for(let g=0;g<h;g++)s.append(d[g],sr()),me.nextNode(),c.push({type:2,index:++i});s.append(d[h],sr())}}}else if(s.nodeType===8)if(s.data===Li)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(ne,d+1))!==-1;)c.push({type:7,index:i}),d+=ne.length-1}i++}}static createElement(e,r){let n=ye.createElement("template");return n.innerHTML=e,n}};function Oe(t,e,r=t,n){if(e===nt)return e;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=rt(e)?void 0:e._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(t),s._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(e=Oe(t,s._$AS(t,e.values),s,n)),e}var en=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,s=(e?.creationScope??ye).importNode(r,!0);me.currentNode=s;let i=me.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new ir(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new sn(i,this,e)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=me.nextNode(),o++)}return me.currentNode=ye,s}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},ir=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,s){this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Oe(this,e,r),rt(e)?e===O||e==null||e===""?(this._$AH!==O&&this._$AR(),this._$AH=O):e!==this._$AH&&e!==nt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Na(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==O&&rt(this._$AH)?this._$AA.nextSibling.data=e:this.T(ye.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=st.createElement(Hi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new en(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(e){let r=ki.get(e.strings);return r===void 0&&ki.set(e.strings,r=new st(e)),r}k(e){an(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of e)s===r.length?r.push(n=new t(this.O(sr()),this.O(sr()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=Ti(e).nextSibling;Ti(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,s,i){this.type=1,this._$AH=O,this._$AN=void 0,this.element=e,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=O}_$AI(e,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)e=Oe(this,e,r,0),o=!rt(e)||e!==this._$AH&&e!==nt,o&&(this._$AH=e);else{let a=e,c,l;for(e=i[0],c=0;c<i.length-1;c++)l=Oe(this,a[n+c],r,c),l===nt&&(l=this._$AH[c]),o||=!rt(l)||l!==this._$AH[c],l===O?e=O:e!==O&&(e+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(e)}j(e){e===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},tn=class extends Re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===O?void 0:e}},rn=class extends Re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==O)}},nn=class extends Re{constructor(e,r,n,s,i){super(e,r,n,s,i),this.type=5}_$AI(e,r=this){if((e=Oe(this,e,r,0)??O)===nt)return;let n=this._$AH,s=e===O&&n!==O||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==O&&(n===O||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},sn=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Oe(this,e)}};var Da=on.litHtmlPolyfillSupport;Da?.(st,ir),(on.litHtmlVersions??=[]).push("3.3.3");var ji=Symbol.for(""),La=t=>{if(t?.r===ji)return t?._$litStatic$},ln=t=>({_$litStatic$:t,r:ji});var Bi=new Map,un=t=>(e,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=e[l];l<n&&(i=r[l],(s=La(i))!==void 0);)c+=s+e[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(e[n]),u){let d=o.join("$$lit$$");(e=Bi.get(d))===void 0&&(o.raw=o,Bi.set(d,e=o)),r=a}return t(e,...r)},dn=un(Fi),Dp=un(Ui),Lp=un($i);var pn=m(H()),ro=m(_());var or;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(or||(or={}));var V=m(Q()),p=m(_()),Vi=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),Z=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),f={fontFamily:Z,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Ie={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Vi),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",f.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",f.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",f.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",f.textTransform,"inherit")},Me={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Vi),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",f.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",f.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",f.textTransform,"inherit")},Ne={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",f.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",f.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",f.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",f.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",f.textTransform,"inherit")},ke={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",f.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",f.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",f.textTransform,"inherit")},De={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",f.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",f.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",f.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",f.textTransform,"inherit")},Le={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",f.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",f.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",f.textTransform,"inherit")},Pe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",f.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",f.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",f.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",f.textTransform,"inherit")},Fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",f.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",f.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",f.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",f.textTransform,"inherit")},Ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",f.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",f.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",f.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",f.textTransform,"uppercase")},$e={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",f.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",f.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",f.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",f.textTransform,"uppercase")},qi=V.css`
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Mi=/'/g,Ni=/"/g,Pi=/^(?:script|style|textarea|title)$/i,cn=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Fi=cn(1),Ui=cn(2),$i=cn(3),nt=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),ki=new WeakMap,me=ye.createTreeWalker(ye,129);function Hi(e,t){if(!an(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Oi!==void 0?Oi.createHTML(t):t}var Da=(e,t)=>{let r=e.length-1,n=[],s,i=t===2?"<svg>":t===3?"<math>":"",o=tt;for(let a=0;a<r;a++){let c=e[a],l,u,d=-1,h=0;for(;h<c.length&&(o.lastIndex=h,u=o.exec(c),u!==null);)h=o.lastIndex,o===tt?u[1]==="!--"?o=Ri:u[1]!==void 0?o=Ii:u[2]!==void 0?(Pi.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=fe):u[3]!==void 0&&(o=fe):o===fe?u[0]===">"?(o=s??tt,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?fe:u[3]==='"'?Ni:Mi):o===Ni||o===Mi?o=fe:o===Ri||o===Ii?o=tt:(o=fe,s=void 0);let g=o===fe&&e[a+1].startsWith("/>")?" ":"";i+=o===tt?c+Na:d>=0?(n.push(l),c.slice(0,d)+Di+c.slice(d)+ne+g):c+ne+(d===-2?a:g)}return[Hi(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},st=class e{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=t.length-1,c=this.parts,[l,u]=Da(t,r);if(this.el=e.createElement(l,n),me.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=me.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(Di)){let h=u[o++],g=s.getAttribute(d).split(ne),v=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:v[2],strings:g,ctor:v[1]==="."?tn:v[1]==="?"?rn:v[1]==="@"?nn:Re}),s.removeAttribute(d)}else d.startsWith(ne)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(Pi.test(s.tagName)){let d=s.textContent.split(ne),h=d.length-1;if(h>0){s.textContent=nr?nr.emptyScript:"";for(let g=0;g<h;g++)s.append(d[g],sr()),me.nextNode(),c.push({type:2,index:++i});s.append(d[h],sr())}}}else if(s.nodeType===8)if(s.data===Li)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(ne,d+1))!==-1;)c.push({type:7,index:i}),d+=ne.length-1}i++}}static createElement(t,r){let n=ye.createElement("template");return n.innerHTML=t,n}};function Oe(e,t,r=e,n){if(t===nt)return t;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=rt(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(t=Oe(e,s._$AS(e,t.values),s,n)),t}var en=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,s=(t?.creationScope??ye).importNode(r,!0);me.currentNode=s;let i=me.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new ir(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new sn(i,this,t)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=me.nextNode(),o++)}return me.currentNode=ye,s}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},ir=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Oe(this,t,r),rt(t)?t===R||t==null||t===""?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==nt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ka(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==R&&rt(this._$AH)?this._$AA.nextSibling.data=t:this.T(ye.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=st.createElement(Hi(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new en(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(t){let r=ki.get(t.strings);return r===void 0&&ki.set(t.strings,r=new st(t)),r}k(t){an(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of t)s===r.length?r.push(n=new e(this.O(sr()),this.O(sr()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=Ti(t).nextSibling;Ti(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,i){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=R}_$AI(t,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)t=Oe(this,t,r,0),o=!rt(t)||t!==this._$AH&&t!==nt,o&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=Oe(this,a[n+c],r,c),l===nt&&(l=this._$AH[c]),o||=!rt(l)||l!==this._$AH[c],l===R?t=R:t!==R&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},tn=class extends Re{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}},rn=class extends Re{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==R)}},nn=class extends Re{constructor(t,r,n,s,i){super(t,r,n,s,i),this.type=5}_$AI(t,r=this){if((t=Oe(this,t,r,0)??R)===nt)return;let n=this._$AH,s=t===R&&n!==R||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==R&&(n===R||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},sn=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Oe(this,t)}};var La=on.litHtmlPolyfillSupport;La?.(st,ir),(on.litHtmlVersions??=[]).push("3.3.3");var ji=Symbol.for(""),Pa=e=>{if(e?.r===ji)return e?._$litStatic$},ln=e=>({_$litStatic$:e,r:ji});var Bi=new Map,un=e=>(t,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=t[l];l<n&&(i=r[l],(s=Pa(i))!==void 0);)c+=s+t[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(t[n]),u){let d=o.join("$$lit$$");(t=Bi.get(d))===void 0&&(o.raw=o,Bi.set(d,t=o)),r=a}return e(t,...r)},dn=un(Fi),Pp=un(Ui),Fp=un($i);var pn=m(H()),ro=m(_());var or;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(or||(or={}));var V=m(Q()),p=m(_()),Vi=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),Z=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),f={fontFamily:Z,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Ie={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Vi),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",f.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",f.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",f.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",f.textTransform,"inherit")},Me={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Vi),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",f.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",f.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",f.textTransform,"inherit")},Ne={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",f.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",f.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",f.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",f.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",f.textTransform,"inherit")},ke={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",f.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",f.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",f.textTransform,"inherit")},De={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",f.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",f.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",f.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",f.textTransform,"inherit")},Le={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",f.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",f.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",f.textTransform,"inherit")},Pe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",f.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",f.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",f.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",f.textTransform,"inherit")},Fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",f.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",f.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",f.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",f.textTransform,"inherit")},Ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",f.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",f.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",f.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",f.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",f.textTransform,"uppercase")},$e={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Z),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",f.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",f.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",f.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",f.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",f.textTransform,"uppercase")},qi=V.css`
16
16
  .ft-typography--title {
17
17
  font-family: ${Ie.fontFamily};
18
18
  font-size: ${Ie.fontSize};
@@ -107,7 +107,7 @@
107
107
  .ft-typography {
108
108
  vertical-align: inherit;
109
109
  }
110
- `;var to=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},ee=class extends ro.FtLitElement{constructor(){super(...arguments),this.variant=or.body1}render(){return this.element?dn`
110
+ `;var to=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ee=class extends ro.FtLitElement{constructor(){super(...arguments),this.variant=or.body1}render(){return this.element?dn`
111
111
  <${ln(this.element)}
112
112
  part="text"
113
113
  class="ft-typography ft-typography--${this.variant}">
@@ -115,12 +115,12 @@
115
115
  </${ln(this.element)}>
116
116
  `:dn`
117
117
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
118
- `}};ee.styles=[qi,zi,Ki,Wi,Gi,Qi,Yi,Xi,Ji,Zi,eo];to([(0,pn.property)()],ee.prototype,"element",void 0);to([(0,pn.property)()],ee.prototype,"variant",void 0);var so=m(_());var no={"ft-typography":ee};(0,so.customElements)(no);var Pa=function(t,e,r,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i},ge=class extends Wt(tr){constructor(){super(),this.missingTerms=[],this.addI18nContext(Jr,{missing:"Missing:"})}update(e){var r;super.update(e),e.has("result")&&(this.missingTerms=((r=this.result)===null||r===void 0?void 0:r.missingTerms)||[])}render(){return this.missingTerms.length?He.html`
118
+ `}};ee.styles=[qi,zi,Ki,Wi,Gi,Qi,Yi,Xi,Ji,Zi,eo];to([(0,pn.property)()],ee.prototype,"element",void 0);to([(0,pn.property)()],ee.prototype,"variant",void 0);var so=m(_());var no={"ft-typography":ee};(0,so.customElements)(no);var Fa=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ge=class extends Wt(tr){constructor(){super(),this.missingTerms=[],this.addI18nContext(Jr,{missing:"Missing:"})}update(t){var r;super.update(t),t.has("result")&&(this.missingTerms=((r=this.result)===null||r===void 0?void 0:r.missingTerms)||[])}render(){return this.missingTerms.length?He.html`
119
119
  <ft-typography variant="body2" part="missing-terms" class="ft-search-result-missing-terms">
120
120
  <span>${Jr.messages.missing()}</span>
121
- ${Sn(En(this.missingTerms,e=>He.html`<span part="missing-term">${e}</span>`),He.html`<span part="missing-terms-separator">, </span>`)}
121
+ ${Sn(En(this.missingTerms,t=>He.html`<span part="missing-term">${t}</span>`),He.html`<span part="missing-terms-separator">, </span>`)}
122
122
  </ft-typography>
123
- `:He.nothing}};ge.elementDefinitions={"ft-typography":ee};ge.styles=An;Pa([(0,io.state)({hasChanged:oo.hasChanged})],ge.prototype,"missingTerms",void 0);var ao={"ft-search-result-missing-terms":ge};(0,co.customElements)(ao);})();
123
+ `:He.nothing}};ge.elementDefinitions={"ft-typography":ee};ge.styles=An;Fa([(0,io.state)({hasChanged:oo.hasChanged})],ge.prototype,"missingTerms",void 0);var ao={"ft-search-result-missing-terms":ge};(0,co.customElements)(ao);})();
124
124
  /*! Bundled license information:
125
125
 
126
126
  lit-html/directives/join.js: