@fluid-topics/ft-search-type 1.3.46 → 1.3.47

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.
@@ -1178,7 +1178,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
1178
1178
  unbounded>
1179
1179
  </ft-ripple>
1180
1180
  <div class="ft-checkbox--box" part="checkbox-box">
1181
- <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check">
1181
+ <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check" aria-hidden="true">
1182
1182
  <path class="ft-checkbox--checkmark-path" fill="none"
1183
1183
  d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
1184
1184
  </svg>
@@ -1516,7 +1516,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
1516
1516
  `;var Xr=g(R());var Id=g(R());var Dc=g(B()),ve=g(j()),tt=g(R());var Xl=g(B());var Jl=Xl.css`
1517
1517
  `;var Qo=g(R()),Mu="ft-app-info",ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ir.eventName="authentication-change";var $u={session:(t,e)=>{(0,Qo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new ir(e.payload)),0))}},T=Qo.FtReduxStore.get({name:Mu,reducers:$u,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Ui=g(R());var ar=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=T.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var Xo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ar.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ar.await()}};var Ee=class extends Xo{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[u])=>c.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Ui.CacheRegistry,this.cache=e?i.commonCache:new Ui.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Jo=class extends Ee{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var zi=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new zi;var Ke=g(R());var ec,Fr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Fu=Symbol("clearAfterUnitTest"),en=class extends(0,Ke.withEventBus)(Ee){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ec]=()=>{this.defaultMessages={},this.cache=new Ke.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Ke.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Ke.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(i){!(i instanceof Ke.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Fr({loadedContexts:e})),this.dispatchEvent(new Fr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new Fr({loadedContexts:[e]})),this.dispatchEvent(new Fr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ke.delay)(0).then(()=>n()).catch(()=>null)))}};ec=Fu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends en{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends en{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ur=window.FluidTopicsI18nService,tn=window.FluidTopicsCustomI18nService;var tc=g(R()),Hi=class{highlightHtml(e,o,n){(0,tc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Hi;var zu=g(oc(),1);var nc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(nc||(nc={}));var ic;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ic||(ic={}));var ac;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(ac||(ac={}));var Hr;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Hr||(Hr={}));var sc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(sc||(sc={}));var lc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(lc||(lc={}));var sr;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(sr||(sr={}));var cc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(cc||(cc={}));var dc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT"})(dc||(dc={}));var uc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(uc||(uc={}));var pc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(pc||(pc={}));var fc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(fc||(fc={}));var hc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(hc||(hc={}));var yc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(yc||(yc={}));var lr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(lr||(lr={}));var mc;(function(t){t.ASC="ASC",t.DESC="DESC"})(mc||(mc={}));var gc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(gc||(gc={}));var Wr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Wr||(Wr={}));var bc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(bc||(bc={}));var xc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(xc||(xc={}));var vc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(vc||(vc={}));var Sc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sc||(Sc={}));var Ht;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Ht||(Ht={}));var Gr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Gr||(Gr={}));var Oc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Oc||(Oc={}));var le;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(le||(le={}));var Ze;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ze||(Ze={}));var Cc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Cc||(Cc={}));var Ec;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ec||(Ec={}));var Ac;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(Ac||(Ac={}));var wc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(wc||(wc={}));var Rc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Rc||(Rc={}));var Uu={[le.PERSONAL_BOOK_SHARE_USER]:[le.PERSONAL_BOOK_USER],[le.HTML_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.PDF_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.KHUB_ADMIN]:[le.CONTENT_PUBLISHER],[le.ADMIN]:[le.KHUB_ADMIN,le.USERS_ADMIN,le.PORTAL_ADMIN],[le.GENERATIVE_AI_EXPORT_USER]:[le.GENERATIVE_AI_USER]};function Tc(t,e){return t===e||(Uu[t]??[]).some(o=>Tc(o,e))}function Lc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Tc(n,e))}var nn=class extends Ee{async listMySearches(){let{session:e}=T.getState();return Lc(e,le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Nc=g(R());var Wi=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Nc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Wi;var Ic=g(R());var So=class{static get(e,o){var n,i;let a=T.getState(),{lang:s,region:c}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Ic.SearchPlaceConverter(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,o??`${s}-${c}`)}};var an=class extends Ee{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}sortEventArrays(e){let o=Object.entries(e).map(([n,i])=>Array.isArray(i)?[n,i.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof i=="object"&&i!==null?[n,this.sortEventArrays(i)]:[n,i]);return Object.fromEntries(o)}sendEvents(e,o){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(i=>(console.info(o),console.debug(i),n)),1e3)}};var Gi=class{urlToSearchRequest(e){return So.get().parse(e)}searchRequestToUrl(e){return So.get().serialize(e)}};window.FluidTopicsUrlService=new Gi;var Wt=g(R());var cr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};cr.eventName="change";var Vi=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},_c=new Vi;var sn=class t extends Wt.WithEventBus{static build(){return new t(window.history,_c,()=>window.location,!1)}constructor(e,o,n,i){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Wt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new cr(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[p,s,c]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(cr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(cr.eventName,e)}currentItem(){return(0,Wt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Wt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Wt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let i=o??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var kc=T;function Pc(t,e){var o;return kc.getState().authenticationRequired&&!(!((o=kc.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var ce=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},q=class extends tt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>ar.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new tt.CacheRegistry,this.cleanSessionDebouncer=new tt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Dc.html`
1518
1518
  <slot></slot>
1519
- `}connectedCallback(){super.connectedCallback(),T.addEventListener(ir.eventName,this.reloadConfiguration)}disconnectedCallback(){T.addEventListener(ir.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,u;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&T.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Ur.addContext(p)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&T.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&T.actions.availableContentLocales((u=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Pc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};q.elementDefinitions={};q.styles=Jl;ce([(0,ve.property)()],q.prototype,"baseUrl",void 0);ce([(0,ve.property)()],q.prototype,"apiIntegrationIdentifier",void 0);ce([(0,ve.property)()],q.prototype,"apiIntegrationAppVersion",void 0);ce([(0,ve.property)()],q.prototype,"uiLocale",void 0);ce([(0,tt.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);ce([(0,tt.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"editorMode",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"noCustom",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);ce([(0,ve.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],q.prototype,"noCustomComponent",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"withManualResources",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);ce([(0,ve.property)({type:Object})],q.prototype,"apiProvider",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);ce([(0,tt.jsonProperty)([])],q.prototype,"messageContexts",void 0);ce([(0,tt.jsonProperty)(void 0)],q.prototype,"session",void 0);ce([(0,ve.state)()],q.prototype,"localesConfiguration",void 0);ce([(0,ve.state)()],q.prototype,"availableContentLocales",void 0);var ma=g(j());function Hu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!ln(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!ln(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!ln(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ln(t,e){try{return Hu(t,e)}catch{return!1}}function Oo(t,e){return!ln(t,e)}function cn(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let i=e(n);return i[t]=!0,i}}var Bc=g(j(),1);var ji=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:Oo,attribute:!1,...e};(0,Bc.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[n],store:e.store})}};var dn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var dr=g(j(),1);var Mc=g(j(),1);function $c(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Mc.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Oo,...e??{}})}var un=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Uc=g(B(),1);var pn=globalThis,Wu=pn.ShadowRoot&&(pn.ShadyCSS===void 0||pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$S=Symbol();var Fc=(t,e)=>{if(Wu)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=pn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var fn=class extends Uc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Fc(n,e.elementStyles),n}};function zc(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var jr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Vc,Hc=Symbol("constructorPrototype"),Wc=Symbol("constructorName"),jc=Symbol("exportpartsDebouncer"),Gc=Symbol("dynamicDependenciesLoaded"),Vr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Vr.eventName="exportparts-updated";var gt=class extends fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Vc]=new un(5),this.scheduleExportpartsUpdate=()=>{var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[jc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Wc]=this.constructor.name,this[Hc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wc]&&Object.setPrototypeOf(this,this[Hc])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Gc]||(o[Gc]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Vr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Vr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Vr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=zc(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(e){var o,n,i,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(I=>I.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...v].filter(u).map(I=>I.trim());for(let I of E)m.add(I)}if(m.size===0){this.exportparts=void 0;return}let h=[...m.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...h].join(", ")}};Vc=jc;jr([(0,dr.property)()],gt.prototype,"exportpartsPrefix",void 0);jr([$c([])],gt.prototype,"exportpartsPrefixes",void 0);jr([(0,dr.property)({reflect:!0})],gt.prototype,"exportparts",void 0);jr([(0,dr.property)()],gt.prototype,"customStylesheet",void 0);jr([(0,dr.property)()],gt.prototype,"elementToFocus",void 0);jr([(0,dr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function hn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Co=Symbol("internalReduxEventsUnsubscribers"),Gt=Symbol("internalStoresUnsubscribers"),ur=Symbol("internalStores"),Gu=cn(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[ur].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ur].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ur].get(s)}addStore(s,c){var u;c=(u=c??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(c),this[ur].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ur].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ur].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let u=this.constructor.getPropertyOptions(c);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[Gt].has(s.store):this[Gt].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var u;this[Gt].set(s,c.subscribe(()=>this.updateFromStores())),this[Co].set(s,[]),hn(c)&&c.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||c.name===p.store)){let h=b=>this[m](b);c.addEventListener(p.eventName,h),this[Co].get(s).push(()=>c.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Gt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Gt].has(s)&&this[Gt].get(s)(),this[Gt].delete(s),(c=this[Co].get(s))===null||c===void 0||c.forEach(u=>u()),this[Co].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Gt,o=ur,n=Co,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Kc=class extends Gu(gt){};function qe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(t){return!!t&&!!t[J]}function rt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Xu}(t)||Array.isArray(t)||!!t[ed]||!!(!((e=t.constructor)===null||e===void 0)&&e[ed])||ta(t)||ra(t))}function pr(t,e,o){o===void 0&&(o=!1),qr(t)===0?(o?Object.keys:Zr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function qr(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ta(t)?2:ra(t)?3:0}function Kr(t,e){return qr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Vu(t,e){return qr(t)===2?t.get(e):t[e]}function td(t,e,o){var n=qr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function rd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ta(t){return Yu&&t instanceof Map}function ra(t){return Qu&&t instanceof Set}function Vt(t){return t.o||t.t}function oa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=id(t);delete e[J];for(var o=Zr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function na(t,e){return e===void 0&&(e=!1),ia(t)||Tt(t)||!rt(t)||(qr(t)>1&&(t.set=t.add=t.clear=t.delete=ju),Object.freeze(t),e&&pr(t,function(o,n){return na(n,!0)},!0)),t}function ju(){qe(2)}function ia(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function bt(t){var e=ea[t];return e||qe(18,t),e}function Ku(t,e){ea[t]||(ea[t]=e)}function Qi(){return Ao}function Ki(t,e){e&&(bt("Patches"),t.u=[],t.s=[],t.v=e)}function yn(t){Xi(t),t.p.forEach(Zu),t.p=null}function Xi(t){t===Ao&&(Ao=t.l)}function Zc(t){return Ao={p:[],l:Ao,h:t,m:!0,_:0}}function Zu(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Zi(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||bt("ES5").S(e,t,n),n?(o[J].P&&(yn(e),qe(4)),rt(t)&&(t=mn(e,t),e.l||gn(e,t)),e.u&&bt("Patches").M(o[J].t,t,e.u,e.s)):t=mn(e,o,[]),yn(e),e.u&&e.v(e.u,e.s),t!==nd?t:void 0}function mn(t,e,o){if(ia(e))return e;var n=e[J];if(!n)return pr(e,function(c,u){return qc(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return gn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=oa(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),pr(a,function(c,u){return qc(t,n,i,c,u,o,s)}),gn(t,i,!1),o&&t.u&&bt("Patches").N(n,o,t.u,t.s)}return n.o}function qc(t,e,o,n,i,a,s){if(Tt(i)){var c=mn(t,i,a&&e&&e.i!==3&&!Kr(e.R,n)?a.concat(n):void 0);if(td(o,n,c),!Tt(c))return;t.m=!1}else s&&o.add(i);if(rt(i)&&!ia(i)){if(!t.h.D&&t._<1)return;mn(t,i),e&&e.A.l||gn(t,i)}}function gn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&na(e,o)}function qi(t,e){var o=t[J];return(o?Vt(o):t)[e]}function Yc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function jt(t){t.P||(t.P=!0,t.l&&jt(t.l))}function Yi(t){t.o||(t.o=oa(t.t))}function Ji(t,e,o){var n=ta(e)?bt("MapSet").F(e,o):ra(e)?bt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Qi(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=wo;s&&(u=[c],p=Eo);var m=Proxy.revocable(u,p),h=m.revoke,b=m.proxy;return c.k=b,c.j=h,b}(e,o):bt("ES5").J(e,o);return(o?o.A:Qi()).p.push(n),n}function qu(t){return Tt(t)||qe(22,t),function e(o){if(!rt(o))return o;var n,i=o[J],a=qr(o);if(i){if(!i.P&&(i.i<4||!bt("ES5").K(i)))return i.t;i.I=!0,n=Qc(o,a),i.I=!1}else n=Qc(o,a);return pr(n,function(s,c){i&&Vu(i.t,s)===c||td(n,s,e(c))}),a===3?new Set(n):n}(t)}function Qc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return oa(t)}function od(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[J];return wo.get(p,s)},set:function(p){var m=this[J];wo.set(m,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][J];if(!u.P)switch(u.i){case 5:n(u)&&jt(u);break;case 4:o(u)&&jt(u)}}}function o(s){for(var c=s.t,u=s.k,p=Zr(u),m=p.length-1;m>=0;m--){var h=p[m];if(h!==J){var b=c[h];if(b===void 0&&!Kr(c,h))return!0;var S=u[h],v=S&&S[J];if(v?v.t!==b:!rd(S,b))return!0}}var E=!!c[J];return p.length!==Zr(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&qe(3,JSON.stringify(Vt(s)))}var a={};Ku("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var E=id(b);delete E[J];for(var I=Zr(E),L=0;L<I.length;L++){var _=I[L];E[_]=t(_,h||!!E[_].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(u,s),m={i:u?5:4,A:c?c.A:Qi(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,J,{value:m,writable:!0}),p},S:function(s,c,u){u?Tt(c)&&c[J].A===s&&e(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var h=m[J];if(h){var b=h.t,S=h.k,v=h.R,E=h.i;if(E===4)pr(S,function($){$!==J&&(b[$]!==void 0||Kr(b,$)?v[$]||p(S[$]):(v[$]=!0,jt(h)))}),pr(b,function($){S[$]!==void 0||Kr(S,$)||(v[$]=!1,jt(h))});else if(E===5){if(n(h)&&(jt(h),v.length=!0),S.length<b.length)for(var I=S.length;I<b.length;I++)v[I]=!1;else for(var L=b.length;L<S.length;L++)v[L]=!0;for(var _=Math.min(S.length,b.length),P=0;P<_;P++)S.hasOwnProperty(P)||(v[P]=!0),v[P]===void 0&&p(S[P])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Xc,Ao,aa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Yu=typeof Map<"u",Qu=typeof Set<"u",Jc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",nd=aa?Symbol.for("immer-nothing"):((Xc={})["immer-nothing"]=!0,Xc),ed=aa?Symbol.for("immer-draftable"):"__$immer_draftable",J=aa?Symbol.for("immer-state"):"__$immer_state";var Xu=""+Object.prototype.constructor,Zr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,id=Object.getOwnPropertyDescriptors||function(t){var e={};return Zr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ea={},wo={get:function(t,e){if(e===J)return t;var o=Vt(t);if(!Kr(o,e))return function(i,a,s){var c,u=Yc(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!rt(n)?n:n===qi(t.t,e)?(Yi(t),t.o[e]=Ji(t.A.h,n,t)):n},has:function(t,e){return e in Vt(t)},ownKeys:function(t){return Reflect.ownKeys(Vt(t))},set:function(t,e,o){var n=Yc(Vt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=qi(Vt(t),e),a=i?.[J];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(rd(o,i)&&(o!==void 0||Kr(t.t,e)))return!0;Yi(t),jt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return qi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Yi(t),jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Vt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){qe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){qe(12)}},Eo={};pr(wo,function(t,e){Eo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Eo.deleteProperty=function(t,e){return Eo.set.call(this,t,e,void 0)},Eo.set=function(t,e,o){return wo.set.call(this,t[0],e,o,t[0])};var Ju=function(){function t(o){var n=this;this.O=Jc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(E){var I=this;E===void 0&&(E=c);for(var L=arguments.length,_=Array(L>1?L-1:0),P=1;P<L;P++)_[P-1]=arguments[P];return u.produce(E,function($){var F;return(F=a).call.apply(F,[I,$].concat(_))})}}var p;if(typeof a!="function"&&qe(6),s!==void 0&&typeof s!="function"&&qe(7),rt(i)){var m=Zc(n),h=Ji(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?yn(m):Xi(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(E){return Ki(m,s),Zi(E,m)},function(E){throw yn(m),E}):(Ki(m,s),Zi(p,m))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===nd&&(p=void 0),n.D&&na(p,!0),s){var S=[],v=[];bt("Patches").M(i,p,S,v),s(S,v)}return p}qe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var m=arguments.length,h=Array(m>1?m-1:0),b=1;b<m;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(i,a,function(p,m){s=p,c=m});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){rt(o)||qe(8),Tt(o)&&(o=qu(o));var n=Zc(this),i=Ji(this,o,void 0);return i[J].C=!0,Xi(n),i},e.finishDraft=function(o,n){var i=o&&o[J],a=i.A;return Ki(a,n),Zi(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Jc&&qe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=bt("Patches").$;return Tt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),Ue=new Ju,ep=Ue.produce,JS=Ue.produceWithPatches.bind(Ue),eO=Ue.setAutoFreeze.bind(Ue),tO=Ue.setUseProxies.bind(Ue),rO=Ue.applyPatches.bind(Ue),oO=Ue.createDraft.bind(Ue),nO=Ue.finishDraft.bind(Ue),bn=ep;function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function ad(t,e){if(fr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sd(t){var e=ad(t,"string");return fr(e)=="symbol"?e:e+""}function ld(t,e,o){return(e=sd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function cd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function sa(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?cd(Object(o),!0).forEach(function(n){ld(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):cd(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ae(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var dd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),la=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+la(),REPLACE:"@@redux/REPLACE"+la(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+la()}};function tp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ca(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ae(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ae(1));return o(ca)(t,e)}if(typeof t!="function")throw new Error(Ae(2));var i=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function m(){if(u)throw new Error(Ae(3));return a}function h(E){if(typeof E!="function")throw new Error(Ae(4));if(u)throw new Error(Ae(5));var I=!0;return p(),c.push(E),function(){if(I){if(u)throw new Error(Ae(6));I=!1,p();var _=c.indexOf(E);c.splice(_,1),s=null}}}function b(E){if(!tp(E))throw new Error(Ae(7));if(typeof E.type>"u")throw new Error(Ae(8));if(u)throw new Error(Ae(9));try{u=!0,a=i(a,E)}finally{u=!1}for(var I=s=c,L=0;L<I.length;L++){var _=I[L];_()}return E}function S(E){if(typeof E!="function")throw new Error(Ae(10));i=E,b({type:xn.REPLACE})}function v(){var E,I=h;return E={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(Ae(11));function P(){_.next&&_.next(m())}P();var $=I(P);return{unsubscribe:$}}},E[dd]=function(){return this},E}return b({type:xn.INIT}),n={dispatch:b,subscribe:h,getState:m,replaceReducer:S},n[dd]=v,n}function rp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:xn.INIT});if(typeof n>"u")throw new Error(Ae(12));if(typeof o(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ae(13))})}function ud(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{rp(o)}catch(u){c=u}return function(p,m){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var E=a[v],I=o[E],L=p[E],_=I(L,m);if(typeof _>"u"){var P=m&&m.type;throw new Error(Ae(14))}S[E]=_,b=b||_!==L}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Yr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function pd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ae(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=Yr.apply(void 0,c)(i.dispatch),sa(sa({},i),{},{dispatch:a})}}}function fd(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var hd=fd();hd.withExtraArgument=fd;var da=hd;var xd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),op=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(m){p=[6,m],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Qr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},np=Object.defineProperty,ip=Object.defineProperties,ap=Object.getOwnPropertyDescriptors,yd=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,md=function(t,e,o){return e in t?np(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Kt=function(t,e){for(var o in e||(e={}))sp.call(e,o)&&md(t,o,e[o]);if(yd)for(var n=0,i=yd(e);n<i.length;n++){var o=i[n];lp.call(e,o)&&md(t,o,e[o])}return t},ua=function(t,e){return ip(t,ap(e))},cp=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},s=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var dp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yr:Yr.apply(null,arguments)},OO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var pp=function(t){xd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Qr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Qr([void 0],o.concat(this))))},e}(Array),fp=function(t){xd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Qr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Qr([void 0],o.concat(this))))},e}(Array);function ha(t){return rt(t)?bn(t,function(){}):t}function hp(t){return typeof t=="boolean"}function yp(){return function(e){return mp(e)}}function mp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new pp;if(o&&(hp(o)?c.push(da):c.push(da.withExtraArgument(o.extraArgument))),0){if(i)var u;if(s)var p}return c}var pa=!0;function vd(t){var e=yp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,m=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(up(i))S=ud(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!pa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!pa&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=pd.apply(void 0,v),I=Yr;u&&(I=dp(Kt({trace:!pa},typeof u=="object"&&u)));var L=new fp(E),_=L;Array.isArray(b)?_=Qr([E],b):typeof b=="function"&&(_=b(L));var P=I.apply(void 0,_);return ca(S,m,P)}function Zt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Kt(Kt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Sd(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function gp(t){return typeof t=="function"}function bp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Sd(e):[e,o,n],a=i[0],s=i[1],c=i[2],u;if(gp(t))u=function(){return ha(t())};else{var p=ha(t);u=function(){return p}}function m(h,b){h===void 0&&(h=u());var S=Qr([a[b.type]],s.filter(function(v){var E=v.matcher;return E(b)}).map(function(v){var E=v.reducer;return E}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,E){if(E)if(Tt(v)){var I=v,L=E(I,b);return L===void 0?v:L}else{if(rt(v))return bn(v,function(_){return E(_,b)});var L=E(v,b);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return m.getInitialState=u,m}function xp(t,e){return t+"/"+e}function Od(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ha(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(m){var h=n[m],b=xp(e,m),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[m]=S,s[b]=S,c[m]=v?Zt(b,v):Zt(b)});function u(){var m=typeof t.extraReducers=="function"?Sd(t.extraReducers):[t.extraReducers],h=m[0],b=h===void 0?{}:h,S=m[1],v=S===void 0?[]:S,E=m[2],I=E===void 0?void 0:E,L=Kt(Kt({},b),s);return bp(o,function(_){for(var P in L)_.addCase(P,L[P]);for(var $=0,F=v;$<F.length;$++){var Le=F[$];_.addMatcher(Le.matcher,Le.reducer)}I&&_.addDefaultCase(I)})}var p;return{name:e,reducer:function(m,h){return p||(p=u()),p(m,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var vp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Sp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=vp[Math.random()*64|0];return e},Op=["name","message","stack","code"],fa=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),gd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Cp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Op;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},wO=function(){function t(e,o,n){var i=Zt(e+"/fulfilled",function(m,h,b,S){return{payload:m,meta:ua(Kt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=Zt(e+"/pending",function(m,h,b){return{payload:void 0,meta:ua(Kt({},b||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Zt(e+"/rejected",function(m,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Cp)(m||"Rejected"),meta:ua(Kt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(m):Sp(),E=new u,I,L=!1;function _($){I=$,E.abort()}var P=function(){return cp(this,null,function(){var $,F,Le,st,we,lt,ye;return op(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),st=($=n?.condition)==null?void 0:$.call(n,m,{getState:b,extra:S}),Ap(st)?[4,st]:[3,2];case 1:st=y.sent(),y.label=2;case 2:if(st===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,we=new Promise(function(x,k){return E.signal.addEventListener("abort",function(){return k({name:"AbortError",message:I||"Aborted"})})}),h(a(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([we,Promise.resolve(o(m,{dispatch:h,getState:b,extra:S,requestId:v,signal:E.signal,abort:_,rejectWithValue:function(x,k){return new fa(x,k)},fulfillWithValue:function(x,k){return new gd(x,k)}})).then(function(x){if(x instanceof fa)throw x;return x instanceof gd?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return Le=y.sent(),[3,5];case 4:return lt=y.sent(),Le=lt instanceof fa?s(null,v,m,lt.payload,lt.meta):s(lt,v,m),[3,5];case 5:return ye=n&&!n.dispatchConditionRejection&&s.match(Le)&&Le.meta.condition,ye||h(Le),[2,Le]}})})}();return Object.assign(P,{abort:_,requestId:v,arg:m,unwrap:function(){return P.then(Ep)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ep(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ap(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Cd="listener",Ed="completed",Ad="cancelled",RO="task-"+Ad,TO="task-"+Ed,LO=Cd+"-"+Ad,NO=Cd+"-"+Ed;var ya="listenerMiddleware";var IO=Zt(ya+"/add"),_O=Zt(ya+"/removeAll"),kO=Zt(ya+"/remove");var bd,PO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(bd||(bd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},wp=function(t){return function(e){setTimeout(e,t)}},DO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:wp(10);od();var Rp=cn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),vn=class extends Rp(Object){};window.ftReduxStores||(window.ftReduxStores={});var wd=class t extends vn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(hn(a))return a;if(i==null)return;let s=Od({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=vd({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new dn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let u=s,p=a[u];return p?(...m)=>{let h=p(...m.map(i));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[u]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Sn=class{static format(e,o,n,i){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(e,o,n,i)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Rd=g(R()),On=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},iC=(0,Rd.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Sn.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return On([(0,ma.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),On([(0,ma.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),On([ji({store:T.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),On([ji({store:T.name})],e.prototype,"uiLocale",void 0),e});var An=g(R());var Cn=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var En=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var Tp="ft-user-assets",Lp={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(Ze).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:i}=e.payload;ba(t,o,[...ga(t,o),i]),Td(t,o,1,n),Ld(t,i)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;ba(t,o,ga(t,o).map(i=>i.id===n.id?n:i)),Ld(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:i}=e.payload;ba(t,o,ga(t,o).filter(a=>a.id!==i)),Td(t,o,-1,n)}},Nd={[Ze.SEARCHES]:"savedSearches",[Ze.BOOKMARKS]:"bookmarks",[Ze.BOOKS]:void 0,[Ze.COLLECTIONS]:void 0},ga=(t,e)=>{var o;let n=Nd[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},ba=(t,e,o)=>{let n=Nd[e];n&&(t[n]=o)},Td=(t,e,o,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+o),e===Ze.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+o)}},Ld=(t,e)=>{let o=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},ze=An.FtReduxStore.get({name:Tp,reducers:Lp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ze).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xa=class{constructor(e=new Cn,o=new En){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Jo,this.savedSearchesService=new nn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,An.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ze.actions.clearAssetCount(),ze.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ze.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ze.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ze.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ze.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&ze.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&ze.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(ze.getState().assetCounts.bookmarkByMap).length!==0;e===Ze.BOOKMARKS&&o&&ze.actions.clearBookmarkCountByMap(),ze.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ze.actions.bookmarks(o)}}},va=new xa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=va);(0,Id.customElement)("ft-app-context")(q);var Pd=g(j());var Sa=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},_d=new Sa;var Np=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ip=Symbol("i18nAttributes"),_p=Symbol("i18nListAttributes"),Dd=Symbol("i18nProperties"),wn=Symbol("i18nContexts"),Ro=Symbol("i18nUnsubs"),Jr=(0,Xr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?tn:Ur}i18n(a){let{context:s,key:c,message:u}=a,{custom:p,args:m,argsProvider:h}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(h?h(this):[]);return this.getI18nService(p).resolveMessage(s,c,...b)}return u}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(_d.isI18nKey(a)){let[c,u]=a.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,u)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let u=this,p=(m,h,b)=>b?.context&&b.key&&a(m,h,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[Ip])===null||s===void 0||s.forEach((m,h)=>u[h]=p(m,h,u[h])),(c=this[_p])===null||c===void 0||c.forEach((m,h)=>{var b;return u[h]=(b=u[h])===null||b===void 0?void 0:b.map(S=>p(m,h,S))})}updateI18nProperties(a){var s;(s=this[Dd])===null||s===void 0||s.forEach((c,u)=>{a(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let u=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[wn].set(u,{isCustomContext:c}),this[Ro].has(u)||this[Ro].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(a){return this[wn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[wn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ro].forEach(a=>a()),this[Ro].clear()}}return e=wn,o=Ro,Np([(0,Pd.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),kd=class extends Jr(Xr.FtLitElement){},Rn=class extends Jr(Xr.FtLitElementRedux){};var To=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ot=class extends Rn{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Tn.nothing:Tn.html`
1519
+ `}connectedCallback(){super.connectedCallback(),T.addEventListener(ir.eventName,this.reloadConfiguration)}disconnectedCallback(){T.addEventListener(ir.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,u;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&T.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Ur.addContext(p)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&T.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&T.actions.availableContentLocales((u=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Pc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};q.elementDefinitions={};q.styles=Jl;ce([(0,ve.property)()],q.prototype,"baseUrl",void 0);ce([(0,ve.property)()],q.prototype,"apiIntegrationIdentifier",void 0);ce([(0,ve.property)()],q.prototype,"apiIntegrationAppVersion",void 0);ce([(0,ve.property)()],q.prototype,"uiLocale",void 0);ce([(0,tt.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);ce([(0,tt.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"editorMode",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"noCustom",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);ce([(0,ve.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],q.prototype,"noCustomComponent",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"withManualResources",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);ce([(0,ve.property)({type:Object})],q.prototype,"apiProvider",void 0);ce([(0,ve.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);ce([(0,tt.jsonProperty)([])],q.prototype,"messageContexts",void 0);ce([(0,tt.jsonProperty)(void 0)],q.prototype,"session",void 0);ce([(0,ve.state)()],q.prototype,"localesConfiguration",void 0);ce([(0,ve.state)()],q.prototype,"availableContentLocales",void 0);var ma=g(j());function Hu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!ln(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!ln(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!ln(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ln(t,e){try{return Hu(t,e)}catch{return!1}}function Oo(t,e){return!ln(t,e)}function cn(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let i=e(n);return i[t]=!0,i}}var Bc=g(j(),1);var ji=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:Oo,attribute:!1,...e};(0,Bc.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[n],store:e.store})}};var dn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var dr=g(j(),1);var Mc=g(j(),1);function $c(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Mc.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Oo,...e??{}})}var un=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Uc=g(B(),1);var pn=globalThis,Wu=pn.ShadowRoot&&(pn.ShadyCSS===void 0||pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$S=Symbol();var Fc=(t,e)=>{if(Wu)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=pn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var fn=class extends Uc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Fc(n,e.elementStyles),n}};function zc(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var jr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Vc,Hc=Symbol("constructorPrototype"),Wc=Symbol("constructorName"),jc=Symbol("exportpartsDebouncer"),Gc=Symbol("dynamicDependenciesLoaded"),Vr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Vr.eventName="exportparts-updated";var gt=class extends fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Vc]=new un(5),this.scheduleExportpartsUpdate=()=>{var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[jc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Wc]=this.constructor.name,this[Hc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Wc]&&Object.setPrototypeOf(this,this[Hc])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Gc]||(o[Gc]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Vr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Vr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Vr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=zc(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(e){var o,n,i,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(I=>I.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...v].filter(u).map(I=>I.trim());for(let I of E)m.add(I)}if(m.size===0){this.exportparts=void 0;return}let h=[...m.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...h].join(", ")}};Vc=jc;jr([(0,dr.property)()],gt.prototype,"exportpartsPrefix",void 0);jr([$c([])],gt.prototype,"exportpartsPrefixes",void 0);jr([(0,dr.property)({reflect:!0})],gt.prototype,"exportparts",void 0);jr([(0,dr.property)()],gt.prototype,"customStylesheet",void 0);jr([(0,dr.property)()],gt.prototype,"elementToFocus",void 0);jr([(0,dr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function hn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Co=Symbol("internalReduxEventsUnsubscribers"),Gt=Symbol("internalStoresUnsubscribers"),ur=Symbol("internalStores"),Gu=cn(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[ur].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ur].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ur].get(s)}addStore(s,c){var u;c=(u=c??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(c),this[ur].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ur].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ur].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let u=this.constructor.getPropertyOptions(c);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[Gt].has(s.store):this[Gt].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var u;this[Gt].set(s,c.subscribe(()=>this.updateFromStores())),this[Co].set(s,[]),hn(c)&&c.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||c.name===p.store)){let h=b=>this[m](b);c.addEventListener(p.eventName,h),this[Co].get(s).push(()=>c.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Gt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Gt].has(s)&&this[Gt].get(s)(),this[Gt].delete(s),(c=this[Co].get(s))===null||c===void 0||c.forEach(u=>u()),this[Co].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Gt,o=ur,n=Co,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Kc=class extends Gu(gt){};function qe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tt(t){return!!t&&!!t[J]}function rt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Xu}(t)||Array.isArray(t)||!!t[ed]||!!(!((e=t.constructor)===null||e===void 0)&&e[ed])||ta(t)||ra(t))}function pr(t,e,o){o===void 0&&(o=!1),qr(t)===0?(o?Object.keys:Zr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function qr(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ta(t)?2:ra(t)?3:0}function Kr(t,e){return qr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Vu(t,e){return qr(t)===2?t.get(e):t[e]}function td(t,e,o){var n=qr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function rd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ta(t){return Yu&&t instanceof Map}function ra(t){return Qu&&t instanceof Set}function Vt(t){return t.o||t.t}function oa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=id(t);delete e[J];for(var o=Zr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function na(t,e){return e===void 0&&(e=!1),ia(t)||Tt(t)||!rt(t)||(qr(t)>1&&(t.set=t.add=t.clear=t.delete=ju),Object.freeze(t),e&&pr(t,function(o,n){return na(n,!0)},!0)),t}function ju(){qe(2)}function ia(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function bt(t){var e=ea[t];return e||qe(18,t),e}function Ku(t,e){ea[t]||(ea[t]=e)}function Qi(){return Ao}function Ki(t,e){e&&(bt("Patches"),t.u=[],t.s=[],t.v=e)}function yn(t){Xi(t),t.p.forEach(Zu),t.p=null}function Xi(t){t===Ao&&(Ao=t.l)}function Zc(t){return Ao={p:[],l:Ao,h:t,m:!0,_:0}}function Zu(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Zi(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||bt("ES5").S(e,t,n),n?(o[J].P&&(yn(e),qe(4)),rt(t)&&(t=mn(e,t),e.l||gn(e,t)),e.u&&bt("Patches").M(o[J].t,t,e.u,e.s)):t=mn(e,o,[]),yn(e),e.u&&e.v(e.u,e.s),t!==nd?t:void 0}function mn(t,e,o){if(ia(e))return e;var n=e[J];if(!n)return pr(e,function(c,u){return qc(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return gn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=oa(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),pr(a,function(c,u){return qc(t,n,i,c,u,o,s)}),gn(t,i,!1),o&&t.u&&bt("Patches").N(n,o,t.u,t.s)}return n.o}function qc(t,e,o,n,i,a,s){if(Tt(i)){var c=mn(t,i,a&&e&&e.i!==3&&!Kr(e.R,n)?a.concat(n):void 0);if(td(o,n,c),!Tt(c))return;t.m=!1}else s&&o.add(i);if(rt(i)&&!ia(i)){if(!t.h.D&&t._<1)return;mn(t,i),e&&e.A.l||gn(t,i)}}function gn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&na(e,o)}function qi(t,e){var o=t[J];return(o?Vt(o):t)[e]}function Yc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function jt(t){t.P||(t.P=!0,t.l&&jt(t.l))}function Yi(t){t.o||(t.o=oa(t.t))}function Ji(t,e,o){var n=ta(e)?bt("MapSet").F(e,o):ra(e)?bt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Qi(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=wo;s&&(u=[c],p=Eo);var m=Proxy.revocable(u,p),h=m.revoke,b=m.proxy;return c.k=b,c.j=h,b}(e,o):bt("ES5").J(e,o);return(o?o.A:Qi()).p.push(n),n}function qu(t){return Tt(t)||qe(22,t),function e(o){if(!rt(o))return o;var n,i=o[J],a=qr(o);if(i){if(!i.P&&(i.i<4||!bt("ES5").K(i)))return i.t;i.I=!0,n=Qc(o,a),i.I=!1}else n=Qc(o,a);return pr(n,function(s,c){i&&Vu(i.t,s)===c||td(n,s,e(c))}),a===3?new Set(n):n}(t)}function Qc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return oa(t)}function od(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[J];return wo.get(p,s)},set:function(p){var m=this[J];wo.set(m,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][J];if(!u.P)switch(u.i){case 5:n(u)&&jt(u);break;case 4:o(u)&&jt(u)}}}function o(s){for(var c=s.t,u=s.k,p=Zr(u),m=p.length-1;m>=0;m--){var h=p[m];if(h!==J){var b=c[h];if(b===void 0&&!Kr(c,h))return!0;var S=u[h],v=S&&S[J];if(v?v.t!==b:!rd(S,b))return!0}}var E=!!c[J];return p.length!==Zr(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&qe(3,JSON.stringify(Vt(s)))}var a={};Ku("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var E=id(b);delete E[J];for(var I=Zr(E),L=0;L<I.length;L++){var _=I[L];E[_]=t(_,h||!!E[_].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(u,s),m={i:u?5:4,A:c?c.A:Qi(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,J,{value:m,writable:!0}),p},S:function(s,c,u){u?Tt(c)&&c[J].A===s&&e(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var h=m[J];if(h){var b=h.t,S=h.k,v=h.R,E=h.i;if(E===4)pr(S,function($){$!==J&&(b[$]!==void 0||Kr(b,$)?v[$]||p(S[$]):(v[$]=!0,jt(h)))}),pr(b,function($){S[$]!==void 0||Kr(S,$)||(v[$]=!1,jt(h))});else if(E===5){if(n(h)&&(jt(h),v.length=!0),S.length<b.length)for(var I=S.length;I<b.length;I++)v[I]=!1;else for(var L=b.length;L<S.length;L++)v[L]=!0;for(var _=Math.min(S.length,b.length),P=0;P<_;P++)S.hasOwnProperty(P)||(v[P]=!0),v[P]===void 0&&p(S[P])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Xc,Ao,aa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Yu=typeof Map<"u",Qu=typeof Set<"u",Jc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",nd=aa?Symbol.for("immer-nothing"):((Xc={})["immer-nothing"]=!0,Xc),ed=aa?Symbol.for("immer-draftable"):"__$immer_draftable",J=aa?Symbol.for("immer-state"):"__$immer_state";var Xu=""+Object.prototype.constructor,Zr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,id=Object.getOwnPropertyDescriptors||function(t){var e={};return Zr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ea={},wo={get:function(t,e){if(e===J)return t;var o=Vt(t);if(!Kr(o,e))return function(i,a,s){var c,u=Yc(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!rt(n)?n:n===qi(t.t,e)?(Yi(t),t.o[e]=Ji(t.A.h,n,t)):n},has:function(t,e){return e in Vt(t)},ownKeys:function(t){return Reflect.ownKeys(Vt(t))},set:function(t,e,o){var n=Yc(Vt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=qi(Vt(t),e),a=i?.[J];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(rd(o,i)&&(o!==void 0||Kr(t.t,e)))return!0;Yi(t),jt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return qi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Yi(t),jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Vt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){qe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){qe(12)}},Eo={};pr(wo,function(t,e){Eo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Eo.deleteProperty=function(t,e){return Eo.set.call(this,t,e,void 0)},Eo.set=function(t,e,o){return wo.set.call(this,t[0],e,o,t[0])};var Ju=function(){function t(o){var n=this;this.O=Jc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(E){var I=this;E===void 0&&(E=c);for(var L=arguments.length,_=Array(L>1?L-1:0),P=1;P<L;P++)_[P-1]=arguments[P];return u.produce(E,function($){var F;return(F=a).call.apply(F,[I,$].concat(_))})}}var p;if(typeof a!="function"&&qe(6),s!==void 0&&typeof s!="function"&&qe(7),rt(i)){var m=Zc(n),h=Ji(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?yn(m):Xi(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(E){return Ki(m,s),Zi(E,m)},function(E){throw yn(m),E}):(Ki(m,s),Zi(p,m))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===nd&&(p=void 0),n.D&&na(p,!0),s){var S=[],v=[];bt("Patches").M(i,p,S,v),s(S,v)}return p}qe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var m=arguments.length,h=Array(m>1?m-1:0),b=1;b<m;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(i,a,function(p,m){s=p,c=m});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){rt(o)||qe(8),Tt(o)&&(o=qu(o));var n=Zc(this),i=Ji(this,o,void 0);return i[J].C=!0,Xi(n),i},e.finishDraft=function(o,n){var i=o&&o[J],a=i.A;return Ki(a,n),Zi(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Jc&&qe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=bt("Patches").$;return Tt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),Ue=new Ju,ep=Ue.produce,JS=Ue.produceWithPatches.bind(Ue),eO=Ue.setAutoFreeze.bind(Ue),tO=Ue.setUseProxies.bind(Ue),rO=Ue.applyPatches.bind(Ue),oO=Ue.createDraft.bind(Ue),nO=Ue.finishDraft.bind(Ue),bn=ep;function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function ad(t,e){if(fr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sd(t){var e=ad(t,"string");return fr(e)=="symbol"?e:e+""}function ld(t,e,o){return(e=sd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function cd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function sa(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?cd(Object(o),!0).forEach(function(n){ld(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):cd(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ae(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var dd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),la=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+la(),REPLACE:"@@redux/REPLACE"+la(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+la()}};function tp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ca(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ae(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ae(1));return o(ca)(t,e)}if(typeof t!="function")throw new Error(Ae(2));var i=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function m(){if(u)throw new Error(Ae(3));return a}function h(E){if(typeof E!="function")throw new Error(Ae(4));if(u)throw new Error(Ae(5));var I=!0;return p(),c.push(E),function(){if(I){if(u)throw new Error(Ae(6));I=!1,p();var _=c.indexOf(E);c.splice(_,1),s=null}}}function b(E){if(!tp(E))throw new Error(Ae(7));if(typeof E.type>"u")throw new Error(Ae(8));if(u)throw new Error(Ae(9));try{u=!0,a=i(a,E)}finally{u=!1}for(var I=s=c,L=0;L<I.length;L++){var _=I[L];_()}return E}function S(E){if(typeof E!="function")throw new Error(Ae(10));i=E,b({type:xn.REPLACE})}function v(){var E,I=h;return E={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(Ae(11));function P(){_.next&&_.next(m())}P();var $=I(P);return{unsubscribe:$}}},E[dd]=function(){return this},E}return b({type:xn.INIT}),n={dispatch:b,subscribe:h,getState:m,replaceReducer:S},n[dd]=v,n}function rp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:xn.INIT});if(typeof n>"u")throw new Error(Ae(12));if(typeof o(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ae(13))})}function ud(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{rp(o)}catch(u){c=u}return function(p,m){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var E=a[v],I=o[E],L=p[E],_=I(L,m);if(typeof _>"u"){var P=m&&m.type;throw new Error(Ae(14))}S[E]=_,b=b||_!==L}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Yr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function pd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ae(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=Yr.apply(void 0,c)(i.dispatch),sa(sa({},i),{},{dispatch:a})}}}function fd(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var hd=fd();hd.withExtraArgument=fd;var da=hd;var xd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),op=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(m){p=[6,m],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Qr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},np=Object.defineProperty,ip=Object.defineProperties,ap=Object.getOwnPropertyDescriptors,yd=Object.getOwnPropertySymbols,sp=Object.prototype.hasOwnProperty,lp=Object.prototype.propertyIsEnumerable,md=function(t,e,o){return e in t?np(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Kt=function(t,e){for(var o in e||(e={}))sp.call(e,o)&&md(t,o,e[o]);if(yd)for(var n=0,i=yd(e);n<i.length;n++){var o=i[n];lp.call(e,o)&&md(t,o,e[o])}return t},ua=function(t,e){return ip(t,ap(e))},cp=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},s=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var dp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yr:Yr.apply(null,arguments)},OO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var pp=function(t){xd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Qr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Qr([void 0],o.concat(this))))},e}(Array),fp=function(t){xd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Qr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Qr([void 0],o.concat(this))))},e}(Array);function ha(t){return rt(t)?bn(t,function(){}):t}function hp(t){return typeof t=="boolean"}function yp(){return function(e){return mp(e)}}function mp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new pp;if(o&&(hp(o)?c.push(da):c.push(da.withExtraArgument(o.extraArgument))),0){if(i)var u;if(s)var p}return c}var pa=!0;function vd(t){var e=yp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,m=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(up(i))S=ud(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!pa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!pa&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=pd.apply(void 0,v),I=Yr;u&&(I=dp(Kt({trace:!pa},typeof u=="object"&&u)));var L=new fp(E),_=L;Array.isArray(b)?_=Qr([E],b):typeof b=="function"&&(_=b(L));var P=I.apply(void 0,_);return ca(S,m,P)}function Zt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Kt(Kt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Sd(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function gp(t){return typeof t=="function"}function bp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Sd(e):[e,o,n],a=i[0],s=i[1],c=i[2],u;if(gp(t))u=function(){return ha(t())};else{var p=ha(t);u=function(){return p}}function m(h,b){h===void 0&&(h=u());var S=Qr([a[b.type]],s.filter(function(v){var E=v.matcher;return E(b)}).map(function(v){var E=v.reducer;return E}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,E){if(E)if(Tt(v)){var I=v,L=E(I,b);return L===void 0?v:L}else{if(rt(v))return bn(v,function(_){return E(_,b)});var L=E(v,b);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return m.getInitialState=u,m}function xp(t,e){return t+"/"+e}function Od(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ha(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(m){var h=n[m],b=xp(e,m),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[m]=S,s[b]=S,c[m]=v?Zt(b,v):Zt(b)});function u(){var m=typeof t.extraReducers=="function"?Sd(t.extraReducers):[t.extraReducers],h=m[0],b=h===void 0?{}:h,S=m[1],v=S===void 0?[]:S,E=m[2],I=E===void 0?void 0:E,L=Kt(Kt({},b),s);return bp(o,function(_){for(var P in L)_.addCase(P,L[P]);for(var $=0,F=v;$<F.length;$++){var Le=F[$];_.addMatcher(Le.matcher,Le.reducer)}I&&_.addDefaultCase(I)})}var p;return{name:e,reducer:function(m,h){return p||(p=u()),p(m,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var vp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Sp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=vp[Math.random()*64|0];return e},Op=["name","message","stack","code"],fa=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),gd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Cp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Op;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},wO=function(){function t(e,o,n){var i=Zt(e+"/fulfilled",function(m,h,b,S){return{payload:m,meta:ua(Kt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=Zt(e+"/pending",function(m,h,b){return{payload:void 0,meta:ua(Kt({},b||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Zt(e+"/rejected",function(m,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Cp)(m||"Rejected"),meta:ua(Kt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(m):Sp(),E=new u,I,L=!1;function _($){I=$,E.abort()}var P=function(){return cp(this,null,function(){var $,F,Le,st,we,lt,ye;return op(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),st=($=n?.condition)==null?void 0:$.call(n,m,{getState:b,extra:S}),Ap(st)?[4,st]:[3,2];case 1:st=y.sent(),y.label=2;case 2:if(st===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,we=new Promise(function(x,k){return E.signal.addEventListener("abort",function(){return k({name:"AbortError",message:I||"Aborted"})})}),h(a(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([we,Promise.resolve(o(m,{dispatch:h,getState:b,extra:S,requestId:v,signal:E.signal,abort:_,rejectWithValue:function(x,k){return new fa(x,k)},fulfillWithValue:function(x,k){return new gd(x,k)}})).then(function(x){if(x instanceof fa)throw x;return x instanceof gd?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return Le=y.sent(),[3,5];case 4:return lt=y.sent(),Le=lt instanceof fa?s(null,v,m,lt.payload,lt.meta):s(lt,v,m),[3,5];case 5:return ye=n&&!n.dispatchConditionRejection&&s.match(Le)&&Le.meta.condition,ye||h(Le),[2,Le]}})})}();return Object.assign(P,{abort:_,requestId:v,arg:m,unwrap:function(){return P.then(Ep)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Ep(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ap(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Cd="listener",Ed="completed",Ad="cancelled",RO="task-"+Ad,TO="task-"+Ed,LO=Cd+"-"+Ad,NO=Cd+"-"+Ed;var ya="listenerMiddleware";var IO=Zt(ya+"/add"),_O=Zt(ya+"/removeAll"),kO=Zt(ya+"/remove");var bd,PO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(bd||(bd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},wp=function(t){return function(e){setTimeout(e,t)}},DO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:wp(10);od();var Rp=cn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),vn=class extends Rp(Object){};window.ftReduxStores||(window.ftReduxStores={});var wd=class t extends vn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(hn(a))return a;if(i==null)return;let s=Od({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=vd({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new dn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let u=s,p=a[u];return p?(...m)=>{let h=p(...m.map(i));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[u]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Sn=class{static format(e,o,n,i){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(e,o,n,i)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Rd=g(R()),On=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},iC=(0,Rd.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Sn.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return On([(0,ma.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),On([(0,ma.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),On([ji({store:T.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),On([ji({store:T.name})],e.prototype,"uiLocale",void 0),e});var An=g(R());var Cn=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var En=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=T.getState().session;return!!e?.sessionAuthenticated}};var Tp="ft-user-assets",Lp={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(Ze).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:i}=e.payload;ba(t,o,[...ga(t,o),i]),Td(t,o,1,n),Ld(t,i)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;ba(t,o,ga(t,o).map(i=>i.id===n.id?n:i)),Ld(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:i}=e.payload;ba(t,o,ga(t,o).filter(a=>a.id!==i)),Td(t,o,-1,n)}},Nd={[Ze.SEARCHES]:"savedSearches",[Ze.BOOKMARKS]:"bookmarks",[Ze.BOOKS]:void 0,[Ze.COLLECTIONS]:void 0},ga=(t,e)=>{var o;let n=Nd[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},ba=(t,e,o)=>{let n=Nd[e];n&&(t[n]=o)},Td=(t,e,o,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+o),e===Ze.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+o)}},Ld=(t,e)=>{let o=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},ze=An.FtReduxStore.get({name:Tp,reducers:Lp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ze).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xa=class{constructor(e=new Cn,o=new En){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Jo,this.savedSearchesService=new nn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,An.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ze.actions.clearAssetCount(),ze.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ze.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ze.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ze.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ze.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&ze.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&ze.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(ze.getState().assetCounts.bookmarkByMap).length!==0;e===Ze.BOOKMARKS&&o&&ze.actions.clearBookmarkCountByMap(),ze.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ze.actions.bookmarks(o)}}},va=new xa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=va);(0,Id.customElement)("ft-app-context")(q);var Pd=g(j());var Sa=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},_d=new Sa;var Np=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ip=Symbol("i18nAttributes"),_p=Symbol("i18nListAttributes"),Dd=Symbol("i18nProperties"),wn=Symbol("i18nContexts"),Ro=Symbol("i18nUnsubs"),Jr=(0,Xr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?tn:Ur}i18n(a){let{context:s,key:c,message:u}=a,{custom:p,args:m,argsProvider:h}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(h?h(this):[]);return this.getI18nService(p).resolveMessage(s,c,...b)}return u}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(_d.isI18nKey(a)){let[c,u]=a.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,u)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let u=this,p=(m,h,b)=>b?.context&&b.key&&a(m,h,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[Ip])===null||s===void 0||s.forEach((m,h)=>u[h]=p(m,h,u[h])),(c=this[_p])===null||c===void 0||c.forEach((m,h)=>{var b;return u[h]=(b=u[h])===null||b===void 0?void 0:b.map(S=>p(m,h,S))})}updateI18nProperties(a){var s;(s=this[Dd])===null||s===void 0||s.forEach((c,u)=>{a(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let u=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[wn].set(u,{isCustomContext:c}),this[Ro].has(u)||this[Ro].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(a){return this[wn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[wn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ro].forEach(a=>a()),this[Ro].clear()}}return e=wn,o=Ro,Np([(0,Pd.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),kd=class extends Jr(Xr.FtLitElement){},Rn=class extends Jr(Xr.FtLitElementRedux){};var To=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ot=class extends Rn{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Tn.nothing:Tn.html`
1520
1520
  <span class="ft-i18n">
1521
1521
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1522
1522
  </span>
@@ -1258,7 +1258,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1258
1258
  unbounded>
1259
1259
  </ft-ripple>
1260
1260
  <div class="ft-checkbox--box" part="checkbox-box">
1261
- <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check">
1261
+ <svg class="ft-checkbox--checkmark" viewBox="0 0 24 24" part="checkbox-check" aria-hidden="true">
1262
1262
  <path class="ft-checkbox--checkmark-path" fill="none"
1263
1263
  d=${this.indeterminate&&!this.checked?"M2,12 22,12":"M1.73,12.91 8.1,19.28 22.79,4.59"}></path>
1264
1264
  </svg>
@@ -1596,7 +1596,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
1596
1596
  `;var Qd=N`
1597
1597
  `;var rh="ft-app-info",br=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};br.eventName="authentication-change";var oh={session:(t,e)=>{Le(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new br(e.payload)),0))}},P=Lt.get({name:rh,reducers:oh,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var xr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=P.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=P.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var ni=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xr.await()}};var Te=class extends ni{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new st,this.cache=e?i.commonCache:new st}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ii=class extends Te{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ts=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ts;var Xd,ao=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},nh=Symbol("clearAfterUnitTest"),ai=class extends cn(Te){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Xd]=()=>{this.defaultMessages={},this.cache=new st,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};Le(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Lo((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(i){!(i instanceof at)&&r&&console.error(i)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new ao({loadedContexts:e})),this.dispatchEvent(new ao({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ao({loadedContexts:[e]})),this.dispatchEvent(new ao({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>sn(0).then(()=>n()).catch(()=>null)))}};Xd=nh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ai{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ai{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var so=window.FluidTopicsI18nService,si=window.FluidTopicsCustomI18nService;var Ls=class{highlightHtml(e,r,n){Pa(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Ls;var li=class extends Te{async listMySearches(){let{session:e}=P.getState();return rd(e,he.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var _s=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return hr.format(e,(n=r?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new _s;var Ho=class{static get(e,r){var n,i;let a=P.getState(),{lang:s,region:l}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Gr(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var ci=class extends Te{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}sortEventArrays(e){let r=Object.entries(e).map(([n,i])=>Array.isArray(i)?[n,i.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof i=="object"&&i!==null?[n,this.sortEventArrays(i)]:[n,i]);return Object.fromEntries(r)}sendEvents(e,r){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(i=>(console.info(r),console.debug(i),n)),1e3)}};var Ns=class{urlToSearchRequest(e){return Ho.get().parse(e)}searchRequestToUrl(e){return Ho.get().serialize(e)}};window.FluidTopicsUrlService=new Ns;var vr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};vr.eventName="change";var Is=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Jd=new Is;var di=class t extends St{static build(){return new t(window.history,Jd,()=>window.location,!1)}constructor(e,r,n,i){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Le(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new vr(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(i,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(vr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(vr.eventName,e)}currentItem(){return vo(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return vo(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return vo(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=di.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var ep=P;function tp(t,e){var r;return ep.getState().authenticationRequired&&!(!((r=ep.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(e):t()}var me=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},ie=class extends U{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>xr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new st,this.cleanSessionDebouncer=new ne,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return M`
