@fluid-topics/ft-reader-context 1.1.63 → 1.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
!function(t,i,e,s){class n{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,i,e){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,e)),null==t.tocId?this.extractPagesToc(t.children,i,e):[{tocId:t.tocId,title:t.title,depth:i,children:this.extractPagesToc(t.children,i+1,t.tocId)}])))}convertNodes(t,i,e){return t.flatMap((t=>{var s,n,r;if(null==t.tocId)return[...this.convertSectionNodes(null!==(s=t.pageToc)&&void 0!==s?s:[],i,t.tocId),...this.convertNodes(t.children,i,t.tocId)];let o=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const a={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:o,depth:i,parentTocId:e,children:[]};this.register(a);const h=this.convertSectionNodes(null!==(r=t.pageToc)&&void 0!==r?r:[],i+1,t.tocId),u=this.convertNodes(t.children,i+1,a.tocId);return a.children=[...h,...u],[a]}))}convertSectionNodes(t,i,e){return t.flatMap((t=>{var s;let n=null===(s=t.prettyUrl)||void 0===s?void 0:s.replace(/^\//,"");const r={...t,prettyUrl:n,depth:i,parentTocId:e,children:[]};return this.register(r),r.children=this.convertSectionNodes(t.children,i+1,t.tocId),[r]}))}buildPage(t,i){var e,s,n,r,o,a;const h={number:this.pages.length+1,title:null!==(e=t.title)&&void 0!==e?e:"",rootTocId:null!==(s=t.tocId)&&void 0!==s?s:"root",toc:(null!==(n=t.pageToc)&&void 0!==n?n:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:i?this.buildBreadcrumb(this.nodeByTocId[i]):[]},u=(t,i)=>(i?h.topics:h.hiddenTopics).push(t),l=null!==(o=null===(r=t.pageConfiguration)||void 0===r?void 0:r.parentsVisibility)&&void 0!==o?o:[];return h.breadcrumb.forEach(((t,i)=>{u(t,l[i])})),t.tocId&&u(t.tocId,t.pageConfiguration.isVisible),h.topics.push(...this.tocIds(null!==(a=t.pageToc)&&void 0!==a?a:[])),h}registerPage(t){for(let i of[...t.topics,...t.hiddenTopics])this.pageByTocId[i]||(this.pageByTocId[i]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const i=[t.tocId];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return i}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class r{convertPaginatedToc(t){return new n(t).build()}}var o,a,h,u,l,c,d,v,f,p,w,y,g,m,T,E,b,A;!function(t){!function(i){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function r(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var i={next:function(){var i=t.shift();return{done:void 0===i,value:i}}};return e.iterable&&(i[Symbol.iterator]=function(){return i}),i}function h(t){this.map={},t instanceof h?t.forEach((function(t,i){this.append(i,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(i){this.append(i,t[i])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(i,e){t.onload=function(){i(t.result)},t.onerror=function(){e(t.error)}}))}function c(t){var i=new FileReader,e=l(i);return i.readAsArrayBuffer(t),e}function d(t){if(t.slice)return t.slice(0);var i=new Uint8Array(t.byteLength);return i.set(new Uint8Array(t)),i.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var i;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((i=t)&&DataView.prototype.isPrototypeOf(i))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=u(this);if(t)return t;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(c)}),this.text=function(){var t,i,e,s=u(this);if(s)return s;if(this._bodyBlob)return t=this._bodyBlob,i=new FileReader,e=l(i),i.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var i=new Uint8Array(t),e=new Array(i.length),s=0;s<i.length;s++)e[s]=String.fromCharCode(i[s]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,i){t=r(t),i=o(i);var e=this.map[t];this.map[t]=e?e+", "+i:i},h.prototype.delete=function(t){delete this.map[r(t)]},h.prototype.get=function(t){return t=r(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(r(t))},h.prototype.set=function(t,i){this.map[r(t)]=o(i)},h.prototype.forEach=function(t,i){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(i,this.map[e],e,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(i,e){t.push(e)})),a(t)},h.prototype.values=function(){var t=[];return this.forEach((function(i){t.push(i)})),a(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(i,e){t.push([e,i])})),a(t)},e.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var f=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function p(t,i){var e,s,n=(i=i||{}).body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,i.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=i.credentials||this.credentials||"same-origin",!i.headers&&this.headers||(this.headers=new h(i.headers)),this.method=(e=i.method||this.method||"GET",s=e.toUpperCase(),f.indexOf(s)>-1?s:e),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(t){var i=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),s=e.shift().replace(/\+/g," "),n=e.join("=").replace(/\+/g," ");i.append(decodeURIComponent(s),decodeURIComponent(n))}})),i}function y(t,i){i||(i={}),this.type="default",this.status=void 0===i.status?200:i.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in i?i.statusText:"OK",this.headers=new h(i.headers),this.url=i.url||"",this._initBody(t)}p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},v.call(p.prototype),v.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];y.redirect=function(t,i){if(-1===g.indexOf(i))throw new RangeError("Invalid status code");return new y(null,{status:i,headers:{location:t}})},i.DOMException=t.DOMException;try{new i.DOMException}catch(t){i.DOMException=function(t,i){this.message=t,this.name=i;var e=Error(t);this.stack=e.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function m(t,s){return new Promise((function(n,r){var o=new p(t,s);if(o.signal&&o.signal.aborted)return r(new i.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,i,e={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",i=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),s=e.shift().trim();if(s){var n=e.join(":").trim();i.append(s,n)}})),i)};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;n(new y(s,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new i.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach((function(t,i){a.setRequestHeader(i,t)})),o.signal&&(o.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",u)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}m.polyfill=!0,t.fetch||(t.fetch=m,t.Headers=h,t.Request=p,t.Response=y),i.Headers=h,i.Request=p,i.Response=y,i.fetch=m,Object.defineProperty(i,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(o||(o={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(a||(a={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(h||(h={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(u||(u={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(l||(l={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(c||(c={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(d||(d={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(v||(v={})),function(t){t.ASC="ASC",t.DESC="DESC"}(f||(f={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(p||(p={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(w||(w={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(y||(y={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(g||(g={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(T||(T={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(E||(E={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(b||(b={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(A||(A={}));const I={[b.PERSONAL_BOOK_SHARE_USER]:[b.PERSONAL_BOOK_USER],[b.HTML_EXPORT_USER]:[b.PERSONAL_BOOK_USER],[b.PDF_EXPORT_USER]:[b.PERSONAL_BOOK_USER],[b.KHUB_ADMIN]:[b.CONTENT_PUBLISHER],[b.ADMIN]:[b.KHUB_ADMIN,b.USERS_ADMIN,b.PORTAL_ADMIN],[b.DEVELOPER]:[b.BETA_USER,b.DEBUG_USER]};function S(t,i){return t===i||(I[t]??[]).some((t=>S(t,i)))}function R(t,i){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>S(t,i)))}var C;t.FtReaderFeatures=void 0,(C=t.FtReaderFeatures||(t.FtReaderFeatures={})).FEEDBACK="FEEDBACK",C.RATING="RATING",C.PRINT="PRINT",C.BOOKMARK="BOOKMARK",C.COLLECTIONS="COLLECTIONS",C.PERSONAL_BOOKS="PERSONAL_BOOKS";const O=e.css`
|
|
1
|
+
!function(t,i,e,s){class n{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,i,e){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,e)),null==t.tocId?this.extractPagesToc(t.children,i,e):[{tocId:t.tocId,title:t.title,depth:i,children:this.extractPagesToc(t.children,i+1,t.tocId)}])))}convertNodes(t,i,e){return t.flatMap((t=>{var s,n,r;if(null==t.tocId)return[...this.convertSectionNodes(null!==(s=t.pageToc)&&void 0!==s?s:[],i,t.tocId),...this.convertNodes(t.children,i,t.tocId)];let o=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const a={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:o,depth:i,parentTocId:e,children:[]};this.register(a);const h=this.convertSectionNodes(null!==(r=t.pageToc)&&void 0!==r?r:[],i+1,t.tocId),u=this.convertNodes(t.children,i+1,a.tocId);return a.children=[...h,...u],[a]}))}convertSectionNodes(t,i,e){return t.flatMap((t=>{var s;let n=null===(s=t.prettyUrl)||void 0===s?void 0:s.replace(/^\//,"");const r={...t,prettyUrl:n,depth:i,parentTocId:e,children:[]};return this.register(r),r.children=this.convertSectionNodes(t.children,i+1,t.tocId),[r]}))}buildPage(t,i){var e,s,n,r,o,a;const h={number:this.pages.length+1,title:null!==(e=t.title)&&void 0!==e?e:"",rootTocId:null!==(s=t.tocId)&&void 0!==s?s:"root",toc:(null!==(n=t.pageToc)&&void 0!==n?n:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:i?this.buildBreadcrumb(this.nodeByTocId[i]):[]},u=(t,i)=>(i?h.topics:h.hiddenTopics).push(t),l=null!==(o=null===(r=t.pageConfiguration)||void 0===r?void 0:r.parentsVisibility)&&void 0!==o?o:[];return h.breadcrumb.forEach(((t,i)=>{u(t,l[i])})),t.tocId&&u(t.tocId,t.pageConfiguration.isVisible),h.topics.push(...this.tocIds(null!==(a=t.pageToc)&&void 0!==a?a:[])),h}registerPage(t){for(let i of[...t.topics,...t.hiddenTopics])this.pageByTocId[i]||(this.pageByTocId[i]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const i=[t.tocId];for(;null==t?void 0:t.parentTocId;)i.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return i}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class r{convertPaginatedToc(t){return new n(t).build()}}var o,a,h,u,l,c,d,v,f,p,w,y,g,m,T,E,b,A;!function(t){!function(i){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function r(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var i={next:function(){var i=t.shift();return{done:void 0===i,value:i}}};return e.iterable&&(i[Symbol.iterator]=function(){return i}),i}function h(t){this.map={},t instanceof h?t.forEach((function(t,i){this.append(i,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(i){this.append(i,t[i])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(i,e){t.onload=function(){i(t.result)},t.onerror=function(){e(t.error)}}))}function c(t){var i=new FileReader,e=l(i);return i.readAsArrayBuffer(t),e}function d(t){if(t.slice)return t.slice(0);var i=new Uint8Array(t.byteLength);return i.set(new Uint8Array(t)),i.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var i;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:e.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:e.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():e.arrayBuffer&&e.blob&&((i=t)&&DataView.prototype.isPrototypeOf(i))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):e.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=u(this);if(t)return t;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(c)}),this.text=function(){var t,i,e,s=u(this);if(s)return s;if(this._bodyBlob)return t=this._bodyBlob,i=new FileReader,e=l(i),i.readAsText(t),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var i=new Uint8Array(t),e=new Array(i.length),s=0;s<i.length;s++)e[s]=String.fromCharCode(i[s]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,i){t=r(t),i=o(i);var e=this.map[t];this.map[t]=e?e+", "+i:i},h.prototype.delete=function(t){delete this.map[r(t)]},h.prototype.get=function(t){return t=r(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(r(t))},h.prototype.set=function(t,i){this.map[r(t)]=o(i)},h.prototype.forEach=function(t,i){for(var e in this.map)this.map.hasOwnProperty(e)&&t.call(i,this.map[e],e,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(i,e){t.push(e)})),a(t)},h.prototype.values=function(){var t=[];return this.forEach((function(i){t.push(i)})),a(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(i,e){t.push([e,i])})),a(t)},e.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var f=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function p(t,i){var e,s,n=(i=i||{}).body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,i.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=i.credentials||this.credentials||"same-origin",!i.headers&&this.headers||(this.headers=new h(i.headers)),this.method=(e=i.method||this.method||"GET",s=e.toUpperCase(),f.indexOf(s)>-1?s:e),this.mode=i.mode||this.mode||null,this.signal=i.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(t){var i=new FormData;return t.trim().split("&").forEach((function(t){if(t){var e=t.split("="),s=e.shift().replace(/\+/g," "),n=e.join("=").replace(/\+/g," ");i.append(decodeURIComponent(s),decodeURIComponent(n))}})),i}function y(t,i){i||(i={}),this.type="default",this.status=void 0===i.status?200:i.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in i?i.statusText:"OK",this.headers=new h(i.headers),this.url=i.url||"",this._initBody(t)}p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},v.call(p.prototype),v.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];y.redirect=function(t,i){if(-1===g.indexOf(i))throw new RangeError("Invalid status code");return new y(null,{status:i,headers:{location:t}})},i.DOMException=t.DOMException;try{new i.DOMException}catch(t){i.DOMException=function(t,i){this.message=t,this.name=i;var e=Error(t);this.stack=e.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function m(t,s){return new Promise((function(n,r){var o=new p(t,s);if(o.signal&&o.signal.aborted)return r(new i.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,i,e={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",i=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var e=t.split(":"),s=e.shift().trim();if(s){var n=e.join(":").trim();i.append(s,n)}})),i)};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;n(new y(s,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new i.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach((function(t,i){a.setRequestHeader(i,t)})),o.signal&&(o.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",u)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}m.polyfill=!0,t.fetch||(t.fetch=m,t.Headers=h,t.Request=p,t.Response=y),i.Headers=h,i.Request=p,i.Response=y,i.fetch=m,Object.defineProperty(i,"t",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(o||(o={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(a||(a={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(h||(h={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(u||(u={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(l||(l={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(c||(c={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(d||(d={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(v||(v={})),function(t){t.ASC="ASC",t.DESC="DESC"}(f||(f={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(p||(p={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(w||(w={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(y||(y={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(g||(g={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(m||(m={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(T||(T={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(E||(E={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(b||(b={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(A||(A={}));const S={[b.PERSONAL_BOOK_SHARE_USER]:[b.PERSONAL_BOOK_USER],[b.HTML_EXPORT_USER]:[b.PERSONAL_BOOK_USER],[b.PDF_EXPORT_USER]:[b.PERSONAL_BOOK_USER],[b.KHUB_ADMIN]:[b.CONTENT_PUBLISHER],[b.ADMIN]:[b.KHUB_ADMIN,b.USERS_ADMIN,b.PORTAL_ADMIN],[b.DEVELOPER]:[b.BETA_USER,b.DEBUG_USER]};function I(t,i){return t===i||(S[t]??[]).some((t=>I(t,i)))}function R(t,i){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>I(t,i)))}var C;t.FtReaderFeatures=void 0,(C=t.FtReaderFeatures||(t.FtReaderFeatures={})).FEEDBACK="FEEDBACK",C.RATING="RATING",C.PRINT="PRINT",C.BOOKMARK="BOOKMARK",C.COLLECTIONS="COLLECTIONS",C.PERSONAL_BOOKS="PERSONAL_BOOKS";const O=e.css`
|
|
2
2
|
`,U=i.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1}});class P{static get(t){const{baseUrl:i,apiIntegrationIdentifier:e}=U.getState(),s=null!=t?t:e;if(i&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,s,!0)}static await(t){return new Promise((i=>{let e=P.get(t);if(e)i(e);else{const s=U.subscribe((()=>{e=P.get(t),e&&(s(),i(e))}))}}))}}class N{constructor(t=!0,e){var s;this.overrideApi=e;let n=this.constructor;n.commonCache=null!==(s=n.commonCache)&&void 0!==s?s:new i.CacheRegistry,this.cache=t?n.commonCache:new i.CacheRegistry}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:P.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:P.await()}clearCache(){this.cache.clearAll()}}var L;const D=Symbol("clearAfterUnitTest");class M extends N{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[L]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var s;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...e};i.deepEqual(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...s){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new i.ParametrizedLabelResolver(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},a).resolve(e,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}L=D,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends M{constructor(){super((async(t,i)=>(await this.awaitApi).getFluidTopicsMessageContext(t,i)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends M{constructor(){super((async(t,i)=>(await this.awaitApi).getCustomMessageContext(t,i)))}});const _=window.FluidTopicsI18nService;var B=function(t,i,e,s){for(var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};class k extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>P.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}update(t){super.update(t),t.has("baseUrl")&&(U.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&U.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&U.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&U.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&U.actions.noCustom(this.noCustom),t.has("editorMode")&&U.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&U.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&U.actions.session(this.session),t.has("availableUiLocales")&&U.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>_.addContext(t))),t.has("openExternalDocumentInNewTab")&&U.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}k.elementDefinitions={},k.styles=O,B([s.property()],k.prototype,"baseUrl",void 0),B([s.property()],k.prototype,"apiIntegrationIdentifier",void 0),B([s.property()],k.prototype,"uiLocale",void 0),B([i.jsonProperty(null)],k.prototype,"availableUiLocales",void 0),B([i.jsonProperty(null)],k.prototype,"metadataConfiguration",void 0),B([s.property({type:Boolean})],k.prototype,"editorMode",void 0),B([s.property({type:Boolean})],k.prototype,"noCustom",void 0),B([s.property({type:Boolean})],k.prototype,"openExternalDocumentInNewTab",void 0),B([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],k.prototype,"noCustomComponent",void 0),B([s.property({type:Boolean})],k.prototype,"withManualResources",void 0),B([i.jsonProperty([])],k.prototype,"messageContexts",void 0),B([i.jsonProperty(void 0)],k.prototype,"session",void 0),B([s.property({type:Object})],k.prototype,"apiProvider",void 0);class x extends N{async listMySearches(){let t=U.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class F extends N{async listMyBookmarks(){let t=U.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const H=i.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const j=new class{constructor(){this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new F,this.savedSearchesService=new x,U.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=U.getState();i.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),H.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),H.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();H.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const i=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;H.actions.bookmarks(i)}}};i.customElement("ft-app-context")(k);class G extends N{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,i,e){super(!1,i),this.converter=t,this._mapId=e,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,i;return R(null!==(i=null===(t=U.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==i?i:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var i;return null===(i=this.enrichedToc)||void 0===i?void 0:i.nodeByTocId[t]}async getPage(t){const i=await this.getEnrichedToc();return i.pages[t-1]||i.pages[0]}async getPageByTocId(t){const i=await this.getEnrichedToc();return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getAttachments(){return this.cache.get("map-attachments",(()=>this.fetchAttachments()))}getRelativesForDocument(t,i){return this.cache.get("document-relatives-"+t+"-"+i.join("-"),(()=>this.fetchRelativesForDocument(t,i)))}getRelativesForTopicInMap(t,i,e){return this.cache.get("topic-relatives-"+[t,i,...e].join("-"),(()=>this.fetchRelativesForTopicInMap(t,i,e)))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,i,e){const s=this.getNavigationData(t,i,e),n=this.getReaderLinkPrefix()+(s.prettyUrl?s.prettyUrl:`${s.mapId}/${s.tocId}`),r=new URL(n,this.api.tenantBaseUrl);return null!=s.page&&r.searchParams.set("page",`${s.page}`),s.prettyUrlDuplicated&&r.searchParams.set("tocId",s.tocId),null!=s.section&&r.searchParams.set("section",s.section),r.href}getNavigationData(t,i,e){var s,n;t=t||"root";const r=this.enrichedToc,o=null==r?void 0:r.pageByTocId[t],a=null==r?void 0:r.nodeByTocId[t],h=null==a?void 0:a.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(s=null==a?void 0:a.title)&&void 0!==s?s:"",page:i&&o&&o.number!==i?i:void 0,prettyUrl:null!=h?h.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(n=null==r?void 0:r.duplicatedPrettyUrls.has(null!=h?h:""))&&void 0!==n&&n,section:e}}async getAccurateNavigationData(t,i,e){return await this.getEnrichedToc(),this.getNavigationData(t,i,e)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((i=>{var e;return i?{type:i.topics.type,rating:null===(e=i.topics)||void 0===e?void 0:e.ratings.find((i=>i.tocId===t))}:void 0}))}rateMap(t,i){return this.makeRateMapRequest(t,i).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,i){return this.makeMapFeedbackRequest(t,i)}rateTopic(t,i,e){return this.makeRateTopicRequest(t,i,e).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=U.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,i,e){return this.makeTopicFeedbackRequest(t,i,e)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let i=this.getTocNodeNow(t),e=[{tocId:i.tocId,title:i.title}],s=this.getTocNodeNow(i.parentTocId);for(;s;)e.unshift({tocId:s.tocId,title:s.title}),s=this.getTocNodeNow(s.parentTocId);return e}isFeatureAccessible(i,{session:e,ratingType:s}){var n;if(!this.isFeatureAvailable(i))return!1;switch(i){case t.FtReaderFeatures.FEEDBACK:return R(null!=e?e:[],b.FEEDBACK_USER);case t.FtReaderFeatures.RATING:return R(null!=e?e:[],b.RATING_USER)&&null!=s&&s!==d.NO_RATING;case t.FtReaderFeatures.PRINT:return R(null!=e?e:[],b.PRINT_USER);case t.FtReaderFeatures.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case t.FtReaderFeatures.COLLECTIONS:return R(null!=e?e:[],b.COLLECTION_USER);case t.FtReaderFeatures.PERSONAL_BOOKS:return R(null!=e?e:[],b.PERSONAL_BOOK_USER)&&!(null===(n=this.getMapNow())||void 0===n?void 0:n.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}}class K extends G{static async build(t){return new K(new r,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const i=await this.api.getMap(t);return this.fingerprint=i.fingerprint,i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch((()=>[]))}fetchRelativesForDocument(t,i){return this.api.search({query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",filters:[{negative:!1,values:i,key:t}],sort:[],facets:[]})}fetchRelativesForTopicInMap(t,i,e){return this.api.search({query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",filters:[{negative:!1,values:e,key:i},{negative:!1,values:[t],key:"ft:publicationId"}],sort:[],facets:[]})}makeMapFeedbackRequest(t,i){return this.api.sendMapFeedback(this.mapId,t,i)}makeRateMapRequest(t,i){return this.api.rateMap(this.mapId,t,i)}makeRateTopicRequest(t,i,e){return this.api.rateTopic(this.mapId,t,i,e)}makeTopicFeedbackRequest(t,i,e){return this.api.sendTopicFeedback(this.mapId,t,i,e)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class q{static build(t,e){return new q((t=>i.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}}))(t.trim()||"context"),null!=e?e:K.build)}constructor(t,e,s){this.store=t,this.clusteringHelperProvider=s,this.metadataForSwitchToRelatives=new Set,this.loadDebouncer=new i.Debouncer(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return i.waitFor((()=>this.service))}async navigateToTopic(t,i,e){const s=await this.awaitService(),n=await(null!=e?s.getPage(e):s.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(n),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,n),section:i})}resolveValidNonRootTocId(t,i){var e,s,n;let r=null!==(e="root"===t?void 0:t)&&void 0!==e?e:i.rootTocId;return i.topics.includes(r)?r:null!==(n=null!==(s=i.topics[0])&&void 0!==s?s:i.hiddenTopics[0])&&void 0!==n?n:"root"}async navigateToPage(t){const i=await this.awaitService();let e=await i.getPage(t);this.store.actions.currentPage(e)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;(null===(t=this.service)||void 0===t?void 0:t.mapId)&&null==this.store.getState().map&&await this.loadDebouncer.run((()=>this.fetchData()))}clear(){var t;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),null===(t=this.service)||void 0===t||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,e,s,n,r;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.map(t))),null===(s=this.service)||void 0===s?void 0:s.getToc().then((t=>this.store.actions.toc(t))),null===(n=this.service)||void 0===n?void 0:n.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))]).then((()=>{this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}))}catch(t){!this.errorHandler||t instanceof i.CanceledPromiseError||this.errorHandler(t)}}fetchRelatives(){var t,i,e;const s=null===(t=this.store.getState().map)||void 0===t?void 0:t.metadata.filter((t=>{var i;return t.key==(null===(i=this.store.getState().configuration)||void 0===i?void 0:i.relativePivotMetadata)})).flatMap((t=>t.values));void 0!==s&&s.length>0?null===(i=this.service)||void 0===i||i.getRelativesForDocument(null===(e=this.store.getState().configuration)||void 0===e?void 0:e.relativePivotMetadata,s).then((t=>{const i=t.results.flatMap((t=>t.entries));this.store.actions.relatives(i),this.updateClusteringHelper()})):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.eventBus.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,e;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let s=this.store.getState().relatives;if(s){let n=s.find((t=>{var i;return(null===(i=t.map)||void 0===i?void 0:i.mapId)==this.store.getState().mapId})),r=null!==(e=null===(t=U.getState().metadataConfiguration)||void 0===t?void 0:t.descriptors)&&void 0!==e?e:[];return new i.ClusteringHelper(s,n,this.metadataForSwitchToRelatives,r)}}async navigateToRelativeTopicIfFound(t){var e,s,n;const r=await i.waitFor((()=>{var t;return null===(t=this.store.getState().configuration)||void 0===t?void 0:t.relativeTopicPivotMetadata})),o=this.store.getState().mapId,a=await this.awaitService(),h=await a.getRelativesForTopicInMap(o,r,[t]);if(null===(n=null===(s=null===(e=null==h?void 0:h.results)||void 0===e?void 0:e[0])||void 0===s?void 0:s.entries)||void 0===n?void 0:n[0]){const t=h.results[0].entries[0].topic.tocId;return await this.navigateToTopic(t),!0}return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),null==this.store.getState().relatives?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}}const V=e.css`
|
|
5
|
-
`;class $ extends CustomEvent{constructor(t,i){super("ft-reader-map-loaded",{detail:{map:t,toc:i}})}}class
|
|
5
|
+
`;class $ extends CustomEvent{constructor(t,i){super("ft-reader-map-loaded",{detail:{map:t,toc:i}})}}class Q extends CustomEvent{constructor(t,i){super("ft-reader-visible-topics-change",{detail:{visibleTopics:i}})}}class X extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class Y extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class W extends Event{constructor(){super("ft-reader-map-not-found")}}class z extends Event{constructor(){super("ft-reader-map-unauthorized")}}class J extends Event{constructor(){super("ft-reader-map-forbidden")}}class Z extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}}var tt=function(t,i,e,s){for(var n,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,a=t.length-1;a>=0;a--)(n=t[a])&&(o=(r<3?n(o):r>3?n(i,e,o):n(i,e))||o);return r>3&&o&&Object.defineProperty(i,e,o),o};class it extends i.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new i.Debouncer(5),this.navigationDebouncer=new i.Debouncer(10),this.mapLoadedEventDebouncer=new i.Debouncer(50),this.addStore(U)}render(){return e.html`
|
|
6
6
|
${this.importStyleIfNeeded()}
|
|
7
7
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
8
8
|
`}importStyleIfNeeded(){var t,i;const s=null===(t=this.stateManager.service)||void 0===t?void 0:t.themeStylesheet();return!s||window.location.href.startsWith(null!==(i=this.baseUrl)&&void 0!==i?i:"")?e.nothing:e.html`
|
|
9
9
|
<style>
|
|
10
10
|
@import "${s}"
|
|
11
11
|
</style>
|
|
12
|
-
`}get stateManager(){return null==this._stateManager&&(this._stateManager=q.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const i=t.fontsStylesheet();if(i&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${i}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),document.head.append(t)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some((i=>t.has(i)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&null==(null===(i=this.scrollTarget)||void 0===i?void 0:i.tocId)){const i=t.get("scrollTarget");null!=(null==i?void 0:i.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(i.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,i.section).then((t=>this.dispatchEvent(new
|
|
12
|
+
`}get stateManager(){return null==this._stateManager&&(this._stateManager=q.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const i=t.fontsStylesheet();if(i&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${i}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),document.head.append(t)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some((i=>t.has(i)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&null==(null===(i=this.scrollTarget)||void 0===i?void 0:i.tocId)){const i=t.get("scrollTarget");null!=(null==i?void 0:i.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(i.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,i.section).then((t=>this.dispatchEvent(new X(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var i;return this.stateManager.service.getAccurateNavigationData(t,null===(i=this.currentPage)||void 0===i?void 0:i.number)}))).then((t=>{let i=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>{var i;return{tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:null===(i=this.stateManager.service)||void 0===i?void 0:i.buildBreadcrumb(t.tocId)}}));this.dispatchEvent(new Q(this.map,i))}))}clear(){this.stateManager.clear()}async reload(){this.clear(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.load(),await this.navigationDebouncer.run((async()=>{if(null!=this.topicPivot){await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)||this.lastNotifiedNotFoundRelative===this.mapId+this.topicPivot?this.lastNotifiedNotFoundRelative=void 0:(this.dispatchEvent(new Z),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot)}else null!=this.tocId?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&await this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const i=t.composedPath()[0];this.register(i)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const i=t;401===i.status?this.dispatchEvent(new z):403===i.status?this.dispatchEvent(new J):404===i.status?this.dispatchEvent(new W):this.dispatchEvent(new Y(t))}reloadBookmarks(){j.reloadBookmarks()}async reloadRating(){var t,i;await(null===(t=this.stateManager.service)||void 0===t?void 0:t.reloadRating()),null===(i=this.stateManager.store)||void 0===i||i.eventBus.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run((()=>{this.map&&this.toc&&this.dispatchEvent(new $(this.map,this.toc))}))}}var et;it.styles=V,tt([i.redux({store:U.name})],it.prototype,"baseUrl",void 0),tt([s.property()],it.prototype,"mapId",void 0),tt([s.property()],it.prototype,"tocId",void 0),tt([s.property()],it.prototype,"section",void 0),tt([s.property()],it.prototype,"topicPivot",void 0),tt([s.property()],it.prototype,"searchInDocumentQuery",void 0),tt([s.property({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:et}})],it.prototype,"page",void 0),tt([i.redux({store:"reader"})],it.prototype,"map",void 0),tt([i.redux({store:"reader"})],it.prototype,"toc",void 0),tt([i.redux({store:"reader"})],it.prototype,"visibleTopics",void 0),tt([i.redux({store:"reader"})],it.prototype,"currentPage",void 0),tt([i.redux({store:"reader"})],it.prototype,"scrollTarget",void 0),tt([s.property({attribute:!1})],it.prototype,"readerServiceProvider",void 0),i.customElement("ft-reader-context")(it),t.ForbiddenErrorEvent=J,t.FtOfficialReaderService=K,t.FtReaderContext=it,t.FtReaderContextCssVariables={},t.FtReaderConverter=r,t.FtReaderService=G,t.LoadErrorEvent=Y,t.MapLoadedEvent=$,t.NavigationDoneEvent=X,t.NotFoundErrorEvent=W,t.TopicRelativeNotFoundEvent=Z,t.UnauthorizedErrorEvent=z,t.VisibleTopicsChangeEvent=Q,t.styles=V}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
|
@@ -175,7 +175,7 @@ function(t){return(e,o)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}
|
|
|
175
175
|
display: inline-block;
|
|
176
176
|
width: 0;
|
|
177
177
|
}
|
|
178
|
-
`;var Hi=Object.freeze({__proto__:null,noTextSelect:zi,safariEllipsisFix:ji,wordWrap:Ki}),Zi=Object.freeze({__proto__:null});class $i{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,r;t=this.resolvePluralKey(t,e);let i=null!==(r=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),i}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}}var Gi=Object.freeze({__proto__:null,ParametrizedLabelResolver:$i});const Vi=t=>{const e=null!=t?t:{};return(t,o)=>{var r;const i={hasChanged:(t,e)=>!ao(t,e),attribute:!1,...e};we(i)(t,o);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(o,{selector:null!==(r=e.selector)&&void 0!==r?r:t=>t[o],store:e.store})}};class qi{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function Yi(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ji,Xi,Qi;const tn=Symbol("internalReduxEventsUnsubscribers"),en=Symbol("internalStoresUnsubscribers"),on=Symbol("internalStores");class rn extends Wi{constructor(){super(...arguments),this[Ji]=new Map,this[Xi]=new Map,this[Qi]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[on].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[on].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[on].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:Yi(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[on].delete(e)}setupStore(t,e){this[on].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[on].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[en].has(t.store):this[en].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[en].set(t,e.subscribe((()=>this.updateFromStores()))),Yi(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const r=t=>this[o](t);e.eventBus.addEventListener(t.eventName,r),this[tn].push((()=>e.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[en].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[tn].forEach((t=>t())),this[tn]=[]}unsubscribeFromStore(t){this[en].has(t)&&this[en].get(t)(),this[en].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function nn(t){for(var e=arguments.length,o=Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function an(t){return!!t&&!!t[$n]}function sn(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===Gn}(t)||Array.isArray(t)||!!t[Zn]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Zn])||dn(t)||pn(t))}function cn(t,e,o){void 0===o&&(o=!1),0===ln(t)?(o?Object.keys:Vn)(t).forEach((function(r){o&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(o,r){return e(r,o,t)}))}function ln(t){var e=t[$n];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:dn(t)?2:pn(t)?3:0}function fn(t,e){return 2===ln(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function un(t,e,o){var r=ln(t);2===r?t.set(e,o):3===r?t.add(o):t[e]=o}function hn(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function dn(t){return zn&&t instanceof Map}function pn(t){return Kn&&t instanceof Set}function gn(t){return t.o||t.t}function yn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qn(t);delete e[$n];for(var o=Vn(e),r=0;r<o.length;r++){var i=o[r],n=e[i];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[i]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function bn(t,e){return void 0===e&&(e=!1),vn(t)||an(t)||!sn(t)||(ln(t)>1&&(t.set=t.add=t.clear=t.delete=mn),Object.freeze(t),e&&cn(t,(function(t,e){return bn(e,!0)}),!0)),t}function mn(){nn(2)}function vn(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function On(t){var e=Yn[t];return e||nn(18,t),e}function wn(){return Dn}function Sn(t,e){e&&(On("Patches"),t.u=[],t.s=[],t.v=e)}function xn(t){Cn(t),t.p.forEach(En),t.p=null}function Cn(t){t===Dn&&(Dn=t.l)}function Nn(t){return Dn={p:[],l:Dn,h:t,m:!0,_:0}}function En(t){var e=t[$n];0===e.i||1===e.i?e.j():e.g=!0}function Rn(t,e){e._=e.p.length;var o=e.p[0],r=void 0!==t&&t!==o;return e.h.O||On("ES5").S(e,t,r),r?(o[$n].P&&(xn(e),nn(4)),sn(t)&&(t=In(e,t),e.l||Un(e,t)),e.u&&On("Patches").M(o[$n].t,t,e.u,e.s)):t=In(e,o,[]),xn(e),e.u&&e.v(e.u,e.s),t!==Hn?t:void 0}function In(t,e,o){if(vn(e))return e;var r=e[$n];if(!r)return cn(e,(function(i,n){return Ln(t,r,e,i,n,o)}),!0),e;if(r.A!==t)return e;if(!r.P)return Un(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=yn(r.k):r.o,n=i,a=!1;3===r.i&&(n=new Set(i),i.clear(),a=!0),cn(n,(function(e,n){return Ln(t,r,i,e,n,o,a)})),Un(t,i,!1),o&&t.u&&On("Patches").N(r,o,t.u,t.s)}return r.o}function Ln(t,e,o,r,i,n,a){if(an(i)){var s=In(t,i,n&&e&&3!==e.i&&!fn(e.R,r)?n.concat(r):void 0);if(un(o,r,s),!an(s))return;t.m=!1}else a&&o.add(i);if(sn(i)&&!vn(i)){if(!t.h.D&&t._<1)return;In(t,i),e&&e.A.l||Un(t,i)}}function Un(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&bn(e,o)}function kn(t,e){var o=t[$n];return(o?gn(o):t)[e]}function Wn(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var r=Object.getOwnPropertyDescriptor(o,e);if(r)return r;o=Object.getPrototypeOf(o)}}function An(t){t.P||(t.P=!0,t.l&&An(t.l))}function Bn(t){t.o||(t.o=yn(t.t))}function Pn(t,e,o){var r=dn(e)?On("MapSet").F(e,o):pn(e)?On("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),r={i:o?1:0,A:e?e.A:wn(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,n=Jn;o&&(i=[r],n=Xn);var a=Proxy.revocable(i,n),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(e,o):On("ES5").J(e,o);return(o?o.A:wn()).p.push(r),r}function Fn(t){return an(t)||nn(22,t),function t(e){if(!sn(e))return e;var o,r=e[$n],i=ln(e);if(r){if(!r.P&&(r.i<4||!On("ES5").K(r)))return r.t;r.I=!0,o=_n(e,i),r.I=!1}else o=_n(e,i);return cn(o,(function(e,i){r&&function(t,e){return 2===ln(t)?t.get(e):t[e]}(r.t,e)===i||un(o,e,t(i))})),3===i?new Set(o):o}(t)}function _n(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return yn(t)}Ji=en,Xi=on,Qi=tn,rn.reduxProperties=new Map,rn.reduxReactiveProperties=new Set,rn.reduxEventListeners=new Map;var Tn,Dn,Mn="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),zn="undefined"!=typeof Map,Kn="undefined"!=typeof Set,jn="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Hn=Mn?Symbol.for("immer-nothing"):((Tn={})["immer-nothing"]=!0,Tn),Zn=Mn?Symbol.for("immer-draftable"):"__$immer_draftable",$n=Mn?Symbol.for("immer-state"):"__$immer_state",Gn=""+Object.prototype.constructor,Vn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(t){var e={};return Vn(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},Yn={},Jn={get:function(t,e){if(e===$n)return t;var o=gn(t);if(!fn(o,e))return function(t,e,o){var r,i=Wn(e,o);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,o,e);var r=o[e];return t.I||!sn(r)?r:r===kn(t.t,e)?(Bn(t),t.o[e]=Pn(t.A.h,r,t)):r},has:function(t,e){return e in gn(t)},ownKeys:function(t){return Reflect.ownKeys(gn(t))},set:function(t,e,o){var r=Wn(gn(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,o),!0;if(!t.P){var i=kn(gn(t),e),n=null==i?void 0:i[$n];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(hn(o,i)&&(void 0!==o||fn(t.t,e)))return!0;Bn(t),An(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==kn(t.t,e)||e in t.t?(t.R[e]=!1,Bn(t),An(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=gn(t),r=Reflect.getOwnPropertyDescriptor(o,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:o[e]}:r},defineProperty:function(){nn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){nn(12)}},Xn={};cn(Jn,(function(t,e){Xn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Xn.deleteProperty=function(t,e){return Xn.set.call(this,t,e,void 0)},Xn.set=function(t,e,o){return Jn.set.call(this,t[0],e,o,t[0])};var Qn=function(){function t(t){var e=this;this.O=jn,this.D=!0,this.produce=function(t,o,r){if("function"==typeof t&&"function"!=typeof o){var i=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var r;return(r=o).call.apply(r,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&nn(6),void 0!==r&&"function"!=typeof r&&nn(7),sn(t)){var s=Nn(e),c=Pn(e,t,void 0),l=!0;try{a=o(c),l=!1}finally{l?xn(s):Cn(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Sn(s,r),Rn(t,s)}),(function(t){throw xn(s),t})):(Sn(s,r),Rn(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===Hn&&(a=void 0),e.D&&bn(a,!0),r){var f=[],u=[];On("Patches").M(t,a,f,u),r(f,u)}return a}nn(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,n=e.produce(t,o,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,r,i]})):[n,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){sn(t)||nn(8),an(t)&&(t=Fn(t));var e=Nn(this),o=Pn(this,t,void 0);return o[$n].C=!0,Cn(e),o},e.finishDraft=function(t,e){var o=(t&&t[$n]).A;return Sn(o,e),Rn(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!jn&&nn(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var r=e[o];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}o>-1&&(e=e.slice(o+1));var i=On("Patches").$;return an(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),ta=new Qn,ea=ta.produce;function oa(t){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(t)}function ra(t){var e=function(t,e){if("object"!==oa(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!==oa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===oa(e)?e:String(e)}function ia(t,e,o){return(e=ra(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function na(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function aa(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?na(Object(o),!0).forEach((function(e){ia(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):na(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function sa(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ta.produceWithPatches.bind(ta),ta.setAutoFreeze.bind(ta),ta.setUseProxies.bind(ta),ta.applyPatches.bind(ta),ta.createDraft.bind(ta),ta.finishDraft.bind(ta);var ca="function"==typeof Symbol&&Symbol.observable||"@@observable",la=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+la(),REPLACE:"@@redux/REPLACE"+la(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+la()}};function ua(t,e,o){var r;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(sa(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(sa(1));return o(ua)(t,e)}if("function"!=typeof t)throw new Error(sa(2));var i=t,n=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(sa(3));return n}function u(t){if("function"!=typeof t)throw new Error(sa(4));if(c)throw new Error(sa(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(sa(6));e=!1,l();var o=s.indexOf(t);s.splice(o,1),a=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(sa(7));if(void 0===t.type)throw new Error(sa(8));if(c)throw new Error(sa(9));try{c=!0,n=i(n,t)}finally{c=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return h({type:fa.INIT}),(r={dispatch:h,subscribe:u,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(sa(10));i=t,h({type:fa.REPLACE})}})[ca]=function(){var t,e=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(sa(11));function o(){t.next&&t.next(f())}return o(),{unsubscribe:e(o)}}})[ca]=function(){return this},t},r}function ha(t){for(var e=Object.keys(t),o={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(o[i]=t[i])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:fa.INIT}))throw new Error(sa(12));if(void 0===o(void 0,{type:fa.PROBE_UNKNOWN_ACTION()}))throw new Error(sa(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var r=!1,i={},s=0;s<a.length;s++){var c=a[s],l=o[c],f=t[c],u=l(f,e);if(void 0===u)throw e&&e.type,new Error(sa(14));i[c]=u,r=r||u!==f}return(r=r||a.length!==Object.keys(t).length)?i:t}}function da(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function pa(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),r=function(){throw new Error(sa(15))},i={getState:o.getState,dispatch:function(){return r.apply(void 0,arguments)}},n=e.map((function(t){return t(i)}));return r=da.apply(void 0,n)(o.dispatch),aa(aa({},o),{},{dispatch:r})}}}function ga(t){return function(e){var o=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(o,r,t):e(i)}}}}var ya=ga();ya.withExtraArgument=ga;var ba,ma=ya,va=(ba=function(t,e){return ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},ba(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ba(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Oa=function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},wa=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},Sa=Object.defineProperty,xa=Object.defineProperties,Ca=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,Ra=Object.prototype.propertyIsEnumerable,Ia=function(t,e,o){return e in t?Sa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},La=function(t,e){for(var o in e||(e={}))Ea.call(e,o)&&Ia(t,o,e[o]);if(Na)for(var r=0,i=Na(e);r<i.length;r++){o=i[r];Ra.call(e,o)&&Ia(t,o,e[o])}return t},Ua=function(t,e){return xa(t,Ca(e))},ka="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?da:da.apply(null,arguments)};var Wa=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return va(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,wa([void 0],t[0].concat(this)))):new(e.bind.apply(e,wa([void 0],t.concat(this))))},e}(Array),Aa=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return va(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,wa([void 0],t[0].concat(this)))):new(e.bind.apply(e,wa([void 0],t.concat(this))))},e}(Array);function Ba(t){return sn(t)?ea(t,(function(){})):t}function Pa(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new Wa;o&&(!function(t){return"boolean"==typeof t}(o)?r.push(ma.withExtraArgument(o.extraArgument)):r.push(ma));return r}(t)}}function Fa(t){var e,o=Pa(),r=t||{},i=r.reducer,n=void 0===i?void 0:i,a=r.middleware,s=void 0===a?o():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,u=void 0===f?void 0:f,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=ha(n)}var p=s;"function"==typeof p&&(p=p(o));var g=pa.apply(void 0,p),y=da;l&&(y=ka(La({trace:!1},"object"==typeof l&&l)));var b=new Aa(g),m=b;return Array.isArray(d)?m=wa([g],d):"function"==typeof d&&(m=d(b)),ua(e,u,y.apply(void 0,m))}function _a(t,e){function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return La(La({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function Ta(t){var e,o={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[o,r,e]}function Da(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,r="function"==typeof t.initialState?t.initialState:Ba(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};function l(){var e="function"==typeof t.extraReducers?Ta(t.extraReducers):[t.extraReducers],o=e[0],i=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,c=e[2],l=void 0===c?void 0:c,f=La(La({},i),s);return function(t,e,o,r){void 0===o&&(o=[]);var i,n="function"==typeof e?Ta(e):[e,o,r],a=n[0],s=n[1],c=n[2];if(function(t){return"function"==typeof t}(t))i=function(){return Ba(t())};else{var l=Ba(t);i=function(){return l}}function f(t,e){void 0===t&&(t=i());var o=wa([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[c]),o.reduce((function(t,o){if(o){var r;if(an(t))return void 0===(r=o(t,e))?t:r;if(sn(t))return ea(t,(function(t){return o(t,e)}));if(void 0===(r=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=i,f}(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var o=0,r=a;o<r.length;o++){var i=r[o];t.addMatcher(i.matcher,i.reducer)}l&&t.addDefaultCase(l)}))}return n.forEach((function(t){var o,r,n=i[t],l=e+"/"+t;"reducer"in n?(o=n.reducer,r=n.prepare):o=n,a[t]=o,s[l]=o,c[t]=r?_a(l,r):_a(l)})),{name:e,reducer:function(t,e){return o||(o=l()),o(t,e)},actions:c,caseReducers:a,getInitialState:function(){return o||(o=l()),o.getInitialState()}}}var Ma=["name","message","stack","code"],za=function(t,e){this.payload=t,this.meta=e},Ka=function(t,e){this.payload=t,this.meta=e},ja=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,r=Ma;o<r.length;o++){var i=r[o];"string"==typeof t[i]&&(e[i]=t[i])}return e}return{message:String(t)}};function Ha(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var r=_a(t+"/fulfilled",(function(t,e,o,r){return{payload:t,meta:Ua(La({},r||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),i=_a(t+"/pending",(function(t,e,o){return{payload:void 0,meta:Ua(La({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=_a(t+"/rejected",(function(t,e,r,i,n){return{payload:i,error:(o&&o.serializeError||ja)(t||"Rejected"),meta:Ua(La({},n||{}),{arg:r,requestId:e,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,u=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new a;function d(t){f=t,h.abort()}var p=function(){return a=this,p=null,g=function(){var a,p,g,y,b,m;return Oa(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),y=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:c,extra:l}),null===(O=y)||"object"!=typeof O||"function"!=typeof O.then?[3,2]:[4,y];case 1:y=v.sent(),v.label=2;case 2:if(!1===y||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(i(u,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:u,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:c,extra:l,requestId:u,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new za(t,e)},fulfillWithValue:function(t,e){return new Ka(t,e)}})).then((function(e){if(e instanceof za)throw e;return e instanceof Ka?r(e.payload,u,t,e.meta):r(e,u,t)}))])];case 3:return g=v.sent(),[3,5];case 4:return m=v.sent(),g=m instanceof za?n(null,u,t,m.payload,m.meta):n(m,u,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(g)&&g.meta.condition||s(g),[2,g]}var O}))},new Promise((function(t,e){var o=function(t){try{i(g.next(t))}catch(t){e(t)}},r=function(t){try{i(g.throw(t))}catch(t){e(t)}},i=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,r)};i((g=g.apply(a,p)).next())}));var a,p,g}();return Object.assign(p,{abort:d,requestId:u,arg:t,unwrap:function(){return p.then(Ha)}})}}),{pending:i,rejected:n,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Za="listenerMiddleware";_a(Za+"/add"),_a(Za+"/removeAll"),_a(Za+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=i[t];return o?o.enumerable=e:i[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[$n];return Jn.get(e,t)},set:function(e){var o=this[$n];Jn.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][$n];if(!i.P)switch(i.i){case 5:r(i)&&An(i);break;case 4:o(i)&&An(i)}}}function o(t){for(var e=t.t,o=t.k,r=Vn(o),i=r.length-1;i>=0;i--){var n=r[i];if(n!==$n){var a=e[n];if(void 0===a&&!fn(e,n))return!0;var s=o[n],c=s&&s[$n];if(c?c.t!==a:!hn(s,a))return!0}}var l=!!e[$n];return r.length!==Vn(e).length+(l?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){Yn[t]||(Yn[t]=e)}("ES5",{J:function(e,o){var r=Array.isArray(e),i=function(e,o){if(e){for(var r=Array(o.length),i=0;i<o.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var n=qn(o);delete n[$n];for(var a=Vn(n),s=0;s<a.length;s++){var c=a[s];n[c]=t(c,e||!!n[c].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(r,e),n={i:r?5:4,A:o?o.A:wn(),P:!1,I:!1,R:{},l:o,t:e,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,$n,{value:n,writable:!0}),i},S:function(t,o,i){i?an(o)&&o[$n].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[$n];if(o){var i=o.t,n=o.k,a=o.R,s=o.i;if(4===s)cn(n,(function(e){e!==$n&&(void 0!==i[e]||fn(i,e)?a[e]||t(n[e]):(a[e]=!0,An(o)))})),cn(i,(function(t){void 0!==n[t]||fn(n,t)||(a[t]=!1,An(o))}));else if(5===s){if(r(o)&&(An(o),a.length=!0),n.length<i.length)for(var c=n.length;c<i.length;c++)a[c]=!1;else for(var l=i.length;l<n.length;l++)a[l]=!0;for(var f=Math.min(n.length,i.length),u=0;u<f;u++)n.hasOwnProperty(u)||(a[u]=!0),void 0===a[u]&&t(n[u])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class $a{static get(t){var e;const o="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,i=window.ftReduxStores[o];if(Yi(i))return i;if(null==r)return;const n=Da({...r,reducers:null!==(e=r.reducers)&&void 0!==e?e:{}}),a=Fa({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?n.getInitialState():"string"==typeof e.type&&e.type.startsWith("DEFAULT_VALUE_SETTER__")?{...t,...e.overwrites}:n.reducer(t,e)});return window.ftReduxStores[r.name]=new $a(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new qi,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const r=e,i=t[r];return i?(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var Ga=Object.freeze({__proto__:null,FtCommandQueue:qi,FtLitElementRedux:rn,FtReduxStore:$a,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))Yi(e)&&e.clear()},isFtReduxStore:Yi,redux:Vi,reduxEventListener:t=>(e,o)=>{const r=e.constructor;r.reduxEventListeners=new Map(r.reduxEventListeners),r.reduxEventListeners.set(o,t)},reduxReactive:()=>(t,e)=>{var o;const r=t.constructor;r.reduxReactiveProperties=new Set(r.reduxReactiveProperties),null===(o=r.reduxReactiveProperties)||void 0===o||o.add(e)}});var Va=Object.freeze({__proto__:null,serializeRequest:function(t,e){var o,r,i,n;const a=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all"});if((null===(r=e.query)||void 0===r?void 0:r.length)>0&&a.append("query",e.query),e.scope&&"DEFAULT"!==e.scope&&a.append("scope",e.scope.toLowerCase()),e.virtualField&&a.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let t=e.periodFilter.period;const o=t?`_${t.from}_${t.to}`:"";a.append("period",e.periodFilter.periodType.toLowerCase()+o)}if((null===(i=e.sort)||void 0===i?void 0:i.length)>0&&"ft:lastEdition"===e.sort[0].key&&a.append("sort","last_update"),(null===(n=e.filters)||void 0===n?void 0:n.length)>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");a.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${a.toString()}`).href}});const qa=Symbol("elementInternals");var Ya,Ja,Xa,Qa,ts=Object.freeze({__proto__:null,toFtFormComponent:function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[qa].form}constructor(...t){super(t),this[qa]=this.attachInternals(),this[qa].role=e}setFormValue(t){this[qa].setFormValue(t)}}}});const es=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Xa=null===(Ja=null===(Ya=window.safari)||void 0===Ya?void 0:Ya.pushNotification)||void 0===Ja?void 0:Ja.toString())&&void 0!==Xa?Xa:""),os="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=null!==(Qa=window.ftGlobals)&&void 0!==Qa?Qa:{lit:me,litDecorators:Ce,litRepeat:_e,litClassMap:De,litStyleMap:je,litUnsafeHTML:$e,wcUtils:{...Xe,...Ye,...to,...oo,...uo,...yr,...Or,...Si,...pr,...Ai,...Bi,...so,...Mi,...Hi,...Zi,...Gi,...Ga,...Ri,...Va,...ts,isSafari:es,isTouchScreen:os}};class rs{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,o){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,o)),null==t.tocId?this.extractPagesToc(t.children,e,o):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,o){return t.flatMap((t=>{var r,i,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(r=t.pageToc)&&void 0!==r?r:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(i=t.prettyUrl)||void 0===i?void 0:i.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:o,children:[]};this.register(s);const c=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),l=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...c,...l],[s]}))}convertSectionNodes(t,e,o){return t.flatMap((t=>{var r;let i=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const n={...t,prettyUrl:i,depth:e,parentTocId:o,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var o,r,i,n,a,s;const c={number:this.pages.length+1,title:null!==(o=t.title)&&void 0!==o?o:"",rootTocId:null!==(r=t.tocId)&&void 0!==r?r:"root",toc:(null!==(i=t.pageToc)&&void 0!==i?i:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},l=(t,e)=>(e?c.topics:c.hiddenTopics).push(t),f=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return c.breadcrumb.forEach(((t,e)=>{l(t,f[e])})),t.tocId&&l(t.tocId,t.pageConfiguration.isVisible),c.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),c}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class is{convertPaginatedToc(t){return new rs(t).build()}}var ns,as,ss,cs,ls,fs,us,hs,ds,ps,gs,ys,bs,ms,vs,Os,ws,Ss;!function(t){!function(e){var o={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function u(t){var e=new FileReader,o=f(e);return e.readAsArrayBuffer(t),o}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=l(this);if(t)return t;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?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=f(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),r=0;r<e.length;r++)o[r]=String.fromCharCode(e[r]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},c.prototype.delete=function(t){delete this.map[n(t)]},c.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},c.prototype.set=function(t,e){this.map[n(t)]=a(e)},c.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},c.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,e){var o,r,i=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(o=e.method||this.method||"GET",r=o.toUpperCase(),p.indexOf(r)>-1?r:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),r=o.shift().replace(/\+/g," "),i=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},d.call(g.prototype),d.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,r){return new Promise((function(i,n){var a=new g(t,r);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),r=o.shift().trim();if(r){var i=o.join(":").trim();e.append(r,i)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new b(r,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=c,t.Request=g,t.Response=b),e.Headers=c,e.Request=g,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(ns||(ns={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(as||(as={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(ss||(ss={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(cs||(cs={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(ls||(ls={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(fs||(fs={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(us||(us={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(hs||(hs={})),function(t){t.ASC="ASC",t.DESC="DESC"}(ds||(ds={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(ps||(ps={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(gs||(gs={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(ys||(ys={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(bs||(bs={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(ms||(ms={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(vs||(vs={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Os||(Os={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(ws||(ws={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Ss||(Ss={}));const xs={[ws.PERSONAL_BOOK_SHARE_USER]:[ws.PERSONAL_BOOK_USER],[ws.HTML_EXPORT_USER]:[ws.PERSONAL_BOOK_USER],[ws.PDF_EXPORT_USER]:[ws.PERSONAL_BOOK_USER],[ws.KHUB_ADMIN]:[ws.CONTENT_PUBLISHER],[ws.ADMIN]:[ws.KHUB_ADMIN,ws.USERS_ADMIN,ws.PORTAL_ADMIN],[ws.DEVELOPER]:[ws.BETA_USER,ws.DEBUG_USER]};function Cs(t,e){return t===e||(xs[t]??[]).some((t=>Cs(t,e)))}function Ns(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>Cs(t,e)))}var Es;t.FtReaderFeatures=void 0,(Es=t.FtReaderFeatures||(t.FtReaderFeatures={})).FEEDBACK="FEEDBACK",Es.RATING="RATING",Es.PRINT="PRINT",Es.BOOKMARK="BOOKMARK",Es.COLLECTIONS="COLLECTIONS",Es.PERSONAL_BOOKS="PERSONAL_BOOKS";const Rs=ut`
|
|
178
|
+
`;var Hi=Object.freeze({__proto__:null,noTextSelect:zi,safariEllipsisFix:ji,wordWrap:Ki}),Zi=Object.freeze({__proto__:null});class $i{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,r;t=this.resolvePluralKey(t,e);let i=null!==(r=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),i}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}}var Gi=Object.freeze({__proto__:null,ParametrizedLabelResolver:$i});const Vi=t=>{const e=null!=t?t:{};return(t,o)=>{var r;const i={hasChanged:(t,e)=>!ao(t,e),attribute:!1,...e};we(i)(t,o);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(o,{selector:null!==(r=e.selector)&&void 0!==r?r:t=>t[o],store:e.store})}};class qi{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function Yi(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ji,Xi,Qi;const tn=Symbol("internalReduxEventsUnsubscribers"),en=Symbol("internalStoresUnsubscribers"),on=Symbol("internalStores");class rn extends Wi{constructor(){super(...arguments),this[Ji]=new Map,this[Xi]=new Map,this[Qi]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[on].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[on].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[on].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:Yi(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[on].delete(e)}setupStore(t,e){this[on].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[on].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[en].has(t.store):this[en].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[en].set(t,e.subscribe((()=>this.updateFromStores()))),Yi(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const r=t=>this[o](t);e.eventBus.addEventListener(t.eventName,r),this[tn].push((()=>e.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[en].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[tn].forEach((t=>t())),this[tn]=[]}unsubscribeFromStore(t){this[en].has(t)&&this[en].get(t)(),this[en].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function nn(t){for(var e=arguments.length,o=Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function an(t){return!!t&&!!t[$n]}function sn(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===Gn}(t)||Array.isArray(t)||!!t[Zn]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Zn])||dn(t)||pn(t))}function cn(t,e,o){void 0===o&&(o=!1),0===ln(t)?(o?Object.keys:Vn)(t).forEach((function(r){o&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(o,r){return e(r,o,t)}))}function ln(t){var e=t[$n];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:dn(t)?2:pn(t)?3:0}function fn(t,e){return 2===ln(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function un(t,e,o){var r=ln(t);2===r?t.set(e,o):3===r?t.add(o):t[e]=o}function hn(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function dn(t){return zn&&t instanceof Map}function pn(t){return Kn&&t instanceof Set}function gn(t){return t.o||t.t}function yn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qn(t);delete e[$n];for(var o=Vn(e),r=0;r<o.length;r++){var i=o[r],n=e[i];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[i]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function bn(t,e){return void 0===e&&(e=!1),vn(t)||an(t)||!sn(t)||(ln(t)>1&&(t.set=t.add=t.clear=t.delete=mn),Object.freeze(t),e&&cn(t,(function(t,e){return bn(e,!0)}),!0)),t}function mn(){nn(2)}function vn(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function On(t){var e=Yn[t];return e||nn(18,t),e}function wn(){return Dn}function Sn(t,e){e&&(On("Patches"),t.u=[],t.s=[],t.v=e)}function xn(t){Cn(t),t.p.forEach(En),t.p=null}function Cn(t){t===Dn&&(Dn=t.l)}function Nn(t){return Dn={p:[],l:Dn,h:t,m:!0,_:0}}function En(t){var e=t[$n];0===e.i||1===e.i?e.j():e.g=!0}function Rn(t,e){e._=e.p.length;var o=e.p[0],r=void 0!==t&&t!==o;return e.h.O||On("ES5").S(e,t,r),r?(o[$n].P&&(xn(e),nn(4)),sn(t)&&(t=In(e,t),e.l||Un(e,t)),e.u&&On("Patches").M(o[$n].t,t,e.u,e.s)):t=In(e,o,[]),xn(e),e.u&&e.v(e.u,e.s),t!==Hn?t:void 0}function In(t,e,o){if(vn(e))return e;var r=e[$n];if(!r)return cn(e,(function(i,n){return Ln(t,r,e,i,n,o)}),!0),e;if(r.A!==t)return e;if(!r.P)return Un(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=yn(r.k):r.o,n=i,a=!1;3===r.i&&(n=new Set(i),i.clear(),a=!0),cn(n,(function(e,n){return Ln(t,r,i,e,n,o,a)})),Un(t,i,!1),o&&t.u&&On("Patches").N(r,o,t.u,t.s)}return r.o}function Ln(t,e,o,r,i,n,a){if(an(i)){var s=In(t,i,n&&e&&3!==e.i&&!fn(e.R,r)?n.concat(r):void 0);if(un(o,r,s),!an(s))return;t.m=!1}else a&&o.add(i);if(sn(i)&&!vn(i)){if(!t.h.D&&t._<1)return;In(t,i),e&&e.A.l||Un(t,i)}}function Un(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&bn(e,o)}function kn(t,e){var o=t[$n];return(o?gn(o):t)[e]}function Wn(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var r=Object.getOwnPropertyDescriptor(o,e);if(r)return r;o=Object.getPrototypeOf(o)}}function An(t){t.P||(t.P=!0,t.l&&An(t.l))}function Bn(t){t.o||(t.o=yn(t.t))}function Pn(t,e,o){var r=dn(e)?On("MapSet").F(e,o):pn(e)?On("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),r={i:o?1:0,A:e?e.A:wn(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,n=Jn;o&&(i=[r],n=Xn);var a=Proxy.revocable(i,n),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(e,o):On("ES5").J(e,o);return(o?o.A:wn()).p.push(r),r}function Fn(t){return an(t)||nn(22,t),function t(e){if(!sn(e))return e;var o,r=e[$n],i=ln(e);if(r){if(!r.P&&(r.i<4||!On("ES5").K(r)))return r.t;r.I=!0,o=_n(e,i),r.I=!1}else o=_n(e,i);return cn(o,(function(e,i){r&&function(t,e){return 2===ln(t)?t.get(e):t[e]}(r.t,e)===i||un(o,e,t(i))})),3===i?new Set(o):o}(t)}function _n(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return yn(t)}Ji=en,Xi=on,Qi=tn,rn.reduxProperties=new Map,rn.reduxReactiveProperties=new Set,rn.reduxEventListeners=new Map;var Tn,Dn,Mn="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),zn="undefined"!=typeof Map,Kn="undefined"!=typeof Set,jn="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Hn=Mn?Symbol.for("immer-nothing"):((Tn={})["immer-nothing"]=!0,Tn),Zn=Mn?Symbol.for("immer-draftable"):"__$immer_draftable",$n=Mn?Symbol.for("immer-state"):"__$immer_state",Gn=""+Object.prototype.constructor,Vn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(t){var e={};return Vn(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},Yn={},Jn={get:function(t,e){if(e===$n)return t;var o=gn(t);if(!fn(o,e))return function(t,e,o){var r,i=Wn(e,o);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,o,e);var r=o[e];return t.I||!sn(r)?r:r===kn(t.t,e)?(Bn(t),t.o[e]=Pn(t.A.h,r,t)):r},has:function(t,e){return e in gn(t)},ownKeys:function(t){return Reflect.ownKeys(gn(t))},set:function(t,e,o){var r=Wn(gn(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,o),!0;if(!t.P){var i=kn(gn(t),e),n=null==i?void 0:i[$n];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(hn(o,i)&&(void 0!==o||fn(t.t,e)))return!0;Bn(t),An(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==kn(t.t,e)||e in t.t?(t.R[e]=!1,Bn(t),An(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=gn(t),r=Reflect.getOwnPropertyDescriptor(o,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:o[e]}:r},defineProperty:function(){nn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){nn(12)}},Xn={};cn(Jn,(function(t,e){Xn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Xn.deleteProperty=function(t,e){return Xn.set.call(this,t,e,void 0)},Xn.set=function(t,e,o){return Jn.set.call(this,t[0],e,o,t[0])};var Qn=function(){function t(t){var e=this;this.O=jn,this.D=!0,this.produce=function(t,o,r){if("function"==typeof t&&"function"!=typeof o){var i=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var r;return(r=o).call.apply(r,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&nn(6),void 0!==r&&"function"!=typeof r&&nn(7),sn(t)){var s=Nn(e),c=Pn(e,t,void 0),l=!0;try{a=o(c),l=!1}finally{l?xn(s):Cn(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Sn(s,r),Rn(t,s)}),(function(t){throw xn(s),t})):(Sn(s,r),Rn(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===Hn&&(a=void 0),e.D&&bn(a,!0),r){var f=[],u=[];On("Patches").M(t,a,f,u),r(f,u)}return a}nn(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,n=e.produce(t,o,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,r,i]})):[n,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){sn(t)||nn(8),an(t)&&(t=Fn(t));var e=Nn(this),o=Pn(this,t,void 0);return o[$n].C=!0,Cn(e),o},e.finishDraft=function(t,e){var o=(t&&t[$n]).A;return Sn(o,e),Rn(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!jn&&nn(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var r=e[o];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}o>-1&&(e=e.slice(o+1));var i=On("Patches").$;return an(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),ta=new Qn,ea=ta.produce;function oa(t){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(t)}function ra(t){var e=function(t,e){if("object"!==oa(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!==oa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===oa(e)?e:String(e)}function ia(t,e,o){return(e=ra(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function na(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function aa(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?na(Object(o),!0).forEach((function(e){ia(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):na(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function sa(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ta.produceWithPatches.bind(ta),ta.setAutoFreeze.bind(ta),ta.setUseProxies.bind(ta),ta.applyPatches.bind(ta),ta.createDraft.bind(ta),ta.finishDraft.bind(ta);var ca="function"==typeof Symbol&&Symbol.observable||"@@observable",la=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+la(),REPLACE:"@@redux/REPLACE"+la(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+la()}};function ua(t,e,o){var r;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(sa(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(sa(1));return o(ua)(t,e)}if("function"!=typeof t)throw new Error(sa(2));var i=t,n=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(sa(3));return n}function u(t){if("function"!=typeof t)throw new Error(sa(4));if(c)throw new Error(sa(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(sa(6));e=!1,l();var o=s.indexOf(t);s.splice(o,1),a=null}}}function h(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(sa(7));if(void 0===t.type)throw new Error(sa(8));if(c)throw new Error(sa(9));try{c=!0,n=i(n,t)}finally{c=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return h({type:fa.INIT}),(r={dispatch:h,subscribe:u,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(sa(10));i=t,h({type:fa.REPLACE})}})[ca]=function(){var t,e=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(sa(11));function o(){t.next&&t.next(f())}return o(),{unsubscribe:e(o)}}})[ca]=function(){return this},t},r}function ha(t){for(var e=Object.keys(t),o={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(o[i]=t[i])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:fa.INIT}))throw new Error(sa(12));if(void 0===o(void 0,{type:fa.PROBE_UNKNOWN_ACTION()}))throw new Error(sa(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var r=!1,i={},s=0;s<a.length;s++){var c=a[s],l=o[c],f=t[c],u=l(f,e);if(void 0===u)throw e&&e.type,new Error(sa(14));i[c]=u,r=r||u!==f}return(r=r||a.length!==Object.keys(t).length)?i:t}}function da(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function pa(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),r=function(){throw new Error(sa(15))},i={getState:o.getState,dispatch:function(){return r.apply(void 0,arguments)}},n=e.map((function(t){return t(i)}));return r=da.apply(void 0,n)(o.dispatch),aa(aa({},o),{},{dispatch:r})}}}function ga(t){return function(e){var o=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(o,r,t):e(i)}}}}var ya=ga();ya.withExtraArgument=ga;var ba,ma=ya,va=(ba=function(t,e){return ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},ba(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ba(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Oa=function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},wa=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},Sa=Object.defineProperty,xa=Object.defineProperties,Ca=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,Ra=Object.prototype.propertyIsEnumerable,Ia=function(t,e,o){return e in t?Sa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},La=function(t,e){for(var o in e||(e={}))Ea.call(e,o)&&Ia(t,o,e[o]);if(Na)for(var r=0,i=Na(e);r<i.length;r++){o=i[r];Ra.call(e,o)&&Ia(t,o,e[o])}return t},Ua=function(t,e){return xa(t,Ca(e))},ka="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?da:da.apply(null,arguments)};var Wa=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return va(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,wa([void 0],t[0].concat(this)))):new(e.bind.apply(e,wa([void 0],t.concat(this))))},e}(Array),Aa=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return va(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,wa([void 0],t[0].concat(this)))):new(e.bind.apply(e,wa([void 0],t.concat(this))))},e}(Array);function Ba(t){return sn(t)?ea(t,(function(){})):t}function Pa(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new Wa;o&&(!function(t){return"boolean"==typeof t}(o)?r.push(ma.withExtraArgument(o.extraArgument)):r.push(ma));return r}(t)}}function Fa(t){var e,o=Pa(),r=t||{},i=r.reducer,n=void 0===i?void 0:i,a=r.middleware,s=void 0===a?o():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,u=void 0===f?void 0:f,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=ha(n)}var p=s;"function"==typeof p&&(p=p(o));var g=pa.apply(void 0,p),y=da;l&&(y=ka(La({trace:!1},"object"==typeof l&&l)));var b=new Aa(g),m=b;return Array.isArray(d)?m=wa([g],d):"function"==typeof d&&(m=d(b)),ua(e,u,y.apply(void 0,m))}function _a(t,e){function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return La(La({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function Ta(t){var e,o={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[o,r,e]}function Da(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,r="function"==typeof t.initialState?t.initialState:Ba(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};function l(){var e="function"==typeof t.extraReducers?Ta(t.extraReducers):[t.extraReducers],o=e[0],i=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,c=e[2],l=void 0===c?void 0:c,f=La(La({},i),s);return function(t,e,o,r){void 0===o&&(o=[]);var i,n="function"==typeof e?Ta(e):[e,o,r],a=n[0],s=n[1],c=n[2];if(function(t){return"function"==typeof t}(t))i=function(){return Ba(t())};else{var l=Ba(t);i=function(){return l}}function f(t,e){void 0===t&&(t=i());var o=wa([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[c]),o.reduce((function(t,o){if(o){var r;if(an(t))return void 0===(r=o(t,e))?t:r;if(sn(t))return ea(t,(function(t){return o(t,e)}));if(void 0===(r=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=i,f}(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var o=0,r=a;o<r.length;o++){var i=r[o];t.addMatcher(i.matcher,i.reducer)}l&&t.addDefaultCase(l)}))}return n.forEach((function(t){var o,r,n=i[t],l=e+"/"+t;"reducer"in n?(o=n.reducer,r=n.prepare):o=n,a[t]=o,s[l]=o,c[t]=r?_a(l,r):_a(l)})),{name:e,reducer:function(t,e){return o||(o=l()),o(t,e)},actions:c,caseReducers:a,getInitialState:function(){return o||(o=l()),o.getInitialState()}}}var Ma=["name","message","stack","code"],za=function(t,e){this.payload=t,this.meta=e},Ka=function(t,e){this.payload=t,this.meta=e},ja=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,r=Ma;o<r.length;o++){var i=r[o];"string"==typeof t[i]&&(e[i]=t[i])}return e}return{message:String(t)}};function Ha(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var r=_a(t+"/fulfilled",(function(t,e,o,r){return{payload:t,meta:Ua(La({},r||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),i=_a(t+"/pending",(function(t,e,o){return{payload:void 0,meta:Ua(La({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=_a(t+"/rejected",(function(t,e,r,i,n){return{payload:i,error:(o&&o.serializeError||ja)(t||"Rejected"),meta:Ua(La({},n||{}),{arg:r,requestId:e,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,c,l){var f,u=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new a;function d(t){f=t,h.abort()}var p=function(){return a=this,p=null,g=function(){var a,p,g,y,b,m;return Oa(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),y=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:c,extra:l}),null===(O=y)||"object"!=typeof O||"function"!=typeof O.then?[3,2]:[4,y];case 1:y=v.sent(),v.label=2;case 2:if(!1===y||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(i(u,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:u,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:c,extra:l,requestId:u,signal:h.signal,abort:d,rejectWithValue:function(t,e){return new za(t,e)},fulfillWithValue:function(t,e){return new Ka(t,e)}})).then((function(e){if(e instanceof za)throw e;return e instanceof Ka?r(e.payload,u,t,e.meta):r(e,u,t)}))])];case 3:return g=v.sent(),[3,5];case 4:return m=v.sent(),g=m instanceof za?n(null,u,t,m.payload,m.meta):n(m,u,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(g)&&g.meta.condition||s(g),[2,g]}var O}))},new Promise((function(t,e){var o=function(t){try{i(g.next(t))}catch(t){e(t)}},r=function(t){try{i(g.throw(t))}catch(t){e(t)}},i=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,r)};i((g=g.apply(a,p)).next())}));var a,p,g}();return Object.assign(p,{abort:d,requestId:u,arg:t,unwrap:function(){return p.then(Ha)}})}}),{pending:i,rejected:n,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Za="listenerMiddleware";_a(Za+"/add"),_a(Za+"/removeAll"),_a(Za+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=i[t];return o?o.enumerable=e:i[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[$n];return Jn.get(e,t)},set:function(e){var o=this[$n];Jn.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][$n];if(!i.P)switch(i.i){case 5:r(i)&&An(i);break;case 4:o(i)&&An(i)}}}function o(t){for(var e=t.t,o=t.k,r=Vn(o),i=r.length-1;i>=0;i--){var n=r[i];if(n!==$n){var a=e[n];if(void 0===a&&!fn(e,n))return!0;var s=o[n],c=s&&s[$n];if(c?c.t!==a:!hn(s,a))return!0}}var l=!!e[$n];return r.length!==Vn(e).length+(l?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){Yn[t]||(Yn[t]=e)}("ES5",{J:function(e,o){var r=Array.isArray(e),i=function(e,o){if(e){for(var r=Array(o.length),i=0;i<o.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var n=qn(o);delete n[$n];for(var a=Vn(n),s=0;s<a.length;s++){var c=a[s];n[c]=t(c,e||!!n[c].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(r,e),n={i:r?5:4,A:o?o.A:wn(),P:!1,I:!1,R:{},l:o,t:e,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,$n,{value:n,writable:!0}),i},S:function(t,o,i){i?an(o)&&o[$n].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[$n];if(o){var i=o.t,n=o.k,a=o.R,s=o.i;if(4===s)cn(n,(function(e){e!==$n&&(void 0!==i[e]||fn(i,e)?a[e]||t(n[e]):(a[e]=!0,An(o)))})),cn(i,(function(t){void 0!==n[t]||fn(n,t)||(a[t]=!1,An(o))}));else if(5===s){if(r(o)&&(An(o),a.length=!0),n.length<i.length)for(var c=n.length;c<i.length;c++)a[c]=!1;else for(var l=i.length;l<n.length;l++)a[l]=!0;for(var f=Math.min(n.length,i.length),u=0;u<f;u++)n.hasOwnProperty(u)||(a[u]=!0),void 0===a[u]&&t(n[u])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class $a{static get(t){var e;const o="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,i=window.ftReduxStores[o];if(Yi(i))return i;if(null==r)return;const n=Da({...r,reducers:null!==(e=r.reducers)&&void 0!==e?e:{}}),a=Fa({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?n.getInitialState():"string"==typeof e.type&&e.type.startsWith("DEFAULT_VALUE_SETTER__")?{...t,...e.overwrites}:n.reducer(t,e)});return window.ftReduxStores[r.name]=new $a(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new qi,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const r=e,i=t[r];return i?(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[r]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var Ga=Object.freeze({__proto__:null,FtCommandQueue:qi,FtLitElementRedux:rn,FtReduxStore:$a,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))Yi(e)&&e.clear()},isFtReduxStore:Yi,redux:Vi,reduxEventListener:t=>(e,o)=>{const r=e.constructor;r.reduxEventListeners=new Map(r.reduxEventListeners),r.reduxEventListeners.set(o,t)},reduxReactive:()=>(t,e)=>{var o;const r=t.constructor;r.reduxReactiveProperties=new Set(r.reduxReactiveProperties),null===(o=r.reduxReactiveProperties)||void 0===o||o.add(e)}});var Va=Object.freeze({__proto__:null,serializeRequest:function(t,e){var o,r,i,n;const a=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all"});if((null===(r=e.query)||void 0===r?void 0:r.length)>0&&a.append("query",e.query),e.scope&&"DEFAULT"!==e.scope&&a.append("scope",e.scope.toLowerCase()),e.virtualField&&a.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let t=e.periodFilter.period;const o=t?`_${t.from}_${t.to}`:"";a.append("period",e.periodFilter.periodType.toLowerCase()+o)}if((null===(i=e.sort)||void 0===i?void 0:i.length)>0&&"ft:lastEdition"===e.sort[0].key&&a.append("sort","last_update"),(null===(n=e.filters)||void 0===n?void 0:n.length)>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");a.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${a.toString()}`).href}});const qa=Symbol("elementInternals");var Ya,Ja,Xa,Qa,ts=Object.freeze({__proto__:null,toFtFormComponent:function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[qa].form}constructor(...t){super(t),this[qa]=this.attachInternals(),this[qa].role=e}setFormValue(t){this[qa].setFormValue(t)}}}});const es=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Xa=null===(Ja=null===(Ya=window.safari)||void 0===Ya?void 0:Ya.pushNotification)||void 0===Ja?void 0:Ja.toString())&&void 0!==Xa?Xa:""),os="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=null!==(Qa=window.ftGlobals)&&void 0!==Qa?Qa:{lit:me,litDecorators:Ce,litRepeat:_e,litClassMap:De,litStyleMap:je,litUnsafeHTML:$e,wcUtils:{...Xe,...Ye,...to,...oo,...uo,...yr,...Or,...Si,...pr,...Ai,...Bi,...so,...Mi,...Hi,...Zi,...Gi,...Ga,...Ri,...Va,...ts,isSafari:es,isTouchScreen:os}};class rs{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,o){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,o)),null==t.tocId?this.extractPagesToc(t.children,e,o):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,o){return t.flatMap((t=>{var r,i,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(r=t.pageToc)&&void 0!==r?r:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(i=t.prettyUrl)||void 0===i?void 0:i.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:o,children:[]};this.register(s);const c=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),l=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...c,...l],[s]}))}convertSectionNodes(t,e,o){return t.flatMap((t=>{var r;let i=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const n={...t,prettyUrl:i,depth:e,parentTocId:o,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var o,r,i,n,a,s;const c={number:this.pages.length+1,title:null!==(o=t.title)&&void 0!==o?o:"",rootTocId:null!==(r=t.tocId)&&void 0!==r?r:"root",toc:(null!==(i=t.pageToc)&&void 0!==i?i:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},l=(t,e)=>(e?c.topics:c.hiddenTopics).push(t),f=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return c.breadcrumb.forEach(((t,e)=>{l(t,f[e])})),t.tocId&&l(t.tocId,t.pageConfiguration.isVisible),c.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),c}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class is{convertPaginatedToc(t){return new rs(t).build()}}var ns,as,ss,cs,ls,fs,us,hs,ds,ps,gs,ys,bs,ms,vs,Os,ws,Ss;!function(t){!function(e){var o={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function u(t){var e=new FileReader,o=f(e);return e.readAsArrayBuffer(t),o}function h(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=h(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=h(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=l(this);if(t)return t;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?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=f(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),r=0;r<e.length;r++)o[r]=String.fromCharCode(e[r]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},c.prototype.delete=function(t){delete this.map[n(t)]},c.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},c.prototype.set=function(t,e){this.map[n(t)]=a(e)},c.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},c.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,e){var o,r,i=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(o=e.method||this.method||"GET",r=o.toUpperCase(),p.indexOf(r)>-1?r:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),r=o.shift().replace(/\+/g," "),i=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},d.call(g.prototype),d.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,r){return new Promise((function(i,n){var a=new g(t,r);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),r=o.shift().trim();if(r){var i=o.join(":").trim();e.append(r,i)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new b(r,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=c,t.Request=g,t.Response=b),e.Headers=c,e.Request=g,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(ns||(ns={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(as||(as={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(ss||(ss={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(cs||(cs={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(ls||(ls={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(fs||(fs={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(us||(us={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(hs||(hs={})),function(t){t.ASC="ASC",t.DESC="DESC"}(ds||(ds={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(ps||(ps={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(gs||(gs={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(ys||(ys={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(bs||(bs={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(ms||(ms={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(vs||(vs={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Os||(Os={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(ws||(ws={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Ss||(Ss={}));const xs={[ws.PERSONAL_BOOK_SHARE_USER]:[ws.PERSONAL_BOOK_USER],[ws.HTML_EXPORT_USER]:[ws.PERSONAL_BOOK_USER],[ws.PDF_EXPORT_USER]:[ws.PERSONAL_BOOK_USER],[ws.KHUB_ADMIN]:[ws.CONTENT_PUBLISHER],[ws.ADMIN]:[ws.KHUB_ADMIN,ws.USERS_ADMIN,ws.PORTAL_ADMIN],[ws.DEVELOPER]:[ws.BETA_USER,ws.DEBUG_USER]};function Cs(t,e){return t===e||(xs[t]??[]).some((t=>Cs(t,e)))}function Ns(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>Cs(t,e)))}var Es;t.FtReaderFeatures=void 0,(Es=t.FtReaderFeatures||(t.FtReaderFeatures={})).FEEDBACK="FEEDBACK",Es.RATING="RATING",Es.PRINT="PRINT",Es.BOOKMARK="BOOKMARK",Es.COLLECTIONS="COLLECTIONS",Es.PERSONAL_BOOKS="PERSONAL_BOOKS";const Rs=ut`
|
|
179
179
|
`,Is=$a.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1}});class Ls{static get(t){const{baseUrl:e,apiIntegrationIdentifier:o}=Is.getState(),r=null!=t?t:o;if(e&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,r,!0)}static await(t){return new Promise((e=>{let o=Ls.get(t);if(o)e(o);else{const r=Is.subscribe((()=>{o=Ls.get(t),o&&(r(),e(o))}))}}))}}class Us{constructor(t=!0,e){var o;this.overrideApi=e;let r=this.constructor;r.commonCache=null!==(o=r.commonCache)&&void 0!==o?o:new Je,this.cache=t?r.commonCache:new Je}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:Ls.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:Ls.await()}clearCache(){this.cache.clearAll()}}var ks;const Ws=Symbol("clearAfterUnitTest");class As extends Us{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ks]=()=>{this.defaultMessages={},this.cache=new Je,this.listeners={}},this.currentUiLocale=Is.getState().uiLocale,Is.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Is.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};ao(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var r,i,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(i=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==i?i:{};return new $i(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>ro(0).then((()=>t())).catch((()=>null)))))}}ks=Ws,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends As{constructor(){super((async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends As{constructor(){super((async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e)))}});const Bs=window.FluidTopicsI18nService;var Ps=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Fs extends Wi{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ls.get(),this.cache=new Je,this.cleanSessionDebouncer=new eo}render(){return Yt`
|
|
180
180
|
<slot></slot>
|
|
181
181
|
`}update(t){super.update(t),t.has("baseUrl")&&(Is.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&Is.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Is.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&Is.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&Is.actions.noCustom(this.noCustom),t.has("editorMode")&&Is.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&Is.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&Is.actions.session(this.session),t.has("availableUiLocales")&&Is.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Bs.addContext(t))),t.has("openExternalDocumentInNewTab")&&Is.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}Fs.elementDefinitions={},Fs.styles=Rs,Ps([we()],Fs.prototype,"baseUrl",void 0),Ps([we()],Fs.prototype,"apiIntegrationIdentifier",void 0),Ps([we()],Fs.prototype,"uiLocale",void 0),Ps([lo(null)],Fs.prototype,"availableUiLocales",void 0),Ps([lo(null)],Fs.prototype,"metadataConfiguration",void 0),Ps([we({type:Boolean})],Fs.prototype,"editorMode",void 0),Ps([we({type:Boolean})],Fs.prototype,"noCustom",void 0),Ps([we({type:Boolean})],Fs.prototype,"openExternalDocumentInNewTab",void 0),Ps([we({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Fs.prototype,"noCustomComponent",void 0),Ps([we({type:Boolean})],Fs.prototype,"withManualResources",void 0),Ps([lo([])],Fs.prototype,"messageContexts",void 0),Ps([lo(void 0)],Fs.prototype,"session",void 0),Ps([we({type:Object})],Fs.prototype,"apiProvider",void 0);class _s extends Us{async listMySearches(){let t=Is.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class Ts extends Us{async listMyBookmarks(){let t=Is.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const Ds=$a.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const Ms=new class{constructor(){this.currentSession=Is.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ts,this.savedSearchesService=new _s,Is.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Is.getState();ao(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ds.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ds.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();Ds.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Ds.actions.bookmarks(e)}}};co("ft-app-context")(Fs);class zs extends Us{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,o){super(!1,e),this.converter=t,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return Ns(null!==(e=null===(t=Is.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getAttachments(){return this.cache.get("map-attachments",(()=>this.fetchAttachments()))}getRelativesForDocument(t,e){return this.cache.get("document-relatives-"+t+"-"+e.join("-"),(()=>this.fetchRelativesForDocument(t,e)))}getRelativesForTopicInMap(t,e,o){return this.cache.get("topic-relatives-"+[t,e,...o].join("-"),(()=>this.fetchRelativesForTopicInMap(t,e,o)))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,e,o){const r=this.getNavigationData(t,e,o),i=this.getReaderLinkPrefix()+(r.prettyUrl?r.prettyUrl:`${r.mapId}/${r.tocId}`),n=new URL(i,this.api.tenantBaseUrl);return null!=r.page&&n.searchParams.set("page",`${r.page}`),r.prettyUrlDuplicated&&n.searchParams.set("tocId",r.tocId),null!=r.section&&n.searchParams.set("section",r.section),n.href}getNavigationData(t,e,o){var r,i;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],c=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(r=null==s?void 0:s.title)&&void 0!==r?r:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=c?c.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(i=null==n?void 0:n.duplicatedPrettyUrls.has(null!=c?c:""))&&void 0!==i&&i,section:o}}async getAccurateNavigationData(t,e,o){return await this.getEnrichedToc(),this.getNavigationData(t,e,o)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var o;return e?{type:e.topics.type,rating:null===(o=e.topics)||void 0===o?void 0:o.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,o){return this.makeRateTopicRequest(t,e,o).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=Is.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,o){return this.makeTopicFeedbackRequest(t,e,o)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),o=[{tocId:e.tocId,title:e.title}],r=this.getTocNodeNow(e.parentTocId);for(;r;)o.unshift({tocId:r.tocId,title:r.title}),r=this.getTocNodeNow(r.parentTocId);return o}isFeatureAccessible(e,{session:o,ratingType:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case t.FtReaderFeatures.FEEDBACK:return Ns(null!=o?o:[],ws.FEEDBACK_USER);case t.FtReaderFeatures.RATING:return Ns(null!=o?o:[],ws.RATING_USER)&&null!=r&&r!==us.NO_RATING;case t.FtReaderFeatures.PRINT:return Ns(null!=o?o:[],ws.PRINT_USER);case t.FtReaderFeatures.BOOKMARK:return!!(null==o?void 0:o.sessionAuthenticated);case t.FtReaderFeatures.COLLECTIONS:return Ns(null!=o?o:[],ws.COLLECTION_USER);case t.FtReaderFeatures.PERSONAL_BOOKS:return Ns(null!=o?o:[],ws.PERSONAL_BOOK_USER)&&!(null===(i=this.getMapNow())||void 0===i?void 0:i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}}class Ks extends zs{static async build(t){return new Ks(new is,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const e=await this.api.getMap(t);return this.fingerprint=e.fingerprint,e}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch((()=>[]))}fetchRelativesForDocument(t,e){return this.api.search({query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",filters:[{negative:!1,values:e,key:t}],sort:[],facets:[]})}fetchRelativesForTopicInMap(t,e,o){return this.api.search({query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",filters:[{negative:!1,values:o,key:e},{negative:!1,values:[t],key:"ft:publicationId"}],sort:[],facets:[]})}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,o){return this.api.rateTopic(this.mapId,t,e,o)}makeTopicFeedbackRequest(t,e,o){return this.api.sendTopicFeedback(this.mapId,t,e,o)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class js{static build(t,e){return new js((t=>$a.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}}))(t.trim()||"context"),null!=e?e:Ks.build)}constructor(t,e,o){this.store=t,this.clusteringHelperProvider=o,this.metadataForSwitchToRelatives=new Set,this.loadDebouncer=new eo(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return io((()=>this.service))}async navigateToTopic(t,e,o){const r=await this.awaitService(),i=await(null!=o?r.getPage(o):r.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(i),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,i),section:e})}resolveValidNonRootTocId(t,e){var o,r,i;let n=null!==(o="root"===t?void 0:t)&&void 0!==o?o:e.rootTocId;return e.topics.includes(n)?n:null!==(i=null!==(r=e.topics[0])&&void 0!==r?r:e.hiddenTopics[0])&&void 0!==i?i:"root"}async navigateToPage(t){const e=await this.awaitService();let o=await e.getPage(t);this.store.actions.currentPage(o)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;(null===(t=this.service)||void 0===t?void 0:t.mapId)&&null==this.store.getState().map&&await this.loadDebouncer.run((()=>this.fetchData()))}clear(){var t;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),null===(t=this.service)||void 0===t||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,e,o,r,i;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(i=this.service)||void 0===i?void 0:i.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))]).then((()=>{this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}))}catch(t){!this.errorHandler||t instanceof Ge||this.errorHandler(t)}}fetchRelatives(){var t,e,o;const r=null===(t=this.store.getState().map)||void 0===t?void 0:t.metadata.filter((t=>{var e;return t.key==(null===(e=this.store.getState().configuration)||void 0===e?void 0:e.relativePivotMetadata)})).flatMap((t=>t.values));void 0!==r&&r.length>0?null===(e=this.service)||void 0===e||e.getRelativesForDocument(null===(o=this.store.getState().configuration)||void 0===o?void 0:o.relativePivotMetadata,r).then((t=>{const e=t.results.flatMap((t=>t.entries));this.store.actions.relatives(e),this.updateClusteringHelper()})):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.eventBus.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,e;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let o=this.store.getState().relatives;if(o){let r=o.find((t=>{var e;return(null===(e=t.map)||void 0===e?void 0:e.mapId)==this.store.getState().mapId})),i=null!==(e=null===(t=Is.getState().metadataConfiguration)||void 0===t?void 0:t.descriptors)&&void 0!==e?e:[];return new Qe(o,r,this.metadataForSwitchToRelatives,i)}}async navigateToRelativeTopicIfFound(t){var e,o,r;const i=await io((()=>{var t;return null===(t=this.store.getState().configuration)||void 0===t?void 0:t.relativeTopicPivotMetadata})),n=this.store.getState().mapId,a=await this.awaitService(),s=await a.getRelativesForTopicInMap(n,i,[t]);if(null===(r=null===(o=null===(e=null==s?void 0:s.results)||void 0===e?void 0:e[0])||void 0===o?void 0:o.entries)||void 0===r?void 0:r[0]){const t=s.results[0].entries[0].topic.tocId;return await this.navigateToTopic(t),!0}return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),null==this.store.getState().relatives?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}}const Hs=ut`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-context",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.64",
|
|
4
4
|
"description": "Context block for integrated reader components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.1.64",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.1.64",
|
|
24
24
|
"@reduxjs/toolkit": "^1.6.2",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
28
|
+
"@fluid-topics/public-api": "1.0.65"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "de93ae28828fb464cab528f90580b63cdbbb195b"
|
|
31
31
|
}
|