Socket
Socket
Sign inDemoInstall

@fluid-topics/public-api

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluid-topics/public-api - npm Package Compare versions

Comparing version 1.0.53 to 1.0.54

7

build/cjs/types/ft-common/public.js

@@ -288,9 +288,4 @@ "use strict";

&& ((0, exports.isFtMetadataSortRule)(o.sortRule))
&& (isBoolean(o.tocFilter))
&& ((0, exports.isFtFacetType)(o.type))
&& (isBoolean(o.reverseSort))
&& (isString(o.key))
&& ((isObject(o.labels)
&& Object.keys(o.labels).every((k) => isString(k))
&& Object.values(o.labels).every((v) => v == null || isString(v))));
&& (isString(o.key));
};

@@ -297,0 +292,0 @@ exports.isFtMetadataDescriptor = isFtMetadataDescriptor;

12

build/cjs/types/ft-server/public.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFtPaginationConfiguration = exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtMapAttachment = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = void 0;
exports.isFtPaginationConfiguration = exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtMapAttachment = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = exports.isFtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus = void 0;
const isObject = (o) => typeof o === "object" && o != null;

@@ -8,2 +8,12 @@ const isBoolean = (o) => typeof o === "boolean";

const isString = (o) => typeof o === "string";
// From: ConfigurationHistoryEntryStatus
var FtConfigurationHistoryEntryStatus;
(function (FtConfigurationHistoryEntryStatus) {
FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
FtConfigurationHistoryEntryStatus["INVALID"] = "INVALID";
})(FtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus || (exports.FtConfigurationHistoryEntryStatus = {}));
const isFtConfigurationHistoryEntryStatus = (o) => {
return ["VALID", "INVALID"].includes(o);
};
exports.isFtConfigurationHistoryEntryStatus = isFtConfigurationHistoryEntryStatus;
const isFtReaderConfiguration = (o) => {

@@ -10,0 +20,0 @@ return isObject(o)

@@ -219,7 +219,4 @@ export declare enum FtMyLibraryColors {

sortRule: FtMetadataSortRuleKeys;
tocFilter: boolean;
type: FtFacetTypeKeys;
reverseSort: boolean;
key: string;
labels: Record<string, string | undefined>;
}

@@ -226,0 +223,0 @@ export declare const isFtMetadataDescriptor: (o: any) => o is FtMetadataDescriptor;

@@ -259,9 +259,4 @@ const isObject = (o) => typeof o === "object" && o != null;

&& (isFtMetadataSortRule(o.sortRule))
&& (isBoolean(o.tocFilter))
&& (isFtFacetType(o.type))
&& (isBoolean(o.reverseSort))
&& (isString(o.key))
&& ((isObject(o.labels)
&& Object.keys(o.labels).every((k) => isString(k))
&& Object.values(o.labels).every((v) => v == null || isString(v))));
&& (isString(o.key));
};

