@fluid-topics/ftds-period-picker 2.2.49 → 2.2.50
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,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var su=Object.create;var js=Object.defineProperty;var cu=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var du=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty;var Dr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var fu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of lu(t))!uu.call(e,a)&&a!==r&&js(e,a,{get:()=>t[a],enumerable:!(n=cu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?su(du(e)):{},fu(t||!e||!e.__esModule?js(r,"default",{value:e,enumerable:!0}):r,e));var w=Dr((Em,Ks)=>{Ks.exports=ftGlobals.wcUtils});var D=Dr((Lm,Zs)=>{Zs.exports=ftGlobals.lit});var K=Dr((Am,qs)=>{qs.exports=ftGlobals.litDecorators});var Ya=Dr((_m,Ys)=>{Ys.exports=ftGlobals.litRepeat});var Qe=Dr((j7,r1)=>{r1.exports=ftGlobals.litClassMap});var _2=Dr((qv,R2)=>{R2.exports=ftGlobals.litUnsafeHTML});var nu=b(w());var hn=b(D()),Ke=b(K());function at(e,t,r){return e?t(e):r?.(e)}var K4=b(Ya()),ft=b(w());var yi=b(K());var Xs=b(K(),1);var Xa=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},pu=e=>({fromAttribute:t=>{if(t==null)return Co(e);try{return JSON.parse(t)}catch{return Co(e)}},toAttribute:t=>JSON.stringify(t)});function Qs(e,t){return(0,Xs.property)({type:Object,converter:pu(e),hasChanged:Eo,...t??{}})}function mu(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(!Fr(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(!Fr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(r=i.length,r!==a(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 s=i[n];if(!Fr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Fr(e,t){try{return mu(e,t)}catch{return!1}}function Eo(e,t){return!Fr(e,t)}function Co(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var Js=b(K(),1);var Qa=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Eo,attribute:!1,...t};(0,Js.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var bn=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 rr=b(K(),1);var xn=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);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 Sn=b(D(),1);var vn=class extends Sn.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(0,Sn.adoptStyles)(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){Xa(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 ec(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Ur=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},nc,tc=Symbol("constructorPrototype"),rc=Symbol("constructorName"),ac=Symbol("exportpartsDebouncer"),oc=Symbol("dynamicDependenciesLoaded"),$r=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};$r.eventName="exportparts-updated";var ht=class extends vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[nc]=new xn(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[ac].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.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[rc]=this.constructor.name,this[tc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[rc]&&Object.setPrototypeOf(this,this[tc])}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[oc]||(r[oc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener($r.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener($r.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 $r)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=ec(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;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((a=this.customStylesheet)!==null&&a!==void 0?a:"")}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,a,i,s,l;let u=x=>x!=null&&x.trim().length>0,m=t.filter(u).map(x=>x.trim());if(m.length===0){this.exportparts=void 0;return}let g=new Set;for(let x of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(n=x.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],R=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],_=[...v,...R].filter(u).map(O=>O.trim());for(let O of _)g.add(O)}if(g.size===0){this.exportparts=void 0;return}let h=[...g.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...h].join(", ")}};nc=ac;Ur([(0,rr.property)()],ht.prototype,"exportpartsPrefix",void 0);Ur([Qs([])],ht.prototype,"exportpartsPrefixes",void 0);Ur([(0,rr.property)({reflect:!0})],ht.prototype,"exportparts",void 0);Ur([(0,rr.property)()],ht.prototype,"customStylesheet",void 0);Ur([(0,rr.property)()],ht.prototype,"elementToFocus",void 0);Ur([(0,rr.state)()],ht.prototype,"useAdoptedStyleSheets",void 0);function Cn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Lo=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),or=Symbol("internalStores"),hu=yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[or].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[or].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[or].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[or].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[or].delete(l)}setupStores(){this.unsubscribeFromStores(),this[or].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[Ft].has(s.store):this[Ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Lo].set(s,[]),Cn(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((g,h)=>{this.getStore(g.store)===l&&l.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((g,h)=>{if(typeof this[h]=="function"&&(!g.store||l.name===g.store)){let x=v=>this[h](v);l.addEventListener(g.eventName,x),this[Lo].get(s).push(()=>l.removeEventListener(g.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ft].has(s)&&this[Ft].get(s)(),this[Ft].delete(s),(l=this[Lo].get(s))===null||l===void 0||l.forEach(u=>u()),this[Lo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Ft,r=or,n=Lo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ic=class extends hu(ht){};function xe(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 gu=typeof Symbol=="function"&&Symbol.observable||"@@observable",sc=gu,Ja=()=>Math.random().toString(36).substring(7).split("").join("."),yu={INIT:`@@redux/INIT${Ja()}`,REPLACE:`@@redux/REPLACE${Ja()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ja()}`},En=yu;function Ln(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 ei(e,t,r){if(typeof e!="function")throw new Error(xe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(ei)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,u=!1;function m(){s===i&&(s=new Map,i.forEach((O,k)=>{s.set(k,O)}))}function g(){if(u)throw new Error(xe(3));return a}function h(O){if(typeof O!="function")throw new Error(xe(4));if(u)throw new Error(xe(5));let k=!0;m();let F=l++;return s.set(F,O),function(){if(k){if(u)throw new Error(xe(6));k=!1,m(),s.delete(F),i=null}}}function x(O){if(!Ln(O))throw new Error(xe(7));if(typeof O.type>"u")throw new Error(xe(8));if(typeof O.type!="string")throw new Error(xe(17));if(u)throw new Error(xe(9));try{u=!0,a=n(a,O)}finally{u=!1}return(i=s).forEach(F=>{F()}),O}function v(O){if(typeof O!="function")throw new Error(xe(10));n=O,x({type:En.REPLACE})}function R(){let O=h;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(xe(11));function F(){let P=k;P.next&&P.next(g())}return F(),{unsubscribe:O(F)}},[sc](){return this}}}return x({type:En.INIT}),{dispatch:x,subscribe:h,getState:g,replaceReducer:v,[sc]:R}}function bu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:En.INIT})>"u")throw new Error(xe(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function ti(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(r[l]=e[l])}let n=Object.keys(r),a,i;try{bu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,g={};for(let h=0;h<n.length;h++){let x=n[h],v=r[x],R=l[x],_=v(R,u);if(typeof _>"u"){let O=u&&u.type;throw new Error(xe(14))}g[x]=_,m=m||_!==R}return m=m||n.length!==Object.keys(l).length,m?g:l}}function Ao(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function cc(...e){return t=>(r,n)=>{let a=t(r,n),i=()=>{throw new Error(xe(15))},s={getState:a.getState,dispatch:(u,...m)=>i(u,...m)},l=e.map(u=>u(s));return i=Ao(...l)(a.dispatch),{...a,dispatch:i}}}function lc(e){return Ln(e)&&"type"in e&&typeof e.type=="string"}var bc=Symbol.for("immer-nothing"),dc=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function it(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pe=Object,Hr=Pe.getPrototypeOf,Rn="constructor",kn="prototype",ai="configurable",_n="enumerable",On="writable",Oo="value",gt=e=>!!e&&!!e[Oe];function De(e){return e?xc(e)||Pn(e)||!!e[dc]||!!e[Rn]?.[dc]||Dn(e)||zo(e):!1}var xu=Pe[kn][Rn].toString(),uc=new WeakMap;function xc(e){if(!e||!pi(e))return!1;let t=Hr(e);if(t===null||t===Pe[kn])return!0;let r=Pe.hasOwnProperty.call(t,Rn)&&t[Rn];if(r===Object)return!0;if(!Br(r))return!1;let n=uc.get(r);return n===void 0&&(n=Function.toString.call(r),uc.set(r,n)),n===xu}function Tn(e,t,r=!0){_o(e)===0?(r?Reflect.ownKeys(e):Pe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function _o(e){let t=e[Oe];return t?t.type_:Pn(e)?1:Dn(e)?2:zo(e)?3:0}var ri=(e,t,r=_o(e))=>r===2?e.has(t):Pe[kn].hasOwnProperty.call(e,t),ii=(e,t,r=_o(e))=>r===2?e.get(t):e[t],zn=(e,t,r,n=_o(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pn=Array.isArray,Dn=e=>e instanceof Map,zo=e=>e instanceof Set,pi=e=>typeof e=="object",Br=e=>typeof e=="function",oi=e=>typeof e=="boolean";function Su(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var At=e=>e.copy_||e.base_;var mi=e=>e.modified_?e.copy_:e.base_;function si(e,t){if(Dn(e))return new Map(e);if(zo(e))return new Set(e);if(Pn(e))return Array[kn].slice.call(e);let r=xc(e);if(t===!0||t==="class_only"&&!r){let n=Pe.getOwnPropertyDescriptors(e);delete n[Oe];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[On]===!1&&(l[On]=!0,l[ai]=!0),(l.get||l.set)&&(n[s]={[ai]:!0,[On]:!0,[_n]:l[_n],[Oo]:e[s]})}return Pe.create(Hr(e),n)}else{let n=Hr(e);if(n!==null&&r)return{...e};let a=Pe.create(n);return Pe.assign(a,e)}}function Fn(e,t=!1){return $n(e)||gt(e)||!De(e)||(_o(e)>1&&Pe.defineProperties(e,{set:An,add:An,clear:An,delete:An}),Pe.freeze(e),t&&Tn(e,(r,n)=>{Fn(n,!0)},!1)),e}function Cu(){it(2)}var An={[Oo]:Cu};function $n(e){return e===null||!pi(e)?!0:Pe.isFrozen(e)}var In="MapSet",ci="Patches",fc="ArrayMethods",vc={};function nr(e){let t=vc[e];return t||it(0,e),t}var pc=e=>!!vc[e];var wo,Sc=()=>wo,Eu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:pc(In)?nr(In):void 0,arrayMethodsPlugin_:pc(fc)?nr(fc):void 0});function mc(e,t){t&&(e.patchPlugin_=nr(ci),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function li(e){di(e),e.drafts_.forEach(Lu),e.drafts_=null}function di(e){e===wo&&(wo=e.parent_)}var hc=e=>wo=Eu(wo,e);function Lu(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[Oe].modified_&&(li(t),it(4)),De(e)&&(e=yc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[Oe].base_,e,t)}else e=yc(t,r);return Au(t,e,!0),li(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==bc?e:void 0}function yc(e,t){if($n(t))return t;let r=t[Oe];if(!r)return Nn(t,e.handledSet_,e);if(!Un(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);Lc(r,e)}return r.copy_}function Au(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fn(t,r)}function Cc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Un=(e,t)=>e.scope_===t,Ou=[];function Ec(e,t,r,n){let a=At(e),i=e.type_;if(n!==void 0&&ii(a,n,i)===t){zn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Tn(a,(u,m)=>{if(gt(m)){let g=l.get(m)||[];g.push(u),l.set(m,g)}})}let s=e.draftLocations_.get(t)??Ou;for(let l of s)zn(a,l,r,i)}function wu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Un(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=mi(i);Ec(e,i.draft_??i,s,r),Lc(i,a)})}function Lc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}Cc(e)}}function Ru(e,t,r){let{scope_:n}=e;if(gt(r)){let a=r[Oe];Un(a,n)&&a.callbacks_.push(function(){wn(e);let s=mi(a);Ec(e,r,s,t)})}else De(r)&&e.callbacks_.push(function(){let i=At(e);e.type_===3?i.has(r)&&Nn(r,n.handledSet_,n):ii(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nn(ii(e.copy_,t,e.type_),n.handledSet_,n)})}function Nn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||gt(e)||t.has(e)||!De(e)||$n(e)||(t.add(e),Tn(e,(n,a)=>{if(gt(a)){let i=a[Oe];if(Un(i,r)){let s=mi(i);zn(e,n,s,e.type_),Cc(i)}}else De(a)&&Nn(a,t,r)})),e}function _u(e,t){let r=Pn(e),n={type_:r?1:0,scope_:t?t.scope_:Sc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=Mn;r&&(a=[n],i=Ro);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Mn={get(e,t){if(t===Oe)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 a=At(e);if(!ri(a,t,e.type_))return Iu(e,a,t);let i=a[t];if(e.finalized_||!De(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Su(t))return i;if(i===ni(e.base_,t)||zu(e,t,i)){wn(e);let s=e.type_===1?+t:t,l=fi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in At(e)},ownKeys(e){return Reflect.ownKeys(At(e))},set(e,t,r){let n=Ac(At(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=ni(At(e),t),i=a?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(vu(r,a)&&(r!==void 0||ri(e.base_,t,e.type_)))return!0;wn(e),ui(e)}return e.copy_[t]===r&&(r!==void 0||ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ru(e,t,r)),!0},deleteProperty(e,t){return wn(e),ni(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=At(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[On]:!0,[ai]:e.type_!==1||t!=="length",[_n]:n[_n],[Oo]:r[t]}},defineProperty(){it(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){it(12)}},Ro={};for(let e in Mn){let t=Mn[e];Ro[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ro.deleteProperty=function(e,t){return Ro.set.call(this,e,t,void 0)};Ro.set=function(e,t,r){return Mn.set.call(this,e[0],t,r,e[0])};function ni(e,t){let r=e[Oe];return(r?At(r):e)[t]}function zu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!De(r)||r[Oe]?!1:e.baseRefs_.has(r)}function Iu(e,t,r){let n=Ac(t,r);return n?Oo in n?n[Oo]:n.get?.call(e.draft_):void 0}function Ac(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Hr(r)}}function ui(e){e.modified_||(e.modified_=!0,e.parent_&&ui(e.parent_))}function wn(e){e.copy_||(e.assigned_=new Map,e.copy_=si(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Nu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Br(t)&&!Br(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,g=>r.call(this,g,...m))}}Br(r)||it(6),n!==void 0&&!Br(n)&&it(7);let a;if(De(t)){let i=hc(this),s=fi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?li(i):di(i)}return mc(i,n),gc(a,i)}else if(!t||!pi(t)){if(a=r(t),a===void 0&&(a=t),a===bc&&(a=void 0),this.autoFreeze_&&Fn(a,!0),n){let i=[],s=[];nr(ci).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else it(1,t)},this.produceWithPatches=(t,r)=>{if(Br(t))return(s,...l)=>this.produceWithPatches(s,u=>t(u,...l));let n,a;return[this.produce(t,r,(s,l)=>{n=s,a=l}),n,a]},oi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),oi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),oi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){De(e)||it(8),gt(e)&&(e=Oc(e));let t=hc(this),r=fi(t,e,void 0);return r[Oe].isManual_=!0,di(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&it(9);let{scope_:n}=r;return mc(n,t),gc(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 a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));let n=nr(ci).applyPatches_;return gt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function fi(e,t,r,n){let[a,i]=Dn(t)?nr(In).proxyMap_(t,r):zo(t)?nr(In).proxySet_(t,r):_u(t,r);return(r?.scope_??Sc()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?wu(r,i,n):i.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=u;i.modified_&&m&&m.generatePatches_(i,[],u)}),a}function Oc(e){return gt(e)||it(10,e),wc(e)}function wc(e){if(!De(e)||$n(e))return e;let t=e[Oe],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=si(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=si(e,!0);let a=r;return zo(r)&&(r=new Set),Tn(a,(i,s)=>{zn(r,i,wc(s))},n),t&&(t.finalized_=!1),r}var Mu=globalThis.Iterator,Jm=typeof Mu?.from=="function";var ku=new Nu,hi=ku.produce;function Rc(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var _c=Rc(),zc=Rc;var Tu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ao:Ao.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function No(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(yt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>n!=null&&n.type===e&&lc(n),r}var Mc=class Io extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Io.prototype)}static get[Symbol.species](){return Io}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Io(...t[0].concat(this)):new Io(...t.concat(this))}};function Ic(e){return De(e)?hi(e,()=>{}):e}function Bn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Pu(e){return typeof e=="boolean"}var Du=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Mc;return r&&(Pu(r)?s.push(_c):s.push(zc(r.extraArgument))),s},Fu="RTK_autoBatch";var Nc=e=>t=>{setTimeout(t,e)},$u=(e,t,r)=>n=>{let a=!1,i,s,l=()=>{a||(a=!0,t?.(i),clearTimeout(s),n())};i=e(l),s=setTimeout(l,r)},Uu=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),a=!0,i=!1,s=!1,l=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?$u(window.requestAnimationFrame,window.cancelAnimationFrame,100):Nc(10):e.type==="callback"?e.queueNotification:Nc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let h=()=>a&&g(),x=n.subscribe(h);return l.add(g),()=>{x(),l.delete(g)}},dispatch(g){try{return a=!g?.meta?.[Fu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(g)}finally{a=!0}}})},Bu=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Mc(e);return n&&a.push(Uu(typeof n=="object"?n:void 0)),a};function kc(e){let t=Du(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ln(r))u=ti(r);else throw new Error(yt(1));let m;typeof n=="function"?m=n(t):m=t();let g=Ao;a&&(g=Tu({trace:!1,...typeof a=="object"&&a}));let h=cc(...m),x=Bu(h),v=typeof l=="function"?l(x):x(),R=g(...v);return ei(u,s,R)}function Tc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(yt(28));if(l in t)throw new Error(yt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,r,n]}function Hu(e){return typeof e=="function"}function Gu(e,t){let[r,n,a]=Tc(t),i;if(Hu(e))i=()=>Ic(e());else{let u=Ic(e);i=()=>u}function s(u,m,g){if(gt(u)){let h=m(u,g);return h===void 0?u:h}else{if(De(u))return hi(u,h=>m(h,g));{let h=m(u,g);if(h===void 0){if(u===null)return u;throw new Error(yt(9))}return h}}}function l(u=i(),m){let g=r[m.type],h;for(let{matcher:x,reducer:v}of n)x(m)&&v&&(h??=[]).push(v);if(!g&&!h)return a?s(u,a,m):u;if(g&&(u=s(u,g,m)),h)for(let x of h)u=s(u,x,m);return u}return l.getInitialState=i,l}var Wu=Symbol.for("rtk-slice-createasyncthunk");function Vu(e,t){return`${e}/${t}`}function ju({creators:e}={}){let t=e?.asyncThunk?.[Wu];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(yt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Zu()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(N,P){let H=typeof N=="string"?N:N.type;if(!H)throw new Error(yt(12));if(H in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[H]=P,m},addMatcher(N,P){return u.sliceMatchers.push({matcher:N,reducer:P}),m},exposeAction(N,P){return u.actionCreators[N]=P,m},exposeCaseReducer(N,P){return u.sliceCaseReducersByName[N]=P,m}};l.forEach(N=>{let P=s[N],H={reducerName:N,type:Vu(a,N),createNotation:typeof n.reducers=="function"};Yu(P)?Qu(H,P,m,t):qu(H,P,m)});function g(){let[N={},P=[],H=void 0]=typeof n.extraReducers=="function"?Tc(n.extraReducers):[n.extraReducers],te={...N,...u.sliceCaseReducersByType};return Gu(n.initialState,Re=>{for(let de in te)Re.addCase(de,te[de]);for(let de of u.sliceMatchers)Re.addMatcher(de.matcher,de.reducer);for(let de of P)Re.addMatcher(de.matcher,de.reducer);H&&Re.addDefaultCase(H)})}let h=N=>N,x=new Map,v=new WeakMap,R;function _(N,P){return R||(R=g()),R(N,P)}function O(){return R||(R=g()),R.getInitialState()}function k(N,P=!1){function H(Re){let de=Re[N];return typeof de>"u"&&P&&(de=Bn(v,H,O)),de}function te(Re=h){return Bn(Bn(x,P,()=>new WeakMap),Re,()=>{let de={};for(let[Pr,Ze]of Object.entries(n.selectors??{}))de[Pr]=Ku(Ze,Re,()=>Bn(v,Re,O),P);return de})}return{reducerPath:N,getSelectors:te,get selectors(){return te(H)},selectSlice:H}}let F={name:a,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:O,...k(i),injectInto(N,{reducerPath:P,...H}={}){let te=P??i;return N.inject({reducerPath:te,reducer:_},H),{...F,...k(te,!0)}}};return F}}function Ku(e,t,r,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=r()),e(l,...s)}return a.unwrapped=e,a}var Pc=ju();function Zu(){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 qu({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!Xu(n))throw new Error(yt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?No(e,s):No(e))}function Yu(e){return e._reducerDefinitionType==="asyncThunk"}function Xu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Qu({type:e,reducerName:t},r,n,a){if(!a)throw new Error(yt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:g}=r,h=a(e,i,g);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),l&&n.addCase(h.pending,l),u&&n.addCase(h.rejected,u),m&&n.addMatcher(h.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Hn,pending:l||Hn,rejected:u||Hn,settled:m||Hn})}function Hn(){}var Dc="listener",Fc="completed",$c="cancelled",s8=`task-${$c}`,c8=`task-${Fc}`,l8=`${Dc}-${$c}`,d8=`${Dc}-${Fc}`;var{assign:Uc}=Object;var gi="listenerMiddleware";var Ju=Uc(No(`${gi}/add`),{withTypes:()=>Ju}),u8=No(`${gi}/removeAll`),ef=Uc(No(`${gi}/remove`),{withTypes:()=>ef});function yt(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 tf=yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Gn=class extends tf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Bc=class e extends Gn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Cn(i))return i;if(a==null)return;let s=Pc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=kc({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let g=Co(s.getInitialState());for(let h of m.keeping)g[h]=(u??g)[h];return g}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...m.overwrites};return s.reducer(u,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,r,n,a){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new bn,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,u)=>{let m=l,g=s[m];return g?(...h)=>{let x=g(...h.map(i));return this.reduxStore.dispatch(x),x}:h=>{let x=m,v=this.getState()[x];Fr(v,h)||this.setState({[x]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Wn=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}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 Vn=b(w()),rf="ft-app-info",ar=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ar.eventName="authentication-change";var Mo=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mo.eventName="ui-locale-changed";var of={session:(e,t)=>{(0,Vn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new ar(t.payload)),0))}},U=Vn.FtReduxStore.get({name:rf,reducers:of,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Hc=b(w()),jn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},$8=(0,Hc.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(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Wn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jn([(0,yi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jn([(0,yi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jn([Qa({store:U.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),jn([Qa({store:U.name})],t.prototype,"uiLocale",void 0),t});var Gc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Gc||(Gc={}));var Wc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Wc||(Wc={}));var Vc;(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"})(Vc||(Vc={}));var jc;(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"})(jc||(jc={}));var Kc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Kc||(Kc={}));var Zc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Zc||(Zc={}));var qc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(qc||(qc={}));var Yc;(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"})(Yc||(Yc={}));var Xc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Xc||(Xc={}));var Qc;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Qc||(Qc={}));var Jc;(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",e.DOC_DIFF="DOC_DIFF"})(Jc||(Jc={}));var el;(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"})(el||(el={}));var tl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(tl||(tl={}));var rl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rl||(rl={}));var ol;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ol||(ol={}));var nl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(nl||(nl={}));var al;(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"})(al||(al={}));var il;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(il||(il={}));var sl;(function(e){e.ASC="ASC",e.DESC="DESC"})(sl||(sl={}));var cl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(cl||(cl={}));var ll;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ll||(ll={}));var dl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(dl||(dl={}));var ul;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ul||(ul={}));var fl;(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"})(fl||(fl={}));var pl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(pl||(pl={}));var ml;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ml||(ml={}));var hl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(hl||(hl={}));var gl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(gl||(gl={}));var ue;(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"})(ue||(ue={}));var qe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var yl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(yl||(yl={}));var bl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(bl||(bl={}));var xl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(xl||(xl={}));var vl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(vl||(vl={}));var Sl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Sl||(Sl={}));var Cl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Cl||(Cl={}));var El;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(El||(El={}));var Ll;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Ll||(Ll={}));var Al;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Al||(Al={}));var Ol;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Ol||(Ol={}));var wl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(wl||(wl={}));var Rl;(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"})(Rl||(Rl={}));var _l;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(_l||(_l={}));var nf={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN,ue.BEHAVIOR_DATA_USER],[ue.GENERATIVE_AI_EXPORT_USER]:[ue.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(nf[e]??[]).some(r=>zl(r,t))}function bi(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=>zl(n,t))}function Il(e,...t){return e==null?!1:t.some(r=>bi(e,r))}var Xn=b(w());var xi=b(w());var ir=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Gr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ir.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ir.await()}};var Fe=class extends Gr{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new xi.CacheRegistry,this.cache=t?a.commonCache:new xi.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 Kn=class extends Fe{async listMySearches(){let{session:t}=U.getState();return bi(t,ue.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Zn=class extends Fe{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var qn=class extends Fe{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Yn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/api/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var af="ft-user-assets",sf={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(qe).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:a}=t.payload;Si(e,r,[...vi(e,r),a]),Nl(e,r,1,n),Ml(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Si(e,r,vi(e,r).map(a=>a.id===n.id?n:a)),Ml(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Si(e,r,vi(e,r).filter(i=>i.id!==a)),Nl(e,r,-1,n)}},kl={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},vi=(e,t)=>{var r;let n=kl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Si=(e,t,r)=>{let n=kl[t];n&&(e[n]=r)},Nl=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===qe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Ml=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},_e=Xn.FtReduxStore.get({name:af,reducers:sf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ci=class{constructor(t=new qn,r=new Yn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Xn.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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.getState().assetCounts.allAsset[t]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.getState().assetCounts.bookmarkByMap[t]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},cf=new Ci;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cf);var Ei=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ei;var Ye=b(w());var Tl,Wr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},lf=Symbol("clearAfterUnitTest"),Qn=class extends(0,Ye.withEventBus)(Fe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Tl]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.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 a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,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 a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).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(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Wr({loadedContexts:t})),this.dispatchEvent(new Wr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Wr({loadedContexts:[t]})),this.dispatchEvent(new Wr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};Tl=lf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Vr=window.FluidTopicsI18nService,Jn=window.FluidTopicsCustomI18nService;var Pl=b(w()),Li=class{highlightHtml(t,r,n){(0,Pl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Li;var Dl=b(w());var Ai=class{isDate(t){var r,n,a,i;return(i=(n=((a=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return Dl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ai;var Fl=b(w());var ko=class{static get(t,r,{baseUrl:n,localesConfiguration:a,availableContentLocales:i}=U.getState()){var s;if(r==="all"&&a?.allLanguagesAllowed)r=void 0;else if(!r||i.length>0&&!i.some(l=>l.lang===r)){let l=a?.defaultLocales.defaultContentLocale;r=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Fl.SearchPlaceConverter(n,t??20,a?.allLanguagesAllowed,r,i)}};var Oi=class{urlToSearchRequest(t){return ko.get().parse(t)}searchRequestToUrl(t){return ko.get().serialize(t)}};window.FluidTopicsUrlService=new Oi;var Ot=b(w());var sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};sr.eventName="before-location-change";var cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};cr.eventName="change";var wi=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))}},$l=new wi;var ea=class e extends Ot.WithEventBus{static build(){return new e(window.history,$l,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}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,Ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new cr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let u=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new sr(u);this.dispatchEvent(m);let g=r(),h={...g===this.currentIndex?this.currentState:void 0,...i,index:g,href:m.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(sr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(sr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(cr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(cr.eventName,t)}currentItem(){return(0,Ot.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,Ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ot.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,Ot.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 a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}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 a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Ul=b(D());var Bl=Ul.css`
|
|
1
|
+
"use strict";(()=>{var su=Object.create;var js=Object.defineProperty;var cu=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var du=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty;var Dr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var fu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of lu(t))!uu.call(e,a)&&a!==r&&js(e,a,{get:()=>t[a],enumerable:!(n=cu(t,a))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?su(du(e)):{},fu(t||!e||!e.__esModule?js(r,"default",{value:e,enumerable:!0}):r,e));var w=Dr((Em,Ks)=>{Ks.exports=ftGlobals.wcUtils});var D=Dr((Lm,Zs)=>{Zs.exports=ftGlobals.lit});var K=Dr((Am,qs)=>{qs.exports=ftGlobals.litDecorators});var Ya=Dr((_m,Ys)=>{Ys.exports=ftGlobals.litRepeat});var Qe=Dr((j7,r1)=>{r1.exports=ftGlobals.litClassMap});var _2=Dr((qv,R2)=>{R2.exports=ftGlobals.litUnsafeHTML});var nu=b(w());var hn=b(D()),Ke=b(K());function at(e,t,r){return e?t(e):r?.(e)}var K4=b(Ya()),ft=b(w());var yi=b(K());var Xs=b(K(),1);var Xa=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},pu=e=>({fromAttribute:t=>{if(t==null)return Co(e);try{return JSON.parse(t)}catch{return Co(e)}},toAttribute:t=>JSON.stringify(t)});function Qs(e,t){return(0,Xs.property)({type:Object,converter:pu(e),hasChanged:Eo,...t??{}})}function mu(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(!Fr(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(!Fr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(r=i.length,r!==a(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 s=i[n];if(!Fr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Fr(e,t){try{return mu(e,t)}catch{return!1}}function Eo(e,t){return!Fr(e,t)}function Co(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var Js=b(K(),1);var Qa=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Eo,attribute:!1,...t};(0,Js.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var bn=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 rr=b(K(),1);var xn=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);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 Sn=b(D(),1);var vn=class extends Sn.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(0,Sn.adoptStyles)(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){Xa(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 ec(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Ur=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},nc,tc=Symbol("constructorPrototype"),rc=Symbol("constructorName"),ac=Symbol("exportpartsDebouncer"),oc=Symbol("dynamicDependenciesLoaded"),$r=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};$r.eventName="exportparts-updated";var ht=class extends vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[nc]=new xn(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[ac].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.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[rc]=this.constructor.name,this[tc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[rc]&&Object.setPrototypeOf(this,this[tc])}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[oc]||(r[oc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener($r.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener($r.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 $r)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=ec(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;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((a=this.customStylesheet)!==null&&a!==void 0?a:"")}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,a,i,s,l;let u=x=>x!=null&&x.trim().length>0,m=t.filter(u).map(x=>x.trim());if(m.length===0){this.exportparts=void 0;return}let g=new Set;for(let x of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(n=x.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],R=(l=(a=x.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],_=[...v,...R].filter(u).map(O=>O.trim());for(let O of _)g.add(O)}if(g.size===0){this.exportparts=void 0;return}let h=[...g.values()].flatMap(x=>m.map(v=>`${x}:${v}--${x}`));this.exportparts=[...this.part,...h].join(", ")}};nc=ac;Ur([(0,rr.property)()],ht.prototype,"exportpartsPrefix",void 0);Ur([Qs([])],ht.prototype,"exportpartsPrefixes",void 0);Ur([(0,rr.property)({reflect:!0})],ht.prototype,"exportparts",void 0);Ur([(0,rr.property)()],ht.prototype,"customStylesheet",void 0);Ur([(0,rr.property)()],ht.prototype,"elementToFocus",void 0);Ur([(0,rr.state)()],ht.prototype,"useAdoptedStyleSheets",void 0);function Cn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Lo=Symbol("internalReduxEventsUnsubscribers"),Ft=Symbol("internalStoresUnsubscribers"),or=Symbol("internalStores"),hu=yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[or].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[or].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[or].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[or].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[or].delete(l)}setupStores(){this.unsubscribeFromStores(),this[or].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[Ft].has(s.store):this[Ft].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u,m;this[Ft].set(s,l.subscribe(()=>this.updateFromStores())),this[Lo].set(s,[]),Cn(l)&&(!((u=l.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((g,h)=>{this.getStore(g.store)===l&&l.deprecatedKeys.includes(h)&&console.warn("Element",this,"is subscribed to deprecated key",h,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((g,h)=>{if(typeof this[h]=="function"&&(!g.store||l.name===g.store)){let x=v=>this[h](v);l.addEventListener(g.eventName,x),this[Lo].get(s).push(()=>l.removeEventListener(g.eventName,x))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ft].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ft].has(s)&&this[Ft].get(s)(),this[Ft].delete(s),(l=this[Lo].get(s))===null||l===void 0||l.forEach(u=>u()),this[Lo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Ft,r=or,n=Lo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ic=class extends hu(ht){};function xe(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 gu=typeof Symbol=="function"&&Symbol.observable||"@@observable",sc=gu,Ja=()=>Math.random().toString(36).substring(7).split("").join("."),yu={INIT:`@@redux/INIT${Ja()}`,REPLACE:`@@redux/REPLACE${Ja()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ja()}`},En=yu;function Ln(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 ei(e,t,r){if(typeof e!="function")throw new Error(xe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(ei)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,u=!1;function m(){s===i&&(s=new Map,i.forEach((O,k)=>{s.set(k,O)}))}function g(){if(u)throw new Error(xe(3));return a}function h(O){if(typeof O!="function")throw new Error(xe(4));if(u)throw new Error(xe(5));let k=!0;m();let F=l++;return s.set(F,O),function(){if(k){if(u)throw new Error(xe(6));k=!1,m(),s.delete(F),i=null}}}function x(O){if(!Ln(O))throw new Error(xe(7));if(typeof O.type>"u")throw new Error(xe(8));if(typeof O.type!="string")throw new Error(xe(17));if(u)throw new Error(xe(9));try{u=!0,a=n(a,O)}finally{u=!1}return(i=s).forEach(F=>{F()}),O}function v(O){if(typeof O!="function")throw new Error(xe(10));n=O,x({type:En.REPLACE})}function R(){let O=h;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(xe(11));function F(){let P=k;P.next&&P.next(g())}return F(),{unsubscribe:O(F)}},[sc](){return this}}}return x({type:En.INIT}),{dispatch:x,subscribe:h,getState:g,replaceReducer:v,[sc]:R}}function bu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:En.INIT})>"u")throw new Error(xe(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function ti(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(r[l]=e[l])}let n=Object.keys(r),a,i;try{bu(r)}catch(s){i=s}return function(l={},u){if(i)throw i;let m=!1,g={};for(let h=0;h<n.length;h++){let x=n[h],v=r[x],R=l[x],_=v(R,u);if(typeof _>"u"){let O=u&&u.type;throw new Error(xe(14))}g[x]=_,m=m||_!==R}return m=m||n.length!==Object.keys(l).length,m?g:l}}function Ao(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function cc(...e){return t=>(r,n)=>{let a=t(r,n),i=()=>{throw new Error(xe(15))},s={getState:a.getState,dispatch:(u,...m)=>i(u,...m)},l=e.map(u=>u(s));return i=Ao(...l)(a.dispatch),{...a,dispatch:i}}}function lc(e){return Ln(e)&&"type"in e&&typeof e.type=="string"}var bc=Symbol.for("immer-nothing"),dc=Symbol.for("immer-draftable"),Oe=Symbol.for("immer-state");function it(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pe=Object,Hr=Pe.getPrototypeOf,Rn="constructor",kn="prototype",ai="configurable",_n="enumerable",On="writable",Oo="value",gt=e=>!!e&&!!e[Oe];function De(e){return e?xc(e)||Pn(e)||!!e[dc]||!!e[Rn]?.[dc]||Dn(e)||zo(e):!1}var xu=Pe[kn][Rn].toString(),uc=new WeakMap;function xc(e){if(!e||!pi(e))return!1;let t=Hr(e);if(t===null||t===Pe[kn])return!0;let r=Pe.hasOwnProperty.call(t,Rn)&&t[Rn];if(r===Object)return!0;if(!Br(r))return!1;let n=uc.get(r);return n===void 0&&(n=Function.toString.call(r),uc.set(r,n)),n===xu}function Tn(e,t,r=!0){_o(e)===0?(r?Reflect.ownKeys(e):Pe.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function _o(e){let t=e[Oe];return t?t.type_:Pn(e)?1:Dn(e)?2:zo(e)?3:0}var ri=(e,t,r=_o(e))=>r===2?e.has(t):Pe[kn].hasOwnProperty.call(e,t),ii=(e,t,r=_o(e))=>r===2?e.get(t):e[t],zn=(e,t,r,n=_o(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pn=Array.isArray,Dn=e=>e instanceof Map,zo=e=>e instanceof Set,pi=e=>typeof e=="object",Br=e=>typeof e=="function",oi=e=>typeof e=="boolean";function Su(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var At=e=>e.copy_||e.base_;var mi=e=>e.modified_?e.copy_:e.base_;function si(e,t){if(Dn(e))return new Map(e);if(zo(e))return new Set(e);if(Pn(e))return Array[kn].slice.call(e);let r=xc(e);if(t===!0||t==="class_only"&&!r){let n=Pe.getOwnPropertyDescriptors(e);delete n[Oe];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[On]===!1&&(l[On]=!0,l[ai]=!0),(l.get||l.set)&&(n[s]={[ai]:!0,[On]:!0,[_n]:l[_n],[Oo]:e[s]})}return Pe.create(Hr(e),n)}else{let n=Hr(e);if(n!==null&&r)return{...e};let a=Pe.create(n);return Pe.assign(a,e)}}function Fn(e,t=!1){return $n(e)||gt(e)||!De(e)||(_o(e)>1&&Pe.defineProperties(e,{set:An,add:An,clear:An,delete:An}),Pe.freeze(e),t&&Tn(e,(r,n)=>{Fn(n,!0)},!1)),e}function Cu(){it(2)}var An={[Oo]:Cu};function $n(e){return e===null||!pi(e)?!0:Pe.isFrozen(e)}var In="MapSet",ci="Patches",fc="ArrayMethods",vc={};function nr(e){let t=vc[e];return t||it(0,e),t}var pc=e=>!!vc[e];var wo,Sc=()=>wo,Eu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:pc(In)?nr(In):void 0,arrayMethodsPlugin_:pc(fc)?nr(fc):void 0});function mc(e,t){t&&(e.patchPlugin_=nr(ci),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function li(e){di(e),e.drafts_.forEach(Lu),e.drafts_=null}function di(e){e===wo&&(wo=e.parent_)}var hc=e=>wo=Eu(wo,e);function Lu(e){let t=e[Oe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[Oe].modified_&&(li(t),it(4)),De(e)&&(e=yc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(r[Oe].base_,e,t)}else e=yc(t,r);return Au(t,e,!0),li(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==bc?e:void 0}function yc(e,t){if($n(t))return t;let r=t[Oe];if(!r)return Nn(t,e.handledSet_,e);if(!Un(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);Lc(r,e)}return r.copy_}function Au(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fn(t,r)}function Cc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Un=(e,t)=>e.scope_===t,Ou=[];function Ec(e,t,r,n){let a=At(e),i=e.type_;if(n!==void 0&&ii(a,n,i)===t){zn(a,n,r,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Tn(a,(u,m)=>{if(gt(m)){let g=l.get(m)||[];g.push(u),l.set(m,g)}})}let s=e.draftLocations_.get(t)??Ou;for(let l of s)zn(a,l,r,i)}function wu(e,t,r){e.callbacks_.push(function(a){let i=t;if(!i||!Un(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=mi(i);Ec(e,i.draft_??i,s,r),Lc(i,a)})}function Lc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}Cc(e)}}function Ru(e,t,r){let{scope_:n}=e;if(gt(r)){let a=r[Oe];Un(a,n)&&a.callbacks_.push(function(){wn(e);let s=mi(a);Ec(e,r,s,t)})}else De(r)&&e.callbacks_.push(function(){let i=At(e);e.type_===3?i.has(r)&&Nn(r,n.handledSet_,n):ii(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Nn(ii(e.copy_,t,e.type_),n.handledSet_,n)})}function Nn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||gt(e)||t.has(e)||!De(e)||$n(e)||(t.add(e),Tn(e,(n,a)=>{if(gt(a)){let i=a[Oe];if(Un(i,r)){let s=mi(i);zn(e,n,s,e.type_),Cc(i)}}else De(a)&&Nn(a,t,r)})),e}function _u(e,t){let r=Pn(e),n={type_:r?1:0,scope_:t?t.scope_:Sc(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=Mn;r&&(a=[n],i=Ro);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var Mn={get(e,t){if(t===Oe)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 a=At(e);if(!ri(a,t,e.type_))return Iu(e,a,t);let i=a[t];if(e.finalized_||!De(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Su(t))return i;if(i===ni(e.base_,t)||zu(e,t,i)){wn(e);let s=e.type_===1?+t:t,l=fi(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in At(e)},ownKeys(e){return Reflect.ownKeys(At(e))},set(e,t,r){let n=Ac(At(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let a=ni(At(e),t),i=a?.[Oe];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(vu(r,a)&&(r!==void 0||ri(e.base_,t,e.type_)))return!0;wn(e),ui(e)}return e.copy_[t]===r&&(r!==void 0||ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ru(e,t,r)),!0},deleteProperty(e,t){return wn(e),ni(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=At(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[On]:!0,[ai]:e.type_!==1||t!=="length",[_n]:n[_n],[Oo]:r[t]}},defineProperty(){it(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){it(12)}},Ro={};for(let e in Mn){let t=Mn[e];Ro[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ro.deleteProperty=function(e,t){return Ro.set.call(this,e,t,void 0)};Ro.set=function(e,t,r){return Mn.set.call(this,e[0],t,r,e[0])};function ni(e,t){let r=e[Oe];return(r?At(r):e)[t]}function zu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!De(r)||r[Oe]?!1:e.baseRefs_.has(r)}function Iu(e,t,r){let n=Ac(t,r);return n?Oo in n?n[Oo]:n.get?.call(e.draft_):void 0}function Ac(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Hr(r)}}function ui(e){e.modified_||(e.modified_=!0,e.parent_&&ui(e.parent_))}function wn(e){e.copy_||(e.assigned_=new Map,e.copy_=si(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Nu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Br(t)&&!Br(r)){let i=r;r=t;let s=this;return function(u=i,...m){return s.produce(u,g=>r.call(this,g,...m))}}Br(r)||it(6),n!==void 0&&!Br(n)&&it(7);let a;if(De(t)){let i=hc(this),s=fi(i,t,void 0),l=!0;try{a=r(s),l=!1}finally{l?li(i):di(i)}return mc(i,n),gc(a,i)}else if(!t||!pi(t)){if(a=r(t),a===void 0&&(a=t),a===bc&&(a=void 0),this.autoFreeze_&&Fn(a,!0),n){let i=[],s=[];nr(ci).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else it(1,t)},this.produceWithPatches=(t,r)=>{if(Br(t))return(s,...l)=>this.produceWithPatches(s,u=>t(u,...l));let n,a;return[this.produce(t,r,(s,l)=>{n=s,a=l}),n,a]},oi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),oi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),oi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){De(e)||it(8),gt(e)&&(e=Oc(e));let t=hc(this),r=fi(t,e,void 0);return r[Oe].isManual_=!0,di(t),r}finishDraft(e,t){let r=e&&e[Oe];(!r||!r.isManual_)&&it(9);let{scope_:n}=r;return mc(n,t),gc(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 a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));let n=nr(ci).applyPatches_;return gt(e)?n(e,t):this.produce(e,a=>n(a,t))}};function fi(e,t,r,n){let[a,i]=Dn(t)?nr(In).proxyMap_(t,r):zo(t)?nr(In).proxySet_(t,r):_u(t,r);return(r?.scope_??Sc()).drafts_.push(a),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?wu(r,i,n):i.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=u;i.modified_&&m&&m.generatePatches_(i,[],u)}),a}function Oc(e){return gt(e)||it(10,e),wc(e)}function wc(e){if(!De(e)||$n(e))return e;let t=e[Oe],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=si(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=si(e,!0);let a=r;return zo(r)&&(r=new Set),Tn(a,(i,s)=>{zn(r,i,wc(s))},n),t&&(t.finalized_=!1),r}var Mu=globalThis.Iterator,Jm=typeof Mu?.from=="function";var ku=new Nu,hi=ku.produce;function Rc(e){return({dispatch:r,getState:n})=>a=>i=>typeof i=="function"?i(r,n,e):a(i)}var _c=Rc(),zc=Rc;var Tu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ao:Ao.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function No(e,t){function r(...n){if(t){let a=t(...n);if(!a)throw new Error(yt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>n!=null&&n.type===e&&lc(n),r}var Mc=class Io extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Io.prototype)}static get[Symbol.species](){return Io}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Io(...t[0].concat(this)):new Io(...t.concat(this))}};function Ic(e){return De(e)?hi(e,()=>{}):e}function Bn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Pu(e){return typeof e=="boolean"}var Du=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Mc;return r&&(Pu(r)?s.push(_c):s.push(zc(r.extraArgument))),s},Fu="RTK_autoBatch";var Nc=e=>t=>{setTimeout(t,e)},$u=(e,t,r)=>n=>{let a=!1,i,s,l=()=>{a||(a=!0,t?.(i),clearTimeout(s),n())};i=e(l),s=setTimeout(l,r)},Uu=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),a=!0,i=!1,s=!1,l=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?$u(window.requestAnimationFrame,window.cancelAnimationFrame,100):Nc(10):e.type==="callback"?e.queueNotification:Nc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let h=()=>a&&g(),x=n.subscribe(h);return l.add(g),()=>{x(),l.delete(g)}},dispatch(g){try{return a=!g?.meta?.[Fu],i=!a,i&&(s||(s=!0,u(m))),n.dispatch(g)}finally{a=!0}}})},Bu=e=>function(r){let{autoBatch:n=!0}=r??{},a=new Mc(e);return n&&a.push(Uu(typeof n=="object"?n:void 0)),a};function kc(e){let t=Du(),{reducer:r=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Ln(r))u=ti(r);else throw new Error(yt(1));let m;typeof n=="function"?m=n(t):m=t();let g=Ao;a&&(g=Tu({trace:!1,...typeof a=="object"&&a}));let h=cc(...m),x=Bu(h),v=typeof l=="function"?l(x):x(),R=g(...v);return ei(u,s,R)}function Tc(e){let t={},r=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(yt(28));if(l in t)throw new Error(yt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,r,n]}function Hu(e){return typeof e=="function"}function Gu(e,t){let[r,n,a]=Tc(t),i;if(Hu(e))i=()=>Ic(e());else{let u=Ic(e);i=()=>u}function s(u,m,g){if(gt(u)){let h=m(u,g);return h===void 0?u:h}else{if(De(u))return hi(u,h=>m(h,g));{let h=m(u,g);if(h===void 0){if(u===null)return u;throw new Error(yt(9))}return h}}}function l(u=i(),m){let g=r[m.type],h;for(let{matcher:x,reducer:v}of n)x(m)&&v&&(h??=[]).push(v);if(!g&&!h)return a?s(u,a,m):u;if(g&&(u=s(u,g,m)),h)for(let x of h)u=s(u,x,m);return u}return l.getInitialState=i,l}var Wu=Symbol.for("rtk-slice-createasyncthunk");function Vu(e,t){return`${e}/${t}`}function ju({creators:e}={}){let t=e?.asyncThunk?.[Wu];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(yt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Zu()):n.reducers)||{},l=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(N,P){let H=typeof N=="string"?N:N.type;if(!H)throw new Error(yt(12));if(H in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[H]=P,m},addMatcher(N,P){return u.sliceMatchers.push({matcher:N,reducer:P}),m},exposeAction(N,P){return u.actionCreators[N]=P,m},exposeCaseReducer(N,P){return u.sliceCaseReducersByName[N]=P,m}};l.forEach(N=>{let P=s[N],H={reducerName:N,type:Vu(a,N),createNotation:typeof n.reducers=="function"};Yu(P)?Qu(H,P,m,t):qu(H,P,m)});function g(){let[N={},P=[],H=void 0]=typeof n.extraReducers=="function"?Tc(n.extraReducers):[n.extraReducers],te={...N,...u.sliceCaseReducersByType};return Gu(n.initialState,Re=>{for(let de in te)Re.addCase(de,te[de]);for(let de of u.sliceMatchers)Re.addMatcher(de.matcher,de.reducer);for(let de of P)Re.addMatcher(de.matcher,de.reducer);H&&Re.addDefaultCase(H)})}let h=N=>N,x=new Map,v=new WeakMap,R;function _(N,P){return R||(R=g()),R(N,P)}function O(){return R||(R=g()),R.getInitialState()}function k(N,P=!1){function H(Re){let de=Re[N];return typeof de>"u"&&P&&(de=Bn(v,H,O)),de}function te(Re=h){return Bn(Bn(x,P,()=>new WeakMap),Re,()=>{let de={};for(let[Pr,Ze]of Object.entries(n.selectors??{}))de[Pr]=Ku(Ze,Re,()=>Bn(v,Re,O),P);return de})}return{reducerPath:N,getSelectors:te,get selectors(){return te(H)},selectSlice:H}}let F={name:a,reducer:_,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:O,...k(i),injectInto(N,{reducerPath:P,...H}={}){let te=P??i;return N.inject({reducerPath:te,reducer:_},H),{...F,...k(te,!0)}}};return F}}function Ku(e,t,r,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=r()),e(l,...s)}return a.unwrapped=e,a}var Pc=ju();function Zu(){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 qu({type:e,reducerName:t,createNotation:r},n,a){let i,s;if("reducer"in n){if(r&&!Xu(n))throw new Error(yt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?No(e,s):No(e))}function Yu(e){return e._reducerDefinitionType==="asyncThunk"}function Xu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Qu({type:e,reducerName:t},r,n,a){if(!a)throw new Error(yt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:u,settled:m,options:g}=r,h=a(e,i,g);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),l&&n.addCase(h.pending,l),u&&n.addCase(h.rejected,u),m&&n.addMatcher(h.settled,m),n.exposeCaseReducer(t,{fulfilled:s||Hn,pending:l||Hn,rejected:u||Hn,settled:m||Hn})}function Hn(){}var Dc="listener",Fc="completed",$c="cancelled",s8=`task-${$c}`,c8=`task-${Fc}`,l8=`${Dc}-${$c}`,d8=`${Dc}-${Fc}`;var{assign:Uc}=Object;var gi="listenerMiddleware";var Ju=Uc(No(`${gi}/add`),{withTypes:()=>Ju}),u8=No(`${gi}/removeAll`),ef=Uc(No(`${gi}/remove`),{withTypes:()=>ef});function yt(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 tf=yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Gn=class extends tf(Object){};window.ftReduxStores||(window.ftReduxStores={});var Bc=class e extends Gn{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Cn(i))return i;if(a==null)return;let s=Pc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=kc({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let g=Co(s.getInitialState());for(let h of m.keeping)g[h]=(u??g)[h];return g}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...m.overwrites};return s.reducer(u,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,r,n,a){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new bn,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,u)=>{let m=l,g=s[m];return g?(...h)=>{let x=g(...h.map(i));return this.reduxStore.dispatch(x),x}:h=>{let x=m,v=this.getState()[x];Fr(v,h)||this.setState({[x]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Wn=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}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 Vn=b(w()),rf="ft-app-info",ar=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ar.eventName="authentication-change";var Mo=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mo.eventName="ui-locale-changed";var of={session:(e,t)=>{(0,Vn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new ar(t.payload)),0))}},U=Vn.FtReduxStore.get({name:rf,reducers:of,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Hc=b(w()),jn=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},$8=(0,Hc.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(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Wn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return jn([(0,yi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),jn([(0,yi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),jn([Qa({store:U.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),jn([Qa({store:U.name})],t.prototype,"uiLocale",void 0),t});var Gc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Gc||(Gc={}));var Wc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Wc||(Wc={}));var Vc;(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"})(Vc||(Vc={}));var jc;(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"})(jc||(jc={}));var Kc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Kc||(Kc={}));var Zc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Zc||(Zc={}));var qc;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(qc||(qc={}));var Yc;(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"})(Yc||(Yc={}));var Xc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Xc||(Xc={}));var Qc;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Qc||(Qc={}));var Jc;(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",e.DOC_DIFF="DOC_DIFF"})(Jc||(Jc={}));var el;(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"})(el||(el={}));var tl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(tl||(tl={}));var rl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rl||(rl={}));var ol;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ol||(ol={}));var nl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(nl||(nl={}));var al;(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"})(al||(al={}));var il;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(il||(il={}));var sl;(function(e){e.ASC="ASC",e.DESC="DESC"})(sl||(sl={}));var cl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(cl||(cl={}));var ll;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ll||(ll={}));var dl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(dl||(dl={}));var ul;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ul||(ul={}));var fl;(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"})(fl||(fl={}));var pl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(pl||(pl={}));var ml;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ml||(ml={}));var hl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(hl||(hl={}));var gl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(gl||(gl={}));var ue;(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"})(ue||(ue={}));var qe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var yl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(yl||(yl={}));var bl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(bl||(bl={}));var xl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(xl||(xl={}));var vl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(vl||(vl={}));var Sl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Sl||(Sl={}));var Cl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Cl||(Cl={}));var El;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(El||(El={}));var Ll;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Ll||(Ll={}));var Al;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Al||(Al={}));var Ol;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Ol||(Ol={}));var wl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(wl||(wl={}));var Rl;(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"})(Rl||(Rl={}));var _l;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(_l||(_l={}));var nf={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN,ue.BEHAVIOR_DATA_USER],[ue.GENERATIVE_AI_EXPORT_USER]:[ue.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(nf[e]??[]).some(r=>zl(r,t))}function bi(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=>zl(n,t))}function Il(e,...t){return e==null?!1:t.some(r=>bi(e,r))}var Xn=b(w());var xi=b(w());var ir=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var Gr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ir.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ir.await()}};var Fe=class extends Gr{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new xi.CacheRegistry,this.cache=t?a.commonCache:new xi.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 Kn=class extends Fe{async listMySearches(){let{session:t}=U.getState();return bi(t,ue.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Zn=class extends Fe{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var qn=class extends Fe{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var Yn=class extends Fe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var af="ft-user-assets",sf={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(qe).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:a}=t.payload;Si(e,r,[...vi(e,r),a]),Nl(e,r,1,n),Ml(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Si(e,r,vi(e,r).map(a=>a.id===n.id?n:a)),Ml(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Si(e,r,vi(e,r).filter(i=>i.id!==a)),Nl(e,r,-1,n)}},kl={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},vi=(e,t)=>{var r;let n=kl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Si=(e,t,r)=>{let n=kl[t];n&&(e[n]=r)},Nl=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===qe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Ml=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},_e=Xn.FtReduxStore.get({name:af,reducers:sf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ci=class{constructor(t=new qn,r=new Yn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=U.getState();(0,Xn.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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&_e.getState().assetCounts.allAsset[t]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&_e.getState().assetCounts.bookmarkByMap[t]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;t===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},cf=new Ci;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cf);var Ei=class{addCommand(t,r=!1){U.commands.add(t,r)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ei;var Ye=b(w());var Tl,Wr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},lf=Symbol("clearAfterUnitTest"),Qn=class extends(0,Ye.withEventBus)(Fe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Tl]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.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 a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,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 a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).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(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Wr({loadedContexts:t})),this.dispatchEvent(new Wr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Wr({loadedContexts:[t]})),this.dispatchEvent(new Wr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};Tl=lf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Qn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Vr=window.FluidTopicsI18nService,Jn=window.FluidTopicsCustomI18nService;var Pl=b(w()),Li=class{highlightHtml(t,r,n){(0,Pl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Li;var Dl=b(w());var Ai=class{isDate(t){var r,n,a,i;return(i=(n=((a=(r=U.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return Dl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ai;var Fl=b(w());var ko=class{static get(t,r,{baseUrl:n,localesConfiguration:a,availableContentLocales:i}=U.getState()){var s;if(r==="all"&&a?.allLanguagesAllowed)r=void 0;else if(!r||i.length>0&&!i.some(l=>l.lang===r)){let l=a?.defaultLocales.defaultContentLocale;r=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Fl.SearchPlaceConverter(n,t??20,a?.allLanguagesAllowed,r,i)}};var Oi=class{urlToSearchRequest(t){return ko.get().parse(t)}searchRequestToUrl(t){return ko.get().serialize(t)}};window.FluidTopicsUrlService=new Oi;var Ot=b(w());var sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};sr.eventName="before-location-change";var cr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};cr.eventName="change";var wi=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))}},$l=new wi;var ea=class e extends Ot.WithEventBus{static build(){return new e(window.history,$l,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}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,Ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new cr(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let u=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new sr(u);this.dispatchEvent(m);let g=r(),h={...g===this.currentIndex?this.currentState:void 0,...i,index:g,href:m.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(sr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(sr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(cr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(cr.eventName,t)}currentItem(){return(0,Ot.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,Ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ot.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,Ot.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 a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}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 a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Ul=b(D());var Bl=Ul.css`
|
|
2
2
|
`;var Wl=b(D()),ze=b(K()),dr=b(w());var bt=b(w());function Hl(e,t){let{authenticationRequired:r,session:n}=U.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var ta=class extends Gr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Ri=class e extends bt.FtStateManager{static build(t){return new e(U,t)}constructor(t,r){super(),this.store=t,this.cache=new bt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new ta,this.knownContexts=new bt.AbstractRegistry,this.knownCustomComponents=new bt.AbstractRegistry,this.cleanSessionDebouncer=new bt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new bt.Debouncer(500),this.apiProvider=r??(()=>ir.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(ar.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(ar.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",()=>Hl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Mo(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Il(U.getState().session,...t)}},Gl=Ri.build();var lr=class extends Event{constructor(t,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var To=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:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new lr(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.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 ye=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Q=class extends dr.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=Gl,this.contextRoot=new To}render(){return Wl.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Vr.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())}};Q.elementDefinitions={};Q.styles=Bl;ye([(0,ze.property)()],Q.prototype,"baseUrl",void 0);ye([(0,ze.property)()],Q.prototype,"tenantId",void 0);ye([(0,ze.property)()],Q.prototype,"apiIntegrationIdentifier",void 0);ye([(0,ze.property)()],Q.prototype,"apiIntegrationAppVersion",void 0);ye([(0,ze.property)()],Q.prototype,"uiLocale",void 0);ye([(0,dr.jsonProperty)(null)],Q.prototype,"availableUiLocales",void 0);ye([(0,dr.jsonProperty)(null)],Q.prototype,"metadataConfiguration",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"editorMode",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"noCustom",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"openExternalDocumentInNewTab",void 0);ye([(0,ze.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Q.prototype,"noCustomComponent",void 0);ye([(0,ze.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Q.prototype,"noCustomCode",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"withManualResources",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"navigatorOnline",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"forcedOffline",void 0);ye([(0,ze.property)({type:Boolean})],Q.prototype,"authenticationRequired",void 0);ye([(0,dr.jsonProperty)([])],Q.prototype,"messageContexts",void 0);ye([(0,dr.jsonProperty)(void 0)],Q.prototype,"session",void 0);var jl=b(w());var Vl={"ft-app-context":Q};(0,jl.customElements)(Vl);var jr=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?Jn:Vr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var Zr=b(w());var Kl=b(K());var _i=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-]+$/)}},Kr=new _i;var ff=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Do=Symbol("i18nAttributes"),Zl=Symbol("i18nListAttributes"),Fo=Symbol("i18nProperties"),ra=Symbol("i18nContexts"),Po=Symbol("i18nUnsubs"),$t=(0,Zr.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?Jn:Vr}i18n(i){let{context:s,key:l,message:u}=i,{custom:m,args:g,argsProvider:h}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let x=g??(h?h(this):[]);return this.getI18nService(m).resolveMessage(s,l,...x)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Kr.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var m;return((m=u?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,m=(g,h,x)=>x?.context&&x.key&&i(g,h,x)?{...x,message:this.i18n({context:x.context,key:x.key,custom:x.custom,...g})}:x;(s=this[Do])===null||s===void 0||s.forEach((g,h)=>u[h]=m(g,h,u[h])),(l=this[Zl])===null||l===void 0||l.forEach((g,h)=>{var x;return u[h]=(x=u[h])===null||x===void 0?void 0:x.map(v=>m(g,h,v))})}updateI18nProperties(i){var s;(s=this[Fo])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ra].set(u,{isCustomContext:l}),this[Po].has(u)||this[Po].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[ra].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ra].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Po].forEach(i=>i()),this[Po].clear()}}return t=ra,r=Po,ff([(0,Kl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),oa=class extends $t(Zr.FtLitElement){},na=class extends $t(Zr.FtLitElementRedux){};var $o=(e,t)=>(r,n)=>{var a,i;r.constructor.createProperty(n,t??{attribute:!1,type:String});let s={...e,key:(a=e.key)!==null&&a!==void 0?a:n};r[Fo]=(i=r[Fo])!==null&&i!==void 0?i:new Map,r[Fo].set(n,s)};var ql=b(D());var Yl=ql.css`
|
|
@@ -81,7 +81,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
81
81
|
<li>${this.helperText}</li>
|
|
82
82
|
`)}
|
|
83
83
|
</ul>
|
|
84
|
-
`}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?he.error:this.warningMessages.length?he.warning:he.default}}return Le([b()],e.prototype,"warningRules",void 0),Le([b()],e.prototype,"errorRules",void 0),Le([b()],e.prototype,"validateOn",void 0),Le([b({type:Boolean})],e.prototype,"validateAtRender",void 0),Le([b()],e.prototype,"label",void 0),Le([b({type:Boolean})],e.prototype,"hideLabel",void 0),Le([b()],e.prototype,"name",void 0),Le([b({type:Boolean})],e.prototype,"disabled",void 0),Le([b()],e.prototype,"helperText",void 0),Le([b()],e.prototype,"forceStatus",void 0),Le([b({reflect:!0})],e.prototype,"value",void 0),Le([H()],e.prototype,"errorMessages",void 0),Le([H()],e.prototype,"warningMessages",void 0),Le([H()],e.prototype,"status",void 0),Le([H()],e.prototype,"focused",void 0),Le([H()],e.prototype,"additionalWarningRules",void 0),Le([H()],e.prototype,"additionalErrorRules",void 0),Le([H()],e.prototype,"externalErrorMessages",void 0),e});var yn=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let o of r)o._$AO?.(e,!1),yn(o,e);return!0},Ii=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},E2=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),M3(e)}};function _3(t){this._$AN!==void 0?(Ii(this),this._$AM=t,E2(this)):this._$AM=t}function I3(t,e=!1,r=0){let o=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(o))for(let a=r;a<o.length;a++)yn(o[a],!1),Ii(o[a]);else o!=null&&(yn(o,!1),Ii(o));else yn(this,t)}var M3=t=>{t.type==Ct.CHILD&&(t._$AP??=I3,t._$AQ??=_3)},bo=class extends at{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,o){super._$AT(e,r,o),E2(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(yn(this,e),Ii(this))}setValue(e){if(Ql(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Ac=class extends bo{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return Se}update(e){return this.part=e,this.ensureFocusTrap(e.element),Se}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var r,o;this.isElementTrappable(e)&&(((r=this.firstTrap)===null||r===void 0?void 0:r.parentElement)===e&&((o=this.lastTrap)===null||o===void 0?void 0:o.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,r,o,i;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(r=this.lastTrap)===null||r===void 0||r.removeEventListener("focus",this.onLastTrapFocus),(o=this.firstTrap)===null||o===void 0||o.remove(),(i=this.lastTrap)===null||i===void 0||i.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=0;o<r.length;o++){let i=r[o];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusFirstDescendant(i)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=r.length-1;o>=0;o--){let i=r[o];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusLastDescendant(i)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof it&&await e.updateComplete}isInsideElement(e,r){return Yt(e).includes(r)}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},ux=Ke(Ac);var L2;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(L2||(L2={}));var N3={sm:640,md:768,lg:1024,xl:1280},wc=class extends bo{constructor(e){super(e),this.size=0,this.onResize=()=>{let r=window.innerWidth;this.size!==r&&(this.size=r,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[r,o,i]){return this.lastArgs=[r,o,i],this.render(r,o,i)}render(e,r,o){let i=this.resolveThreshold(e),a=o??(()=>te);return this.size>i?r():a()}resolveThreshold(e){return typeof e=="number"?e:N3[e]}},mx=Ke(wc);var Rc,_r=class{static compareDeepPosition(e,r){if(e===r)return 0;let o=Yt(e).reverse(),i=Yt(r).reverse();if(o[0]!==i[0])return Node.DOCUMENT_POSITION_DISCONNECTED|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Node.DOCUMENT_POSITION_PRECEDING;let a=0;for(;(o[a]||i[a])&&o[a]===i[a];)a++;return o[a]==null?Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING:i[a]==null?Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_PRECEDING:o[a].compareDocumentPosition(i[a])}static compareDocumentPosition(e,r){let o=Rc.compareDeepPosition(e,r);return{equal:o===0,disconnected:(o&Node.DOCUMENT_POSITION_DISCONNECTED)!==0,implementationSpecific:(o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)!==0,preceding:(o&Node.DOCUMENT_POSITION_PRECEDING)!==0,following:(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0,contains:(o&Node.DOCUMENT_POSITION_CONTAINS)!==0,containedBy:(o&Node.DOCUMENT_POSITION_CONTAINED_BY)!==0}}static findFirstInDOM(e){let r=0;for(let o=1;o<e.length;o++)this.domOrderSorter(e[r],e[o])>0&&(r=o);return e[r]}static getDeepActiveElement(){var e;if(!document.activeElement)return null;let r=document.activeElement;for(;!((e=r.shadowRoot)===null||e===void 0)&&e.activeElement;)r=r.shadowRoot.activeElement;return r}};Rc=_r;_r.domOrderSorter=(t,e)=>{if(t===e||!t?.isConnected&&!e?.isConnected)return 0;if(!e?.isConnected)return-1;if(!t?.isConnected)return 1;let{preceding:r,following:o,contains:i,containedBy:a}=Rc.compareDocumentPosition(t,e);return r||i?1:o||a?-1:0};var _c=class t{static autoFocus(e){t.allowAutoFocus(e)&&e.focus()}static allowAutoFocus(e){if(Ic)return!1;let r=_r.getDeepActiveElement();if(!r)return!0;let o=_r.compareDocumentPosition(r,e);return o.disconnected||o.implementationSpecific?!1:o.preceding&&!o.contains||o.containedBy}};window.FluidTopicsFocusHelper=_c;var Mc,Nc,kc,zc,Tc=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((kc=(Nc=(Mc=window.safari)===null||Mc===void 0?void 0:Mc.pushNotification)===null||Nc===void 0?void 0:Nc.toString())!==null&&kc!==void 0?kc:"")==="[object SafariRemoteNotification]",Ic="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(zc=window.ftGlobals)!==null&&zc!==void 0?zc:{lit:Oa,litDecorators:wa,litRepeat:Ra,litClassMap:_a,litStyleMap:Ia,litUnsafeHTML:Na,wcUtils:{...ka,...Ha,...Ta,...Ja,...fc,...Qa,...Pa,...gs,...Ba,..._s,...gc,...x2,...cc,...Is,...ms,...Ts,...uc,...zs,...yc,...bc,...P1,...Da,...Fs,...Cc,...ys,...$s,...S2,...F1,...Us,...ic,...hc,...Ms,...ks,...ja,...qa,...xc,isSafari:Tc,isTouchScreen:Ic,setVariable:E}};var k3="ft-app-info",Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ir.eventName="authentication-change";var bn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};bn.eventName="ui-locale-changed";var z3={session:(t,e)=>{De(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>V.dispatchEvent(new Ir(e.payload)),0))}},V=wr.get({name:k3,reducers:z3,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Mi=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},RS=we(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(V)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>ct.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Mi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Mi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Mi([fo({store:V.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Mi([fo({store:V.name})],e.prototype,"uiLocale",void 0),e});var Mr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=V.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=V.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var vo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Mr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Mr.await()}};var Je=class extends vo{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new Lt,this.cache=e?i.commonCache:new Lt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ni=class extends Je{async listMySearches(){let{session:e}=V.getState();return Wa(e,be.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var ki=class extends Je{async listMyBookmarks(){let e=V.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var zi=class extends Je{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=V.getState().session;return!!e?.sessionAuthenticated}};var Ti=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/api/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=V.getState().session;return!!e?.sessionAuthenticated}};var T3="ft-user-assets",P3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(st).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:o,asset:i}=e.payload;Dc(t,r,[...Pc(t,r),i]),O2(t,r,1,o),A2(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Dc(t,r,Pc(t,r).map(i=>i.id===o.id?o:i)),A2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;Dc(t,r,Pc(t,r).filter(a=>a.id!==i)),O2(t,r,-1,o)}},w2={[st.SEARCHES]:"savedSearches",[st.BOOKMARKS]:"bookmarks",[st.BOOKS]:void 0,[st.COLLECTIONS]:void 0},Pc=(t,e)=>{var r;let o=w2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Dc=(t,e,r)=>{let o=w2[e];o&&(t[o]=r)},O2=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===st.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},A2=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},$e=wr.get({name:T3,reducers:P3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(st).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fc=class{constructor(e=new zi,r=new Ti){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=V.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ki,this.savedSearchesService=new Ni,V.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=V.getState();De((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(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&$e.getState().assetCounts.allAsset[e]!==r.count&&$e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&$e.getState().assetCounts.bookmarkByMap[e]!==r.count&&$e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===st.BOOKMARKS&&r&&$e.actions.clearBookmarkCountByMap(),$e.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;$e.actions.bookmarks(r)}}},D3=new Fc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=D3);var $c=class{addCommand(e,r=!1){V.commands.add(e,r)}consumeCommand(e){return V.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new $c;var R2,xo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},F3=Symbol("clearAfterUnitTest"),Pi=class extends Jn(Je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[R2]=()=>{this.defaultMessages={},this.cache=new Lt,this.listeners={}},this.currentUiLocale=V.getState().uiLocale,V.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=V.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 o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};De(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new on((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof pr)&&r&&console.error(i)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new xo({loadedContexts:e})),this.dispatchEvent(new xo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new xo({loadedContexts:[e]})),this.dispatchEvent(new xo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Yn(0).then(()=>o()).catch(()=>null)))}};R2=F3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var So=window.FluidTopicsI18nService,Di=window.FluidTopicsCustomI18nService;var Uc=class{highlightHtml(e,r,o){Ds(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Uc;var Bc=class{isDate(e){var r,o,i,a;return(a=(o=((i=(r=V.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||o===void 0?void 0:o.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a,s;if(e==null)return"";try{return ct.format(e,(o=r?.locale)!==null&&o!==void 0?o:V.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Bc;var vn=class{static get(e,r,{baseUrl:o,localesConfiguration:i,availableContentLocales:a}=V.getState()){var s;if(r==="all"&&i?.allLanguagesAllowed)r=void 0;else if(!r||a.length>0&&!a.some(c=>c.lang===r)){let c=i?.defaultLocales.defaultContentLocale;r=c?`${c.lang}-${c.region}`:(s=a[0])===null||s===void 0?void 0:s.lang}return new Ft(o,e??20,i?.allLanguagesAllowed,r,a)}};var Hc=class{urlToSearchRequest(e){return vn.get().parse(e)}searchRequestToUrl(e){return vn.get().serialize(e)}};window.FluidTopicsUrlService=new Hc;var Nr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Nr.eventName="before-location-change";var kr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};kr.eventName="change";var Gc=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))}},_2=new Gc;var Fi=class t extends Dt{static build(){return new t(window.history,_2,()=>window.location,!1)}constructor(e,r,o,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),De(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new kr(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=new URL(typeof c=="string"?c:(c??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),f=new Nr(d);this.dispatchEvent(f);let g=r(),m={...g===this.currentIndex?this.currentState:void 0,...a,index:g,href:f.detail.nextLocation.href};o.apply(i,[m,s,m.href]),this.setCurrentState(m,!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 o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(e){this.addEventListener(Nr.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Nr.eventName,e)}addHistoryChangeListener(e){this.addEventListener(kr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(kr.eventName,e)}currentItem(){return Ze(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 Ze(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return Ze(r.find(o=>e(o)))}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 Ze(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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}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 o;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var I2=I`
|
|
84
|
+
`}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?he.error:this.warningMessages.length?he.warning:he.default}}return Le([b()],e.prototype,"warningRules",void 0),Le([b()],e.prototype,"errorRules",void 0),Le([b()],e.prototype,"validateOn",void 0),Le([b({type:Boolean})],e.prototype,"validateAtRender",void 0),Le([b()],e.prototype,"label",void 0),Le([b({type:Boolean})],e.prototype,"hideLabel",void 0),Le([b()],e.prototype,"name",void 0),Le([b({type:Boolean})],e.prototype,"disabled",void 0),Le([b()],e.prototype,"helperText",void 0),Le([b()],e.prototype,"forceStatus",void 0),Le([b({reflect:!0})],e.prototype,"value",void 0),Le([H()],e.prototype,"errorMessages",void 0),Le([H()],e.prototype,"warningMessages",void 0),Le([H()],e.prototype,"status",void 0),Le([H()],e.prototype,"focused",void 0),Le([H()],e.prototype,"additionalWarningRules",void 0),Le([H()],e.prototype,"additionalErrorRules",void 0),Le([H()],e.prototype,"externalErrorMessages",void 0),e});var yn=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let o of r)o._$AO?.(e,!1),yn(o,e);return!0},Ii=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},E2=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),M3(e)}};function _3(t){this._$AN!==void 0?(Ii(this),this._$AM=t,E2(this)):this._$AM=t}function I3(t,e=!1,r=0){let o=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(o))for(let a=r;a<o.length;a++)yn(o[a],!1),Ii(o[a]);else o!=null&&(yn(o,!1),Ii(o));else yn(this,t)}var M3=t=>{t.type==Ct.CHILD&&(t._$AP??=I3,t._$AQ??=_3)},bo=class extends at{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,o){super._$AT(e,r,o),E2(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(yn(this,e),Ii(this))}setValue(e){if(Ql(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Ac=class extends bo{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return Se}update(e){return this.part=e,this.ensureFocusTrap(e.element),Se}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var r,o;this.isElementTrappable(e)&&(((r=this.firstTrap)===null||r===void 0?void 0:r.parentElement)===e&&((o=this.lastTrap)===null||o===void 0?void 0:o.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,r,o,i;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(r=this.lastTrap)===null||r===void 0||r.removeEventListener("focus",this.onLastTrapFocus),(o=this.firstTrap)===null||o===void 0||o.remove(),(i=this.lastTrap)===null||i===void 0||i.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=0;o<r.length;o++){let i=r[o];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusFirstDescendant(i)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=r.length-1;o>=0;o--){let i=r[o];if(i instanceof HTMLElement&&(this.attemptFocus(i)||await this.focusLastDescendant(i)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof it&&await e.updateComplete}isInsideElement(e,r){return Yt(e).includes(r)}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},ux=Ke(Ac);var L2;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(L2||(L2={}));var N3={sm:640,md:768,lg:1024,xl:1280},wc=class extends bo{constructor(e){super(e),this.size=0,this.onResize=()=>{let r=window.innerWidth;this.size!==r&&(this.size=r,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[r,o,i]){return this.lastArgs=[r,o,i],this.render(r,o,i)}render(e,r,o){let i=this.resolveThreshold(e),a=o??(()=>te);return this.size>i?r():a()}resolveThreshold(e){return typeof e=="number"?e:N3[e]}},mx=Ke(wc);var Rc,_r=class{static compareDeepPosition(e,r){if(e===r)return 0;let o=Yt(e).reverse(),i=Yt(r).reverse();if(o[0]!==i[0])return Node.DOCUMENT_POSITION_DISCONNECTED|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Node.DOCUMENT_POSITION_PRECEDING;let a=0;for(;(o[a]||i[a])&&o[a]===i[a];)a++;return o[a]==null?Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING:i[a]==null?Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_PRECEDING:o[a].compareDocumentPosition(i[a])}static compareDocumentPosition(e,r){let o=Rc.compareDeepPosition(e,r);return{equal:o===0,disconnected:(o&Node.DOCUMENT_POSITION_DISCONNECTED)!==0,implementationSpecific:(o&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)!==0,preceding:(o&Node.DOCUMENT_POSITION_PRECEDING)!==0,following:(o&Node.DOCUMENT_POSITION_FOLLOWING)!==0,contains:(o&Node.DOCUMENT_POSITION_CONTAINS)!==0,containedBy:(o&Node.DOCUMENT_POSITION_CONTAINED_BY)!==0}}static findFirstInDOM(e){let r=0;for(let o=1;o<e.length;o++)this.domOrderSorter(e[r],e[o])>0&&(r=o);return e[r]}static getDeepActiveElement(){var e;if(!document.activeElement)return null;let r=document.activeElement;for(;!((e=r.shadowRoot)===null||e===void 0)&&e.activeElement;)r=r.shadowRoot.activeElement;return r}};Rc=_r;_r.domOrderSorter=(t,e)=>{if(t===e||!t?.isConnected&&!e?.isConnected)return 0;if(!e?.isConnected)return-1;if(!t?.isConnected)return 1;let{preceding:r,following:o,contains:i,containedBy:a}=Rc.compareDocumentPosition(t,e);return r||i?1:o||a?-1:0};var _c=class t{static autoFocus(e){t.allowAutoFocus(e)&&e.focus()}static allowAutoFocus(e){if(Ic)return!1;let r=_r.getDeepActiveElement();if(!r)return!0;let o=_r.compareDocumentPosition(r,e);return o.disconnected||o.implementationSpecific?!1:o.preceding&&!o.contains||o.containedBy}};window.FluidTopicsFocusHelper=_c;var Mc,Nc,kc,zc,Tc=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((kc=(Nc=(Mc=window.safari)===null||Mc===void 0?void 0:Mc.pushNotification)===null||Nc===void 0?void 0:Nc.toString())!==null&&kc!==void 0?kc:"")==="[object SafariRemoteNotification]",Ic="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(zc=window.ftGlobals)!==null&&zc!==void 0?zc:{lit:Oa,litDecorators:wa,litRepeat:Ra,litClassMap:_a,litStyleMap:Ia,litUnsafeHTML:Na,wcUtils:{...ka,...Ha,...Ta,...Ja,...fc,...Qa,...Pa,...gs,...Ba,..._s,...gc,...x2,...cc,...Is,...ms,...Ts,...uc,...zs,...yc,...bc,...P1,...Da,...Fs,...Cc,...ys,...$s,...S2,...F1,...Us,...ic,...hc,...Ms,...ks,...ja,...qa,...xc,isSafari:Tc,isTouchScreen:Ic,setVariable:E}};var k3="ft-app-info",Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ir.eventName="authentication-change";var bn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};bn.eventName="ui-locale-changed";var z3={session:(t,e)=>{De(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>V.dispatchEvent(new Ir(e.payload)),0))}},V=wr.get({name:k3,reducers:z3,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Mi=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},RS=we(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(V)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>ct.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Mi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Mi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Mi([fo({store:V.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Mi([fo({store:V.name})],e.prototype,"uiLocale",void 0),e});var Mr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=V.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=V.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var vo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Mr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Mr.await()}};var Je=class extends vo{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new Lt,this.cache=e?i.commonCache:new Lt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ni=class extends Je{async listMySearches(){let{session:e}=V.getState();return Wa(e,be.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var ki=class extends Je{async listMyBookmarks(){let e=V.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var zi=class extends Je{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(`/api/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(`/api/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=V.getState().session;return!!e?.sessionAuthenticated}};var Ti=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let e=V.getState().session;return!!e?.sessionAuthenticated}};var T3="ft-user-assets",P3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(st).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:o,asset:i}=e.payload;Dc(t,r,[...Pc(t,r),i]),O2(t,r,1,o),A2(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Dc(t,r,Pc(t,r).map(i=>i.id===o.id?o:i)),A2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;Dc(t,r,Pc(t,r).filter(a=>a.id!==i)),O2(t,r,-1,o)}},w2={[st.SEARCHES]:"savedSearches",[st.BOOKMARKS]:"bookmarks",[st.BOOKS]:void 0,[st.COLLECTIONS]:void 0},Pc=(t,e)=>{var r;let o=w2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Dc=(t,e,r)=>{let o=w2[e];o&&(t[o]=r)},O2=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===st.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},A2=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},$e=wr.get({name:T3,reducers:P3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(st).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fc=class{constructor(e=new zi,r=new Ti){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=V.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ki,this.savedSearchesService=new Ni,V.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=V.getState();De((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(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&$e.getState().assetCounts.allAsset[e]!==r.count&&$e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&$e.getState().assetCounts.bookmarkByMap[e]!==r.count&&$e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===st.BOOKMARKS&&r&&$e.actions.clearBookmarkCountByMap(),$e.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;$e.actions.bookmarks(r)}}},D3=new Fc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=D3);var $c=class{addCommand(e,r=!1){V.commands.add(e,r)}consumeCommand(e){return V.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new $c;var R2,xo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},F3=Symbol("clearAfterUnitTest"),Pi=class extends Jn(Je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[R2]=()=>{this.defaultMessages={},this.cache=new Lt,this.listeners={}},this.currentUiLocale=V.getState().uiLocale,V.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=V.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 o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};De(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new on((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof pr)&&r&&console.error(i)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new xo({loadedContexts:e})),this.dispatchEvent(new xo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new xo({loadedContexts:[e]})),this.dispatchEvent(new xo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Yn(0).then(()=>o()).catch(()=>null)))}};R2=F3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var So=window.FluidTopicsI18nService,Di=window.FluidTopicsCustomI18nService;var Uc=class{highlightHtml(e,r,o){Ds(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Uc;var Bc=class{isDate(e){var r,o,i,a;return(a=(o=((i=(r=V.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||o===void 0?void 0:o.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a,s;if(e==null)return"";try{return ct.format(e,(o=r?.locale)!==null&&o!==void 0?o:V.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Bc;var vn=class{static get(e,r,{baseUrl:o,localesConfiguration:i,availableContentLocales:a}=V.getState()){var s;if(r==="all"&&i?.allLanguagesAllowed)r=void 0;else if(!r||a.length>0&&!a.some(c=>c.lang===r)){let c=i?.defaultLocales.defaultContentLocale;r=c?`${c.lang}-${c.region}`:(s=a[0])===null||s===void 0?void 0:s.lang}return new Ft(o,e??20,i?.allLanguagesAllowed,r,a)}};var Hc=class{urlToSearchRequest(e){return vn.get().parse(e)}searchRequestToUrl(e){return vn.get().serialize(e)}};window.FluidTopicsUrlService=new Hc;var Nr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Nr.eventName="before-location-change";var kr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};kr.eventName="change";var Gc=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))}},_2=new Gc;var Fi=class t extends Dt{static build(){return new t(window.history,_2,()=>window.location,!1)}constructor(e,r,o,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),De(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new kr(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=new URL(typeof c=="string"?c:(c??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),f=new Nr(d);this.dispatchEvent(f);let g=r(),m={...g===this.currentIndex?this.currentState:void 0,...a,index:g,href:f.detail.nextLocation.href};o.apply(i,[m,s,m.href]),this.setCurrentState(m,!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 o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(e){this.addEventListener(Nr.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Nr.eventName,e)}addHistoryChangeListener(e){this.addEventListener(kr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(kr.eventName,e)}currentItem(){return Ze(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 Ze(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return Ze(r.find(o=>e(o)))}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 Ze(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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}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 o;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var I2=I`
|
|
85
85
|
`;function M2(t,e){let{authenticationRequired:r,session:o}=V.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var $i=class extends vo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vc=class t extends mn{static build(e){return new t(V,e)}constructor(e,r){super(),this.store=e,this.cache=new Lt,this.withManualResources=!0,this.userLocaleService=new $i,this.knownContexts=new to,this.knownCustomComponents=new to,this.cleanSessionDebouncer=new Be,this.reloadConfiguration=()=>{var o;(o=this.cache)===null||o===void 0||o.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Be(500),this.apiProvider=r??(()=>Mr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ir.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ir.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",()=>M2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new bn(o)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return Jd(V.getState().session,...e)}},N2=Vc.build();var zr=class extends Event{constructor(e,r,o,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=i??!1}};var xn=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:o}=r;for(let{elementRef:i,callbackRef:a}of o){let s=i.deref(),c=a.deref();s===void 0||c===void 0||s.dispatchEvent(new zr(e.context,s,c,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,i=this.pendingContextRequests.get(e.context);i===void 0&&this.pendingContextRequests.set(e.context,i={callbacks:new WeakMap,requests:[]});let a=i.callbacks.get(r);a===void 0&&i.callbacks.set(r,a=new WeakSet),a.has(o)||(a.add(o),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(o)}))}}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 Oe=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},le=class extends Or{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=N2,this.contextRoot=new xn}render(){return N`
|
|
86
86
|
<slot></slot>
|
|
87
87
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var 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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>So.addContext(o)),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())}};le.elementDefinitions={};le.styles=I2;Oe([b()],le.prototype,"baseUrl",void 0);Oe([b()],le.prototype,"tenantId",void 0);Oe([b()],le.prototype,"apiIntegrationIdentifier",void 0);Oe([b()],le.prototype,"apiIntegrationAppVersion",void 0);Oe([b()],le.prototype,"uiLocale",void 0);Oe([Pe(null)],le.prototype,"availableUiLocales",void 0);Oe([Pe(null)],le.prototype,"metadataConfiguration",void 0);Oe([b({type:Boolean})],le.prototype,"editorMode",void 0);Oe([b({type:Boolean})],le.prototype,"noCustom",void 0);Oe([b({type:Boolean})],le.prototype,"openExternalDocumentInNewTab",void 0);Oe([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],le.prototype,"noCustomComponent",void 0);Oe([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],le.prototype,"noCustomCode",void 0);Oe([b({type:Boolean})],le.prototype,"withManualResources",void 0);Oe([b({type:Boolean})],le.prototype,"navigatorOnline",void 0);Oe([b({type:Boolean})],le.prototype,"forcedOffline",void 0);Oe([b({type:Boolean})],le.prototype,"authenticationRequired",void 0);Oe([Pe([])],le.prototype,"messageContexts",void 0);Oe([Pe(void 0)],le.prototype,"session",void 0);var k2={"ft-app-context":le};q(k2);var Co=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?Di:So}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(o,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(o,i)=>()=>i}),this.attributes=new Proxy({},{get:(o,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var Wc=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,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Eo=new Wc;var B3=function(t,e,r,o){var i=arguments.length,a=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Cn=Symbol("i18nAttributes"),z2=Symbol("i18nListAttributes"),En=Symbol("i18nProperties"),Ui=Symbol("i18nContexts"),Sn=Symbol("i18nUnsubs"),tr=we(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Di:So}i18n(a){let{context:s,key:c,message:d}=a,{custom:f,args:g,argsProvider:m}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let y=g??(m?m(this):[]);return this.getI18nService(f).resolveMessage(s,c,...y)}return d}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Eo.isI18nKey(a)){let[c,d]=a.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,d)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let d=this,f=(g,m,y)=>y?.context&&y.key&&a(g,m,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...g})}:y;(s=this[Cn])===null||s===void 0||s.forEach((g,m)=>d[m]=f(g,m,d[m])),(c=this[z2])===null||c===void 0||c.forEach((g,m)=>{var y;return d[m]=(y=d[m])===null||y===void 0?void 0:y.map(x=>f(g,m,x))})}updateI18nProperties(a){var s;(s=this[En])===null||s===void 0||s.forEach((c,d)=>{a(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let d=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ui].set(d,{isCustomContext:c}),this[Sn].has(d)||this[Sn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(a){return this[Ui].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ui].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Sn].forEach(a=>a()),this[Sn].clear()}}return e=Ui,r=Sn,B3([b({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Bi=class extends tr(B){},Hi=class extends tr(Or){};var Ln=(t,e)=>(r,o)=>{var i,a;r.constructor.createProperty(o,e??{attribute:!1,type:String});let s={...t,key:(i=t.key)!==null&&i!==void 0?i:o};r[En]=(a=r[En])!==null&&a!==void 0?a:new Map,r[En].set(o,s)};var T2=I`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ftds-period-picker",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.50",
|
|
4
4
|
"description": "The design system period picker component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fluid-topics/design-system-variables": "3.18.0",
|
|
23
|
-
"@fluid-topics/ft-i18n": "2.2.
|
|
24
|
-
"@fluid-topics/ft-input-label": "2.2.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
26
|
-
"@fluid-topics/ftds-base-input": "2.2.
|
|
27
|
-
"@fluid-topics/ftds-button": "2.2.
|
|
28
|
-
"@fluid-topics/ftds-floating-menu": "2.2.
|
|
29
|
-
"@fluid-topics/ftds-icon": "2.2.
|
|
30
|
-
"@fluid-topics/ftds-radio": "2.2.
|
|
31
|
-
"@fluid-topics/ftds-text-input": "2.2.
|
|
23
|
+
"@fluid-topics/ft-i18n": "2.2.50",
|
|
24
|
+
"@fluid-topics/ft-input-label": "2.2.50",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "2.2.50",
|
|
26
|
+
"@fluid-topics/ftds-base-input": "2.2.50",
|
|
27
|
+
"@fluid-topics/ftds-button": "2.2.50",
|
|
28
|
+
"@fluid-topics/ftds-floating-menu": "2.2.50",
|
|
29
|
+
"@fluid-topics/ftds-icon": "2.2.50",
|
|
30
|
+
"@fluid-topics/ftds-radio": "2.2.50",
|
|
31
|
+
"@fluid-topics/ftds-text-input": "2.2.50",
|
|
32
32
|
"lit": "3.3.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@fluid-topics/ft-wc-test-utils": "2.2.
|
|
35
|
+
"@fluid-topics/ft-wc-test-utils": "2.2.50"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "827b5f0b91f05b76d24e8c231411908394c47b4e"
|
|
38
38
|
}
|