@fluid-topics/ft-search-result-abstract 2.0.33 → 2.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  "use strict";(()=>{var xi=Object.create;var ho=Object.defineProperty;var vi=Object.getOwnPropertyDescriptor;var Si=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Oi=Object.prototype.hasOwnProperty;var lt=(r,t)=>()=>{try{return t||r((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var Ai=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Si(t))!Oi.call(r,i)&&i!==o&&ho(r,i,{get:()=>t[i],enumerable:!(n=vi(t,i))||n.enumerable});return r};var A=(r,t,o)=>(o=r!=null?xi(Ci(r)):{},Ai(t||!r||!r.__esModule?ho(o,"default",{value:r,enumerable:!0}):o,r));var _=lt((Ns,yo)=>{yo.exports=ftGlobals.wcUtils});var oe=lt((_s,go)=>{go.exports=ftGlobals.lit});var ee=lt((Ps,mo)=>{mo.exports=ftGlobals.litDecorators});var xo=lt((le,bo)=>{var Ot=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,At=(function(){function r(){this.fetch=!1,this.DOMException=Ot.DOMException}return r.prototype=Ot,new r})();(function(r){var t=(function(o){var n=typeof r<"u"&&r||typeof self<"u"&&self||typeof global<"u"&&global||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function c(p){return p&&DataView.prototype.isPrototypeOf(p)}if(i.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(p){return p&&l.indexOf(Object.prototype.toString.call(p))>-1};function u(p){if(typeof p!="string"&&(p=String(p)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(p)||p==="")throw new TypeError('Invalid character in header field name: "'+p+'"');return p.toLowerCase()}function f(p){return typeof p!="string"&&(p=String(p)),p}function h(p){var g={next:function(){var O=p.shift();return{done:O===void 0,value:O}}};return i.iterable&&(g[Symbol.iterator]=function(){return g}),g}function y(p){this.map={},p instanceof y?p.forEach(function(g,O){this.append(O,g)},this):Array.isArray(p)?p.forEach(function(g){if(g.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+g.length);this.append(g[0],g[1])},this):p&&Object.getOwnPropertyNames(p).forEach(function(g){this.append(g,p[g])},this)}y.prototype.append=function(p,g){p=u(p),g=f(g);var O=this.map[p];this.map[p]=O?O+", "+g:g},y.prototype.delete=function(p){delete this.map[u(p)]},y.prototype.get=function(p){return p=u(p),this.has(p)?this.map[p]:null},y.prototype.has=function(p){return this.map.hasOwnProperty(u(p))},y.prototype.set=function(p,g){this.map[u(p)]=f(g)},y.prototype.forEach=function(p,g){for(var O in this.map)this.map.hasOwnProperty(O)&&p.call(g,this.map[O],O,this)},y.prototype.keys=function(){var p=[];return this.forEach(function(g,O){p.push(O)}),h(p)},y.prototype.values=function(){var p=[];return this.forEach(function(g){p.push(g)}),h(p)},y.prototype.entries=function(){var p=[];return this.forEach(function(g,O){p.push([O,g])}),h(p)},i.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function m(p){if(!p._noBody){if(p.bodyUsed)return Promise.reject(new TypeError("Already read"));p.bodyUsed=!0}}function v(p){return new Promise(function(g,O){p.onload=function(){g(p.result)},p.onerror=function(){O(p.error)}})}function b(p){var g=new FileReader,O=v(g);return g.readAsArrayBuffer(p),O}function S(p){var g=new FileReader,O=v(g),L=/charset=([A-Za-z0-9_-]+)/.exec(p.type),F=L?L[1]:"utf-8";return g.readAsText(p,F),O}function E(p){for(var g=new Uint8Array(p),O=new Array(g.length),L=0;L<g.length;L++)O[L]=String.fromCharCode(g[L]);return O.join("")}function w(p){if(p.slice)return p.slice(0);var g=new Uint8Array(p.byteLength);return g.set(new Uint8Array(p)),g.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(p){this.bodyUsed=this.bodyUsed,this._bodyInit=p,p?typeof p=="string"?this._bodyText=p:i.blob&&Blob.prototype.isPrototypeOf(p)?this._bodyBlob=p:i.formData&&FormData.prototype.isPrototypeOf(p)?this._bodyFormData=p:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)?this._bodyText=p.toString():i.arrayBuffer&&i.blob&&c(p)?(this._bodyArrayBuffer=w(p.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(p)||d(p))?this._bodyArrayBuffer=w(p):this._bodyText=p=Object.prototype.toString.call(p):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof p=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var p=m(this);if(p)return p;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var p=m(this);return p||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(i.blob)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var p=m(this);if(p)return p;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function k(p){var g=p.toUpperCase();return N.indexOf(g)>-1?g:p}function B(p,g){if(!(this instanceof B))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var O=g.body;if(p instanceof B){if(p.bodyUsed)throw new TypeError("Already read");this.url=p.url,this.credentials=p.credentials,g.headers||(this.headers=new y(p.headers)),this.method=p.method,this.mode=p.mode,this.signal=p.signal,!O&&p._bodyInit!=null&&(O=p._bodyInit,p.bodyUsed=!0)}else this.url=String(p);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new y(g.headers)),this.method=k(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal||(function(){if("AbortController"in n){var T=new AbortController;return T.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&O)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(O),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var L=/([?&])_=[^&]*/;if(L.test(this.url))this.url=this.url.replace(L,"$1_="+new Date().getTime());else{var F=/\?/;this.url+=(F.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function X(p){var g=new FormData;return p.trim().split("&").forEach(function(O){if(O){var L=O.split("="),F=L.shift().replace(/\+/g," "),T=L.join("=").replace(/\+/g," ");g.append(decodeURIComponent(F),decodeURIComponent(T))}}),g}function me(p){var g=new y,O=p.replace(/\r?\n[\t ]+/g," ");return O.split("\r").map(function(L){return L.indexOf(`
2
- `)===0?L.substr(1,L.length):L}).forEach(function(L){var F=L.split(":"),T=F.shift().trim();if(T){var Ct=F.join(":").trim();try{g.append(T,Ct)}catch(ar){console.warn("Response "+ar.message)}}}),g}R.call(B.prototype);function W(p,g){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(p)}R.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},W.error=function(){var p=new W(null,{status:200,statusText:""});return p.ok=!1,p.status=0,p.type="error",p};var be=[301,302,303,307,308];W.redirect=function(p,g){if(be.indexOf(g)===-1)throw new RangeError("Invalid status code");return new W(null,{status:g,headers:{location:p}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,O){this.message=g,this.name=O;var L=Error(g);this.stack=L.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function _e(p,g){return new Promise(function(O,L){var F=new B(p,g);if(F.signal&&F.signal.aborted)return L(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function Ct(){T.abort()}T.onload=function(){var H={statusText:T.statusText,headers:me(T.getAllResponseHeaders()||"")};F.url.indexOf("file://")===0&&(T.status<200||T.status>599)?H.status=200:H.status=T.status,H.url="responseURL"in T?T.responseURL:H.headers.get("X-Request-URL");var xe="response"in T?T.response:T.responseText;setTimeout(function(){O(new W(xe,H))},0)},T.onerror=function(){setTimeout(function(){L(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){L(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){L(new o.DOMException("Aborted","AbortError"))},0)};function ar(H){try{return H===""&&n.location.href?n.location.href:H}catch{return H}}if(T.open(F.method,ar(F.url),!0),F.credentials==="include"?T.withCredentials=!0:F.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(i.blob?T.responseType="blob":i.arrayBuffer&&(T.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var po=[];Object.getOwnPropertyNames(g.headers).forEach(function(H){po.push(u(H)),T.setRequestHeader(H,f(g.headers[H]))}),F.headers.forEach(function(H,xe){po.indexOf(xe)===-1&&T.setRequestHeader(xe,H)})}else F.headers.forEach(function(H,xe){T.setRequestHeader(xe,H)});F.signal&&(F.signal.addEventListener("abort",Ct),T.onreadystatechange=function(){T.readyState===4&&F.signal.removeEventListener("abort",Ct)}),T.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return _e.polyfill=!0,n.fetch||(n.fetch=_e,n.Headers=y,n.Request=B,n.Response=W),o.Headers=y,o.Request=B,o.Response=W,o.fetch=_e,o})({})})(At);At.fetch.ponyfill=!0;delete At.fetch.polyfill;var Pe=Ot.fetch?Ot:At;le=Pe.fetch;le.default=Pe.fetch;le.fetch=Pe.fetch;le.Headers=Pe.Headers;le.Request=Pe.Request;le.Response=Pe.Response;bo.exports=le});var ga=lt((Gu,ya)=>{ya.exports=ftGlobals.litUnsafeHTML});var bi=A(_());var fo=A(oe()),yi=A(_());var er=A(_());var $e=A(_()),qr=A(ee());var ir;(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ir||(ir={}));var Ie=A(_());var Ei=A(_());var Ri=A(xo(),1);var vo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(vo||(vo={}));var So;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(So||(So={}));var Co;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Co||(Co={}));var Oo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Oo||(Oo={}));var Ao;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Ao||(Ao={}));var Eo;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Eo||(Eo={}));var wo;(function(r){r.OFFICIAL="OFFICIAL",r.AI="AI"})(wo||(wo={}));var Ro;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Ro||(Ro={}));var Io;(function(r){r.STANDARD="STANDARD",r.STRUCTURAL="STRUCTURAL"})(Io||(Io={}));var To;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(To||(To={}));var ko;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(ko||(ko={}));var Lo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Lo||(Lo={}));var No;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(No||(No={}));var _o;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_o||(_o={}));var Po;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Po||(Po={}));var Fo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Fo||(Fo={}));var sr;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(sr||(sr={}));var Do;(function(r){r.ASC="ASC",r.DESC="DESC"})(Do||(Do={}));var Uo;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Uo||(Uo={}));var cr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(cr||(cr={}));var Mo;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Mo||(Mo={}));var Bo;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Bo||(Bo={}));var Ho;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ho||(Ho={}));var zo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(zo||(zo={}));var Go;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Go||(Go={}));var lr;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(lr||(lr={}));var Wo;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wo||(Wo={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(q||(q={}));var jo;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(jo||(jo={}));var $o;(function(r){r.VALID="VALID",r.INVALID="INVALID"})($o||($o={}));var Vo;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Vo||(Vo={}));var Ko;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ko||(Ko={}));var qo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(qo||(qo={}));var Zo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Zo||(Zo={}));var Yo;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Yo||(Yo={}));var Qo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Qo||(Qo={}));var Xo;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(Xo||(Xo={}));var Jo;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jo||(Jo={}));var wi={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function en(r,t){return r===t||(wi[r]??[]).some(o=>en(o,t))}function tn(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>en(n,t))}var Fr=A(ee());var rn=A(ee(),1);var dr=r=>t=>{window.customElements.get(r)||window.customElements.define(r,t)};function on(r,t){return(0,rn.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return dt(r);try{return JSON.parse(o)}catch{return dt(r)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ut,...t??{}})}function Ii(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Et(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Et(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Et(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Et(r,t){try{return Ii(r,t)}catch{return!1}}function ut(r,t){return!Et(r,t)}function dt(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function wt(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var nn=A(ee(),1);var ur=r=>{let t=r??{};return(o,n)=>{var i;let c={hasChanged:ut,attribute:!1,...t};(0,nn.property)(c)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Rt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var ve=A(ee(),1);var It=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),c=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sn=A(oe(),1);var Tt=globalThis,Ti=Tt.ShadowRoot&&(Tt.ShadyCSS===void 0||Tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var an=(r,t)=>{if(Ti)r.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),i=Tt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var kt=class extends sn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return an(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){dr(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function cn(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var De=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},fn,ln=Symbol("constructorPrototype"),dn=Symbol("constructorName"),pn=Symbol("exportpartsDebouncer"),un=Symbol("dynamicDependenciesLoaded"),Fe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Fe.eventName="exportparts-updated";var te=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[fn]=new It(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[pn].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[dn]=this.constructor.name,this[ln]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[dn]&&Object.setPrototypeOf(this,this[ln])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[un]||(o[un]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Fe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Fe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Fe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=cn(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=m=>m!=null&&m.trim().length>0,f=t.filter(u).map(m=>m.trim());if(f.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(E=>E.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(E=>E.trim());for(let E of S)h.add(E)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>f.map(v=>`${m}:${v}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};fn=pn;De([(0,ve.property)()],te.prototype,"exportpartsPrefix",void 0);De([on([])],te.prototype,"exportpartsPrefixes",void 0);De([(0,ve.property)({reflect:!0})],te.prototype,"exportparts",void 0);De([(0,ve.property)()],te.prototype,"customStylesheet",void 0);De([(0,ve.property)()],te.prototype,"elementToFocus",void 0);De([(0,ve.state)()],te.prototype,"useAdoptedStyleSheets",void 0);function Lt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ft=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),Se=Symbol("internalStores"),ki=wt(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=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[Se].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Se].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Se].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Se].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Se].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Se].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 f=this.getStore(l.store);f&&(l.store?this[de].has(l.store):this[de].size>0)&&(this[d]=l.selector(f.getState(),this))}})}subscribeToStore(l,d){var u;this[de].set(l,d.subscribe(()=>this.updateFromStores())),this[ft].set(l,[]),Lt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let y=m=>this[h](m);d.addEventListener(f.eventName,y),this[ft].get(l).push(()=>d.removeEventListener(f.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[de].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[de].has(l)&&this[de].get(l)(),this[de].delete(l),(d=this[ft].get(l))===null||d===void 0||d.forEach(u=>u()),this[ft].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,o=Se,n=ft,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),hn=class extends ki(te){};function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[P]}function J(r){var t;return!!r&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Mi})(r)||Array.isArray(r)||!!r[Sn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Sn])||vr(r)||Sr(r))}function Ce(r,t,o){o===void 0&&(o=!1),Be(r)===0?(o?Object.keys:Me)(r).forEach((function(n){o&&typeof n=="symbol"||t(n,r[n],r)})):r.forEach((function(n,i){return t(i,n,r)}))}function Be(r){var t=r[P];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:vr(r)?2:Sr(r)?3:0}function Ue(r,t){return Be(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Li(r,t){return Be(r)===2?r.get(t):r[t]}function Cn(r,t,o){var n=Be(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function On(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function vr(r){return Di&&r instanceof Map}function Sr(r){return Ui&&r instanceof Set}function ue(r){return r.o||r.t}function Cr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=wn(r);delete t[P];for(var o=Me(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Or(r,t){return t===void 0&&(t=!1),Ar(r)||ne(r)||!J(r)||(Be(r)>1&&(r.set=r.add=r.clear=r.delete=Ni),Object.freeze(r),t&&Ce(r,(function(o,n){return Or(n,!0)}),!0)),r}function Ni(){Z(2)}function Ar(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function re(r){var t=xr[r];return t||Z(18,r),t}function _i(r,t){xr[r]||(xr[r]=t)}function gr(){return ht}function fr(r,t){t&&(re("Patches"),r.u=[],r.s=[],r.v=t)}function Nt(r){mr(r),r.p.forEach(Pi),r.p=null}function mr(r){r===ht&&(ht=r.l)}function yn(r){return ht={p:[],l:ht,h:r,m:!0,_:0}}function Pi(r){var t=r[P];t.i===0||t.i===1?t.j():t.g=!0}function pr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||re("ES5").S(t,r,n),n?(o[P].P&&(Nt(t),Z(4)),J(r)&&(r=_t(t,r),t.l||Pt(t,r)),t.u&&re("Patches").M(o[P].t,r,t.u,t.s)):r=_t(t,o,[]),Nt(t),t.u&&t.v(t.u,t.s),r!==En?r:void 0}function _t(r,t,o){if(Ar(t))return t;var n=t[P];if(!n)return Ce(t,(function(d,u){return gn(r,n,t,d,u,o)}),!0),t;if(n.A!==r)return t;if(!n.P)return Pt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Cr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ce(c,(function(d,u){return gn(r,n,i,d,u,o,l)})),Pt(r,i,!1),o&&r.u&&re("Patches").N(n,o,r.u,r.s)}return n.o}function gn(r,t,o,n,i,c,l){if(ne(i)){var d=_t(r,i,c&&t&&t.i!==3&&!Ue(t.R,n)?c.concat(n):void 0);if(Cn(o,n,d),!ne(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!Ar(i)){if(!r.h.D&&r._<1)return;_t(r,i),t&&t.A.l||Pt(r,i)}}function Pt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Or(t,o)}function hr(r,t){var o=r[P];return(o?ue(o):r)[t]}function mn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function yr(r){r.o||(r.o=Cr(r.t))}function br(r,t,o){var n=vr(t)?re("MapSet").F(t,o):Sr(t)?re("MapSet").T(t,o):r.O?(function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:gr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,f=yt;l&&(u=[d],f=pt);var h=Proxy.revocable(u,f),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m})(t,o):re("ES5").J(t,o);return(o?o.A:gr()).p.push(n),n}function Fi(r){return ne(r)||Z(22,r),(function t(o){if(!J(o))return o;var n,i=o[P],c=Be(o);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=bn(o,c),i.I=!1}else n=bn(o,c);return Ce(n,(function(l,d){i&&Li(i.t,l)===d||Cn(n,l,t(d))})),c===3?new Set(n):n})(r)}function bn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Cr(r)}function An(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var f=this[P];return yt.get(f,l)},set:function(f){var h=this[P];yt.set(h,l,f)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][P];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:o(u)&&fe(u)}}}function o(l){for(var d=l.t,u=l.k,f=Me(u),h=f.length-1;h>=0;h--){var y=f[h];if(y!==P){var m=d[y];if(m===void 0&&!Ue(d,y))return!0;var v=u[y],b=v&&v[P];if(b?b.t!==m:!On(v,m))return!0}}var S=!!d[P];return f.length!==Me(d).length+(S?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 f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(ue(l)))}var c={};_i("ES5",{J:function(l,d){var u=Array.isArray(l),f=(function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=wn(m);delete S[P];for(var E=Me(S),w=0;w<E.length;w++){var R=E[w];S[R]=r(R,y||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(u,l),h={i:u?5:4,A:d?d.A:gr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,P,{value:h,writable:!0}),f},S:function(l,d,u){u?ne(d)&&d[P].A===l&&t(l.p):(l.u&&(function f(h){if(h&&typeof h=="object"){var y=h[P];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Ce(v,(function(k){k!==P&&(m[k]!==void 0||Ue(m,k)?b[k]||f(v[k]):(b[k]=!0,fe(y)))})),Ce(m,(function(k){v[k]!==void 0||Ue(v,k)||(b[k]=!1,fe(y))}));else if(S===5){if(n(y)&&(fe(y),b.length=!0),v.length<m.length)for(var E=v.length;E<m.length;E++)b[E]=!1;else for(var w=m.length;w<v.length;w++)b[w]=!0;for(var R=Math.min(v.length,m.length),N=0;N<R;N++)v.hasOwnProperty(N)||(b[N]=!0),b[N]===void 0&&f(v[N])}}}})(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var xn,ht,Er=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Di=typeof Map<"u",Ui=typeof Set<"u",vn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",En=Er?Symbol.for("immer-nothing"):((xn={})["immer-nothing"]=!0,xn),Sn=Er?Symbol.for("immer-draftable"):"__$immer_draftable",P=Er?Symbol.for("immer-state"):"__$immer_state";var Mi=""+Object.prototype.constructor,Me=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,wn=Object.getOwnPropertyDescriptors||function(r){var t={};return Me(r).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)})),t},xr={},yt={get:function(r,t){if(t===P)return r;var o=ue(r);if(!Ue(o,t))return(function(i,c,l){var d,u=mn(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0})(r,o,t);var n=o[t];return r.I||!J(n)?n:n===hr(r.t,t)?(yr(r),r.o[t]=br(r.A.h,n,r)):n},has:function(r,t){return t in ue(r)},ownKeys:function(r){return Reflect.ownKeys(ue(r))},set:function(r,t,o){var n=mn(ue(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=hr(ue(r),t),c=i?.[P];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(On(o,i)&&(o!==void 0||Ue(r.t,t)))return!0;yr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return hr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,yr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ue(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},pt={};Ce(yt,(function(r,t){pt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),pt.deleteProperty=function(r,t){return pt.set.call(this,r,t,void 0)},pt.set=function(r,t,o){return yt.set.call(this,r[0],t,o,r[0])};var Bi=(function(){function r(o){var n=this;this.O=vn,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var E=this;S===void 0&&(S=d);for(var w=arguments.length,R=Array(w>1?w-1:0),N=1;N<w;N++)R[N-1]=arguments[N];return u.produce(S,(function(k){var B;return(B=c).call.apply(B,[E,k].concat(R))}))}}var f;if(typeof c!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var h=yn(n),y=br(n,i,void 0),m=!0;try{f=c(y),m=!1}finally{m?Nt(h):mr(h)}return typeof Promise<"u"&&f instanceof Promise?f.then((function(S){return fr(h,l),pr(S,h)}),(function(S){throw Nt(h),S})):(fr(h,l),pr(f,h))}if(!i||typeof i!="object"){if((f=c(i))===void 0&&(f=i),f===En&&(f=void 0),n.D&&Or(f,!0),l){var v=[],b=[];re("Patches").M(i,f,v,b),l(v,b)}return f}Z(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(f){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(f,(function(v){return i.apply(void 0,[v].concat(y))}))};var l,d,u=n.produce(i,c,(function(f,h){l=f,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(f){return[f,l,d]})):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ne(o)&&(o=Fi(o));var n=yn(this),i=br(this,o,void 0);return i[P].C=!0,mr(n),i},t.finishDraft=function(o,n){var i=o&&o[P],c=i.A;return fr(c,n),pr(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!vn&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=re("Patches").$;return ne(o)?l(o,n):this.produce(o,(function(d){return l(d,n)}))},r})(),$=new Bi,Hi=$.produce,Oc=$.produceWithPatches.bind($),Ac=$.setAutoFreeze.bind($),Ec=$.setUseProxies.bind($),wc=$.applyPatches.bind($),Rc=$.createDraft.bind($),Ic=$.finishDraft.bind($),Ft=Hi;function Oe(r){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(r)}function Rn(r,t){if(Oe(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Oe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function In(r){var t=Rn(r,"string");return Oe(t)=="symbol"?t:t+""}function Tn(r,t,o){return(t=In(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function kn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function wr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?kn(Object(o),!0).forEach(function(n){Tn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):kn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Ln=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Rr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Dt={INIT:"@@redux/INIT"+Rr(),REPLACE:"@@redux/REPLACE"+Rr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Rr()}};function zi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Ir(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Ir)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,c=t,l=[],d=l,u=!1;function f(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(z(3));return c}function y(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var E=!0;return f(),d.push(S),function(){if(E){if(u)throw new Error(z(6));E=!1,f();var R=d.indexOf(S);d.splice(R,1),l=null}}}function m(S){if(!zi(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var E=l=d,w=0;w<E.length;w++){var R=E[w];R()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,m({type:Dt.REPLACE})}function b(){var S,E=y;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(z(11));function N(){R.next&&R.next(h())}N();var k=E(N);return{unsubscribe:k}}},S[Ln]=function(){return this},S}return m({type:Dt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[Ln]=b,n}function Gi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Dt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Dt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function Nn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Gi(o)}catch(u){d=u}return function(f,h){if(f===void 0&&(f={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],E=o[S],w=f[S],R=E(w,h);if(typeof R>"u"){var N=h&&h.type;throw new Error(z(14))}v[S]=R,m=m||R!==w}return m=m||c.length!==Object.keys(f).length,m?v:f}}function He(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function _n(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=He.apply(void 0,d)(i.dispatch),wr(wr({},i),{},{dispatch:c})}}}function Pn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Fn=Pn();Fn.withExtraArgument=Pn;var Tr=Fn;var Hn=(function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),Wi=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(h){return u([f,h])}}function u(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=f[0]&2?i.return:f[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,f[1])).done)return c;switch(i=0,c&&(f=[f[0]&2,c.value]),f[0]){case 0:case 1:c=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!c||f[1]>c[0]&&f[1]<c[3])){o.label=f[1];break}if(f[0]===6&&o.label<c[1]){o.label=c[1],c=f;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(f);break}c[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(r,o)}catch(h){f=[6,h],i=0}finally{n=c=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ze=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ji=Object.defineProperty,$i=Object.defineProperties,Vi=Object.getOwnPropertyDescriptors,Dn=Object.getOwnPropertySymbols,Ki=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,Un=function(r,t,o){return t in r?ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))Ki.call(t,o)&&Un(r,o,t[o]);if(Dn)for(var n=0,i=Dn(t);n<i.length;n++){var o=i[n];qi.call(t,o)&&Un(r,o,t[o])}return r},kr=function(r,t){return $i(r,Vi(t))},Zi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(f){i(f)}},l=function(u){try{d(o.throw(u))}catch(f){i(f)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Yi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?He:He.apply(null,arguments)},Vc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Qi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function he(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}var Xi=(function(r){Hn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,ze([void 0],o[0].concat(this)))):new(t.bind.apply(t,ze([void 0],o.concat(this))))},t})(Array),Ji=(function(r){Hn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,ze([void 0],o[0].concat(this)))):new(t.bind.apply(t,ze([void 0],o.concat(this))))},t})(Array);function _r(r){return J(r)?Ft(r,function(){}):r}function es(r){return typeof r=="boolean"}function ts(){return function(t){return rs(t)}}function rs(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=r.actionCreatorCheck,u=d===void 0?!0:d,f=new Xi;if(o&&(es(o)?f.push(Tr):f.push(Tr.withExtraArgument(o.extraArgument))),0){if(i)var h;if(l)var y;if(u)var m}return f}var Lr=!0;function zn(r){var t=ts(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,f=o.preloadedState,h=f===void 0?void 0:f,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(Qi(i))v=Nn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Lr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Lr&&b.some(function(k){return typeof k!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=_n.apply(void 0,b),E=He;u&&(E=Yi(pe({trace:!Lr},typeof u=="object"&&u)));var w=new Ji(S),R=w;Array.isArray(m)?R=ze([S],m):typeof m=="function"&&(R=m(w));var N=E.apply(void 0,R);return Ir(v,h,N)}function Gn(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function os(r){return typeof r=="function"}function ns(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Gn(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(os(r))u=function(){return _r(r())};else{var f=_r(r);u=function(){return f}}function h(y,m){y===void 0&&(y=u());var v=ze([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ne(b)){var E=b,w=S(E,m);return w===void 0?b:w}else{if(J(b))return Ft(b,function(R){return S(R,m)});var w=S(b,m);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},y)}return h.getInitialState=u,h}function as(r,t){return r+"/"+t}function Wn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:_r(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(h){var y=n[h],m=as(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,c[h]=v,l[m]=v,d[h]=b?he(m,b):he(m)});function u(){var h=typeof r.extraReducers=="function"?Gn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],E=S===void 0?void 0:S,w=pe(pe({},m),l);return ns(o,function(R){for(var N in w)R.addCase(N,w[N]);for(var k=0,B=b;k<B.length;k++){var X=B[k];R.addMatcher(X.matcher,X.reducer)}E&&R.addDefaultCase(E)})}var f;return{name:t,reducer:function(h,y){return f||(f=u()),f(h,y)},actions:d,caseReducers:c,getInitialState:function(){return f||(f=u()),f.getInitialState()}}}var is="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ss=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=is[Math.random()*64|0];return t},cs=["name","message","stack","code"],Nr=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),Mn=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),ls=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=cs;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Yc=(function(){function r(t,o,n){var i=he(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:kr(pe({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),c=he(t+"/pending",function(h,y,m){return{payload:void 0,meta:kr(pe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=he(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||ls)(h||"Rejected"),meta:kr(pe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,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 f(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):ss(),S=new u,E,w=!1;function R(k){E=k,S.abort()}var N=(function(){return Zi(this,null,function(){var k,B,X,me,W,be,_e;return Wi(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),me=(k=n?.condition)==null?void 0:k.call(n,h,{getState:m,extra:v}),us(me)?[4,me]:[3,2];case 1:me=p.sent(),p.label=2;case 2:if(me===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,W=new Promise(function(g,O){return S.signal.addEventListener("abort",function(){return O({name:"AbortError",message:E||"Aborted"})})}),y(c(b,h,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([W,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(g,O){return new Nr(g,O)},fulfillWithValue:function(g,O){return new Mn(g,O)}})).then(function(g){if(g instanceof Nr)throw g;return g instanceof Mn?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return X=p.sent(),[3,5];case 4:return be=p.sent(),X=be instanceof Nr?l(null,b,h,be.payload,be.meta):l(be,b,h),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,_e||y(X),[2,X]}})})})();return Object.assign(N,{abort:R,requestId:b,arg:h,unwrap:function(){return N.then(ds)}})}}return Object.assign(f,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r})();function ds(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function us(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var jn="listener",$n="completed",Vn="cancelled",Qc="task-"+Vn,Xc="task-"+$n,Jc=jn+"-"+Vn,el=jn+"-"+$n;var Pr="listenerMiddleware";var tl=he(Pr+"/add"),rl=he(Pr+"/removeAll"),ol=he(Pr+"/remove");var Bn,nl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Bn||(Bn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},fs=function(r){return function(t){setTimeout(t,r)}},al=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fs(10);An();var ps=wt(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Ut=class extends ps(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kn=class r extends Ut{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Lt(c))return c;if(i==null)return;let l=Wn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=zn({reducer:(u,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=dt(l.getInitialState());for(let y of f.keeping)h[y]=(u??h)[y];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...f.overwrites};return l.reducer(u,f)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Rt;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,f=c[u];return f?(...h)=>{let y=f(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Mt=class{static format(t,o,n,i,c){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!c)):this.getIntlDateTime(t,o,n,i,!!c)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,c){let l=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(l),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(l);return c?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Bt=A(_()),hs="ft-app-info",Ge=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};Ge.eventName="authentication-change";var gt=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};gt.eventName="ui-locale-changed";var ys={session:(r,t)=>{(0,Bt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>I.dispatchEvent(new Ge(t.payload)),0))}},I=Bt.FtReduxStore.get({name:hs,reducers:ys,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!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 qn=A(_()),Ht=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},_l=(0,qn.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,c;return((c=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1)?d=>Mt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ht([(0,Fr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ht([(0,Fr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ht([ur({store:I.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Ht([ur({store:I.name})],t.prototype,"uiLocale",void 0),t});var $t=A(_());var Dr=A(_());var Ae=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=I.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=I.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var We=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ae.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ae.await()}};var j=class extends We{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(c,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Dr.CacheRegistry,this.cache=t?i.commonCache:new Dr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var zt=class extends j{async listMySearches(){let{session:t}=I.getState();return tn(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Gt=class extends j{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Wt=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var jt=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var gs="ft-user-assets",ms={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Mr(r,o,[...Ur(r,o),i]),Zn(r,o,1,n),Yn(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;Mr(r,o,Ur(r,o).map(i=>i.id===n.id?n:i)),Yn(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Mr(r,o,Ur(r,o).filter(c=>c.id!==i)),Zn(r,o,-1,n)}},Qn={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},Ur=(r,t)=>{var o;let n=Qn[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},Mr=(r,t,o)=>{let n=Qn[t];n&&(r[n]=o)},Zn=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===q.BOOKMARKS&&n)){let c=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,c+o)}},Yn=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},V=$t.FtReduxStore.get({name:gs,reducers:ms,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Br=class{constructor(t=new Wt,o=new jt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gt,this.savedSearchesService=new zt,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=I.getState();(0,$t.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),V.actions.clearAssetCount(),V.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),V.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),V.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();V.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();V.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&V.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&V.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(V.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&o&&V.actions.clearBookmarkCountByMap(),V.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;V.actions.bookmarks(o)}}},bs=new Br;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=bs);var Hr=class{addCommand(t,o=!1){I.commands.add(t,o)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Hr;var Y=A(_());var Xn,je=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},xs=Symbol("clearAfterUnitTest"),Vt=class extends(0,Y.withEventBus)(j){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Xn]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let c=t.toLowerCase(),l=this.resolveContext(c);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new je({loadedContexts:t})),this.dispatchEvent(new je({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new je({loadedContexts:[t]})),this.dispatchEvent(new je({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};Xn=xs;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Vt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Vt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Jn=window.FluidTopicsI18nService,hd=window.FluidTopicsCustomI18nService;var ea=A(_()),zr=class{highlightHtml(t,o,n){(0,ea.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new zr;var ta=A(_());var Gr=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=I.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c,l;if(t==null)return"";try{return ta.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1,(l=o?.onlyTime)!==null&&l!==void 0?l:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new Gr;var ra=A(_());var mt=class{static get(t,o){var n,i;let c=I.getState(),{lang:l,region:d}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ra.SearchPlaceConverter(c.baseUrl,t??20,c.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var Wr=class{urlToSearchRequest(t){return mt.get().parse(t)}searchRequestToUrl(t){return mt.get().serialize(t)}};window.FluidTopicsUrlService=new Wr;var ae=A(_());var Ee=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ee.eventName="change";var jr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},oa=new jr;var Kt=class r extends ae.WithEventBus{static build(){return new r(window.history,oa,()=>window.location,!1)}constructor(t,o,n,i){var c,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(c=t.state)===null||c===void 0?void 0:c.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ae.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ee(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[c,l,d])=>{let u=o(),f={...u===this.currentIndex?this.currentState:void 0,...c,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[f,l,d]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ee.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ee.eventName,t)}currentItem(){return(0,ae.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ae.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ae.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ae.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,c=t+1;for(;this.states.length>c&&!this.isDifferentMajorState(c,n);)this.hasState(c)&&(i=c),c++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,c=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return c==null||c!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var na=A(oe());var aa=na.css`
2
+ `)===0?L.substr(1,L.length):L}).forEach(function(L){var F=L.split(":"),T=F.shift().trim();if(T){var Ct=F.join(":").trim();try{g.append(T,Ct)}catch(ar){console.warn("Response "+ar.message)}}}),g}R.call(B.prototype);function W(p,g){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(p)}R.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},W.error=function(){var p=new W(null,{status:200,statusText:""});return p.ok=!1,p.status=0,p.type="error",p};var be=[301,302,303,307,308];W.redirect=function(p,g){if(be.indexOf(g)===-1)throw new RangeError("Invalid status code");return new W(null,{status:g,headers:{location:p}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,O){this.message=g,this.name=O;var L=Error(g);this.stack=L.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function _e(p,g){return new Promise(function(O,L){var F=new B(p,g);if(F.signal&&F.signal.aborted)return L(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function Ct(){T.abort()}T.onload=function(){var H={statusText:T.statusText,headers:me(T.getAllResponseHeaders()||"")};F.url.indexOf("file://")===0&&(T.status<200||T.status>599)?H.status=200:H.status=T.status,H.url="responseURL"in T?T.responseURL:H.headers.get("X-Request-URL");var xe="response"in T?T.response:T.responseText;setTimeout(function(){O(new W(xe,H))},0)},T.onerror=function(){setTimeout(function(){L(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){L(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){L(new o.DOMException("Aborted","AbortError"))},0)};function ar(H){try{return H===""&&n.location.href?n.location.href:H}catch{return H}}if(T.open(F.method,ar(F.url),!0),F.credentials==="include"?T.withCredentials=!0:F.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(i.blob?T.responseType="blob":i.arrayBuffer&&(T.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var po=[];Object.getOwnPropertyNames(g.headers).forEach(function(H){po.push(u(H)),T.setRequestHeader(H,f(g.headers[H]))}),F.headers.forEach(function(H,xe){po.indexOf(xe)===-1&&T.setRequestHeader(xe,H)})}else F.headers.forEach(function(H,xe){T.setRequestHeader(xe,H)});F.signal&&(F.signal.addEventListener("abort",Ct),T.onreadystatechange=function(){T.readyState===4&&F.signal.removeEventListener("abort",Ct)}),T.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return _e.polyfill=!0,n.fetch||(n.fetch=_e,n.Headers=y,n.Request=B,n.Response=W),o.Headers=y,o.Request=B,o.Response=W,o.fetch=_e,o})({})})(At);At.fetch.ponyfill=!0;delete At.fetch.polyfill;var Pe=Ot.fetch?Ot:At;le=Pe.fetch;le.default=Pe.fetch;le.fetch=Pe.fetch;le.Headers=Pe.Headers;le.Request=Pe.Request;le.Response=Pe.Response;bo.exports=le});var ga=lt((Gu,ya)=>{ya.exports=ftGlobals.litUnsafeHTML});var bi=A(_());var fo=A(oe()),yi=A(_());var er=A(_());var $e=A(_()),qr=A(ee());var ir;(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ir||(ir={}));var Ie=A(_());var Ei=A(_());var Ri=A(xo(),1);var vo;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(vo||(vo={}));var So;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(So||(So={}));var Co;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Co||(Co={}));var Oo;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Oo||(Oo={}));var Ao;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Ao||(Ao={}));var Eo;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Eo||(Eo={}));var wo;(function(r){r.OFFICIAL="OFFICIAL",r.AI="AI"})(wo||(wo={}));var Ro;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Ro||(Ro={}));var Io;(function(r){r.STANDARD="STANDARD",r.STRUCTURAL="STRUCTURAL"})(Io||(Io={}));var To;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(To||(To={}));var ko;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(ko||(ko={}));var Lo;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Lo||(Lo={}));var No;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(No||(No={}));var _o;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_o||(_o={}));var Po;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Po||(Po={}));var Fo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Fo||(Fo={}));var sr;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(sr||(sr={}));var Do;(function(r){r.ASC="ASC",r.DESC="DESC"})(Do||(Do={}));var Uo;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Uo||(Uo={}));var cr;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(cr||(cr={}));var Mo;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Mo||(Mo={}));var Bo;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Bo||(Bo={}));var Ho;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ho||(Ho={}));var zo;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(zo||(zo={}));var Go;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Go||(Go={}));var lr;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(lr||(lr={}));var Wo;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wo||(Wo={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(q||(q={}));var jo;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(jo||(jo={}));var $o;(function(r){r.VALID="VALID",r.INVALID="INVALID"})($o||($o={}));var Vo;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Vo||(Vo={}));var Ko;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(Ko||(Ko={}));var qo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(qo||(qo={}));var Zo;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Zo||(Zo={}));var Yo;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Yo||(Yo={}));var Qo;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Qo||(Qo={}));var Xo;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(Xo||(Xo={}));var Jo;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jo||(Jo={}));var wi={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function en(r,t){return r===t||(wi[r]??[]).some(o=>en(o,t))}function tn(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>en(n,t))}var Fr=A(ee());var rn=A(ee(),1);var dr=r=>t=>{window.customElements.get(r)||window.customElements.define(r,t)};function on(r,t){return(0,rn.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return dt(r);try{return JSON.parse(o)}catch{return dt(r)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ut,...t??{}})}function Ii(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Et(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Et(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let i=l=>Object.keys(l).filter(d=>l[d]!=null),c=i(r);if(o=c.length,o!==i(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=o;n--!==0;){let l=c[n];if(!Et(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Et(r,t){try{return Ii(r,t)}catch{return!1}}function ut(r,t){return!Et(r,t)}function dt(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function wt(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var nn=A(ee(),1);var ur=r=>{let t=r??{};return(o,n)=>{var i;let c={hasChanged:ut,attribute:!1,...t};(0,nn.property)(c)(o,n);let l=o.constructor;l.reduxProperties=new Map(l.reduxProperties),l.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(d=>d[n]),store:t.store})}};var Rt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var ve=A(ee(),1);var It=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),c=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sn=A(oe(),1);var Tt=globalThis,Ti=Tt.ShadowRoot&&(Tt.ShadyCSS===void 0||Tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var an=(r,t)=>{if(Ti)r.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),i=Tt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var kt=class extends sn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return an(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){dr(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function cn(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var De=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},fn,ln=Symbol("constructorPrototype"),dn=Symbol("constructorName"),pn=Symbol("exportpartsDebouncer"),un=Symbol("dynamicDependenciesLoaded"),Fe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Fe.eventName="exportparts-updated";var te=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[fn]=new It(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[pn].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[dn]=this.constructor.name,this[ln]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[dn]&&Object.setPrototypeOf(this,this[ln])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[un]||(o[un]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Fe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Fe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Fe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=cn(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=m=>m!=null&&m.trim().length>0,f=t.filter(u).map(m=>m.trim());if(f.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(E=>E.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(E=>E.trim());for(let E of S)h.add(E)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>f.map(v=>`${m}:${v}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};fn=pn;De([(0,ve.property)()],te.prototype,"exportpartsPrefix",void 0);De([on([])],te.prototype,"exportpartsPrefixes",void 0);De([(0,ve.property)({reflect:!0})],te.prototype,"exportparts",void 0);De([(0,ve.property)()],te.prototype,"customStylesheet",void 0);De([(0,ve.property)()],te.prototype,"elementToFocus",void 0);De([(0,ve.state)()],te.prototype,"useAdoptedStyleSheets",void 0);function Lt(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var ft=Symbol("internalReduxEventsUnsubscribers"),de=Symbol("internalStoresUnsubscribers"),Se=Symbol("internalStores"),ki=wt(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=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[Se].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Se].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Se].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Se].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Se].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Se].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 f=this.getStore(l.store);f&&(l.store?this[de].has(l.store):this[de].size>0)&&(this[d]=l.selector(f.getState(),this))}})}subscribeToStore(l,d){var u;this[de].set(l,d.subscribe(()=>this.updateFromStores())),this[ft].set(l,[]),Lt(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||d.name===f.store)){let y=m=>this[h](m);d.addEventListener(f.eventName,y),this[ft].get(l).push(()=>d.removeEventListener(f.eventName,y))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[de].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[de].has(l)&&this[de].get(l)(),this[de].delete(l),(d=this[ft].get(l))===null||d===void 0||d.forEach(u=>u()),this[ft].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=de,o=Se,n=ft,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),hn=class extends ki(te){};function Z(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ne(r){return!!r&&!!r[P]}function J(r){var t;return!!r&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Mi})(r)||Array.isArray(r)||!!r[Sn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Sn])||vr(r)||Sr(r))}function Ce(r,t,o){o===void 0&&(o=!1),Be(r)===0?(o?Object.keys:Me)(r).forEach((function(n){o&&typeof n=="symbol"||t(n,r[n],r)})):r.forEach((function(n,i){return t(i,n,r)}))}function Be(r){var t=r[P];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:vr(r)?2:Sr(r)?3:0}function Ue(r,t){return Be(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Li(r,t){return Be(r)===2?r.get(t):r[t]}function Cn(r,t,o){var n=Be(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function On(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function vr(r){return Di&&r instanceof Map}function Sr(r){return Ui&&r instanceof Set}function ue(r){return r.o||r.t}function Cr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=wn(r);delete t[P];for(var o=Me(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Or(r,t){return t===void 0&&(t=!1),Ar(r)||ne(r)||!J(r)||(Be(r)>1&&(r.set=r.add=r.clear=r.delete=Ni),Object.freeze(r),t&&Ce(r,(function(o,n){return Or(n,!0)}),!0)),r}function Ni(){Z(2)}function Ar(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function re(r){var t=xr[r];return t||Z(18,r),t}function _i(r,t){xr[r]||(xr[r]=t)}function gr(){return ht}function fr(r,t){t&&(re("Patches"),r.u=[],r.s=[],r.v=t)}function Nt(r){mr(r),r.p.forEach(Pi),r.p=null}function mr(r){r===ht&&(ht=r.l)}function yn(r){return ht={p:[],l:ht,h:r,m:!0,_:0}}function Pi(r){var t=r[P];t.i===0||t.i===1?t.j():t.g=!0}function pr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||re("ES5").S(t,r,n),n?(o[P].P&&(Nt(t),Z(4)),J(r)&&(r=_t(t,r),t.l||Pt(t,r)),t.u&&re("Patches").M(o[P].t,r,t.u,t.s)):r=_t(t,o,[]),Nt(t),t.u&&t.v(t.u,t.s),r!==En?r:void 0}function _t(r,t,o){if(Ar(t))return t;var n=t[P];if(!n)return Ce(t,(function(d,u){return gn(r,n,t,d,u,o)}),!0),t;if(n.A!==r)return t;if(!n.P)return Pt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Cr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Ce(c,(function(d,u){return gn(r,n,i,d,u,o,l)})),Pt(r,i,!1),o&&r.u&&re("Patches").N(n,o,r.u,r.s)}return n.o}function gn(r,t,o,n,i,c,l){if(ne(i)){var d=_t(r,i,c&&t&&t.i!==3&&!Ue(t.R,n)?c.concat(n):void 0);if(Cn(o,n,d),!ne(d))return;r.m=!1}else l&&o.add(i);if(J(i)&&!Ar(i)){if(!r.h.D&&r._<1)return;_t(r,i),t&&t.A.l||Pt(r,i)}}function Pt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Or(t,o)}function hr(r,t){var o=r[P];return(o?ue(o):r)[t]}function mn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function fe(r){r.P||(r.P=!0,r.l&&fe(r.l))}function yr(r){r.o||(r.o=Cr(r.t))}function br(r,t,o){var n=vr(t)?re("MapSet").F(t,o):Sr(t)?re("MapSet").T(t,o):r.O?(function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:gr(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,f=yt;l&&(u=[d],f=pt);var h=Proxy.revocable(u,f),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m})(t,o):re("ES5").J(t,o);return(o?o.A:gr()).p.push(n),n}function Fi(r){return ne(r)||Z(22,r),(function t(o){if(!J(o))return o;var n,i=o[P],c=Be(o);if(i){if(!i.P&&(i.i<4||!re("ES5").K(i)))return i.t;i.I=!0,n=bn(o,c),i.I=!1}else n=bn(o,c);return Ce(n,(function(l,d){i&&Li(i.t,l)===d||Cn(n,l,t(d))})),c===3?new Set(n):n})(r)}function bn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Cr(r)}function An(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var f=this[P];return yt.get(f,l)},set:function(f){var h=this[P];yt.set(h,l,f)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][P];if(!u.P)switch(u.i){case 5:n(u)&&fe(u);break;case 4:o(u)&&fe(u)}}}function o(l){for(var d=l.t,u=l.k,f=Me(u),h=f.length-1;h>=0;h--){var y=f[h];if(y!==P){var m=d[y];if(m===void 0&&!Ue(d,y))return!0;var v=u[y],b=v&&v[P];if(b?b.t!==m:!On(v,m))return!0}}var S=!!d[P];return f.length!==Me(d).length+(S?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 f=0;f<d.length;f++)if(!d.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Z(3,JSON.stringify(ue(l)))}var c={};_i("ES5",{J:function(l,d){var u=Array.isArray(l),f=(function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=wn(m);delete S[P];for(var E=Me(S),w=0;w<E.length;w++){var R=E[w];S[R]=r(R,y||!!S[R].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(u,l),h={i:u?5:4,A:d?d.A:gr(),P:!1,I:!1,R:{},l:d,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,P,{value:h,writable:!0}),f},S:function(l,d,u){u?ne(d)&&d[P].A===l&&t(l.p):(l.u&&(function f(h){if(h&&typeof h=="object"){var y=h[P];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Ce(v,(function(k){k!==P&&(m[k]!==void 0||Ue(m,k)?b[k]||f(v[k]):(b[k]=!0,fe(y)))})),Ce(m,(function(k){v[k]!==void 0||Ue(v,k)||(b[k]=!1,fe(y))}));else if(S===5){if(n(y)&&(fe(y),b.length=!0),v.length<m.length)for(var E=v.length;E<m.length;E++)b[E]=!1;else for(var w=m.length;w<v.length;w++)b[w]=!0;for(var R=Math.min(v.length,m.length),N=0;N<R;N++)v.hasOwnProperty(N)||(b[N]=!0),b[N]===void 0&&f(v[N])}}}})(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var xn,ht,Er=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Di=typeof Map<"u",Ui=typeof Set<"u",vn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",En=Er?Symbol.for("immer-nothing"):((xn={})["immer-nothing"]=!0,xn),Sn=Er?Symbol.for("immer-draftable"):"__$immer_draftable",P=Er?Symbol.for("immer-state"):"__$immer_state";var Mi=""+Object.prototype.constructor,Me=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,wn=Object.getOwnPropertyDescriptors||function(r){var t={};return Me(r).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)})),t},xr={},yt={get:function(r,t){if(t===P)return r;var o=ue(r);if(!Ue(o,t))return(function(i,c,l){var d,u=mn(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0})(r,o,t);var n=o[t];return r.I||!J(n)?n:n===hr(r.t,t)?(yr(r),r.o[t]=br(r.A.h,n,r)):n},has:function(r,t){return t in ue(r)},ownKeys:function(r){return Reflect.ownKeys(ue(r))},set:function(r,t,o){var n=mn(ue(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=hr(ue(r),t),c=i?.[P];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(On(o,i)&&(o!==void 0||Ue(r.t,t)))return!0;yr(r),fe(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return hr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,yr(r),fe(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ue(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Z(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Z(12)}},pt={};Ce(yt,(function(r,t){pt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),pt.deleteProperty=function(r,t){return pt.set.call(this,r,t,void 0)},pt.set=function(r,t,o){return yt.set.call(this,r[0],t,o,r[0])};var Bi=(function(){function r(o){var n=this;this.O=vn,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var E=this;S===void 0&&(S=d);for(var w=arguments.length,R=Array(w>1?w-1:0),N=1;N<w;N++)R[N-1]=arguments[N];return u.produce(S,(function(k){var B;return(B=c).call.apply(B,[E,k].concat(R))}))}}var f;if(typeof c!="function"&&Z(6),l!==void 0&&typeof l!="function"&&Z(7),J(i)){var h=yn(n),y=br(n,i,void 0),m=!0;try{f=c(y),m=!1}finally{m?Nt(h):mr(h)}return typeof Promise<"u"&&f instanceof Promise?f.then((function(S){return fr(h,l),pr(S,h)}),(function(S){throw Nt(h),S})):(fr(h,l),pr(f,h))}if(!i||typeof i!="object"){if((f=c(i))===void 0&&(f=i),f===En&&(f=void 0),n.D&&Or(f,!0),l){var v=[],b=[];re("Patches").M(i,f,v,b),l(v,b)}return f}Z(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(f){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(f,(function(v){return i.apply(void 0,[v].concat(y))}))};var l,d,u=n.produce(i,c,(function(f,h){l=f,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(f){return[f,l,d]})):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){J(o)||Z(8),ne(o)&&(o=Fi(o));var n=yn(this),i=br(this,o,void 0);return i[P].C=!0,mr(n),i},t.finishDraft=function(o,n){var i=o&&o[P],c=i.A;return fr(c,n),pr(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!vn&&Z(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=re("Patches").$;return ne(o)?l(o,n):this.produce(o,(function(d){return l(d,n)}))},r})(),$=new Bi,Hi=$.produce,Oc=$.produceWithPatches.bind($),Ac=$.setAutoFreeze.bind($),Ec=$.setUseProxies.bind($),wc=$.applyPatches.bind($),Rc=$.createDraft.bind($),Ic=$.finishDraft.bind($),Ft=Hi;function Oe(r){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(r)}function Rn(r,t){if(Oe(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(Oe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function In(r){var t=Rn(r,"string");return Oe(t)=="symbol"?t:t+""}function Tn(r,t,o){return(t=In(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function kn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function wr(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?kn(Object(o),!0).forEach(function(n){Tn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):kn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function z(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Ln=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Rr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Dt={INIT:"@@redux/INIT"+Rr(),REPLACE:"@@redux/REPLACE"+Rr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Rr()}};function zi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Ir(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(z(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(z(1));return o(Ir)(r,t)}if(typeof r!="function")throw new Error(z(2));var i=r,c=t,l=[],d=l,u=!1;function f(){d===l&&(d=l.slice())}function h(){if(u)throw new Error(z(3));return c}function y(S){if(typeof S!="function")throw new Error(z(4));if(u)throw new Error(z(5));var E=!0;return f(),d.push(S),function(){if(E){if(u)throw new Error(z(6));E=!1,f();var R=d.indexOf(S);d.splice(R,1),l=null}}}function m(S){if(!zi(S))throw new Error(z(7));if(typeof S.type>"u")throw new Error(z(8));if(u)throw new Error(z(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var E=l=d,w=0;w<E.length;w++){var R=E[w];R()}return S}function v(S){if(typeof S!="function")throw new Error(z(10));i=S,m({type:Dt.REPLACE})}function b(){var S,E=y;return S={subscribe:function(R){if(typeof R!="object"||R===null)throw new Error(z(11));function N(){R.next&&R.next(h())}N();var k=E(N);return{unsubscribe:k}}},S[Ln]=function(){return this},S}return m({type:Dt.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[Ln]=b,n}function Gi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Dt.INIT});if(typeof n>"u")throw new Error(z(12));if(typeof o(void 0,{type:Dt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(z(13))})}function Nn(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Gi(o)}catch(u){d=u}return function(f,h){if(f===void 0&&(f={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<c.length;b++){var S=c[b],E=o[S],w=f[S],R=E(w,h);if(typeof R>"u"){var N=h&&h.type;throw new Error(z(14))}v[S]=R,m=m||R!==w}return m=m||c.length!==Object.keys(f).length,m?v:f}}function He(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function _n(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(z(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=He.apply(void 0,d)(i.dispatch),wr(wr({},i),{},{dispatch:c})}}}function Pn(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var Fn=Pn();Fn.withExtraArgument=Pn;var Tr=Fn;var Hn=(function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),Wi=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(f){return function(h){return u([f,h])}}function u(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=f[0]&2?i.return:f[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,f[1])).done)return c;switch(i=0,c&&(f=[f[0]&2,c.value]),f[0]){case 0:case 1:c=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!c||f[1]>c[0]&&f[1]<c[3])){o.label=f[1];break}if(f[0]===6&&o.label<c[1]){o.label=c[1],c=f;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(f);break}c[2]&&o.ops.pop(),o.trys.pop();continue}f=t.call(r,o)}catch(h){f=[6,h],i=0}finally{n=c=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ze=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},ji=Object.defineProperty,$i=Object.defineProperties,Vi=Object.getOwnPropertyDescriptors,Dn=Object.getOwnPropertySymbols,Ki=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,Un=function(r,t,o){return t in r?ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))Ki.call(t,o)&&Un(r,o,t[o]);if(Dn)for(var n=0,i=Dn(t);n<i.length;n++){var o=i[n];qi.call(t,o)&&Un(r,o,t[o])}return r},kr=function(r,t){return $i(r,Vi(t))},Zi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(f){i(f)}},l=function(u){try{d(o.throw(u))}catch(f){i(f)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var Yi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?He:He.apply(null,arguments)},Vc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Qi(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function he(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}var Xi=(function(r){Hn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,ze([void 0],o[0].concat(this)))):new(t.bind.apply(t,ze([void 0],o.concat(this))))},t})(Array),Ji=(function(r){Hn(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,ze([void 0],o[0].concat(this)))):new(t.bind.apply(t,ze([void 0],o.concat(this))))},t})(Array);function _r(r){return J(r)?Ft(r,function(){}):r}function es(r){return typeof r=="boolean"}function ts(){return function(t){return rs(t)}}function rs(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=r.actionCreatorCheck,u=d===void 0?!0:d,f=new Xi;if(o&&(es(o)?f.push(Tr):f.push(Tr.withExtraArgument(o.extraArgument))),0){if(i)var h;if(l)var y;if(u)var m}return f}var Lr=!0;function zn(r){var t=ts(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,f=o.preloadedState,h=f===void 0?void 0:f,y=o.enhancers,m=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(Qi(i))v=Nn(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!Lr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Lr&&b.some(function(k){return typeof k!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=_n.apply(void 0,b),E=He;u&&(E=Yi(pe({trace:!Lr},typeof u=="object"&&u)));var w=new Ji(S),R=w;Array.isArray(m)?R=ze([S],m):typeof m=="function"&&(R=m(w));var N=E.apply(void 0,R);return Ir(v,h,N)}function Gn(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function os(r){return typeof r=="function"}function ns(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Gn(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(os(r))u=function(){return _r(r())};else{var f=_r(r);u=function(){return f}}function h(y,m){y===void 0&&(y=u());var v=ze([c[m.type]],l.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ne(b)){var E=b,w=S(E,m);return w===void 0?b:w}else{if(J(b))return Ft(b,function(R){return S(R,m)});var w=S(b,m);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},y)}return h.getInitialState=u,h}function as(r,t){return r+"/"+t}function Wn(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:_r(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(h){var y=n[h],m=as(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,c[h]=v,l[m]=v,d[h]=b?he(m,b):he(m)});function u(){var h=typeof r.extraReducers=="function"?Gn(r.extraReducers):[r.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],E=S===void 0?void 0:S,w=pe(pe({},m),l);return ns(o,function(R){for(var N in w)R.addCase(N,w[N]);for(var k=0,B=b;k<B.length;k++){var X=B[k];R.addMatcher(X.matcher,X.reducer)}E&&R.addDefaultCase(E)})}var f;return{name:t,reducer:function(h,y){return f||(f=u()),f(h,y)},actions:d,caseReducers:c,getInitialState:function(){return f||(f=u()),f.getInitialState()}}}var is="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ss=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=is[Math.random()*64|0];return t},cs=["name","message","stack","code"],Nr=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),Mn=(function(){function r(t,o){this.payload=t,this.meta=o}return r})(),ls=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=cs;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Yc=(function(){function r(t,o,n){var i=he(t+"/fulfilled",function(h,y,m,v){return{payload:h,meta:kr(pe({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),c=he(t+"/pending",function(h,y,m){return{payload:void 0,meta:kr(pe({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=he(t+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||ls)(h||"Rejected"),meta:kr(pe({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,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 f(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):ss(),S=new u,E,w=!1;function R(k){E=k,S.abort()}var N=(function(){return Zi(this,null,function(){var k,B,X,me,W,be,_e;return Wi(this,function(p){switch(p.label){case 0:return p.trys.push([0,4,,5]),me=(k=n?.condition)==null?void 0:k.call(n,h,{getState:m,extra:v}),us(me)?[4,me]:[3,2];case 1:me=p.sent(),p.label=2;case 2:if(me===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,W=new Promise(function(g,O){return S.signal.addEventListener("abort",function(){return O({name:"AbortError",message:E||"Aborted"})})}),y(c(b,h,(B=n?.getPendingMeta)==null?void 0:B.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([W,Promise.resolve(o(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:R,rejectWithValue:function(g,O){return new Nr(g,O)},fulfillWithValue:function(g,O){return new Mn(g,O)}})).then(function(g){if(g instanceof Nr)throw g;return g instanceof Mn?i(g.payload,b,h,g.meta):i(g,b,h)})])];case 3:return X=p.sent(),[3,5];case 4:return be=p.sent(),X=be instanceof Nr?l(null,b,h,be.payload,be.meta):l(be,b,h),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&l.match(X)&&X.meta.condition,_e||y(X),[2,X]}})})})();return Object.assign(N,{abort:R,requestId:b,arg:h,unwrap:function(){return N.then(ds)}})}}return Object.assign(f,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r})();function ds(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function us(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var jn="listener",$n="completed",Vn="cancelled",Qc="task-"+Vn,Xc="task-"+$n,Jc=jn+"-"+Vn,el=jn+"-"+$n;var Pr="listenerMiddleware";var tl=he(Pr+"/add"),rl=he(Pr+"/removeAll"),ol=he(Pr+"/remove");var Bn,nl=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Bn||(Bn=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},fs=function(r){return function(t){setTimeout(t,r)}},al=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fs(10);An();var ps=wt(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Ut=class extends ps(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kn=class r extends Ut{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Lt(c))return c;if(i==null)return;let l=Wn({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=zn({reducer:(u,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=dt(l.getInitialState());for(let y of f.keeping)h[y]=(u??h)[y];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...f.overwrites};return l.reducer(u,f)}});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Rt;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,f=c[u];return f?(...h)=>{let y=f(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Mt=class{static format(t,o,n,i,c){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!c)):this.getIntlDateTime(t,o,n,i,!!c)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,c){let l=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(l),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(l);return c?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Bt=A(_()),hs="ft-app-info",Ge=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};Ge.eventName="authentication-change";var gt=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};gt.eventName="ui-locale-changed";var ys={session:(r,t)=>{(0,Bt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>I.dispatchEvent(new Ge(t.payload)),0))}},I=Bt.FtReduxStore.get({name:hs,reducers:ys,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!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 qn=A(_()),Ht=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},_l=(0,qn.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,c;return((c=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1)?d=>Mt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ht([(0,Fr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ht([(0,Fr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ht([ur({store:I.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Ht([ur({store:I.name})],t.prototype,"uiLocale",void 0),t});var $t=A(_());var Dr=A(_());var Ae=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=I.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=I.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var We=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ae.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ae.await()}};var j=class extends We{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(c,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Dr.CacheRegistry,this.cache=t?i.commonCache:new Dr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var zt=class extends j{async listMySearches(){let{session:t}=I.getState();return tn(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Gt=class extends j{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Wt=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var jt=class extends j{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=I.getState().session;return!!t?.sessionAuthenticated}};var gs="ft-user-assets",ms={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;Mr(r,o,[...Ur(r,o),i]),Zn(r,o,1,n),Yn(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;Mr(r,o,Ur(r,o).map(i=>i.id===n.id?n:i)),Yn(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;Mr(r,o,Ur(r,o).filter(c=>c.id!==i)),Zn(r,o,-1,n)}},Qn={[q.SEARCHES]:"savedSearches",[q.BOOKMARKS]:"bookmarks",[q.BOOKS]:void 0,[q.COLLECTIONS]:void 0},Ur=(r,t)=>{var o;let n=Qn[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},Mr=(r,t,o)=>{let n=Qn[t];n&&(r[n]=o)},Zn=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===q.BOOKMARKS&&n)){let c=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,c+o)}},Yn=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},V=$t.FtReduxStore.get({name:gs,reducers:ms,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Br=class{constructor(t=new Wt,o=new jt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gt,this.savedSearchesService=new zt,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=I.getState();(0,$t.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),V.actions.clearAssetCount(),V.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),V.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),V.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();V.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();V.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&V.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&V.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(V.getState().assetCounts.bookmarkByMap).length!==0;t===q.BOOKMARKS&&o&&V.actions.clearBookmarkCountByMap(),V.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;V.actions.bookmarks(o)}}},bs=new Br;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=bs);var Hr=class{addCommand(t,o=!1){I.commands.add(t,o)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Hr;var Y=A(_());var Xn,je=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},xs=Symbol("clearAfterUnitTest"),Vt=class extends(0,Y.withEventBus)(j){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Xn]=()=>{this.defaultMessages={},this.cache=new Y.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Y.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let c=t.toLowerCase(),l=this.resolveContext(c);return new Y.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof Y.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new je({loadedContexts:t})),this.dispatchEvent(new je({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new je({loadedContexts:[t]})),this.dispatchEvent(new je({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Y.delay)(0).then(()=>n()).catch(()=>null)))}};Xn=xs;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Vt{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Vt{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Jn=window.FluidTopicsI18nService,hd=window.FluidTopicsCustomI18nService;var ea=A(_()),zr=class{highlightHtml(t,o,n){(0,ea.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new zr;var ta=A(_());var Gr=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=I.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c,l;if(t==null)return"";try{return ta.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1,(l=o?.onlyTime)!==null&&l!==void 0?l:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new Gr;var ra=A(_());var mt=class{static get(t,o){var n,i;let c=I.getState(),{lang:l,region:d}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ra.SearchPlaceConverter(c.baseUrl,t??20,c.searchInAllLanguagesAllowed,o??`${l}-${d}`)}};var Wr=class{urlToSearchRequest(t){return mt.get().parse(t)}searchRequestToUrl(t){return mt.get().serialize(t)}};window.FluidTopicsUrlService=new Wr;var ae=A(_());var Ee=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Ee.eventName="change";var jr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},oa=new jr;var Kt=class r extends ae.WithEventBus{static build(){return new r(window.history,oa,()=>window.location,!1)}constructor(t,o,n,i){var c,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(c=t.state)===null||c===void 0?void 0:c.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ae.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ee(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[c,l,d])=>{let u=o(),f={...u===this.currentIndex?this.currentState:void 0,...c,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[f,l,d]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ee.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ee.eventName,t)}currentItem(){return(0,ae.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ae.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ae.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ae.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,c=t+1;for(;this.states.length>c&&!this.isDifferentMajorState(c,n);)this.hasState(c)&&(i=c),c++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,c=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return c==null||c!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var na=A(oe());var aa=na.css`
3
3
  `;var sa=A(oe()),K=A(ee()),Re=A(_());var we=A(_());function ia(r,t){let{authenticationRequired:o,session:n}=I.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):r()}var qt=class extends We{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var $r=class r extends we.FtStateManager{static build(t){return new r(I,t)}constructor(t,o){super(),this.store=t,this.cache=new we.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new qt,this.cleanSessionDebouncer=new we.Debouncer,this.reloadDebouncer=new we.Debouncer(500),this.apiProvider=o??(()=>Ae.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ge.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>ia(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,i,c,l;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((i=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsSearchLanguage((c=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&c!==void 0?c:!1),this.store.actions.uiLanguageSetsReaderLanguage((l=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&l!==void 0?l:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new gt(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Vr=$r.build();var G=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},D=class extends Re.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Vr}render(){return sa.html`
4
4
  <slot></slot>
5
5
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService()}disconnectedCallback(){super.disconnectedCallback()}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Jn.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};D.elementDefinitions={};D.styles=aa;G([(0,K.property)()],D.prototype,"baseUrl",void 0);G([(0,K.property)()],D.prototype,"apiIntegrationIdentifier",void 0);G([(0,K.property)()],D.prototype,"apiIntegrationAppVersion",void 0);G([(0,K.property)()],D.prototype,"uiLocale",void 0);G([(0,Re.jsonProperty)(null)],D.prototype,"availableUiLocales",void 0);G([(0,Re.jsonProperty)(null)],D.prototype,"metadataConfiguration",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"editorMode",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"noCustom",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"openExternalDocumentInNewTab",void 0);G([(0,K.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],D.prototype,"noCustomComponent",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"withManualResources",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"navigatorOnline",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"forcedOffline",void 0);G([(0,K.property)({type:Boolean})],D.prototype,"authenticationRequired",void 0);G([(0,Re.jsonProperty)([])],D.prototype,"messageContexts",void 0);G([(0,Re.jsonProperty)(void 0)],D.prototype,"session",void 0);var la=A(_());var ca={"ft-app-context":D};(0,la.customElements)(ca);var Zt=class r extends Event{constructor(){super(r.eventName)}};Zt.eventName="search-context-clear-all-filters";var da=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Zr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ua=Symbol("registerInterval"),Kr=Symbol("registerAttempts"),vs=40,Ss=(0,$e.applyMixinOnce)(Symbol("toFtSearchComponent"),function(r){class t extends r{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var i,c,l;super.willUpdate(n),n.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(c=n.get("neededSearchRequests"))!==null&&c!==void 0?c:[]),(l=this.stateManager)===null||l===void 0||l.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Kr]=0,this.tryToRegisterToContext(),this[ua]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Kr]>vs?window.clearInterval(this[ua]):(this[Kr]++,this.dispatchEvent(new Zr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return da([(0,qr.state)()],t.prototype,"stateManager",void 0),da([(0,qr.state)({hasChanged:$e.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Yt=class extends Ss($e.FtLitElementRedux){};var Xt=A(ee()),Qt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Qr=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Yr=Symbol("registerInterval"),Cs=(0,er.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(r){var t;class o extends r{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Yr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Yr]):this.dispatchEvent(new Qr)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Yr,Qt([(0,Xt.property)({attribute:!1})],o.prototype,"cluster",void 0),Qt([(0,Xt.property)({attribute:!1})],o.prototype,"result",void 0),Qt([(0,er.numberProperty)()],o.prototype,"rank",void 0),Qt([(0,Xt.property)({attribute:!1,type:Boolean})],o.prototype,"openResultInNewTab",void 0),o}),Jt=class extends Cs(Yt){};var fa=A(oe()),pa=A(_()),Os={highlightBackgroundColor:pa.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},ha=fa.css`