@fluid-topics/ft-reader-topic-content 1.3.54 → 1.3.56
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
|
-
"use strict";(()=>{var Ki=Object.create;var Cr=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames;var qi=Object.getPrototypeOf,Wi=Object.prototype.hasOwnProperty;var Ke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vi(t))!Wi.call(e,i)&&i!==r&&Cr(e,i,{get:()=>t[i],enumerable:!(n=Gi(t,i))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?Ki(qi(e)):{},Fi(t||!e||!e.__esModule?Cr(r,"default",{value:e,enumerable:!0}):r,e));var N=Ke((za,wr)=>{wr.exports=ftGlobals.wcUtils});var re=Ke((Ya,Rr)=>{Rr.exports=ftGlobals.lit});var F=Ke((
|
|
2
|
-
`)===0?C.substr(1,C.length):C}).forEach(function(C){var P=C.split(":"),T=P.shift().trim();if(T){var
|
|
1
|
+
"use strict";(()=>{var Ki=Object.create;var Cr=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Vi=Object.getOwnPropertyNames;var qi=Object.getPrototypeOf,Wi=Object.prototype.hasOwnProperty;var Ke=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Fi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vi(t))!Wi.call(e,i)&&i!==r&&Cr(e,i,{get:()=>t[i],enumerable:!(n=Gi(t,i))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?Ki(qi(e)):{},Fi(t||!e||!e.__esModule?Cr(r,"default",{value:e,enumerable:!0}):r,e));var N=Ke((za,wr)=>{wr.exports=ftGlobals.wcUtils});var re=Ke((Ya,Rr)=>{Rr.exports=ftGlobals.lit});var F=Ke((Qa,Dr)=>{Dr.exports=ftGlobals.litDecorators});var Vt=Ke((ns,jr)=>{jr.exports=ftGlobals.litUnsafeHTML});var Qr=Ke((ce,Xr)=>{var lt=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,ct=function(){function e(){this.fetch=!1,this.DOMException=lt.DOMException}return e.prototype=lt,new e}();(function(e){var t=function(r){var n=typeof e<"u"&&e||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 a(l){return l&&DataView.prototype.isPrototypeOf(l)}if(i.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(l){return l&&s.indexOf(Object.prototype.toString.call(l))>-1};function u(l){if(typeof l!="string"&&(l=String(l)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l)||l==="")throw new TypeError('Invalid character in header field name: "'+l+'"');return l.toLowerCase()}function c(l){return typeof l!="string"&&(l=String(l)),l}function d(l){var f={next:function(){var E=l.shift();return{done:E===void 0,value:E}}};return i.iterable&&(f[Symbol.iterator]=function(){return f}),f}function h(l){this.map={},l instanceof h?l.forEach(function(f,E){this.append(E,f)},this):Array.isArray(l)?l.forEach(function(f){if(f.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+f.length);this.append(f[0],f[1])},this):l&&Object.getOwnPropertyNames(l).forEach(function(f){this.append(f,l[f])},this)}h.prototype.append=function(l,f){l=u(l),f=c(f);var E=this.map[l];this.map[l]=E?E+", "+f:f},h.prototype.delete=function(l){delete this.map[u(l)]},h.prototype.get=function(l){return l=u(l),this.has(l)?this.map[l]:null},h.prototype.has=function(l){return this.map.hasOwnProperty(u(l))},h.prototype.set=function(l,f){this.map[u(l)]=c(f)},h.prototype.forEach=function(l,f){for(var E in this.map)this.map.hasOwnProperty(E)&&l.call(f,this.map[E],E,this)},h.prototype.keys=function(){var l=[];return this.forEach(function(f,E){l.push(E)}),d(l)},h.prototype.values=function(){var l=[];return this.forEach(function(f){l.push(f)}),d(l)},h.prototype.entries=function(){var l=[];return this.forEach(function(f,E){l.push([E,f])}),d(l)},i.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function p(l){if(!l._noBody){if(l.bodyUsed)return Promise.reject(new TypeError("Already read"));l.bodyUsed=!0}}function g(l){return new Promise(function(f,E){l.onload=function(){f(l.result)},l.onerror=function(){E(l.error)}})}function y(l){var f=new FileReader,E=g(f);return f.readAsArrayBuffer(l),E}function v(l){var f=new FileReader,E=g(f),C=/charset=([A-Za-z0-9_-]+)/.exec(l.type),P=C?C[1]:"utf-8";return f.readAsText(l,P),E}function S(l){for(var f=new Uint8Array(l),E=new Array(f.length),C=0;C<f.length;C++)E[C]=String.fromCharCode(f[C]);return E.join("")}function x(l){if(l.slice)return l.slice(0);var f=new Uint8Array(l.byteLength);return f.set(new Uint8Array(l)),f.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(l){this.bodyUsed=this.bodyUsed,this._bodyInit=l,l?typeof l=="string"?this._bodyText=l:i.blob&&Blob.prototype.isPrototypeOf(l)?this._bodyBlob=l:i.formData&&FormData.prototype.isPrototypeOf(l)?this._bodyFormData=l:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(l)?this._bodyText=l.toString():i.arrayBuffer&&i.blob&&a(l)?(this._bodyArrayBuffer=x(l.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(l)||o(l))?this._bodyArrayBuffer=x(l):this._bodyText=l=Object.prototype.toString.call(l):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof l=="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(l)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var l=p(this);if(l)return l;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 l=p(this);return l||(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(y);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var l=p(this);if(l)return l;if(this._bodyBlob)return v(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(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 w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(l){var f=l.toUpperCase();return w.indexOf(f)>-1?f:l}function U(l,f){if(!(this instanceof U))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');f=f||{};var E=f.body;if(l instanceof U){if(l.bodyUsed)throw new TypeError("Already read");this.url=l.url,this.credentials=l.credentials,f.headers||(this.headers=new h(l.headers)),this.method=l.method,this.mode=l.mode,this.signal=l.signal,!E&&l._bodyInit!=null&&(E=l._bodyInit,l.bodyUsed=!0)}else this.url=String(l);if(this.credentials=f.credentials||this.credentials||"same-origin",(f.headers||!this.headers)&&(this.headers=new h(f.headers)),this.method=_(f.method||this.method||"GET"),this.mode=f.mode||this.mode||null,this.signal=f.signal||this.signal||function(){if("AbortController"in n){var T=new AbortController;return T.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(f.cache==="no-store"||f.cache==="no-cache")){var C=/([?&])_=[^&]*/;if(C.test(this.url))this.url=this.url.replace(C,"$1_="+new Date().getTime());else{var P=/\?/;this.url+=(P.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}U.prototype.clone=function(){return new U(this,{body:this._bodyInit})};function X(l){var f=new FormData;return l.trim().split("&").forEach(function(E){if(E){var C=E.split("="),P=C.shift().replace(/\+/g," "),T=C.join("=").replace(/\+/g," ");f.append(decodeURIComponent(P),decodeURIComponent(T))}}),f}function ge(l){var f=new h,E=l.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(C){return C.indexOf(`
|
|
2
|
+
`)===0?C.substr(1,C.length):C}).forEach(function(C){var P=C.split(":"),T=P.shift().trim();if(T){var Je=P.join(":").trim();try{f.append(T,Je)}catch(Ut){console.warn("Response "+Ut.message)}}}),f}O.call(U.prototype);function G(l,f){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(f||(f={}),this.type="default",this.status=f.status===void 0?200:f.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=f.statusText===void 0?"":""+f.statusText,this.headers=new h(f.headers),this.url=f.url||"",this._initBody(l)}O.call(G.prototype),G.prototype.clone=function(){return new G(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},G.error=function(){var l=new G(null,{status:200,statusText:""});return l.ok=!1,l.status=0,l.type="error",l};var Ae=[301,302,303,307,308];G.redirect=function(l,f){if(Ae.indexOf(f)===-1)throw new RangeError("Invalid status code");return new G(null,{status:f,headers:{location:l}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(f,E){this.message=f,this.name=E;var C=Error(f);this.stack=C.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function we(l,f){return new Promise(function(E,C){var P=new U(l,f);if(P.signal&&P.signal.aborted)return C(new r.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function Je(){T.abort()}T.onload=function(){var j={statusText:T.statusText,headers:ge(T.getAllResponseHeaders()||"")};P.url.indexOf("file://")===0&&(T.status<200||T.status>599)?j.status=200:j.status=T.status,j.url="responseURL"in T?T.responseURL:j.headers.get("X-Request-URL");var be="response"in T?T.response:T.responseText;setTimeout(function(){E(new G(be,j))},0)},T.onerror=function(){setTimeout(function(){C(new TypeError("Network request failed"))},0)},T.ontimeout=function(){setTimeout(function(){C(new TypeError("Network request timed out"))},0)},T.onabort=function(){setTimeout(function(){C(new r.DOMException("Aborted","AbortError"))},0)};function Ut(j){try{return j===""&&n.location.href?n.location.href:j}catch{return j}}if(T.open(P.method,Ut(P.url),!0),P.credentials==="include"?T.withCredentials=!0:P.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&(i.blob?T.responseType="blob":i.arrayBuffer&&(T.responseType="arraybuffer")),f&&typeof f.headers=="object"&&!(f.headers instanceof h||n.Headers&&f.headers instanceof n.Headers)){var _r=[];Object.getOwnPropertyNames(f.headers).forEach(function(j){_r.push(u(j)),T.setRequestHeader(j,c(f.headers[j]))}),P.headers.forEach(function(j,be){_r.indexOf(be)===-1&&T.setRequestHeader(be,j)})}else P.headers.forEach(function(j,be){T.setRequestHeader(be,j)});P.signal&&(P.signal.addEventListener("abort",Je),T.onreadystatechange=function(){T.readyState===4&&P.signal.removeEventListener("abort",Je)}),T.send(typeof P._bodyInit>"u"?null:P._bodyInit)})}return we.polyfill=!0,n.fetch||(n.fetch=we,n.Headers=h,n.Request=U,n.Response=G),r.Headers=h,r.Request=U,r.Response=G,r.fetch=we,r}({})})(ct);ct.fetch.ponyfill=!0;delete ct.fetch.polyfill;var Ne=lt.fetch?lt:ct;ce=Ne.fetch;ce.default=Ne.fetch;ce.fetch=Ne.fetch;ce.Headers=Ne.Headers;ce.Request=Ne.Request;ce.Response=Ne.Response;Xr.exports=ce});var Hi=b(N());var ve=b(re());var Pr=b(re()),Re=b(N()),Lr={colorError:Re.FtCssVariableFactory.external(Re.designSystemVariables.colorError,"Design system"),fontFamily:Re.FtCssVariableFactory.external(Re.designSystemVariables.contentFont,"Design system")},Nr=Pr.css`
|
|
3
3
|
.topic {
|
|
4
4
|
font-family: ${Lr.fontFamily};
|
|
5
5
|
overflow-x: auto;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
ft-skeleton {
|
|
27
27
|
height: 100px;
|
|
28
28
|
}
|
|
29
|
-
`;var tt=b(F()),Ur=b(N());var et=b(N()),kr=b(F());var Ir;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change"})(Ir||(Ir={}));var Mr;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mr||(Mr={}));var $i=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Bt=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},jt=Symbol("registerInterval"),zi=(0,et.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[jt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[jt]):this.dispatchEvent(new Bt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=jt,$i([(0,kr.state)()],r.prototype,"stateManager",void 0),r}),Ze=class extends zi(et.FtLitElementRedux){};var Ht=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Gt=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},Kt=Symbol("registerInterval"),Yi=(0,Ur.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[Kt]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[Kt]):this.dispatchEvent(new Gt)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=Kt,Ht([(0,tt.state)()],r.prototype,"tocNode",void 0),Ht([(0,tt.state)()],r.prototype,"disableContextInteractions",void 0),Ht([(0,tt.state)()],r.prototype,"headingLevelsShift",void 0),r}),rt=class extends Yi(Ze){};var Bi=b(Vt()),k=b(N()),ae=b(F());var Vr=b(N());var Ge=b(re()),le=b(F()),Kr=b(N()),Gr=b(Vt());var nt;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.PAPER_PLANE_SLASH="",e.COMPRESS="",e.EXPAND="",e.ARROW_ROTATE_LEFT="",e.EYE="",e.SHARE="󨃱",e.MOBILE_SMALL="",e.SPARKLES="",e.HAND_SOLID="",e.CLOCK_SOLID="",e.CONTEXT_MENU_CURSOR="",e.LANGUAGE_SLASH="",e.MAGNIFYING_GLASS_FLOPPY_DISK="",e.CABINET_FILING_FLOPPY_DISK="",e.BOOKMARK_SLASH="",e.CIRCLE_PAUSE="",e.CIRCLE_PLAY="",e.CIRCLE_STOP_PLAIN="",e.CLOUD_ARROW_DOWN="",e.SHARE_NODES="",e.BELL="",e.BELL_SLASH="",e.FILE="",e.HAND="",e.SQUARE_INFO_SOLID="",e.FILE_CODE="",e.BOX_CODE=""})(nt||(nt={}));var m;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(m||(m={}));var is=new Map([...["abw"].map(e=>[e,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,m.AUDIO]),...["avi"].map(e=>[e,m.AVI]),...["chm","xhs"].map(e=>[e,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,m.CODE]),...["csv"].map(e=>[e,m.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,m.DITA]),...["epub"].map(e=>[e,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,m.EXCEL]),...["flac"].map(e=>[e,m.FLAC]),...["gif"].map(e=>[e,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,m.GZIP]),...["html","htm","xhtml"].map(e=>[e,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,m.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,m.JPEG]),...["json"].map(e=>[e,m.JSON]),...["m4a","m4p"].map(e=>[e,m.M4A]),...["mov","qt"].map(e=>[e,m.MOV]),...["mp3"].map(e=>[e,m.MP3]),...["mp4","m4v"].map(e=>[e,m.MP4]),...["ogg","oga"].map(e=>[e,m.OGG]),...["pdf","ps"].map(e=>[e,m.PDF]),...["png"].map(e=>[e,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,m.POWERPOINT]),...["rar"].map(e=>[e,m.RAR]),...["stp"].map(e=>[e,m.STP]),...["txt","rtf","md","mdown"].map(e=>[e,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,m.VIDEO]),...["wav"].map(e=>[e,m.WAV]),...["wma"].map(e=>[e,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,m.WORD]),...["xml","xsl","rdf"].map(e=>[e,m.XML]),...["yaml","yml","x-yaml"].map(e=>[e,m.YAML]),...["zip"].map(e=>[e,m.ZIP])]);var as={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var Br=b(re()),J=b(N()),se={size:J.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:J.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",J.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:J.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",J.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:J.FtCssVariableFactory.extend("--ft-icon-material-font-family","",J.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:J.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Hr=[Br.css`
|
|
29
|
+
`;var tt=b(F()),Ur=b(N());var et=b(N()),kr=b(F());var Ir;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change"})(Ir||(Ir={}));var Mr;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mr||(Mr={}));var $i=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Bt=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},jt=Symbol("registerInterval"),zi=(0,et.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[jt]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[jt]):this.dispatchEvent(new Bt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=jt,$i([(0,kr.state)()],r.prototype,"stateManager",void 0),r}),Ze=class extends zi(et.FtLitElementRedux){};var Ht=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Gt=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},Kt=Symbol("registerInterval"),Yi=(0,Ur.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[Kt]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[Kt]):this.dispatchEvent(new Gt)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=Kt,Ht([(0,tt.state)()],r.prototype,"tocNode",void 0),Ht([(0,tt.state)()],r.prototype,"disableContextInteractions",void 0),Ht([(0,tt.state)()],r.prototype,"headingLevelsShift",void 0),r}),rt=class extends Yi(Ze){};var Bi=b(Vt()),k=b(N()),ae=b(F());var Vr=b(N());var Ge=b(re()),le=b(F()),Kr=b(N()),Gr=b(Vt());var nt;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.PAPER_PLANE_SLASH="",e.COMPRESS="",e.EXPAND="",e.ARROW_ROTATE_LEFT="",e.EYE="",e.SHARE="󨃱",e.MOBILE_SMALL="",e.SPARKLES="",e.HAND_SOLID="",e.CLOCK_SOLID="",e.CONTEXT_MENU_CURSOR="",e.LANGUAGE_SLASH="",e.MAGNIFYING_GLASS_FLOPPY_DISK="",e.CABINET_FILING_FLOPPY_DISK="",e.BOOKMARK_SLASH="",e.CIRCLE_PAUSE="",e.CIRCLE_PLAY="",e.CIRCLE_STOP_PLAIN="",e.CLOUD_ARROW_DOWN="",e.SHARE_NODES="",e.BELL="",e.BELL_SLASH="",e.FILE="",e.HAND="",e.SQUARE_INFO_SOLID="",e.FILE_CODE="",e.BOX_CODE=""})(nt||(nt={}));var m;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(m||(m={}));var is=new Map([...["abw"].map(e=>[e,m.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,m.AUDIO]),...["avi"].map(e=>[e,m.AVI]),...["chm","xhs"].map(e=>[e,m.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,m.CODE]),...["csv"].map(e=>[e,m.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,m.DITA]),...["epub"].map(e=>[e,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,m.EXCEL]),...["flac"].map(e=>[e,m.FLAC]),...["gif"].map(e=>[e,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,m.GZIP]),...["html","htm","xhtml"].map(e=>[e,m.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,m.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,m.JPEG]),...["json"].map(e=>[e,m.JSON]),...["m4a","m4p"].map(e=>[e,m.M4A]),...["mov","qt"].map(e=>[e,m.MOV]),...["mp3"].map(e=>[e,m.MP3]),...["mp4","m4v"].map(e=>[e,m.MP4]),...["ogg","oga"].map(e=>[e,m.OGG]),...["pdf","ps"].map(e=>[e,m.PDF]),...["png"].map(e=>[e,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,m.POWERPOINT]),...["rar"].map(e=>[e,m.RAR]),...["stp"].map(e=>[e,m.STP]),...["txt","rtf","md","mdown"].map(e=>[e,m.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,m.VIDEO]),...["wav"].map(e=>[e,m.WAV]),...["wma"].map(e=>[e,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,m.WORD]),...["xml","xsl","rdf"].map(e=>[e,m.XML]),...["yaml","yml","x-yaml"].map(e=>[e,m.YAML]),...["zip"].map(e=>[e,m.ZIP])]);var as={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var Br=b(re()),Q=b(N()),se={size:Q.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Q.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Q.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Q.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Q.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Q.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Q.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Q.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Hr=[Br.css`
|
|
30
30
|
:host, i.ft-icon {
|
|
31
31
|
display: inline-flex;
|
|
32
32
|
align-items: center;
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
.ft-icon--material {
|
|
75
75
|
font-family: ${se.materialFontFamily}, "Material Icons", sans-serif;
|
|
76
76
|
}
|
|
77
|
-
`,
|
|
77
|
+
`,Q.noTextSelect];var ue;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(ue||(ue={}));var Ve=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},J=class extends Kr.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Ge.nothing}render(){let t=this.variant&&Object.values(ue).includes(this.variant)?this.variant:ue.fluid_topics,r=t!==ue.material||!!this.value;return Ge.html`
|
|
78
78
|
<i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
|
|
79
79
|
${(0,Gr.unsafeHTML)(this.resolvedIcon)}
|
|
80
80
|
<slot ?hidden=${r}></slot>
|
|
81
81
|
</i>
|
|
82
|
-
`}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case ue.file_format:this.resolvedIcon=(t=m[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case ue.material:this.resolvedIcon=this.value||Ge.nothing;break;default:this.resolvedIcon=(r=nt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};
|
|
82
|
+
`}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case ue.file_format:this.resolvedIcon=(t=m[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case ue.material:this.resolvedIcon=this.value||Ge.nothing;break;default:this.resolvedIcon=(r=nt[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};J.elementDefinitions={};J.styles=Hr;Ve([(0,le.property)()],J.prototype,"variant",void 0);Ve([(0,le.property)()],J.prototype,"value",void 0);Ve([(0,le.property)({reflect:!0,attribute:"aria-hidden"})],J.prototype,"ariaHidden",void 0);Ve([(0,le.state)()],J.prototype,"resolvedIcon",void 0);Ve([(0,le.query)("slot")],J.prototype,"slottedContent",void 0);(0,Vr.customElement)("ft-icon")(J);var ji=b(N());var Dt=b(re()),It=b(F()),Mt=b(N());var qr=b(re());var Wr=qr.css`
|
|
83
83
|
`;var He=b(N());var Ni=b(N());var kn=b(re()),B=b(F()),Z=b(N());var Fr=b(re());var $r=Fr.css`
|
|
84
|
-
`;var it=b(N()),Xi="ft-app-info",Ee=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ee.eventName="authentication-change";var Ji={session:(e,t)=>{(0,it.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Ee(t.payload)),0))}},A=it.FtReduxStore.get({name:Xi,reducers:Ji,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var qt=b(N());var Se=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=A.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=A.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var at=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Se.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Se.await()}};var V=class extends at{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new qt.CacheRegistry,this.cache=t?i.commonCache:new qt.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var st=class extends V{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Wt=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wt;var $=b(N());var zr,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Qi=Symbol("clearAfterUnitTest"),ot=class extends(0,$.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[zr]=()=>{this.defaultMessages={},this.cache=new $.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,$.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let a=t.toLowerCase(),s=this.resolveContext(a);return new $.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof $.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,$.delay)(0).then(()=>n()).catch(()=>null)))}};zr=Qi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ot{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ot{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pe=window.FluidTopicsI18nService,ut=window.FluidTopicsCustomI18nService;var Yr=b(N()),Ft=class{highlightHtml(t,r,n){(0,Yr.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ft;var ea=b(Jr(),1);var Qr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Qr||(Qr={}));var Zr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Zr||(Zr={}));var en;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(en||(en={}));var tn;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(tn||(tn={}));var rn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(rn||(rn={}));var nn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(nn||(nn={}));var an;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(an||(an={}));var sn;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(sn||(sn={}));var on;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW"})(on||(on={}));var un;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(un||(un={}));var ln;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ln||(ln={}));var cn;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(cn||(cn={}));var dn;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(dn||(dn={}));var fn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fn||(fn={}));var pn;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(pn||(pn={}));var hn;(function(e){e.ASC="ASC",e.DESC="DESC"})(hn||(hn={}));var mn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mn||(mn={}));var yn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yn||(yn={}));var vn;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(vn||(vn={}));var gn;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(gn||(gn={}));var An;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(An||(An={}));var bn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(bn||(bn={}));var En;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(En||(En={}));var Sn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Sn||(Sn={}));var xn;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xn||(xn={}));var I;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(I||(I={}));var z;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(z||(z={}));var On;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(On||(On={}));var Tn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Tn||(Tn={}));var _n;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(_n||(_n={}));var Cn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Cn||(Cn={}));var wn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(wn||(wn={}));var Zi={[I.PERSONAL_BOOK_SHARE_USER]:[I.PERSONAL_BOOK_USER],[I.HTML_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.PDF_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.KHUB_ADMIN]:[I.CONTENT_PUBLISHER],[I.ADMIN]:[I.KHUB_ADMIN,I.USERS_ADMIN,I.PORTAL_ADMIN],[I.GENERATIVE_AI_EXPORT_USER]:[I.GENERATIVE_AI_USER]};function Rn(e,t){return e===t||(Zi[e]??[]).some(r=>Rn(r,t))}function Ln(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Rn(n,t))}var dt=class extends V{async listMySearches(){let{session:t}=A.getState();return Ln(t,I.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Pn=b(N());var $t=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return Pn.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:A.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new $t;var Nn=b(N());var qe=class{static get(t,r){var n,i;let a=A.getState(),{lang:s,region:o}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Nn.SearchPlaceConverter(a.baseUrl,t??20,a.searchInAllLanguagesAllowed,r??`${s}-${o}`)}};var zt=class{urlToSearchRequest(t){return qe.get().parse(t)}searchRequestToUrl(t){return qe.get().serialize(t)}};window.FluidTopicsUrlService=new zt;var de=b(N());var xe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};xe.eventName="change";var Yt=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Dn=new Yt;var ft=class e extends de.WithEventBus{static build(){return new e(window.history,Dn,()=>window.location,!1)}constructor(t,r,n,i){var a,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(a=t.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new xe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[a,s,o])=>{let u=r(),c={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[c,s,o]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(xe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(xe.eventName,t)}currentItem(){return(0,de.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,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,a=t+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ft.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var In=A;function Mn(e,t){var r;return In.getState().authenticationRequired&&!(!((r=In.getState().session)===null||r===void 0)&&r.sessionAuthenticated)?Promise.resolve(t):e()}var M=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},R=class extends Z.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Se.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Z.CacheRegistry,this.cleanSessionDebouncer=new Z.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return kn.html`
|
|
84
|
+
`;var it=b(N()),Xi="ft-app-info",Ee=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ee.eventName="authentication-change";var Qi={session:(e,t)=>{(0,it.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Ee(t.payload)),0))}},A=it.FtReduxStore.get({name:Xi,reducers:Qi,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var qt=b(N());var Se=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=A.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=A.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var at=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Se.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Se.await()}};var V=class extends at{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([o],[u])=>o.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new qt.CacheRegistry,this.cache=t?i.commonCache:new qt.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var st=class extends V{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Wt=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wt;var $=b(N());var zr,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ji=Symbol("clearAfterUnitTest"),ot=class extends(0,$.withEventBus)(V){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[zr]=()=>{this.defaultMessages={},this.cache=new $.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,$.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let a=t.toLowerCase(),s=this.resolveContext(a);return new $.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof $.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,$.delay)(0).then(()=>n()).catch(()=>null)))}};zr=Ji;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ot{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ot{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Pe=window.FluidTopicsI18nService,ut=window.FluidTopicsCustomI18nService;var Yr=b(N()),Ft=class{highlightHtml(t,r,n){(0,Yr.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ft;var ea=b(Qr(),1);var Jr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Jr||(Jr={}));var Zr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Zr||(Zr={}));var en;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(en||(en={}));var tn;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(tn||(tn={}));var rn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(rn||(rn={}));var nn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(nn||(nn={}));var an;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(an||(an={}));var sn;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(sn||(sn={}));var on;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW"})(on||(on={}));var un;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(un||(un={}));var ln;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ln||(ln={}));var cn;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(cn||(cn={}));var dn;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(dn||(dn={}));var fn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(fn||(fn={}));var pn;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(pn||(pn={}));var hn;(function(e){e.ASC="ASC",e.DESC="DESC"})(hn||(hn={}));var mn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(mn||(mn={}));var yn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(yn||(yn={}));var vn;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(vn||(vn={}));var gn;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(gn||(gn={}));var An;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(An||(An={}));var bn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(bn||(bn={}));var En;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(En||(En={}));var Sn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Sn||(Sn={}));var xn;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xn||(xn={}));var I;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(I||(I={}));var z;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(z||(z={}));var On;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(On||(On={}));var Tn;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Tn||(Tn={}));var _n;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_n||(_n={}));var Cn;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Cn||(Cn={}));var wn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(wn||(wn={}));var Rn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Rn||(Rn={}));var Zi={[I.PERSONAL_BOOK_SHARE_USER]:[I.PERSONAL_BOOK_USER],[I.HTML_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.PDF_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.KHUB_ADMIN]:[I.CONTENT_PUBLISHER],[I.ADMIN]:[I.KHUB_ADMIN,I.USERS_ADMIN,I.PORTAL_ADMIN],[I.GENERATIVE_AI_EXPORT_USER]:[I.GENERATIVE_AI_USER]};function Ln(e,t){return e===t||(Zi[e]??[]).some(r=>Ln(r,t))}function Pn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Ln(n,t))}var dt=class extends V{async listMySearches(){let{session:t}=A.getState();return Pn(t,I.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Nn=b(N());var $t=class{isDate(t){var r,n,i,a;return(a=(i=((n=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,r){var n,i,a;return Nn.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:A.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new $t;var Dn=b(N());var qe=class{static get(t,r){var n,i;let a=A.getState(),{lang:s,region:o}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Dn.SearchPlaceConverter(a.baseUrl,t??20,a.searchInAllLanguagesAllowed,r??`${s}-${o}`)}};var zt=class{urlToSearchRequest(t){return qe.get().parse(t)}searchRequestToUrl(t){return qe.get().serialize(t)}};window.FluidTopicsUrlService=new zt;var de=b(N());var xe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};xe.eventName="change";var Yt=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},In=new Yt;var ft=class e extends de.WithEventBus{static build(){return new e(window.history,In,()=>window.location,!1)}constructor(t,r,n,i){var a,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(a=t.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,de.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new xe(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[a,s,o])=>{let u=r(),c={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[c,s,o]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(xe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(xe.eventName,t)}currentItem(){return(0,de.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,de.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,de.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,a=t+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,a=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ft.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});function Mn(e,t){let{authenticationRequired:r,session:n}=A.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var M=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},R=class extends Z.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Se.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Z.CacheRegistry,this.cleanSessionDebouncer=new Z.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return kn.html`
|
|
85
85
|
<slot></slot>
|
|
86
|
-
`}connectedCallback(){super.connectedCallback(),A.addEventListener(Ee.eventName,this.reloadConfiguration)}disconnectedCallback(){A.addEventListener(Ee.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,i,a,s,o,u;super.update(t),t.has("baseUrl")&&(A.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&A.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&A.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&A.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&A.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&A.actions.noCustom(this.noCustom),t.has("editorMode")&&A.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&A.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&A.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Pe.addContext(c)),t.has("openExternalDocumentInNewTab")&&A.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&A.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&A.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(A.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),A.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),A.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&A.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&A.actions.availableContentLocales((u=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Mn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};R.elementDefinitions={};R.styles=$r;M([(0,B.property)()],R.prototype,"baseUrl",void 0);M([(0,B.property)()],R.prototype,"apiIntegrationIdentifier",void 0);M([(0,B.property)()],R.prototype,"apiIntegrationAppVersion",void 0);M([(0,B.property)()],R.prototype,"uiLocale",void 0);M([(0,Z.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);M([(0,Z.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"editorMode",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"noCustom",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);M([(0,B.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"withManualResources",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);M([(0,B.property)({type:Object})],R.prototype,"apiProvider",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);M([(0,Z.jsonProperty)([])],R.prototype,"messageContexts",void 0);M([(0,Z.jsonProperty)(void 0)],R.prototype,"session",void 0);M([(0,B.state)()],R.prototype,"localesConfiguration",void 0);M([(0,B.state)()],R.prototype,"availableContentLocales",void 0);var br=b(F());function ta(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(o=>s[o]!=null);if(i=a(e),r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return ta(e,t)}catch{return!1}}function We(e,t){return!pt(e,t)}function ht(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Un=b(F(),1);var Xt=e=>{let t=e??{};return(r,n)=>{var i;let a={hasChanged:We,attribute:!1,...t};(0,Un.property)(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:o=>o[n],store:t.store})}};var mt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Oe=b(F(),1);var jn=b(F(),1);function Bn(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,jn.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:We,...t??{}})}var yt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(o){i(o);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Kn=b(re(),1);var vt=globalThis,ra=vt.ShadowRoot&&(vt.ShadyCSS===void 0||vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zo=Symbol();var Hn=(e,t)=>{if(ra)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=vt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var gt=class extends Kn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Hn(n,t.elementStyles),n}};function Gn(e,t,...r){var n;let i=e.querySelector(t);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Ie=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Fn,Vn=Symbol("constructorPrototype"),qn=Symbol("constructorName"),$n=Symbol("exportpartsDebouncer"),Wn=Symbol("dynamicDependenciesLoaded"),De=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};De.eventName="exportparts-updated";var ne=class extends gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Fn]=new yt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[$n].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[qn]=this.constructor.name,this[Vn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[qn]&&Object.setPrototypeOf(this,this[Vn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Wn]||(r[Wn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(De.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(De.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 De)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];r=Gn(this.shadowRoot,...a)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(t){var r,n,i,a,s,o;let u=p=>p!=null&&p.trim().length>0,c=t.filter(u).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let d=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],y=(o=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&o!==void 0?o:[],v=[...g,...y].filter(u).map(S=>S.trim());for(let S of v)d.add(S)}if(d.size===0){this.exportparts=void 0;return}let h=[...d.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...h].join(", ")}};Fn=$n;Ie([(0,Oe.property)()],ne.prototype,"exportpartsPrefix",void 0);Ie([Bn([])],ne.prototype,"exportpartsPrefixes",void 0);Ie([(0,Oe.property)({reflect:!0})],ne.prototype,"exportparts",void 0);Ie([(0,Oe.property)()],ne.prototype,"customStylesheet",void 0);Ie([(0,Oe.property)()],ne.prototype,"elementToFocus",void 0);Ie([(0,Oe.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function At(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Fe=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Te=Symbol("internalStores"),na=ht(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Te].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Te].get(s)}addStore(s,o){var u;o=(u=o??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[Te].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Te].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Te].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let c=this.getStore(s.store);c&&(s.store?this[fe].has(s.store):this[fe].size>0)&&(this[o]=s.selector(c.getState(),this))}})}subscribeToStore(s,o){var u;this[fe].set(s,o.subscribe(()=>this.updateFromStores())),this[Fe].set(s,[]),At(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||o.name===c.store)){let h=p=>this[d](p);o.addEventListener(c.eventName,h),this[Fe].get(s).push(()=>o.removeEventListener(c.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[fe].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[fe].has(s)&&this[fe].get(s)(),this[fe].delete(s),(o=this[Fe].get(s))===null||o===void 0||o.forEach(u=>u()),this[Fe].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=fe,r=Te,n=Fe,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),zn=class extends na(ne){};function Y(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oe(e){return!!e&&!!e[L]}function ee(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===da}(e)||Array.isArray(e)||!!e[ti]||!!(!((t=e.constructor)===null||t===void 0)&&t[ti])||ar(e)||sr(e))}function _e(e,t,r){r===void 0&&(r=!1),Ue(e)===0?(r?Object.keys:ke)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Ue(e){var t=e[L];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ar(e)?2:sr(e)?3:0}function Me(e,t){return Ue(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ia(e,t){return Ue(e)===2?e.get(t):e[t]}function ri(e,t,r){var n=Ue(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ni(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ar(e){return la&&e instanceof Map}function sr(e){return ca&&e instanceof Set}function pe(e){return e.o||e.t}function or(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=si(e);delete t[L];for(var r=ke(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function ur(e,t){return t===void 0&&(t=!1),lr(e)||oe(e)||!ee(e)||(Ue(e)>1&&(e.set=e.add=e.clear=e.delete=aa),Object.freeze(e),t&&_e(e,function(r,n){return ur(n,!0)},!0)),e}function aa(){Y(2)}function lr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ie(e){var t=ir[e];return t||Y(18,e),t}function sa(e,t){ir[e]||(ir[e]=t)}function tr(){return ze}function Jt(e,t){t&&(ie("Patches"),e.u=[],e.s=[],e.v=t)}function bt(e){rr(e),e.p.forEach(oa),e.p=null}function rr(e){e===ze&&(ze=e.l)}function Yn(e){return ze={p:[],l:ze,h:e,m:!0,_:0}}function oa(e){var t=e[L];t.i===0||t.i===1?t.j():t.g=!0}function Qt(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||ie("ES5").S(t,e,n),n?(r[L].P&&(bt(t),Y(4)),ee(e)&&(e=Et(t,e),t.l||St(t,e)),t.u&&ie("Patches").M(r[L].t,e,t.u,t.s)):e=Et(t,r,[]),bt(t),t.u&&t.v(t.u,t.s),e!==ai?e:void 0}function Et(e,t,r){if(lr(t))return t;var n=t[L];if(!n)return _e(t,function(o,u){return Xn(e,n,t,o,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return St(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=or(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),_e(a,function(o,u){return Xn(e,n,i,o,u,r,s)}),St(e,i,!1),r&&e.u&&ie("Patches").N(n,r,e.u,e.s)}return n.o}function Xn(e,t,r,n,i,a,s){if(oe(i)){var o=Et(e,i,a&&t&&t.i!==3&&!Me(t.R,n)?a.concat(n):void 0);if(ri(r,n,o),!oe(o))return;e.m=!1}else s&&r.add(i);if(ee(i)&&!lr(i)){if(!e.h.D&&e._<1)return;Et(e,i),t&&t.A.l||St(e,i)}}function St(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ur(t,r)}function Zt(e,t){var r=e[L];return(r?pe(r):e)[t]}function Jn(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function he(e){e.P||(e.P=!0,e.l&&he(e.l))}function er(e){e.o||(e.o=or(e.t))}function nr(e,t,r){var n=ar(t)?ie("MapSet").F(t,r):sr(t)?ie("MapSet").T(t,r):e.O?function(i,a){var s=Array.isArray(i),o={i:s?1:0,A:a?a.A:tr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=o,c=Ye;s&&(u=[o],c=$e);var d=Proxy.revocable(u,c),h=d.revoke,p=d.proxy;return o.k=p,o.j=h,p}(t,r):ie("ES5").J(t,r);return(r?r.A:tr()).p.push(n),n}function ua(e){return oe(e)||Y(22,e),function t(r){if(!ee(r))return r;var n,i=r[L],a=Ue(r);if(i){if(!i.P&&(i.i<4||!ie("ES5").K(i)))return i.t;i.I=!0,n=Qn(r,a),i.I=!1}else n=Qn(r,a);return _e(n,function(s,o){i&&ia(i.t,s)===o||ri(n,s,t(o))}),a===3?new Set(n):n}(e)}function Qn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return or(e)}function ii(){function e(s,o){var u=a[s];return u?u.enumerable=o:a[s]=u={configurable:!0,enumerable:o,get:function(){var c=this[L];return Ye.get(c,s)},set:function(c){var d=this[L];Ye.set(d,s,c)}},u}function t(s){for(var o=s.length-1;o>=0;o--){var u=s[o][L];if(!u.P)switch(u.i){case 5:n(u)&&he(u);break;case 4:r(u)&&he(u)}}}function r(s){for(var o=s.t,u=s.k,c=ke(u),d=c.length-1;d>=0;d--){var h=c[d];if(h!==L){var p=o[h];if(p===void 0&&!Me(o,h))return!0;var g=u[h],y=g&&g[L];if(y?y.t!==p:!ni(g,p))return!0}}var v=!!o[L];return c.length!==ke(o).length+(v?0:1)}function n(s){var o=s.k;if(o.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var c=0;c<o.length;c++)if(!o.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&Y(3,JSON.stringify(pe(s)))}var a={};sa("ES5",{J:function(s,o){var u=Array.isArray(s),c=function(h,p){if(h){for(var g=Array(p.length),y=0;y<p.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var v=si(p);delete v[L];for(var S=ke(v),x=0;x<S.length;x++){var O=S[x];v[O]=e(O,h||!!v[O].enumerable)}return Object.create(Object.getPrototypeOf(p),v)}(u,s),d={i:u?5:4,A:o?o.A:tr(),P:!1,I:!1,R:{},l:o,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,L,{value:d,writable:!0}),c},S:function(s,o,u){u?oe(o)&&o[L].A===s&&t(s.p):(s.u&&function c(d){if(d&&typeof d=="object"){var h=d[L];if(h){var p=h.t,g=h.k,y=h.R,v=h.i;if(v===4)_e(g,function(_){_!==L&&(p[_]!==void 0||Me(p,_)?y[_]||c(g[_]):(y[_]=!0,he(h)))}),_e(p,function(_){g[_]!==void 0||Me(g,_)||(y[_]=!1,he(h))});else if(v===5){if(n(h)&&(he(h),y.length=!0),g.length<p.length)for(var S=g.length;S<p.length;S++)y[S]=!1;else for(var x=p.length;x<g.length;x++)y[x]=!0;for(var O=Math.min(g.length,p.length),w=0;w<O;w++)g.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&c(g[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Zn,ze,cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",la=typeof Map<"u",ca=typeof Set<"u",ei=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ai=cr?Symbol.for("immer-nothing"):((Zn={})["immer-nothing"]=!0,Zn),ti=cr?Symbol.for("immer-draftable"):"__$immer_draftable",L=cr?Symbol.for("immer-state"):"__$immer_state";var da=""+Object.prototype.constructor,ke=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,si=Object.getOwnPropertyDescriptors||function(e){var t={};return ke(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},ir={},Ye={get:function(e,t){if(t===L)return e;var r=pe(e);if(!Me(r,t))return function(i,a,s){var o,u=Jn(a,s);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!ee(n)?n:n===Zt(e.t,t)?(er(e),e.o[t]=nr(e.A.h,n,e)):n},has:function(e,t){return t in pe(e)},ownKeys:function(e){return Reflect.ownKeys(pe(e))},set:function(e,t,r){var n=Jn(pe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Zt(pe(e),t),a=i?.[L];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ni(r,i)&&(r!==void 0||Me(e.t,t)))return!0;er(e),he(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zt(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,er(e),he(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Y(12)}},$e={};_e(Ye,function(e,t){$e[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),$e.deleteProperty=function(e,t){return $e.set.call(this,e,t,void 0)},$e.set=function(e,t,r){return Ye.set.call(this,e[0],t,r,e[0])};var fa=function(){function e(r){var n=this;this.O=ei,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var u=n;return function(v){var S=this;v===void 0&&(v=o);for(var x=arguments.length,O=Array(x>1?x-1:0),w=1;w<x;w++)O[w-1]=arguments[w];return u.produce(v,function(_){var U;return(U=a).call.apply(U,[S,_].concat(O))})}}var c;if(typeof a!="function"&&Y(6),s!==void 0&&typeof s!="function"&&Y(7),ee(i)){var d=Yn(n),h=nr(n,i,void 0),p=!0;try{c=a(h),p=!1}finally{p?bt(d):rr(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(v){return Jt(d,s),Qt(v,d)},function(v){throw bt(d),v}):(Jt(d,s),Qt(c,d))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===ai&&(c=void 0),n.D&&ur(c,!0),s){var g=[],y=[];ie("Patches").M(i,c,g,y),s(g,y)}return c}Y(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var d=arguments.length,h=Array(d>1?d-1:0),p=1;p<d;p++)h[p-1]=arguments[p];return n.produceWithPatches(c,function(g){return i.apply(void 0,[g].concat(h))})};var s,o,u=n.produce(i,a,function(c,d){s=c,o=d});return typeof Promise<"u"&&u instanceof Promise?u.then(function(c){return[c,s,o]}):[u,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ee(r)||Y(8),oe(r)&&(r=ua(r));var n=Yn(this),i=nr(this,r,void 0);return i[L].C=!0,rr(n),i},t.finishDraft=function(r,n){var i=r&&r[L],a=i.A;return Jt(a,n),Qt(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!ei&&Y(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=ie("Patches").$;return oe(r)?s(r,n):this.produce(r,function(o){return s(o,n)})},e}(),q=new fa,pa=q.produce,lu=q.produceWithPatches.bind(q),cu=q.setAutoFreeze.bind(q),du=q.setUseProxies.bind(q),fu=q.applyPatches.bind(q),pu=q.createDraft.bind(q),hu=q.finishDraft.bind(q),xt=pa;function Ce(e){"@babel/helpers - typeof";return Ce=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},Ce(e)}function oi(e,t){if(Ce(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ce(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ui(e){var t=oi(e,"string");return Ce(t)=="symbol"?t:t+""}function li(e,t,r){return(t=ui(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ci(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ci(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ci(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var di=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ot={INIT:"@@redux/INIT"+fr(),REPLACE:"@@redux/REPLACE"+fr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fr()}};function ha(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function pr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(H(1));return r(pr)(e,t)}if(typeof e!="function")throw new Error(H(2));var i=e,a=t,s=[],o=s,u=!1;function c(){o===s&&(o=s.slice())}function d(){if(u)throw new Error(H(3));return a}function h(v){if(typeof v!="function")throw new Error(H(4));if(u)throw new Error(H(5));var S=!0;return c(),o.push(v),function(){if(S){if(u)throw new Error(H(6));S=!1,c();var O=o.indexOf(v);o.splice(O,1),s=null}}}function p(v){if(!ha(v))throw new Error(H(7));if(typeof v.type>"u")throw new Error(H(8));if(u)throw new Error(H(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var S=s=o,x=0;x<S.length;x++){var O=S[x];O()}return v}function g(v){if(typeof v!="function")throw new Error(H(10));i=v,p({type:Ot.REPLACE})}function y(){var v,S=h;return v={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(H(11));function w(){O.next&&O.next(d())}w();var _=S(w);return{unsubscribe:_}}},v[di]=function(){return this},v}return p({type:Ot.INIT}),n={dispatch:p,subscribe:h,getState:d,replaceReducer:g},n[di]=y,n}function ma(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Ot.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof r(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function fi(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),s,o;try{ma(r)}catch(u){o=u}return function(c,d){if(c===void 0&&(c={}),o)throw o;if(0)var h;for(var p=!1,g={},y=0;y<a.length;y++){var v=a[y],S=r[v],x=c[v],O=S(x,d);if(typeof O>"u"){var w=d&&d.type;throw new Error(H(14))}g[v]=O,p=p||O!==x}return p=p||a.length!==Object.keys(c).length,p?g:c}}function je(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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 pi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(H(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},o=t.map(function(u){return u(s)});return a=je.apply(void 0,o)(i.dispatch),dr(dr({},i),{},{dispatch:a})}}}function hi(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(o){return typeof o=="function"?o(i,a,e):s(o)}}};return t}var mi=hi();mi.withExtraArgument=hi;var hr=mi;var bi=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ya=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Be=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},va=Object.defineProperty,ga=Object.defineProperties,Aa=Object.getOwnPropertyDescriptors,yi=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,Ea=Object.prototype.propertyIsEnumerable,vi=function(e,t,r){return t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},me=function(e,t){for(var r in t||(t={}))ba.call(t,r)&&vi(e,r,t[r]);if(yi)for(var n=0,i=yi(t);n<i.length;n++){var r=i[n];Ea.call(t,r)&&vi(e,r,t[r])}return e},mr=function(e,t){return ga(e,Aa(t))},Sa=function(e,t,r){return new Promise(function(n,i){var a=function(u){try{o(r.next(u))}catch(c){i(c)}},s=function(u){try{o(r.throw(u))}catch(c){i(c)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};o((r=r.apply(e,t)).next())})};var xa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?je:je.apply(null,arguments)},Nu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Oa(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Ta=function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Be([void 0],r[0].concat(this)))):new(t.bind.apply(t,Be([void 0],r.concat(this))))},t}(Array),_a=function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Be([void 0],r[0].concat(this)))):new(t.bind.apply(t,Be([void 0],r.concat(this))))},t}(Array);function gr(e){return ee(e)?xt(e,function(){}):e}function Ca(e){return typeof e=="boolean"}function wa(){return function(t){return Ra(t)}}function Ra(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,o=new Ta;if(r&&(Ca(r)?o.push(hr):o.push(hr.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var c}return o}var yr=!0;function Ei(e){var t=wa(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?t():a,o=r.devTools,u=o===void 0?!0:o,c=r.preloadedState,d=c===void 0?void 0:c,h=r.enhancers,p=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(Oa(i))g=fi(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 y=s;if(typeof y=="function"&&(y=y(t),!yr&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!yr&&y.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=pi.apply(void 0,y),S=je;u&&(S=xa(me({trace:!yr},typeof u=="object"&&u)));var x=new _a(v),O=x;Array.isArray(p)?O=Be([v],p):typeof p=="function"&&(O=p(x));var w=S.apply(void 0,O);return pr(g,d,w)}function ye(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return me(me({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function Si(e){var t={},r=[],n,i={addCase:function(a,s){var o=typeof a=="string"?a:a.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function La(e){return typeof e=="function"}function Pa(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Si(t):[t,r,n],a=i[0],s=i[1],o=i[2],u;if(La(e))u=function(){return gr(e())};else{var c=gr(e);u=function(){return c}}function d(h,p){h===void 0&&(h=u());var g=Be([a[p.type]],s.filter(function(y){var v=y.matcher;return v(p)}).map(function(y){var v=y.reducer;return v}));return g.filter(function(y){return!!y}).length===0&&(g=[o]),g.reduce(function(y,v){if(v)if(oe(y)){var S=y,x=v(S,p);return x===void 0?y:x}else{if(ee(y))return xt(y,function(O){return v(O,p)});var x=v(y,p);if(x===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}return y},h)}return d.getInitialState=u,d}function Na(e,t){return e+"/"+t}function xi(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:gr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},o={};i.forEach(function(d){var h=n[d],p=Na(t,d),g,y;"reducer"in h?(g=h.reducer,y=h.prepare):g=h,a[d]=g,s[p]=g,o[d]=y?ye(p,y):ye(p)});function u(){var d=typeof e.extraReducers=="function"?Si(e.extraReducers):[e.extraReducers],h=d[0],p=h===void 0?{}:h,g=d[1],y=g===void 0?[]:g,v=d[2],S=v===void 0?void 0:v,x=me(me({},p),s);return Pa(r,function(O){for(var w in x)O.addCase(w,x[w]);for(var _=0,U=y;_<U.length;_++){var X=U[_];O.addMatcher(X.matcher,X.reducer)}S&&O.addDefaultCase(S)})}var c;return{name:t,reducer:function(d,h){return c||(c=u()),c(d,h)},actions:o,caseReducers:a,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var Da="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ia=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Da[Math.random()*64|0];return t},Ma=["name","message","stack","code"],vr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),gi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),ka=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Ma;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},ku=function(){function e(t,r,n){var i=ye(t+"/fulfilled",function(d,h,p,g){return{payload:d,meta:mr(me({},g||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),a=ye(t+"/pending",function(d,h,p){return{payload:void 0,meta:mr(me({},p||{}),{arg:h,requestId:d,requestStatus:"pending"})}}),s=ye(t+"/rejected",function(d,h,p,g,y){return{payload:g,error:(n&&n.serializeError||ka)(d||"Rejected"),meta:mr(me({},y||{}),{arg:p,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function c(d){return function(h,p,g){var y=n?.idGenerator?n.idGenerator(d):Ia(),v=new u,S,x=!1;function O(_){S=_,v.abort()}var w=function(){return Sa(this,null,function(){var _,U,X,ge,G,Ae,we;return ya(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),ge=(_=n?.condition)==null?void 0:_.call(n,d,{getState:p,extra:g}),ja(ge)?[4,ge]:[3,2];case 1:ge=l.sent(),l.label=2;case 2:if(ge===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=!0,G=new Promise(function(f,E){return v.signal.addEventListener("abort",function(){return E({name:"AbortError",message:S||"Aborted"})})}),h(a(y,d,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:y,arg:d},{getState:p,extra:g}))),[4,Promise.race([G,Promise.resolve(r(d,{dispatch:h,getState:p,extra:g,requestId:y,signal:v.signal,abort:O,rejectWithValue:function(f,E){return new vr(f,E)},fulfillWithValue:function(f,E){return new gi(f,E)}})).then(function(f){if(f instanceof vr)throw f;return f instanceof gi?i(f.payload,y,d,f.meta):i(f,y,d)})])];case 3:return X=l.sent(),[3,5];case 4:return Ae=l.sent(),X=Ae instanceof vr?s(null,y,d,Ae.payload,Ae.meta):s(Ae,y,d),[3,5];case 5:return we=n&&!n.dispatchConditionRejection&&s.match(X)&&X.meta.condition,we||h(X),[2,X]}})})}();return Object.assign(w,{abort:O,requestId:y,arg:d,unwrap:function(){return w.then(Ua)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ua(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ja(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oi="listener",Ti="completed",_i="cancelled",Uu="task-"+_i,ju="task-"+Ti,Bu=Oi+"-"+_i,Hu=Oi+"-"+Ti;var Ar="listenerMiddleware";var Ku=ye(Ar+"/add"),Gu=ye(Ar+"/removeAll"),Vu=ye(Ar+"/remove");var Ai,qu=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ai||(Ai=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ba=function(e){return function(t){setTimeout(t,e)}},Wu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ba(10);ii();var Ha=ht(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Tt=class extends Ha(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ci=class e extends Tt{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(At(a))return a;if(i==null)return;let s=xi({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Ei({reducer:(u,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...c.overwrites}:s.reducer(u,c)});return window.ftReduxStores[i.name]=new e(s,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mt;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,o)=>{let u=s,c=a[u];return c?(...d)=>{let h=c(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{this.setState({[u]:i(d)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}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 _t=class{static format(t,r,n,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(t,r,n,i)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i){let a=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let o=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${o}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var wi=b(N()),Ct=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},vl=(0,wi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?o=>_t.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ct([(0,br.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ct([(0,br.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ct([Xt({store:A.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Ct([Xt({store:A.name})],t.prototype,"uiLocale",void 0),t});var Lt=b(N());var wt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=A.getState().session;return!!t?.sessionAuthenticated}};var Rt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Ka="ft-user-assets",Ga={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(z).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Sr(e,r,[...Er(e,r),i]),Ri(e,r,1,n),Li(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Sr(e,r,Er(e,r).map(i=>i.id===n.id?n:i)),Li(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Sr(e,r,Er(e,r).filter(a=>a.id!==i)),Ri(e,r,-1,n)}},Pi={[z.SEARCHES]:"savedSearches",[z.BOOKMARKS]:"bookmarks",[z.BOOKS]:void 0,[z.COLLECTIONS]:void 0},Er=(e,t)=>{var r;let n=Pi[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Sr=(e,t,r)=>{let n=Pi[t];n&&(e[n]=r)},Ri=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===z.BOOKMARKS&&n)){let a=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,a+r)}},Li=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},W=Lt.FtReduxStore.get({name:Ka,reducers:Ga,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(z).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xr=class{constructor(t=new wt,r=new Rt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new st,this.savedSearchesService=new dt,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,Lt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),W.actions.clearAssetCount(),W.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),W.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),W.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();W.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();W.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&W.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&W.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(W.getState().assetCounts.bookmarkByMap).length!==0;t===z.BOOKMARKS&&r&&W.actions.clearBookmarkCountByMap(),W.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;W.actions.bookmarks(r)}}},Va=new xr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Va);(0,Ni.customElement)("ft-app-context")(R);var Mi=b(F());var Or=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[n,i]=t.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Di=new Or;var qa=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Wa=Symbol("i18nAttributes"),Fa=Symbol("i18nListAttributes"),ki=Symbol("i18nProperties"),Pt=Symbol("i18nContexts"),Xe=Symbol("i18nUnsubs"),Ui=(0,He.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?ut:Pe}i18n(a){let{context:s,key:o,message:u}=a,{custom:c,args:d,argsProvider:h}=a;if(s&&o){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=d??(h?h(this):[]);return this.getI18nService(c).resolveMessage(s,o,...p)}return u}async awaitI18n(a){let{context:s,custom:o}=a;return s&&await this.getI18nService(o).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Di.isI18nKey(a)){let[o,u]=a.split(".");return this.i18n({custom:!0,context:o,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,o,u)=>a.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,o,u)=>{var c;return((c=u?.context)===null||c===void 0?void 0:c.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,o;let u=this,c=(d,h,p)=>p?.context&&p.key&&a(d,h,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...d})}:p;(s=this[Wa])===null||s===void 0||s.forEach((d,h)=>u[h]=c(d,h,u[h])),(o=this[Fa])===null||o===void 0||o.forEach((d,h)=>{var p;return u[h]=(p=u[h])===null||p===void 0?void 0:p.map(g=>c(d,h,g))})}updateI18nProperties(a){var s;(s=this[ki])===null||s===void 0||s.forEach((o,u)=>{a(o,u)&&(this[u]=this.i18n(o))})}addI18nMessages(a,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,o)}addI18nContext(a,s,o){let u=(typeof a=="string"?a:a.name).toLowerCase();o=typeof a=="string"?o:a.custom,this[Pt].set(u,{isCustomContext:o}),this[Xe].has(u)||this[Xe].set(u,this.getI18nService(o).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(o).prepareContext(u,s)}hasI18nContext(a){return this[Pt].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Pt].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Xe].forEach(a=>a()),this[Xe].clear()}}return t=Pt,r=Xe,qa([(0,Mi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ii=class extends Ui(He.FtLitElement){},Nt=class extends Ui(He.FtLitElementRedux){};var Je=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},te=class extends Nt{constructor(){super(),this.editorMode=!1,this.addStore(A)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Dt.nothing:Dt.html`
|
|
86
|
+
`}connectedCallback(){super.connectedCallback(),A.addEventListener(Ee.eventName,this.reloadConfiguration)}disconnectedCallback(){A.addEventListener(Ee.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,i,a,s,o,u;super.update(t),t.has("baseUrl")&&(A.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&A.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&A.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&A.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&A.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&A.actions.noCustom(this.noCustom),t.has("editorMode")&&A.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&A.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&A.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Pe.addContext(c)),t.has("openExternalDocumentInNewTab")&&A.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&A.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&A.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(A.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),A.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),A.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&A.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&A.actions.availableContentLocales((u=(o=this.availableContentLocales)===null||o===void 0?void 0:o.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Mn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};R.elementDefinitions={};R.styles=$r;M([(0,B.property)()],R.prototype,"baseUrl",void 0);M([(0,B.property)()],R.prototype,"apiIntegrationIdentifier",void 0);M([(0,B.property)()],R.prototype,"apiIntegrationAppVersion",void 0);M([(0,B.property)()],R.prototype,"uiLocale",void 0);M([(0,Z.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);M([(0,Z.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"editorMode",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"noCustom",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);M([(0,B.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"withManualResources",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);M([(0,B.property)({type:Object})],R.prototype,"apiProvider",void 0);M([(0,B.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);M([(0,Z.jsonProperty)([])],R.prototype,"messageContexts",void 0);M([(0,Z.jsonProperty)(void 0)],R.prototype,"session",void 0);M([(0,B.state)()],R.prototype,"localesConfiguration",void 0);M([(0,B.state)()],R.prototype,"availableContentLocales",void 0);var br=b(F());function ta(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(o=>s[o]!=null);if(i=a(e),r=i.length,r!==a(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!pt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pt(e,t){try{return ta(e,t)}catch{return!1}}function We(e,t){return!pt(e,t)}function ht(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Un=b(F(),1);var Xt=e=>{let t=e??{};return(r,n)=>{var i;let a={hasChanged:We,attribute:!1,...t};(0,Un.property)(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:o=>o[n],store:t.store})}};var mt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Oe=b(F(),1);var jn=b(F(),1);function Bn(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,jn.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:We,...t??{}})}var yt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(o){i(o);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Kn=b(re(),1);var vt=globalThis,ra=vt.ShadowRoot&&(vt.ShadyCSS===void 0||vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zo=Symbol();var Hn=(e,t)=>{if(ra)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=vt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var gt=class extends Kn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Hn(n,t.elementStyles),n}};function Gn(e,t,...r){var n;let i=e.querySelector(t);for(let a of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Ie=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Fn,Vn=Symbol("constructorPrototype"),qn=Symbol("constructorName"),$n=Symbol("exportpartsDebouncer"),Wn=Symbol("dynamicDependenciesLoaded"),De=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};De.eventName="exportparts-updated";var ne=class extends gt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Fn]=new yt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[$n].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[qn]=this.constructor.name,this[Vn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[qn]&&Object.setPrototypeOf(this,this[Vn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Wn]||(r[Wn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(De.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(De.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 De)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];r=Gn(this.shadowRoot,...a)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(t){var r,n,i,a,s,o;let u=p=>p!=null&&p.trim().length>0,c=t.filter(u).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let d=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(a=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],y=(o=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&o!==void 0?o:[],v=[...g,...y].filter(u).map(S=>S.trim());for(let S of v)d.add(S)}if(d.size===0){this.exportparts=void 0;return}let h=[...d.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...h].join(", ")}};Fn=$n;Ie([(0,Oe.property)()],ne.prototype,"exportpartsPrefix",void 0);Ie([Bn([])],ne.prototype,"exportpartsPrefixes",void 0);Ie([(0,Oe.property)({reflect:!0})],ne.prototype,"exportparts",void 0);Ie([(0,Oe.property)()],ne.prototype,"customStylesheet",void 0);Ie([(0,Oe.property)()],ne.prototype,"elementToFocus",void 0);Ie([(0,Oe.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function At(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Fe=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Te=Symbol("internalStores"),na=ht(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(o=>s.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Te].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Te].get(s)}addStore(s,o){var u;o=(u=o??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(o),this[Te].set(o,s),this.subscribeToStore(o,s),this.updateFromStores()}removeStore(s){let o=typeof s=="string"?s:s.name;this.unsubscribeFromStore(o),this[Te].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Te].forEach((s,o)=>this.subscribeToStore(o,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,o)=>{let u=this.constructor.getPropertyOptions(o);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:o)){let c=this.getStore(s.store);c&&(s.store?this[fe].has(s.store):this[fe].size>0)&&(this[o]=s.selector(c.getState(),this))}})}subscribeToStore(s,o){var u;this[fe].set(s,o.subscribe(()=>this.updateFromStores())),this[Fe].set(s,[]),At(o)&&o.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||o.name===c.store)){let h=p=>this[d](p);o.addEventListener(c.eventName,h),this[Fe].get(s).push(()=>o.removeEventListener(c.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[fe].forEach((s,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(s){var o;this[fe].has(s)&&this[fe].get(s)(),this[fe].delete(s),(o=this[Fe].get(s))===null||o===void 0||o.forEach(u=>u()),this[Fe].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=fe,r=Te,n=Fe,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),zn=class extends na(ne){};function Y(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function oe(e){return!!e&&!!e[L]}function ee(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===da}(e)||Array.isArray(e)||!!e[ti]||!!(!((t=e.constructor)===null||t===void 0)&&t[ti])||ar(e)||sr(e))}function _e(e,t,r){r===void 0&&(r=!1),Ue(e)===0?(r?Object.keys:ke)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Ue(e){var t=e[L];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ar(e)?2:sr(e)?3:0}function Me(e,t){return Ue(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ia(e,t){return Ue(e)===2?e.get(t):e[t]}function ri(e,t,r){var n=Ue(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ni(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ar(e){return la&&e instanceof Map}function sr(e){return ca&&e instanceof Set}function pe(e){return e.o||e.t}function or(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=si(e);delete t[L];for(var r=ke(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function ur(e,t){return t===void 0&&(t=!1),lr(e)||oe(e)||!ee(e)||(Ue(e)>1&&(e.set=e.add=e.clear=e.delete=aa),Object.freeze(e),t&&_e(e,function(r,n){return ur(n,!0)},!0)),e}function aa(){Y(2)}function lr(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ie(e){var t=ir[e];return t||Y(18,e),t}function sa(e,t){ir[e]||(ir[e]=t)}function tr(){return ze}function Qt(e,t){t&&(ie("Patches"),e.u=[],e.s=[],e.v=t)}function bt(e){rr(e),e.p.forEach(oa),e.p=null}function rr(e){e===ze&&(ze=e.l)}function Yn(e){return ze={p:[],l:ze,h:e,m:!0,_:0}}function oa(e){var t=e[L];t.i===0||t.i===1?t.j():t.g=!0}function Jt(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||ie("ES5").S(t,e,n),n?(r[L].P&&(bt(t),Y(4)),ee(e)&&(e=Et(t,e),t.l||St(t,e)),t.u&&ie("Patches").M(r[L].t,e,t.u,t.s)):e=Et(t,r,[]),bt(t),t.u&&t.v(t.u,t.s),e!==ai?e:void 0}function Et(e,t,r){if(lr(t))return t;var n=t[L];if(!n)return _e(t,function(o,u){return Xn(e,n,t,o,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return St(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=or(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),_e(a,function(o,u){return Xn(e,n,i,o,u,r,s)}),St(e,i,!1),r&&e.u&&ie("Patches").N(n,r,e.u,e.s)}return n.o}function Xn(e,t,r,n,i,a,s){if(oe(i)){var o=Et(e,i,a&&t&&t.i!==3&&!Me(t.R,n)?a.concat(n):void 0);if(ri(r,n,o),!oe(o))return;e.m=!1}else s&&r.add(i);if(ee(i)&&!lr(i)){if(!e.h.D&&e._<1)return;Et(e,i),t&&t.A.l||St(e,i)}}function St(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ur(t,r)}function Zt(e,t){var r=e[L];return(r?pe(r):e)[t]}function Qn(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function he(e){e.P||(e.P=!0,e.l&&he(e.l))}function er(e){e.o||(e.o=or(e.t))}function nr(e,t,r){var n=ar(t)?ie("MapSet").F(t,r):sr(t)?ie("MapSet").T(t,r):e.O?function(i,a){var s=Array.isArray(i),o={i:s?1:0,A:a?a.A:tr(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=o,c=Ye;s&&(u=[o],c=$e);var d=Proxy.revocable(u,c),h=d.revoke,p=d.proxy;return o.k=p,o.j=h,p}(t,r):ie("ES5").J(t,r);return(r?r.A:tr()).p.push(n),n}function ua(e){return oe(e)||Y(22,e),function t(r){if(!ee(r))return r;var n,i=r[L],a=Ue(r);if(i){if(!i.P&&(i.i<4||!ie("ES5").K(i)))return i.t;i.I=!0,n=Jn(r,a),i.I=!1}else n=Jn(r,a);return _e(n,function(s,o){i&&ia(i.t,s)===o||ri(n,s,t(o))}),a===3?new Set(n):n}(e)}function Jn(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return or(e)}function ii(){function e(s,o){var u=a[s];return u?u.enumerable=o:a[s]=u={configurable:!0,enumerable:o,get:function(){var c=this[L];return Ye.get(c,s)},set:function(c){var d=this[L];Ye.set(d,s,c)}},u}function t(s){for(var o=s.length-1;o>=0;o--){var u=s[o][L];if(!u.P)switch(u.i){case 5:n(u)&&he(u);break;case 4:r(u)&&he(u)}}}function r(s){for(var o=s.t,u=s.k,c=ke(u),d=c.length-1;d>=0;d--){var h=c[d];if(h!==L){var p=o[h];if(p===void 0&&!Me(o,h))return!0;var g=u[h],y=g&&g[L];if(y?y.t!==p:!ni(g,p))return!0}}var v=!!o[L];return c.length!==ke(o).length+(v?0:1)}function n(s){var o=s.k;if(o.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(o,o.length-1);if(u&&!u.get)return!0;for(var c=0;c<o.length;c++)if(!o.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&Y(3,JSON.stringify(pe(s)))}var a={};sa("ES5",{J:function(s,o){var u=Array.isArray(s),c=function(h,p){if(h){for(var g=Array(p.length),y=0;y<p.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var v=si(p);delete v[L];for(var S=ke(v),x=0;x<S.length;x++){var O=S[x];v[O]=e(O,h||!!v[O].enumerable)}return Object.create(Object.getPrototypeOf(p),v)}(u,s),d={i:u?5:4,A:o?o.A:tr(),P:!1,I:!1,R:{},l:o,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,L,{value:d,writable:!0}),c},S:function(s,o,u){u?oe(o)&&o[L].A===s&&t(s.p):(s.u&&function c(d){if(d&&typeof d=="object"){var h=d[L];if(h){var p=h.t,g=h.k,y=h.R,v=h.i;if(v===4)_e(g,function(_){_!==L&&(p[_]!==void 0||Me(p,_)?y[_]||c(g[_]):(y[_]=!0,he(h)))}),_e(p,function(_){g[_]!==void 0||Me(g,_)||(y[_]=!1,he(h))});else if(v===5){if(n(h)&&(he(h),y.length=!0),g.length<p.length)for(var S=g.length;S<p.length;S++)y[S]=!1;else for(var x=p.length;x<g.length;x++)y[x]=!0;for(var O=Math.min(g.length,p.length),w=0;w<O;w++)g.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&c(g[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var Zn,ze,cr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",la=typeof Map<"u",ca=typeof Set<"u",ei=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ai=cr?Symbol.for("immer-nothing"):((Zn={})["immer-nothing"]=!0,Zn),ti=cr?Symbol.for("immer-draftable"):"__$immer_draftable",L=cr?Symbol.for("immer-state"):"__$immer_state";var da=""+Object.prototype.constructor,ke=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,si=Object.getOwnPropertyDescriptors||function(e){var t={};return ke(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},ir={},Ye={get:function(e,t){if(t===L)return e;var r=pe(e);if(!Me(r,t))return function(i,a,s){var o,u=Qn(a,s);return u?"value"in u?u.value:(o=u.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!ee(n)?n:n===Zt(e.t,t)?(er(e),e.o[t]=nr(e.A.h,n,e)):n},has:function(e,t){return t in pe(e)},ownKeys:function(e){return Reflect.ownKeys(pe(e))},set:function(e,t,r){var n=Qn(pe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Zt(pe(e),t),a=i?.[L];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ni(r,i)&&(r!==void 0||Me(e.t,t)))return!0;er(e),he(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zt(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,er(e),he(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Y(12)}},$e={};_e(Ye,function(e,t){$e[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),$e.deleteProperty=function(e,t){return $e.set.call(this,e,t,void 0)},$e.set=function(e,t,r){return Ye.set.call(this,e[0],t,r,e[0])};var fa=function(){function e(r){var n=this;this.O=ei,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var u=n;return function(v){var S=this;v===void 0&&(v=o);for(var x=arguments.length,O=Array(x>1?x-1:0),w=1;w<x;w++)O[w-1]=arguments[w];return u.produce(v,function(_){var U;return(U=a).call.apply(U,[S,_].concat(O))})}}var c;if(typeof a!="function"&&Y(6),s!==void 0&&typeof s!="function"&&Y(7),ee(i)){var d=Yn(n),h=nr(n,i,void 0),p=!0;try{c=a(h),p=!1}finally{p?bt(d):rr(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(v){return Qt(d,s),Jt(v,d)},function(v){throw bt(d),v}):(Qt(d,s),Jt(c,d))}if(!i||typeof i!="object"){if((c=a(i))===void 0&&(c=i),c===ai&&(c=void 0),n.D&&ur(c,!0),s){var g=[],y=[];ie("Patches").M(i,c,g,y),s(g,y)}return c}Y(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(c){for(var d=arguments.length,h=Array(d>1?d-1:0),p=1;p<d;p++)h[p-1]=arguments[p];return n.produceWithPatches(c,function(g){return i.apply(void 0,[g].concat(h))})};var s,o,u=n.produce(i,a,function(c,d){s=c,o=d});return typeof Promise<"u"&&u instanceof Promise?u.then(function(c){return[c,s,o]}):[u,s,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ee(r)||Y(8),oe(r)&&(r=ua(r));var n=Yn(this),i=nr(this,r,void 0);return i[L].C=!0,rr(n),i},t.finishDraft=function(r,n){var i=r&&r[L],a=i.A;return Qt(a,n),Jt(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!ei&&Y(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var s=ie("Patches").$;return oe(r)?s(r,n):this.produce(r,function(o){return s(o,n)})},e}(),q=new fa,pa=q.produce,lu=q.produceWithPatches.bind(q),cu=q.setAutoFreeze.bind(q),du=q.setUseProxies.bind(q),fu=q.applyPatches.bind(q),pu=q.createDraft.bind(q),hu=q.finishDraft.bind(q),xt=pa;function Ce(e){"@babel/helpers - typeof";return Ce=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},Ce(e)}function oi(e,t){if(Ce(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ce(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ui(e){var t=oi(e,"string");return Ce(t)=="symbol"?t:t+""}function li(e,t,r){return(t=ui(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ci(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ci(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ci(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var di=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ot={INIT:"@@redux/INIT"+fr(),REPLACE:"@@redux/REPLACE"+fr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fr()}};function ha(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function pr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(H(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(H(1));return r(pr)(e,t)}if(typeof e!="function")throw new Error(H(2));var i=e,a=t,s=[],o=s,u=!1;function c(){o===s&&(o=s.slice())}function d(){if(u)throw new Error(H(3));return a}function h(v){if(typeof v!="function")throw new Error(H(4));if(u)throw new Error(H(5));var S=!0;return c(),o.push(v),function(){if(S){if(u)throw new Error(H(6));S=!1,c();var O=o.indexOf(v);o.splice(O,1),s=null}}}function p(v){if(!ha(v))throw new Error(H(7));if(typeof v.type>"u")throw new Error(H(8));if(u)throw new Error(H(9));try{u=!0,a=i(a,v)}finally{u=!1}for(var S=s=o,x=0;x<S.length;x++){var O=S[x];O()}return v}function g(v){if(typeof v!="function")throw new Error(H(10));i=v,p({type:Ot.REPLACE})}function y(){var v,S=h;return v={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(H(11));function w(){O.next&&O.next(d())}w();var _=S(w);return{unsubscribe:_}}},v[di]=function(){return this},v}return p({type:Ot.INIT}),n={dispatch:p,subscribe:h,getState:d,replaceReducer:g},n[di]=y,n}function ma(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Ot.INIT});if(typeof n>"u")throw new Error(H(12));if(typeof r(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(H(13))})}function fi(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var a=Object.keys(r),s,o;try{ma(r)}catch(u){o=u}return function(c,d){if(c===void 0&&(c={}),o)throw o;if(0)var h;for(var p=!1,g={},y=0;y<a.length;y++){var v=a[y],S=r[v],x=c[v],O=S(x,d);if(typeof O>"u"){var w=d&&d.type;throw new Error(H(14))}g[v]=O,p=p||O!==x}return p=p||a.length!==Object.keys(c).length,p?g:c}}function je(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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 pi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(H(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},o=t.map(function(u){return u(s)});return a=je.apply(void 0,o)(i.dispatch),dr(dr({},i),{},{dispatch:a})}}}function hi(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(o){return typeof o=="function"?o(i,a,e):s(o)}}};return t}var mi=hi();mi.withExtraArgument=hi;var hr=mi;var bi=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ya=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(c){return function(d){return u([c,d])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Be=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},va=Object.defineProperty,ga=Object.defineProperties,Aa=Object.getOwnPropertyDescriptors,yi=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,Ea=Object.prototype.propertyIsEnumerable,vi=function(e,t,r){return t in e?va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},me=function(e,t){for(var r in t||(t={}))ba.call(t,r)&&vi(e,r,t[r]);if(yi)for(var n=0,i=yi(t);n<i.length;n++){var r=i[n];Ea.call(t,r)&&vi(e,r,t[r])}return e},mr=function(e,t){return ga(e,Aa(t))},Sa=function(e,t,r){return new Promise(function(n,i){var a=function(u){try{o(r.next(u))}catch(c){i(c)}},s=function(u){try{o(r.throw(u))}catch(c){i(c)}},o=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};o((r=r.apply(e,t)).next())})};var xa=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?je:je.apply(null,arguments)},Nu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Oa(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Ta=function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Be([void 0],r[0].concat(this)))):new(t.bind.apply(t,Be([void 0],r.concat(this))))},t}(Array),_a=function(e){bi(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Be([void 0],r[0].concat(this)))):new(t.bind.apply(t,Be([void 0],r.concat(this))))},t}(Array);function gr(e){return ee(e)?xt(e,function(){}):e}function Ca(e){return typeof e=="boolean"}function wa(){return function(t){return Ra(t)}}function Ra(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,o=new Ta;if(r&&(Ca(r)?o.push(hr):o.push(hr.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var c}return o}var yr=!0;function Ei(e){var t=wa(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,a=r.middleware,s=a===void 0?t():a,o=r.devTools,u=o===void 0?!0:o,c=r.preloadedState,d=c===void 0?void 0:c,h=r.enhancers,p=h===void 0?void 0:h,g;if(typeof i=="function")g=i;else if(Oa(i))g=fi(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 y=s;if(typeof y=="function"&&(y=y(t),!yr&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!yr&&y.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=pi.apply(void 0,y),S=je;u&&(S=xa(me({trace:!yr},typeof u=="object"&&u)));var x=new _a(v),O=x;Array.isArray(p)?O=Be([v],p):typeof p=="function"&&(O=p(x));var w=S.apply(void 0,O);return pr(g,d,w)}function ye(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return me(me({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function Si(e){var t={},r=[],n,i={addCase:function(a,s){var o=typeof a=="string"?a:a.type;if(o in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[o]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,r,n]}function La(e){return typeof e=="function"}function Pa(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Si(t):[t,r,n],a=i[0],s=i[1],o=i[2],u;if(La(e))u=function(){return gr(e())};else{var c=gr(e);u=function(){return c}}function d(h,p){h===void 0&&(h=u());var g=Be([a[p.type]],s.filter(function(y){var v=y.matcher;return v(p)}).map(function(y){var v=y.reducer;return v}));return g.filter(function(y){return!!y}).length===0&&(g=[o]),g.reduce(function(y,v){if(v)if(oe(y)){var S=y,x=v(S,p);return x===void 0?y:x}else{if(ee(y))return xt(y,function(O){return v(O,p)});var x=v(y,p);if(x===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}return y},h)}return d.getInitialState=u,d}function Na(e,t){return e+"/"+t}function xi(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:gr(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},o={};i.forEach(function(d){var h=n[d],p=Na(t,d),g,y;"reducer"in h?(g=h.reducer,y=h.prepare):g=h,a[d]=g,s[p]=g,o[d]=y?ye(p,y):ye(p)});function u(){var d=typeof e.extraReducers=="function"?Si(e.extraReducers):[e.extraReducers],h=d[0],p=h===void 0?{}:h,g=d[1],y=g===void 0?[]:g,v=d[2],S=v===void 0?void 0:v,x=me(me({},p),s);return Pa(r,function(O){for(var w in x)O.addCase(w,x[w]);for(var _=0,U=y;_<U.length;_++){var X=U[_];O.addMatcher(X.matcher,X.reducer)}S&&O.addDefaultCase(S)})}var c;return{name:t,reducer:function(d,h){return c||(c=u()),c(d,h)},actions:o,caseReducers:a,getInitialState:function(){return c||(c=u()),c.getInitialState()}}}var Da="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ia=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Da[Math.random()*64|0];return t},Ma=["name","message","stack","code"],vr=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),gi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),ka=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Ma;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},ku=function(){function e(t,r,n){var i=ye(t+"/fulfilled",function(d,h,p,g){return{payload:d,meta:mr(me({},g||{}),{arg:p,requestId:h,requestStatus:"fulfilled"})}}),a=ye(t+"/pending",function(d,h,p){return{payload:void 0,meta:mr(me({},p||{}),{arg:h,requestId:d,requestStatus:"pending"})}}),s=ye(t+"/rejected",function(d,h,p,g,y){return{payload:g,error:(n&&n.serializeError||ka)(d||"Rejected"),meta:mr(me({},y||{}),{arg:p,requestId:h,rejectedWithValue:!!g,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),o=!1,u=typeof AbortController<"u"?AbortController:function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d}();function c(d){return function(h,p,g){var y=n?.idGenerator?n.idGenerator(d):Ia(),v=new u,S,x=!1;function O(_){S=_,v.abort()}var w=function(){return Sa(this,null,function(){var _,U,X,ge,G,Ae,we;return ya(this,function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),ge=(_=n?.condition)==null?void 0:_.call(n,d,{getState:p,extra:g}),ja(ge)?[4,ge]:[3,2];case 1:ge=l.sent(),l.label=2;case 2:if(ge===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=!0,G=new Promise(function(f,E){return v.signal.addEventListener("abort",function(){return E({name:"AbortError",message:S||"Aborted"})})}),h(a(y,d,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:y,arg:d},{getState:p,extra:g}))),[4,Promise.race([G,Promise.resolve(r(d,{dispatch:h,getState:p,extra:g,requestId:y,signal:v.signal,abort:O,rejectWithValue:function(f,E){return new vr(f,E)},fulfillWithValue:function(f,E){return new gi(f,E)}})).then(function(f){if(f instanceof vr)throw f;return f instanceof gi?i(f.payload,y,d,f.meta):i(f,y,d)})])];case 3:return X=l.sent(),[3,5];case 4:return Ae=l.sent(),X=Ae instanceof vr?s(null,y,d,Ae.payload,Ae.meta):s(Ae,y,d),[3,5];case 5:return we=n&&!n.dispatchConditionRejection&&s.match(X)&&X.meta.condition,we||h(X),[2,X]}})})}();return Object.assign(w,{abort:O,requestId:y,arg:d,unwrap:function(){return w.then(Ua)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ua(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ja(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oi="listener",Ti="completed",_i="cancelled",Uu="task-"+_i,ju="task-"+Ti,Bu=Oi+"-"+_i,Hu=Oi+"-"+Ti;var Ar="listenerMiddleware";var Ku=ye(Ar+"/add"),Gu=ye(Ar+"/removeAll"),Vu=ye(Ar+"/remove");var Ai,qu=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ai||(Ai=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ba=function(e){return function(t){setTimeout(t,e)}},Wu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ba(10);ii();var Ha=ht(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Tt=class extends Ha(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ci=class e extends Tt{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(At(a))return a;if(i==null)return;let s=xi({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Ei({reducer:(u,c)=>c.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...c.overwrites}:s.reducer(u,c)});return window.ftReduxStores[i.name]=new e(s,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mt;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,o)=>{let u=s,c=a[u];return c?(...d)=>{let h=c(...d.map(i));return this.reduxStore.dispatch(h),h}:d=>{this.setState({[u]:i(d)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}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 _t=class{static format(t,r,n,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(t,r,n,i)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i){let a=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let o=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${o}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var wi=b(N()),Ct=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},vl=(0,wi.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?o=>_t.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ct([(0,br.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ct([(0,br.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ct([Xt({store:A.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Ct([Xt({store:A.name})],t.prototype,"uiLocale",void 0),t});var Lt=b(N());var wt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=A.getState().session;return!!t?.sessionAuthenticated}};var Rt=class extends V{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Ka="ft-user-assets",Ga={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(z).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Sr(e,r,[...Er(e,r),i]),Ri(e,r,1,n),Li(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Sr(e,r,Er(e,r).map(i=>i.id===n.id?n:i)),Li(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Sr(e,r,Er(e,r).filter(a=>a.id!==i)),Ri(e,r,-1,n)}},Pi={[z.SEARCHES]:"savedSearches",[z.BOOKMARKS]:"bookmarks",[z.BOOKS]:void 0,[z.COLLECTIONS]:void 0},Er=(e,t)=>{var r;let n=Pi[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Sr=(e,t,r)=>{let n=Pi[t];n&&(e[n]=r)},Ri=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===z.BOOKMARKS&&n)){let a=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,a+r)}},Li=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},W=Lt.FtReduxStore.get({name:Ka,reducers:Ga,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(z).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xr=class{constructor(t=new wt,r=new Rt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new st,this.savedSearchesService=new dt,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,Lt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),W.actions.clearAssetCount(),W.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),W.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),W.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();W.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();W.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&W.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&W.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(W.getState().assetCounts.bookmarkByMap).length!==0;t===z.BOOKMARKS&&r&&W.actions.clearBookmarkCountByMap(),W.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;W.actions.bookmarks(r)}}},Va=new xr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Va);(0,Ni.customElement)("ft-app-context")(R);var Mi=b(F());var Or=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[n,i]=t.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Di=new Or;var qa=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},Wa=Symbol("i18nAttributes"),Fa=Symbol("i18nListAttributes"),ki=Symbol("i18nProperties"),Pt=Symbol("i18nContexts"),Xe=Symbol("i18nUnsubs"),Ui=(0,He.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?ut:Pe}i18n(a){let{context:s,key:o,message:u}=a,{custom:c,args:d,argsProvider:h}=a;if(s&&o){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=d??(h?h(this):[]);return this.getI18nService(c).resolveMessage(s,o,...p)}return u}async awaitI18n(a){let{context:s,custom:o}=a;return s&&await this.getI18nService(o).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Di.isI18nKey(a)){let[o,u]=a.split(".");return this.i18n({custom:!0,context:o,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,o,u)=>a.has(o)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,o,u)=>{var c;return((c=u?.context)===null||c===void 0?void 0:c.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,o;let u=this,c=(d,h,p)=>p?.context&&p.key&&a(d,h,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...d})}:p;(s=this[Wa])===null||s===void 0||s.forEach((d,h)=>u[h]=c(d,h,u[h])),(o=this[Fa])===null||o===void 0||o.forEach((d,h)=>{var p;return u[h]=(p=u[h])===null||p===void 0?void 0:p.map(g=>c(d,h,g))})}updateI18nProperties(a){var s;(s=this[ki])===null||s===void 0||s.forEach((o,u)=>{a(o,u)&&(this[u]=this.i18n(o))})}addI18nMessages(a,s,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,o)}addI18nContext(a,s,o){let u=(typeof a=="string"?a:a.name).toLowerCase();o=typeof a=="string"?o:a.custom,this[Pt].set(u,{isCustomContext:o}),this[Xe].has(u)||this[Xe].set(u,this.getI18nService(o).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(o).prepareContext(u,s)}hasI18nContext(a){return this[Pt].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Pt].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Xe].forEach(a=>a()),this[Xe].clear()}}return t=Pt,r=Xe,qa([(0,Mi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ii=class extends Ui(He.FtLitElement){},Nt=class extends Ui(He.FtLitElementRedux){};var Qe=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},te=class extends Nt{constructor(){super(),this.editorMode=!1,this.addStore(A)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Dt.nothing:Dt.html`
|
|
87
87
|
<span class="ft-i18n">
|
|
88
88
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
89
89
|
</span>
|
|
90
|
-
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};te.elementDefinitions={};te.styles=Wr;
|
|
90
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};te.elementDefinitions={};te.styles=Wr;Qe([(0,Mt.redux)()],te.prototype,"editorMode",void 0);Qe([(0,It.property)()],te.prototype,"context",void 0);Qe([(0,It.property)()],te.prototype,"key",void 0);Qe([(0,Mt.jsonProperty)([])],te.prototype,"args",void 0);Qe([(0,It.property)()],te.prototype,"defaultMessage",void 0);var kt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?ut:Pe}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let a=i;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};(0,ji.customElement)("ft-i18n")(te);var Tr=kt.build("designedReaderTopicContent");var K=function(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},D=class extends rt{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,r,n;return!this.map||!this.error&&!this.content&&((t=this.translationSourceLanguage)===null||t===void 0?void 0:t.code)==((r=this.translationDestinationLanguage)===null||r===void 0?void 0:r.code)?ve.html`
|
|
91
91
|
<section class="topic-loading"></section>
|
|
92
92
|
`:ve.html`
|
|
93
93
|
<style>
|