@fluid-topics/ft-search-quick-filters 2.2.15 → 2.2.17
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,28 +1,28 @@
|
|
|
1
|
-
"use strict";(()=>{var js=Object.create;var Er=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var Vs=Object.getOwnPropertyNames;var qs=Object.getPrototypeOf,Hs=Object.prototype.hasOwnProperty;var Ne=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var $s=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Vs(t))!Hs.call(e,s)&&s!==r&&Er(e,s,{get:()=>t[s],enumerable:!(n=Bs(t,s))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?js(qs(e)):{},$s(t||!e||!e.__esModule?Er(r,"default",{value:e,enumerable:!0}):r,e));var _=Ne((aa,vr)=>{vr.exports=ftGlobals.wcUtils});var J=Ne((oa,Ar)=>{Ar.exports=ftGlobals.lit});var q=Ne((ca,br)=>{br.exports=ftGlobals.litDecorators});var Is=Ne((Kl,Rs)=>{Rs.exports=ftGlobals.litRepeat});var Ps=f(_());var Rt=f(J());var ye=f(_()),mr=f(q());var It;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(It||(It={}));var X=f(_());var Ks=f(_());var _r;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(_r||(_r={}));var Cr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Cr||(Cr={}));var xr;(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"})(xr||(xr={}));var wr;(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"})(wr||(wr={}));var Tr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Tr||(Tr={}));var Or;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Or||(Or={}));var Rr;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Rr||(Rr={}));var Ir;(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"})(Ir||(Ir={}));var kr;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(kr||(kr={}));var Mr;(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"})(Mr||(Mr={}));var Dr;(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"})(Dr||(Dr={}));var Nr;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Nr||(Nr={}));var Lr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Lr||(Lr={}));var Pr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Pr||(Pr={}));var Fr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Fr||(Fr={}));var Ur;(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"})(Ur||(Ur={}));var kt;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(kt||(kt={}));var jr;(function(e){e.ASC="ASC",e.DESC="DESC"})(jr||(jr={}));var Br;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Br||(Br={}));var Mt;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Mt||(Mt={}));var Vr;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Vr||(Vr={}));var qr;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(qr||(qr={}));var Hr;(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"})(Hr||(Hr={}));var $r;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})($r||($r={}));var Kr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Kr||(Kr={}));var Dt;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Dt||(Dt={}));var zr;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(zr||(zr={}));var C;(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"})(C||(C={}));var F;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(F||(F={}));var Gr;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Gr||(Gr={}));var Wr;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Wr||(Wr={}));var Qr;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Qr||(Qr={}));var Yr;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Yr||(Yr={}));var Xr;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Xr||(Xr={}));var Jr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Jr||(Jr={}));var Zr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zr||(Zr={}));var en;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(en||(en={}));var tn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(tn||(tn={}));var rn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(rn||(rn={}));var nn;(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"})(nn||(nn={}));var sn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sn||(sn={}));var zs={[C.PERSONAL_BOOK_SHARE_USER]:[C.PERSONAL_BOOK_USER],[C.HTML_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.PDF_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.KHUB_ADMIN]:[C.CONTENT_PUBLISHER],[C.ADMIN]:[C.KHUB_ADMIN,C.USERS_ADMIN,C.PORTAL_ADMIN,C.BEHAVIOR_DATA_USER],[C.GENERATIVE_AI_EXPORT_USER]:[C.GENERATIVE_AI_USER]};function an(e,t){return e===t||(zs[e]??[]).some(r=>an(r,t))}function Nt(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=>an(n,t))}var rr=f(q());var on=f(q(),1);var Lt=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function cn(e,t){return(0,on.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return ve(e);try{return JSON.parse(r)}catch{return ve(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ae,...t??{}})}function Gs(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(!ce(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(!ce(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!ce(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ce(e,t){try{return Gs(e,t)}catch{return!1}}function Ae(e,t){return!ce(e,t)}function ve(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Le(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var un=f(q(),1);var Pt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Ae,attribute:!1,...t};(0,un.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(o=>o[n]),store:t.store})}};var Pe=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 Z=f(q(),1);var Fe=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);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 dn=f(J(),1);var Ue=globalThis,Ws=Ue.ShadowRoot&&(Ue.ShadyCSS===void 0||Ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ln=(e,t)=>{if(Ws)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Ue.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var je=class extends dn.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 ln(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){Lt(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 pn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var le=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},yn,hn=Symbol("constructorPrototype"),fn=Symbol("constructorName"),gn=Symbol("exportpartsDebouncer"),mn=Symbol("dynamicDependenciesLoaded"),ue=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ue.eventName="exportparts-updated";var H=class extends je{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[yn]=new Fe(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[gn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[fn]=this.constructor.name,this[hn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fn]&&Object.setPrototypeOf(this,this[hn])}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[mn]||(r[mn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ue.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ue.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 ue)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=pn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,a,o;let c=p=>p!=null&&p.trim().length>0,u=t.filter(c).map(p=>p.trim());if(u.length===0){this.exportparts=void 0;return}let l=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],b=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[],T=[...g,...b].filter(c).map(y=>y.trim());for(let y of T)l.add(y)}if(l.size===0){this.exportparts=void 0;return}let d=[...l.values()].flatMap(p=>u.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};yn=gn;le([(0,Z.property)()],H.prototype,"exportpartsPrefix",void 0);le([cn([])],H.prototype,"exportpartsPrefixes",void 0);le([(0,Z.property)({reflect:!0})],H.prototype,"exportparts",void 0);le([(0,Z.property)()],H.prototype,"customStylesheet",void 0);le([(0,Z.property)()],H.prototype,"elementToFocus",void 0);le([(0,Z.state)()],H.prototype,"useAdoptedStyleSheets",void 0);function Be(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var be=Symbol("internalReduxEventsUnsubscribers"),W=Symbol("internalStoresUnsubscribers"),ee=Symbol("internalStores"),Qs=Le(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ee].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ee].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[ee].get(a)}addStore(a,o){var c;o=(c=o??a.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[ee].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[ee].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ee].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[W].has(a.store):this[W].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var c;this[W].set(a,o.subscribe(()=>this.updateFromStores())),this[be].set(a,[]),Be(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,l)=>{if(typeof this[l]=="function"&&(!u.store||o.name===u.store)){let d=p=>this[l](p);o.addEventListener(u.eventName,d),this[be].get(a).push(()=>o.removeEventListener(u.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[W].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[W].has(a)&&this[W].get(a)(),this[W].delete(a),(o=this[be].get(a))===null||o===void 0||o.forEach(c=>c()),this[be].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=W,r=ee,n=be,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Sn=class extends Qs(H){};function R(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 Ys=typeof Symbol=="function"&&Symbol.observable||"@@observable",En=Ys,Ft=()=>Math.random().toString(36).substring(7).split("").join("."),Xs={INIT:`@@redux/INIT${Ft()}`,REPLACE:`@@redux/REPLACE${Ft()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ft()}`},Ve=Xs;function qe(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 Ut(e,t,r){if(typeof e!="function")throw new Error(R(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r(Ut)(e,t)}let n=e,s=t,i=new Map,a=i,o=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,O)=>{a.set(O,y)}))}function l(){if(c)throw new Error(R(3));return s}function d(y){if(typeof y!="function")throw new Error(R(4));if(c)throw new Error(R(5));let O=!0;u();let N=o++;return a.set(N,y),function(){if(O){if(c)throw new Error(R(6));O=!1,u(),a.delete(N),i=null}}}function p(y){if(!qe(y))throw new Error(R(7));if(typeof y.type>"u")throw new Error(R(8));if(typeof y.type!="string")throw new Error(R(17));if(c)throw new Error(R(9));try{c=!0,s=n(s,y)}finally{c=!1}return(i=a).forEach(N=>{N()}),y}function g(y){if(typeof y!="function")throw new Error(R(10));n=y,p({type:Ve.REPLACE})}function b(){let y=d;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(R(11));function N(){let S=O;S.next&&S.next(l())}return N(),{unsubscribe:y(N)}},[En](){return this}}}return p({type:Ve.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:g,[En]:b}}function Js(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ve.INIT})>"u")throw new Error(R(12));if(typeof r(void 0,{type:Ve.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function vn(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),s,i;try{Js(r)}catch(a){i=a}return function(o={},c){if(i)throw i;let u=!1,l={};for(let d=0;d<n.length;d++){let p=n[d],g=r[p],b=o[p],T=g(b,c);if(typeof T>"u"){let y=c&&c.type;throw new Error(R(14))}l[p]=T,u=u||T!==b}return u=u||n.length!==Object.keys(o).length,u?l:o}}function _e(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function An(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(R(15))},a={getState:s.getState,dispatch:(c,...u)=>i(c,...u)},o=e.map(c=>c(a));return i=_e(...o)(s.dispatch),{...s,dispatch:i}}}function bn(e){return qe(e)&&"type"in e&&typeof e.type=="string"}var kn=Symbol.for("immer-nothing"),_n=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function B(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var L=Object,pe=L.getPrototypeOf,ze="constructor",Je="prototype",qt="configurable",Ge="enumerable",$e="writable",Ce="value",$=e=>!!e&&!!e[I];function P(e){return e?Mn(e)||et(e)||!!e[_n]||!!e[ze]?.[_n]||tt(e)||rt(e):!1}var Zs=L[Je][ze].toString(),Cn=new WeakMap;function Mn(e){if(!e||!Yt(e))return!1;let t=pe(e);if(t===null||t===L[Je])return!0;let r=L.hasOwnProperty.call(t,ze)&&t[ze];if(r===Object)return!0;if(!de(r))return!1;let n=Cn.get(r);return n===void 0&&(n=Function.toString.call(r),Cn.set(r,n)),n===Zs}function Ze(e,t,r=!0){Te(e)===0?(r?Reflect.ownKeys(e):L.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Te(e){let t=e[I];return t?t.type_:et(e)?1:tt(e)?2:rt(e)?3:0}var jt=(e,t,r=Te(e))=>r===2?e.has(t):L[Je].hasOwnProperty.call(e,t),Ht=(e,t,r=Te(e))=>r===2?e.get(t):e[t],We=(e,t,r,n=Te(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ei(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var et=Array.isArray,tt=e=>e instanceof Map,rt=e=>e instanceof Set,Yt=e=>typeof e=="object",de=e=>typeof e=="function",Bt=e=>typeof e=="boolean";function ti(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_;var Xt=e=>e.modified_?e.copy_:e.base_;function $t(e,t){if(tt(e))return new Map(e);if(rt(e))return new Set(e);if(et(e))return Array[Je].slice.call(e);let r=Mn(e);if(t===!0||t==="class_only"&&!r){let n=L.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let a=s[i],o=n[a];o[$e]===!1&&(o[$e]=!0,o[qt]=!0),(o.get||o.set)&&(n[a]={[qt]:!0,[$e]:!0,[Ge]:o[Ge],[Ce]:e[a]})}return L.create(pe(e),n)}else{let n=pe(e);if(n!==null&&r)return{...e};let s=L.create(n);return L.assign(s,e)}}function Jt(e,t=!1){return nt(e)||$(e)||!P(e)||(Te(e)>1&&L.defineProperties(e,{set:He,add:He,clear:He,delete:He}),L.freeze(e),t&&Ze(e,(r,n)=>{Jt(n,!0)},!1)),e}function ri(){B(2)}var He={[Ce]:ri};function nt(e){return e===null||!Yt(e)?!0:L.isFrozen(e)}var Qe="MapSet",Kt="Patches",xn="ArrayMethods",Dn={};function te(e){let t=Dn[e];return t||B(0,e),t}var wn=e=>!!Dn[e];var xe,Nn=()=>xe,ni=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:wn(Qe)?te(Qe):void 0,arrayMethodsPlugin_:wn(xn)?te(xn):void 0});function Tn(e,t){t&&(e.patchPlugin_=te(Kt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zt(e){Gt(e),e.drafts_.forEach(si),e.drafts_=null}function Gt(e){e===xe&&(xe=e.parent_)}var On=e=>xe=ni(xe,e);function si(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(zt(t),B(4)),P(e)&&(e=In(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=In(t,r);return ii(t,e,!0),zt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==kn?e:void 0}function In(e,t){if(nt(t))return t;let r=t[I];if(!r)return Ye(t,e.handledSet_,e);if(!st(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);Fn(r,e)}return r.copy_}function ii(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Jt(t,r)}function Ln(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var st=(e,t)=>e.scope_===t,ai=[];function Pn(e,t,r,n){let s=K(e),i=e.type_;if(n!==void 0&&Ht(s,n,i)===t){We(s,n,r,i);return}if(!e.draftLocations_){let o=e.draftLocations_=new Map;Ze(s,(c,u)=>{if($(u)){let l=o.get(u)||[];l.push(c),o.set(u,l)}})}let a=e.draftLocations_.get(t)??ai;for(let o of a)We(s,o,r,i)}function oi(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!st(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let a=Xt(i);Pn(e,i.draft_??i,a,r),Fn(i,s)})}function Fn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Ln(e)}}function ci(e,t,r){let{scope_:n}=e;if($(r)){let s=r[I];st(s,n)&&s.callbacks_.push(function(){Ke(e);let a=Xt(s);Pn(e,r,a,t)})}else P(r)&&e.callbacks_.push(function(){let i=K(e);e.type_===3?i.has(r)&&Ye(r,n.handledSet_,n):Ht(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ye(Ht(e.copy_,t,e.type_),n.handledSet_,n)})}function Ye(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||$(e)||t.has(e)||!P(e)||nt(e)||(t.add(e),Ze(e,(n,s)=>{if($(s)){let i=s[I];if(st(i,r)){let a=Xt(i);We(e,n,a,e.type_),Ln(i)}}else P(s)&&Ye(s,t,r)})),e}function ui(e,t){let r=et(e),n={type_:r?1:0,scope_:t?t.scope_:Nn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Xe;r&&(s=[n],i=we);let{revoke:a,proxy:o}=Proxy.revocable(s,i);return n.draft_=o,n.revoke_=a,[o,n]}var Xe={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=K(e);if(!jt(s,t,e.type_))return di(e,s,t);let i=s[t];if(e.finalized_||!P(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ti(t))return i;if(i===Vt(e.base_,t)||li(e,t,i)){Ke(e);let a=e.type_===1?+t:t,o=Qt(e.scope_,i,e,a);return e.copy_[a]=o}return i},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){let n=Un(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Vt(K(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ei(r,s)&&(r!==void 0||jt(e.base_,t,e.type_)))return!0;Ke(e),Wt(e)}return e.copy_[t]===r&&(r!==void 0||jt(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ci(e,t,r)),!0},deleteProperty(e,t){return Ke(e),Vt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[$e]:!0,[qt]:e.type_!==1||t!=="length",[Ge]:n[Ge],[Ce]:r[t]}},defineProperty(){B(11)},getPrototypeOf(e){return pe(e.base_)},setPrototypeOf(){B(12)}},we={};for(let e in Xe){let t=Xe[e];we[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}we.deleteProperty=function(e,t){return we.set.call(this,e,t,void 0)};we.set=function(e,t,r){return Xe.set.call(this,e[0],t,r,e[0])};function Vt(e,t){let r=e[I];return(r?K(r):e)[t]}function li(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!P(r)||r[I]?!1:e.baseRefs_.has(r)}function di(e,t,r){let n=Un(t,r);return n?Ce in n?n[Ce]:n.get?.call(e.draft_):void 0}function Un(e,t){if(!(t in e))return;let r=pe(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=pe(r)}}function Wt(e){e.modified_||(e.modified_=!0,e.parent_&&Wt(e.parent_))}function Ke(e){e.copy_||(e.assigned_=new Map,e.copy_=$t(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pi=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(de(t)&&!de(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,l=>r.call(this,l,...u))}}de(r)||B(6),n!==void 0&&!de(n)&&B(7);let s;if(P(t)){let i=On(this),a=Qt(i,t,void 0),o=!0;try{s=r(a),o=!1}finally{o?zt(i):Gt(i)}return Tn(i,n),Rn(s,i)}else if(!t||!Yt(t)){if(s=r(t),s===void 0&&(s=t),s===kn&&(s=void 0),this.autoFreeze_&&Jt(s,!0),n){let i=[],a=[];te(Kt).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:a}),n(i,a)}return s}else B(1,t)},this.produceWithPatches=(t,r)=>{if(de(t))return(a,...o)=>this.produceWithPatches(a,c=>t(c,...o));let n,s;return[this.produce(t,r,(a,o)=>{n=a,s=o}),n,s]},Bt(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Bt(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Bt(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){P(e)||B(8),$(e)&&(e=jn(e));let t=On(this),r=Qt(t,e,void 0);return r[I].isManual_=!0,Gt(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&B(9);let{scope_:n}=r;return Tn(n,t),Rn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=te(Kt).applyPatches_;return $(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Qt(e,t,r,n){let[s,i]=tt(t)?te(Qe).proxyMap_(t,r):rt(t)?te(Qe).proxySet_(t,r):ui(t,r);return(r?.scope_??Nn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?oi(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),s}function jn(e){return $(e)||B(10,e),Bn(e)}function Bn(e){if(!P(e)||nt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=$t(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=$t(e,!0);return Ze(r,(s,i)=>{We(r,s,Bn(i))},n),t&&(t.finalized_=!1),r}var hi=globalThis.Iterator,Ja=typeof hi?.from=="function";var fi=new pi,Zt=fi.produce;function Vn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var qn=Vn(),Hn=Vn;var mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_e:_e.apply(null,arguments)},io=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yi=e=>e&&typeof e.match=="function";function Q(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(z(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>bn(n)&&n.type===e,r}var Wn=class Oe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oe.prototype)}static get[Symbol.species](){return Oe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oe(...t[0].concat(this)):new Oe(...t.concat(this))}};function $n(e){return P(e)?Zt(e,()=>{}):e}function it(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function gi(e){return typeof e=="boolean"}var Si=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},a=new Wn;return r&&(gi(r)?a.push(qn):a.push(Hn(r.extraArgument))),a},Ei="RTK_autoBatch";var Kn=e=>t=>{setTimeout(t,e)},vi=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(s),a=setTimeout(s,t)},Ai=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,a=!1,o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?vi(window.requestAnimationFrame,100):Kn(10):e.type==="callback"?e.queueNotification:Kn(e.timeout),u=()=>{a=!1,i&&(i=!1,o.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let d=()=>s&&l(),p=n.subscribe(d);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return s=!l?.meta?.[Ei],i=!s,i&&(a||(a=!0,c(u))),n.dispatch(l)}finally{s=!0}}})},bi=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Wn(e);return n&&s.push(Ai(typeof n=="object"?n:void 0)),s};function Qn(e){let t=Si(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{},c;if(typeof r=="function")c=r;else if(qe(r))c=vn(r);else throw new Error(z(1));let u;typeof n=="function"?u=n(t):u=t();let l=_e;s&&(l=mi({trace:!1,...typeof s=="object"&&s}));let d=An(...u),p=bi(d),g=typeof o=="function"?o(p):p(),b=l(...g);return Ut(c,a,b)}function Yn(e){let t={},r=[],n,s={addCase(i,a){let o=typeof i=="string"?i:i.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=a,s},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function _i(e){return typeof e=="function"}function Ci(e,t){let[r,n,s]=Yn(t),i;if(_i(e))i=()=>$n(e());else{let o=$n(e);i=()=>o}function a(o=i(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[s]),u.reduce((l,d)=>{if(d)if($(l)){let g=d(l,c);return g===void 0?l:g}else{if(P(l))return Zt(l,p=>d(p,c));{let p=d(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return a.getInitialState=i,a}var xi=(e,t)=>yi(e)?e.match(t):e(t);function wi(...e){return t=>e.some(r=>xi(r,t))}var Ti="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Oi=(e=21)=>{let t="",r=e;for(;r--;)t+=Ti[Math.random()*64|0];return t},Ri=["name","message","stack","code"],er=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},zn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ii=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ri)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Gn="External signal was aborted",ki=(()=>{function e(t,r,n){let s=Q(t+"/fulfilled",(c,u,l,d)=>({payload:c,meta:{...d||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),i=Q(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),a=Q(t+"/rejected",(c,u,l,d,p)=>({payload:d,error:(n&&n.serializeError||Ii)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:u}={}){return(l,d,p)=>{let g=n?.idGenerator?n.idGenerator(c):Oi(),b=new AbortController,T,y;function O(m){y=m,b.abort()}u&&(u.aborted?O(Gn):u.addEventListener("abort",()=>O(Gn),{once:!0}));let N=(async function(){let m;try{let E=n?.condition?.(c,{getState:d,extra:p});if(Di(E)&&(E=await E),E===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((A,x)=>{T=()=>{x({name:"AbortError",message:y||"Aborted"})},b.signal.addEventListener("abort",T,{once:!0})});l(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:p}))),m=await Promise.race([V,Promise.resolve(r(c,{dispatch:l,getState:d,extra:p,requestId:g,signal:b.signal,abort:O,rejectWithValue:((A,x)=>new er(A,x)),fulfillWithValue:((A,x)=>new zn(A,x))})).then(A=>{if(A instanceof er)throw A;return A instanceof zn?s(A.payload,g,c,A.meta):s(A,g,c)})])}catch(E){m=E instanceof er?a(null,g,c,E.payload,E.meta):a(E,g,c)}finally{T&&b.signal.removeEventListener("abort",T)}return n&&!n.dispatchConditionRejection&&a.match(m)&&m.meta.condition||l(m),m})();return Object.assign(N,{abort:O,requestId:g,arg:c,unwrap(){return N.then(Mi)}})}}return Object.assign(o,{pending:i,rejected:a,fulfilled:s,settled:wi(a,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Mi(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Di(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Xn=Symbol.for("rtk-slice-createasyncthunk"),oo={[Xn]:ki};function Ni(e,t){return`${e}/${t}`}function Li({creators:e}={}){let t=e?.asyncThunk?.[Xn];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(z(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Fi()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,S){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(z(12));if(E in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[E]=S,u},addMatcher(m,S){return c.sliceMatchers.push({matcher:m,reducer:S}),u},exposeAction(m,S){return c.actionCreators[m]=S,u},exposeCaseReducer(m,S){return c.sliceCaseReducersByName[m]=S,u}};o.forEach(m=>{let S=a[m],E={reducerName:m,type:Ni(s,m),createNotation:typeof n.reducers=="function"};ji(S)?Vi(E,S,u,t):Ui(E,S,u)});function l(){let[m={},S=[],E=void 0]=typeof n.extraReducers=="function"?Yn(n.extraReducers):[n.extraReducers],V={...m,...c.sliceCaseReducersByType};return Ci(n.initialState,A=>{for(let x in V)A.addCase(x,V[x]);for(let x of c.sliceMatchers)A.addMatcher(x.matcher,x.reducer);for(let x of S)A.addMatcher(x.matcher,x.reducer);E&&A.addDefaultCase(E)})}let d=m=>m,p=new Map,g=new WeakMap,b;function T(m,S){return b||(b=l()),b(m,S)}function y(){return b||(b=l()),b.getInitialState()}function O(m,S=!1){function E(A){let x=A[m];return typeof x>"u"&&S&&(x=it(g,E,y)),x}function V(A=d){let x=it(p,S,()=>new WeakMap);return it(x,A,()=>{let Sr={};for(let[Fs,Us]of Object.entries(n.selectors??{}))Sr[Fs]=Pi(Us,A,()=>it(g,A,y),S);return Sr})}return{reducerPath:m,getSelectors:V,get selectors(){return V(E)},selectSlice:E}}let N={name:s,reducer:T,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...O(i),injectInto(m,{reducerPath:S,...E}={}){let V=S??i;return m.inject({reducerPath:V,reducer:T},E),{...N,...O(V,!0)}}};return N}}function Pi(e,t,r,n){function s(i,...a){let o=t(i);return typeof o>"u"&&n&&(o=r()),e(o,...a)}return s.unwrapped=e,s}var Jn=Li();function Fi(){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 Ui({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!Bi(n))throw new Error(z(17));i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Q(e,a):Q(e))}function ji(e){return e._reducerDefinitionType==="asyncThunk"}function Bi(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Vi({type:e,reducerName:t},r,n,s){if(!s)throw new Error(z(18));let{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=r,d=s(e,i,l);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),o&&n.addCase(d.pending,o),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:a||at,pending:o||at,rejected:c||at,settled:u||at})}function at(){}var Zn="listener",es="completed",ts="cancelled",co=`task-${ts}`,uo=`task-${es}`,lo=`${Zn}-${ts}`,po=`${Zn}-${es}`;var{assign:rs}=Object;var tr="listenerMiddleware";var qi=rs(Q(`${tr}/add`),{withTypes:()=>qi}),ho=Q(`${tr}/removeAll`),Hi=rs(Q(`${tr}/remove`),{withTypes:()=>Hi});function z(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 $i=Le(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),ot=class extends $i(Object){};window.ftReduxStores||(window.ftReduxStores={});var ns=class e extends ot{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Be(i))return i;if(s==null)return;let a=Jn({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Qn({reducer:(c,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let l=ve(a.getInitialState());for(let d of u.keeping)l[d]=(c??l)[d];return l}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...u.overwrites};return a.reducer(c,u)}});return window.ftReduxStores[s.name]=new e(a,o,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Pe,this.injectInto=(i,a)=>this.reduxSlice.injectInto(i,a),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let c=a,u=i[c];return u?(...l)=>{let d=u(...l.map(s));return this.reduxStore.dispatch(d),d}:l=>{let d=c,p=this.getState()[d];ce(p,l)||this.setState({[d]:s(l)})}}}),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 ct=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?c:s?`${o} ${c}`:o}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 ut=f(_()),Ki="ft-app-info",Y=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Y.eventName="authentication-change";var Re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Re.eventName="ui-locale-changed";var zi={session:(e,t)=>{(0,ut.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>h.dispatchEvent(new Y(t.payload)),0))}},h=ut.FtReduxStore.get({name:Ki,reducers:zi,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 ss=f(_()),lt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Ho=(0,ss.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(h)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>ct.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return lt([(0,rr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),lt([(0,rr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),lt([Pt({store:h.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),lt([Pt({store:h.name})],t.prototype,"uiLocale",void 0),t});var mt=f(_());var nr=f(_());var re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=h.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=h.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var he=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):re.await()}};var D=class extends he{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[c])=>o.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new nr.CacheRegistry,this.cache=t?s.commonCache:new nr.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 dt=class extends D{async listMySearches(){let{session:t}=h.getState();return Nt(t,C.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var pt=class extends D{async listMyBookmarks(){let t=h.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var ht=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var ft=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var Gi="ft-user-assets",Wi={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(F).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;ir(e,r,[...sr(e,r),s]),is(e,r,1,n),as(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ir(e,r,sr(e,r).map(s=>s.id===n.id?n:s)),as(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;ir(e,r,sr(e,r).filter(i=>i.id!==s)),is(e,r,-1,n)}},os={[F.SEARCHES]:"savedSearches",[F.BOOKMARKS]:"bookmarks",[F.BOOKS]:void 0,[F.COLLECTIONS]:void 0},sr=(e,t)=>{var r;let n=os[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ir=(e,t,r)=>{let n=os[t];n&&(e[n]=r)},is=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===F.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},as=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=mt.FtReduxStore.get({name:Gi,reducers:Wi,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(F).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ar=class{constructor(t=new ht,r=new ft){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=h.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pt,this.savedSearchesService=new dt,h.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=h.getState();(0,mt.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(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===F.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},Qi=new ar;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Qi);var or=class{addCommand(t,r=!1){h.commands.add(t,r)}consumeCommand(t){return h.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new or;var U=f(_());var cs,fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yi=Symbol("clearAfterUnitTest"),yt=class extends(0,U.withEventBus)(D){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[cs]=()=>{this.defaultMessages={},this.cache=new U.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,U.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),a=this.resolveContext(i);return new U.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof U.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fe({loadedContexts:t})),this.dispatchEvent(new fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new fe({loadedContexts:[t]})),this.dispatchEvent(new fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,U.delay)(0).then(()=>n()).catch(()=>null)))}};cs=Yi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var me=window.FluidTopicsI18nService,gt=window.FluidTopicsCustomI18nService;var us=f(_()),cr=class{highlightHtml(t,r,n){(0,us.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new cr;var ls=f(_());var ur=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=h.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,a;if(t==null)return"";try{return ls.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:h.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new ur;var ds=f(_());var Ie=class{static get(t,r){var n,s,i,a;let o=h.getState(),{lang:c,region:u}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ds.SearchPlaceConverter(o.baseUrl,t??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${c}-${u}`)}};var lr=class{urlToSearchRequest(t){return Ie.get().parse(t)}searchRequestToUrl(t){return Ie.get().serialize(t)}};window.FluidTopicsUrlService=new lr;var G=f(_());var ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};ne.eventName="before-location-change";var se=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};se.eventName="change";var dr=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))}},ps=new dr;var St=class e extends G.WithEventBus{static build(){return new e(window.history,ps,()=>window.location,!1)}constructor(t,r,n,s){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,G.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new se(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,a,o])=>{let c=new ne(new URL(typeof o=="string"?o:(o??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:c.detail.nextLocation.href};n.apply(s,[l,a,l.href]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(ne.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(ne.eventName,t)}addHistoryChangeListener(t){this.addEventListener(se.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(se.eventName,t)}currentItem(){return(0,G.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,G.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,G.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,G.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=St.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 hs=f(J());var fs=hs.css`
|
|
2
|
-
`;var
|
|
1
|
+
"use strict";(()=>{var Bs=Object.create;var Er=Object.defineProperty;var Vs=Object.getOwnPropertyDescriptor;var qs=Object.getOwnPropertyNames;var Hs=Object.getPrototypeOf,$s=Object.prototype.hasOwnProperty;var Ne=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Ks=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of qs(t))!$s.call(e,s)&&s!==r&&Er(e,s,{get:()=>t[s],enumerable:!(n=Vs(t,s))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?Bs(Hs(e)):{},Ks(t||!e||!e.__esModule?Er(r,"default",{value:e,enumerable:!0}):r,e));var _=Ne((oa,vr)=>{vr.exports=ftGlobals.wcUtils});var J=Ne((ca,Ar)=>{Ar.exports=ftGlobals.lit});var q=Ne((ua,br)=>{br.exports=ftGlobals.litDecorators});var ks=Ne((Gl,Is)=>{Is.exports=ftGlobals.litRepeat});var Fs=f(_());var It=f(J());var ye=f(_()),mr=f(q());var kt;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(kt||(kt={}));var X=f(_());var zs=f(_());var _r;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(_r||(_r={}));var Cr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Cr||(Cr={}));var xr;(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"})(xr||(xr={}));var wr;(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"})(wr||(wr={}));var Tr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Tr||(Tr={}));var Or;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Or||(Or={}));var Rr;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Rr||(Rr={}));var Ir;(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"})(Ir||(Ir={}));var kr;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(kr||(kr={}));var Mr;(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"})(Mr||(Mr={}));var Dr;(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"})(Dr||(Dr={}));var Nr;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Nr||(Nr={}));var Lr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Lr||(Lr={}));var Pr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Pr||(Pr={}));var Fr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Fr||(Fr={}));var Ur;(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"})(Ur||(Ur={}));var Mt;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Mt||(Mt={}));var jr;(function(e){e.ASC="ASC",e.DESC="DESC"})(jr||(jr={}));var Br;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Br||(Br={}));var Dt;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Dt||(Dt={}));var Vr;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Vr||(Vr={}));var qr;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(qr||(qr={}));var Hr;(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"})(Hr||(Hr={}));var $r;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})($r||($r={}));var Kr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Kr||(Kr={}));var Nt;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Nt||(Nt={}));var zr;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(zr||(zr={}));var C;(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"})(C||(C={}));var F;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(F||(F={}));var Gr;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Gr||(Gr={}));var Wr;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Wr||(Wr={}));var Qr;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Qr||(Qr={}));var Yr;(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"})(Yr||(Yr={}));var Xr;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Xr||(Xr={}));var Jr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Jr||(Jr={}));var Zr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zr||(Zr={}));var en;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(en||(en={}));var tn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(tn||(tn={}));var rn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(rn||(rn={}));var nn;(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"})(nn||(nn={}));var sn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sn||(sn={}));var Gs={[C.PERSONAL_BOOK_SHARE_USER]:[C.PERSONAL_BOOK_USER],[C.HTML_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.PDF_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.KHUB_ADMIN]:[C.CONTENT_PUBLISHER],[C.ADMIN]:[C.KHUB_ADMIN,C.USERS_ADMIN,C.PORTAL_ADMIN,C.BEHAVIOR_DATA_USER],[C.GENERATIVE_AI_EXPORT_USER]:[C.GENERATIVE_AI_USER]};function an(e,t){return e===t||(Gs[e]??[]).some(r=>an(r,t))}function Le(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=>an(n,t))}function on(e,...t){return e==null?!1:t.some(r=>Le(e,r))}var rr=f(q());var cn=f(q(),1);var Lt=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function un(e,t){return(0,cn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return ve(e);try{return JSON.parse(r)}catch{return ve(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ae,...t??{}})}function Ws(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(!ce(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(!ce(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!ce(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ce(e,t){try{return Ws(e,t)}catch{return!1}}function Ae(e,t){return!ce(e,t)}function ve(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Pe(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var ln=f(q(),1);var Pt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Ae,attribute:!1,...t};(0,ln.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(o=>o[n]),store:t.store})}};var Fe=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 Z=f(q(),1);var Ue=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);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 pn=f(J(),1);var je=globalThis,Qs=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var dn=(e,t)=>{if(Qs)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=je.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var Be=class extends pn.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 dn(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){Lt(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 hn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var le=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},gn,fn=Symbol("constructorPrototype"),mn=Symbol("constructorName"),Sn=Symbol("exportpartsDebouncer"),yn=Symbol("dynamicDependenciesLoaded"),ue=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ue.eventName="exportparts-updated";var H=class extends Be{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[gn]=new Ue(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[Sn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[mn]=this.constructor.name,this[fn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[mn]&&Object.setPrototypeOf(this,this[fn])}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[yn]||(r[yn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ue.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ue.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 ue)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=hn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,a,o;let c=p=>p!=null&&p.trim().length>0,u=t.filter(c).map(p=>p.trim());if(u.length===0){this.exportparts=void 0;return}let l=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],b=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[],T=[...g,...b].filter(c).map(y=>y.trim());for(let y of T)l.add(y)}if(l.size===0){this.exportparts=void 0;return}let d=[...l.values()].flatMap(p=>u.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};gn=Sn;le([(0,Z.property)()],H.prototype,"exportpartsPrefix",void 0);le([un([])],H.prototype,"exportpartsPrefixes",void 0);le([(0,Z.property)({reflect:!0})],H.prototype,"exportparts",void 0);le([(0,Z.property)()],H.prototype,"customStylesheet",void 0);le([(0,Z.property)()],H.prototype,"elementToFocus",void 0);le([(0,Z.state)()],H.prototype,"useAdoptedStyleSheets",void 0);function Ve(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var be=Symbol("internalReduxEventsUnsubscribers"),W=Symbol("internalStoresUnsubscribers"),ee=Symbol("internalStores"),Ys=Pe(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ee].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ee].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[ee].get(a)}addStore(a,o){var c;o=(c=o??a.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[ee].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[ee].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ee].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[W].has(a.store):this[W].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var c;this[W].set(a,o.subscribe(()=>this.updateFromStores())),this[be].set(a,[]),Ve(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,l)=>{if(typeof this[l]=="function"&&(!u.store||o.name===u.store)){let d=p=>this[l](p);o.addEventListener(u.eventName,d),this[be].get(a).push(()=>o.removeEventListener(u.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[W].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[W].has(a)&&this[W].get(a)(),this[W].delete(a),(o=this[be].get(a))===null||o===void 0||o.forEach(c=>c()),this[be].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=W,r=ee,n=be,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),En=class extends Ys(H){};function R(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 Xs=typeof Symbol=="function"&&Symbol.observable||"@@observable",vn=Xs,Ft=()=>Math.random().toString(36).substring(7).split("").join("."),Js={INIT:`@@redux/INIT${Ft()}`,REPLACE:`@@redux/REPLACE${Ft()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ft()}`},qe=Js;function He(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 Ut(e,t,r){if(typeof e!="function")throw new Error(R(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r(Ut)(e,t)}let n=e,s=t,i=new Map,a=i,o=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,O)=>{a.set(O,y)}))}function l(){if(c)throw new Error(R(3));return s}function d(y){if(typeof y!="function")throw new Error(R(4));if(c)throw new Error(R(5));let O=!0;u();let N=o++;return a.set(N,y),function(){if(O){if(c)throw new Error(R(6));O=!1,u(),a.delete(N),i=null}}}function p(y){if(!He(y))throw new Error(R(7));if(typeof y.type>"u")throw new Error(R(8));if(typeof y.type!="string")throw new Error(R(17));if(c)throw new Error(R(9));try{c=!0,s=n(s,y)}finally{c=!1}return(i=a).forEach(N=>{N()}),y}function g(y){if(typeof y!="function")throw new Error(R(10));n=y,p({type:qe.REPLACE})}function b(){let y=d;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(R(11));function N(){let S=O;S.next&&S.next(l())}return N(),{unsubscribe:y(N)}},[vn](){return this}}}return p({type:qe.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:g,[vn]:b}}function Zs(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:qe.INIT})>"u")throw new Error(R(12));if(typeof r(void 0,{type:qe.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function An(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),s,i;try{Zs(r)}catch(a){i=a}return function(o={},c){if(i)throw i;let u=!1,l={};for(let d=0;d<n.length;d++){let p=n[d],g=r[p],b=o[p],T=g(b,c);if(typeof T>"u"){let y=c&&c.type;throw new Error(R(14))}l[p]=T,u=u||T!==b}return u=u||n.length!==Object.keys(o).length,u?l:o}}function _e(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(R(15))},a={getState:s.getState,dispatch:(c,...u)=>i(c,...u)},o=e.map(c=>c(a));return i=_e(...o)(s.dispatch),{...s,dispatch:i}}}function _n(e){return He(e)&&"type"in e&&typeof e.type=="string"}var Mn=Symbol.for("immer-nothing"),Cn=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function B(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var L=Object,pe=L.getPrototypeOf,Ge="constructor",Ze="prototype",qt="configurable",We="enumerable",Ke="writable",Ce="value",$=e=>!!e&&!!e[I];function P(e){return e?Dn(e)||tt(e)||!!e[Cn]||!!e[Ge]?.[Cn]||rt(e)||nt(e):!1}var ei=L[Ze][Ge].toString(),xn=new WeakMap;function Dn(e){if(!e||!Yt(e))return!1;let t=pe(e);if(t===null||t===L[Ze])return!0;let r=L.hasOwnProperty.call(t,Ge)&&t[Ge];if(r===Object)return!0;if(!de(r))return!1;let n=xn.get(r);return n===void 0&&(n=Function.toString.call(r),xn.set(r,n)),n===ei}function et(e,t,r=!0){Te(e)===0?(r?Reflect.ownKeys(e):L.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Te(e){let t=e[I];return t?t.type_:tt(e)?1:rt(e)?2:nt(e)?3:0}var jt=(e,t,r=Te(e))=>r===2?e.has(t):L[Ze].hasOwnProperty.call(e,t),Ht=(e,t,r=Te(e))=>r===2?e.get(t):e[t],Qe=(e,t,r,n=Te(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ti(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var tt=Array.isArray,rt=e=>e instanceof Map,nt=e=>e instanceof Set,Yt=e=>typeof e=="object",de=e=>typeof e=="function",Bt=e=>typeof e=="boolean";function ri(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_;var Xt=e=>e.modified_?e.copy_:e.base_;function $t(e,t){if(rt(e))return new Map(e);if(nt(e))return new Set(e);if(tt(e))return Array[Ze].slice.call(e);let r=Dn(e);if(t===!0||t==="class_only"&&!r){let n=L.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let a=s[i],o=n[a];o[Ke]===!1&&(o[Ke]=!0,o[qt]=!0),(o.get||o.set)&&(n[a]={[qt]:!0,[Ke]:!0,[We]:o[We],[Ce]:e[a]})}return L.create(pe(e),n)}else{let n=pe(e);if(n!==null&&r)return{...e};let s=L.create(n);return L.assign(s,e)}}function Jt(e,t=!1){return st(e)||$(e)||!P(e)||(Te(e)>1&&L.defineProperties(e,{set:$e,add:$e,clear:$e,delete:$e}),L.freeze(e),t&&et(e,(r,n)=>{Jt(n,!0)},!1)),e}function ni(){B(2)}var $e={[Ce]:ni};function st(e){return e===null||!Yt(e)?!0:L.isFrozen(e)}var Ye="MapSet",Kt="Patches",wn="ArrayMethods",Nn={};function te(e){let t=Nn[e];return t||B(0,e),t}var Tn=e=>!!Nn[e];var xe,Ln=()=>xe,si=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tn(Ye)?te(Ye):void 0,arrayMethodsPlugin_:Tn(wn)?te(wn):void 0});function On(e,t){t&&(e.patchPlugin_=te(Kt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zt(e){Gt(e),e.drafts_.forEach(ii),e.drafts_=null}function Gt(e){e===xe&&(xe=e.parent_)}var Rn=e=>xe=si(xe,e);function ii(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function In(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(zt(t),B(4)),P(e)&&(e=kn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=kn(t,r);return ai(t,e,!0),zt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Mn?e:void 0}function kn(e,t){if(st(t))return t;let r=t[I];if(!r)return Xe(t,e.handledSet_,e);if(!it(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);Un(r,e)}return r.copy_}function ai(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Jt(t,r)}function Pn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var it=(e,t)=>e.scope_===t,oi=[];function Fn(e,t,r,n){let s=K(e),i=e.type_;if(n!==void 0&&Ht(s,n,i)===t){Qe(s,n,r,i);return}if(!e.draftLocations_){let o=e.draftLocations_=new Map;et(s,(c,u)=>{if($(u)){let l=o.get(u)||[];l.push(c),o.set(u,l)}})}let a=e.draftLocations_.get(t)??oi;for(let o of a)Qe(s,o,r,i)}function ci(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!it(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let a=Xt(i);Fn(e,i.draft_??i,a,r),Un(i,s)})}function Un(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Pn(e)}}function ui(e,t,r){let{scope_:n}=e;if($(r)){let s=r[I];it(s,n)&&s.callbacks_.push(function(){ze(e);let a=Xt(s);Fn(e,r,a,t)})}else P(r)&&e.callbacks_.push(function(){let i=K(e);e.type_===3?i.has(r)&&Xe(r,n.handledSet_,n):Ht(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Xe(Ht(e.copy_,t,e.type_),n.handledSet_,n)})}function Xe(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||$(e)||t.has(e)||!P(e)||st(e)||(t.add(e),et(e,(n,s)=>{if($(s)){let i=s[I];if(it(i,r)){let a=Xt(i);Qe(e,n,a,e.type_),Pn(i)}}else P(s)&&Xe(s,t,r)})),e}function li(e,t){let r=tt(e),n={type_:r?1:0,scope_:t?t.scope_:Ln(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Je;r&&(s=[n],i=we);let{revoke:a,proxy:o}=Proxy.revocable(s,i);return n.draft_=o,n.revoke_=a,[o,n]}var Je={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=K(e);if(!jt(s,t,e.type_))return pi(e,s,t);let i=s[t];if(e.finalized_||!P(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ri(t))return i;if(i===Vt(e.base_,t)||di(e,t,i)){ze(e);let a=e.type_===1?+t:t,o=Qt(e.scope_,i,e,a);return e.copy_[a]=o}return i},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){let n=jn(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Vt(K(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ti(r,s)&&(r!==void 0||jt(e.base_,t,e.type_)))return!0;ze(e),Wt(e)}return e.copy_[t]===r&&(r!==void 0||jt(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ui(e,t,r)),!0},deleteProperty(e,t){return ze(e),Vt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ke]:!0,[qt]:e.type_!==1||t!=="length",[We]:n[We],[Ce]:r[t]}},defineProperty(){B(11)},getPrototypeOf(e){return pe(e.base_)},setPrototypeOf(){B(12)}},we={};for(let e in Je){let t=Je[e];we[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}we.deleteProperty=function(e,t){return we.set.call(this,e,t,void 0)};we.set=function(e,t,r){return Je.set.call(this,e[0],t,r,e[0])};function Vt(e,t){let r=e[I];return(r?K(r):e)[t]}function di(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!P(r)||r[I]?!1:e.baseRefs_.has(r)}function pi(e,t,r){let n=jn(t,r);return n?Ce in n?n[Ce]:n.get?.call(e.draft_):void 0}function jn(e,t){if(!(t in e))return;let r=pe(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=pe(r)}}function Wt(e){e.modified_||(e.modified_=!0,e.parent_&&Wt(e.parent_))}function ze(e){e.copy_||(e.assigned_=new Map,e.copy_=$t(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hi=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(de(t)&&!de(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,l=>r.call(this,l,...u))}}de(r)||B(6),n!==void 0&&!de(n)&&B(7);let s;if(P(t)){let i=Rn(this),a=Qt(i,t,void 0),o=!0;try{s=r(a),o=!1}finally{o?zt(i):Gt(i)}return On(i,n),In(s,i)}else if(!t||!Yt(t)){if(s=r(t),s===void 0&&(s=t),s===Mn&&(s=void 0),this.autoFreeze_&&Jt(s,!0),n){let i=[],a=[];te(Kt).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:a}),n(i,a)}return s}else B(1,t)},this.produceWithPatches=(t,r)=>{if(de(t))return(a,...o)=>this.produceWithPatches(a,c=>t(c,...o));let n,s;return[this.produce(t,r,(a,o)=>{n=a,s=o}),n,s]},Bt(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Bt(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Bt(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){P(e)||B(8),$(e)&&(e=Bn(e));let t=Rn(this),r=Qt(t,e,void 0);return r[I].isManual_=!0,Gt(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&B(9);let{scope_:n}=r;return On(n,t),In(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=te(Kt).applyPatches_;return $(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Qt(e,t,r,n){let[s,i]=rt(t)?te(Ye).proxyMap_(t,r):nt(t)?te(Ye).proxySet_(t,r):li(t,r);return(r?.scope_??Ln()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?ci(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),s}function Bn(e){return $(e)||B(10,e),Vn(e)}function Vn(e){if(!P(e)||st(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=$t(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=$t(e,!0);return et(r,(s,i)=>{Qe(r,s,Vn(i))},n),t&&(t.finalized_=!1),r}var fi=globalThis.Iterator,Za=typeof fi?.from=="function";var mi=new hi,Zt=mi.produce;function qn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var Hn=qn(),$n=qn;var yi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_e:_e.apply(null,arguments)},ao=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},gi=e=>e&&typeof e.match=="function";function Q(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(z(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>_n(n)&&n.type===e,r}var Qn=class Oe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oe.prototype)}static get[Symbol.species](){return Oe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oe(...t[0].concat(this)):new Oe(...t.concat(this))}};function Kn(e){return P(e)?Zt(e,()=>{}):e}function at(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Si(e){return typeof e=="boolean"}var Ei=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},a=new Qn;return r&&(Si(r)?a.push(Hn):a.push($n(r.extraArgument))),a},vi="RTK_autoBatch";var zn=e=>t=>{setTimeout(t,e)},Ai=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(s),a=setTimeout(s,t)},bi=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,a=!1,o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ai(window.requestAnimationFrame,100):zn(10):e.type==="callback"?e.queueNotification:zn(e.timeout),u=()=>{a=!1,i&&(i=!1,o.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let d=()=>s&&l(),p=n.subscribe(d);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return s=!l?.meta?.[vi],i=!s,i&&(a||(a=!0,c(u))),n.dispatch(l)}finally{s=!0}}})},_i=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Qn(e);return n&&s.push(bi(typeof n=="object"?n:void 0)),s};function Yn(e){let t=Ei(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{},c;if(typeof r=="function")c=r;else if(He(r))c=An(r);else throw new Error(z(1));let u;typeof n=="function"?u=n(t):u=t();let l=_e;s&&(l=yi({trace:!1,...typeof s=="object"&&s}));let d=bn(...u),p=_i(d),g=typeof o=="function"?o(p):p(),b=l(...g);return Ut(c,a,b)}function Xn(e){let t={},r=[],n,s={addCase(i,a){let o=typeof i=="string"?i:i.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=a,s},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Ci(e){return typeof e=="function"}function xi(e,t){let[r,n,s]=Xn(t),i;if(Ci(e))i=()=>Kn(e());else{let o=Kn(e);i=()=>o}function a(o=i(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[s]),u.reduce((l,d)=>{if(d)if($(l)){let g=d(l,c);return g===void 0?l:g}else{if(P(l))return Zt(l,p=>d(p,c));{let p=d(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return a.getInitialState=i,a}var wi=(e,t)=>gi(e)?e.match(t):e(t);function Ti(...e){return t=>e.some(r=>wi(r,t))}var Oi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ri=(e=21)=>{let t="",r=e;for(;r--;)t+=Oi[Math.random()*64|0];return t},Ii=["name","message","stack","code"],er=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Gn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ki=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ii)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Wn="External signal was aborted",Mi=(()=>{function e(t,r,n){let s=Q(t+"/fulfilled",(c,u,l,d)=>({payload:c,meta:{...d||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),i=Q(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),a=Q(t+"/rejected",(c,u,l,d,p)=>({payload:d,error:(n&&n.serializeError||ki)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:u}={}){return(l,d,p)=>{let g=n?.idGenerator?n.idGenerator(c):Ri(),b=new AbortController,T,y;function O(m){y=m,b.abort()}u&&(u.aborted?O(Wn):u.addEventListener("abort",()=>O(Wn),{once:!0}));let N=(async function(){let m;try{let E=n?.condition?.(c,{getState:d,extra:p});if(Ni(E)&&(E=await E),E===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((A,x)=>{T=()=>{x({name:"AbortError",message:y||"Aborted"})},b.signal.addEventListener("abort",T,{once:!0})});l(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:p}))),m=await Promise.race([V,Promise.resolve(r(c,{dispatch:l,getState:d,extra:p,requestId:g,signal:b.signal,abort:O,rejectWithValue:((A,x)=>new er(A,x)),fulfillWithValue:((A,x)=>new Gn(A,x))})).then(A=>{if(A instanceof er)throw A;return A instanceof Gn?s(A.payload,g,c,A.meta):s(A,g,c)})])}catch(E){m=E instanceof er?a(null,g,c,E.payload,E.meta):a(E,g,c)}finally{T&&b.signal.removeEventListener("abort",T)}return n&&!n.dispatchConditionRejection&&a.match(m)&&m.meta.condition||l(m),m})();return Object.assign(N,{abort:O,requestId:g,arg:c,unwrap(){return N.then(Di)}})}}return Object.assign(o,{pending:i,rejected:a,fulfilled:s,settled:Ti(a,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Di(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ni(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Jn=Symbol.for("rtk-slice-createasyncthunk"),co={[Jn]:Mi};function Li(e,t){return`${e}/${t}`}function Pi({creators:e}={}){let t=e?.asyncThunk?.[Jn];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(z(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Ui()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,S){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(z(12));if(E in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[E]=S,u},addMatcher(m,S){return c.sliceMatchers.push({matcher:m,reducer:S}),u},exposeAction(m,S){return c.actionCreators[m]=S,u},exposeCaseReducer(m,S){return c.sliceCaseReducersByName[m]=S,u}};o.forEach(m=>{let S=a[m],E={reducerName:m,type:Li(s,m),createNotation:typeof n.reducers=="function"};Bi(S)?qi(E,S,u,t):ji(E,S,u)});function l(){let[m={},S=[],E=void 0]=typeof n.extraReducers=="function"?Xn(n.extraReducers):[n.extraReducers],V={...m,...c.sliceCaseReducersByType};return xi(n.initialState,A=>{for(let x in V)A.addCase(x,V[x]);for(let x of c.sliceMatchers)A.addMatcher(x.matcher,x.reducer);for(let x of S)A.addMatcher(x.matcher,x.reducer);E&&A.addDefaultCase(E)})}let d=m=>m,p=new Map,g=new WeakMap,b;function T(m,S){return b||(b=l()),b(m,S)}function y(){return b||(b=l()),b.getInitialState()}function O(m,S=!1){function E(A){let x=A[m];return typeof x>"u"&&S&&(x=at(g,E,y)),x}function V(A=d){let x=at(p,S,()=>new WeakMap);return at(x,A,()=>{let Sr={};for(let[Us,js]of Object.entries(n.selectors??{}))Sr[Us]=Fi(js,A,()=>at(g,A,y),S);return Sr})}return{reducerPath:m,getSelectors:V,get selectors(){return V(E)},selectSlice:E}}let N={name:s,reducer:T,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...O(i),injectInto(m,{reducerPath:S,...E}={}){let V=S??i;return m.inject({reducerPath:V,reducer:T},E),{...N,...O(V,!0)}}};return N}}function Fi(e,t,r,n){function s(i,...a){let o=t(i);return typeof o>"u"&&n&&(o=r()),e(o,...a)}return s.unwrapped=e,s}var Zn=Pi();function Ui(){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 ji({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!Vi(n))throw new Error(z(17));i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Q(e,a):Q(e))}function Bi(e){return e._reducerDefinitionType==="asyncThunk"}function Vi(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qi({type:e,reducerName:t},r,n,s){if(!s)throw new Error(z(18));let{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=r,d=s(e,i,l);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),o&&n.addCase(d.pending,o),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:a||ot,pending:o||ot,rejected:c||ot,settled:u||ot})}function ot(){}var es="listener",ts="completed",rs="cancelled",uo=`task-${rs}`,lo=`task-${ts}`,po=`${es}-${rs}`,ho=`${es}-${ts}`;var{assign:ns}=Object;var tr="listenerMiddleware";var Hi=ns(Q(`${tr}/add`),{withTypes:()=>Hi}),fo=Q(`${tr}/removeAll`),$i=ns(Q(`${tr}/remove`),{withTypes:()=>$i});function z(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 Ki=Pe(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),ct=class extends Ki(Object){};window.ftReduxStores||(window.ftReduxStores={});var ss=class e extends ct{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Ve(i))return i;if(s==null)return;let a=Zn({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Yn({reducer:(c,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let l=ve(a.getInitialState());for(let d of u.keeping)l[d]=(c??l)[d];return l}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...u.overwrites};return a.reducer(c,u)}});return window.ftReduxStores[s.name]=new e(a,o,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Fe,this.injectInto=(i,a)=>this.reduxSlice.injectInto(i,a),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let c=a,u=i[c];return u?(...l)=>{let d=u(...l.map(s));return this.reduxStore.dispatch(d),d}:l=>{let d=c,p=this.getState()[d];ce(p,l)||this.setState({[d]:s(l)})}}}),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 ut=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?c:s?`${o} ${c}`:o}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 lt=f(_()),zi="ft-app-info",Y=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Y.eventName="authentication-change";var Re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Re.eventName="ui-locale-changed";var Gi={session:(e,t)=>{(0,lt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>h.dispatchEvent(new Y(t.payload)),0))}},h=lt.FtReduxStore.get({name:zi,reducers:Gi,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 is=f(_()),dt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},$o=(0,is.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(h)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>ut.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return dt([(0,rr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),dt([(0,rr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),dt([Pt({store:h.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),dt([Pt({store:h.name})],t.prototype,"uiLocale",void 0),t});var yt=f(_());var nr=f(_());var re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=h.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=h.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var he=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):re.await()}};var D=class extends he{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[c])=>o.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new nr.CacheRegistry,this.cache=t?s.commonCache:new nr.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 pt=class extends D{async listMySearches(){let{session:t}=h.getState();return Le(t,C.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var ht=class extends D{async listMyBookmarks(){let t=h.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var ft=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var mt=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var Wi="ft-user-assets",Qi={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(F).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;ir(e,r,[...sr(e,r),s]),as(e,r,1,n),os(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ir(e,r,sr(e,r).map(s=>s.id===n.id?n:s)),os(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;ir(e,r,sr(e,r).filter(i=>i.id!==s)),as(e,r,-1,n)}},cs={[F.SEARCHES]:"savedSearches",[F.BOOKMARKS]:"bookmarks",[F.BOOKS]:void 0,[F.COLLECTIONS]:void 0},sr=(e,t)=>{var r;let n=cs[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ir=(e,t,r)=>{let n=cs[t];n&&(e[n]=r)},as=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===F.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},os=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=yt.FtReduxStore.get({name:Wi,reducers:Qi,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(F).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ar=class{constructor(t=new ft,r=new mt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=h.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ht,this.savedSearchesService=new pt,h.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=h.getState();(0,yt.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(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===F.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},Yi=new ar;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Yi);var or=class{addCommand(t,r=!1){h.commands.add(t,r)}consumeCommand(t){return h.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new or;var U=f(_());var us,fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Xi=Symbol("clearAfterUnitTest"),gt=class extends(0,U.withEventBus)(D){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[us]=()=>{this.defaultMessages={},this.cache=new U.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,U.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),a=this.resolveContext(i);return new U.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof U.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fe({loadedContexts:t})),this.dispatchEvent(new fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new fe({loadedContexts:[t]})),this.dispatchEvent(new fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,U.delay)(0).then(()=>n()).catch(()=>null)))}};us=Xi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends gt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends gt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var me=window.FluidTopicsI18nService,St=window.FluidTopicsCustomI18nService;var ls=f(_()),cr=class{highlightHtml(t,r,n){(0,ls.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new cr;var ds=f(_());var ur=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=h.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,a;if(t==null)return"";try{return ds.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:h.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new ur;var ps=f(_());var Ie=class{static get(t,r){var n,s,i,a;let o=h.getState(),{lang:c,region:u}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ps.SearchPlaceConverter(o.baseUrl,t??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${c}-${u}`)}};var lr=class{urlToSearchRequest(t){return Ie.get().parse(t)}searchRequestToUrl(t){return Ie.get().serialize(t)}};window.FluidTopicsUrlService=new lr;var G=f(_());var ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};ne.eventName="before-location-change";var se=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};se.eventName="change";var dr=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))}},hs=new dr;var Et=class e extends G.WithEventBus{static build(){return new e(window.history,hs,()=>window.location,!1)}constructor(t,r,n,s){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,G.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new se(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,a,o])=>{let c=new ne(new URL(typeof o=="string"?o:(o??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:c.detail.nextLocation.href};n.apply(s,[l,a,l.href]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(ne.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(ne.eventName,t)}addHistoryChangeListener(t){this.addEventListener(se.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(se.eventName,t)}currentItem(){return(0,G.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,G.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,G.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,G.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Et.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 fs=f(J());var ms=fs.css`
|
|
2
|
+
`;var gs=f(J()),M=f(q()),oe=f(_());var ie=f(_());function ys(e,t){let{authenticationRequired:r,session:n}=h.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var vt=class extends he{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var pr=class e extends ie.FtStateManager{static build(t){return new e(h,t)}constructor(t,r){super(),this.store=t,this.cache=new ie.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vt,this.cleanSessionDebouncer=new ie.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new ie.Debouncer(500),this.apiProvider=r??(()=>re.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Y.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Y.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",()=>ys(()=>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 Re(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 on(h.getState().session,...t)}},hr=pr.build();var ae=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var ke=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let a=s.deref(),o=i.deref();a===void 0||o===void 0||a.dispatchEvent(new ae(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var w=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},v=class extends oe.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=hr,this.contextRoot=new ke}render(){return gs.html`
|
|
3
3
|
<slot></slot>
|
|
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=>me.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())}};v.elementDefinitions={};v.styles=
|
|
5
|
-
`;var
|
|
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=>me.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())}};v.elementDefinitions={};v.styles=ms;w([(0,M.property)()],v.prototype,"baseUrl",void 0);w([(0,M.property)()],v.prototype,"tenantId",void 0);w([(0,M.property)()],v.prototype,"apiIntegrationIdentifier",void 0);w([(0,M.property)()],v.prototype,"apiIntegrationAppVersion",void 0);w([(0,M.property)()],v.prototype,"uiLocale",void 0);w([(0,oe.jsonProperty)(null)],v.prototype,"availableUiLocales",void 0);w([(0,oe.jsonProperty)(null)],v.prototype,"metadataConfiguration",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"editorMode",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"noCustom",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"openExternalDocumentInNewTab",void 0);w([(0,M.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomComponent",void 0);w([(0,M.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomCode",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"withManualResources",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"navigatorOnline",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"forcedOffline",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"authenticationRequired",void 0);w([(0,oe.jsonProperty)([])],v.prototype,"messageContexts",void 0);w([(0,oe.jsonProperty)(void 0)],v.prototype,"session",void 0);var Es=f(_());var Ss={"ft-app-context":v};(0,Es.customElements)(Ss);var At=class e extends Event{constructor(){super(e.eventName)}};At.eventName="search-context-clear-all-filters";var vs=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},yr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},As=Symbol("registerInterval"),fr=Symbol("registerAttempts"),ea=40,ta=(0,ye.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,a;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(a=this.stateManager)===null||a===void 0||a.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[fr]=0,this.tryToRegisterToContext(),this[As]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[fr]>ea?window.clearInterval(this[As]):(this[fr]++,this.dispatchEvent(new yr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return vs([(0,mr.state)()],t.prototype,"stateManager",void 0),vs([(0,mr.state)({hasChanged:ye.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),bt=class extends ta(ye.FtLitElementRedux){};var _t=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?St:me}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return a=>({context:this.name,key:i,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var ge=f(_());var Cs=f(q());var gr=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-]+$/)}},bs=new gr;var ra=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},na=Symbol("i18nAttributes"),sa=Symbol("i18nListAttributes"),xs=Symbol("i18nProperties"),Ct=Symbol("i18nContexts"),Me=Symbol("i18nUnsubs"),wt=(0,ge.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?St:me}i18n(i){let{context:a,key:o,message:c}=i,{custom:u,args:l,argsProvider:d}=i;if(a&&o){this.hasI18nContext(a)||this.addI18nContext(a,void 0,u);let p=l??(d?d(this):[]);return this.getI18nService(u).resolveMessage(a,o,...p)}return c}async awaitI18n(i){let{context:a,custom:o}=i;return a&&await this.getI18nService(o).prepareContext(a),this.i18n(i)}customI18n(i,a){if(bs.isI18nKey(i)){let[o,c]=i.split(".");return this.i18n({custom:!0,context:o,key:c,...a})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((a,o,c)=>i.has(o)||typeof a.argsProvider=="function"),this.updateI18nProperties(a=>typeof a.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((a,o,c)=>{var u;return((u=c?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(a=>a.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var a,o;let c=this,u=(l,d,p)=>p?.context&&p.key&&i(l,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...l})}:p;(a=this[na])===null||a===void 0||a.forEach((l,d)=>c[d]=u(l,d,c[d])),(o=this[sa])===null||o===void 0||o.forEach((l,d)=>{var p;return c[d]=(p=c[d])===null||p===void 0?void 0:p.map(g=>u(l,d,g))})}updateI18nProperties(i){var a;(a=this[xs])===null||a===void 0||a.forEach((o,c)=>{i(o,c)&&(this[c]=this.i18n(o))})}addI18nMessages(i,a,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,a,o)}addI18nContext(i,a,o){let c=(typeof i=="string"?i:i.name).toLowerCase();o=typeof i=="string"?o:i.custom,this[Ct].set(c,{isCustomContext:o}),this[Me].has(c)||this[Me].set(c,this.getI18nService(o).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(o).prepareContext(c,a)}hasI18nContext(i){return this[Ct].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ct].forEach((i,a)=>this.addI18nContext(a,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Me].forEach(i=>i()),this[Me].clear()}}return t=Ct,r=Me,ra([(0,Cs.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),_s=class extends wt(ge.FtLitElement){},xt=class extends wt(ge.FtLitElementRedux){};var ws=f(J());var Ts=ws.css`
|
|
5
|
+
`;var Tt=f(J()),Ee=f(q()),Ot=f(_());var Se=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},j=class extends xt{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(h)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:Tt.nothing:Tt.html`
|
|
6
6
|
<span class="ft-i18n">
|
|
7
7
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
8
8
|
</span>
|
|
9
|
-
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};j.elementDefinitions={};j.styles=
|
|
10
|
-
${this.hasPresets?
|
|
9
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};j.elementDefinitions={};j.styles=Ts;Se([(0,Ot.redux)()],j.prototype,"editorMode",void 0);Se([(0,Ee.property)()],j.prototype,"context",void 0);Se([(0,Ee.property)()],j.prototype,"key",void 0);Se([(0,Ot.jsonProperty)([])],j.prototype,"args",void 0);Se([(0,Ee.property)()],j.prototype,"defaultMessage",void 0);Se([(0,Ee.state)()],j.prototype,"editorMessage",void 0);var Rs=f(_());var Os={"ft-i18n":j};(0,Rs.customElements)(Os);var Ds=f(ks()),Ns=f(q());var Ls=f(_());var Rt=_t.build("designedSearchQuickFilters"),Ms={presetsSelector:"Quick filters",noQuickFilter:"No quick filter selected"};var ia=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},De=class extends wt(bt){constructor(){super(),this.builtPresets=[],this.addI18nContext(Rt,Ms),this.addStore(h)}get hasPresets(){return this.builtPresets!=null&&this.builtPresets.length>0}applySelectedPreset(){var t;if(this.selectedPreset&&this.stateManager){let r=((t=this.builtPresets)!==null&&t!==void 0?t:[]).find(n=>n.id===this.selectedPreset);if(r){this.stateManager.clearAllFilters();for(let n of r.filters)this.stateManager.setValueFilter(n.key,n.values)}}}willUpdate(t){super.update(t),t.has("selectedPreset")&&(0,Ls.waitFor)(()=>this.stateManager).then(()=>{this.applySelectedPreset()})}render(){var t;return It.html`
|
|
10
|
+
${this.hasPresets?It.html`
|
|
11
11
|
<ft-select
|
|
12
12
|
class="ft-search-quick-filters--presets"
|
|
13
13
|
part="presets"
|
|
14
|
-
label="${
|
|
14
|
+
label="${Rt.messages.presetsSelector()}"
|
|
15
15
|
outlined
|
|
16
16
|
@change=${r=>this.selectedPreset=r.detail}>
|
|
17
|
-
${(0,
|
|
17
|
+
${(0,Ds.repeat)((t=this.builtPresets)!==null&&t!==void 0?t:[],r=>r.name,r=>It.html`
|
|
18
18
|
<ft-select-option value="${r.id}"
|
|
19
19
|
label="${r.name}"
|
|
20
20
|
?selected=${r.id===this.selectedPreset}>
|
|
21
21
|
</ft-select-option>
|
|
22
22
|
`)}
|
|
23
23
|
</ft-select>
|
|
24
|
-
`:
|
|
25
|
-
`}};
|
|
24
|
+
`:Rt.messages.noQuickFilter()}
|
|
25
|
+
`}};ia([(0,Ns.property)({type:String,reflect:!0})],De.prototype,"selectedPreset",void 0);var Ps={"ft-search-quick-filters":De};(0,Fs.customElements)(Ps);})();
|
|
26
26
|
/*! Bundled license information:
|
|
27
27
|
|
|
28
28
|
@lit/reactive-element/css-tag.js:
|