1598
1598
  <slot></slot>
1599
- `}connectedCallback(){super.connectedCallback(),P.addEventListener(br.eventName,this.reloadConfiguration)}disconnectedCallback(){P.addEventListener(br.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,n,i,a,s,l,d;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&P.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>so.addContext(u)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&P.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&P.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>tp(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ie.elementDefinitions={};ie.styles=Qd;me([b()],ie.prototype,"baseUrl",void 0);me([b()],ie.prototype,"apiIntegrationIdentifier",void 0);me([b()],ie.prototype,"apiIntegrationAppVersion",void 0);me([b()],ie.prototype,"uiLocale",void 0);me([pe(null)],ie.prototype,"availableUiLocales",void 0);me([pe(null)],ie.prototype,"metadataConfiguration",void 0);me([b({type:Boolean})],ie.prototype,"editorMode",void 0);me([b({type:Boolean})],ie.prototype,"noCustom",void 0);me([b({type:Boolean})],ie.prototype,"openExternalDocumentInNewTab",void 0);me([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ie.prototype,"noCustomComponent",void 0);me([b({type:Boolean})],ie.prototype,"withManualResources",void 0);me([b({type:Boolean})],ie.prototype,"navigatorOnline",void 0);me([b({type:Boolean})],ie.prototype,"forcedOffline",void 0);me([b({type:Object})],ie.prototype,"apiProvider",void 0);me([b({type:Boolean})],ie.prototype,"authenticationRequired",void 0);me([pe([])],ie.prototype,"messageContexts",void 0);me([pe(void 0)],ie.prototype,"session",void 0);me([z()],ie.prototype,"localesConfiguration",void 0);me([z()],ie.prototype,"availableContentLocales",void 0);var pi=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},bT=fe(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(l=>l.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?l=>hr.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pi([_e({store:P.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),pi([_e({store:P.name})],e.prototype,"uiLocale",void 0),e});var ui=class extends Te{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var fi=class extends Te{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var ih="ft-user-assets",ah={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(Ve).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;ks(t,r,[...Ps(t,r),i]),rp(t,r,1,n),op(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;ks(t,r,Ps(t,r).map(i=>i.id===n.id?n:i)),op(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;ks(t,r,Ps(t,r).filter(a=>a.id!==i)),rp(t,r,-1,n)}},np={[Ve.SEARCHES]:"savedSearches",[Ve.BOOKMARKS]:"bookmarks",[Ve.BOOKS]:void 0,[Ve.COLLECTIONS]:void 0},Ps=(t,e)=>{var r;let n=np[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},ks=(t,e,r)=>{let n=np[e];n&&(t[n]=r)},rp=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===Ve.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+r)}},op=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},Ue=Lt.get({name:ih,reducers:ah,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ve).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ds=class{constructor(e=new ui,r=new fi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ii,this.savedSearchesService=new li,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();Le((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ue.actions.clearAssetCount(),Ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ue.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ue.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ue.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ue.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ue.getState().assetCounts.bookmarkByMap).length!==0;e===Ve.BOOKMARKS&&r&&Ue.actions.clearBookmarkCountByMap(),Ue.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ue.actions.bookmarks(r)}}},Ms=new Ds;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ms);G("ft-app-context")(ie);var $s=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},ip=new $s;var sh=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},lh=Symbol("i18nAttributes"),ch=Symbol("i18nListAttributes"),sp=Symbol("i18nProperties"),hi=Symbol("i18nContexts"),Wo=Symbol("i18nUnsubs"),lo=fe(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?si:so}i18n(a){let{context:s,key:l,message:d}=a,{custom:u,args:h,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=h??(f?f(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(ip.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(h,f,y)=>y?.context&&y.key&&a(h,f,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[lh])===null||s===void 0||s.forEach((h,f)=>d[f]=u(h,f,d[f])),(l=this[ch])===null||l===void 0||l.forEach((h,f)=>{var y;return d[f]=(y=d[f])===null||y===void 0?void 0:y.map(v=>u(h,f,v))})}updateI18nProperties(a){var s;(s=this[sp])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[hi].set(d,{isCustomContext:l}),this[Wo].has(d)||this[Wo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[hi].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[hi].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wo].forEach(a=>a()),this[Wo].clear()}}return e=hi,r=Wo,sh([b({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ap=class extends lo(U){},yi=class extends lo(Rt){};var Vo=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},tt=class extends yi{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":j:M`
1599
+ `}connectedCallback(){super.connectedCallback(),P.addEventListener(br.eventName,this.reloadConfiguration)}disconnectedCallback(){P.addEventListener(br.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,n,i,a,s,l,d;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&P.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>so.addContext(u)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&P.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&P.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>tp(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ie.elementDefinitions={};ie.styles=Qd;me([b()],ie.prototype,"baseUrl",void 0);me([b()],ie.prototype,"apiIntegrationIdentifier",void 0);me([b()],ie.prototype,"apiIntegrationAppVersion",void 0);me([b()],ie.prototype,"uiLocale",void 0);me([pe(null)],ie.prototype,"availableUiLocales",void 0);me([pe(null)],ie.prototype,"metadataConfiguration",void 0);me([b({type:Boolean})],ie.prototype,"editorMode",void 0);me([b({type:Boolean})],ie.prototype,"noCustom",void 0);me([b({type:Boolean})],ie.prototype,"openExternalDocumentInNewTab",void 0);me([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ie.prototype,"noCustomComponent",void 0);me([b({type:Boolean})],ie.prototype,"withManualResources",void 0);me([b({type:Boolean})],ie.prototype,"navigatorOnline",void 0);me([b({type:Boolean})],ie.prototype,"forcedOffline",void 0);me([b({type:Object})],ie.prototype,"apiProvider",void 0);me([b({type:Boolean})],ie.prototype,"authenticationRequired",void 0);me([pe([])],ie.prototype,"messageContexts",void 0);me([pe(void 0)],ie.prototype,"session",void 0);me([z()],ie.prototype,"localesConfiguration",void 0);me([z()],ie.prototype,"availableContentLocales",void 0);var pi=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},bT=fe(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(l=>l.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?l=>hr.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pi([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pi([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pi([_e({store:P.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),pi([_e({store:P.name})],e.prototype,"uiLocale",void 0),e});var ui=class extends Te{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var fi=class extends Te{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var ih="ft-user-assets",ah={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(Ve).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:i}=e.payload;ks(t,r,[...Ps(t,r),i]),rp(t,r,1,n),op(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;ks(t,r,Ps(t,r).map(i=>i.id===n.id?n:i)),op(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;ks(t,r,Ps(t,r).filter(a=>a.id!==i)),rp(t,r,-1,n)}},np={[Ve.SEARCHES]:"savedSearches",[Ve.BOOKMARKS]:"bookmarks",[Ve.BOOKS]:void 0,[Ve.COLLECTIONS]:void 0},Ps=(t,e)=>{var r;let n=np[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},ks=(t,e,r)=>{let n=np[e];n&&(t[n]=r)},rp=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===Ve.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+r)}},op=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},Ue=Lt.get({name:ih,reducers:ah,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ve).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ds=class{constructor(e=new ui,r=new fi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ii,this.savedSearchesService=new li,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();Le((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ue.actions.clearAssetCount(),Ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ue.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ue.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ue.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ue.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ue.getState().assetCounts.bookmarkByMap).length!==0;e===Ve.BOOKMARKS&&r&&Ue.actions.clearBookmarkCountByMap(),Ue.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ue.actions.bookmarks(r)}}},Ms=new Ds;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ms);G("ft-app-context")(ie);var $s=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},ip=new $s;var sh=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},lh=Symbol("i18nAttributes"),ch=Symbol("i18nListAttributes"),sp=Symbol("i18nProperties"),hi=Symbol("i18nContexts"),Wo=Symbol("i18nUnsubs"),lo=fe(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?si:so}i18n(a){let{context:s,key:l,message:d}=a,{custom:u,args:h,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=h??(f?f(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(ip.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(h,f,y)=>y?.context&&y.key&&a(h,f,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[lh])===null||s===void 0||s.forEach((h,f)=>d[f]=u(h,f,d[f])),(l=this[ch])===null||l===void 0||l.forEach((h,f)=>{var y;return d[f]=(y=d[f])===null||y===void 0?void 0:y.map(v=>u(h,f,v))})}updateI18nProperties(a){var s;(s=this[sp])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[hi].set(d,{isCustomContext:l}),this[Wo].has(d)||this[Wo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[hi].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[hi].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wo].forEach(a=>a()),this[Wo].clear()}}return e=hi,r=Wo,sh([b({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ap=class extends lo(U){},yi=class extends lo(Rt){};var Vo=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},tt=class extends yi{constructor(){super(),this.editorMode=!1,this.addStore(P)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":j:M`
1600
1600
  <span class="ft-i18n">
1601
1601
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1602
1602
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-type",
3
- "version": "1.3.46",
3
+ "version": "1.3.47",
4
4
  "description": "Search",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-wc-utils": "1.3.46",
22
+ "@fluid-topics/ft-wc-utils": "1.3.47",
23
23
  "lit": "3.1.0"
24
24
  },
25
- "gitHead": "d6cf25d6ed0dead8c7aff4f94a493c35d12f1392"
25
+ "gitHead": "16ac56d62f3a88a3b03cbc92bcd04dd91951a015"
26
26
  }