@fluid-topics/ft-search-sort-selector 1.3.31 → 1.3.33
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.
|
@@ -715,7 +715,7 @@ Also for action icons.`,i.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
|
|
|
715
715
|
`;var Pt=b(I());var Os=b(I());var Ii=b(K()),re=b(oe()),Se=b(I());var Ga=b(K());var ja=Ga.css`
|
|
716
716
|
`;var dr=b(I()),Ys="ft-app-info",nt=class t extends CustomEvent{constructor(r){super(t.eventName,{detail:r})}};nt.eventName="authentication-change";var Xs={session:(t,r)=>{(0,dr.deepEqual)(t.session,r.payload)||(t.session=r.payload,setTimeout(()=>E.dispatchEvent(new nt(r.payload)),0))}},E=dr.FtReduxStore.get({name:Ys,reducers:Xs,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 mo=b(I());var at=class t{static get(r){let{baseUrl:o,apiIntegrationIdentifier:n}=E.getState(),a=r??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(r){return new Promise(o=>{let n=t.get(r);if(n)o(n);else{let a=E.subscribe(()=>{n=t.get(r),n&&(a(),o(n))})}})}};var ur=class{constructor(r){this.overrideApi=r}get api(){var r;return(r=this.overrideApi)!==null&&r!==void 0?r:at.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):at.await()}};var le=class extends ur{constructor(r=!0,o){var n;super(o),this.sortObjectFields=(s,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new mo.CacheRegistry,this.cache=r?a.commonCache:new mo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(r){return String(Array.from(JSON.stringify(r,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var pr=class extends le{async listMyBookmarks(){let r=E.getState().session;return r?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(r.profile.userId),5*60*1e3):[]}};var bo=class{addCommand(r,o=!1){E.commands.add(r,o)}consumeCommand(r){return E.commands.consume(r)}};window.FluidTopicsAppInfoStoreService=new bo;var he=b(I());var Ka,Et=class extends CustomEvent{constructor(r){super("ft-i18n-context-loaded",{detail:r})}},Qs=Symbol("clearAfterUnitTest"),fr=class extends(0,he.withEventBus)(le){constructor(r){super(),this.messageContextProvider=r,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ka]=()=>{this.defaultMessages={},this.cache=new he.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:r}=E.getState();this.currentUiLocale!==r&&(this.currentUiLocale=r,this.cache.clearAll(),this.notifyAll())}addContext(r){let o=r.name.toLowerCase();this.cache.setFinal(o,r),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(r,o){var n;if(r=r.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[r])!==null&&n!==void 0?n:{},...o};(0,he.deepEqual)(this.defaultMessages[r],a)||(this.defaultMessages[r]=a,await this.notify(r))}return this.fetchContext(r)}resolveContext(r){var o,n;return this.fetchContext(r),(n=(o=this.cache.getNow(r))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(r,o){let n=r.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(r,o,...n){var a;let s=r.toLowerCase(),l=this.resolveContext(s);return new he.ParametrizedLabelResolver((a=this.defaultMessages[s])!==null&&a!==void 0?a:{},l).resolve(o,...n)}async fetchContext(r){let o=!this.cache.has(r),n;try{n=await this.cache.get(r,()=>this.messageContextProvider(this.currentUiLocale,r)),o&&await this.notify(r)}catch(a){!(a instanceof he.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(r,o){var n;return r=r.toLowerCase(),this.listeners[r]=(n=this.listeners[r])!==null&&n!==void 0?n:new Set,this.listeners[r].add(o),()=>{var a;return(a=this.listeners[r])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let r=Object.keys(this.listeners);document.body.dispatchEvent(new Et({loadedContexts:r})),this.dispatchEvent(new Et({loadedContexts:r})),await Promise.all(r.map(o=>this.notify(o,!1)))}async notify(r,o=!0){o&&(document.body.dispatchEvent(new Et({loadedContexts:[r]})),this.dispatchEvent(new Et({loadedContexts:[r]}))),this.listeners[r]!=null&&await Promise.all([...this.listeners[r].values()].map(n=>(0,he.delay)(0).then(()=>n()).catch(()=>null)))}};Ka=Qs;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fr{constructor(){super(async(t,r)=>(await this.awaitApi).getFluidTopicsMessageContext(t,r))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fr{constructor(){super(async(t,r)=>(await this.awaitApi).getCustomMessageContext(t,r))}});var At=window.FluidTopicsI18nService,hr=window.FluidTopicsCustomI18nService;var Va=b(I()),xo=class{highlightHtml(r,o,n){(0,Va.highlightHtml)(r,o,n)}};window.FluidTopicsHighlightHtmlService=new xo;var el=b(qa(),1);var Ya;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ya||(Ya={}));var Xa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Xa||(Xa={}));var Qa;(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"})(Qa||(Qa={}));var Ja;(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"})(Ja||(Ja={}));var ei;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ei||(ei={}));var ti;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(ti||(ti={}));var ri;(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.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",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"})(ri||(ri={}));var oi;(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"})(oi||(oi={}));var ni;(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"})(ni||(ni={}));var ai;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ai||(ai={}));var ii;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(ii||(ii={}));var si;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(si||(si={}));var li;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(li||(li={}));var ci;(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"})(ci||(ci={}));var di;(function(t){t.ASC="ASC",t.DESC="DESC"})(di||(di={}));var ui;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(ui||(ui={}));var vo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(vo||(vo={}));var pi;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(pi||(pi={}));var fi;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(fi||(fi={}));var hi;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(hi||(hi={}));var yi;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yi||(yi={}));var gi;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(gi||(gi={}));var So;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(So||(So={}));var mi;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(mi||(mi={}));var Y;(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"})(Y||(Y={}));var de;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(de||(de={}));var bi;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(bi||(bi={}));var xi;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(xi||(xi={}));var vi;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(vi||(vi={}));var Si;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Si||(Si={}));var Js={[Y.PERSONAL_BOOK_SHARE_USER]:[Y.PERSONAL_BOOK_USER],[Y.HTML_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.PDF_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.KHUB_ADMIN]:[Y.CONTENT_PUBLISHER],[Y.ADMIN]:[Y.KHUB_ADMIN,Y.USERS_ADMIN,Y.PORTAL_ADMIN],[Y.GENERATIVE_AI_EXPORT_USER]:[Y.GENERATIVE_AI_USER]};function Oi(t,r){return t===r||(Js[t]??[]).some(o=>Oi(o,r))}function Ci(t,r){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Oi(n,r))}var mr=class extends le{async listMySearches(){let{session:r}=E.getState();return Ci(r,Y.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(r.profile.userId),5*60*1e3):[]}};var Ei=b(I());var Oo=class{isDate(r){var o,n,a,s;return(s=(a=((n=(o=E.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===r))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1}format(r,o){var n,a,s;return Ei.DateFormatter.format(r,(n=o?.locale)!==null&&n!==void 0?n:E.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}};window.FluidTopicsDateService=new Oo;var Ai=b(I());var Wt=class{static get(r,o){var n,a;let s=E.getState(),{lang:l,region:d}=(a=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ai.SearchPlaceConverter(s.baseUrl,r??20,s.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var Co=class{urlToSearchRequest(r){return Wt.get().parse(r)}searchRequestToUrl(r){return Wt.get().serialize(r)}};window.FluidTopicsUrlService=new Co;var ze=b(I());var it=class t extends CustomEvent{constructor(r){super(t.eventName,{detail:{currentItem:r}})}};it.eventName="change";var Eo=class{itemName(r){return`fluid-topics-history-item-${r}`}get(r){let o=sessionStorage.getItem(this.itemName(r));return o?JSON.parse(o):void 0}set(r,o){sessionStorage.setItem(this.itemName(r),JSON.stringify(o))}},wi=new Eo;var br=class t extends ze.WithEventBus{static build(){return new t(window.history,wi,()=>window.location,!1)}constructor(r,o,n,a){var s,l;super(),this.history=r,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=r.pushState,this.realReplaceState=r.replaceState,this.initialIndex=(l=(s=r.state)===null||s===void 0?void 0:s.index)!==null&&l!==void 0?l:r.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(r,o=!1){let n=o&&this.currentIndex===r.index-1;this.currentState={...this.buildCurrentState(),...r},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,ze.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new it(this.currentItem())),0)}installProxies(){let r=o=>(n,a,[s,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(a,[p,l,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:r(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:r(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",r=>this.setCurrentState(r.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(r){for(let o=this.history.length-1;o>=0;o--)r?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(r){var o;let n={...this.buildCurrentState(),...r,index:this.currentIndex,title:(o=r?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(r){this.addEventListener(it.eventName,r)}removeHistoryChangeListener(r){this.removeEventListener(it.eventName,r)}currentItem(){return(0,ze.deepCopy)(this.currentState)}back(){let r=this.previousDifferentMajorPosition();r>=0?this.history.go(r-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ze.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let r=this.currentIndex>0?this.currentIndex-1:0;for(;r>0&&!this.isDifferentMajorState(r);)r--;return r}forward(){let r=this.nextMajorPosition();r&&r<this.states.length?this.history.go(r-this.currentIndex):this.history.forward()}forwardItem(){let r=this.nextMajorPosition();if(r)return(0,ze.deepCopy)(this.states[r])}nextMajorPosition(){let r=this.currentIndex;if(!(r>=this.states.length)){do r++;while(r<this.states.length&&!this.isDifferentMajorState(r));return this.getHigherPositionInTheSameState(r)}}getHigherPositionInTheSameState(r){var o;let n=(o=this.states[r])===null||o===void 0?void 0:o.majorStateId;if(!n)return r;let a=r,s=r+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(a=s),s++;return a}buildCurrentState(){var r,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(r=this.history.state)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:document.title}}hasState(r){return this.states[r]!=null}isDifferentMajorState(r,o){var n;if(!this.hasState(r))return!1;let a=o??this.currentState.majorStateId,s=(n=this.states[r])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=br.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 Ri=E;function Ni(t,r){var o;return Ri.getState().authenticationRequired&&!(!((o=Ri.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(r):t()}var X=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},z=class extends Se.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=()=>at.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Se.CacheRegistry,this.cleanSessionDebouncer=new Se.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Ii.html`
|
|
717
717
|
<slot></slot>
|
|
718
|
-
`}connectedCallback(){super.connectedCallback(),E.addEventListener(nt.eventName,this.reloadConfiguration)}disconnectedCallback(){E.addEventListener(nt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(r){var o,n,a,s,l,d,u;super.update(r),r.has("baseUrl")&&(E.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&E.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("apiIntegrationAppVersion")&&E.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),r.has("uiLocale")&&E.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&E.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&E.actions.noCustom(this.noCustom),r.has("editorMode")&&E.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&E.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&E.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>At.addContext(p)),r.has("openExternalDocumentInNewTab")&&E.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&E.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&E.actions.forcedOffline(this.forcedOffline),r.has("localesConfiguration")&&(E.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),E.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),E.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),r.has("authenticationRequired")&&E.actions.authenticationRequired(this.authenticationRequired),r.has("availableContentLocales")&&E.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.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 r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}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",()=>Ni(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};z.elementDefinitions={};z.styles=ja;X([(0,re.property)()],z.prototype,"baseUrl",void 0);X([(0,re.property)()],z.prototype,"apiIntegrationIdentifier",void 0);X([(0,re.property)()],z.prototype,"apiIntegrationAppVersion",void 0);X([(0,re.property)()],z.prototype,"uiLocale",void 0);X([(0,Se.jsonProperty)(null)],z.prototype,"availableUiLocales",void 0);X([(0,Se.jsonProperty)(null)],z.prototype,"metadataConfiguration",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"editorMode",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"noCustom",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);X([(0,re.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomComponent",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"withManualResources",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"navigatorOnline",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"forcedOffline",void 0);X([(0,re.property)({type:Object})],z.prototype,"apiProvider",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"authenticationRequired",void 0);X([(0,Se.jsonProperty)([])],z.prototype,"messageContexts",void 0);X([(0,Se.jsonProperty)(void 0)],z.prototype,"session",void 0);X([(0,re.state)()],z.prototype,"localesConfiguration",void 0);X([(0,re.state)()],z.prototype,"availableContentLocales",void 0);var qo=b(oe());function tl(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;let o,n,a;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!xr(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!xr(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(a=s(t),o=a.length,o!==s(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){let l=a[n];if(!xr(t[l],r[l]))return!1}return!0}return t!==t&&r!==r||t==null&&r==null}function xr(t,r){try{return tl(t,r)}catch{return!1}}function $t(t,r){return!xr(t,r)}function vr(t,r){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=r(n);return a[t]=!0,a}}var _i=b(oe(),1);var Ao=t=>{let r=t??{};return(o,n)=>{var a;let s={hasChanged:$t,attribute:!1,...r};(0,_i.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(a=r.selector)!==null&&a!==void 0?a:d=>d[n],store:r.store})}};var Sr=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var Rt=b(oe(),1);var Ti=b(oe(),1);function Li(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Ti.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:$t,...r??{}})}var Or=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ki=b(K(),1);var Cr=globalThis,rl=Cr.ShadowRoot&&(Cr.ShadyCSS===void 0||Cr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ug=Symbol();var Pi=(t,r)=>{if(rl)t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),a=Cr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var Er=class extends ki.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,s])=>r.registry.define(a,s)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Pi(n,r.elementStyles),n}};function Di(t,r,...o){var n;let a=t.querySelector(r);for(let s of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var Gt=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},Fi,Ui=Symbol("constructorPrototype"),Mi=Symbol("constructorName"),Hi=Symbol("exportpartsDebouncer"),Bi=Symbol("dynamicDependenciesLoaded"),Le=class extends Er{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Fi]=new Or(5),this[Mi]=this.constructor.name,this[Ui]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Mi]&&Object.setPrototypeOf(this,this[Ui])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[Bi]||(r[Bi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];o=Di(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(r.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Hi].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(r){var o,n,a,s,l,d;let u=g=>g!=null&&g.trim().length>0,p=r.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let O=(s=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&s!==void 0?s:[],x=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(C=>C.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...O,...x).filter(u).map(C=>C.trim()).forEach(C=>h.add(C))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(O=>`${g}:${O}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Fi=Hi;Gt([(0,Rt.property)()],Le.prototype,"exportpartsPrefix",void 0);Gt([Li([])],Le.prototype,"exportpartsPrefixes",void 0);Gt([(0,Rt.property)()],Le.prototype,"customStylesheet",void 0);Gt([(0,Rt.property)()],Le.prototype,"elementToFocus",void 0);Gt([(0,Rt.state)()],Le.prototype,"useAdoptedStyleSheets",void 0);function Ar(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var jt=Symbol("internalReduxEventsUnsubscribers"),We=Symbol("internalStoresUnsubscribers"),st=Symbol("internalStores"),ol=vr(Symbol("withRedux"),function(t){var r,o,n;class a extends t{constructor(){super(...arguments),this[r]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[st].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[st].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[st].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[st].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[st].delete(d)}setupStores(){this.unsubscribeFromStores(),this[st].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[We].has(l.store):this[We].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[We].set(l,d.subscribe(()=>this.updateFromStores())),this[jt].set(l,[]),Ar(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=g=>this[h](g);d.addEventListener(p.eventName,y),this[jt].get(l).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[We].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[We].has(l)&&this[We].get(l)(),this[We].delete(l),(d=this[jt].get(l))===null||d===void 0||d.forEach(u=>u()),this[jt].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return r=We,o=st,n=jt,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zi=class extends ol(Le){};function ye(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,s;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Pe(t){return!!t&&!!t[$]}function Oe(t){var r;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ul}(t)||Array.isArray(t)||!!t[Zi]||!!(!((r=t.constructor)===null||r===void 0)&&r[Zi])||ko(t)||Do(t))}function lt(t,r,o){o===void 0&&(o=!1),_t(t)===0?(o?Object.keys:It)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,a){return r(a,n,t)})}function _t(t){var r=t[$];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:ko(t)?2:Do(t)?3:0}function Nt(t,r){return _t(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function nl(t,r){return _t(t)===2?t.get(r):t[r]}function qi(t,r,o){var n=_t(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function Yi(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function ko(t){return cl&&t instanceof Map}function Do(t){return dl&&t instanceof Set}function $e(t){return t.o||t.t}function Uo(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=Ji(t);delete r[$];for(var o=It(r),n=0;n<o.length;n++){var a=o[n],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),r)}function Mo(t,r){return r===void 0&&(r=!1),Bo(t)||Pe(t)||!Oe(t)||(_t(t)>1&&(t.set=t.add=t.clear=t.delete=al),Object.freeze(t),r&<(t,function(o,n){return Mo(n,!0)},!0)),t}function al(){ye(2)}function Bo(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function we(t){var r=Po[t];return r||ye(18,t),r}function il(t,r){Po[t]||(Po[t]=r)}function _o(){return Vt}function wo(t,r){r&&(we("Patches"),t.u=[],t.s=[],t.v=r)}function wr(t){To(t),t.p.forEach(sl),t.p=null}function To(t){t===Vt&&(Vt=t.l)}function Wi(t){return Vt={p:[],l:Vt,h:t,m:!0,_:0}}function sl(t){var r=t[$];r.i===0||r.i===1?r.j():r.g=!0}function Ro(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||we("ES5").S(r,t,n),n?(o[$].P&&(wr(r),ye(4)),Oe(t)&&(t=Rr(r,t),r.l||Nr(r,t)),r.u&&we("Patches").M(o[$].t,t,r.u,r.s)):t=Rr(r,o,[]),wr(r),r.u&&r.v(r.u,r.s),t!==Qi?t:void 0}function Rr(t,r,o){if(Bo(r))return r;var n=r[$];if(!n)return lt(r,function(d,u){return $i(t,n,r,d,u,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Nr(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Uo(n.k):n.o,s=a,l=!1;n.i===3&&(s=new Set(a),a.clear(),l=!0),lt(s,function(d,u){return $i(t,n,a,d,u,o,l)}),Nr(t,a,!1),o&&t.u&&we("Patches").N(n,o,t.u,t.s)}return n.o}function $i(t,r,o,n,a,s,l){if(Pe(a)){var d=Rr(t,a,s&&r&&r.i!==3&&!Nt(r.R,n)?s.concat(n):void 0);if(qi(o,n,d),!Pe(d))return;t.m=!1}else l&&o.add(a);if(Oe(a)&&!Bo(a)){if(!t.h.D&&t._<1)return;Rr(t,a),r&&r.A.l||Nr(t,a)}}function Nr(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Mo(r,o)}function No(t,r){var o=t[$];return(o?$e(o):t)[r]}function Gi(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function Ge(t){t.P||(t.P=!0,t.l&&Ge(t.l))}function Io(t){t.o||(t.o=Uo(t.t))}function Lo(t,r,o){var n=ko(r)?we("MapSet").F(r,o):Do(r)?we("MapSet").T(r,o):t.O?function(a,s){var l=Array.isArray(a),d={i:l?1:0,A:s?s.A:_o(),P:!1,I:!1,R:{},l:s,t:a,k:null,o:null,j:null,C:!1},u=d,p=Zt;l&&(u=[d],p=Kt);var h=Proxy.revocable(u,p),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g}(r,o):we("ES5").J(r,o);return(o?o.A:_o()).p.push(n),n}function ll(t){return Pe(t)||ye(22,t),function r(o){if(!Oe(o))return o;var n,a=o[$],s=_t(o);if(a){if(!a.P&&(a.i<4||!we("ES5").K(a)))return a.t;a.I=!0,n=ji(o,s),a.I=!1}else n=ji(o,s);return lt(n,function(l,d){a&&nl(a.t,l)===d||qi(n,l,r(d))}),s===3?new Set(n):n}(t)}function ji(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return Uo(t)}function Xi(){function t(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[$];return Zt.get(p,l)},set:function(p){var h=this[$];Zt.set(h,l,p)}},u}function r(l){for(var d=l.length-1;d>=0;d--){var u=l[d][$];if(!u.P)switch(u.i){case 5:n(u)&&Ge(u);break;case 4:o(u)&&Ge(u)}}}function o(l){for(var d=l.t,u=l.k,p=It(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==$){var g=d[y];if(g===void 0&&!Nt(d,y))return!0;var O=u[y],x=O&&O[$];if(x?x.t!==g:!Yi(O,g))return!0}}var C=!!d[$];return p.length!==It(d).length+(C?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function a(l){l.g&&ye(3,JSON.stringify($e(l)))}var s={};il("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(y,g){if(y){for(var O=Array(g.length),x=0;x<g.length;x++)Object.defineProperty(O,""+x,t(x,!0));return O}var C=Ji(g);delete C[$];for(var k=It(C),_=0;_<k.length;_++){var T=k[_];C[T]=t(T,y||!!C[T].enumerable)}return Object.create(Object.getPrototypeOf(g),C)}(u,l),h={i:u?5:4,A:d?d.A:_o(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,$,{value:h,writable:!0}),p},S:function(l,d,u){u?Pe(d)&&d[$].A===l&&r(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[$];if(y){var g=y.t,O=y.k,x=y.R,C=y.i;if(C===4)lt(O,function(U){U!==$&&(g[U]!==void 0||Nt(g,U)?x[U]||p(O[U]):(x[U]=!0,Ge(y)))}),lt(g,function(U){O[U]!==void 0||Nt(O,U)||(x[U]=!1,Ge(y))});else if(C===5){if(n(y)&&(Ge(y),x.length=!0),O.length<g.length)for(var k=O.length;k<g.length;k++)x[k]=!1;else for(var _=g.length;_<O.length;_++)x[_]=!0;for(var T=Math.min(O.length,g.length),F=0;F<T;F++)O.hasOwnProperty(F)||(x[F]=!0),x[F]===void 0&&p(O[F])}}}}(l.p[0]),r(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Ki,Vt,Fo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",cl=typeof Map<"u",dl=typeof Set<"u",Vi=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Qi=Fo?Symbol.for("immer-nothing"):((Ki={})["immer-nothing"]=!0,Ki),Zi=Fo?Symbol.for("immer-draftable"):"__$immer_draftable",$=Fo?Symbol.for("immer-state"):"__$immer_state";var ul=""+Object.prototype.constructor,It=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ji=Object.getOwnPropertyDescriptors||function(t){var r={};return It(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},Po={},Zt={get:function(t,r){if(r===$)return t;var o=$e(t);if(!Nt(o,r))return function(a,s,l){var d,u=Gi(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(a.k):void 0}(t,o,r);var n=o[r];return t.I||!Oe(n)?n:n===No(t.t,r)?(Io(t),t.o[r]=Lo(t.A.h,n,t)):n},has:function(t,r){return r in $e(t)},ownKeys:function(t){return Reflect.ownKeys($e(t))},set:function(t,r,o){var n=Gi($e(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=No($e(t),r),s=a?.[$];if(s&&s.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(Yi(o,a)&&(o!==void 0||Nt(t.t,r)))return!0;Io(t),Ge(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return No(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,Io(t),Ge(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=$e(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){ye(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ye(12)}},Kt={};lt(Zt,function(t,r){Kt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),Kt.deleteProperty=function(t,r){return Kt.set.call(this,t,r,void 0)},Kt.set=function(t,r,o){return Zt.set.call(this,t[0],r,o,t[0])};var pl=function(){function t(o){var n=this;this.O=Vi,this.D=!0,this.produce=function(a,s,l){if(typeof a=="function"&&typeof s!="function"){var d=s;s=a;var u=n;return function(C){var k=this;C===void 0&&(C=d);for(var _=arguments.length,T=Array(_>1?_-1:0),F=1;F<_;F++)T[F-1]=arguments[F];return u.produce(C,function(U){var J;return(J=s).call.apply(J,[k,U].concat(T))})}}var p;if(typeof s!="function"&&ye(6),l!==void 0&&typeof l!="function"&&ye(7),Oe(a)){var h=Wi(n),y=Lo(n,a,void 0),g=!0;try{p=s(y),g=!1}finally{g?wr(h):To(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return wo(h,l),Ro(C,h)},function(C){throw wr(h),C}):(wo(h,l),Ro(p,h))}if(!a||typeof a!="object"){if((p=s(a))===void 0&&(p=a),p===Qi&&(p=void 0),n.D&&Mo(p,!0),l){var O=[],x=[];we("Patches").M(a,p,O,x),l(O,x)}return p}ye(21,a)},this.produceWithPatches=function(a,s){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(O){return a.apply(void 0,[O].concat(y))})};var l,d,u=n.produce(a,s,function(p,h){l=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){Oe(o)||ye(8),Pe(o)&&(o=ll(o));var n=Wi(this),a=Lo(this,o,void 0);return a[$].C=!0,To(n),a},r.finishDraft=function(o,n){var a=o&&o[$],s=a.A;return wo(s,n),Ro(void 0,s)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!Vi&&ye(20),this.O=o},r.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var s=n[a];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}a>-1&&(n=n.slice(a+1));var l=we("Patches").$;return Pe(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},t}(),ue=new pl,fl=ue.produce,Xg=ue.produceWithPatches.bind(ue),Qg=ue.setAutoFreeze.bind(ue),Jg=ue.setUseProxies.bind(ue),em=ue.applyPatches.bind(ue),tm=ue.createDraft.bind(ue),rm=ue.finishDraft.bind(ue),Ir=fl;function ct(t){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ct(t)}function es(t,r){if(ct(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ts(t){var r=es(t,"string");return ct(r)=="symbol"?r:r+""}function rs(t,r,o){return(r=ts(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function os(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Ho(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?os(Object(o),!0).forEach(function(n){rs(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):os(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),zo=function(){return Math.random().toString(36).substring(7).split("").join(".")},_r={INIT:"@@redux/INIT"+zo(),REPLACE:"@@redux/REPLACE"+zo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zo()}};function hl(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function Wo(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ae(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ae(1));return o(Wo)(t,r)}if(typeof t!="function")throw new Error(ae(2));var a=t,s=r,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(ae(3));return s}function y(C){if(typeof C!="function")throw new Error(ae(4));if(u)throw new Error(ae(5));var k=!0;return p(),d.push(C),function(){if(k){if(u)throw new Error(ae(6));k=!1,p();var T=d.indexOf(C);d.splice(T,1),l=null}}}function g(C){if(!hl(C))throw new Error(ae(7));if(typeof C.type>"u")throw new Error(ae(8));if(u)throw new Error(ae(9));try{u=!0,s=a(s,C)}finally{u=!1}for(var k=l=d,_=0;_<k.length;_++){var T=k[_];T()}return C}function O(C){if(typeof C!="function")throw new Error(ae(10));a=C,g({type:_r.REPLACE})}function x(){var C,k=y;return C={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(ae(11));function F(){T.next&&T.next(h())}F();var U=k(F);return{unsubscribe:U}}},C[ns]=function(){return this},C}return g({type:_r.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:O},n[ns]=x,n}function yl(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:_r.INIT});if(typeof n>"u")throw new Error(ae(12));if(typeof o(void 0,{type:_r.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function as(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var a=r[n];typeof t[a]=="function"&&(o[a]=t[a])}var s=Object.keys(o),l,d;try{yl(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var g=!1,O={},x=0;x<s.length;x++){var C=s[x],k=o[C],_=p[C],T=k(_,h);if(typeof T>"u"){var F=h&&h.type;throw new Error(ae(14))}O[C]=T,g=g||T!==_}return g=g||s.length!==Object.keys(p).length,g?O:p}}function Tt(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function is(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),s=function(){throw new Error(ae(15))},l={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=r.map(function(u){return u(l)});return s=Tt.apply(void 0,d)(a.dispatch),Ho(Ho({},a),{},{dispatch:s})}}}function ss(t){var r=function(n){var a=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,s,t):l(d)}}};return r}var ls=ss();ls.withExtraArgument=ss;var $o=ls;var fs=function(){var t=function(r,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])},t(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),gl=function(t,r){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(s=p[0]&2?a.return:p[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,p[1])).done)return s;switch(a=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(t,o)}catch(h){p=[6,h],a=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Lt=function(t,r){for(var o=0,n=r.length,a=t.length;o<n;o++,a++)t[a]=r[o];return t},ml=Object.defineProperty,bl=Object.defineProperties,xl=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,vl=Object.prototype.hasOwnProperty,Sl=Object.prototype.propertyIsEnumerable,ds=function(t,r,o){return r in t?ml(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},je=function(t,r){for(var o in r||(r={}))vl.call(r,o)&&ds(t,o,r[o]);if(cs)for(var n=0,a=cs(r);n<a.length;n++){var o=a[n];Sl.call(r,o)&&ds(t,o,r[o])}return t},Go=function(t,r){return bl(t,xl(r))},Ol=function(t,r,o){return new Promise(function(n,a){var s=function(u){try{d(o.next(u))}catch(p){a(p)}},l=function(u){try{d(o.throw(u))}catch(p){a(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(t,r)).next())})};var Cl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tt:Tt.apply(null,arguments)},vm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function El(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Al=function(t){fs(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Lt([void 0],o[0].concat(this)))):new(r.bind.apply(r,Lt([void 0],o.concat(this))))},r}(Array),wl=function(t){fs(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Lt([void 0],o[0].concat(this)))):new(r.bind.apply(r,Lt([void 0],o.concat(this))))},r}(Array);function Vo(t){return Oe(t)?Ir(t,function(){}):t}function Rl(t){return typeof t=="boolean"}function Nl(){return function(r){return Il(r)}}function Il(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,a=n===void 0?!0:n,s=t.serializableCheck,l=s===void 0?!0:s,d=new Al;if(o&&(Rl(o)?d.push($o):d.push($o.withExtraArgument(o.extraArgument))),0){if(a)var u;if(l)var p}return d}var jo=!0;function hs(t){var r=Nl(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,s=o.middleware,l=s===void 0?r():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,O;if(typeof a=="function")O=a;else if(El(a))O=as(a);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 x=l;if(typeof x=="function"&&(x=x(r),!jo&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!jo&&x.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=is.apply(void 0,x),k=Tt;u&&(k=Cl(je({trace:!jo},typeof u=="object"&&u)));var _=new wl(C),T=_;Array.isArray(g)?T=Lt([C],g):typeof g=="function"&&(T=g(_));var F=k.apply(void 0,T);return Wo(O,h,F)}function Ke(t,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var s=r.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return je(je({type:t,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.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 ys(t){var r={},o=[],n,a={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=l,a},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),a},addDefaultCase:function(s){return n=s,a}};return t(a),[r,o,n]}function _l(t){return typeof t=="function"}function Tl(t,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?ys(r):[r,o,n],s=a[0],l=a[1],d=a[2],u;if(_l(t))u=function(){return Vo(t())};else{var p=Vo(t);u=function(){return p}}function h(y,g){y===void 0&&(y=u());var O=Lt([s[g.type]],l.filter(function(x){var C=x.matcher;return C(g)}).map(function(x){var C=x.reducer;return C}));return O.filter(function(x){return!!x}).length===0&&(O=[d]),O.reduce(function(x,C){if(C)if(Pe(x)){var k=x,_=C(k,g);return _===void 0?x:_}else{if(Oe(x))return Ir(x,function(T){return C(T,g)});var _=C(x,g);if(_===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return x},y)}return h.getInitialState=u,h}function Ll(t,r){return t+"/"+r}function gs(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Vo(t.initialState),n=t.reducers||{},a=Object.keys(n),s={},l={},d={};a.forEach(function(h){var y=n[h],g=Ll(r,h),O,x;"reducer"in y?(O=y.reducer,x=y.prepare):O=y,s[h]=O,l[g]=O,d[h]=x?Ke(g,x):Ke(g)});function u(){var h=typeof t.extraReducers=="function"?ys(t.extraReducers):[t.extraReducers],y=h[0],g=y===void 0?{}:y,O=h[1],x=O===void 0?[]:O,C=h[2],k=C===void 0?void 0:C,_=je(je({},g),l);return Tl(o,function(T){for(var F in _)T.addCase(F,_[F]);for(var U=0,J=x;U<J.length;U++){var ge=J[U];T.addMatcher(ge.matcher,ge.reducer)}k&&T.addDefaultCase(k)})}var p;return{name:r,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Pl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",kl=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Pl[Math.random()*64|0];return r},Dl=["name","message","stack","code"],Ko=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),us=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),Ul=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Dl;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(r[a]=t[a])}return r}return{message:String(t)}},Em=function(){function t(r,o,n){var a=Ke(r+"/fulfilled",function(h,y,g,O){return{payload:h,meta:Go(je({},O||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=Ke(r+"/pending",function(h,y,g){return{payload:void 0,meta:Go(je({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=Ke(r+"/rejected",function(h,y,g,O,x){return{payload:O,error:(n&&n.serializeError||Ul)(h||"Rejected"),meta:Go(je({},x||{}),{arg:g,requestId:y,rejectedWithValue:!!O,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,O){var x=n?.idGenerator?n.idGenerator(h):kl(),C=new u,k,_=!1;function T(U){k=U,C.abort()}var F=function(){return Ol(this,null,function(){var U,J,ge,Ve,ie,Ze,ut;return gl(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ve=(U=n?.condition)==null?void 0:U.call(n,h,{getState:g,extra:O}),Bl(Ve)?[4,Ve]:[3,2];case 1:Ve=f.sent(),f.label=2;case 2:if(Ve===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,ie=new Promise(function(m,w){return C.signal.addEventListener("abort",function(){return w({name:"AbortError",message:k||"Aborted"})})}),y(s(x,h,(J=n?.getPendingMeta)==null?void 0:J.call(n,{requestId:x,arg:h},{getState:g,extra:O}))),[4,Promise.race([ie,Promise.resolve(o(h,{dispatch:y,getState:g,extra:O,requestId:x,signal:C.signal,abort:T,rejectWithValue:function(m,w){return new Ko(m,w)},fulfillWithValue:function(m,w){return new us(m,w)}})).then(function(m){if(m instanceof Ko)throw m;return m instanceof us?a(m.payload,x,h,m.meta):a(m,x,h)})])];case 3:return ge=f.sent(),[3,5];case 4:return Ze=f.sent(),ge=Ze instanceof Ko?l(null,x,h,Ze.payload,Ze.meta):l(Ze,x,h),[3,5];case 5:return ut=n&&!n.dispatchConditionRejection&&l.match(ge)&&ge.meta.condition,ut||y(ge),[2,ge]}})})}();return Object.assign(F,{abort:T,requestId:x,arg:h,unwrap:function(){return F.then(Ml)}})}}return Object.assign(p,{pending:s,rejected:l,fulfilled:a,typePrefix:r})}return t.withTypes=function(){return t},t}();function Ml(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Bl(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ms="listener",bs="completed",xs="cancelled",Am="task-"+xs,wm="task-"+bs,Rm=ms+"-"+xs,Nm=ms+"-"+bs;var Zo="listenerMiddleware";var Im=Ke(Zo+"/add"),_m=Ke(Zo+"/removeAll"),Tm=Ke(Zo+"/remove");var ps,Lm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ps||(ps=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},Fl=function(t){return function(r){setTimeout(r,t)}},Pm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fl(10);Xi();var Hl=vr(Symbol("withEventBus"),function(t,r){return class extends t{constructor(){super(...arguments),this.eventBus=r??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Tr=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class t extends Tr{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,s=window.ftReduxStores[n];if(Ar(s))return s;if(a==null)return;let l=gs({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=hs({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[a.name]=new t(l,d,a.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Sr;let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,p=s[u];return p?(...h)=>{let y=p(...h.map(a));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Lr=class{static format(r,o,n,a){return window.moment?window.moment(r).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(r,o,n,a)}static getMomentDateFormat(r,o){return r?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(r,o,n,a){let s=typeof r=="string"?new Date(r):r,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s);if(!a)return l;let d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return`${l} ${d}`}};var Ss=b(I()),Pr=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},ob=(0,Ss.applyMixinOnce)(Symbol("withDateFormat"),function(t){class r extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>Lr.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pr([(0,qo.property)({type:Boolean})],r.prototype,"useLongDateFormat",void 0),Pr([(0,qo.property)({type:Boolean})],r.prototype,"useDateTimeFormat",void 0),Pr([Ao({store:E.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],r.prototype,"metadataDescriptors",void 0),Pr([Ao({store:E.name})],r.prototype,"uiLocale",void 0),r});var Ur=b(I());var kr=class extends le{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(r){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${r}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${r}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(r){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${r}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${r}`),this.CACHE_DURATION)}isAuthenticated(){let r=E.getState().session;return!!r?.sessionAuthenticated}};var Dr=class extends le{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 r=E.getState().session;return!!r?.sessionAuthenticated}};var zl="ft-user-assets",Wl={setAssetCount:(t,r)=>{let{userAssetType:o,count:n}=r.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(de).forEach(r=>{t.assetCounts.allAsset[r]=void 0})},setBookmarkCountByMap:(t,r)=>{let o=r.payload.mapId;t.assetCounts.bookmarkByMap[o]=r.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,r)=>{let{assetType:o,mapId:n,asset:a}=r.payload;switch(o){case de.BOOKMARKS:t.bookmarks?t.bookmarks.push(a):t.bookmarks=[a];break;case de.SEARCHES:t.savedSearches?t.savedSearches.push(a):t.savedSearches=[a];break}let s=t.assetCounts.allAsset[o];if(s!==void 0&&(t.assetCounts.allAsset[o]=s+1),o===de.BOOKMARKS&&n!==void 0){let l=t.assetCounts.bookmarkByMap[n];l!==void 0&&(t.assetCounts.bookmarkByMap[n]=l+1)}},removeAsset:(t,r)=>{var o,n;let{assetType:a,mapId:s,assetId:l}=r.payload;switch(a){case de.BOOKMARKS:t.bookmarks=(o=t.bookmarks)===null||o===void 0?void 0:o.filter(u=>u.id!==l);break;case de.SEARCHES:t.savedSearches=(n=t.savedSearches)===null||n===void 0?void 0:n.filter(u=>u.id!==l);break}let d=t.assetCounts.allAsset[a];if(d!==void 0&&d>0&&(t.assetCounts.allAsset[a]=d-1),a===de.BOOKMARKS&&s!==void 0){let u=t.assetCounts.bookmarkByMap[s];u!==void 0&&u>0&&(t.assetCounts.bookmarkByMap[s]=u-1)}}},pe=Ur.FtReduxStore.get({name:zl,reducers:Wl,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(de).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Yo=class{constructor(r=new kr,o=new Dr){this.assetCountsService=r,this.assetLabelsService=o,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pr,this.savedSearchesService=new mr,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=E.getState();(0,Ur.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pe.actions.clearAssetCount(),pe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();pe.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let r=await this.assetLabelsService.getUserAssetLabels();pe.actions.assetLabels(r)}async loadAssetCount(r){let o=await this.assetCountsService.getUserAssetCount(r);o&&pe.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(r){let o=await this.assetCountsService.getUserBookmarkCountByMap(r);o&&pe.actions.setBookmarkCountByMap({count:o.count,mapId:r})}async reloadAssetCount(r){this.assetCountsService.clearCache();let o=Object.keys(pe.getState().assetCounts.bookmarkByMap).length!==0;r===de.BOOKMARKS&&o&&pe.actions.clearBookmarkCountByMap(),pe.getState().assetCounts.allAsset[r]!==void 0&&await this.loadAssetCount(r)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pe.actions.bookmarks(o)}}},$l=new Yo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=$l);(0,Os.customElement)("ft-app-context")(z);var Es=b(oe());var Xo=class{fromLocalizableLabel(r){return r.type=="PLAIN_TEXT"?{message:r.text}:{key:r.key,custom:r.type=="LOCALIZED_CUSTOM",context:r.context,message:r.key}}fromAttribute(r){if(r!=null)try{return JSON.parse(r)}catch{if(this.isI18nKey(r)){let[n,a]=r.split(".");return{context:n,key:a,message:""}}return{message:r}}}toAttribute(r){if(r!=null)return JSON.stringify(r)}isI18nKey(r){return r.match(/^[\w-]+\.[\w-]+$/)}},dt=new Xo;var Gl=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},As=Symbol("i18nAttributes"),Yt=Symbol("i18nListAttributes"),ws=Symbol("i18nProperties"),Mr=Symbol("i18nContexts"),qt=Symbol("i18nUnsubs"),Fr=(0,Pt.applyMixinOnce)(Symbol("withI18n"),function(t){var r,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?hr:At}i18n(s){let{context:l,key:d,message:u}=s,{custom:p,args:h,argsProvider:y}=s;if(l&&d){this.hasI18nContext(l)||this.addI18nContext(l,void 0,p);let g=h??(y?y(this):[]);return this.getI18nService(p).resolveMessage(l,d,...g)}return u}async awaitI18n(s){let{context:l,custom:d}=s;return l&&await this.getI18nService(d).prepareContext(l),this.i18n(s)}customI18n(s,l){if(dt.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((l,d,u)=>s.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((l,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(l=>l.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var l,d;let u=this,p=(h,y,g)=>g?.context&&g.key&&s(h,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(l=this[As])===null||l===void 0||l.forEach((h,y)=>u[y]=p(h,y,u[y])),(d=this[Yt])===null||d===void 0||d.forEach((h,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(O=>p(h,y,O))})}updateI18nProperties(s){var l;(l=this[ws])===null||l===void 0||l.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,l,d)}addI18nContext(s,l,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[Mr].set(u,{isCustomContext:d}),this[qt].has(u)||this[qt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(s){return this[Mr].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mr].forEach((s,l)=>this.addI18nContext(l,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[qt].forEach(s=>s()),this[qt].clear()}}return r=Mr,o=qt,Gl([(0,Es.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Cs=class extends Fr(Pt.FtLitElement){},Br=class extends Fr(Pt.FtLitElementRedux){};var Xt=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},Ce=class extends Br{constructor(){super(),this.editorMode=!1,this.addStore(E)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Hr.nothing:Hr.html`
|
|
718
|
+
`}connectedCallback(){super.connectedCallback(),E.addEventListener(nt.eventName,this.reloadConfiguration)}disconnectedCallback(){E.addEventListener(nt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(r){var o,n,a,s,l,d,u;super.update(r),r.has("baseUrl")&&(E.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),r.has("apiIntegrationIdentifier")&&E.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),r.has("apiIntegrationAppVersion")&&E.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),r.has("uiLocale")&&E.actions.uiLocale(this.uiLocale),r.has("metadataConfiguration")&&E.actions.metadataConfiguration(this.metadataConfiguration),r.has("noCustom")&&E.actions.noCustom(this.noCustom),r.has("editorMode")&&E.actions.editorMode(this.editorMode),r.has("noCustomComponent")&&E.actions.noCustomComponent(this.noCustomComponent),r.has("session")&&E.actions.session(this.session),r.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>At.addContext(p)),r.has("openExternalDocumentInNewTab")&&E.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),r.has("navigatorOnline")&&E.actions.navigatorOnline(this.navigatorOnline),r.has("forcedOffline")&&E.actions.forcedOffline(this.forcedOffline),r.has("localesConfiguration")&&(E.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),E.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),E.actions.searchInAllLanguagesAllowed((l=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),r.has("authenticationRequired")&&E.actions.authenticationRequired(this.authenticationRequired),r.has("availableContentLocales")&&E.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.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 r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},r.idleTimeoutInMillis),r})}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",()=>Ni(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};z.elementDefinitions={};z.styles=ja;X([(0,re.property)()],z.prototype,"baseUrl",void 0);X([(0,re.property)()],z.prototype,"apiIntegrationIdentifier",void 0);X([(0,re.property)()],z.prototype,"apiIntegrationAppVersion",void 0);X([(0,re.property)()],z.prototype,"uiLocale",void 0);X([(0,Se.jsonProperty)(null)],z.prototype,"availableUiLocales",void 0);X([(0,Se.jsonProperty)(null)],z.prototype,"metadataConfiguration",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"editorMode",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"noCustom",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);X([(0,re.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomComponent",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"withManualResources",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"navigatorOnline",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"forcedOffline",void 0);X([(0,re.property)({type:Object})],z.prototype,"apiProvider",void 0);X([(0,re.property)({type:Boolean})],z.prototype,"authenticationRequired",void 0);X([(0,Se.jsonProperty)([])],z.prototype,"messageContexts",void 0);X([(0,Se.jsonProperty)(void 0)],z.prototype,"session",void 0);X([(0,re.state)()],z.prototype,"localesConfiguration",void 0);X([(0,re.state)()],z.prototype,"availableContentLocales",void 0);var qo=b(oe());function tl(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;let o,n,a;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!xr(t[n],r[n]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;for(n of t.entries())if(!xr(n[1],r.get(n[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(n of t.entries())if(!r.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();let s=l=>Object.keys(l).filter(d=>l[d]!=null);if(a=s(t),o=a.length,o!==s(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=o;n--!==0;){let l=a[n];if(!xr(t[l],r[l]))return!1}return!0}return t!==t&&r!==r||t==null&&r==null}function xr(t,r){try{return tl(t,r)}catch{return!1}}function $t(t,r){return!xr(t,r)}function vr(t,r){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=r(n);return a[t]=!0,a}}var _i=b(oe(),1);var Ao=t=>{let r=t??{};return(o,n)=>{var a;let s={hasChanged:$t,attribute:!1,...r};(0,_i.property)(s)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(a=r.selector)!==null&&a!==void 0?a:d=>d[n],store:r.store})}};var Sr=class{constructor(){this.queue=[]}add(r,o=!1){o&&this.clear(r.type),this.queue.push(r)}consume(r){let o=this.queue.find(n=>n.type===r);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(r){typeof r=="string"?this.queue=this.queue.filter(o=>o.type!==r):this.queue=this.queue.filter(o=>!r.test(o.type))}};var Rt=b(oe(),1);var Ti=b(oe(),1);function Li(t,r){let o=()=>JSON.parse(JSON.stringify(t));return(0,Ti.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:$t,...r??{}})}var Or=class{constructor(r=0){this.timeout=r,this.callbacks=[]}run(r,o){return this.callbacks=[r],this.debounce(o)}queue(r,o){return this.callbacks.push(r),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(r){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),r??this.timeout),this.promise}async runCallbacks(){var r,o;let n=[...this.callbacks];this.callbacks=[];let a=(r=this.rejectPromise)!==null&&r!==void 0?r:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ki=b(K(),1);var Cr=globalThis,rl=Cr.ShadowRoot&&(Cr.ShadyCSS===void 0||Cr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ug=Symbol();var Pi=(t,r)=>{if(rl)t.adoptedStyleSheets=r.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of r){let n=document.createElement("style"),a=Cr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var Er=class extends ki.LitElement{createRenderRoot(){let r=this.constructor;r.elementDefinitions&&!r.registry&&(r.registry=new CustomElementRegistry,Object.entries(r.elementDefinitions).forEach(([a,s])=>r.registry.define(a,s)));let o={...r.shadowRootOptions,customElements:r.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Pi(n,r.elementStyles),n}};function Di(t,r,...o){var n;let a=t.querySelector(r);for(let s of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var Gt=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},Fi,Ui=Symbol("constructorPrototype"),Mi=Symbol("constructorName"),Hi=Symbol("exportpartsDebouncer"),Bi=Symbol("dynamicDependenciesLoaded"),Le=class extends Er{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Fi]=new Or(5),this[Mi]=this.constructor.name,this[Ui]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Mi]&&Object.setPrototypeOf(this,this[Ui])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[Bi]||(r[Bi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(r){super.updated(r),this.updateComplete.then(()=>{this.contentAvailableCallback(r),this.focusElementToFocus(r),this.applyCustomStylesheet(r),this.scheduleExportpartsUpdate()})}contentAvailableCallback(r){}focusElementToFocus(r){if(r.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];o=Di(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(r){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(r.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}scheduleExportpartsUpdate(){var r,o,n;(!((r=this.exportpartsPrefix)===null||r===void 0)&&r.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Hi].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(r){var o,n,a,s,l,d;let u=g=>g!=null&&g.trim().length>0,p=r.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let O=(s=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&s!==void 0?s:[],x=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(C=>C.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...O,...x).filter(u).map(C=>C.trim()).forEach(C=>h.add(C))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(O=>`${g}:${O}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Fi=Hi;Gt([(0,Rt.property)()],Le.prototype,"exportpartsPrefix",void 0);Gt([Li([])],Le.prototype,"exportpartsPrefixes",void 0);Gt([(0,Rt.property)()],Le.prototype,"customStylesheet",void 0);Gt([(0,Rt.property)()],Le.prototype,"elementToFocus",void 0);Gt([(0,Rt.state)()],Le.prototype,"useAdoptedStyleSheets",void 0);function Ar(t){var r;return(r=t?.isFtReduxStore)!==null&&r!==void 0?r:!1}var jt=Symbol("internalReduxEventsUnsubscribers"),We=Symbol("internalStoresUnsubscribers"),st=Symbol("internalStores"),ol=vr(Symbol("withRedux"),function(t){var r,o,n;class a extends t{constructor(){super(...arguments),this[r]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[st].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[st].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[st].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[st].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[st].delete(d)}setupStores(){this.unsubscribeFromStores(),this[st].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[We].has(l.store):this[We].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[We].set(l,d.subscribe(()=>this.updateFromStores())),this[jt].set(l,[]),Ar(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=g=>this[h](g);d.addEventListener(p.eventName,y),this[jt].get(l).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[We].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[We].has(l)&&this[We].get(l)(),this[We].delete(l),(d=this[jt].get(l))===null||d===void 0||d.forEach(u=>u()),this[jt].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return r=We,o=st,n=jt,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),zi=class extends ol(Le){};function ye(t){for(var r=arguments.length,o=Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];if(0)var a,s;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Pe(t){return!!t&&!!t[$]}function Oe(t){var r;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ul}(t)||Array.isArray(t)||!!t[Zi]||!!(!((r=t.constructor)===null||r===void 0)&&r[Zi])||ko(t)||Do(t))}function lt(t,r,o){o===void 0&&(o=!1),_t(t)===0?(o?Object.keys:It)(t).forEach(function(n){o&&typeof n=="symbol"||r(n,t[n],t)}):t.forEach(function(n,a){return r(a,n,t)})}function _t(t){var r=t[$];return r?r.i>3?r.i-4:r.i:Array.isArray(t)?1:ko(t)?2:Do(t)?3:0}function Nt(t,r){return _t(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function nl(t,r){return _t(t)===2?t.get(r):t[r]}function qi(t,r,o){var n=_t(t);n===2?t.set(r,o):n===3?t.add(o):t[r]=o}function Yi(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}function ko(t){return cl&&t instanceof Map}function Do(t){return dl&&t instanceof Set}function $e(t){return t.o||t.t}function Uo(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var r=Ji(t);delete r[$];for(var o=It(r),n=0;n<o.length;n++){var a=o[n],s=r[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),r)}function Mo(t,r){return r===void 0&&(r=!1),Bo(t)||Pe(t)||!Oe(t)||(_t(t)>1&&(t.set=t.add=t.clear=t.delete=al),Object.freeze(t),r&<(t,function(o,n){return Mo(n,!0)},!0)),t}function al(){ye(2)}function Bo(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function we(t){var r=Po[t];return r||ye(18,t),r}function il(t,r){Po[t]||(Po[t]=r)}function _o(){return Vt}function wo(t,r){r&&(we("Patches"),t.u=[],t.s=[],t.v=r)}function wr(t){To(t),t.p.forEach(sl),t.p=null}function To(t){t===Vt&&(Vt=t.l)}function Wi(t){return Vt={p:[],l:Vt,h:t,m:!0,_:0}}function sl(t){var r=t[$];r.i===0||r.i===1?r.j():r.g=!0}function Ro(t,r){r._=r.p.length;var o=r.p[0],n=t!==void 0&&t!==o;return r.h.O||we("ES5").S(r,t,n),n?(o[$].P&&(wr(r),ye(4)),Oe(t)&&(t=Rr(r,t),r.l||Nr(r,t)),r.u&&we("Patches").M(o[$].t,t,r.u,r.s)):t=Rr(r,o,[]),wr(r),r.u&&r.v(r.u,r.s),t!==Qi?t:void 0}function Rr(t,r,o){if(Bo(r))return r;var n=r[$];if(!n)return lt(r,function(d,u){return $i(t,n,r,d,u,o)},!0),r;if(n.A!==t)return r;if(!n.P)return Nr(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Uo(n.k):n.o,s=a,l=!1;n.i===3&&(s=new Set(a),a.clear(),l=!0),lt(s,function(d,u){return $i(t,n,a,d,u,o,l)}),Nr(t,a,!1),o&&t.u&&we("Patches").N(n,o,t.u,t.s)}return n.o}function $i(t,r,o,n,a,s,l){if(Pe(a)){var d=Rr(t,a,s&&r&&r.i!==3&&!Nt(r.R,n)?s.concat(n):void 0);if(qi(o,n,d),!Pe(d))return;t.m=!1}else l&&o.add(a);if(Oe(a)&&!Bo(a)){if(!t.h.D&&t._<1)return;Rr(t,a),r&&r.A.l||Nr(t,a)}}function Nr(t,r,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Mo(r,o)}function No(t,r){var o=t[$];return(o?$e(o):t)[r]}function Gi(t,r){if(r in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,r);if(n)return n;o=Object.getPrototypeOf(o)}}function Ge(t){t.P||(t.P=!0,t.l&&Ge(t.l))}function Io(t){t.o||(t.o=Uo(t.t))}function Lo(t,r,o){var n=ko(r)?we("MapSet").F(r,o):Do(r)?we("MapSet").T(r,o):t.O?function(a,s){var l=Array.isArray(a),d={i:l?1:0,A:s?s.A:_o(),P:!1,I:!1,R:{},l:s,t:a,k:null,o:null,j:null,C:!1},u=d,p=Zt;l&&(u=[d],p=Kt);var h=Proxy.revocable(u,p),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g}(r,o):we("ES5").J(r,o);return(o?o.A:_o()).p.push(n),n}function ll(t){return Pe(t)||ye(22,t),function r(o){if(!Oe(o))return o;var n,a=o[$],s=_t(o);if(a){if(!a.P&&(a.i<4||!we("ES5").K(a)))return a.t;a.I=!0,n=ji(o,s),a.I=!1}else n=ji(o,s);return lt(n,function(l,d){a&&nl(a.t,l)===d||qi(n,l,r(d))}),s===3?new Set(n):n}(t)}function ji(t,r){switch(r){case 2:return new Map(t);case 3:return Array.from(t)}return Uo(t)}function Xi(){function t(l,d){var u=s[l];return u?u.enumerable=d:s[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[$];return Zt.get(p,l)},set:function(p){var h=this[$];Zt.set(h,l,p)}},u}function r(l){for(var d=l.length-1;d>=0;d--){var u=l[d][$];if(!u.P)switch(u.i){case 5:n(u)&&Ge(u);break;case 4:o(u)&&Ge(u)}}}function o(l){for(var d=l.t,u=l.k,p=It(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==$){var g=d[y];if(g===void 0&&!Nt(d,y))return!0;var O=u[y],x=O&&O[$];if(x?x.t!==g:!Yi(O,g))return!0}}var C=!!d[$];return p.length!==It(d).length+(C?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function a(l){l.g&&ye(3,JSON.stringify($e(l)))}var s={};il("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(y,g){if(y){for(var O=Array(g.length),x=0;x<g.length;x++)Object.defineProperty(O,""+x,t(x,!0));return O}var C=Ji(g);delete C[$];for(var k=It(C),_=0;_<k.length;_++){var T=k[_];C[T]=t(T,y||!!C[T].enumerable)}return Object.create(Object.getPrototypeOf(g),C)}(u,l),h={i:u?5:4,A:d?d.A:_o(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,$,{value:h,writable:!0}),p},S:function(l,d,u){u?Pe(d)&&d[$].A===l&&r(l.p):(l.u&&function p(h){if(h&&typeof h=="object"){var y=h[$];if(y){var g=y.t,O=y.k,x=y.R,C=y.i;if(C===4)lt(O,function(U){U!==$&&(g[U]!==void 0||Nt(g,U)?x[U]||p(O[U]):(x[U]=!0,Ge(y)))}),lt(g,function(U){O[U]!==void 0||Nt(O,U)||(x[U]=!1,Ge(y))});else if(C===5){if(n(y)&&(Ge(y),x.length=!0),O.length<g.length)for(var k=O.length;k<g.length;k++)x[k]=!1;else for(var _=g.length;_<O.length;_++)x[_]=!0;for(var T=Math.min(O.length,g.length),F=0;F<T;F++)O.hasOwnProperty(F)||(x[F]=!0),x[F]===void 0&&p(O[F])}}}}(l.p[0]),r(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Ki,Vt,Fo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",cl=typeof Map<"u",dl=typeof Set<"u",Vi=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Qi=Fo?Symbol.for("immer-nothing"):((Ki={})["immer-nothing"]=!0,Ki),Zi=Fo?Symbol.for("immer-draftable"):"__$immer_draftable",$=Fo?Symbol.for("immer-state"):"__$immer_state";var ul=""+Object.prototype.constructor,It=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ji=Object.getOwnPropertyDescriptors||function(t){var r={};return It(t).forEach(function(o){r[o]=Object.getOwnPropertyDescriptor(t,o)}),r},Po={},Zt={get:function(t,r){if(r===$)return t;var o=$e(t);if(!Nt(o,r))return function(a,s,l){var d,u=Gi(s,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(a.k):void 0}(t,o,r);var n=o[r];return t.I||!Oe(n)?n:n===No(t.t,r)?(Io(t),t.o[r]=Lo(t.A.h,n,t)):n},has:function(t,r){return r in $e(t)},ownKeys:function(t){return Reflect.ownKeys($e(t))},set:function(t,r,o){var n=Gi($e(t),r);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=No($e(t),r),s=a?.[$];if(s&&s.t===o)return t.o[r]=o,t.R[r]=!1,!0;if(Yi(o,a)&&(o!==void 0||Nt(t.t,r)))return!0;Io(t),Ge(t)}return t.o[r]===o&&(o!==void 0||r in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[r])||(t.o[r]=o,t.R[r]=!0),!0},deleteProperty:function(t,r){return No(t.t,r)!==void 0||r in t.t?(t.R[r]=!1,Io(t),Ge(t)):delete t.R[r],t.o&&delete t.o[r],!0},getOwnPropertyDescriptor:function(t,r){var o=$e(t),n=Reflect.getOwnPropertyDescriptor(o,r);return n&&{writable:!0,configurable:t.i!==1||r!=="length",enumerable:n.enumerable,value:o[r]}},defineProperty:function(){ye(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ye(12)}},Kt={};lt(Zt,function(t,r){Kt[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),Kt.deleteProperty=function(t,r){return Kt.set.call(this,t,r,void 0)},Kt.set=function(t,r,o){return Zt.set.call(this,t[0],r,o,t[0])};var pl=function(){function t(o){var n=this;this.O=Vi,this.D=!0,this.produce=function(a,s,l){if(typeof a=="function"&&typeof s!="function"){var d=s;s=a;var u=n;return function(C){var k=this;C===void 0&&(C=d);for(var _=arguments.length,T=Array(_>1?_-1:0),F=1;F<_;F++)T[F-1]=arguments[F];return u.produce(C,function(U){var J;return(J=s).call.apply(J,[k,U].concat(T))})}}var p;if(typeof s!="function"&&ye(6),l!==void 0&&typeof l!="function"&&ye(7),Oe(a)){var h=Wi(n),y=Lo(n,a,void 0),g=!0;try{p=s(y),g=!1}finally{g?wr(h):To(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return wo(h,l),Ro(C,h)},function(C){throw wr(h),C}):(wo(h,l),Ro(p,h))}if(!a||typeof a!="object"){if((p=s(a))===void 0&&(p=a),p===Qi&&(p=void 0),n.D&&Mo(p,!0),l){var O=[],x=[];we("Patches").M(a,p,O,x),l(O,x)}return p}ye(21,a)},this.produceWithPatches=function(a,s){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(O){return a.apply(void 0,[O].concat(y))})};var l,d,u=n.produce(a,s,function(p,h){l=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var r=t.prototype;return r.createDraft=function(o){Oe(o)||ye(8),Pe(o)&&(o=ll(o));var n=Wi(this),a=Lo(this,o,void 0);return a[$].C=!0,To(n),a},r.finishDraft=function(o,n){var a=o&&o[$],s=a.A;return wo(s,n),Ro(void 0,s)},r.setAutoFreeze=function(o){this.D=o},r.setUseProxies=function(o){o&&!Vi&&ye(20),this.O=o},r.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var s=n[a];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}a>-1&&(n=n.slice(a+1));var l=we("Patches").$;return Pe(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},t}(),ue=new pl,fl=ue.produce,Xg=ue.produceWithPatches.bind(ue),Qg=ue.setAutoFreeze.bind(ue),Jg=ue.setUseProxies.bind(ue),em=ue.applyPatches.bind(ue),tm=ue.createDraft.bind(ue),rm=ue.finishDraft.bind(ue),Ir=fl;function ct(t){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ct(t)}function es(t,r){if(ct(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,r||"default");if(ct(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ts(t){var r=es(t,"string");return ct(r)=="symbol"?r:r+""}function rs(t,r,o){return(r=ts(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function os(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function Ho(t){for(var r=1;r<arguments.length;r++){var o=arguments[r]!=null?arguments[r]:{};r%2?os(Object(o),!0).forEach(function(n){rs(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):os(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),zo=function(){return Math.random().toString(36).substring(7).split("").join(".")},_r={INIT:"@@redux/INIT"+zo(),REPLACE:"@@redux/REPLACE"+zo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zo()}};function hl(t){if(typeof t!="object"||t===null)return!1;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function Wo(t,r,o){var n;if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ae(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ae(1));return o(Wo)(t,r)}if(typeof t!="function")throw new Error(ae(2));var a=t,s=r,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(ae(3));return s}function y(C){if(typeof C!="function")throw new Error(ae(4));if(u)throw new Error(ae(5));var k=!0;return p(),d.push(C),function(){if(k){if(u)throw new Error(ae(6));k=!1,p();var T=d.indexOf(C);d.splice(T,1),l=null}}}function g(C){if(!hl(C))throw new Error(ae(7));if(typeof C.type>"u")throw new Error(ae(8));if(u)throw new Error(ae(9));try{u=!0,s=a(s,C)}finally{u=!1}for(var k=l=d,_=0;_<k.length;_++){var T=k[_];T()}return C}function O(C){if(typeof C!="function")throw new Error(ae(10));a=C,g({type:_r.REPLACE})}function x(){var C,k=y;return C={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(ae(11));function F(){T.next&&T.next(h())}F();var U=k(F);return{unsubscribe:U}}},C[ns]=function(){return this},C}return g({type:_r.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:O},n[ns]=x,n}function yl(t){Object.keys(t).forEach(function(r){var o=t[r],n=o(void 0,{type:_r.INIT});if(typeof n>"u")throw new Error(ae(12));if(typeof o(void 0,{type:_r.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function as(t){for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var a=r[n];typeof t[a]=="function"&&(o[a]=t[a])}var s=Object.keys(o),l,d;try{yl(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var g=!1,O={},x=0;x<s.length;x++){var C=s[x],k=o[C],_=p[C],T=k(_,h);if(typeof T>"u"){var F=h&&h.type;throw new Error(ae(14))}O[C]=T,g=g||T!==_}return g=g||s.length!==Object.keys(p).length,g?O:p}}function Tt(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return r.length===0?function(n){return n}:r.length===1?r[0]:r.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function is(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),s=function(){throw new Error(ae(15))},l={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=r.map(function(u){return u(l)});return s=Tt.apply(void 0,d)(a.dispatch),Ho(Ho({},a),{},{dispatch:s})}}}function ss(t){var r=function(n){var a=n.dispatch,s=n.getState;return function(l){return function(d){return typeof d=="function"?d(a,s,t):l(d)}}};return r}var ls=ss();ls.withExtraArgument=ss;var $o=ls;var fs=function(){var t=function(r,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])},t(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function n(){this.constructor=r}r.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),gl=function(t,r){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(s=p[0]&2?a.return:p[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,p[1])).done)return s;switch(a=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(t,o)}catch(h){p=[6,h],a=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Lt=function(t,r){for(var o=0,n=r.length,a=t.length;o<n;o++,a++)t[a]=r[o];return t},ml=Object.defineProperty,bl=Object.defineProperties,xl=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,vl=Object.prototype.hasOwnProperty,Sl=Object.prototype.propertyIsEnumerable,ds=function(t,r,o){return r in t?ml(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o},je=function(t,r){for(var o in r||(r={}))vl.call(r,o)&&ds(t,o,r[o]);if(cs)for(var n=0,a=cs(r);n<a.length;n++){var o=a[n];Sl.call(r,o)&&ds(t,o,r[o])}return t},Go=function(t,r){return bl(t,xl(r))},Ol=function(t,r,o){return new Promise(function(n,a){var s=function(u){try{d(o.next(u))}catch(p){a(p)}},l=function(u){try{d(o.throw(u))}catch(p){a(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,l)};d((o=o.apply(t,r)).next())})};var Cl=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tt:Tt.apply(null,arguments)},vm=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function El(t){if(typeof t!="object"||t===null)return!1;var r=Object.getPrototypeOf(t);if(r===null)return!0;for(var o=r;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return r===o}var Al=function(t){fs(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Lt([void 0],o[0].concat(this)))):new(r.bind.apply(r,Lt([void 0],o.concat(this))))},r}(Array),wl=function(t){fs(r,t);function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,r.prototype),a}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},r.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(r.bind.apply(r,Lt([void 0],o[0].concat(this)))):new(r.bind.apply(r,Lt([void 0],o.concat(this))))},r}(Array);function Vo(t){return Oe(t)?Ir(t,function(){}):t}function Rl(t){return typeof t=="boolean"}function Nl(){return function(r){return Il(r)}}function Il(t){t===void 0&&(t={});var r=t.thunk,o=r===void 0?!0:r,n=t.immutableCheck,a=n===void 0?!0:n,s=t.serializableCheck,l=s===void 0?!0:s,d=new Al;if(o&&(Rl(o)?d.push($o):d.push($o.withExtraArgument(o.extraArgument))),0){if(a)var u;if(l)var p}return d}var jo=!0;function hs(t){var r=Nl(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,s=o.middleware,l=s===void 0?r():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,O;if(typeof a=="function")O=a;else if(El(a))O=as(a);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 x=l;if(typeof x=="function"&&(x=x(r),!jo&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!jo&&x.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=is.apply(void 0,x),k=Tt;u&&(k=Cl(je({trace:!jo},typeof u=="object"&&u)));var _=new wl(C),T=_;Array.isArray(g)?T=Lt([C],g):typeof g=="function"&&(T=g(_));var F=k.apply(void 0,T);return Wo(O,h,F)}function Ke(t,r){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(r){var s=r.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return je(je({type:t,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.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 ys(t){var r={},o=[],n,a={addCase:function(s,l){var d=typeof s=="string"?s:s.type;if(d in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[d]=l,a},addMatcher:function(s,l){return o.push({matcher:s,reducer:l}),a},addDefaultCase:function(s){return n=s,a}};return t(a),[r,o,n]}function _l(t){return typeof t=="function"}function Tl(t,r,o,n){o===void 0&&(o=[]);var a=typeof r=="function"?ys(r):[r,o,n],s=a[0],l=a[1],d=a[2],u;if(_l(t))u=function(){return Vo(t())};else{var p=Vo(t);u=function(){return p}}function h(y,g){y===void 0&&(y=u());var O=Lt([s[g.type]],l.filter(function(x){var C=x.matcher;return C(g)}).map(function(x){var C=x.reducer;return C}));return O.filter(function(x){return!!x}).length===0&&(O=[d]),O.reduce(function(x,C){if(C)if(Pe(x)){var k=x,_=C(k,g);return _===void 0?x:_}else{if(Oe(x))return Ir(x,function(T){return C(T,g)});var _=C(x,g);if(_===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return x},y)}return h.getInitialState=u,h}function Ll(t,r){return t+"/"+r}function gs(t){var r=t.name;if(!r)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Vo(t.initialState),n=t.reducers||{},a=Object.keys(n),s={},l={},d={};a.forEach(function(h){var y=n[h],g=Ll(r,h),O,x;"reducer"in y?(O=y.reducer,x=y.prepare):O=y,s[h]=O,l[g]=O,d[h]=x?Ke(g,x):Ke(g)});function u(){var h=typeof t.extraReducers=="function"?ys(t.extraReducers):[t.extraReducers],y=h[0],g=y===void 0?{}:y,O=h[1],x=O===void 0?[]:O,C=h[2],k=C===void 0?void 0:C,_=je(je({},g),l);return Tl(o,function(T){for(var F in _)T.addCase(F,_[F]);for(var U=0,J=x;U<J.length;U++){var ge=J[U];T.addMatcher(ge.matcher,ge.reducer)}k&&T.addDefaultCase(k)})}var p;return{name:r,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Pl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",kl=function(t){t===void 0&&(t=21);for(var r="",o=t;o--;)r+=Pl[Math.random()*64|0];return r},Dl=["name","message","stack","code"],Ko=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),us=function(){function t(r,o){this.payload=r,this.meta=o}return t}(),Ul=function(t){if(typeof t=="object"&&t!==null){for(var r={},o=0,n=Dl;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(r[a]=t[a])}return r}return{message:String(t)}},Em=function(){function t(r,o,n){var a=Ke(r+"/fulfilled",function(h,y,g,O){return{payload:h,meta:Go(je({},O||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=Ke(r+"/pending",function(h,y,g){return{payload:void 0,meta:Go(je({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=Ke(r+"/rejected",function(h,y,g,O,x){return{payload:O,error:(n&&n.serializeError||Ul)(h||"Rejected"),meta:Go(je({},x||{}),{arg:g,requestId:y,rejectedWithValue:!!O,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,O){var x=n?.idGenerator?n.idGenerator(h):kl(),C=new u,k,_=!1;function T(U){k=U,C.abort()}var F=function(){return Ol(this,null,function(){var U,J,ge,Ve,ie,Ze,ut;return gl(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ve=(U=n?.condition)==null?void 0:U.call(n,h,{getState:g,extra:O}),Bl(Ve)?[4,Ve]:[3,2];case 1:Ve=f.sent(),f.label=2;case 2:if(Ve===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,ie=new Promise(function(m,w){return C.signal.addEventListener("abort",function(){return w({name:"AbortError",message:k||"Aborted"})})}),y(s(x,h,(J=n?.getPendingMeta)==null?void 0:J.call(n,{requestId:x,arg:h},{getState:g,extra:O}))),[4,Promise.race([ie,Promise.resolve(o(h,{dispatch:y,getState:g,extra:O,requestId:x,signal:C.signal,abort:T,rejectWithValue:function(m,w){return new Ko(m,w)},fulfillWithValue:function(m,w){return new us(m,w)}})).then(function(m){if(m instanceof Ko)throw m;return m instanceof us?a(m.payload,x,h,m.meta):a(m,x,h)})])];case 3:return ge=f.sent(),[3,5];case 4:return Ze=f.sent(),ge=Ze instanceof Ko?l(null,x,h,Ze.payload,Ze.meta):l(Ze,x,h),[3,5];case 5:return ut=n&&!n.dispatchConditionRejection&&l.match(ge)&&ge.meta.condition,ut||y(ge),[2,ge]}})})}();return Object.assign(F,{abort:T,requestId:x,arg:h,unwrap:function(){return F.then(Ml)}})}}return Object.assign(p,{pending:s,rejected:l,fulfilled:a,typePrefix:r})}return t.withTypes=function(){return t},t}();function Ml(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Bl(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ms="listener",bs="completed",xs="cancelled",Am="task-"+xs,wm="task-"+bs,Rm=ms+"-"+xs,Nm=ms+"-"+bs;var Zo="listenerMiddleware";var Im=Ke(Zo+"/add"),_m=Ke(Zo+"/removeAll"),Tm=Ke(Zo+"/remove");var ps,Lm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ps||(ps=Promise.resolve())).then(t).catch(function(r){return setTimeout(function(){throw r},0)})},Fl=function(t){return function(r){setTimeout(r,t)}},Pm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fl(10);Xi();var Hl=vr(Symbol("withEventBus"),function(t,r){return class extends t{constructor(){super(...arguments),this.eventBus=r??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Tr=class extends Hl(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class t extends Tr{static get(r){var o;let n=typeof r=="string"?r:r.name,a=typeof r=="string"?void 0:r,s=window.ftReduxStores[n];if(Ar(s))return s;if(a==null)return;let l=gs({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),d=hs({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[a.name]=new t(l,d,a.eventBus)}constructor(r,o,n){super(),this.reduxSlice=r,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Sr;let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,d)=>{let u=l,p=s[u];return p?(...h)=>{let y=p(...h.map(a));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(r){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(r).join("_"),overwrites:r})}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(r){throw new Error("Not implemented yet.")}subscribe(r){return this.reduxStore.subscribe(r)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Lr=class{static format(r,o,n,a){return window.moment?window.moment(r).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(r,o,n,a)}static getMomentDateFormat(r,o){return r?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(r,o,n,a){let s=typeof r=="string"?new Date(r):r,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s);if(!a)return l;let d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return`${l} ${d}`}static getTimezoneAsString(){let r=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${r(Math.abs(o)/60)}:${r(Math.abs(o)%60)}`}};var Ss=b(I()),Pr=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},ob=(0,Ss.applyMixinOnce)(Symbol("withDateFormat"),function(t){class r extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>Lr.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pr([(0,qo.property)({type:Boolean})],r.prototype,"useLongDateFormat",void 0),Pr([(0,qo.property)({type:Boolean})],r.prototype,"useDateTimeFormat",void 0),Pr([Ao({store:E.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],r.prototype,"metadataDescriptors",void 0),Pr([Ao({store:E.name})],r.prototype,"uiLocale",void 0),r});var Ur=b(I());var kr=class extends le{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(r){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${r}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${r}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(r){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${r}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${r}`),this.CACHE_DURATION)}isAuthenticated(){let r=E.getState().session;return!!r?.sessionAuthenticated}};var Dr=class extends le{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 r=E.getState().session;return!!r?.sessionAuthenticated}};var zl="ft-user-assets",Wl={setAssetCount:(t,r)=>{let{userAssetType:o,count:n}=r.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(de).forEach(r=>{t.assetCounts.allAsset[r]=void 0})},setBookmarkCountByMap:(t,r)=>{let o=r.payload.mapId;t.assetCounts.bookmarkByMap[o]=r.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,r)=>{let{assetType:o,mapId:n,asset:a}=r.payload;switch(o){case de.BOOKMARKS:t.bookmarks?t.bookmarks.push(a):t.bookmarks=[a];break;case de.SEARCHES:t.savedSearches?t.savedSearches.push(a):t.savedSearches=[a];break}let s=t.assetCounts.allAsset[o];if(s!==void 0&&(t.assetCounts.allAsset[o]=s+1),o===de.BOOKMARKS&&n!==void 0){let l=t.assetCounts.bookmarkByMap[n];l!==void 0&&(t.assetCounts.bookmarkByMap[n]=l+1)}},removeAsset:(t,r)=>{var o,n;let{assetType:a,mapId:s,assetId:l}=r.payload;switch(a){case de.BOOKMARKS:t.bookmarks=(o=t.bookmarks)===null||o===void 0?void 0:o.filter(u=>u.id!==l);break;case de.SEARCHES:t.savedSearches=(n=t.savedSearches)===null||n===void 0?void 0:n.filter(u=>u.id!==l);break}let d=t.assetCounts.allAsset[a];if(d!==void 0&&d>0&&(t.assetCounts.allAsset[a]=d-1),a===de.BOOKMARKS&&s!==void 0){let u=t.assetCounts.bookmarkByMap[s];u!==void 0&&u>0&&(t.assetCounts.bookmarkByMap[s]=u-1)}}},pe=Ur.FtReduxStore.get({name:zl,reducers:Wl,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(de).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Yo=class{constructor(r=new kr,o=new Dr){this.assetCountsService=r,this.assetLabelsService=o,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pr,this.savedSearchesService=new mr,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var r;let{session:o}=E.getState();(0,Ur.deepEqual)((r=this.currentSession)===null||r===void 0?void 0:r.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pe.actions.clearAssetCount(),pe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let r=await this.savedSearchesService.listMySearches();pe.actions.savedSearches(r)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let r=await this.assetLabelsService.getUserAssetLabels();pe.actions.assetLabels(r)}async loadAssetCount(r){let o=await this.assetCountsService.getUserAssetCount(r);o&&pe.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(r){let o=await this.assetCountsService.getUserBookmarkCountByMap(r);o&&pe.actions.setBookmarkCountByMap({count:o.count,mapId:r})}async reloadAssetCount(r){this.assetCountsService.clearCache();let o=Object.keys(pe.getState().assetCounts.bookmarkByMap).length!==0;r===de.BOOKMARKS&&o&&pe.actions.clearBookmarkCountByMap(),pe.getState().assetCounts.allAsset[r]!==void 0&&await this.loadAssetCount(r)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var r;if(this.bookmarksAreUsed){let o=!((r=this.currentSession)===null||r===void 0)&&r.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pe.actions.bookmarks(o)}}},$l=new Yo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=$l);(0,Os.customElement)("ft-app-context")(z);var Es=b(oe());var Xo=class{fromLocalizableLabel(r){return r.type=="PLAIN_TEXT"?{message:r.text}:{key:r.key,custom:r.type=="LOCALIZED_CUSTOM",context:r.context,message:r.key}}fromAttribute(r){if(r!=null)try{return JSON.parse(r)}catch{if(this.isI18nKey(r)){let[n,a]=r.split(".");return{context:n,key:a,message:""}}return{message:r}}}toAttribute(r){if(r!=null)return JSON.stringify(r)}isI18nKey(r){return r.match(/^[\w-]+\.[\w-]+$/)}},dt=new Xo;var Gl=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},As=Symbol("i18nAttributes"),Yt=Symbol("i18nListAttributes"),ws=Symbol("i18nProperties"),Mr=Symbol("i18nContexts"),qt=Symbol("i18nUnsubs"),Fr=(0,Pt.applyMixinOnce)(Symbol("withI18n"),function(t){var r,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[r]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?hr:At}i18n(s){let{context:l,key:d,message:u}=s,{custom:p,args:h,argsProvider:y}=s;if(l&&d){this.hasI18nContext(l)||this.addI18nContext(l,void 0,p);let g=h??(y?y(this):[]);return this.getI18nService(p).resolveMessage(l,d,...g)}return u}async awaitI18n(s){let{context:l,custom:d}=s;return l&&await this.getI18nService(d).prepareContext(l),this.i18n(s)}customI18n(s,l){if(dt.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((l,d,u)=>s.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((l,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(l=>l.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var l,d;let u=this,p=(h,y,g)=>g?.context&&g.key&&s(h,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(l=this[As])===null||l===void 0||l.forEach((h,y)=>u[y]=p(h,y,u[y])),(d=this[Yt])===null||d===void 0||d.forEach((h,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(O=>p(h,y,O))})}updateI18nProperties(s){var l;(l=this[ws])===null||l===void 0||l.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,l,d)}addI18nContext(s,l,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[Mr].set(u,{isCustomContext:d}),this[qt].has(u)||this[qt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(s){return this[Mr].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mr].forEach((s,l)=>this.addI18nContext(l,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[qt].forEach(s=>s()),this[qt].clear()}}return r=Mr,o=qt,Gl([(0,Es.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Cs=class extends Fr(Pt.FtLitElement){},Br=class extends Fr(Pt.FtLitElementRedux){};var Xt=function(t,r,o,n){var a=arguments.length,s=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,r,o,n);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(s=(a<3?l(s):a>3?l(r,o,s):l(r,o))||s);return a>3&&s&&Object.defineProperty(r,o,s),s},Ce=class extends Br{constructor(){super(),this.editorMode=!1,this.addStore(E)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Hr.nothing:Hr.html`
|
|
719
719
|
<span class="ft-i18n">
|
|
720
720
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
721
721
|
</span>
|