@@ -268,0 +263,0 @@ export const isFtMySearch = (o) => {

@@ -0,1 +1,7 @@

export declare enum FtConfigurationHistoryEntryStatus {
VALID = "VALID",
INVALID = "INVALID"
}
export type FtConfigurationHistoryEntryStatusKeys = keyof typeof FtConfigurationHistoryEntryStatus;
export declare const isFtConfigurationHistoryEntryStatus: (o: any) => o is FtConfigurationHistoryEntryStatus;
export interface FtReaderConfiguration {

@@ -2,0 +8,0 @@ feedback: FtReaderFeedbackConfiguration;

@@ -5,2 +5,11 @@ const isObject = (o) => typeof o === "object" && o != null;

const isString = (o) => typeof o === "string";
// From: ConfigurationHistoryEntryStatus
export var FtConfigurationHistoryEntryStatus;
(function (FtConfigurationHistoryEntryStatus) {
FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
FtConfigurationHistoryEntryStatus["INVALID"] = "INVALID";
})(FtConfigurationHistoryEntryStatus || (FtConfigurationHistoryEntryStatus = {}));
export const isFtConfigurationHistoryEntryStatus = (o) => {
return ["VALID", "INVALID"].includes(o);
};
export const isFtReaderConfiguration = (o) => {

@@ -7,0 +16,0 @@ return isObject(o)

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).fluidtopics={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(r.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function c(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=c(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;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(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,i=u(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=c(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(e,t){e=s(e),t=n(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},l.prototype.delete=function(e){delete this.map[s(e)]},l.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},l.prototype.set=function(e,t){this.map[s(e)]=n(t)},l.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},l.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),o(e)},l.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),o(e)},l.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),o(e)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(e,t){var r,i,a=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new l(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(a))}})),t}function m(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];m.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function g(e,i){return new Promise((function(a,s){var n=new f(e,i);if(n.signal&&n.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),i=r.shift().trim();if(i){var a=r.join(":").trim();t.append(i,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;a(new m(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(n.method,n.url,!0),"include"===n.credentials?o.withCredentials=!0:"omit"===n.credentials&&(o.withCredentials=!1),"responseType"in o&&r.blob&&(o.responseType="blob"),n.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),n.signal&&(n.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&n.signal.removeEventListener("abort",u)}),o.send(void 0===n._bodyInit?null:n._bodyInit)}))}g.polyfill=!0,e.fetch||(e.fetch=g,e.Headers=l,e.Request=f,e.Response=m),t.Headers=l,t.Request=f,t.Response=m,t.fetch=g,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:t);const r=e=>"object"==typeof e&&null!=e,i=e=>"boolean"==typeof e,a=e=>"number"==typeof e,s=e=>"string"==typeof e;var n;e.FtMyLibraryColors=void 0,(n=e.FtMyLibraryColors||(e.FtMyLibraryColors={})).black="black",n.green="green",n.blue="blue",n.purple="purple",n.red="red",n.orange="orange",n.yellow="yellow";const o=e=>["black","green","blue","purple","red","orange","yellow"].includes(e);var l;e.FtTopicOriginType=void 0,(l=e.FtTopicOriginType||(e.FtTopicOriginType={})).OFFICIAL="OFFICIAL",l.PERSONAL="PERSONAL",l.SHARED="SHARED";const u=e=>["OFFICIAL","PERSONAL","SHARED"].includes(e),c=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>Array.isArray(e)&&e.every((e=>s(e)))))&&s(e.key),d=e=>r(e)&&s(e.notes)&&Array.isArray(e.children)&&e.children.every((e=>d(e)))&&(null==e.topicLink||p(e.topicLink))&&s(e.title)&&(null==e.htmlContent||s(e.htmlContent)),p=e=>r(e)&&s(e.tocId)&&s(e.contentId)&&s(e.mapId),h=e=>r(e)&&s(e.topicStylesheetUrl)&&s(e.titleStylesheetUrl)&&Array.isArray(e.customCssClasses)&&e.customCssClasses.every((e=>s(e))),y=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&(null==e.hasRating||i(e.hasRating))&&s(e.tocId)&&Array.isArray(e.children)&&e.children.every((e=>y(e)))&&(null==e.origin||f(e.origin))&&s(e.contentId)&&s(e.title),f=e=>r(e)&&s(e.mapTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.contentId)&&s(e.mapId)&&u(e.type);var A;e.FtTopicContentTarget=void 0,(A=e.FtTopicContentTarget||(e.FtTopicContentTarget={})).THIRD_PARTY="THIRD_PARTY",A.OFF_THE_GRID="OFF_THE_GRID",A.CONTENT_PACKAGER="CONTENT_PACKAGER",A.PAGES="PAGES",A.DESIGNED_READER="DESIGNED_READER";var m;e.FtMetadataHomeLayout=void 0,(m=e.FtMetadataHomeLayout||(e.FtMetadataHomeLayout={})).CLASSIC="CLASSIC",m.CUSTOM="CUSTOM",m.DESIGNER="DESIGNER";const E=e=>r(e)&&a(e.count)&&s(e.label)&&(null==e.lang||s(e.lang));var g;e.FtFacetType=void 0,(g=e.FtFacetType||(e.FtFacetType={})).AND="AND",g.OR="OR",g.MONOVALUED="MONOVALUED";const b=e=>["AND","OR","MONOVALUED"].includes(e),S=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&(null==e.hierarchicalValues||Array.isArray(e.hierarchicalValues)&&e.hierarchicalValues.every((e=>Array.isArray(e)&&e.every((e=>s(e))))))&&s(e.label)&&s(e.key);var T;e.FtMetadataSortRule=void 0,(T=e.FtMetadataSortRule||(e.FtMetadataSortRule={})).NONE="NONE",T.ALPHABET="ALPHABET",T.VERSION="VERSION";const R=e=>["NONE","ALPHABET","VERSION"].includes(e),F=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||oe(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>J(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.virtualField||K(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale));var O;e.FtRatingType=void 0,(O=e.FtRatingType||(e.FtRatingType={})).STARS="STARS",O.LIKE="LIKE",O.DICHOTOMOUS="DICHOTOMOUS",O.NO_RATING="NO_RATING";const U=e=>["STARS","LIKE","DICHOTOMOUS","NO_RATING"].includes(e),I=e=>r(e)&&s(e.date)&&U(e.type)&&a(e.value),v=e=>r(e)&&(null==e.rating||I(e.rating))&&U(e.type),_=e=>r(e)&&s(e.date)&&s(e.tocId)&&U(e.type)&&a(e.value),C=e=>r(e)&&Array.isArray(e.ratings)&&e.ratings.every((e=>_(e)))&&U(e.type),L=e=>r(e)&&Array.isArray(e.filter)&&e.filter.every((e=>s(e)))&&Array.isArray(e.prior)&&e.prior.every((e=>s(e))),P=e=>r(e)&&s(e.from)&&s(e.to),D=e=>r(e)&&(null==e.period||P(e.period))&&k(e.periodType);var N;e.FtPeriodFilterType=void 0,(N=e.FtPeriodFilterType||(e.FtPeriodFilterType={})).LAST_WEEK="LAST_WEEK",N.LAST_MONTH="LAST_MONTH",N.LAST_YEAR="LAST_YEAR",N.CUSTOM="CUSTOM";const k=e=>["LAST_WEEK","LAST_MONTH","LAST_YEAR","CUSTOM"].includes(e),M=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.key);var w;e.FtSearchSortCriterionOrder=void 0,(w=e.FtSearchSortCriterionOrder||(e.FtSearchSortCriterionOrder={})).ASC="ASC",w.DESC="DESC";const B=e=>["ASC","DESC"].includes(e);var H;e.FtSearchSortCriterionType=void 0,(H=e.FtSearchSortCriterionType||(e.FtSearchSortCriterionType={})).ALPHA="ALPHA",H.NATURAL="NATURAL";const x=e=>["ALPHA","NATURAL"].includes(e);var V;e.FtVirtualField=void 0,(V=e.FtVirtualField||(e.FtVirtualField={})).EVERYWHERE="EVERYWHERE",V.TITLE_ONLY="TITLE_ONLY",V.NONE="NONE";const K=e=>["EVERYWHERE","TITLE_ONLY","NONE"].includes(e),$=e=>r(e)&&a(e.totalResultsCount)&&i(e.isLastPage)&&a(e.currentPage)&&a(e.totalClustersCount);var j;e.FtEditorialType=void 0,(j=e.FtEditorialType||(e.FtEditorialType={})).ARTICLE="ARTICLE",j.BOOK="BOOK",j.SHARED_BOOK="SHARED_BOOK";const G=e=>["ARTICLE","BOOK","SHARED_BOOK"].includes(e);var q;e.FtOpenMode=void 0,(q=e.FtOpenMode||(e.FtOpenMode={})).FLUIDTOPICS="FLUIDTOPICS",q.EXTERNAL="EXTERNAL";const X=e=>["FLUIDTOPICS","EXTERNAL"].includes(e),Y=e=>r(e)&&(null==e.perPage||a(e.perPage))&&a(e.page);var z;e.FtCollectionDocumentType=void 0,(z=e.FtCollectionDocumentType||(e.FtCollectionDocumentType={})).MAP="MAP",z.DOCUMENT="DOCUMENT",z.TOPIC="TOPIC",z.PERSONAL_BOOK="PERSONAL_BOOK",z.SHARED_BOOK="SHARED_BOOK";const W=e=>["MAP","DOCUMENT","TOPIC","PERSONAL_BOOK","SHARED_BOOK"].includes(e),J=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.label)&&s(e.key),Q=e=>r(e)&&a(e.weight)&&s(e.value)&&s(e.key),Z=e=>r(e)&&Array.isArray(e.entries)&&e.entries.every((e=>ee(e)))&&(null==e.metadataVariableAxis||s(e.metadataVariableAxis)),ee=e=>r(e)&&(null==e.document||te(e.document))&&(null==e.topic||ie(e.topic))&&se(e.type)&&(null==e.map||re(e.map)),te=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&s(e.documentUrl)&&s(e.mimeType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.viewerUrl)&&s(e.contentUrl)&&s(e.filename)&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.documentId)&&s(e.lastEditionDate)&&s(e.htmlExcerpt),re=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&(null==e.openMode||X(e.openMode))&&G(e.editorialType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.mapUrl)&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt),ie=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&s(e.contentId)&&Array.isArray(e.resources)&&e.resources.every((e=>he(e)))&&s(e.title)&&s(e.mapTitle)&&s(e.topicUrl)&&s(e.contentUrl)&&s(e.htmlTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&(null==e.originUrl||s(e.originUrl))&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt);var ae;e.FtSearchResultType=void 0,(ae=e.FtSearchResultType||(e.FtSearchResultType={})).MAP="MAP",ae.DOCUMENT="DOCUMENT",ae.TOPIC="TOPIC";const se=e=>["MAP","DOCUMENT","TOPIC"].includes(e);var ne;e.FtSearchScope=void 0,(ne=e.FtSearchScope||(e.FtSearchScope={})).DEFAULT="DEFAULT",ne.DOCUMENTS="DOCUMENTS",ne.ALL_TOPICS="ALL_TOPICS";const oe=e=>["DEFAULT","DOCUMENTS","ALL_TOPICS"].includes(e),le=e=>r(e)&&i(e.hierarchical)&&s(e.label)&&i(e.multiSelectionable)&&s(e.key)&&Array.isArray(e.rootNodes)&&e.rootNodes.every((e=>ce(e))),ue=e=>r(e)&&(null==e.maxDepth||a(e.maxDepth))&&s(e.id),ce=e=>r(e)&&a(e.totalResultsCount)&&i(e.descendantSelected)&&Array.isArray(e.childNodes)&&e.childNodes.every((e=>ce(e)))&&s(e.label)&&s(e.value)&&i(e.selected),de=e=>r(e)&&x(e.type)&&s(e.key)&&B(e.order),pe=e=>r(e)&&s(e.suggestedQuery)&&s(e.htmlSuggestedQuery),he=e=>r(e)&&s(e.filename)&&s(e.resourceUrl)&&s(e.id)&&s(e.mimeType)&&s(e.resourceContentUrl)&&s(e.viewerUrl),ye=e=>r(e)&&(null==e.filenameExtension||s(e.filenameExtension))&&(null==e.editorialType||G(e.editorialType))&&(null==e.mimeType||s(e.mimeType))&&se(e.type)&&s(e.value);var fe;e.FtUserRole=void 0,(fe=e.FtUserRole||(e.FtUserRole={})).PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",fe.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",fe.HTML_EXPORT_USER="HTML_EXPORT_USER",fe.PDF_EXPORT_USER="PDF_EXPORT_USER",fe.SAVED_SEARCH_USER="SAVED_SEARCH_USER",fe.COLLECTION_USER="COLLECTION_USER",fe.OFFLINE_USER="OFFLINE_USER",fe.ANALYTICS_USER="ANALYTICS_USER",fe.BETA_USER="BETA_USER",fe.DEBUG_USER="DEBUG_USER",fe.PRINT_USER="PRINT_USER",fe.RATING_USER="RATING_USER",fe.FEEDBACK_USER="FEEDBACK_USER",fe.CONTENT_PUBLISHER="CONTENT_PUBLISHER",fe.KHUB_ADMIN="KHUB_ADMIN",fe.USERS_ADMIN="USERS_ADMIN",fe.PORTAL_ADMIN="PORTAL_ADMIN",fe.ADMIN="ADMIN",fe.DEVELOPER="DEVELOPER";const Ae=e=>["PERSONAL_BOOK_USER","PERSONAL_BOOK_SHARE_USER","HTML_EXPORT_USER","PDF_EXPORT_USER","SAVED_SEARCH_USER","COLLECTION_USER","OFFLINE_USER","ANALYTICS_USER","BETA_USER","DEBUG_USER","PRINT_USER","RATING_USER","FEEDBACK_USER","CONTENT_PUBLISHER","KHUB_ADMIN","USERS_ADMIN","PORTAL_ADMIN","ADMIN","DEVELOPER"].includes(e),me=e=>r(e)&&s(e.identifier)&&s(e.realm),Ee=e=>r(e)&&Array.isArray(e.defaultFilters)&&e.defaultFilters.every((e=>M(e))),ge=e=>r(e)&&(null==e.emailAddress||s(e.emailAddress))&&(null==e.displayName||s(e.displayName))&&Array.isArray(e.roles)&&e.roles.every((e=>Ae(e)))&&(null==e.userId||s(e.userId)),be=e=>"object"==typeof e&&null!=e,Se=e=>"boolean"==typeof e,Te=e=>"number"==typeof e,Re=e=>"string"==typeof e,Fe=e=>be(e)&&Se(e.mailsSentByFluidTopics)&&Se(e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&Array.isArray(e.recipients)&&e.recipients.every((e=>Re(e)))&&Array.isArray(e.bodyMetadataIds)&&e.bodyMetadataIds.every((e=>Re(e)))&&Array.isArray(e.subjectMetadataIds)&&e.subjectMetadataIds.every((e=>Re(e))),Oe=e=>be(e)&&(null==e.parentsVisibility||Array.isArray(e.parentsVisibility)&&e.parentsVisibility.every((e=>Se(e))))&&Se(e.isVisible),Ue=e=>be(e)&&(null==e.prettyUrl||Re(e.prettyUrl))&&(null==e.hasRating||Se(e.hasRating))&&(null==e.pageToc||Array.isArray(e.pageToc))&&(null==e.tocId||Re(e.tocId))&&Array.isArray(e.children)&&e.children.every((e=>Ue(e)))&&(null==e.pageConfiguration||Oe(e.pageConfiguration))&&(null==e.contentId||Re(e.contentId))&&(null==e.title||Re(e.title)),Ie=e=>be(e)&&Se(e.splitCurrentPageToc),ve={[e.FtUserRole.PERSONAL_BOOK_SHARE_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.HTML_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.PDF_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.KHUB_ADMIN]:[e.FtUserRole.CONTENT_PUBLISHER],[e.FtUserRole.ADMIN]:[e.FtUserRole.KHUB_ADMIN,e.FtUserRole.USERS_ADMIN,e.FtUserRole.PORTAL_ADMIN],[e.FtUserRole.DEVELOPER]:[e.FtUserRole.BETA_USER,e.FtUserRole.DEBUG_USER]};function _e(e,t){return e===t||(ve[e]??[]).some((e=>_e(e,t)))}const Ce="undefined"==typeof window?globalThis:window;function Le(e){let t={};for(let r in e){let i=e[r];("object"!=typeof i||Array.isArray(i))&&(i={prior:i});for(let e of["prior","filter"])i[e]=Array.isArray(i[e])?i[e]:[i[e]],i[e]=i[e].map((e=>null!=e?""+e:"")).filter((e=>""!==e));t[r]=i}return t}function Pe(e){return`${e}-FluidTopicsUnauthenticatedUserSearchPreferences`}const De="undefined"==typeof window?globalThis:window;class Ne extends Error{status;statusText;body;constructor(e,t,r){super(`${e} - ${t}: ${r}`),this.status=e,this.statusText=t,this.body=r}}async function ke(e){if(!e.ok)throw new Ne(e.status,e.statusText,await e.text());return e}function Me(e){return"application/json"===e.headers.get("Content-Type")?e.json():e.text()}class we{tenantBaseUrl;ftCallingApp;authorization;searchLabel;endpoints={authentication:{login:"api/authentication/login",logout:"api/authentication/logout",currentSession:"api/authentication/current-session"},khub:{maps:{mapId:e=>({info:`api/khub/maps/${e}`,toc:`api/khub/maps/${e}/toc`,pages:`api/khub/maps/${e}/pages`,feedback:`api/khub/maps/${e}/feedback`,rating:`api/khub/maps/${e}/rating`,attachments:{list:`api/khub/maps/${e}/attachments`,attachmentId:t=>({content:`api/khub/maps/${e}/attachments/${t}/content`})},resources:{list:`api/khub/maps/${e}/resources`,resourceId:t=>({content:`api/khub/maps/${e}/resources/${t}/content`})},topics:{contentId:t=>({info:`api/khub/maps/${e}/topics/${t}`,content:`api/khub/maps/${e}/topics/${t}/content`}),tocId:t=>({feedback:`api/khub/maps/${e}/topics/${t}/feedback`,rating:`api/khub/maps/${e}/topics/${t}/rating`})}})},documents:{documentId:e=>({info:`api/khub/documents/${e}`,content:`api/khub/documents/${e}/content`,text:`api/khub/documents/${e}/content/text`,feedback:`api/khub/documents/${e}/feedback`,rating:`api/khub/documents/${e}/rating`})},suggest:"api/khub/suggest",clusteredSearch:"api/khub/clustered-search",locales:"api/khub/locales"},users:{userId:e=>({collections:{collectionId:t=>({documents:`api/users/${e}/collections/${t}/documents`})},searches:{list:`api/users/${e}/searches`},bookmarks:{list:`api/users/${e}/bookmarks`}})},stylesheets:{fonts:"api/stylesheets/fonts.css",theme:"api/stylesheets/theme.css",content:{title:"api/stylesheets/content/title.css",topic:"api/stylesheets/content/topic.css"}},configuration:{reader:"api/configuration/reader",metadata:"api/configuration/metadata"},locales:{ui:"api/locales/ui"},messages:{locale:e=>({fluidTopics:{contextName:t=>({endpoint:`api/messages/${e}/fluid-topics/${t}`})},custom:{contextName:t=>({endpoint:`api/messages/${e}/custom/${t}`})}})}};get defaultHeaders(){return{...this.authorization,...this.searchLabel,"Ft-Calling-App":this.ftCallingApp}}constructor(e,t,r){e=(e??De.__gwt_ft_moduleBase??De.fluidtopicsclient?.__moduleBase??De.__gwt_activeModules?.fluidtopicsclient?.moduleBase??"").trim(),this.tenantBaseUrl=e.endsWith("/")?e:e+"/",r&&void 0!==De.location&&De.location.href.startsWith(this.tenantBaseUrl)?this.ftCallingApp=t:this.ftCallingApp=`ft-public-api/${t}`}setApiKey(e){this.authorization={Authorization:"Bearer "+e}}setCredentials(e,t){var r;this.authorization={Authorization:"Basic "+(r=`${e}:${t}`,"undefined"!=typeof Buffer?Buffer.from(r).toString("base64"):btoa(r))}}clearAuthentication(){this.authorization=void 0}setSearchLabel(e){this.searchLabel={"FT-search-label":e}}clearSearchLabel(){this.searchLabel=void 0}login(e,t){let r={login:e,password:t,rememberMe:!0};return this.post(this.endpoints.authentication.login,r).then((r=>(this.setCredentials(e,t),r)))}logout(){return this.post(this.endpoints.authentication.logout).then((()=>this.clearAuthentication()))}getCurrentSession(){return this.get(this.endpoints.authentication.currentSession)}getReaderConfiguration(){return this.get(this.endpoints.configuration.reader)}getMap(e,t){return this.get(this.endpoints.khub.maps.mapId(e).info,t)}getTableOfContent(e,t){return this.get(this.endpoints.khub.maps.mapId(e).toc,t)}getPages(e,t){return this.get(this.endpoints.khub.maps.mapId(e).pages,t)}getTopic(e,t,r){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).info,r)}getTopicHTMLContent(e,t,r,i){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).content+(r?"?target="+r:""),i)}getMapAttachments(e,t){return this.get(this.endpoints.khub.maps.mapId(e).attachments.list,t)}getMapAttachmentContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).attachments.attachmentId(t).content,r)}getMapResources(e,t){return this.get(this.endpoints.khub.maps.mapId(e).resources.list,t)}getMapResourceContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).resources.resourceId(t).content,r)}getUnstructuredDocument(e,t){return this.get(this.endpoints.khub.documents.documentId(e).info,t)}getUnstructuredDocumentContent(e,t){return this.fetchRawData(this.endpoints.khub.documents.documentId(e).content,t)}getUnstructuredDocumentTextContent(e,t){return this.get(this.endpoints.khub.documents.documentId(e).text,t)}getCollectionDocuments(e,t){return this.get(this.endpoints.users.userId(e).collections.collectionId(t).documents)}getSuggestions(e){return this.post(this.endpoints.khub.suggest,e)}search(e){return this.post(this.endpoints.khub.clusteredSearch,e)}getAvailableSearchLocales(){return this.get(this.endpoints.khub.locales)}getAvailableUiLocales(){return this.get(this.endpoints.khub.locales)}getMetadataDescriptors(){return this.get(this.endpoints.configuration.metadata)}getMapRating(e){return this.get(this.endpoints.khub.maps.mapId(e).rating)}rateMap(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).rating,{type:t,value:r})}unrateMap(e){return this.delete(this.endpoints.khub.maps.mapId(e).rating)}sendMapFeedback(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).feedback,{message:t,from:r})}rateTopic(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating,{type:r,value:i})}unrateTopic(e,t){return this.delete(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating)}sendTopicFeedback(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).feedback,{message:r,from:i})}getDocumentRating(e){return this.get(this.endpoints.khub.documents.documentId(e).rating)}rateDocument(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).rating,{type:t,value:r})}unrateDocument(e){return this.delete(this.endpoints.khub.documents.documentId(e).rating)}sendDocumentFeedback(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).feedback,{message:t,from:r})}getFluidTopicsMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).fluidTopics.contextName(t).endpoint)}getCustomMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).custom.contextName(t).endpoint)}listMySearches(e){return this.get(this.endpoints.users.userId(e).searches.list)}listMyBookmarks(e){return this.get(this.endpoints.users.userId(e).bookmarks.list)}get(e,t){return this.makeRequest("GET",this.withVersion(e,t))}post(e,t){return this.makeRequest("POST",e,t)}put(e,t){return this.makeRequest("PUT",e,t)}delete(e){return this.makeRequest("DELETE",e)}makeAbsolute(e){return e.startsWith(this.tenantBaseUrl)?e:this.tenantBaseUrl+e.replace(/^\//,"")}async fetch(e,t){const r=t;return await fetch(this.makeAbsolute(e),{...r??{},headers:{...this.defaultHeaders,...r?.headers??{}}})}upload(e,t,r,i=(()=>{})){return"undefined"!=typeof XMLHttpRequest?new Promise(((a,s)=>{let n=new XMLHttpRequest;n.onload=()=>{if(n.status>=200&&n.status<300){let e="application/json"===n.getResponseHeader("Content-Type")?JSON.parse(n.responseText):n.responseText;a(e)}else s(new Ne(n.status,n.statusText,n.responseText))},n.upload.onprogress=e=>i(e),n.open(e,this.makeAbsolute(t),!0),n.send(r)})):this.fetch(t,{method:e,body:r}).then(ke).then(Me)}makeRequest(e,t,r){return this.fetch(t,{method:e,headers:{...null!=r?{"Content-Type":"application/json"}:{}},body:null!=r?JSON.stringify(r):void 0,credentials:null==this.authorization?"include":void 0}).then(ke).then(Me)}fetchRawData(e,t){return fetch(this.withVersion(e,t),{headers:this.defaultHeaders,credentials:null==this.authorization?"include":void 0}).then(ke).then((e=>e.arrayBuffer()))}withVersion(e,t){let r=new URL(this.makeAbsolute(e));return t&&r.searchParams.append("v",t),r.toString()}}e.FluidTopicsApi=we,e.HttpError=Ne,e.addUnauthenticatedUserSearchPreferencesChangeHandler=function(e,t){if(Ce.localStorage){const r=Pe(e),i=e=>{e.storageArea===Ce.localStorage&&e.key===r&&t(JSON.parse(e.newValue??"{}"))};return Ce.addEventListener("storage",i),{removeHandler:()=>Ce.removeEventListener("storage",i)}}console.error("Cannot handle unauthenticated preferences: local storage is unavailable.")},e.default=we,e.getUnauthenticatedUserSearchPreferences=function(e){if(Ce.localStorage)return JSON.parse(Ce.localStorage.getItem(Pe(e))??"{}");console.error("Cannot get unauthenticated preferences: local storage is unavailable.")},e.isFtAuthenticatedSession=e=>r(e)&&me(e.authenticationIdentifier)&&ge(e.profile),e.isFtAuthenticationIdentifier=me,e.isFtBookmark=e=>r(e)&&s(e.mapTitle)&&o(e.color)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.lastUpdate)&&s(e.readerUrl)&&s(e.mapId)&&s(e.id)&&s(e.title)&&s(e.creationDate),e.isFtCollectionDocument=e=>r(e)&&i(e.deleted)&&(null==e.apiUrl||s(e.apiUrl))&&(null==e.portalUrl||s(e.portalUrl))&&s(e.id)&&s(e.title)&&W(e.type),e.isFtCollectionDocumentType=W,e.isFtCredentials=e=>r(e)&&s(e.password)&&(null==e.newPassword||s(e.newPassword))&&i(e.rememberMe)&&s(e.login),e.isFtEditorialType=G,e.isFtFacetType=b,e.isFtFeedbackCreation=e=>r(e)&&(null==e.from||s(e.from))&&s(e.message),e.isFtLabeledSearchFilter=J,e.isFtMap=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&(null==e.topicsApiEndpoint||s(e.topicsApiEndpoint))&&(null==e.description||s(e.description))&&(null==e.attachmentsApiEndpoint||s(e.attachmentsApiEndpoint))&&G(e.editorialType)&&s(e.baseId)&&s(e.clusterId)&&s(e.title)&&s(e.lastPublication)&&s(e.lastEdition)&&s(e.originId)&&(null==e.rightsApiEndpoint||s(e.rightsApiEndpoint))&&h(e.contentStyles)&&(null==e.originUrl||s(e.originUrl))&&s(e.fingerprint)&&s(e.readerUrl)&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtMapAttachment=e=>be(e)&&Re(e.file)&&(null==e.size||Te(e.size))&&Se(e.externalLink)&&Re(e.name)&&Re(e.id)&&(null==e.mimeType||Re(e.mimeType))&&(null==e.viewerUrl||Re(e.viewerUrl)),e.isFtMapResource=e=>r(e)&&s(e.contentUrl)&&s(e.filename)&&s(e.id)&&s(e.mimeType),e.isFtMapStyles=h,e.isFtMessageContext=e=>r(e)&&s(e.name)&&r(e.messages)&&Object.keys(e.messages).every((e=>s(e)))&&Object.values(e.messages).every((e=>s(e)))&&s(e.locale),e.isFtMetadata=S,e.isFtMetadataDescriptor=e=>r(e)&&R(e.sortRule)&&i(e.tocFilter)&&b(e.type)&&i(e.reverseSort)&&s(e.key)&&r(e.labels)&&Object.keys(e.labels).every((e=>s(e)))&&Object.values(e.labels).every((e=>null==e||s(e))),e.isFtMetadataHomeLayout=e=>["CLASSIC","CUSTOM","DESIGNER"].includes(e),e.isFtMetadataPreferenceConfiguration=L,e.isFtMetadataSortRule=R,e.isFtMyLibraryColors=o,e.isFtMySearch=e=>r(e)&&F(e.searchRequest)&&o(e.color)&&i(e.alert)&&s(e.description)&&s(e.id)&&s(e.ownerId)&&s(e.title)&&s(e.creationDate),e.isFtMySearchRequest=F,e.isFtOpenMode=X,e.isFtPageConfiguration=Oe,e.isFtPageRequest=Y,e.isFtPaginatedToc=e=>be(e)&&Ie(e.configuration)&&Array.isArray(e.paginatedToc)&&e.paginatedToc.every((e=>Ue(e))),e.isFtPaginatedTocNode=Ue,e.isFtPaginationConfiguration=Ie,e.isFtPeriod=P,e.isFtPeriodFilter=D,e.isFtPeriodFilterType=k,e.isFtPersonalBookCreation=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>c(e)))&&Array.isArray(e.nodes)&&e.nodes.every((e=>d(e)))&&s(e.description)&&s(e.title),e.isFtPersonalBookMetadataUpdate=c,e.isFtPersonalBookNodeCreation=d,e.isFtPersonalBookTopicLinkCreation=p,e.isFtPublicationRating=I,e.isFtPublicationRatingSummary=v,e.isFtRatingCreation=e=>r(e)&&U(e.type)&&a(e.value),e.isFtRatingSummary=e=>r(e)&&(null==e.topics||C(e.topics))&&v(e.publication),e.isFtRatingType=U,e.isFtReaderConfiguration=e=>be(e)&&Fe(e.feedback)&&Te(e.loadAfterLastVisibleTopic)&&Te(e.loadBeforeFirstVisibleTopic),e.isFtReaderFeedbackConfiguration=Fe,e.isFtSearchFacet=le,e.isFtSearchFacetConf=ue,e.isFtSearchFacetEntry=ce,e.isFtSearchFilter=M,e.isFtSearchLocale=E,e.isFtSearchLocales=e=>r(e)&&Array.isArray(e.contentLocales)&&e.contentLocales.every((e=>E(e))),e.isFtSearchPreferences=Ee,e.isFtSearchPreferencesConfiguration=e=>r(e)&&r(e.metadata)&&Object.keys(e.metadata).every((e=>s(e)))&&Object.values(e.metadata).every((e=>L(e))),e.isFtSearchPreset=e=>r(e)&&s(e.name)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&a(e.priority)&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSearchPrior=Q,e.isFtSearchRequest=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||oe(e.scope))&&Y(e.paging)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.uiLocale||s(e.uiLocale))&&(null==e.virtualField||K(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale))&&(null==e.priors||Array.isArray(e.priors)&&e.priors.every((e=>Q(e))))&&Array.isArray(e.facets)&&e.facets.every((e=>ue(e))),e.isFtSearchResultCluster=Z,e.isFtSearchResultClusterEntry=ee,e.isFtSearchResultMap=re,e.isFtSearchResultTopic=ie,e.isFtSearchResultType=se,e.isFtSearchResultUnstructuredDocument=te,e.isFtSearchResults=e=>r(e)&&(null==e.spellcheck||pe(e.spellcheck))&&$(e.paging)&&Array.isArray(e.results)&&e.results.every((e=>Z(e)))&&Array.isArray(e.facets)&&e.facets.every((e=>le(e))),e.isFtSearchResultsPageInfo=$,e.isFtSearchScope=oe,e.isFtSearchSortCriterion=de,e.isFtSearchSortCriterionOrder=B,e.isFtSearchSortCriterionType=x,e.isFtSession=e=>r(e)&&(null==e.authenticationIdentifier||me(e.authenticationIdentifier))&&a(e.idleTimeoutInMillis)&&ge(e.profile)&&i(e.sessionAuthenticated)&&Ee(e.searchPreferences),e.isFtSpellcheck=pe,e.isFtSuggestRequest=e=>r(e)&&s(e.input)&&(null==e.scope||oe(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.maxCount||a(e.maxCount))&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSuggestResult=ye,e.isFtSuggestResults=e=>r(e)&&Array.isArray(e.suggestions)&&e.suggestions.every((e=>ye(e))),e.isFtTocNode=y,e.isFtTopic=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.id)&&s(e.contentApiEndpoint)&&s(e.title),e.isFtTopicContentTarget=e=>["THIRD_PARTY","OFF_THE_GRID","CONTENT_PACKAGER","PAGES","DESIGNED_READER"].includes(e),e.isFtTopicOrigin=f,e.isFtTopicOriginType=u,e.isFtTopicRating=_,e.isFtTopicResource=he,e.isFtTopicsRatingSummary=C,e.isFtUiLocale=e=>r(e)&&s(e.displayName)&&s(e.languageTag)&&i(e.translated),e.isFtUnstructuredDocument=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.openMode)&&(null==e.description||s(e.description))&&s(e.mimeType)&&(null==e.baseId||s(e.baseId))&&(null==e.clusterId||s(e.clusterId))&&s(e.contentApiEndpoint)&&s(e.title)&&(null==e.lastPublication||s(e.lastPublication))&&s(e.viewerUrl)&&s(e.lastEdition)&&s(e.filename)&&(null==e.originId||s(e.originId))&&s(e.rightsApiEndpoint)&&(null==e.originUrl||s(e.originUrl))&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtUserProfile=ge,e.isFtUserRole=Ae,e.isFtVirtualField=K,e.setUnauthenticatedUserSearchPreferences=function(e,t){if(Ce.localStorage){let r={...t,metadata:Le(t.metadata??{})};const i=Pe(e),a=JSON.stringify(r);return Ce.localStorage.setItem(i,a),Ce.dispatchEvent(new StorageEvent("storage",{key:i,newValue:a,storageArea:Ce.localStorage,url:Ce.location.href})),r}console.error("Cannot set unauthenticated preferences: local storage is unavailable.")},e.userHasRole=function(e,t){return null!=e&&(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some((e=>_e(e,t)))}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).fluidtopics={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(r.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function c(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=c(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;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(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,i=u(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=c(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(e,t){e=s(e),t=n(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},l.prototype.delete=function(e){delete this.map[s(e)]},l.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},l.prototype.set=function(e,t){this.map[s(e)]=n(t)},l.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},l.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),o(e)},l.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),o(e)},l.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),o(e)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(e,t){var r,i,a=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new l(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(a))}})),t}function m(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];m.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function g(e,i){return new Promise((function(a,s){var n=new f(e,i);if(n.signal&&n.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),i=r.shift().trim();if(i){var a=r.join(":").trim();t.append(i,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;a(new m(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(n.method,n.url,!0),"include"===n.credentials?o.withCredentials=!0:"omit"===n.credentials&&(o.withCredentials=!1),"responseType"in o&&r.blob&&(o.responseType="blob"),n.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),n.signal&&(n.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&n.signal.removeEventListener("abort",u)}),o.send(void 0===n._bodyInit?null:n._bodyInit)}))}g.polyfill=!0,e.fetch||(e.fetch=g,e.Headers=l,e.Request=f,e.Response=m),t.Headers=l,t.Request=f,t.Response=m,t.fetch=g,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:t);const r=e=>"object"==typeof e&&null!=e,i=e=>"boolean"==typeof e,a=e=>"number"==typeof e,s=e=>"string"==typeof e;var n;e.FtMyLibraryColors=void 0,(n=e.FtMyLibraryColors||(e.FtMyLibraryColors={})).black="black",n.green="green",n.blue="blue",n.purple="purple",n.red="red",n.orange="orange",n.yellow="yellow";const o=e=>["black","green","blue","purple","red","orange","yellow"].includes(e);var l;e.FtTopicOriginType=void 0,(l=e.FtTopicOriginType||(e.FtTopicOriginType={})).OFFICIAL="OFFICIAL",l.PERSONAL="PERSONAL",l.SHARED="SHARED";const u=e=>["OFFICIAL","PERSONAL","SHARED"].includes(e),c=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>Array.isArray(e)&&e.every((e=>s(e)))))&&s(e.key),d=e=>r(e)&&s(e.notes)&&Array.isArray(e.children)&&e.children.every((e=>d(e)))&&(null==e.topicLink||p(e.topicLink))&&s(e.title)&&(null==e.htmlContent||s(e.htmlContent)),p=e=>r(e)&&s(e.tocId)&&s(e.contentId)&&s(e.mapId),h=e=>r(e)&&s(e.topicStylesheetUrl)&&s(e.titleStylesheetUrl)&&Array.isArray(e.customCssClasses)&&e.customCssClasses.every((e=>s(e))),y=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&(null==e.hasRating||i(e.hasRating))&&s(e.tocId)&&Array.isArray(e.children)&&e.children.every((e=>y(e)))&&(null==e.origin||f(e.origin))&&s(e.contentId)&&s(e.title),f=e=>r(e)&&s(e.mapTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.contentId)&&s(e.mapId)&&u(e.type);var A;e.FtTopicContentTarget=void 0,(A=e.FtTopicContentTarget||(e.FtTopicContentTarget={})).THIRD_PARTY="THIRD_PARTY",A.OFF_THE_GRID="OFF_THE_GRID",A.CONTENT_PACKAGER="CONTENT_PACKAGER",A.PAGES="PAGES",A.DESIGNED_READER="DESIGNED_READER";var m;e.FtMetadataHomeLayout=void 0,(m=e.FtMetadataHomeLayout||(e.FtMetadataHomeLayout={})).CLASSIC="CLASSIC",m.CUSTOM="CUSTOM",m.DESIGNER="DESIGNER";const E=e=>r(e)&&a(e.count)&&s(e.label)&&(null==e.lang||s(e.lang));var g;e.FtFacetType=void 0,(g=e.FtFacetType||(e.FtFacetType={})).AND="AND",g.OR="OR",g.MONOVALUED="MONOVALUED";const S=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&(null==e.hierarchicalValues||Array.isArray(e.hierarchicalValues)&&e.hierarchicalValues.every((e=>Array.isArray(e)&&e.every((e=>s(e))))))&&s(e.label)&&s(e.key);var b;e.FtMetadataSortRule=void 0,(b=e.FtMetadataSortRule||(e.FtMetadataSortRule={})).NONE="NONE",b.ALPHABET="ALPHABET",b.VERSION="VERSION";const T=e=>["NONE","ALPHABET","VERSION"].includes(e),R=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||ne(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>W(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.virtualField||V(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale));var F;e.FtRatingType=void 0,(F=e.FtRatingType||(e.FtRatingType={})).STARS="STARS",F.LIKE="LIKE",F.DICHOTOMOUS="DICHOTOMOUS",F.NO_RATING="NO_RATING";const O=e=>["STARS","LIKE","DICHOTOMOUS","NO_RATING"].includes(e),U=e=>r(e)&&s(e.date)&&O(e.type)&&a(e.value),I=e=>r(e)&&(null==e.rating||U(e.rating))&&O(e.type),v=e=>r(e)&&s(e.date)&&s(e.tocId)&&O(e.type)&&a(e.value),_=e=>r(e)&&Array.isArray(e.ratings)&&e.ratings.every((e=>v(e)))&&O(e.type),C=e=>r(e)&&Array.isArray(e.filter)&&e.filter.every((e=>s(e)))&&Array.isArray(e.prior)&&e.prior.every((e=>s(e))),L=e=>r(e)&&s(e.from)&&s(e.to),D=e=>r(e)&&(null==e.period||L(e.period))&&N(e.periodType);var P;e.FtPeriodFilterType=void 0,(P=e.FtPeriodFilterType||(e.FtPeriodFilterType={})).LAST_WEEK="LAST_WEEK",P.LAST_MONTH="LAST_MONTH",P.LAST_YEAR="LAST_YEAR",P.CUSTOM="CUSTOM";const N=e=>["LAST_WEEK","LAST_MONTH","LAST_YEAR","CUSTOM"].includes(e),M=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.key);var k;e.FtSearchSortCriterionOrder=void 0,(k=e.FtSearchSortCriterionOrder||(e.FtSearchSortCriterionOrder={})).ASC="ASC",k.DESC="DESC";const w=e=>["ASC","DESC"].includes(e);var B;e.FtSearchSortCriterionType=void 0,(B=e.FtSearchSortCriterionType||(e.FtSearchSortCriterionType={})).ALPHA="ALPHA",B.NATURAL="NATURAL";const H=e=>["ALPHA","NATURAL"].includes(e);var x;e.FtVirtualField=void 0,(x=e.FtVirtualField||(e.FtVirtualField={})).EVERYWHERE="EVERYWHERE",x.TITLE_ONLY="TITLE_ONLY",x.NONE="NONE";const V=e=>["EVERYWHERE","TITLE_ONLY","NONE"].includes(e),K=e=>r(e)&&a(e.totalResultsCount)&&i(e.isLastPage)&&a(e.currentPage)&&a(e.totalClustersCount);var $;e.FtEditorialType=void 0,($=e.FtEditorialType||(e.FtEditorialType={})).ARTICLE="ARTICLE",$.BOOK="BOOK",$.SHARED_BOOK="SHARED_BOOK";const j=e=>["ARTICLE","BOOK","SHARED_BOOK"].includes(e);var G;e.FtOpenMode=void 0,(G=e.FtOpenMode||(e.FtOpenMode={})).FLUIDTOPICS="FLUIDTOPICS",G.EXTERNAL="EXTERNAL";const q=e=>["FLUIDTOPICS","EXTERNAL"].includes(e),X=e=>r(e)&&(null==e.perPage||a(e.perPage))&&a(e.page);var Y;e.FtCollectionDocumentType=void 0,(Y=e.FtCollectionDocumentType||(e.FtCollectionDocumentType={})).MAP="MAP",Y.DOCUMENT="DOCUMENT",Y.TOPIC="TOPIC",Y.PERSONAL_BOOK="PERSONAL_BOOK",Y.SHARED_BOOK="SHARED_BOOK";const z=e=>["MAP","DOCUMENT","TOPIC","PERSONAL_BOOK","SHARED_BOOK"].includes(e),W=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.label)&&s(e.key),J=e=>r(e)&&a(e.weight)&&s(e.value)&&s(e.key),Q=e=>r(e)&&Array.isArray(e.entries)&&e.entries.every((e=>Z(e)))&&(null==e.metadataVariableAxis||s(e.metadataVariableAxis)),Z=e=>r(e)&&(null==e.document||ee(e.document))&&(null==e.topic||re(e.topic))&&ae(e.type)&&(null==e.map||te(e.map)),ee=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&s(e.documentUrl)&&s(e.mimeType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.viewerUrl)&&s(e.contentUrl)&&s(e.filename)&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.documentId)&&s(e.lastEditionDate)&&s(e.htmlExcerpt),te=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&(null==e.openMode||q(e.openMode))&&j(e.editorialType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.mapUrl)&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt),re=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&s(e.contentId)&&Array.isArray(e.resources)&&e.resources.every((e=>pe(e)))&&s(e.title)&&s(e.mapTitle)&&s(e.topicUrl)&&s(e.contentUrl)&&s(e.htmlTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&(null==e.originUrl||s(e.originUrl))&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt);var ie;e.FtSearchResultType=void 0,(ie=e.FtSearchResultType||(e.FtSearchResultType={})).MAP="MAP",ie.DOCUMENT="DOCUMENT",ie.TOPIC="TOPIC";const ae=e=>["MAP","DOCUMENT","TOPIC"].includes(e);var se;e.FtSearchScope=void 0,(se=e.FtSearchScope||(e.FtSearchScope={})).DEFAULT="DEFAULT",se.DOCUMENTS="DOCUMENTS",se.ALL_TOPICS="ALL_TOPICS";const ne=e=>["DEFAULT","DOCUMENTS","ALL_TOPICS"].includes(e),oe=e=>r(e)&&i(e.hierarchical)&&s(e.label)&&i(e.multiSelectionable)&&s(e.key)&&Array.isArray(e.rootNodes)&&e.rootNodes.every((e=>ue(e))),le=e=>r(e)&&(null==e.maxDepth||a(e.maxDepth))&&s(e.id),ue=e=>r(e)&&a(e.totalResultsCount)&&i(e.descendantSelected)&&Array.isArray(e.childNodes)&&e.childNodes.every((e=>ue(e)))&&s(e.label)&&s(e.value)&&i(e.selected),ce=e=>r(e)&&H(e.type)&&s(e.key)&&w(e.order),de=e=>r(e)&&s(e.suggestedQuery)&&s(e.htmlSuggestedQuery),pe=e=>r(e)&&s(e.filename)&&s(e.resourceUrl)&&s(e.id)&&s(e.mimeType)&&s(e.resourceContentUrl)&&s(e.viewerUrl),he=e=>r(e)&&(null==e.filenameExtension||s(e.filenameExtension))&&(null==e.editorialType||j(e.editorialType))&&(null==e.mimeType||s(e.mimeType))&&ae(e.type)&&s(e.value);var ye;e.FtUserRole=void 0,(ye=e.FtUserRole||(e.FtUserRole={})).PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",ye.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",ye.HTML_EXPORT_USER="HTML_EXPORT_USER",ye.PDF_EXPORT_USER="PDF_EXPORT_USER",ye.SAVED_SEARCH_USER="SAVED_SEARCH_USER",ye.COLLECTION_USER="COLLECTION_USER",ye.OFFLINE_USER="OFFLINE_USER",ye.ANALYTICS_USER="ANALYTICS_USER",ye.BETA_USER="BETA_USER",ye.DEBUG_USER="DEBUG_USER",ye.PRINT_USER="PRINT_USER",ye.RATING_USER="RATING_USER",ye.FEEDBACK_USER="FEEDBACK_USER",ye.CONTENT_PUBLISHER="CONTENT_PUBLISHER",ye.KHUB_ADMIN="KHUB_ADMIN",ye.USERS_ADMIN="USERS_ADMIN",ye.PORTAL_ADMIN="PORTAL_ADMIN",ye.ADMIN="ADMIN",ye.DEVELOPER="DEVELOPER";const fe=e=>["PERSONAL_BOOK_USER","PERSONAL_BOOK_SHARE_USER","HTML_EXPORT_USER","PDF_EXPORT_USER","SAVED_SEARCH_USER","COLLECTION_USER","OFFLINE_USER","ANALYTICS_USER","BETA_USER","DEBUG_USER","PRINT_USER","RATING_USER","FEEDBACK_USER","CONTENT_PUBLISHER","KHUB_ADMIN","USERS_ADMIN","PORTAL_ADMIN","ADMIN","DEVELOPER"].includes(e),Ae=e=>r(e)&&s(e.identifier)&&s(e.realm),me=e=>r(e)&&Array.isArray(e.defaultFilters)&&e.defaultFilters.every((e=>M(e))),Ee=e=>r(e)&&(null==e.emailAddress||s(e.emailAddress))&&(null==e.displayName||s(e.displayName))&&Array.isArray(e.roles)&&e.roles.every((e=>fe(e)))&&(null==e.userId||s(e.userId)),ge=e=>"object"==typeof e&&null!=e,Se=e=>"boolean"==typeof e,be=e=>"number"==typeof e,Te=e=>"string"==typeof e;var Re;e.FtConfigurationHistoryEntryStatus=void 0,(Re=e.FtConfigurationHistoryEntryStatus||(e.FtConfigurationHistoryEntryStatus={})).VALID="VALID",Re.INVALID="INVALID";const Fe=e=>ge(e)&&Se(e.mailsSentByFluidTopics)&&Se(e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&Array.isArray(e.recipients)&&e.recipients.every((e=>Te(e)))&&Array.isArray(e.bodyMetadataIds)&&e.bodyMetadataIds.every((e=>Te(e)))&&Array.isArray(e.subjectMetadataIds)&&e.subjectMetadataIds.every((e=>Te(e))),Oe=e=>ge(e)&&(null==e.parentsVisibility||Array.isArray(e.parentsVisibility)&&e.parentsVisibility.every((e=>Se(e))))&&Se(e.isVisible),Ue=e=>ge(e)&&(null==e.prettyUrl||Te(e.prettyUrl))&&(null==e.hasRating||Se(e.hasRating))&&(null==e.pageToc||Array.isArray(e.pageToc))&&(null==e.tocId||Te(e.tocId))&&Array.isArray(e.children)&&e.children.every((e=>Ue(e)))&&(null==e.pageConfiguration||Oe(e.pageConfiguration))&&(null==e.contentId||Te(e.contentId))&&(null==e.title||Te(e.title)),Ie=e=>ge(e)&&Se(e.splitCurrentPageToc),ve={[e.FtUserRole.PERSONAL_BOOK_SHARE_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.HTML_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.PDF_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.KHUB_ADMIN]:[e.FtUserRole.CONTENT_PUBLISHER],[e.FtUserRole.ADMIN]:[e.FtUserRole.KHUB_ADMIN,e.FtUserRole.USERS_ADMIN,e.FtUserRole.PORTAL_ADMIN],[e.FtUserRole.DEVELOPER]:[e.FtUserRole.BETA_USER,e.FtUserRole.DEBUG_USER]};function _e(e,t){return e===t||(ve[e]??[]).some((e=>_e(e,t)))}const Ce="undefined"==typeof window?globalThis:window;function Le(e){let t={};for(let r in e){let i=e[r];("object"!=typeof i||Array.isArray(i))&&(i={prior:i});for(let e of["prior","filter"])i[e]=Array.isArray(i[e])?i[e]:[i[e]],i[e]=i[e].map((e=>null!=e?""+e:"")).filter((e=>""!==e));t[r]=i}return t}function De(e){return`${e}-FluidTopicsUnauthenticatedUserSearchPreferences`}const Pe="undefined"==typeof window?globalThis:window;class Ne extends Error{status;statusText;body;constructor(e,t,r){super(`${e} - ${t}: ${r}`),this.status=e,this.statusText=t,this.body=r}}async function Me(e){if(!e.ok)throw new Ne(e.status,e.statusText,await e.text());return e}function ke(e){return"application/json"===e.headers.get("Content-Type")?e.json():e.text()}class we{tenantBaseUrl;ftCallingApp;authorization;searchLabel;endpoints={authentication:{login:"api/authentication/login",logout:"api/authentication/logout",currentSession:"api/authentication/current-session"},khub:{maps:{mapId:e=>({info:`api/khub/maps/${e}`,toc:`api/khub/maps/${e}/toc`,pages:`api/khub/maps/${e}/pages`,feedback:`api/khub/maps/${e}/feedback`,rating:`api/khub/maps/${e}/rating`,attachments:{list:`api/khub/maps/${e}/attachments`,attachmentId:t=>({content:`api/khub/maps/${e}/attachments/${t}/content`})},resources:{list:`api/khub/maps/${e}/resources`,resourceId:t=>({content:`api/khub/maps/${e}/resources/${t}/content`})},topics:{contentId:t=>({info:`api/khub/maps/${e}/topics/${t}`,content:`api/khub/maps/${e}/topics/${t}/content`}),tocId:t=>({feedback:`api/khub/maps/${e}/topics/${t}/feedback`,rating:`api/khub/maps/${e}/topics/${t}/rating`})}})},documents:{documentId:e=>({info:`api/khub/documents/${e}`,content:`api/khub/documents/${e}/content`,text:`api/khub/documents/${e}/content/text`,feedback:`api/khub/documents/${e}/feedback`,rating:`api/khub/documents/${e}/rating`})},suggest:"api/khub/suggest",clusteredSearch:"api/khub/clustered-search",locales:"api/khub/locales"},users:{userId:e=>({collections:{collectionId:t=>({documents:`api/users/${e}/collections/${t}/documents`})},searches:{list:`api/users/${e}/searches`},bookmarks:{list:`api/users/${e}/bookmarks`}})},stylesheets:{fonts:"api/stylesheets/fonts.css",theme:"api/stylesheets/theme.css",content:{title:"api/stylesheets/content/title.css",topic:"api/stylesheets/content/topic.css"}},configuration:{reader:"api/configuration/reader",metadata:"api/configuration/metadata"},locales:{ui:"api/locales/ui"},messages:{locale:e=>({fluidTopics:{contextName:t=>({endpoint:`api/messages/${e}/fluid-topics/${t}`})},custom:{contextName:t=>({endpoint:`api/messages/${e}/custom/${t}`})}})}};get defaultHeaders(){return{...this.authorization,...this.searchLabel,"Ft-Calling-App":this.ftCallingApp}}constructor(e,t,r){e=(e??Pe.__gwt_ft_moduleBase??Pe.fluidtopicsclient?.__moduleBase??Pe.__gwt_activeModules?.fluidtopicsclient?.moduleBase??"").trim(),this.tenantBaseUrl=e.endsWith("/")?e:e+"/",r&&void 0!==Pe.location&&Pe.location.href.startsWith(this.tenantBaseUrl)?this.ftCallingApp=t:this.ftCallingApp=`ft-public-api/${t}`}setApiKey(e){this.authorization={Authorization:"Bearer "+e}}setCredentials(e,t){var r;this.authorization={Authorization:"Basic "+(r=`${e}:${t}`,"undefined"!=typeof Buffer?Buffer.from(r).toString("base64"):btoa(r))}}clearAuthentication(){this.authorization=void 0}setSearchLabel(e){this.searchLabel={"FT-search-label":e}}clearSearchLabel(){this.searchLabel=void 0}login(e,t){let r={login:e,password:t,rememberMe:!0};return this.post(this.endpoints.authentication.login,r).then((r=>(this.setCredentials(e,t),r)))}logout(){return this.post(this.endpoints.authentication.logout).then((()=>this.clearAuthentication()))}getCurrentSession(){return this.get(this.endpoints.authentication.currentSession)}getReaderConfiguration(){return this.get(this.endpoints.configuration.reader)}getMap(e,t){return this.get(this.endpoints.khub.maps.mapId(e).info,t)}getTableOfContent(e,t){return this.get(this.endpoints.khub.maps.mapId(e).toc,t)}getPages(e,t){return this.get(this.endpoints.khub.maps.mapId(e).pages,t)}getTopic(e,t,r){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).info,r)}getTopicHTMLContent(e,t,r,i){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).content+(r?"?target="+r:""),i)}getMapAttachments(e,t){return this.get(this.endpoints.khub.maps.mapId(e).attachments.list,t)}getMapAttachmentContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).attachments.attachmentId(t).content,r)}getMapResources(e,t){return this.get(this.endpoints.khub.maps.mapId(e).resources.list,t)}getMapResourceContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).resources.resourceId(t).content,r)}getUnstructuredDocument(e,t){return this.get(this.endpoints.khub.documents.documentId(e).info,t)}getUnstructuredDocumentContent(e,t){return this.fetchRawData(this.endpoints.khub.documents.documentId(e).content,t)}getUnstructuredDocumentTextContent(e,t){return this.get(this.endpoints.khub.documents.documentId(e).text,t)}getCollectionDocuments(e,t){return this.get(this.endpoints.users.userId(e).collections.collectionId(t).documents)}getSuggestions(e){return this.post(this.endpoints.khub.suggest,e)}search(e){return this.post(this.endpoints.khub.clusteredSearch,e)}getAvailableSearchLocales(){return this.get(this.endpoints.khub.locales)}getAvailableUiLocales(){return this.get(this.endpoints.khub.locales)}getMetadataDescriptors(){return this.get(this.endpoints.configuration.metadata)}getMapRating(e){return this.get(this.endpoints.khub.maps.mapId(e).rating)}rateMap(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).rating,{type:t,value:r})}unrateMap(e){return this.delete(this.endpoints.khub.maps.mapId(e).rating)}sendMapFeedback(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).feedback,{message:t,from:r})}rateTopic(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating,{type:r,value:i})}unrateTopic(e,t){return this.delete(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating)}sendTopicFeedback(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).feedback,{message:r,from:i})}getDocumentRating(e){return this.get(this.endpoints.khub.documents.documentId(e).rating)}rateDocument(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).rating,{type:t,value:r})}unrateDocument(e){return this.delete(this.endpoints.khub.documents.documentId(e).rating)}sendDocumentFeedback(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).feedback,{message:t,from:r})}getFluidTopicsMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).fluidTopics.contextName(t).endpoint)}getCustomMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).custom.contextName(t).endpoint)}listMySearches(e){return this.get(this.endpoints.users.userId(e).searches.list)}listMyBookmarks(e){return this.get(this.endpoints.users.userId(e).bookmarks.list)}get(e,t){return this.makeRequest("GET",this.withVersion(e,t))}post(e,t){return this.makeRequest("POST",e,t)}put(e,t){return this.makeRequest("PUT",e,t)}delete(e){return this.makeRequest("DELETE",e)}makeAbsolute(e){return e.startsWith(this.tenantBaseUrl)?e:this.tenantBaseUrl+e.replace(/^\//,"")}async fetch(e,t){const r=t;return await fetch(this.makeAbsolute(e),{...r??{},headers:{...this.defaultHeaders,...r?.headers??{}}})}upload(e,t,r,i=(()=>{})){return"undefined"!=typeof XMLHttpRequest?new Promise(((a,s)=>{let n=new XMLHttpRequest;n.onload=()=>{if(n.status>=200&&n.status<300){let e="application/json"===n.getResponseHeader("Content-Type")?JSON.parse(n.responseText):n.responseText;a(e)}else s(new Ne(n.status,n.statusText,n.responseText))},n.upload.onprogress=e=>i(e),n.open(e,this.makeAbsolute(t),!0),n.send(r)})):this.fetch(t,{method:e,body:r}).then(Me).then(ke)}makeRequest(e,t,r){return this.fetch(t,{method:e,headers:{...null!=r?{"Content-Type":"application/json"}:{}},body:null!=r?JSON.stringify(r):void 0,credentials:null==this.authorization?"include":void 0}).then(Me).then(ke)}fetchRawData(e,t){return fetch(this.withVersion(e,t),{headers:this.defaultHeaders,credentials:null==this.authorization?"include":void 0}).then(Me).then((e=>e.arrayBuffer()))}withVersion(e,t){let r=new URL(this.makeAbsolute(e));return t&&r.searchParams.append("v",t),r.toString()}}e.FluidTopicsApi=we,e.HttpError=Ne,e.addUnauthenticatedUserSearchPreferencesChangeHandler=function(e,t){if(Ce.localStorage){const r=De(e),i=e=>{e.storageArea===Ce.localStorage&&e.key===r&&t(JSON.parse(e.newValue??"{}"))};return Ce.addEventListener("storage",i),{removeHandler:()=>Ce.removeEventListener("storage",i)}}console.error("Cannot handle unauthenticated preferences: local storage is unavailable.")},e.default=we,e.getUnauthenticatedUserSearchPreferences=function(e){if(Ce.localStorage)return JSON.parse(Ce.localStorage.getItem(De(e))??"{}");console.error("Cannot get unauthenticated preferences: local storage is unavailable.")},e.isFtAuthenticatedSession=e=>r(e)&&Ae(e.authenticationIdentifier)&&Ee(e.profile),e.isFtAuthenticationIdentifier=Ae,e.isFtBookmark=e=>r(e)&&s(e.mapTitle)&&o(e.color)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.lastUpdate)&&s(e.readerUrl)&&s(e.mapId)&&s(e.id)&&s(e.title)&&s(e.creationDate),e.isFtCollectionDocument=e=>r(e)&&i(e.deleted)&&(null==e.apiUrl||s(e.apiUrl))&&(null==e.portalUrl||s(e.portalUrl))&&s(e.id)&&s(e.title)&&z(e.type),e.isFtCollectionDocumentType=z,e.isFtConfigurationHistoryEntryStatus=e=>["VALID","INVALID"].includes(e),e.isFtCredentials=e=>r(e)&&s(e.password)&&(null==e.newPassword||s(e.newPassword))&&i(e.rememberMe)&&s(e.login),e.isFtEditorialType=j,e.isFtFacetType=e=>["AND","OR","MONOVALUED"].includes(e),e.isFtFeedbackCreation=e=>r(e)&&(null==e.from||s(e.from))&&s(e.message),e.isFtLabeledSearchFilter=W,e.isFtMap=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&(null==e.topicsApiEndpoint||s(e.topicsApiEndpoint))&&(null==e.description||s(e.description))&&(null==e.attachmentsApiEndpoint||s(e.attachmentsApiEndpoint))&&j(e.editorialType)&&s(e.baseId)&&s(e.clusterId)&&s(e.title)&&s(e.lastPublication)&&s(e.lastEdition)&&s(e.originId)&&(null==e.rightsApiEndpoint||s(e.rightsApiEndpoint))&&h(e.contentStyles)&&(null==e.originUrl||s(e.originUrl))&&s(e.fingerprint)&&s(e.readerUrl)&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtMapAttachment=e=>ge(e)&&Te(e.file)&&(null==e.size||be(e.size))&&Se(e.externalLink)&&Te(e.name)&&Te(e.id)&&(null==e.mimeType||Te(e.mimeType))&&(null==e.viewerUrl||Te(e.viewerUrl)),e.isFtMapResource=e=>r(e)&&s(e.contentUrl)&&s(e.filename)&&s(e.id)&&s(e.mimeType),e.isFtMapStyles=h,e.isFtMessageContext=e=>r(e)&&s(e.name)&&r(e.messages)&&Object.keys(e.messages).every((e=>s(e)))&&Object.values(e.messages).every((e=>s(e)))&&s(e.locale),e.isFtMetadata=S,e.isFtMetadataDescriptor=e=>r(e)&&T(e.sortRule)&&i(e.reverseSort)&&s(e.key),e.isFtMetadataHomeLayout=e=>["CLASSIC","CUSTOM","DESIGNER"].includes(e),e.isFtMetadataPreferenceConfiguration=C,e.isFtMetadataSortRule=T,e.isFtMyLibraryColors=o,e.isFtMySearch=e=>r(e)&&R(e.searchRequest)&&o(e.color)&&i(e.alert)&&s(e.description)&&s(e.id)&&s(e.ownerId)&&s(e.title)&&s(e.creationDate),e.isFtMySearchRequest=R,e.isFtOpenMode=q,e.isFtPageConfiguration=Oe,e.isFtPageRequest=X,e.isFtPaginatedToc=e=>ge(e)&&Ie(e.configuration)&&Array.isArray(e.paginatedToc)&&e.paginatedToc.every((e=>Ue(e))),e.isFtPaginatedTocNode=Ue,e.isFtPaginationConfiguration=Ie,e.isFtPeriod=L,e.isFtPeriodFilter=D,e.isFtPeriodFilterType=N,e.isFtPersonalBookCreation=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>c(e)))&&Array.isArray(e.nodes)&&e.nodes.every((e=>d(e)))&&s(e.description)&&s(e.title),e.isFtPersonalBookMetadataUpdate=c,e.isFtPersonalBookNodeCreation=d,e.isFtPersonalBookTopicLinkCreation=p,e.isFtPublicationRating=U,e.isFtPublicationRatingSummary=I,e.isFtRatingCreation=e=>r(e)&&O(e.type)&&a(e.value),e.isFtRatingSummary=e=>r(e)&&(null==e.topics||_(e.topics))&&I(e.publication),e.isFtRatingType=O,e.isFtReaderConfiguration=e=>ge(e)&&Fe(e.feedback)&&be(e.loadAfterLastVisibleTopic)&&be(e.loadBeforeFirstVisibleTopic),e.isFtReaderFeedbackConfiguration=Fe,e.isFtSearchFacet=oe,e.isFtSearchFacetConf=le,e.isFtSearchFacetEntry=ue,e.isFtSearchFilter=M,e.isFtSearchLocale=E,e.isFtSearchLocales=e=>r(e)&&Array.isArray(e.contentLocales)&&e.contentLocales.every((e=>E(e))),e.isFtSearchPreferences=me,e.isFtSearchPreferencesConfiguration=e=>r(e)&&r(e.metadata)&&Object.keys(e.metadata).every((e=>s(e)))&&Object.values(e.metadata).every((e=>C(e))),e.isFtSearchPreset=e=>r(e)&&s(e.name)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&a(e.priority)&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSearchPrior=J,e.isFtSearchRequest=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||ne(e.scope))&&X(e.paging)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.uiLocale||s(e.uiLocale))&&(null==e.virtualField||V(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale))&&(null==e.priors||Array.isArray(e.priors)&&e.priors.every((e=>J(e))))&&Array.isArray(e.facets)&&e.facets.every((e=>le(e))),e.isFtSearchResultCluster=Q,e.isFtSearchResultClusterEntry=Z,e.isFtSearchResultMap=te,e.isFtSearchResultTopic=re,e.isFtSearchResultType=ae,e.isFtSearchResultUnstructuredDocument=ee,e.isFtSearchResults=e=>r(e)&&(null==e.spellcheck||de(e.spellcheck))&&K(e.paging)&&Array.isArray(e.results)&&e.results.every((e=>Q(e)))&&Array.isArray(e.facets)&&e.facets.every((e=>oe(e))),e.isFtSearchResultsPageInfo=K,e.isFtSearchScope=ne,e.isFtSearchSortCriterion=ce,e.isFtSearchSortCriterionOrder=w,e.isFtSearchSortCriterionType=H,e.isFtSession=e=>r(e)&&(null==e.authenticationIdentifier||Ae(e.authenticationIdentifier))&&a(e.idleTimeoutInMillis)&&Ee(e.profile)&&i(e.sessionAuthenticated)&&me(e.searchPreferences),e.isFtSpellcheck=de,e.isFtSuggestRequest=e=>r(e)&&s(e.input)&&(null==e.scope||ne(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.maxCount||a(e.maxCount))&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSuggestResult=he,e.isFtSuggestResults=e=>r(e)&&Array.isArray(e.suggestions)&&e.suggestions.every((e=>he(e))),e.isFtTocNode=y,e.isFtTopic=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.id)&&s(e.contentApiEndpoint)&&s(e.title),e.isFtTopicContentTarget=e=>["THIRD_PARTY","OFF_THE_GRID","CONTENT_PACKAGER","PAGES","DESIGNED_READER"].includes(e),e.isFtTopicOrigin=f,e.isFtTopicOriginType=u,e.isFtTopicRating=v,e.isFtTopicResource=pe,e.isFtTopicsRatingSummary=_,e.isFtUiLocale=e=>r(e)&&s(e.displayName)&&s(e.languageTag)&&i(e.translated),e.isFtUnstructuredDocument=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.openMode)&&(null==e.description||s(e.description))&&s(e.mimeType)&&(null==e.baseId||s(e.baseId))&&(null==e.clusterId||s(e.clusterId))&&s(e.contentApiEndpoint)&&s(e.title)&&(null==e.lastPublication||s(e.lastPublication))&&s(e.viewerUrl)&&s(e.lastEdition)&&s(e.filename)&&(null==e.originId||s(e.originId))&&s(e.rightsApiEndpoint)&&(null==e.originUrl||s(e.originUrl))&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtUserProfile=Ee,e.isFtUserRole=fe,e.isFtVirtualField=V,e.setUnauthenticatedUserSearchPreferences=function(e,t){if(Ce.localStorage){let r={...t,metadata:Le(t.metadata??{})};const i=De(e),a=JSON.stringify(r);return Ce.localStorage.setItem(i,a),Ce.dispatchEvent(new StorageEvent("storage",{key:i,newValue:a,storageArea:Ce.localStorage,url:Ce.location.href})),r}console.error("Cannot set unauthenticated preferences: local storage is unavailable.")},e.userHasRole=function(e,t){return null!=e&&(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some((e=>_e(e,t)))}}));

@@ -288,9 +288,4 @@ "use strict";

&& ((0, exports.isFtMetadataSortRule)(o.sortRule))
&& (isBoolean(o.tocFilter))
&& ((0, exports.isFtFacetType)(o.type))
&& (isBoolean(o.reverseSort))
&& (isString(o.key))
&& ((isObject(o.labels)
&& Object.keys(o.labels).every((k) => isString(k))
&& Object.values(o.labels).every((v) => v == null || isString(v))));
&& (isString(o.key));
};

@@ -297,0 +292,0 @@ exports.isFtMetadataDescriptor = isFtMetadataDescriptor;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFtPaginationConfiguration = exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtMapAttachment = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = void 0;
exports.isFtPaginationConfiguration = exports.isFtPaginatedTocNode = exports.isFtPaginatedToc = exports.isFtPageConfiguration = exports.isFtMapAttachment = exports.isFtReaderFeedbackConfiguration = exports.isFtReaderConfiguration = exports.isFtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus = void 0;
const isObject = (o) => typeof o === "object" && o != null;

@@ -8,2 +8,12 @@ const isBoolean = (o) => typeof o === "boolean";

const isString = (o) => typeof o === "string";
// From: ConfigurationHistoryEntryStatus
var FtConfigurationHistoryEntryStatus;
(function (FtConfigurationHistoryEntryStatus) {
FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
FtConfigurationHistoryEntryStatus["INVALID"] = "INVALID";
})(FtConfigurationHistoryEntryStatus = exports.FtConfigurationHistoryEntryStatus || (exports.FtConfigurationHistoryEntryStatus = {}));
const isFtConfigurationHistoryEntryStatus = (o) => {
return ["VALID", "INVALID"].includes(o);
};
exports.isFtConfigurationHistoryEntryStatus = isFtConfigurationHistoryEntryStatus;
const isFtReaderConfiguration = (o) => {

@@ -10,0 +20,0 @@ return isObject(o)

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).fluidtopics={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(r.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function c(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=c(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;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(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,i=u(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=c(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(e,t){e=s(e),t=n(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},l.prototype.delete=function(e){delete this.map[s(e)]},l.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},l.prototype.set=function(e,t){this.map[s(e)]=n(t)},l.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},l.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),o(e)},l.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),o(e)},l.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),o(e)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(e,t){var r,i,a=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new l(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(a))}})),t}function m(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];m.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function g(e,i){return new Promise((function(a,s){var n=new f(e,i);if(n.signal&&n.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),i=r.shift().trim();if(i){var a=r.join(":").trim();t.append(i,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;a(new m(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(n.method,n.url,!0),"include"===n.credentials?o.withCredentials=!0:"omit"===n.credentials&&(o.withCredentials=!1),"responseType"in o&&r.blob&&(o.responseType="blob"),n.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),n.signal&&(n.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&n.signal.removeEventListener("abort",u)}),o.send(void 0===n._bodyInit?null:n._bodyInit)}))}g.polyfill=!0,e.fetch||(e.fetch=g,e.Headers=l,e.Request=f,e.Response=m),t.Headers=l,t.Request=f,t.Response=m,t.fetch=g,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:t);const r=e=>"object"==typeof e&&null!=e,i=e=>"boolean"==typeof e,a=e=>"number"==typeof e,s=e=>"string"==typeof e;var n;e.FtMyLibraryColors=void 0,(n=e.FtMyLibraryColors||(e.FtMyLibraryColors={})).black="black",n.green="green",n.blue="blue",n.purple="purple",n.red="red",n.orange="orange",n.yellow="yellow";const o=e=>["black","green","blue","purple","red","orange","yellow"].includes(e);var l;e.FtTopicOriginType=void 0,(l=e.FtTopicOriginType||(e.FtTopicOriginType={})).OFFICIAL="OFFICIAL",l.PERSONAL="PERSONAL",l.SHARED="SHARED";const u=e=>["OFFICIAL","PERSONAL","SHARED"].includes(e),c=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>Array.isArray(e)&&e.every((e=>s(e)))))&&s(e.key),d=e=>r(e)&&s(e.notes)&&Array.isArray(e.children)&&e.children.every((e=>d(e)))&&(null==e.topicLink||p(e.topicLink))&&s(e.title)&&(null==e.htmlContent||s(e.htmlContent)),p=e=>r(e)&&s(e.tocId)&&s(e.contentId)&&s(e.mapId),h=e=>r(e)&&s(e.topicStylesheetUrl)&&s(e.titleStylesheetUrl)&&Array.isArray(e.customCssClasses)&&e.customCssClasses.every((e=>s(e))),y=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&(null==e.hasRating||i(e.hasRating))&&s(e.tocId)&&Array.isArray(e.children)&&e.children.every((e=>y(e)))&&(null==e.origin||f(e.origin))&&s(e.contentId)&&s(e.title),f=e=>r(e)&&s(e.mapTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.contentId)&&s(e.mapId)&&u(e.type);var A;e.FtTopicContentTarget=void 0,(A=e.FtTopicContentTarget||(e.FtTopicContentTarget={})).THIRD_PARTY="THIRD_PARTY",A.OFF_THE_GRID="OFF_THE_GRID",A.CONTENT_PACKAGER="CONTENT_PACKAGER",A.PAGES="PAGES",A.DESIGNED_READER="DESIGNED_READER";var m;e.FtMetadataHomeLayout=void 0,(m=e.FtMetadataHomeLayout||(e.FtMetadataHomeLayout={})).CLASSIC="CLASSIC",m.CUSTOM="CUSTOM",m.DESIGNER="DESIGNER";const E=e=>r(e)&&a(e.count)&&s(e.label)&&(null==e.lang||s(e.lang));var g;e.FtFacetType=void 0,(g=e.FtFacetType||(e.FtFacetType={})).AND="AND",g.OR="OR",g.MONOVALUED="MONOVALUED";const b=e=>["AND","OR","MONOVALUED"].includes(e),S=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&(null==e.hierarchicalValues||Array.isArray(e.hierarchicalValues)&&e.hierarchicalValues.every((e=>Array.isArray(e)&&e.every((e=>s(e))))))&&s(e.label)&&s(e.key);var T;e.FtMetadataSortRule=void 0,(T=e.FtMetadataSortRule||(e.FtMetadataSortRule={})).NONE="NONE",T.ALPHABET="ALPHABET",T.VERSION="VERSION";const R=e=>["NONE","ALPHABET","VERSION"].includes(e),F=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||oe(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>J(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.virtualField||K(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale));var O;e.FtRatingType=void 0,(O=e.FtRatingType||(e.FtRatingType={})).STARS="STARS",O.LIKE="LIKE",O.DICHOTOMOUS="DICHOTOMOUS",O.NO_RATING="NO_RATING";const U=e=>["STARS","LIKE","DICHOTOMOUS","NO_RATING"].includes(e),I=e=>r(e)&&s(e.date)&&U(e.type)&&a(e.value),v=e=>r(e)&&(null==e.rating||I(e.rating))&&U(e.type),_=e=>r(e)&&s(e.date)&&s(e.tocId)&&U(e.type)&&a(e.value),C=e=>r(e)&&Array.isArray(e.ratings)&&e.ratings.every((e=>_(e)))&&U(e.type),L=e=>r(e)&&Array.isArray(e.filter)&&e.filter.every((e=>s(e)))&&Array.isArray(e.prior)&&e.prior.every((e=>s(e))),P=e=>r(e)&&s(e.from)&&s(e.to),D=e=>r(e)&&(null==e.period||P(e.period))&&k(e.periodType);var N;e.FtPeriodFilterType=void 0,(N=e.FtPeriodFilterType||(e.FtPeriodFilterType={})).LAST_WEEK="LAST_WEEK",N.LAST_MONTH="LAST_MONTH",N.LAST_YEAR="LAST_YEAR",N.CUSTOM="CUSTOM";const k=e=>["LAST_WEEK","LAST_MONTH","LAST_YEAR","CUSTOM"].includes(e),M=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.key);var w;e.FtSearchSortCriterionOrder=void 0,(w=e.FtSearchSortCriterionOrder||(e.FtSearchSortCriterionOrder={})).ASC="ASC",w.DESC="DESC";const B=e=>["ASC","DESC"].includes(e);var H;e.FtSearchSortCriterionType=void 0,(H=e.FtSearchSortCriterionType||(e.FtSearchSortCriterionType={})).ALPHA="ALPHA",H.NATURAL="NATURAL";const x=e=>["ALPHA","NATURAL"].includes(e);var V;e.FtVirtualField=void 0,(V=e.FtVirtualField||(e.FtVirtualField={})).EVERYWHERE="EVERYWHERE",V.TITLE_ONLY="TITLE_ONLY",V.NONE="NONE";const K=e=>["EVERYWHERE","TITLE_ONLY","NONE"].includes(e),$=e=>r(e)&&a(e.totalResultsCount)&&i(e.isLastPage)&&a(e.currentPage)&&a(e.totalClustersCount);var j;e.FtEditorialType=void 0,(j=e.FtEditorialType||(e.FtEditorialType={})).ARTICLE="ARTICLE",j.BOOK="BOOK",j.SHARED_BOOK="SHARED_BOOK";const G=e=>["ARTICLE","BOOK","SHARED_BOOK"].includes(e);var q;e.FtOpenMode=void 0,(q=e.FtOpenMode||(e.FtOpenMode={})).FLUIDTOPICS="FLUIDTOPICS",q.EXTERNAL="EXTERNAL";const X=e=>["FLUIDTOPICS","EXTERNAL"].includes(e),Y=e=>r(e)&&(null==e.perPage||a(e.perPage))&&a(e.page);var z;e.FtCollectionDocumentType=void 0,(z=e.FtCollectionDocumentType||(e.FtCollectionDocumentType={})).MAP="MAP",z.DOCUMENT="DOCUMENT",z.TOPIC="TOPIC",z.PERSONAL_BOOK="PERSONAL_BOOK",z.SHARED_BOOK="SHARED_BOOK";const W=e=>["MAP","DOCUMENT","TOPIC","PERSONAL_BOOK","SHARED_BOOK"].includes(e),J=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.label)&&s(e.key),Q=e=>r(e)&&a(e.weight)&&s(e.value)&&s(e.key),Z=e=>r(e)&&Array.isArray(e.entries)&&e.entries.every((e=>ee(e)))&&(null==e.metadataVariableAxis||s(e.metadataVariableAxis)),ee=e=>r(e)&&(null==e.document||te(e.document))&&(null==e.topic||ie(e.topic))&&se(e.type)&&(null==e.map||re(e.map)),te=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&s(e.documentUrl)&&s(e.mimeType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.viewerUrl)&&s(e.contentUrl)&&s(e.filename)&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.documentId)&&s(e.lastEditionDate)&&s(e.htmlExcerpt),re=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&(null==e.openMode||X(e.openMode))&&G(e.editorialType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.mapUrl)&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt),ie=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&s(e.contentId)&&Array.isArray(e.resources)&&e.resources.every((e=>he(e)))&&s(e.title)&&s(e.mapTitle)&&s(e.topicUrl)&&s(e.contentUrl)&&s(e.htmlTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&(null==e.originUrl||s(e.originUrl))&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt);var ae;e.FtSearchResultType=void 0,(ae=e.FtSearchResultType||(e.FtSearchResultType={})).MAP="MAP",ae.DOCUMENT="DOCUMENT",ae.TOPIC="TOPIC";const se=e=>["MAP","DOCUMENT","TOPIC"].includes(e);var ne;e.FtSearchScope=void 0,(ne=e.FtSearchScope||(e.FtSearchScope={})).DEFAULT="DEFAULT",ne.DOCUMENTS="DOCUMENTS",ne.ALL_TOPICS="ALL_TOPICS";const oe=e=>["DEFAULT","DOCUMENTS","ALL_TOPICS"].includes(e),le=e=>r(e)&&i(e.hierarchical)&&s(e.label)&&i(e.multiSelectionable)&&s(e.key)&&Array.isArray(e.rootNodes)&&e.rootNodes.every((e=>ce(e))),ue=e=>r(e)&&(null==e.maxDepth||a(e.maxDepth))&&s(e.id),ce=e=>r(e)&&a(e.totalResultsCount)&&i(e.descendantSelected)&&Array.isArray(e.childNodes)&&e.childNodes.every((e=>ce(e)))&&s(e.label)&&s(e.value)&&i(e.selected),de=e=>r(e)&&x(e.type)&&s(e.key)&&B(e.order),pe=e=>r(e)&&s(e.suggestedQuery)&&s(e.htmlSuggestedQuery),he=e=>r(e)&&s(e.filename)&&s(e.resourceUrl)&&s(e.id)&&s(e.mimeType)&&s(e.resourceContentUrl)&&s(e.viewerUrl),ye=e=>r(e)&&(null==e.filenameExtension||s(e.filenameExtension))&&(null==e.editorialType||G(e.editorialType))&&(null==e.mimeType||s(e.mimeType))&&se(e.type)&&s(e.value);var fe;e.FtUserRole=void 0,(fe=e.FtUserRole||(e.FtUserRole={})).PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",fe.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",fe.HTML_EXPORT_USER="HTML_EXPORT_USER",fe.PDF_EXPORT_USER="PDF_EXPORT_USER",fe.SAVED_SEARCH_USER="SAVED_SEARCH_USER",fe.COLLECTION_USER="COLLECTION_USER",fe.OFFLINE_USER="OFFLINE_USER",fe.ANALYTICS_USER="ANALYTICS_USER",fe.BETA_USER="BETA_USER",fe.DEBUG_USER="DEBUG_USER",fe.PRINT_USER="PRINT_USER",fe.RATING_USER="RATING_USER",fe.FEEDBACK_USER="FEEDBACK_USER",fe.CONTENT_PUBLISHER="CONTENT_PUBLISHER",fe.KHUB_ADMIN="KHUB_ADMIN",fe.USERS_ADMIN="USERS_ADMIN",fe.PORTAL_ADMIN="PORTAL_ADMIN",fe.ADMIN="ADMIN",fe.DEVELOPER="DEVELOPER";const Ae=e=>["PERSONAL_BOOK_USER","PERSONAL_BOOK_SHARE_USER","HTML_EXPORT_USER","PDF_EXPORT_USER","SAVED_SEARCH_USER","COLLECTION_USER","OFFLINE_USER","ANALYTICS_USER","BETA_USER","DEBUG_USER","PRINT_USER","RATING_USER","FEEDBACK_USER","CONTENT_PUBLISHER","KHUB_ADMIN","USERS_ADMIN","PORTAL_ADMIN","ADMIN","DEVELOPER"].includes(e),me=e=>r(e)&&s(e.identifier)&&s(e.realm),Ee=e=>r(e)&&Array.isArray(e.defaultFilters)&&e.defaultFilters.every((e=>M(e))),ge=e=>r(e)&&(null==e.emailAddress||s(e.emailAddress))&&(null==e.displayName||s(e.displayName))&&Array.isArray(e.roles)&&e.roles.every((e=>Ae(e)))&&(null==e.userId||s(e.userId)),be=e=>"object"==typeof e&&null!=e,Se=e=>"boolean"==typeof e,Te=e=>"number"==typeof e,Re=e=>"string"==typeof e,Fe=e=>be(e)&&Se(e.mailsSentByFluidTopics)&&Se(e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&Array.isArray(e.recipients)&&e.recipients.every((e=>Re(e)))&&Array.isArray(e.bodyMetadataIds)&&e.bodyMetadataIds.every((e=>Re(e)))&&Array.isArray(e.subjectMetadataIds)&&e.subjectMetadataIds.every((e=>Re(e))),Oe=e=>be(e)&&(null==e.parentsVisibility||Array.isArray(e.parentsVisibility)&&e.parentsVisibility.every((e=>Se(e))))&&Se(e.isVisible),Ue=e=>be(e)&&(null==e.prettyUrl||Re(e.prettyUrl))&&(null==e.hasRating||Se(e.hasRating))&&(null==e.pageToc||Array.isArray(e.pageToc))&&(null==e.tocId||Re(e.tocId))&&Array.isArray(e.children)&&e.children.every((e=>Ue(e)))&&(null==e.pageConfiguration||Oe(e.pageConfiguration))&&(null==e.contentId||Re(e.contentId))&&(null==e.title||Re(e.title)),Ie=e=>be(e)&&Se(e.splitCurrentPageToc),ve={[e.FtUserRole.PERSONAL_BOOK_SHARE_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.HTML_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.PDF_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.KHUB_ADMIN]:[e.FtUserRole.CONTENT_PUBLISHER],[e.FtUserRole.ADMIN]:[e.FtUserRole.KHUB_ADMIN,e.FtUserRole.USERS_ADMIN,e.FtUserRole.PORTAL_ADMIN],[e.FtUserRole.DEVELOPER]:[e.FtUserRole.BETA_USER,e.FtUserRole.DEBUG_USER]};function _e(e,t){return e===t||(ve[e]??[]).some((e=>_e(e,t)))}const Ce="undefined"==typeof window?globalThis:window;function Le(e){let t={};for(let r in e){let i=e[r];("object"!=typeof i||Array.isArray(i))&&(i={prior:i});for(let e of["prior","filter"])i[e]=Array.isArray(i[e])?i[e]:[i[e]],i[e]=i[e].map((e=>null!=e?""+e:"")).filter((e=>""!==e));t[r]=i}return t}function Pe(e){return`${e}-FluidTopicsUnauthenticatedUserSearchPreferences`}const De="undefined"==typeof window?globalThis:window;class Ne extends Error{status;statusText;body;constructor(e,t,r){super(`${e} - ${t}: ${r}`),this.status=e,this.statusText=t,this.body=r}}async function ke(e){if(!e.ok)throw new Ne(e.status,e.statusText,await e.text());return e}function Me(e){return"application/json"===e.headers.get("Content-Type")?e.json():e.text()}class we{tenantBaseUrl;ftCallingApp;authorization;searchLabel;endpoints={authentication:{login:"api/authentication/login",logout:"api/authentication/logout",currentSession:"api/authentication/current-session"},khub:{maps:{mapId:e=>({info:`api/khub/maps/${e}`,toc:`api/khub/maps/${e}/toc`,pages:`api/khub/maps/${e}/pages`,feedback:`api/khub/maps/${e}/feedback`,rating:`api/khub/maps/${e}/rating`,attachments:{list:`api/khub/maps/${e}/attachments`,attachmentId:t=>({content:`api/khub/maps/${e}/attachments/${t}/content`})},resources:{list:`api/khub/maps/${e}/resources`,resourceId:t=>({content:`api/khub/maps/${e}/resources/${t}/content`})},topics:{contentId:t=>({info:`api/khub/maps/${e}/topics/${t}`,content:`api/khub/maps/${e}/topics/${t}/content`}),tocId:t=>({feedback:`api/khub/maps/${e}/topics/${t}/feedback`,rating:`api/khub/maps/${e}/topics/${t}/rating`})}})},documents:{documentId:e=>({info:`api/khub/documents/${e}`,content:`api/khub/documents/${e}/content`,text:`api/khub/documents/${e}/content/text`,feedback:`api/khub/documents/${e}/feedback`,rating:`api/khub/documents/${e}/rating`})},suggest:"api/khub/suggest",clusteredSearch:"api/khub/clustered-search",locales:"api/khub/locales"},users:{userId:e=>({collections:{collectionId:t=>({documents:`api/users/${e}/collections/${t}/documents`})},searches:{list:`api/users/${e}/searches`},bookmarks:{list:`api/users/${e}/bookmarks`}})},stylesheets:{fonts:"api/stylesheets/fonts.css",theme:"api/stylesheets/theme.css",content:{title:"api/stylesheets/content/title.css",topic:"api/stylesheets/content/topic.css"}},configuration:{reader:"api/configuration/reader",metadata:"api/configuration/metadata"},locales:{ui:"api/locales/ui"},messages:{locale:e=>({fluidTopics:{contextName:t=>({endpoint:`api/messages/${e}/fluid-topics/${t}`})},custom:{contextName:t=>({endpoint:`api/messages/${e}/custom/${t}`})}})}};get defaultHeaders(){return{...this.authorization,...this.searchLabel,"Ft-Calling-App":this.ftCallingApp}}constructor(e,t,r){e=(e??De.__gwt_ft_moduleBase??De.fluidtopicsclient?.__moduleBase??De.__gwt_activeModules?.fluidtopicsclient?.moduleBase??"").trim(),this.tenantBaseUrl=e.endsWith("/")?e:e+"/",r&&void 0!==De.location&&De.location.href.startsWith(this.tenantBaseUrl)?this.ftCallingApp=t:this.ftCallingApp=`ft-public-api/${t}`}setApiKey(e){this.authorization={Authorization:"Bearer "+e}}setCredentials(e,t){var r;this.authorization={Authorization:"Basic "+(r=`${e}:${t}`,"undefined"!=typeof Buffer?Buffer.from(r).toString("base64"):btoa(r))}}clearAuthentication(){this.authorization=void 0}setSearchLabel(e){this.searchLabel={"FT-search-label":e}}clearSearchLabel(){this.searchLabel=void 0}login(e,t){let r={login:e,password:t,rememberMe:!0};return this.post(this.endpoints.authentication.login,r).then((r=>(this.setCredentials(e,t),r)))}logout(){return this.post(this.endpoints.authentication.logout).then((()=>this.clearAuthentication()))}getCurrentSession(){return this.get(this.endpoints.authentication.currentSession)}getReaderConfiguration(){return this.get(this.endpoints.configuration.reader)}getMap(e,t){return this.get(this.endpoints.khub.maps.mapId(e).info,t)}getTableOfContent(e,t){return this.get(this.endpoints.khub.maps.mapId(e).toc,t)}getPages(e,t){return this.get(this.endpoints.khub.maps.mapId(e).pages,t)}getTopic(e,t,r){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).info,r)}getTopicHTMLContent(e,t,r,i){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).content+(r?"?target="+r:""),i)}getMapAttachments(e,t){return this.get(this.endpoints.khub.maps.mapId(e).attachments.list,t)}getMapAttachmentContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).attachments.attachmentId(t).content,r)}getMapResources(e,t){return this.get(this.endpoints.khub.maps.mapId(e).resources.list,t)}getMapResourceContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).resources.resourceId(t).content,r)}getUnstructuredDocument(e,t){return this.get(this.endpoints.khub.documents.documentId(e).info,t)}getUnstructuredDocumentContent(e,t){return this.fetchRawData(this.endpoints.khub.documents.documentId(e).content,t)}getUnstructuredDocumentTextContent(e,t){return this.get(this.endpoints.khub.documents.documentId(e).text,t)}getCollectionDocuments(e,t){return this.get(this.endpoints.users.userId(e).collections.collectionId(t).documents)}getSuggestions(e){return this.post(this.endpoints.khub.suggest,e)}search(e){return this.post(this.endpoints.khub.clusteredSearch,e)}getAvailableSearchLocales(){return this.get(this.endpoints.khub.locales)}getAvailableUiLocales(){return this.get(this.endpoints.khub.locales)}getMetadataDescriptors(){return this.get(this.endpoints.configuration.metadata)}getMapRating(e){return this.get(this.endpoints.khub.maps.mapId(e).rating)}rateMap(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).rating,{type:t,value:r})}unrateMap(e){return this.delete(this.endpoints.khub.maps.mapId(e).rating)}sendMapFeedback(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).feedback,{message:t,from:r})}rateTopic(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating,{type:r,value:i})}unrateTopic(e,t){return this.delete(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating)}sendTopicFeedback(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).feedback,{message:r,from:i})}getDocumentRating(e){return this.get(this.endpoints.khub.documents.documentId(e).rating)}rateDocument(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).rating,{type:t,value:r})}unrateDocument(e){return this.delete(this.endpoints.khub.documents.documentId(e).rating)}sendDocumentFeedback(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).feedback,{message:t,from:r})}getFluidTopicsMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).fluidTopics.contextName(t).endpoint)}getCustomMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).custom.contextName(t).endpoint)}listMySearches(e){return this.get(this.endpoints.users.userId(e).searches.list)}listMyBookmarks(e){return this.get(this.endpoints.users.userId(e).bookmarks.list)}get(e,t){return this.makeRequest("GET",this.withVersion(e,t))}post(e,t){return this.makeRequest("POST",e,t)}put(e,t){return this.makeRequest("PUT",e,t)}delete(e){return this.makeRequest("DELETE",e)}makeAbsolute(e){return e.startsWith(this.tenantBaseUrl)?e:this.tenantBaseUrl+e.replace(/^\//,"")}async fetch(e,t){const r=t;return await fetch(this.makeAbsolute(e),{...r??{},headers:{...this.defaultHeaders,...r?.headers??{}}})}upload(e,t,r,i=(()=>{})){return"undefined"!=typeof XMLHttpRequest?new Promise(((a,s)=>{let n=new XMLHttpRequest;n.onload=()=>{if(n.status>=200&&n.status<300){let e="application/json"===n.getResponseHeader("Content-Type")?JSON.parse(n.responseText):n.responseText;a(e)}else s(new Ne(n.status,n.statusText,n.responseText))},n.upload.onprogress=e=>i(e),n.open(e,this.makeAbsolute(t),!0),n.send(r)})):this.fetch(t,{method:e,body:r}).then(ke).then(Me)}makeRequest(e,t,r){return this.fetch(t,{method:e,headers:{...null!=r?{"Content-Type":"application/json"}:{}},body:null!=r?JSON.stringify(r):void 0,credentials:null==this.authorization?"include":void 0}).then(ke).then(Me)}fetchRawData(e,t){return fetch(this.withVersion(e,t),{headers:this.defaultHeaders,credentials:null==this.authorization?"include":void 0}).then(ke).then((e=>e.arrayBuffer()))}withVersion(e,t){let r=new URL(this.makeAbsolute(e));return t&&r.searchParams.append("v",t),r.toString()}}e.FluidTopicsApi=we,e.HttpError=Ne,e.addUnauthenticatedUserSearchPreferencesChangeHandler=function(e,t){if(Ce.localStorage){const r=Pe(e),i=e=>{e.storageArea===Ce.localStorage&&e.key===r&&t(JSON.parse(e.newValue??"{}"))};return Ce.addEventListener("storage",i),{removeHandler:()=>Ce.removeEventListener("storage",i)}}console.error("Cannot handle unauthenticated preferences: local storage is unavailable.")},e.default=we,e.getUnauthenticatedUserSearchPreferences=function(e){if(Ce.localStorage)return JSON.parse(Ce.localStorage.getItem(Pe(e))??"{}");console.error("Cannot get unauthenticated preferences: local storage is unavailable.")},e.isFtAuthenticatedSession=e=>r(e)&&me(e.authenticationIdentifier)&&ge(e.profile),e.isFtAuthenticationIdentifier=me,e.isFtBookmark=e=>r(e)&&s(e.mapTitle)&&o(e.color)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.lastUpdate)&&s(e.readerUrl)&&s(e.mapId)&&s(e.id)&&s(e.title)&&s(e.creationDate),e.isFtCollectionDocument=e=>r(e)&&i(e.deleted)&&(null==e.apiUrl||s(e.apiUrl))&&(null==e.portalUrl||s(e.portalUrl))&&s(e.id)&&s(e.title)&&W(e.type),e.isFtCollectionDocumentType=W,e.isFtCredentials=e=>r(e)&&s(e.password)&&(null==e.newPassword||s(e.newPassword))&&i(e.rememberMe)&&s(e.login),e.isFtEditorialType=G,e.isFtFacetType=b,e.isFtFeedbackCreation=e=>r(e)&&(null==e.from||s(e.from))&&s(e.message),e.isFtLabeledSearchFilter=J,e.isFtMap=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&X(e.openMode)&&(null==e.topicsApiEndpoint||s(e.topicsApiEndpoint))&&(null==e.description||s(e.description))&&(null==e.attachmentsApiEndpoint||s(e.attachmentsApiEndpoint))&&G(e.editorialType)&&s(e.baseId)&&s(e.clusterId)&&s(e.title)&&s(e.lastPublication)&&s(e.lastEdition)&&s(e.originId)&&(null==e.rightsApiEndpoint||s(e.rightsApiEndpoint))&&h(e.contentStyles)&&(null==e.originUrl||s(e.originUrl))&&s(e.fingerprint)&&s(e.readerUrl)&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtMapAttachment=e=>be(e)&&Re(e.file)&&(null==e.size||Te(e.size))&&Se(e.externalLink)&&Re(e.name)&&Re(e.id)&&(null==e.mimeType||Re(e.mimeType))&&(null==e.viewerUrl||Re(e.viewerUrl)),e.isFtMapResource=e=>r(e)&&s(e.contentUrl)&&s(e.filename)&&s(e.id)&&s(e.mimeType),e.isFtMapStyles=h,e.isFtMessageContext=e=>r(e)&&s(e.name)&&r(e.messages)&&Object.keys(e.messages).every((e=>s(e)))&&Object.values(e.messages).every((e=>s(e)))&&s(e.locale),e.isFtMetadata=S,e.isFtMetadataDescriptor=e=>r(e)&&R(e.sortRule)&&i(e.tocFilter)&&b(e.type)&&i(e.reverseSort)&&s(e.key)&&r(e.labels)&&Object.keys(e.labels).every((e=>s(e)))&&Object.values(e.labels).every((e=>null==e||s(e))),e.isFtMetadataHomeLayout=e=>["CLASSIC","CUSTOM","DESIGNER"].includes(e),e.isFtMetadataPreferenceConfiguration=L,e.isFtMetadataSortRule=R,e.isFtMyLibraryColors=o,e.isFtMySearch=e=>r(e)&&F(e.searchRequest)&&o(e.color)&&i(e.alert)&&s(e.description)&&s(e.id)&&s(e.ownerId)&&s(e.title)&&s(e.creationDate),e.isFtMySearchRequest=F,e.isFtOpenMode=X,e.isFtPageConfiguration=Oe,e.isFtPageRequest=Y,e.isFtPaginatedToc=e=>be(e)&&Ie(e.configuration)&&Array.isArray(e.paginatedToc)&&e.paginatedToc.every((e=>Ue(e))),e.isFtPaginatedTocNode=Ue,e.isFtPaginationConfiguration=Ie,e.isFtPeriod=P,e.isFtPeriodFilter=D,e.isFtPeriodFilterType=k,e.isFtPersonalBookCreation=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>c(e)))&&Array.isArray(e.nodes)&&e.nodes.every((e=>d(e)))&&s(e.description)&&s(e.title),e.isFtPersonalBookMetadataUpdate=c,e.isFtPersonalBookNodeCreation=d,e.isFtPersonalBookTopicLinkCreation=p,e.isFtPublicationRating=I,e.isFtPublicationRatingSummary=v,e.isFtRatingCreation=e=>r(e)&&U(e.type)&&a(e.value),e.isFtRatingSummary=e=>r(e)&&(null==e.topics||C(e.topics))&&v(e.publication),e.isFtRatingType=U,e.isFtReaderConfiguration=e=>be(e)&&Fe(e.feedback)&&Te(e.loadAfterLastVisibleTopic)&&Te(e.loadBeforeFirstVisibleTopic),e.isFtReaderFeedbackConfiguration=Fe,e.isFtSearchFacet=le,e.isFtSearchFacetConf=ue,e.isFtSearchFacetEntry=ce,e.isFtSearchFilter=M,e.isFtSearchLocale=E,e.isFtSearchLocales=e=>r(e)&&Array.isArray(e.contentLocales)&&e.contentLocales.every((e=>E(e))),e.isFtSearchPreferences=Ee,e.isFtSearchPreferencesConfiguration=e=>r(e)&&r(e.metadata)&&Object.keys(e.metadata).every((e=>s(e)))&&Object.values(e.metadata).every((e=>L(e))),e.isFtSearchPreset=e=>r(e)&&s(e.name)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&a(e.priority)&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSearchPrior=Q,e.isFtSearchRequest=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||oe(e.scope))&&Y(e.paging)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.uiLocale||s(e.uiLocale))&&(null==e.virtualField||K(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale))&&(null==e.priors||Array.isArray(e.priors)&&e.priors.every((e=>Q(e))))&&Array.isArray(e.facets)&&e.facets.every((e=>ue(e))),e.isFtSearchResultCluster=Z,e.isFtSearchResultClusterEntry=ee,e.isFtSearchResultMap=re,e.isFtSearchResultTopic=ie,e.isFtSearchResultType=se,e.isFtSearchResultUnstructuredDocument=te,e.isFtSearchResults=e=>r(e)&&(null==e.spellcheck||pe(e.spellcheck))&&$(e.paging)&&Array.isArray(e.results)&&e.results.every((e=>Z(e)))&&Array.isArray(e.facets)&&e.facets.every((e=>le(e))),e.isFtSearchResultsPageInfo=$,e.isFtSearchScope=oe,e.isFtSearchSortCriterion=de,e.isFtSearchSortCriterionOrder=B,e.isFtSearchSortCriterionType=x,e.isFtSession=e=>r(e)&&(null==e.authenticationIdentifier||me(e.authenticationIdentifier))&&a(e.idleTimeoutInMillis)&&ge(e.profile)&&i(e.sessionAuthenticated)&&Ee(e.searchPreferences),e.isFtSpellcheck=pe,e.isFtSuggestRequest=e=>r(e)&&s(e.input)&&(null==e.scope||oe(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>de(e)))&&(null==e.maxCount||a(e.maxCount))&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSuggestResult=ye,e.isFtSuggestResults=e=>r(e)&&Array.isArray(e.suggestions)&&e.suggestions.every((e=>ye(e))),e.isFtTocNode=y,e.isFtTopic=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.id)&&s(e.contentApiEndpoint)&&s(e.title),e.isFtTopicContentTarget=e=>["THIRD_PARTY","OFF_THE_GRID","CONTENT_PACKAGER","PAGES","DESIGNED_READER"].includes(e),e.isFtTopicOrigin=f,e.isFtTopicOriginType=u,e.isFtTopicRating=_,e.isFtTopicResource=he,e.isFtTopicsRatingSummary=C,e.isFtUiLocale=e=>r(e)&&s(e.displayName)&&s(e.languageTag)&&i(e.translated),e.isFtUnstructuredDocument=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.openMode)&&(null==e.description||s(e.description))&&s(e.mimeType)&&(null==e.baseId||s(e.baseId))&&(null==e.clusterId||s(e.clusterId))&&s(e.contentApiEndpoint)&&s(e.title)&&(null==e.lastPublication||s(e.lastPublication))&&s(e.viewerUrl)&&s(e.lastEdition)&&s(e.filename)&&(null==e.originId||s(e.originId))&&s(e.rightsApiEndpoint)&&(null==e.originUrl||s(e.originUrl))&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtUserProfile=ge,e.isFtUserRole=Ae,e.isFtVirtualField=K,e.setUnauthenticatedUserSearchPreferences=function(e,t){if(Ce.localStorage){let r={...t,metadata:Le(t.metadata??{})};const i=Pe(e),a=JSON.stringify(r);return Ce.localStorage.setItem(i,a),Ce.dispatchEvent(new StorageEvent("storage",{key:i,newValue:a,storageArea:Ce.localStorage,url:Ce.location.href})),r}console.error("Cannot set unauthenticated preferences: local storage is unavailable.")},e.userHasRole=function(e,t){return null!=e&&(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some((e=>_e(e,t)))}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).fluidtopics={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(r.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function o(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function c(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=c(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||a(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=u(this);if(e)return e;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(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,i=u(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=c(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),i=0;i<t.length;i++)r[i]=String.fromCharCode(t[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(A)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(e,t){e=s(e),t=n(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},l.prototype.delete=function(e){delete this.map[s(e)]},l.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},l.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},l.prototype.set=function(e,t){this.map[s(e)]=n(t)},l.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},l.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),o(e)},l.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),o(e)},l.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),o(e)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function f(e,t){var r,i,a=(t=t||{}).body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new l(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new l(t.headers)),this.method=(r=t.method||this.method||"GET",i=r.toUpperCase(),y.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function A(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(a))}})),t}function m(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];m.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function g(e,i){return new Promise((function(a,s){var n=new f(e,i);if(n.signal&&n.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),i=r.shift().trim();if(i){var a=r.join(":").trim();t.append(i,a)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;a(new m(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},o.open(n.method,n.url,!0),"include"===n.credentials?o.withCredentials=!0:"omit"===n.credentials&&(o.withCredentials=!1),"responseType"in o&&r.blob&&(o.responseType="blob"),n.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),n.signal&&(n.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&n.signal.removeEventListener("abort",u)}),o.send(void 0===n._bodyInit?null:n._bodyInit)}))}g.polyfill=!0,e.fetch||(e.fetch=g,e.Headers=l,e.Request=f,e.Response=m),t.Headers=l,t.Request=f,t.Response=m,t.fetch=g,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:t);const r=e=>"object"==typeof e&&null!=e,i=e=>"boolean"==typeof e,a=e=>"number"==typeof e,s=e=>"string"==typeof e;var n;e.FtMyLibraryColors=void 0,(n=e.FtMyLibraryColors||(e.FtMyLibraryColors={})).black="black",n.green="green",n.blue="blue",n.purple="purple",n.red="red",n.orange="orange",n.yellow="yellow";const o=e=>["black","green","blue","purple","red","orange","yellow"].includes(e);var l;e.FtTopicOriginType=void 0,(l=e.FtTopicOriginType||(e.FtTopicOriginType={})).OFFICIAL="OFFICIAL",l.PERSONAL="PERSONAL",l.SHARED="SHARED";const u=e=>["OFFICIAL","PERSONAL","SHARED"].includes(e),c=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>Array.isArray(e)&&e.every((e=>s(e)))))&&s(e.key),d=e=>r(e)&&s(e.notes)&&Array.isArray(e.children)&&e.children.every((e=>d(e)))&&(null==e.topicLink||p(e.topicLink))&&s(e.title)&&(null==e.htmlContent||s(e.htmlContent)),p=e=>r(e)&&s(e.tocId)&&s(e.contentId)&&s(e.mapId),h=e=>r(e)&&s(e.topicStylesheetUrl)&&s(e.titleStylesheetUrl)&&Array.isArray(e.customCssClasses)&&e.customCssClasses.every((e=>s(e))),y=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&(null==e.hasRating||i(e.hasRating))&&s(e.tocId)&&Array.isArray(e.children)&&e.children.every((e=>y(e)))&&(null==e.origin||f(e.origin))&&s(e.contentId)&&s(e.title),f=e=>r(e)&&s(e.mapTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.contentId)&&s(e.mapId)&&u(e.type);var A;e.FtTopicContentTarget=void 0,(A=e.FtTopicContentTarget||(e.FtTopicContentTarget={})).THIRD_PARTY="THIRD_PARTY",A.OFF_THE_GRID="OFF_THE_GRID",A.CONTENT_PACKAGER="CONTENT_PACKAGER",A.PAGES="PAGES",A.DESIGNED_READER="DESIGNED_READER";var m;e.FtMetadataHomeLayout=void 0,(m=e.FtMetadataHomeLayout||(e.FtMetadataHomeLayout={})).CLASSIC="CLASSIC",m.CUSTOM="CUSTOM",m.DESIGNER="DESIGNER";const E=e=>r(e)&&a(e.count)&&s(e.label)&&(null==e.lang||s(e.lang));var g;e.FtFacetType=void 0,(g=e.FtFacetType||(e.FtFacetType={})).AND="AND",g.OR="OR",g.MONOVALUED="MONOVALUED";const S=e=>r(e)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&(null==e.hierarchicalValues||Array.isArray(e.hierarchicalValues)&&e.hierarchicalValues.every((e=>Array.isArray(e)&&e.every((e=>s(e))))))&&s(e.label)&&s(e.key);var b;e.FtMetadataSortRule=void 0,(b=e.FtMetadataSortRule||(e.FtMetadataSortRule={})).NONE="NONE",b.ALPHABET="ALPHABET",b.VERSION="VERSION";const T=e=>["NONE","ALPHABET","VERSION"].includes(e),R=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||ne(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>W(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.virtualField||V(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale));var F;e.FtRatingType=void 0,(F=e.FtRatingType||(e.FtRatingType={})).STARS="STARS",F.LIKE="LIKE",F.DICHOTOMOUS="DICHOTOMOUS",F.NO_RATING="NO_RATING";const O=e=>["STARS","LIKE","DICHOTOMOUS","NO_RATING"].includes(e),U=e=>r(e)&&s(e.date)&&O(e.type)&&a(e.value),I=e=>r(e)&&(null==e.rating||U(e.rating))&&O(e.type),v=e=>r(e)&&s(e.date)&&s(e.tocId)&&O(e.type)&&a(e.value),_=e=>r(e)&&Array.isArray(e.ratings)&&e.ratings.every((e=>v(e)))&&O(e.type),C=e=>r(e)&&Array.isArray(e.filter)&&e.filter.every((e=>s(e)))&&Array.isArray(e.prior)&&e.prior.every((e=>s(e))),L=e=>r(e)&&s(e.from)&&s(e.to),D=e=>r(e)&&(null==e.period||L(e.period))&&N(e.periodType);var P;e.FtPeriodFilterType=void 0,(P=e.FtPeriodFilterType||(e.FtPeriodFilterType={})).LAST_WEEK="LAST_WEEK",P.LAST_MONTH="LAST_MONTH",P.LAST_YEAR="LAST_YEAR",P.CUSTOM="CUSTOM";const N=e=>["LAST_WEEK","LAST_MONTH","LAST_YEAR","CUSTOM"].includes(e),M=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.key);var k;e.FtSearchSortCriterionOrder=void 0,(k=e.FtSearchSortCriterionOrder||(e.FtSearchSortCriterionOrder={})).ASC="ASC",k.DESC="DESC";const w=e=>["ASC","DESC"].includes(e);var B;e.FtSearchSortCriterionType=void 0,(B=e.FtSearchSortCriterionType||(e.FtSearchSortCriterionType={})).ALPHA="ALPHA",B.NATURAL="NATURAL";const H=e=>["ALPHA","NATURAL"].includes(e);var x;e.FtVirtualField=void 0,(x=e.FtVirtualField||(e.FtVirtualField={})).EVERYWHERE="EVERYWHERE",x.TITLE_ONLY="TITLE_ONLY",x.NONE="NONE";const V=e=>["EVERYWHERE","TITLE_ONLY","NONE"].includes(e),K=e=>r(e)&&a(e.totalResultsCount)&&i(e.isLastPage)&&a(e.currentPage)&&a(e.totalClustersCount);var $;e.FtEditorialType=void 0,($=e.FtEditorialType||(e.FtEditorialType={})).ARTICLE="ARTICLE",$.BOOK="BOOK",$.SHARED_BOOK="SHARED_BOOK";const j=e=>["ARTICLE","BOOK","SHARED_BOOK"].includes(e);var G;e.FtOpenMode=void 0,(G=e.FtOpenMode||(e.FtOpenMode={})).FLUIDTOPICS="FLUIDTOPICS",G.EXTERNAL="EXTERNAL";const q=e=>["FLUIDTOPICS","EXTERNAL"].includes(e),X=e=>r(e)&&(null==e.perPage||a(e.perPage))&&a(e.page);var Y;e.FtCollectionDocumentType=void 0,(Y=e.FtCollectionDocumentType||(e.FtCollectionDocumentType={})).MAP="MAP",Y.DOCUMENT="DOCUMENT",Y.TOPIC="TOPIC",Y.PERSONAL_BOOK="PERSONAL_BOOK",Y.SHARED_BOOK="SHARED_BOOK";const z=e=>["MAP","DOCUMENT","TOPIC","PERSONAL_BOOK","SHARED_BOOK"].includes(e),W=e=>r(e)&&i(e.negative)&&Array.isArray(e.values)&&e.values.every((e=>s(e)))&&s(e.label)&&s(e.key),J=e=>r(e)&&a(e.weight)&&s(e.value)&&s(e.key),Q=e=>r(e)&&Array.isArray(e.entries)&&e.entries.every((e=>Z(e)))&&(null==e.metadataVariableAxis||s(e.metadataVariableAxis)),Z=e=>r(e)&&(null==e.document||ee(e.document))&&(null==e.topic||re(e.topic))&&ae(e.type)&&(null==e.map||te(e.map)),ee=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&s(e.documentUrl)&&s(e.mimeType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.viewerUrl)&&s(e.contentUrl)&&s(e.filename)&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.documentId)&&s(e.lastEditionDate)&&s(e.htmlExcerpt),te=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&(null==e.openMode||q(e.openMode))&&j(e.editorialType)&&s(e.title)&&(null==e.lastPublicationDate||s(e.lastPublicationDate))&&s(e.htmlTitle)&&(null==e.originUrl||s(e.originUrl))&&s(e.mapUrl)&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt),re=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&s(e.contentId)&&Array.isArray(e.resources)&&e.resources.every((e=>pe(e)))&&s(e.title)&&s(e.mapTitle)&&s(e.topicUrl)&&s(e.contentUrl)&&s(e.htmlTitle)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&(null==e.originUrl||s(e.originUrl))&&s(e.readerUrl)&&s(e.mapId)&&(null==e.lastEditionDate||s(e.lastEditionDate))&&s(e.htmlExcerpt);var ie;e.FtSearchResultType=void 0,(ie=e.FtSearchResultType||(e.FtSearchResultType={})).MAP="MAP",ie.DOCUMENT="DOCUMENT",ie.TOPIC="TOPIC";const ae=e=>["MAP","DOCUMENT","TOPIC"].includes(e);var se;e.FtSearchScope=void 0,(se=e.FtSearchScope||(e.FtSearchScope={})).DEFAULT="DEFAULT",se.DOCUMENTS="DOCUMENTS",se.ALL_TOPICS="ALL_TOPICS";const ne=e=>["DEFAULT","DOCUMENTS","ALL_TOPICS"].includes(e),oe=e=>r(e)&&i(e.hierarchical)&&s(e.label)&&i(e.multiSelectionable)&&s(e.key)&&Array.isArray(e.rootNodes)&&e.rootNodes.every((e=>ue(e))),le=e=>r(e)&&(null==e.maxDepth||a(e.maxDepth))&&s(e.id),ue=e=>r(e)&&a(e.totalResultsCount)&&i(e.descendantSelected)&&Array.isArray(e.childNodes)&&e.childNodes.every((e=>ue(e)))&&s(e.label)&&s(e.value)&&i(e.selected),ce=e=>r(e)&&H(e.type)&&s(e.key)&&w(e.order),de=e=>r(e)&&s(e.suggestedQuery)&&s(e.htmlSuggestedQuery),pe=e=>r(e)&&s(e.filename)&&s(e.resourceUrl)&&s(e.id)&&s(e.mimeType)&&s(e.resourceContentUrl)&&s(e.viewerUrl),he=e=>r(e)&&(null==e.filenameExtension||s(e.filenameExtension))&&(null==e.editorialType||j(e.editorialType))&&(null==e.mimeType||s(e.mimeType))&&ae(e.type)&&s(e.value);var ye;e.FtUserRole=void 0,(ye=e.FtUserRole||(e.FtUserRole={})).PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",ye.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",ye.HTML_EXPORT_USER="HTML_EXPORT_USER",ye.PDF_EXPORT_USER="PDF_EXPORT_USER",ye.SAVED_SEARCH_USER="SAVED_SEARCH_USER",ye.COLLECTION_USER="COLLECTION_USER",ye.OFFLINE_USER="OFFLINE_USER",ye.ANALYTICS_USER="ANALYTICS_USER",ye.BETA_USER="BETA_USER",ye.DEBUG_USER="DEBUG_USER",ye.PRINT_USER="PRINT_USER",ye.RATING_USER="RATING_USER",ye.FEEDBACK_USER="FEEDBACK_USER",ye.CONTENT_PUBLISHER="CONTENT_PUBLISHER",ye.KHUB_ADMIN="KHUB_ADMIN",ye.USERS_ADMIN="USERS_ADMIN",ye.PORTAL_ADMIN="PORTAL_ADMIN",ye.ADMIN="ADMIN",ye.DEVELOPER="DEVELOPER";const fe=e=>["PERSONAL_BOOK_USER","PERSONAL_BOOK_SHARE_USER","HTML_EXPORT_USER","PDF_EXPORT_USER","SAVED_SEARCH_USER","COLLECTION_USER","OFFLINE_USER","ANALYTICS_USER","BETA_USER","DEBUG_USER","PRINT_USER","RATING_USER","FEEDBACK_USER","CONTENT_PUBLISHER","KHUB_ADMIN","USERS_ADMIN","PORTAL_ADMIN","ADMIN","DEVELOPER"].includes(e),Ae=e=>r(e)&&s(e.identifier)&&s(e.realm),me=e=>r(e)&&Array.isArray(e.defaultFilters)&&e.defaultFilters.every((e=>M(e))),Ee=e=>r(e)&&(null==e.emailAddress||s(e.emailAddress))&&(null==e.displayName||s(e.displayName))&&Array.isArray(e.roles)&&e.roles.every((e=>fe(e)))&&(null==e.userId||s(e.userId)),ge=e=>"object"==typeof e&&null!=e,Se=e=>"boolean"==typeof e,be=e=>"number"==typeof e,Te=e=>"string"==typeof e;var Re;e.FtConfigurationHistoryEntryStatus=void 0,(Re=e.FtConfigurationHistoryEntryStatus||(e.FtConfigurationHistoryEntryStatus={})).VALID="VALID",Re.INVALID="INVALID";const Fe=e=>ge(e)&&Se(e.mailsSentByFluidTopics)&&Se(e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&Array.isArray(e.recipients)&&e.recipients.every((e=>Te(e)))&&Array.isArray(e.bodyMetadataIds)&&e.bodyMetadataIds.every((e=>Te(e)))&&Array.isArray(e.subjectMetadataIds)&&e.subjectMetadataIds.every((e=>Te(e))),Oe=e=>ge(e)&&(null==e.parentsVisibility||Array.isArray(e.parentsVisibility)&&e.parentsVisibility.every((e=>Se(e))))&&Se(e.isVisible),Ue=e=>ge(e)&&(null==e.prettyUrl||Te(e.prettyUrl))&&(null==e.hasRating||Se(e.hasRating))&&(null==e.pageToc||Array.isArray(e.pageToc))&&(null==e.tocId||Te(e.tocId))&&Array.isArray(e.children)&&e.children.every((e=>Ue(e)))&&(null==e.pageConfiguration||Oe(e.pageConfiguration))&&(null==e.contentId||Te(e.contentId))&&(null==e.title||Te(e.title)),Ie=e=>ge(e)&&Se(e.splitCurrentPageToc),ve={[e.FtUserRole.PERSONAL_BOOK_SHARE_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.HTML_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.PDF_EXPORT_USER]:[e.FtUserRole.PERSONAL_BOOK_USER],[e.FtUserRole.KHUB_ADMIN]:[e.FtUserRole.CONTENT_PUBLISHER],[e.FtUserRole.ADMIN]:[e.FtUserRole.KHUB_ADMIN,e.FtUserRole.USERS_ADMIN,e.FtUserRole.PORTAL_ADMIN],[e.FtUserRole.DEVELOPER]:[e.FtUserRole.BETA_USER,e.FtUserRole.DEBUG_USER]};function _e(e,t){return e===t||(ve[e]??[]).some((e=>_e(e,t)))}const Ce="undefined"==typeof window?globalThis:window;function Le(e){let t={};for(let r in e){let i=e[r];("object"!=typeof i||Array.isArray(i))&&(i={prior:i});for(let e of["prior","filter"])i[e]=Array.isArray(i[e])?i[e]:[i[e]],i[e]=i[e].map((e=>null!=e?""+e:"")).filter((e=>""!==e));t[r]=i}return t}function De(e){return`${e}-FluidTopicsUnauthenticatedUserSearchPreferences`}const Pe="undefined"==typeof window?globalThis:window;class Ne extends Error{status;statusText;body;constructor(e,t,r){super(`${e} - ${t}: ${r}`),this.status=e,this.statusText=t,this.body=r}}async function Me(e){if(!e.ok)throw new Ne(e.status,e.statusText,await e.text());return e}function ke(e){return"application/json"===e.headers.get("Content-Type")?e.json():e.text()}class we{tenantBaseUrl;ftCallingApp;authorization;searchLabel;endpoints={authentication:{login:"api/authentication/login",logout:"api/authentication/logout",currentSession:"api/authentication/current-session"},khub:{maps:{mapId:e=>({info:`api/khub/maps/${e}`,toc:`api/khub/maps/${e}/toc`,pages:`api/khub/maps/${e}/pages`,feedback:`api/khub/maps/${e}/feedback`,rating:`api/khub/maps/${e}/rating`,attachments:{list:`api/khub/maps/${e}/attachments`,attachmentId:t=>({content:`api/khub/maps/${e}/attachments/${t}/content`})},resources:{list:`api/khub/maps/${e}/resources`,resourceId:t=>({content:`api/khub/maps/${e}/resources/${t}/content`})},topics:{contentId:t=>({info:`api/khub/maps/${e}/topics/${t}`,content:`api/khub/maps/${e}/topics/${t}/content`}),tocId:t=>({feedback:`api/khub/maps/${e}/topics/${t}/feedback`,rating:`api/khub/maps/${e}/topics/${t}/rating`})}})},documents:{documentId:e=>({info:`api/khub/documents/${e}`,content:`api/khub/documents/${e}/content`,text:`api/khub/documents/${e}/content/text`,feedback:`api/khub/documents/${e}/feedback`,rating:`api/khub/documents/${e}/rating`})},suggest:"api/khub/suggest",clusteredSearch:"api/khub/clustered-search",locales:"api/khub/locales"},users:{userId:e=>({collections:{collectionId:t=>({documents:`api/users/${e}/collections/${t}/documents`})},searches:{list:`api/users/${e}/searches`},bookmarks:{list:`api/users/${e}/bookmarks`}})},stylesheets:{fonts:"api/stylesheets/fonts.css",theme:"api/stylesheets/theme.css",content:{title:"api/stylesheets/content/title.css",topic:"api/stylesheets/content/topic.css"}},configuration:{reader:"api/configuration/reader",metadata:"api/configuration/metadata"},locales:{ui:"api/locales/ui"},messages:{locale:e=>({fluidTopics:{contextName:t=>({endpoint:`api/messages/${e}/fluid-topics/${t}`})},custom:{contextName:t=>({endpoint:`api/messages/${e}/custom/${t}`})}})}};get defaultHeaders(){return{...this.authorization,...this.searchLabel,"Ft-Calling-App":this.ftCallingApp}}constructor(e,t,r){e=(e??Pe.__gwt_ft_moduleBase??Pe.fluidtopicsclient?.__moduleBase??Pe.__gwt_activeModules?.fluidtopicsclient?.moduleBase??"").trim(),this.tenantBaseUrl=e.endsWith("/")?e:e+"/",r&&void 0!==Pe.location&&Pe.location.href.startsWith(this.tenantBaseUrl)?this.ftCallingApp=t:this.ftCallingApp=`ft-public-api/${t}`}setApiKey(e){this.authorization={Authorization:"Bearer "+e}}setCredentials(e,t){var r;this.authorization={Authorization:"Basic "+(r=`${e}:${t}`,"undefined"!=typeof Buffer?Buffer.from(r).toString("base64"):btoa(r))}}clearAuthentication(){this.authorization=void 0}setSearchLabel(e){this.searchLabel={"FT-search-label":e}}clearSearchLabel(){this.searchLabel=void 0}login(e,t){let r={login:e,password:t,rememberMe:!0};return this.post(this.endpoints.authentication.login,r).then((r=>(this.setCredentials(e,t),r)))}logout(){return this.post(this.endpoints.authentication.logout).then((()=>this.clearAuthentication()))}getCurrentSession(){return this.get(this.endpoints.authentication.currentSession)}getReaderConfiguration(){return this.get(this.endpoints.configuration.reader)}getMap(e,t){return this.get(this.endpoints.khub.maps.mapId(e).info,t)}getTableOfContent(e,t){return this.get(this.endpoints.khub.maps.mapId(e).toc,t)}getPages(e,t){return this.get(this.endpoints.khub.maps.mapId(e).pages,t)}getTopic(e,t,r){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).info,r)}getTopicHTMLContent(e,t,r,i){return this.get(this.endpoints.khub.maps.mapId(e).topics.contentId(t).content+(r?"?target="+r:""),i)}getMapAttachments(e,t){return this.get(this.endpoints.khub.maps.mapId(e).attachments.list,t)}getMapAttachmentContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).attachments.attachmentId(t).content,r)}getMapResources(e,t){return this.get(this.endpoints.khub.maps.mapId(e).resources.list,t)}getMapResourceContent(e,t,r){return this.fetchRawData(this.endpoints.khub.maps.mapId(e).resources.resourceId(t).content,r)}getUnstructuredDocument(e,t){return this.get(this.endpoints.khub.documents.documentId(e).info,t)}getUnstructuredDocumentContent(e,t){return this.fetchRawData(this.endpoints.khub.documents.documentId(e).content,t)}getUnstructuredDocumentTextContent(e,t){return this.get(this.endpoints.khub.documents.documentId(e).text,t)}getCollectionDocuments(e,t){return this.get(this.endpoints.users.userId(e).collections.collectionId(t).documents)}getSuggestions(e){return this.post(this.endpoints.khub.suggest,e)}search(e){return this.post(this.endpoints.khub.clusteredSearch,e)}getAvailableSearchLocales(){return this.get(this.endpoints.khub.locales)}getAvailableUiLocales(){return this.get(this.endpoints.khub.locales)}getMetadataDescriptors(){return this.get(this.endpoints.configuration.metadata)}getMapRating(e){return this.get(this.endpoints.khub.maps.mapId(e).rating)}rateMap(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).rating,{type:t,value:r})}unrateMap(e){return this.delete(this.endpoints.khub.maps.mapId(e).rating)}sendMapFeedback(e,t,r){return this.post(this.endpoints.khub.maps.mapId(e).feedback,{message:t,from:r})}rateTopic(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating,{type:r,value:i})}unrateTopic(e,t){return this.delete(this.endpoints.khub.maps.mapId(e).topics.tocId(t).rating)}sendTopicFeedback(e,t,r,i){return this.post(this.endpoints.khub.maps.mapId(e).topics.tocId(t).feedback,{message:r,from:i})}getDocumentRating(e){return this.get(this.endpoints.khub.documents.documentId(e).rating)}rateDocument(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).rating,{type:t,value:r})}unrateDocument(e){return this.delete(this.endpoints.khub.documents.documentId(e).rating)}sendDocumentFeedback(e,t,r){return this.post(this.endpoints.khub.documents.documentId(e).feedback,{message:t,from:r})}getFluidTopicsMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).fluidTopics.contextName(t).endpoint)}getCustomMessageContext(e,t){return this.get(this.endpoints.messages.locale(e).custom.contextName(t).endpoint)}listMySearches(e){return this.get(this.endpoints.users.userId(e).searches.list)}listMyBookmarks(e){return this.get(this.endpoints.users.userId(e).bookmarks.list)}get(e,t){return this.makeRequest("GET",this.withVersion(e,t))}post(e,t){return this.makeRequest("POST",e,t)}put(e,t){return this.makeRequest("PUT",e,t)}delete(e){return this.makeRequest("DELETE",e)}makeAbsolute(e){return e.startsWith(this.tenantBaseUrl)?e:this.tenantBaseUrl+e.replace(/^\//,"")}async fetch(e,t){const r=t;return await fetch(this.makeAbsolute(e),{...r??{},headers:{...this.defaultHeaders,...r?.headers??{}}})}upload(e,t,r,i=(()=>{})){return"undefined"!=typeof XMLHttpRequest?new Promise(((a,s)=>{let n=new XMLHttpRequest;n.onload=()=>{if(n.status>=200&&n.status<300){let e="application/json"===n.getResponseHeader("Content-Type")?JSON.parse(n.responseText):n.responseText;a(e)}else s(new Ne(n.status,n.statusText,n.responseText))},n.upload.onprogress=e=>i(e),n.open(e,this.makeAbsolute(t),!0),n.send(r)})):this.fetch(t,{method:e,body:r}).then(Me).then(ke)}makeRequest(e,t,r){return this.fetch(t,{method:e,headers:{...null!=r?{"Content-Type":"application/json"}:{}},body:null!=r?JSON.stringify(r):void 0,credentials:null==this.authorization?"include":void 0}).then(Me).then(ke)}fetchRawData(e,t){return fetch(this.withVersion(e,t),{headers:this.defaultHeaders,credentials:null==this.authorization?"include":void 0}).then(Me).then((e=>e.arrayBuffer()))}withVersion(e,t){let r=new URL(this.makeAbsolute(e));return t&&r.searchParams.append("v",t),r.toString()}}e.FluidTopicsApi=we,e.HttpError=Ne,e.addUnauthenticatedUserSearchPreferencesChangeHandler=function(e,t){if(Ce.localStorage){const r=De(e),i=e=>{e.storageArea===Ce.localStorage&&e.key===r&&t(JSON.parse(e.newValue??"{}"))};return Ce.addEventListener("storage",i),{removeHandler:()=>Ce.removeEventListener("storage",i)}}console.error("Cannot handle unauthenticated preferences: local storage is unavailable.")},e.default=we,e.getUnauthenticatedUserSearchPreferences=function(e){if(Ce.localStorage)return JSON.parse(Ce.localStorage.getItem(De(e))??"{}");console.error("Cannot get unauthenticated preferences: local storage is unavailable.")},e.isFtAuthenticatedSession=e=>r(e)&&Ae(e.authenticationIdentifier)&&Ee(e.profile),e.isFtAuthenticationIdentifier=Ae,e.isFtBookmark=e=>r(e)&&s(e.mapTitle)&&o(e.color)&&Array.isArray(e.breadcrumb)&&e.breadcrumb.every((e=>s(e)))&&s(e.tocId)&&s(e.lastUpdate)&&s(e.readerUrl)&&s(e.mapId)&&s(e.id)&&s(e.title)&&s(e.creationDate),e.isFtCollectionDocument=e=>r(e)&&i(e.deleted)&&(null==e.apiUrl||s(e.apiUrl))&&(null==e.portalUrl||s(e.portalUrl))&&s(e.id)&&s(e.title)&&z(e.type),e.isFtCollectionDocumentType=z,e.isFtConfigurationHistoryEntryStatus=e=>["VALID","INVALID"].includes(e),e.isFtCredentials=e=>r(e)&&s(e.password)&&(null==e.newPassword||s(e.newPassword))&&i(e.rememberMe)&&s(e.login),e.isFtEditorialType=j,e.isFtFacetType=e=>["AND","OR","MONOVALUED"].includes(e),e.isFtFeedbackCreation=e=>r(e)&&(null==e.from||s(e.from))&&s(e.message),e.isFtLabeledSearchFilter=W,e.isFtMap=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&q(e.openMode)&&(null==e.topicsApiEndpoint||s(e.topicsApiEndpoint))&&(null==e.description||s(e.description))&&(null==e.attachmentsApiEndpoint||s(e.attachmentsApiEndpoint))&&j(e.editorialType)&&s(e.baseId)&&s(e.clusterId)&&s(e.title)&&s(e.lastPublication)&&s(e.lastEdition)&&s(e.originId)&&(null==e.rightsApiEndpoint||s(e.rightsApiEndpoint))&&h(e.contentStyles)&&(null==e.originUrl||s(e.originUrl))&&s(e.fingerprint)&&s(e.readerUrl)&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtMapAttachment=e=>ge(e)&&Te(e.file)&&(null==e.size||be(e.size))&&Se(e.externalLink)&&Te(e.name)&&Te(e.id)&&(null==e.mimeType||Te(e.mimeType))&&(null==e.viewerUrl||Te(e.viewerUrl)),e.isFtMapResource=e=>r(e)&&s(e.contentUrl)&&s(e.filename)&&s(e.id)&&s(e.mimeType),e.isFtMapStyles=h,e.isFtMessageContext=e=>r(e)&&s(e.name)&&r(e.messages)&&Object.keys(e.messages).every((e=>s(e)))&&Object.values(e.messages).every((e=>s(e)))&&s(e.locale),e.isFtMetadata=S,e.isFtMetadataDescriptor=e=>r(e)&&T(e.sortRule)&&i(e.reverseSort)&&s(e.key),e.isFtMetadataHomeLayout=e=>["CLASSIC","CUSTOM","DESIGNER"].includes(e),e.isFtMetadataPreferenceConfiguration=C,e.isFtMetadataSortRule=T,e.isFtMyLibraryColors=o,e.isFtMySearch=e=>r(e)&&R(e.searchRequest)&&o(e.color)&&i(e.alert)&&s(e.description)&&s(e.id)&&s(e.ownerId)&&s(e.title)&&s(e.creationDate),e.isFtMySearchRequest=R,e.isFtOpenMode=q,e.isFtPageConfiguration=Oe,e.isFtPageRequest=X,e.isFtPaginatedToc=e=>ge(e)&&Ie(e.configuration)&&Array.isArray(e.paginatedToc)&&e.paginatedToc.every((e=>Ue(e))),e.isFtPaginatedTocNode=Ue,e.isFtPaginationConfiguration=Ie,e.isFtPeriod=L,e.isFtPeriodFilter=D,e.isFtPeriodFilterType=N,e.isFtPersonalBookCreation=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>c(e)))&&Array.isArray(e.nodes)&&e.nodes.every((e=>d(e)))&&s(e.description)&&s(e.title),e.isFtPersonalBookMetadataUpdate=c,e.isFtPersonalBookNodeCreation=d,e.isFtPersonalBookTopicLinkCreation=p,e.isFtPublicationRating=U,e.isFtPublicationRatingSummary=I,e.isFtRatingCreation=e=>r(e)&&O(e.type)&&a(e.value),e.isFtRatingSummary=e=>r(e)&&(null==e.topics||_(e.topics))&&I(e.publication),e.isFtRatingType=O,e.isFtReaderConfiguration=e=>ge(e)&&Fe(e.feedback)&&be(e.loadAfterLastVisibleTopic)&&be(e.loadBeforeFirstVisibleTopic),e.isFtReaderFeedbackConfiguration=Fe,e.isFtSearchFacet=oe,e.isFtSearchFacetConf=le,e.isFtSearchFacetEntry=ue,e.isFtSearchFilter=M,e.isFtSearchLocale=E,e.isFtSearchLocales=e=>r(e)&&Array.isArray(e.contentLocales)&&e.contentLocales.every((e=>E(e))),e.isFtSearchPreferences=me,e.isFtSearchPreferencesConfiguration=e=>r(e)&&r(e.metadata)&&Object.keys(e.metadata).every((e=>s(e)))&&Object.values(e.metadata).every((e=>C(e))),e.isFtSearchPreset=e=>r(e)&&s(e.name)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&a(e.priority)&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSearchPrior=J,e.isFtSearchRequest=e=>r(e)&&(null==e.periodFilter||D(e.periodFilter))&&s(e.query)&&(null==e.scope||ne(e.scope))&&X(e.paging)&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.uiLocale||s(e.uiLocale))&&(null==e.virtualField||V(e.virtualField))&&(null==e.contentLocale||s(e.contentLocale))&&(null==e.priors||Array.isArray(e.priors)&&e.priors.every((e=>J(e))))&&Array.isArray(e.facets)&&e.facets.every((e=>le(e))),e.isFtSearchResultCluster=Q,e.isFtSearchResultClusterEntry=Z,e.isFtSearchResultMap=te,e.isFtSearchResultTopic=re,e.isFtSearchResultType=ae,e.isFtSearchResultUnstructuredDocument=ee,e.isFtSearchResults=e=>r(e)&&(null==e.spellcheck||de(e.spellcheck))&&K(e.paging)&&Array.isArray(e.results)&&e.results.every((e=>Q(e)))&&Array.isArray(e.facets)&&e.facets.every((e=>oe(e))),e.isFtSearchResultsPageInfo=K,e.isFtSearchScope=ne,e.isFtSearchSortCriterion=ce,e.isFtSearchSortCriterionOrder=w,e.isFtSearchSortCriterionType=H,e.isFtSession=e=>r(e)&&(null==e.authenticationIdentifier||Ae(e.authenticationIdentifier))&&a(e.idleTimeoutInMillis)&&Ee(e.profile)&&i(e.sessionAuthenticated)&&me(e.searchPreferences),e.isFtSpellcheck=de,e.isFtSuggestRequest=e=>r(e)&&s(e.input)&&(null==e.scope||ne(e.scope))&&Array.isArray(e.filters)&&e.filters.every((e=>M(e)))&&Array.isArray(e.sort)&&e.sort.every((e=>ce(e)))&&(null==e.maxCount||a(e.maxCount))&&(null==e.contentLocale||s(e.contentLocale)),e.isFtSuggestResult=he,e.isFtSuggestResults=e=>r(e)&&Array.isArray(e.suggestions)&&e.suggestions.every((e=>he(e))),e.isFtTocNode=y,e.isFtTopic=e=>r(e)&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.id)&&s(e.contentApiEndpoint)&&s(e.title),e.isFtTopicContentTarget=e=>["THIRD_PARTY","OFF_THE_GRID","CONTENT_PACKAGER","PAGES","DESIGNED_READER"].includes(e),e.isFtTopicOrigin=f,e.isFtTopicOriginType=u,e.isFtTopicRating=v,e.isFtTopicResource=pe,e.isFtTopicsRatingSummary=_,e.isFtUiLocale=e=>r(e)&&s(e.displayName)&&s(e.languageTag)&&i(e.translated),e.isFtUnstructuredDocument=e=>r(e)&&(null==e.prettyUrl||s(e.prettyUrl))&&Array.isArray(e.metadata)&&e.metadata.every((e=>S(e)))&&s(e.openMode)&&(null==e.description||s(e.description))&&s(e.mimeType)&&(null==e.baseId||s(e.baseId))&&(null==e.clusterId||s(e.clusterId))&&s(e.contentApiEndpoint)&&s(e.title)&&(null==e.lastPublication||s(e.lastPublication))&&s(e.viewerUrl)&&s(e.lastEdition)&&s(e.filename)&&(null==e.originId||s(e.originId))&&s(e.rightsApiEndpoint)&&(null==e.originUrl||s(e.originUrl))&&(null==e.khubVersion||s(e.khubVersion))&&s(e.id)&&(null==e.lang||s(e.lang)),e.isFtUserProfile=Ee,e.isFtUserRole=fe,e.isFtVirtualField=V,e.setUnauthenticatedUserSearchPreferences=function(e,t){if(Ce.localStorage){let r={...t,metadata:Le(t.metadata??{})};const i=De(e),a=JSON.stringify(r);return Ce.localStorage.setItem(i,a),Ce.dispatchEvent(new StorageEvent("storage",{key:i,newValue:a,storageArea:Ce.localStorage,url:Ce.location.href})),r}console.error("Cannot set unauthenticated preferences: local storage is unavailable.")},e.userHasRole=function(e,t){return null!=e&&(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some((e=>_e(e,t)))}}));

@@ -219,7 +219,4 @@ export declare enum FtMyLibraryColors {

sortRule: FtMetadataSortRuleKeys;
tocFilter: boolean;
type: FtFacetTypeKeys;
reverseSort: boolean;
key: string;
labels: Record<string, string | undefined>;
}

@@ -226,0 +223,0 @@ export declare const isFtMetadataDescriptor: (o: any) => o is FtMetadataDescriptor;

@@ -259,9 +259,4 @@ const isObject = (o) => typeof o === "object" && o != null;

&& (isFtMetadataSortRule(o.sortRule))
&& (isBoolean(o.tocFilter))
&& (isFtFacetType(o.type))
&& (isBoolean(o.reverseSort))
&& (isString(o.key))
&& ((isObject(o.labels)
&& Object.keys(o.labels).every((k) => isString(k))
&& Object.values(o.labels).every((v) => v == null || isString(v))));
&& (isString(o.key));
};

@@ -268,0 +263,0 @@ export const isFtMySearch = (o) => {

@@ -0,1 +1,7 @@

export declare enum FtConfigurationHistoryEntryStatus {
VALID = "VALID",
INVALID = "INVALID"
}
export type FtConfigurationHistoryEntryStatusKeys = keyof typeof FtConfigurationHistoryEntryStatus;
export declare const isFtConfigurationHistoryEntryStatus: (o: any) => o is FtConfigurationHistoryEntryStatus;
export interface FtReaderConfiguration {

@@ -2,0 +8,0 @@ feedback: FtReaderFeedbackConfiguration;

@@ -5,2 +5,11 @@ const isObject = (o) => typeof o === "object" && o != null;

const isString = (o) => typeof o === "string";
// From: ConfigurationHistoryEntryStatus
export var FtConfigurationHistoryEntryStatus;
(function (FtConfigurationHistoryEntryStatus) {
FtConfigurationHistoryEntryStatus["VALID"] = "VALID";
FtConfigurationHistoryEntryStatus["INVALID"] = "INVALID";
})(FtConfigurationHistoryEntryStatus || (FtConfigurationHistoryEntryStatus = {}));
export const isFtConfigurationHistoryEntryStatus = (o) => {
return ["VALID", "INVALID"].includes(o);
};
export const isFtReaderConfiguration = (o) => {

@@ -7,0 +16,0 @@ return isObject(o)

{
"name": "@fluid-topics/public-api",
"version": "1.0.53",
"version": "1.0.54",
"description": "Fluid Topics Public API",

@@ -5,0 +5,0 @@ "author": "Fluid Topics dev team <opensource@antidot.net>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc