@fluid-topics/ft-reader-content 2.0.33 → 2.0.34

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,4 +1,4 @@
1
- "use strict";(()=>{var Os=Object.create;var qo=Object.defineProperty;var As=Object.getOwnPropertyDescriptor;var Es=Object.getOwnPropertyNames;var ws=Object.getPrototypeOf,Is=Object.prototype.hasOwnProperty;var Je=(o,e)=>()=>{try{return e||o((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Ts=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Es(e))!Is.call(o,a)&&a!==r&&qo(o,a,{get:()=>e[a],enumerable:!(n=As(e,a))||n.enumerable});return o};var C=(o,e,r)=>(r=o!=null?Os(ws(o)):{},Ts(e||!o||!o.__esModule?qo(r,"default",{value:o,enumerable:!0}):r,o));var L=Je((Mc,Yo)=>{Yo.exports=ftGlobals.wcUtils});var j=Je((Fc,Qo)=>{Qo.exports=ftGlobals.lit});var J=Je((Uc,Xo)=>{Xo.exports=ftGlobals.litDecorators});var jr=Je(($c,rn)=>{rn.exports=ftGlobals.litRepeat});var nn=Je((Wc,on)=>{on.exports=ftGlobals.litUnsafeHTML});var Cn=Je((Ee,Sn)=>{var Zt=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,qt=(function(){function o(){this.fetch=!1,this.DOMException=Zt.DOMException}return o.prototype=Zt,new o})();(function(o){var e=(function(r){var n=typeof o<"u"&&o||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function s(f){return f&&DataView.prototype.isPrototypeOf(f)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(f){return f&&c.indexOf(Object.prototype.toString.call(f))>-1};function u(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(f)||f==="")throw new TypeError('Invalid character in header field name: "'+f+'"');return f.toLowerCase()}function p(f){return typeof f!="string"&&(f=String(f)),f}function h(f){var g={next:function(){var E=f.shift();return{done:E===void 0,value:E}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function y(f){this.map={},f instanceof y?f.forEach(function(g,E){this.append(E,g)},this):Array.isArray(f)?f.forEach(function(g){if(g.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+g.length);this.append(g[0],g[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(g){this.append(g,f[g])},this)}y.prototype.append=function(f,g){f=u(f),g=p(g);var E=this.map[f];this.map[f]=E?E+", "+g:g},y.prototype.delete=function(f){delete this.map[u(f)]},y.prototype.get=function(f){return f=u(f),this.has(f)?this.map[f]:null},y.prototype.has=function(f){return this.map.hasOwnProperty(u(f))},y.prototype.set=function(f,g){this.map[u(f)]=p(g)},y.prototype.forEach=function(f,g){for(var E in this.map)this.map.hasOwnProperty(E)&&f.call(g,this.map[E],E,this)},y.prototype.keys=function(){var f=[];return this.forEach(function(g,E){f.push(E)}),h(f)},y.prototype.values=function(){var f=[];return this.forEach(function(g){f.push(g)}),h(f)},y.prototype.entries=function(){var f=[];return this.forEach(function(g,E){f.push([E,g])}),h(f)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function m(f){if(!f._noBody){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}}function x(f){return new Promise(function(g,E){f.onload=function(){g(f.result)},f.onerror=function(){E(f.error)}})}function b(f){var g=new FileReader,E=x(g);return g.readAsArrayBuffer(f),E}function S(f){var g=new FileReader,E=x(g),k=/charset=([A-Za-z0-9_-]+)/.exec(f.type),F=k?k[1]:"utf-8";return g.readAsText(f,F),E}function w(f){for(var g=new Uint8Array(f),E=new Array(g.length),k=0;k<g.length;k++)E[k]=String.fromCharCode(g[k]);return E.join("")}function I(f){if(f.slice)return f.slice(0);var g=new Uint8Array(f.byteLength);return g.set(new Uint8Array(f)),g.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(f){this.bodyUsed=this.bodyUsed,this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:a.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:a.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():a.arrayBuffer&&a.blob&&s(f)?(this._bodyArrayBuffer=I(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||d(f))?this._bodyArrayBuffer=I(f):this._bodyText=f=Object.prototype.toString.call(f):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var f=m(this);return f||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(f){var g=f.toUpperCase();return D.indexOf(g)>-1?g:f}function $(f,g){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var E=g.body;if(f instanceof $){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,g.headers||(this.headers=new y(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!E&&f._bodyInit!=null&&(E=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new y(g.headers)),this.method=_(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal||(function(){if("AbortController"in n){var R=new AbortController;return R.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var k=/([?&])_=[^&]*/;if(k.test(this.url))this.url=this.url.replace(k,"$1_="+new Date().getTime());else{var F=/\?/;this.url+=(F.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function ue(f){var g=new FormData;return f.trim().split("&").forEach(function(E){if(E){var k=E.split("="),F=k.shift().replace(/\+/g," "),R=k.join("=").replace(/\+/g," ");g.append(decodeURIComponent(F),decodeURIComponent(R))}}),g}function Ne(f){var g=new y,E=f.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(k){return k.indexOf(`
1
+ "use strict";(()=>{var Os=Object.create;var qo=Object.defineProperty;var As=Object.getOwnPropertyDescriptor;var Es=Object.getOwnPropertyNames;var ws=Object.getPrototypeOf,Is=Object.prototype.hasOwnProperty;var Je=(o,e)=>()=>{try{return e||o((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Ts=(o,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Es(e))!Is.call(o,a)&&a!==r&&qo(o,a,{get:()=>e[a],enumerable:!(n=As(e,a))||n.enumerable});return o};var C=(o,e,r)=>(r=o!=null?Os(ws(o)):{},Ts(e||!o||!o.__esModule?qo(r,"default",{value:o,enumerable:!0}):r,o));var L=Je((Mc,Yo)=>{Yo.exports=ftGlobals.wcUtils});var j=Je((Fc,Qo)=>{Qo.exports=ftGlobals.lit});var J=Je((Uc,Xo)=>{Xo.exports=ftGlobals.litDecorators});var jr=Je(($c,rn)=>{rn.exports=ftGlobals.litRepeat});var nn=Je((Wc,on)=>{on.exports=ftGlobals.litUnsafeHTML});var Cn=Je((Ee,Sn)=>{var Zt=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,qt=(function(){function o(){this.fetch=!1,this.DOMException=Zt.DOMException}return o.prototype=Zt,new o})();(function(o){var e=(function(r){var n=typeof o<"u"&&o||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function s(f){return f&&DataView.prototype.isPrototypeOf(f)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(f){return f&&c.indexOf(Object.prototype.toString.call(f))>-1};function u(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(f)||f==="")throw new TypeError('Invalid character in header field name: "'+f+'"');return f.toLowerCase()}function p(f){return typeof f!="string"&&(f=String(f)),f}function h(f){var g={next:function(){var E=f.shift();return{done:E===void 0,value:E}}};return a.iterable&&(g[Symbol.iterator]=function(){return g}),g}function y(f){this.map={},f instanceof y?f.forEach(function(g,E){this.append(E,g)},this):Array.isArray(f)?f.forEach(function(g){if(g.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+g.length);this.append(g[0],g[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(g){this.append(g,f[g])},this)}y.prototype.append=function(f,g){f=u(f),g=p(g);var E=this.map[f];this.map[f]=E?E+", "+g:g},y.prototype.delete=function(f){delete this.map[u(f)]},y.prototype.get=function(f){return f=u(f),this.has(f)?this.map[f]:null},y.prototype.has=function(f){return this.map.hasOwnProperty(u(f))},y.prototype.set=function(f,g){this.map[u(f)]=p(g)},y.prototype.forEach=function(f,g){for(var E in this.map)this.map.hasOwnProperty(E)&&f.call(g,this.map[E],E,this)},y.prototype.keys=function(){var f=[];return this.forEach(function(g,E){f.push(E)}),h(f)},y.prototype.values=function(){var f=[];return this.forEach(function(g){f.push(g)}),h(f)},y.prototype.entries=function(){var f=[];return this.forEach(function(g,E){f.push([E,g])}),h(f)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function m(f){if(!f._noBody){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}}function v(f){return new Promise(function(g,E){f.onload=function(){g(f.result)},f.onerror=function(){E(f.error)}})}function b(f){var g=new FileReader,E=v(g);return g.readAsArrayBuffer(f),E}function S(f){var g=new FileReader,E=v(g),k=/charset=([A-Za-z0-9_-]+)/.exec(f.type),F=k?k[1]:"utf-8";return g.readAsText(f,F),E}function w(f){for(var g=new Uint8Array(f),E=new Array(g.length),k=0;k<g.length;k++)E[k]=String.fromCharCode(g[k]);return E.join("")}function I(f){if(f.slice)return f.slice(0);var g=new Uint8Array(f.byteLength);return g.set(new Uint8Array(f)),g.buffer}function T(){return this.bodyUsed=!1,this._initBody=function(f){this.bodyUsed=this.bodyUsed,this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:a.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:a.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():a.arrayBuffer&&a.blob&&s(f)?(this._bodyArrayBuffer=I(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||d(f))?this._bodyArrayBuffer=I(f):this._bodyText=f=Object.prototype.toString.call(f):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var f=m(this);return f||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var f=m(this);if(f)return f;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(w(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(f){var g=f.toUpperCase();return D.indexOf(g)>-1?g:f}function $(f,g){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var E=g.body;if(f instanceof $){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,g.headers||(this.headers=new y(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!E&&f._bodyInit!=null&&(E=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new y(g.headers)),this.method=_(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal||(function(){if("AbortController"in n){var R=new AbortController;return R.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&E)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(E),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var k=/([?&])_=[^&]*/;if(k.test(this.url))this.url=this.url.replace(k,"$1_="+new Date().getTime());else{var F=/\?/;this.url+=(F.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function ue(f){var g=new FormData;return f.trim().split("&").forEach(function(E){if(E){var k=E.split("="),F=k.shift().replace(/\+/g," "),R=k.join("=").replace(/\+/g," ");g.append(decodeURIComponent(F),decodeURIComponent(R))}}),g}function Ne(f){var g=new y,E=f.replace(/\r?\n[\t ]+/g," ");return E.split("\r").map(function(k){return k.indexOf(`
2
2
  `)===0?k.substr(1,k.length):k}).forEach(function(k){var F=k.split(":"),R=F.shift().trim();if(R){var $t=F.join(":").trim();try{g.append(R,$t)}catch(zr){console.warn("Response "+zr.message)}}}),g}T.call($.prototype);function X(f,g){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new y(g.headers),this.url=g.url||"",this._initBody(f)}T.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},X.error=function(){var f=new X(null,{status:200,statusText:""});return f.ok=!1,f.status=0,f.type="error",f};var Pe=[301,302,303,307,308];X.redirect=function(f,g){if(Pe.indexOf(g)===-1)throw new RangeError("Invalid status code");return new X(null,{status:g,headers:{location:f}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(g,E){this.message=g,this.name=E;var k=Error(g);this.stack=k.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Xe(f,g){return new Promise(function(E,k){var F=new $(f,g);if(F.signal&&F.signal.aborted)return k(new r.DOMException("Aborted","AbortError"));var R=new XMLHttpRequest;function $t(){R.abort()}R.onload=function(){var W={statusText:R.statusText,headers:Ne(R.getAllResponseHeaders()||"")};F.url.indexOf("file://")===0&&(R.status<200||R.status>599)?W.status=200:W.status=R.status,W.url="responseURL"in R?R.responseURL:W.headers.get("X-Request-URL");var De="response"in R?R.response:R.responseText;setTimeout(function(){E(new X(De,W))},0)},R.onerror=function(){setTimeout(function(){k(new TypeError("Network request failed"))},0)},R.ontimeout=function(){setTimeout(function(){k(new TypeError("Network request timed out"))},0)},R.onabort=function(){setTimeout(function(){k(new r.DOMException("Aborted","AbortError"))},0)};function zr(W){try{return W===""&&n.location.href?n.location.href:W}catch{return W}}if(R.open(F.method,zr(F.url),!0),F.credentials==="include"?R.withCredentials=!0:F.credentials==="omit"&&(R.withCredentials=!1),"responseType"in R&&(a.blob?R.responseType="blob":a.arrayBuffer&&(R.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof y||n.Headers&&g.headers instanceof n.Headers)){var Zo=[];Object.getOwnPropertyNames(g.headers).forEach(function(W){Zo.push(u(W)),R.setRequestHeader(W,p(g.headers[W]))}),F.headers.forEach(function(W,De){Zo.indexOf(De)===-1&&R.setRequestHeader(De,W)})}else F.headers.forEach(function(W,De){R.setRequestHeader(De,W)});F.signal&&(F.signal.addEventListener("abort",$t),R.onreadystatechange=function(){R.readyState===4&&F.signal.removeEventListener("abort",$t)}),R.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return Xe.polyfill=!0,n.fetch||(n.fetch=Xe,n.Headers=y,n.Request=$,n.Response=X),r.Headers=y,r.Request=$,r.Response=X,r.fetch=Xe,r})({})})(qt);qt.fetch.ponyfill=!0;delete qt.fetch.polyfill;var ot=Zt.fetch?Zt:qt;Ee=ot.fetch;Ee.default=ot.fetch;Ee.fetch=ot.fetch;Ee.Headers=ot.Headers;Ee.Request=ot.Request;Ee.Response=ot.Response;Sn.exports=Ee});var Cs=C(L());var Hr=C(j()),Gt=C(J()),ae=C(L());var Wt=C(L()),Jo=C(J());var Ae;(function(o){o.clusteringHelperCreated="clustering-helper-created",o.mapAttachmentsUpdate="map-attachments-update",o.visibleTopicChange="visible-topic-change",o.requestedTopicNotFound="requested-topic-not-found"})(Ae||(Ae={}));var me;(function(o){o.FEEDBACK="FEEDBACK",o.RATING="RATING",o.PRINT="PRINT",o.BOOKMARK="BOOKMARK",o.COLLECTIONS="COLLECTIONS",o.PERSONAL_BOOKS="PERSONAL_BOOKS"})(me||(me={}));var Rs=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},$r=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Gr=Symbol("registerInterval"),Ls=(0,Wt.applyMixinOnce)(Symbol("toFtReaderComponent"),function(o){var e;class r extends o{constructor(){super(...arguments),this[e]=0}setReaderStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var a;return(a=this.stateManager)===null||a===void 0?void 0:a.service}connectedCallback(){super.connectedCallback(),this[Gr]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Gr]):this.dispatchEvent(new $r)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Gr,Rs([(0,Jo.state)()],r.prototype,"stateManager",void 0),r}),et=class extends Ls(Wt.FtLitElementRedux){};var en=C(j()),jt=C(L()),Wr={padding:jt.FtCssVariableFactory.create("--ft-infinite-scroll-padding","","SIZE","0"),itemsGap:jt.FtCssVariableFactory.create("--ft-infinite-scroll-items-gap","","SIZE","4px"),itemContainerMinHeight:jt.FtCssVariableFactory.create("--ft-infinite-scroll-item-container-min-height","","SIZE",".1px")},tn=en.css`
3
3
  .items-container {
4
4
  padding: ${Wr.padding};
@@ -46,10 +46,10 @@
46
46
  <slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
47
47
  </article>
48
48
  `}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){this.registeredComponents.push(e),e.tocNode=this.tocNode,e.disableContextInteractions=this.disableContextInteractions,e.headingLevelsShift=this.headingLevelsShift}update(e){super.update(e),["mapId","tocId","stateManager","translationDestinationLanguage","translationProfileId"].some(r=>e.has(r))&&this.setTocNode(),e.has("tocNode")&&this.registeredComponents.forEach(r=>r.tocNode=this.tocNode)}async setTocNode(){var e;this.tocNode=void 0,this.tocNode=this.mapId&&this.tocId?await((e=this.stateManager)===null||e===void 0?void 0:e.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}};ie.styles=fn;Me([(0,Vt.redux)({selector:o=>{var e;return(e=o.map)===null||e===void 0?void 0:e.id}})],ie.prototype,"mapId",void 0);Me([(0,Vt.redux)({selector:o=>o.translation.profileId})],ie.prototype,"translationProfileId",void 0);Me([(0,Vt.redux)({selector:o=>o.translation.destinationLanguage})],ie.prototype,"translationDestinationLanguage",void 0);Me([(0,rt.property)()],ie.prototype,"tocId",void 0);Me([(0,rt.property)({type:Boolean})],ie.prototype,"disableContextInteractions",void 0);Me([(0,rt.property)({type:Number})],ie.prototype,"headingLevelsShift",void 0);Me([(0,rt.state)()],ie.prototype,"tocNode",void 0);var gn=C(L());var yn={"ft-reader-topic-context":ie};(0,gn.customElements)(yn);var mn=C(j());var bn=mn.css`
49
- `;var Ft=C(j()),je=C(J()),z=C(L());var ee=C(L());var vn=C(L()),ks={setTranslationDestinationLanguage:(o,e)=>{o.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(o,e)=>{o.translation.sourceLanguage=e.payload},setTranslationProfileId:(o,e)=>{o.translation.profileId=e.payload},setTranslationLoading:(o,e)=>{o.translation.isLoading=e.payload},setTranslationError:(o,e)=>{o.translation.isError=e.payload},setTopicsRating:(o,e)=>{for(let r in e.payload)o.topicsRating[r]=e.payload[r]}},xn=o=>vn.FtReduxStore.get({name:"ft-reader-"+o,initialState:{mapId:void 0,renderedTopics:[],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,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:ks});var qr=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},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,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,r,n){return e.flatMap(a=>{var s;return a.pageConfiguration&&this.registerPage(this.buildPage(a,n)),a.tocId==null?this.extractPagesToc(a.children,r,n):[{tocId:a.tocId,title:(s=a.title)!==null&&s!==void 0?s:"",untranslatedTitle:a.untranslatedTitle,depth:r,children:this.extractPagesToc(a.children,r+1,a.tocId)}]})}convertNodes(e,r,n){return e.flatMap(a=>{var s,c,d;if(a.tocId==null)return[...this.convertSectionNodes((s=a.pageToc)!==null&&s!==void 0?s:[],r,a.tocId),...this.convertNodes(a.children,r,a.tocId)];let u=(c=a.prettyUrl)===null||c===void 0?void 0:c.replace(/^\//,""),p={tocId:a.tocId,contentId:a.contentId,title:a.title,untranslatedTitle:a.untranslatedTitle,hasRating:a.hasRating,origin:a.origin,prettyUrl:u,depth:r,parentTocId:n,children:[]};this.register(p);let h=this.convertSectionNodes((d=a.pageToc)!==null&&d!==void 0?d:[],r+1,a.tocId),y=this.convertNodes(a.children,r+1,p.tocId);return p.children=[...h,...y],[p]})}convertSectionNodes(e,r,n){return e.flatMap(a=>{var s;let c=(s=a.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),d={...a,prettyUrl:c,depth:r,parentTocId:n,children:[]};return this.register(d),d.children=this.convertSectionNodes(a.children,r+1,a.tocId),[d]})}buildPage(e,r){var n,a,s,c,d,u,p,h;let y={number:this.pages.length+1,title:(n=e.title)!==null&&n!==void 0?n:"",untranslatedTitle:e.untranslatedTitle,rootTocId:(c=(a=e.tocId)!==null&&a!==void 0?a:(s=e.pageToc)===null||s===void 0?void 0:s[0].tocId)!==null&&c!==void 0?c:"root",toc:((d=e.pageToc)!==null&&d!==void 0?d:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},m=(b,S)=>(S?y.topics:y.hiddenTopics).push(b),x=(p=(u=e.pageConfiguration)===null||u===void 0?void 0:u.parentsVisibility)!==null&&p!==void 0?p:[];return y.breadcrumb.forEach((b,S)=>{m(b,x[S])}),e.tocId&&m(e.tocId,e.pageConfiguration.isVisible),y.topics.push(...this.tocIds((h=e.pageToc)!==null&&h!==void 0?h:[])),y}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},Kt=class{convertPaginatedToc(e,r){return new qr(e,r).build()}};var Ps=C(Cn(),1);var On;(function(o){o.black="black",o.green="green",o.blue="blue",o.purple="purple",o.red="red",o.orange="orange",o.yellow="yellow"})(On||(On={}));var An;(function(o){o.OFFICIAL="OFFICIAL",o.PERSONAL="PERSONAL",o.SHARED="SHARED"})(An||(An={}));var En;(function(o){o.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",o.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",o.PERSONAL_BOOK="PERSONAL_BOOK",o.ATTACHMENT="ATTACHMENT",o.RESOURCE="RESOURCE",o.HTML_PACKAGE="HTML_PACKAGE"})(En||(En={}));var wn;(function(o){o.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",o.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",o.PERSONAL_BOOK="PERSONAL_BOOK",o.ATTACHMENT="ATTACHMENT",o.RESOURCE="RESOURCE",o.HTML_PACKAGE="HTML_PACKAGE"})(wn||(wn={}));var In;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR"})(In||(In={}));var Tn;(function(o){o.VALUE="VALUE",o.DATE="DATE",o.RANGE="RANGE"})(Tn||(Tn={}));var Yt;(function(o){o.OFFICIAL="OFFICIAL",o.AI="AI"})(Yt||(Yt={}));var Rn;(function(o){o.BOOKMARK__CREATE="BOOKMARK__CREATE",o.BOOKMARK__DELETE="BOOKMARK__DELETE",o.CASE_DEFLECTION__START="CASE_DEFLECTION__START",o.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",o.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",o.CHATBOT__RATE="CHATBOT__RATE",o.COLLECTION__CREATE="COLLECTION__CREATE",o.COLLECTION__UPDATE="COLLECTION__UPDATE",o.COLLECTION__DELETE="COLLECTION__DELETE",o.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",o.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",o.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",o.DOCUMENT__PRINT="DOCUMENT__PRINT",o.DOCUMENT__PROCESS="DOCUMENT__PROCESS",o.DOCUMENT__RATE="DOCUMENT__RATE",o.DOCUMENT__SEARCH="DOCUMENT__SEARCH",o.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",o.DOCUMENT__UNRATE="DOCUMENT__UNRATE",o.FEEDBACK__SEND="FEEDBACK__SEND",o.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",o.AI__RATE="AI__RATE",o.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",o.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",o.KHUB__PROCESS="KHUB__PROCESS",o.KHUB__SEARCH="KHUB__SEARCH",o.LABELS__DOWNLOAD="LABELS__DOWNLOAD",o.LINK__SHARE="LINK__SHARE",o.PAGE__DISPLAY="PAGE__DISPLAY",o.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",o.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",o.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",o.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",o.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",o.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",o.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",o.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",o.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",o.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",o.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",o.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",o.TOPIC__RATE="TOPIC__RATE",o.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",o.TOPIC__UNRATE="TOPIC__UNRATE",o.USER__LOGIN="USER__LOGIN",o.USER__LOGOUT="USER__LOGOUT",o.HEARTBEAT="HEARTBEAT"})(Rn||(Rn={}));var Ln;(function(o){o.STANDARD="STANDARD",o.STRUCTURAL="STRUCTURAL"})(Ln||(Ln={}));var _n;(function(o){o.THIRD_PARTY="THIRD_PARTY",o.OFF_THE_GRID="OFF_THE_GRID",o.CONTENT_PACKAGER="CONTENT_PACKAGER",o.PAGES="PAGES",o.DESIGNED_READER="DESIGNED_READER"})(_n||(_n={}));var kn;(function(o){o.HOMEPAGE="HOMEPAGE",o.CUSTOM="CUSTOM",o.HEADER="HEADER",o.READER="READER",o.TOPIC_TEMPLATE="TOPIC_TEMPLATE",o.SEARCH="SEARCH",o.SEARCH_RESULT="SEARCH_RESULT",o.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",o.LINK_PREVIEW="LINK_PREVIEW",o.UD_VIEWER="UD_VIEWER",o.ASSET_VIEWER="ASSET_VIEWER"})(kn||(kn={}));var Nn;(function(o){o.CLASSIC="CLASSIC",o.CUSTOM="CUSTOM",o.DESIGNER="DESIGNER"})(Nn||(Nn={}));var Pn;(function(o){o.AND="AND",o.OR="OR",o.MONOVALUED="MONOVALUED"})(Pn||(Pn={}));var Dn;(function(o){o.NONE="NONE",o.ALPHABET="ALPHABET",o.VERSION="VERSION"})(Dn||(Dn={}));var Mn;(function(o){o.STARS="STARS",o.LIKE="LIKE",o.DICHOTOMOUS="DICHOTOMOUS",o.NO_RATING="NO_RATING"})(Mn||(Mn={}));var Fn;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR",o.CUSTOM="CUSTOM"})(Fn||(Fn={}));var Un;(function(o){o.OPTIONAL="OPTIONAL",o.MANDATORY="MANDATORY"})(Un||(Un={}));var Bn;(function(o){o.ASC="ASC",o.DESC="DESC"})(Bn||(Bn={}));var Hn;(function(o){o.ALPHA="ALPHA",o.NATURAL="NATURAL"})(Hn||(Hn={}));var zn;(function(o){o.EVERYWHERE="EVERYWHERE",o.TITLE_ONLY="TITLE_ONLY",o.NONE="NONE"})(zn||(zn={}));var Gn;(function(o){o.ARTICLE="ARTICLE",o.BOOK="BOOK",o.SHARED_BOOK="SHARED_BOOK",o.HTML_PACKAGE="HTML_PACKAGE"})(Gn||(Gn={}));var $n;(function(o){o.FLUIDTOPICS="FLUIDTOPICS",o.EXTERNAL="EXTERNAL"})($n||($n={}));var Wn;(function(o){o.MAP="MAP",o.DOCUMENT="DOCUMENT",o.TOPIC="TOPIC",o.PERSONAL_BOOK="PERSONAL_BOOK",o.SHARED_BOOK="SHARED_BOOK",o.HTML_PACKAGE="HTML_PACKAGE"})(Wn||(Wn={}));var jn;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR"})(jn||(jn={}));var Vn;(function(o){o.MAP="MAP",o.DOCUMENT="DOCUMENT",o.TOPIC="TOPIC",o.HTML_PACKAGE="HTML_PACKAGE",o.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Vn||(Vn={}));var Kn;(function(o){o.DEFAULT="DEFAULT",o.DOCUMENTS="DOCUMENTS",o.ALL_TOPICS="ALL_TOPICS",o.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Kn||(Kn={}));var Zn;(function(o){o.PLAIN_TEXT="PLAIN_TEXT",o.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",o.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zn||(Zn={}));var P;(function(o){o.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",o.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",o.HTML_EXPORT_USER="HTML_EXPORT_USER",o.PDF_EXPORT_USER="PDF_EXPORT_USER",o.SAVED_SEARCH_USER="SAVED_SEARCH_USER",o.COLLECTION_USER="COLLECTION_USER",o.OFFLINE_USER="OFFLINE_USER",o.ANALYTICS_USER="ANALYTICS_USER",o.BETA_USER="BETA_USER",o.DEBUG_USER="DEBUG_USER",o.PRINT_USER="PRINT_USER",o.RATING_USER="RATING_USER",o.FEEDBACK_USER="FEEDBACK_USER",o.GENERATIVE_AI_USER="GENERATIVE_AI_USER",o.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",o.CONTENT_PUBLISHER="CONTENT_PUBLISHER",o.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",o.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",o.KHUB_ADMIN="KHUB_ADMIN",o.USERS_ADMIN="USERS_ADMIN",o.PORTAL_ADMIN="PORTAL_ADMIN",o.ADMIN="ADMIN"})(P||(P={}));var se;(function(o){o.SEARCHES="SEARCHES",o.BOOKMARKS="BOOKMARKS",o.BOOKS="BOOKS",o.COLLECTIONS="COLLECTIONS"})(se||(se={}));var qn;(function(o){o.UNAUTHENTICATED="UNAUTHENTICATED",o.USER_INCOMPLETE="USER_INCOMPLETE",o.MFA_REQUIRED="MFA_REQUIRED",o.AUTHENTICATED="AUTHENTICATED"})(qn||(qn={}));var Yn;(function(o){o.VALID="VALID",o.INVALID="INVALID"})(Yn||(Yn={}));var Qn;(function(o){o.INACCURATE="INACCURATE",o.INCOMPLETE="INCOMPLETE",o.OFF_TOPIC="OFF_TOPIC",o.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",o.SUMMARY="SUMMARY",o.SEMANTIC_SEARCH="SEMANTIC_SEARCH",o.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",o.OTHER="OTHER"})(Qn||(Qn={}));var Xn;(function(o){o.INACCURATE="INACCURATE",o.INCOMPLETE="INCOMPLETE",o.OFF_TOPIC="OFF_TOPIC",o.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",o.SLOW="SLOW",o.OTHER="OTHER"})(Xn||(Xn={}));var Jn;(function(o){o.JSON="JSON",o.TEXT="TEXT"})(Jn||(Jn={}));var ea;(function(o){o.JSON="JSON",o.TEXT="TEXT"})(ea||(ea={}));var ta;(function(o){o.USER="USER",o.ASSISTANT="ASSISTANT"})(ta||(ta={}));var ra;(function(o){o.TEXT="TEXT",o.HTML="HTML"})(ra||(ra={}));var oa;(function(o){o.HTML="HTML",o.MARKDOWN="MARKDOWN"})(oa||(oa={}));var na;(function(o){o.MAP="MAP",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(na||(na={}));var Ns={[P.PERSONAL_BOOK_SHARE_USER]:[P.PERSONAL_BOOK_USER],[P.HTML_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.PDF_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.KHUB_ADMIN]:[P.CONTENT_PUBLISHER],[P.ADMIN]:[P.KHUB_ADMIN,P.USERS_ADMIN,P.PORTAL_ADMIN,P.BEHAVIOR_DATA_USER],[P.GENERATIVE_AI_EXPORT_USER]:[P.GENERATIVE_AI_USER]};function aa(o,e){return o===e||(Ns[o]??[]).some(r=>aa(r,e))}function be(o,e){return o==null?!1:(Array.isArray(o)?o:Array.isArray(o.roles)?o.roles:Array.isArray(o.profile?.roles)?o.profile.roles:[]).some(n=>aa(n,e))}var Co=C(J());var ia=C(J(),1);var Yr=o=>e=>{window.customElements.get(o)||window.customElements.define(o,e)};function sa(o,e){return(0,ia.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Rt(o);try{return JSON.parse(r)}catch{return Rt(o)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Lt,...e??{}})}function Ds(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;let r,n,a;if(Array.isArray(o)){if(r=o.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qt(o[n],e[n]))return!1;return!0}if(o instanceof Map&&e instanceof Map){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;for(n of o.entries())if(!Qt(n[1],e.get(n[0])))return!1;return!0}if(o instanceof Set&&e instanceof Set){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;return!0}if(o.constructor===RegExp)return o.source===e.source&&o.flags===e.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();let s=c=>Object.keys(c).filter(d=>c[d]!=null);if(a=s(o),r=a.length,r!==s(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){let c=a[n];if(!Qt(o[c],e[c]))return!1}return!0}return o!==o&&e!==e||o==null&&e==null}function Qt(o,e){try{return Ds(o,e)}catch{return!1}}function Lt(o,e){return!Qt(o,e)}function Rt(o){return typeof window.structuredClone=="function"?structuredClone(o):o!=null?JSON.parse(JSON.stringify(o)):o}function Xt(o,e){let r=n=>n[o]===!0;return n=>{if(r(n))return n;let a=e(n);return a[o]=!0,a}}var ca=C(J(),1);var Qr=o=>{let e=o??{};return(r,n)=>{var a;let s={hasChanged:Lt,attribute:!1,...e};(0,ca.property)(s)(r,n);let c=r.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(d=>d[n]),store:e.store})}};var Jt=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Fe=C(J(),1);var er=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var da=C(j(),1);var tr=globalThis,Ms=tr.ShadowRoot&&(tr.ShadyCSS===void 0||tr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var la=(o,e)=>{if(Ms)o.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),a=tr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,o.appendChild(n)}};var rr=class extends da.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return la(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Yr(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ua(o,e,...r){var n;let a=o.querySelector(e);for(let s of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var at=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},ya,pa=Symbol("constructorPrototype"),fa=Symbol("constructorName"),ga=Symbol("exportpartsDebouncer"),ha=Symbol("dynamicDependenciesLoaded"),nt=class o extends CustomEvent{constructor(){super(o.eventName,{bubbles:!0})}};nt.eventName="exportparts-updated";var ye=class extends rr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ya]=new er(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ga].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[fa]=this.constructor.name,this[pa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fa]&&Object.setPrototypeOf(this,this[pa])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[ha]||(r[ha]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(nt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(nt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new nt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];r=ua(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(e){var r,n,a,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=e.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(s=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&s!==void 0?s:[],b=(d=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...x,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>p.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};ya=ga;at([(0,Fe.property)()],ye.prototype,"exportpartsPrefix",void 0);at([sa([])],ye.prototype,"exportpartsPrefixes",void 0);at([(0,Fe.property)({reflect:!0})],ye.prototype,"exportparts",void 0);at([(0,Fe.property)()],ye.prototype,"customStylesheet",void 0);at([(0,Fe.property)()],ye.prototype,"elementToFocus",void 0);at([(0,Fe.state)()],ye.prototype,"useAdoptedStyleSheets",void 0);function or(o){var e;return(e=o?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _t=Symbol("internalReduxEventsUnsubscribers"),we=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),Fs=Xt(Symbol("withRedux"),function(o){var e,r,n;class a extends o{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ue].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ue].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ue].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[we].has(c.store):this[we].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[we].set(c,d.subscribe(()=>this.updateFromStores())),this[_t].set(c,[]),or(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=m=>this[h](m);d.addEventListener(p.eventName,y),this[_t].get(c).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[we].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[we].has(c)&&this[we].get(c)(),this[we].delete(c),(d=this[_t].get(c))===null||d===void 0||d.forEach(u=>u()),this[_t].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=we,r=Ue,n=_t,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ma=class extends Fs(ye){};function ce(o){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,s;throw Error("[Immer] minified error nr: "+o+(r.length?" "+r.map((function(c){return"'"+c+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(o){return!!o&&!!o[M]}function pe(o){var e;return!!o&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===js})(o)||Array.isArray(o)||!!o[Aa]||!!(!((e=o.constructor)===null||e===void 0)&&e[Aa])||io(o)||so(o))}function Be(o,e,r){r===void 0&&(r=!1),ct(o)===0?(r?Object.keys:st)(o).forEach((function(n){r&&typeof n=="symbol"||e(n,o[n],o)})):o.forEach((function(n,a){return e(a,n,o)}))}function ct(o){var e=o[M];return e?e.i>3?e.i-4:e.i:Array.isArray(o)?1:io(o)?2:so(o)?3:0}function it(o,e){return ct(o)===2?o.has(e):Object.prototype.hasOwnProperty.call(o,e)}function Us(o,e){return ct(o)===2?o.get(e):o[e]}function Ea(o,e,r){var n=ct(o);n===2?o.set(e,r):n===3?o.add(r):o[e]=r}function wa(o,e){return o===e?o!==0||1/o==1/e:o!=o&&e!=e}function io(o){return $s&&o instanceof Map}function so(o){return Ws&&o instanceof Set}function Ie(o){return o.o||o.t}function co(o){if(Array.isArray(o))return Array.prototype.slice.call(o);var e=Ra(o);delete e[M];for(var r=st(e),n=0;n<r.length;n++){var a=r[n],s=e[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:o[a]})}return Object.create(Object.getPrototypeOf(o),e)}function lo(o,e){return e===void 0&&(e=!1),uo(o)||ve(o)||!pe(o)||(ct(o)>1&&(o.set=o.add=o.clear=o.delete=Bs),Object.freeze(o),e&&Be(o,(function(r,n){return lo(n,!0)}),!0)),o}function Bs(){ce(2)}function uo(o){return o==null||typeof o!="object"||Object.isFrozen(o)}function ge(o){var e=ao[o];return e||ce(18,o),e}function Hs(o,e){ao[o]||(ao[o]=e)}function ro(){return Nt}function Xr(o,e){e&&(ge("Patches"),o.u=[],o.s=[],o.v=e)}function nr(o){oo(o),o.p.forEach(zs),o.p=null}function oo(o){o===Nt&&(Nt=o.l)}function ba(o){return Nt={p:[],l:Nt,h:o,m:!0,_:0}}function zs(o){var e=o[M];e.i===0||e.i===1?e.j():e.g=!0}function Jr(o,e){e._=e.p.length;var r=e.p[0],n=o!==void 0&&o!==r;return e.h.O||ge("ES5").S(e,o,n),n?(r[M].P&&(nr(e),ce(4)),pe(o)&&(o=ar(e,o),e.l||ir(e,o)),e.u&&ge("Patches").M(r[M].t,o,e.u,e.s)):o=ar(e,r,[]),nr(e),e.u&&e.v(e.u,e.s),o!==Ta?o:void 0}function ar(o,e,r){if(uo(e))return e;var n=e[M];if(!n)return Be(e,(function(d,u){return va(o,n,e,d,u,r)}),!0),e;if(n.A!==o)return e;if(!n.P)return ir(o,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=co(n.k):n.o,s=a,c=!1;n.i===3&&(s=new Set(a),a.clear(),c=!0),Be(s,(function(d,u){return va(o,n,a,d,u,r,c)})),ir(o,a,!1),r&&o.u&&ge("Patches").N(n,r,o.u,o.s)}return n.o}function va(o,e,r,n,a,s,c){if(ve(a)){var d=ar(o,a,s&&e&&e.i!==3&&!it(e.R,n)?s.concat(n):void 0);if(Ea(r,n,d),!ve(d))return;o.m=!1}else c&&r.add(a);if(pe(a)&&!uo(a)){if(!o.h.D&&o._<1)return;ar(o,a),e&&e.A.l||ir(o,a)}}function ir(o,e,r){r===void 0&&(r=!1),!o.l&&o.h.D&&o.m&&lo(e,r)}function eo(o,e){var r=o[M];return(r?Ie(r):o)[e]}function xa(o,e){if(e in o)for(var r=Object.getPrototypeOf(o);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(o){o.P||(o.P=!0,o.l&&Te(o.l))}function to(o){o.o||(o.o=co(o.t))}function no(o,e,r){var n=io(e)?ge("MapSet").F(e,r):so(e)?ge("MapSet").T(e,r):o.O?(function(a,s){var c=Array.isArray(a),d={i:c?1:0,A:s?s.A:ro(),P:!1,I:!1,R:{},l:s,t:a,k:null,o:null,j:null,C:!1},u=d,p=Pt;c&&(u=[d],p=kt);var h=Proxy.revocable(u,p),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m})(e,r):ge("ES5").J(e,r);return(r?r.A:ro()).p.push(n),n}function Gs(o){return ve(o)||ce(22,o),(function e(r){if(!pe(r))return r;var n,a=r[M],s=ct(r);if(a){if(!a.P&&(a.i<4||!ge("ES5").K(a)))return a.t;a.I=!0,n=Sa(r,s),a.I=!1}else n=Sa(r,s);return Be(n,(function(c,d){a&&Us(a.t,c)===d||Ea(n,c,e(d))})),s===3?new Set(n):n})(o)}function Sa(o,e){switch(e){case 2:return new Map(o);case 3:return Array.from(o)}return co(o)}function Ia(){function o(c,d){var u=s[c];return u?u.enumerable=d:s[c]=u={configurable:!0,enumerable:d,get:function(){var p=this[M];return Pt.get(p,c)},set:function(p){var h=this[M];Pt.set(h,c,p)}},u}function e(c){for(var d=c.length-1;d>=0;d--){var u=c[d][M];if(!u.P)switch(u.i){case 5:n(u)&&Te(u);break;case 4:r(u)&&Te(u)}}}function r(c){for(var d=c.t,u=c.k,p=st(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==M){var m=d[y];if(m===void 0&&!it(d,y))return!0;var x=u[y],b=x&&x[M];if(b?b.t!==m:!wa(x,m))return!0}}var S=!!d[M];return p.length!==st(d).length+(S?0:1)}function n(c){var d=c.k;if(d.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&ce(3,JSON.stringify(Ie(c)))}var s={};Hs("ES5",{J:function(c,d){var u=Array.isArray(c),p=(function(y,m){if(y){for(var x=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(x,""+b,o(b,!0));return x}var S=Ra(m);delete S[M];for(var w=st(S),I=0;I<w.length;I++){var T=w[I];S[T]=o(T,y||!!S[T].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(u,c),h={i:u?5:4,A:d?d.A:ro(),P:!1,I:!1,R:{},l:d,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,M,{value:h,writable:!0}),p},S:function(c,d,u){u?ve(d)&&d[M].A===c&&e(c.p):(c.u&&(function p(h){if(h&&typeof h=="object"){var y=h[M];if(y){var m=y.t,x=y.k,b=y.R,S=y.i;if(S===4)Be(x,(function(_){_!==M&&(m[_]!==void 0||it(m,_)?b[_]||p(x[_]):(b[_]=!0,Te(y)))})),Be(m,(function(_){x[_]!==void 0||it(x,_)||(b[_]=!1,Te(y))}));else if(S===5){if(n(y)&&(Te(y),b.length=!0),x.length<m.length)for(var w=x.length;w<m.length;w++)b[w]=!1;else for(var I=m.length;I<x.length;I++)b[I]=!0;for(var T=Math.min(x.length,m.length),D=0;D<T;D++)x.hasOwnProperty(D)||(b[D]=!0),b[D]===void 0&&p(x[D])}}}})(c.p[0]),e(c.p))},K:function(c){return c.i===4?r(c):n(c)}})}var Ca,Nt,po=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$s=typeof Map<"u",Ws=typeof Set<"u",Oa=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ta=po?Symbol.for("immer-nothing"):((Ca={})["immer-nothing"]=!0,Ca),Aa=po?Symbol.for("immer-draftable"):"__$immer_draftable",M=po?Symbol.for("immer-state"):"__$immer_state";var js=""+Object.prototype.constructor,st=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:Object.getOwnPropertyNames,Ra=Object.getOwnPropertyDescriptors||function(o){var e={};return st(o).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(o,r)})),e},ao={},Pt={get:function(o,e){if(e===M)return o;var r=Ie(o);if(!it(r,e))return(function(a,s,c){var d,u=xa(s,c);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(a.k):void 0})(o,r,e);var n=r[e];return o.I||!pe(n)?n:n===eo(o.t,e)?(to(o),o.o[e]=no(o.A.h,n,o)):n},has:function(o,e){return e in Ie(o)},ownKeys:function(o){return Reflect.ownKeys(Ie(o))},set:function(o,e,r){var n=xa(Ie(o),e);if(n?.set)return n.set.call(o.k,r),!0;if(!o.P){var a=eo(Ie(o),e),s=a?.[M];if(s&&s.t===r)return o.o[e]=r,o.R[e]=!1,!0;if(wa(r,a)&&(r!==void 0||it(o.t,e)))return!0;to(o),Te(o)}return o.o[e]===r&&(r!==void 0||e in o.o)||Number.isNaN(r)&&Number.isNaN(o.o[e])||(o.o[e]=r,o.R[e]=!0),!0},deleteProperty:function(o,e){return eo(o.t,e)!==void 0||e in o.t?(o.R[e]=!1,to(o),Te(o)):delete o.R[e],o.o&&delete o.o[e],!0},getOwnPropertyDescriptor:function(o,e){var r=Ie(o),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:o.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ce(11)},getPrototypeOf:function(o){return Object.getPrototypeOf(o.t)},setPrototypeOf:function(){ce(12)}},kt={};Be(Pt,(function(o,e){kt[o]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),kt.deleteProperty=function(o,e){return kt.set.call(this,o,e,void 0)},kt.set=function(o,e,r){return Pt.set.call(this,o[0],e,r,o[0])};var Vs=(function(){function o(r){var n=this;this.O=Oa,this.D=!0,this.produce=function(a,s,c){if(typeof a=="function"&&typeof s!="function"){var d=s;s=a;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var I=arguments.length,T=Array(I>1?I-1:0),D=1;D<I;D++)T[D-1]=arguments[D];return u.produce(S,(function(_){var $;return($=s).call.apply($,[w,_].concat(T))}))}}var p;if(typeof s!="function"&&ce(6),c!==void 0&&typeof c!="function"&&ce(7),pe(a)){var h=ba(n),y=no(n,a,void 0),m=!0;try{p=s(y),m=!1}finally{m?nr(h):oo(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Xr(h,c),Jr(S,h)}),(function(S){throw nr(h),S})):(Xr(h,c),Jr(p,h))}if(!a||typeof a!="object"){if((p=s(a))===void 0&&(p=a),p===Ta&&(p=void 0),n.D&&lo(p,!0),c){var x=[],b=[];ge("Patches").M(a,p,x,b),c(x,b)}return p}ce(21,a)},this.produceWithPatches=function(a,s){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,(function(x){return a.apply(void 0,[x].concat(y))}))};var c,d,u=n.produce(a,s,(function(p,h){c=p,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,c,d]})):[u,c,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=o.prototype;return e.createDraft=function(r){pe(r)||ce(8),ve(r)&&(r=Gs(r));var n=ba(this),a=no(this,r,void 0);return a[M].C=!0,oo(n),a},e.finishDraft=function(r,n){var a=r&&r[M],s=a.A;return Xr(s,n),Jr(void 0,s)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Oa&&ce(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var s=n[a];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}a>-1&&(n=n.slice(a+1));var c=ge("Patches").$;return ve(r)?c(r,n):this.produce(r,(function(d){return c(d,n)}))},o})(),re=new Vs,Ks=re.produce,od=re.produceWithPatches.bind(re),nd=re.setAutoFreeze.bind(re),ad=re.setUseProxies.bind(re),id=re.applyPatches.bind(re),sd=re.createDraft.bind(re),cd=re.finishDraft.bind(re),sr=Ks;function He(o){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(o)}function La(o,e){if(He(o)!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,e||"default");if(He(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function _a(o){var e=La(o,"string");return He(e)=="symbol"?e:e+""}function ka(o,e,r){return(e=_a(e))in o?Object.defineProperty(o,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[e]=r,o}function Na(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),r.push.apply(r,n)}return r}function fo(o){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Na(Object(r),!0).forEach(function(n){ka(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function K(o){return"Minified Redux error #"+o+"; visit https://redux.js.org/Errors?code="+o+" for the full message or use the non-minified dev environment for full errors. "}var Pa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ho=function(){return Math.random().toString(36).substring(7).split("").join(".")},cr={INIT:"@@redux/INIT"+ho(),REPLACE:"@@redux/REPLACE"+ho(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ho()}};function Zs(o){if(typeof o!="object"||o===null)return!1;for(var e=o;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(o)===e}function yo(o,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(K(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(K(1));return r(yo)(o,e)}if(typeof o!="function")throw new Error(K(2));var a=o,s=e,c=[],d=c,u=!1;function p(){d===c&&(d=c.slice())}function h(){if(u)throw new Error(K(3));return s}function y(S){if(typeof S!="function")throw new Error(K(4));if(u)throw new Error(K(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(K(6));w=!1,p();var T=d.indexOf(S);d.splice(T,1),c=null}}}function m(S){if(!Zs(S))throw new Error(K(7));if(typeof S.type>"u")throw new Error(K(8));if(u)throw new Error(K(9));try{u=!0,s=a(s,S)}finally{u=!1}for(var w=c=d,I=0;I<w.length;I++){var T=w[I];T()}return S}function x(S){if(typeof S!="function")throw new Error(K(10));a=S,m({type:cr.REPLACE})}function b(){var S,w=y;return S={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(K(11));function D(){T.next&&T.next(h())}D();var _=w(D);return{unsubscribe:_}}},S[Pa]=function(){return this},S}return m({type:cr.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:x},n[Pa]=b,n}function qs(o){Object.keys(o).forEach(function(e){var r=o[e],n=r(void 0,{type:cr.INIT});if(typeof n>"u")throw new Error(K(12));if(typeof r(void 0,{type:cr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(K(13))})}function Da(o){for(var e=Object.keys(o),r={},n=0;n<e.length;n++){var a=e[n];typeof o[a]=="function"&&(r[a]=o[a])}var s=Object.keys(r),c,d;try{qs(r)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var m=!1,x={},b=0;b<s.length;b++){var S=s[b],w=r[S],I=p[S],T=w(I,h);if(typeof T>"u"){var D=h&&h.type;throw new Error(K(14))}x[S]=T,m=m||T!==I}return m=m||s.length!==Object.keys(p).length,m?x:p}}function lt(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ma(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),s=function(){throw new Error(K(15))},c={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=e.map(function(u){return u(c)});return s=lt.apply(void 0,d)(a.dispatch),fo(fo({},a),{},{dispatch:s})}}}function Fa(o){var e=function(n){var a=n.dispatch,s=n.getState;return function(c){return function(d){return typeof d=="function"?d(a,s,o):c(d)}}};return e}var Ua=Fa();Ua.withExtraArgument=Fa;var go=Ua;var $a=(function(){var o=function(e,r){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])},o(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ys=function(o,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(s=p[0]&2?a.return:p[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,p[1])).done)return s;switch(a=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){r.label=p[1];break}if(p[0]===6&&r.label<s[1]){r.label=s[1],s=p;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(p);break}s[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(o,r)}catch(h){p=[6,h],a=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},dt=function(o,e){for(var r=0,n=e.length,a=o.length;r<n;r++,a++)o[a]=e[r];return o},Qs=Object.defineProperty,Xs=Object.defineProperties,Js=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,Ha=function(o,e,r){return e in o?Qs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r},Re=function(o,e){for(var r in e||(e={}))ec.call(e,r)&&Ha(o,r,e[r]);if(Ba)for(var n=0,a=Ba(e);n<a.length;n++){var r=a[n];tc.call(e,r)&&Ha(o,r,e[r])}return o},mo=function(o,e){return Xs(o,Js(e))},rc=function(o,e,r){return new Promise(function(n,a){var s=function(u){try{d(r.next(u))}catch(p){a(p)}},c=function(u){try{d(r.throw(u))}catch(p){a(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,c)};d((r=r.apply(o,e)).next())})};var oc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?lt:lt.apply(null,arguments)},wd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(o){return o}};function nc(o){if(typeof o!="object"||o===null)return!1;var e=Object.getPrototypeOf(o);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Le(o,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var s=e.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return Re(Re({type:o,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:o,payload:n[0]}}return r.toString=function(){return""+o},r.type=o,r.match=function(n){return n.type===o},r}var ac=(function(o){$a(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,dt([void 0],r[0].concat(this)))):new(e.bind.apply(e,dt([void 0],r.concat(this))))},e})(Array),ic=(function(o){$a(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,dt([void 0],r[0].concat(this)))):new(e.bind.apply(e,dt([void 0],r.concat(this))))},e})(Array);function xo(o){return pe(o)?sr(o,function(){}):o}function sc(o){return typeof o=="boolean"}function cc(){return function(e){return lc(e)}}function lc(o){o===void 0&&(o={});var e=o.thunk,r=e===void 0?!0:e,n=o.immutableCheck,a=n===void 0?!0:n,s=o.serializableCheck,c=s===void 0?!0:s,d=o.actionCreatorCheck,u=d===void 0?!0:d,p=new ac;if(r&&(sc(r)?p.push(go):p.push(go.withExtraArgument(r.extraArgument))),0){if(a)var h;if(c)var y;if(u)var m}return p}var bo=!0;function Wa(o){var e=cc(),r=o||{},n=r.reducer,a=n===void 0?void 0:n,s=r.middleware,c=s===void 0?e():s,d=r.devTools,u=d===void 0?!0:d,p=r.preloadedState,h=p===void 0?void 0:p,y=r.enhancers,m=y===void 0?void 0:y,x;if(typeof a=="function")x=a;else if(nc(a))x=Da(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=c;if(typeof b=="function"&&(b=b(e),!bo&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bo&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Ma.apply(void 0,b),w=lt;u&&(w=oc(Re({trace:!bo},typeof u=="object"&&u)));var I=new ic(S),T=I;Array.isArray(m)?T=dt([S],m):typeof m=="function"&&(T=m(I));var D=w.apply(void 0,T);return yo(x,h,D)}function ja(o){var e={},r=[],n,a={addCase:function(s,c){var d=typeof s=="string"?s:s.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[d]=c,a},addMatcher:function(s,c){return r.push({matcher:s,reducer:c}),a},addDefaultCase:function(s){return n=s,a}};return o(a),[e,r,n]}function dc(o){return typeof o=="function"}function uc(o,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?ja(e):[e,r,n],s=a[0],c=a[1],d=a[2],u;if(dc(o))u=function(){return xo(o())};else{var p=xo(o);u=function(){return p}}function h(y,m){y===void 0&&(y=u());var x=dt([s[m.type]],c.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[d]),x.reduce(function(b,S){if(S)if(ve(b)){var w=b,I=S(w,m);return I===void 0?b:I}else{if(pe(b))return sr(b,function(T){return S(T,m)});var I=S(b,m);if(I===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return b},y)}return h.getInitialState=u,h}function pc(o,e){return o+"/"+e}function Va(o){var e=o.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof o.initialState=="function"?o.initialState:xo(o.initialState),n=o.reducers||{},a=Object.keys(n),s={},c={},d={};a.forEach(function(h){var y=n[h],m=pc(e,h),x,b;"reducer"in y?(x=y.reducer,b=y.prepare):x=y,s[h]=x,c[m]=x,d[h]=b?Le(m,b):Le(m)});function u(){var h=typeof o.extraReducers=="function"?ja(o.extraReducers):[o.extraReducers],y=h[0],m=y===void 0?{}:y,x=h[1],b=x===void 0?[]:x,S=h[2],w=S===void 0?void 0:S,I=Re(Re({},m),c);return uc(r,function(T){for(var D in I)T.addCase(D,I[D]);for(var _=0,$=b;_<$.length;_++){var ue=$[_];T.addMatcher(ue.matcher,ue.reducer)}w&&T.addDefaultCase(w)})}var p;return{name:e,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var fc="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hc=function(o){o===void 0&&(o=21);for(var e="",r=o;r--;)e+=fc[Math.random()*64|0];return e},yc=["name","message","stack","code"],vo=(function(){function o(e,r){this.payload=e,this.meta=r}return o})(),za=(function(){function o(e,r){this.payload=e,this.meta=r}return o})(),gc=function(o){if(typeof o=="object"&&o!==null){for(var e={},r=0,n=yc;r<n.length;r++){var a=n[r];typeof o[a]=="string"&&(e[a]=o[a])}return e}return{message:String(o)}},Ld=(function(){function o(e,r,n){var a=Le(e+"/fulfilled",function(h,y,m,x){return{payload:h,meta:mo(Re({},x||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=Le(e+"/pending",function(h,y,m){return{payload:void 0,meta:mo(Re({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=Le(e+"/rejected",function(h,y,m,x,b){return{payload:x,error:(n&&n.serializeError||gc)(h||"Rejected"),meta:mo(Re({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(y,m,x){var b=n?.idGenerator?n.idGenerator(h):hc(),S=new u,w,I=!1;function T(_){w=_,S.abort()}var D=(function(){return rc(this,null,function(){var _,$,ue,Ne,X,Pe,Xe;return Ys(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ne=(_=n?.condition)==null?void 0:_.call(n,h,{getState:m,extra:x}),bc(Ne)?[4,Ne]:[3,2];case 1:Ne=f.sent(),f.label=2;case 2:if(Ne===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,X=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:b,arg:h},{getState:m,extra:x}))),[4,Promise.race([X,Promise.resolve(r(h,{dispatch:y,getState:m,extra:x,requestId:b,signal:S.signal,abort:T,rejectWithValue:function(g,E){return new vo(g,E)},fulfillWithValue:function(g,E){return new za(g,E)}})).then(function(g){if(g instanceof vo)throw g;return g instanceof za?a(g.payload,b,h,g.meta):a(g,b,h)})])];case 3:return ue=f.sent(),[3,5];case 4:return Pe=f.sent(),ue=Pe instanceof vo?c(null,b,h,Pe.payload,Pe.meta):c(Pe,b,h),[3,5];case 5:return Xe=n&&!n.dispatchConditionRejection&&c.match(ue)&&ue.meta.condition,Xe||y(ue),[2,ue]}})})})();return Object.assign(D,{abort:T,requestId:b,arg:h,unwrap:function(){return D.then(mc)}})}}return Object.assign(p,{pending:s,rejected:c,fulfilled:a,typePrefix:e})}return o.withTypes=function(){return o},o})();function mc(o){if(o.meta&&o.meta.rejectedWithValue)throw o.payload;if(o.error)throw o.error;return o.payload}function bc(o){return o!==null&&typeof o=="object"&&typeof o.then=="function"}var Ka="listener",Za="completed",qa="cancelled",_d="task-"+qa,kd="task-"+Za,Nd=Ka+"-"+qa,Pd=Ka+"-"+Za;var So="listenerMiddleware";var Dd=Le(So+"/add"),Md=Le(So+"/removeAll"),Fd=Le(So+"/remove");var Ga,Ud=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(o){return(Ga||(Ga=Promise.resolve())).then(o).catch(function(e){return setTimeout(function(){throw e},0)})},vc=function(o){return function(e){setTimeout(e,o)}},Bd=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vc(10);Ia();var xc=Xt(Symbol("withEventBus"),function(o,e){return class extends o{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),lr=class extends xc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ya=class o extends lr{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,s=window.ftReduxStores[n];if(or(s))return s;if(a==null)return;let c=Va({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),d=Wa({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=Rt(c.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[a.name]=new o(c,d,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Jt;let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...h)=>{let y=p(...h.map(a));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var dr=class{static format(e,r,n,a,s){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!s)):this.getIntlDateTime(e,r,n,a,!!s)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,s){let c=typeof e=="string"?new Date(e):e,d=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(c);return s?u:a?`${d} ${u}`:d}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ur=C(L()),Sc="ft-app-info",xe=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:e})}};xe.eventName="authentication-change";var Dt=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:e})}};Dt.eventName="ui-locale-changed";var Cc={session:(o,e)=>{(0,ur.deepEqual)(o.session,e.payload)||(o.session=e.payload,setTimeout(()=>O.dispatchEvent(new xe(e.payload)),0))}},O=ur.FtReduxStore.get({name:Sc,reducers:Cc,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Qa=C(L()),pr=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},fu=(0,Qa.applyMixinOnce)(Symbol("withDateFormat"),function(o){class e extends o{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(O)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>dr.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pr([(0,Co.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pr([(0,Co.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pr([Qr({store:O.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),pr([Qr({store:O.name})],e.prototype,"uiLocale",void 0),e});var mr=C(L());var Oo=C(L());var ze=class o{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=O.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=o.get(e);if(n)r(n);else{let a=O.subscribe(()=>{n=o.get(e),n&&(a(),r(n))})}})}};var ut=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ze.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ze.await()}};var Z=class extends ut{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Oo.CacheRegistry,this.cache=e?a.commonCache:new Oo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var fr=class extends Z{async listMySearches(){let{session:e}=O.getState();return be(e,P.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var hr=class extends Z{async listMyBookmarks(){let e=O.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var yr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=O.getState().session;return!!e?.sessionAuthenticated}};var gr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=O.getState().session;return!!e?.sessionAuthenticated}};var Oc="ft-user-assets",Ac={setAssetCount:(o,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;o.assetCounts.allAsset[r]=n},clearAssetCount:o=>{Object.values(se).forEach(e=>{o.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(o,e)=>{let r=e.payload.mapId;o.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:o=>{o.assetCounts.bookmarkByMap={}},addAsset:(o,e)=>{let{assetType:r,mapId:n,asset:a}=e.payload;Eo(o,r,[...Ao(o,r),a]),Xa(o,r,1,n),Ja(o,a)},editAsset:(o,e)=>{let{assetType:r,asset:n}=e.payload;Eo(o,r,Ao(o,r).map(a=>a.id===n.id?n:a)),Ja(o,n)},removeAsset:(o,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;Eo(o,r,Ao(o,r).filter(s=>s.id!==a)),Xa(o,r,-1,n)}},ei={[se.SEARCHES]:"savedSearches",[se.BOOKMARKS]:"bookmarks",[se.BOOKS]:void 0,[se.COLLECTIONS]:void 0},Ao=(o,e)=>{var r;let n=ei[e];return n?(r=o[n])!==null&&r!==void 0?r:[]:[]},Eo=(o,e,r)=>{let n=ei[e];n&&(o[n]=r)},Xa=(o,e,r,n)=>{let a=o.assetCounts.allAsset[e];if(a!==void 0&&(o.assetCounts.allAsset[e]=Math.max(0,a+r),e===se.BOOKMARKS&&n)){let s=o.assetCounts.bookmarkByMap[n];o.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},Ja=(o,e)=>{let r=o.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));o.assetLabels.push(...n)},oe=mr.FtReduxStore.get({name:Oc,reducers:Ac,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(se).map(o=>[o,void 0])),bookmarkByMap:{}},assetLabels:[]}}),wo=class{constructor(e=new yr,r=new gr){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=O.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new fr,O.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=O.getState();(0,mr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),oe.actions.clearAssetCount(),oe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),oe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),oe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();oe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();oe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&oe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&oe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(oe.getState().assetCounts.bookmarkByMap).length!==0;e===se.BOOKMARKS&&r&&oe.actions.clearBookmarkCountByMap(),oe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;oe.actions.bookmarks(r)}}},Io=new wo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Io);var To=class{addCommand(e,r=!1){O.commands.add(e,r)}consumeCommand(e){return O.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new To;var le=C(L());var ti,pt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ec=Symbol("clearAfterUnitTest"),br=class extends(0,le.withEventBus)(Z){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new le.CacheRegistry,this.listeners={}},this.currentUiLocale=O.getState().uiLocale,O.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=O.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,le.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let s=e.toLowerCase(),c=this.resolveContext(s);return new le.ParametrizedLabelResolver((a=this.defaultMessages[s])!==null&&a!==void 0?a:{},c).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof le.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new pt({loadedContexts:e})),this.dispatchEvent(new pt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new pt({loadedContexts:[e]})),this.dispatchEvent(new pt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,le.delay)(0).then(()=>n()).catch(()=>null)))}};ti=Ec;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends br{constructor(){super(async(o,e)=>(await this.awaitApi).getFluidTopicsMessageContext(o,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends br{constructor(){super(async(o,e)=>(await this.awaitApi).getCustomMessageContext(o,e))}});var ri=window.FluidTopicsI18nService,Zu=window.FluidTopicsCustomI18nService;var oi=C(L()),Ro=class{highlightHtml(e,r,n){(0,oi.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Ro;var ni=C(L());var Lo=class{isDate(e){var r,n,a,s;return(s=(a=((n=(r=O.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===e))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1}format(e,r){var n,a,s,c;if(e==null)return"";try{return ni.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:O.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(c=r?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(e)} is not valid`,d),d}}};window.FluidTopicsDateService=new Lo;var ai=C(L());var Mt=class{static get(e,r){var n,a;let s=O.getState(),{lang:c,region:d}=(a=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new ai.SearchPlaceConverter(s.baseUrl,e??20,s.searchInAllLanguagesAllowed,r??`${c}-${d}`)}};var vr=class extends Z{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([n,a])=>Array.isArray(a)?[n,a.map(s=>typeof s=="object"&&s!=null&&!Array.isArray(s)?this.sortEventArrays(s):s).sort((s,c)=>typeof s=="object"&&s!==null&&"key"in s?s.key.localeCompare(c.key):typeof s=="string"&&typeof c=="string"?s.localeCompare(c):String(s).localeCompare(String(c)))]:typeof a=="object"&&a!==null?[n,this.sortEventArrays(a)]:[n,a]);return Object.fromEntries(r)}sendEvents(e,r){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(a=>(console.info(r),console.debug(a),n)),1e3)}};var _o=class{urlToSearchRequest(e){return Mt.get().parse(e)}searchRequestToUrl(e){return Mt.get().serialize(e)}};window.FluidTopicsUrlService=new _o;var Se=C(L());var Ge=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:{currentItem:e}})}};Ge.eventName="change";var ko=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},ii=new ko;var xr=class o extends Se.WithEventBus{static build(){return new o(window.history,ii,()=>window.location,!1)}constructor(e,r,n,a){var s,c;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(c=(s=e.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Se.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ge(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[s,c,d])=>{let u=r(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(a,[p,c,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Ge.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ge.eventName,e)}currentItem(){return(0,Se.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Se.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Se.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Se.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let a=e,s=e+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(a=s),s++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,s=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:o=>window.FluidTopicsInternalHistoryService.backwardItemMatching(o),addHistoryChangeListener:o=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(o),removeHistoryChangeListener:o=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(o)});var si=C(j());var ci=si.css`
49
+ `;var Ft=C(j()),je=C(J()),z=C(L());var ee=C(L());var vn=C(L()),ks={setTranslationDestinationLanguage:(o,e)=>{o.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(o,e)=>{o.translation.sourceLanguage=e.payload},setTranslationProfileId:(o,e)=>{o.translation.profileId=e.payload},setTranslationLoading:(o,e)=>{o.translation.isLoading=e.payload},setTranslationError:(o,e)=>{o.translation.isError=e.payload},setTopicsRating:(o,e)=>{for(let r in e.payload)o.topicsRating[r]=e.payload[r]}},xn=o=>vn.FtReduxStore.get({name:"ft-reader-"+o,initialState:{mapId:void 0,renderedTopics:[],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,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:ks});var qr=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},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,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,r,n){return e.flatMap(a=>{var s;return a.pageConfiguration&&this.registerPage(this.buildPage(a,n)),a.tocId==null?this.extractPagesToc(a.children,r,n):[{tocId:a.tocId,title:(s=a.title)!==null&&s!==void 0?s:"",untranslatedTitle:a.untranslatedTitle,depth:r,children:this.extractPagesToc(a.children,r+1,a.tocId)}]})}convertNodes(e,r,n){return e.flatMap(a=>{var s,c,d;if(a.tocId==null)return[...this.convertSectionNodes((s=a.pageToc)!==null&&s!==void 0?s:[],r,a.tocId),...this.convertNodes(a.children,r,a.tocId)];let u=(c=a.prettyUrl)===null||c===void 0?void 0:c.replace(/^\//,""),p={tocId:a.tocId,contentId:a.contentId,title:a.title,untranslatedTitle:a.untranslatedTitle,hasRating:a.hasRating,origin:a.origin,prettyUrl:u,depth:r,parentTocId:n,children:[]};this.register(p);let h=this.convertSectionNodes((d=a.pageToc)!==null&&d!==void 0?d:[],r+1,a.tocId),y=this.convertNodes(a.children,r+1,p.tocId);return p.children=[...h,...y],[p]})}convertSectionNodes(e,r,n){return e.flatMap(a=>{var s;let c=(s=a.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),d={...a,prettyUrl:c,depth:r,parentTocId:n,children:[]};return this.register(d),d.children=this.convertSectionNodes(a.children,r+1,a.tocId),[d]})}buildPage(e,r){var n,a,s,c,d,u,p,h;let y={number:this.pages.length+1,title:(n=e.title)!==null&&n!==void 0?n:"",untranslatedTitle:e.untranslatedTitle,rootTocId:(c=(a=e.tocId)!==null&&a!==void 0?a:(s=e.pageToc)===null||s===void 0?void 0:s[0].tocId)!==null&&c!==void 0?c:"root",toc:((d=e.pageToc)!==null&&d!==void 0?d:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},m=(b,S)=>(S?y.topics:y.hiddenTopics).push(b),v=(p=(u=e.pageConfiguration)===null||u===void 0?void 0:u.parentsVisibility)!==null&&p!==void 0?p:[];return y.breadcrumb.forEach((b,S)=>{m(b,v[S])}),e.tocId&&m(e.tocId,e.pageConfiguration.isVisible),y.topics.push(...this.tocIds((h=e.pageToc)!==null&&h!==void 0?h:[])),y}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},Kt=class{convertPaginatedToc(e,r){return new qr(e,r).build()}};var Ps=C(Cn(),1);var On;(function(o){o.black="black",o.green="green",o.blue="blue",o.purple="purple",o.red="red",o.orange="orange",o.yellow="yellow"})(On||(On={}));var An;(function(o){o.OFFICIAL="OFFICIAL",o.PERSONAL="PERSONAL",o.SHARED="SHARED"})(An||(An={}));var En;(function(o){o.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",o.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",o.PERSONAL_BOOK="PERSONAL_BOOK",o.ATTACHMENT="ATTACHMENT",o.RESOURCE="RESOURCE",o.HTML_PACKAGE="HTML_PACKAGE"})(En||(En={}));var wn;(function(o){o.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",o.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",o.PERSONAL_BOOK="PERSONAL_BOOK",o.ATTACHMENT="ATTACHMENT",o.RESOURCE="RESOURCE",o.HTML_PACKAGE="HTML_PACKAGE"})(wn||(wn={}));var In;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR"})(In||(In={}));var Tn;(function(o){o.VALUE="VALUE",o.DATE="DATE",o.RANGE="RANGE"})(Tn||(Tn={}));var Yt;(function(o){o.OFFICIAL="OFFICIAL",o.AI="AI"})(Yt||(Yt={}));var Rn;(function(o){o.BOOKMARK__CREATE="BOOKMARK__CREATE",o.BOOKMARK__DELETE="BOOKMARK__DELETE",o.CASE_DEFLECTION__START="CASE_DEFLECTION__START",o.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",o.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",o.CHATBOT__RATE="CHATBOT__RATE",o.COLLECTION__CREATE="COLLECTION__CREATE",o.COLLECTION__UPDATE="COLLECTION__UPDATE",o.COLLECTION__DELETE="COLLECTION__DELETE",o.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",o.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",o.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",o.DOCUMENT__PRINT="DOCUMENT__PRINT",o.DOCUMENT__PROCESS="DOCUMENT__PROCESS",o.DOCUMENT__RATE="DOCUMENT__RATE",o.DOCUMENT__SEARCH="DOCUMENT__SEARCH",o.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",o.DOCUMENT__UNRATE="DOCUMENT__UNRATE",o.FEEDBACK__SEND="FEEDBACK__SEND",o.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",o.AI__RATE="AI__RATE",o.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",o.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",o.KHUB__PROCESS="KHUB__PROCESS",o.KHUB__SEARCH="KHUB__SEARCH",o.LABELS__DOWNLOAD="LABELS__DOWNLOAD",o.LINK__SHARE="LINK__SHARE",o.PAGE__DISPLAY="PAGE__DISPLAY",o.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",o.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",o.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",o.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",o.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",o.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",o.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",o.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",o.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",o.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",o.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",o.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",o.TOPIC__RATE="TOPIC__RATE",o.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",o.TOPIC__UNRATE="TOPIC__UNRATE",o.USER__LOGIN="USER__LOGIN",o.USER__LOGOUT="USER__LOGOUT",o.HEARTBEAT="HEARTBEAT"})(Rn||(Rn={}));var Ln;(function(o){o.STANDARD="STANDARD",o.STRUCTURAL="STRUCTURAL"})(Ln||(Ln={}));var _n;(function(o){o.THIRD_PARTY="THIRD_PARTY",o.OFF_THE_GRID="OFF_THE_GRID",o.CONTENT_PACKAGER="CONTENT_PACKAGER",o.PAGES="PAGES",o.DESIGNED_READER="DESIGNED_READER"})(_n||(_n={}));var kn;(function(o){o.HOMEPAGE="HOMEPAGE",o.CUSTOM="CUSTOM",o.HEADER="HEADER",o.READER="READER",o.TOPIC_TEMPLATE="TOPIC_TEMPLATE",o.SEARCH="SEARCH",o.SEARCH_RESULT="SEARCH_RESULT",o.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",o.LINK_PREVIEW="LINK_PREVIEW",o.UD_VIEWER="UD_VIEWER",o.ASSET_VIEWER="ASSET_VIEWER"})(kn||(kn={}));var Nn;(function(o){o.CLASSIC="CLASSIC",o.CUSTOM="CUSTOM",o.DESIGNER="DESIGNER"})(Nn||(Nn={}));var Pn;(function(o){o.AND="AND",o.OR="OR",o.MONOVALUED="MONOVALUED"})(Pn||(Pn={}));var Dn;(function(o){o.NONE="NONE",o.ALPHABET="ALPHABET",o.VERSION="VERSION"})(Dn||(Dn={}));var Mn;(function(o){o.STARS="STARS",o.LIKE="LIKE",o.DICHOTOMOUS="DICHOTOMOUS",o.NO_RATING="NO_RATING"})(Mn||(Mn={}));var Fn;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR",o.CUSTOM="CUSTOM"})(Fn||(Fn={}));var Un;(function(o){o.OPTIONAL="OPTIONAL",o.MANDATORY="MANDATORY"})(Un||(Un={}));var Bn;(function(o){o.ASC="ASC",o.DESC="DESC"})(Bn||(Bn={}));var Hn;(function(o){o.ALPHA="ALPHA",o.NATURAL="NATURAL"})(Hn||(Hn={}));var zn;(function(o){o.EVERYWHERE="EVERYWHERE",o.TITLE_ONLY="TITLE_ONLY",o.NONE="NONE"})(zn||(zn={}));var Gn;(function(o){o.ARTICLE="ARTICLE",o.BOOK="BOOK",o.SHARED_BOOK="SHARED_BOOK",o.HTML_PACKAGE="HTML_PACKAGE"})(Gn||(Gn={}));var $n;(function(o){o.FLUIDTOPICS="FLUIDTOPICS",o.EXTERNAL="EXTERNAL"})($n||($n={}));var Wn;(function(o){o.MAP="MAP",o.DOCUMENT="DOCUMENT",o.TOPIC="TOPIC",o.PERSONAL_BOOK="PERSONAL_BOOK",o.SHARED_BOOK="SHARED_BOOK",o.HTML_PACKAGE="HTML_PACKAGE"})(Wn||(Wn={}));var jn;(function(o){o.LAST_WEEK="LAST_WEEK",o.LAST_MONTH="LAST_MONTH",o.LAST_QUARTER="LAST_QUARTER",o.LAST_YEAR="LAST_YEAR"})(jn||(jn={}));var Vn;(function(o){o.MAP="MAP",o.DOCUMENT="DOCUMENT",o.TOPIC="TOPIC",o.HTML_PACKAGE="HTML_PACKAGE",o.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Vn||(Vn={}));var Kn;(function(o){o.DEFAULT="DEFAULT",o.DOCUMENTS="DOCUMENTS",o.ALL_TOPICS="ALL_TOPICS",o.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Kn||(Kn={}));var Zn;(function(o){o.PLAIN_TEXT="PLAIN_TEXT",o.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",o.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zn||(Zn={}));var P;(function(o){o.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",o.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",o.HTML_EXPORT_USER="HTML_EXPORT_USER",o.PDF_EXPORT_USER="PDF_EXPORT_USER",o.SAVED_SEARCH_USER="SAVED_SEARCH_USER",o.COLLECTION_USER="COLLECTION_USER",o.OFFLINE_USER="OFFLINE_USER",o.ANALYTICS_USER="ANALYTICS_USER",o.BETA_USER="BETA_USER",o.DEBUG_USER="DEBUG_USER",o.PRINT_USER="PRINT_USER",o.RATING_USER="RATING_USER",o.FEEDBACK_USER="FEEDBACK_USER",o.GENERATIVE_AI_USER="GENERATIVE_AI_USER",o.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",o.CONTENT_PUBLISHER="CONTENT_PUBLISHER",o.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",o.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",o.KHUB_ADMIN="KHUB_ADMIN",o.USERS_ADMIN="USERS_ADMIN",o.PORTAL_ADMIN="PORTAL_ADMIN",o.ADMIN="ADMIN"})(P||(P={}));var se;(function(o){o.SEARCHES="SEARCHES",o.BOOKMARKS="BOOKMARKS",o.BOOKS="BOOKS",o.COLLECTIONS="COLLECTIONS"})(se||(se={}));var qn;(function(o){o.UNAUTHENTICATED="UNAUTHENTICATED",o.USER_INCOMPLETE="USER_INCOMPLETE",o.MFA_REQUIRED="MFA_REQUIRED",o.AUTHENTICATED="AUTHENTICATED"})(qn||(qn={}));var Yn;(function(o){o.VALID="VALID",o.INVALID="INVALID"})(Yn||(Yn={}));var Qn;(function(o){o.INACCURATE="INACCURATE",o.INCOMPLETE="INCOMPLETE",o.OFF_TOPIC="OFF_TOPIC",o.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",o.SUMMARY="SUMMARY",o.SEMANTIC_SEARCH="SEMANTIC_SEARCH",o.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",o.OTHER="OTHER"})(Qn||(Qn={}));var Xn;(function(o){o.INACCURATE="INACCURATE",o.INCOMPLETE="INCOMPLETE",o.OFF_TOPIC="OFF_TOPIC",o.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",o.SLOW="SLOW",o.OTHER="OTHER"})(Xn||(Xn={}));var Jn;(function(o){o.JSON="JSON",o.TEXT="TEXT"})(Jn||(Jn={}));var ea;(function(o){o.JSON="JSON",o.TEXT="TEXT"})(ea||(ea={}));var ta;(function(o){o.USER="USER",o.ASSISTANT="ASSISTANT"})(ta||(ta={}));var ra;(function(o){o.TEXT="TEXT",o.HTML="HTML"})(ra||(ra={}));var oa;(function(o){o.HTML="HTML",o.MARKDOWN="MARKDOWN"})(oa||(oa={}));var na;(function(o){o.MAP="MAP",o.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(na||(na={}));var Ns={[P.PERSONAL_BOOK_SHARE_USER]:[P.PERSONAL_BOOK_USER],[P.HTML_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.PDF_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.KHUB_ADMIN]:[P.CONTENT_PUBLISHER],[P.ADMIN]:[P.KHUB_ADMIN,P.USERS_ADMIN,P.PORTAL_ADMIN,P.BEHAVIOR_DATA_USER],[P.GENERATIVE_AI_EXPORT_USER]:[P.GENERATIVE_AI_USER]};function aa(o,e){return o===e||(Ns[o]??[]).some(r=>aa(r,e))}function be(o,e){return o==null?!1:(Array.isArray(o)?o:Array.isArray(o.roles)?o.roles:Array.isArray(o.profile?.roles)?o.profile.roles:[]).some(n=>aa(n,e))}var Co=C(J());var ia=C(J(),1);var Yr=o=>e=>{window.customElements.get(o)||window.customElements.define(o,e)};function sa(o,e){return(0,ia.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Rt(o);try{return JSON.parse(r)}catch{return Rt(o)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Lt,...e??{}})}function Ds(o,e){if(o===e)return!0;if(o&&e&&typeof o=="object"&&typeof e=="object"){if(o.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(o)){if(r=o.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qt(o[n],e[n]))return!1;return!0}if(o instanceof Map&&e instanceof Map){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;for(n of o.entries())if(!Qt(n[1],e.get(n[0])))return!1;return!0}if(o instanceof Set&&e instanceof Set){if(o.size!==e.size)return!1;for(n of o.entries())if(!e.has(n[0]))return!1;return!0}if(o.constructor===RegExp)return o.source===e.source&&o.flags===e.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===e.valueOf();let a=c=>Object.keys(c).filter(d=>c[d]!=null),s=a(o);if(r=s.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){let c=s[n];if(!Qt(o[c],e[c]))return!1}return!0}return o!==o&&e!==e||o==null&&e==null}function Qt(o,e){try{return Ds(o,e)}catch{return!1}}function Lt(o,e){return!Qt(o,e)}function Rt(o){return typeof window.structuredClone=="function"?structuredClone(o):o!=null?JSON.parse(JSON.stringify(o)):o}function Xt(o,e){let r=n=>n[o]===!0;return n=>{if(r(n))return n;let a=e(n);return a[o]=!0,a}}var ca=C(J(),1);var Qr=o=>{let e=o??{};return(r,n)=>{var a;let s={hasChanged:Lt,attribute:!1,...e};(0,ca.property)(s)(r,n);let c=r.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(d=>d[n]),store:e.store})}};var Jt=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Fe=C(J(),1);var er=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let c of n)try{await c()}catch(d){a(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var da=C(j(),1);var tr=globalThis,Ms=tr.ShadowRoot&&(tr.ShadyCSS===void 0||tr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var la=(o,e)=>{if(Ms)o.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),a=tr.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,o.appendChild(n)}};var rr=class extends da.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return la(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Yr(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ua(o,e,...r){var n;let a=o.querySelector(e);for(let s of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return a}var at=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},ya,pa=Symbol("constructorPrototype"),fa=Symbol("constructorName"),ga=Symbol("exportpartsDebouncer"),ha=Symbol("dynamicDependenciesLoaded"),nt=class o extends CustomEvent{constructor(){super(o.eventName,{bubbles:!0})}};nt.eventName="exportparts-updated";var ye=class extends rr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ya]=new er(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ga].run(()=>{var a,s;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[fa]=this.constructor.name,this[pa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fa]&&Object.setPrototypeOf(this,this[pa])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[ha]||(r[ha]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(nt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(nt.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new nt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let s=[...a??[],n];r=ua(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(e){var r,n,a,s,c,d;let u=m=>m!=null&&m.trim().length>0,p=e.filter(u).map(m=>m.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&s!==void 0?s:[],b=(d=(c=m.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(m=>p.map(v=>`${m}:${v}--${m}`));this.exportparts=[...this.part,...y].join(", ")}};ya=ga;at([(0,Fe.property)()],ye.prototype,"exportpartsPrefix",void 0);at([sa([])],ye.prototype,"exportpartsPrefixes",void 0);at([(0,Fe.property)({reflect:!0})],ye.prototype,"exportparts",void 0);at([(0,Fe.property)()],ye.prototype,"customStylesheet",void 0);at([(0,Fe.property)()],ye.prototype,"elementToFocus",void 0);at([(0,Fe.state)()],ye.prototype,"useAdoptedStyleSheets",void 0);function or(o){var e;return(e=o?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _t=Symbol("internalReduxEventsUnsubscribers"),we=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),Fs=Xt(Symbol("withRedux"),function(o){var e,r,n;class a extends o{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ue].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ue].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ue].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[we].has(c.store):this[we].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[we].set(c,d.subscribe(()=>this.updateFromStores())),this[_t].set(c,[]),or(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=m=>this[h](m);d.addEventListener(p.eventName,y),this[_t].get(c).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[we].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[we].has(c)&&this[we].get(c)(),this[we].delete(c),(d=this[_t].get(c))===null||d===void 0||d.forEach(u=>u()),this[_t].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=we,r=Ue,n=_t,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ma=class extends Fs(ye){};function ce(o){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,s;throw Error("[Immer] minified error nr: "+o+(r.length?" "+r.map((function(c){return"'"+c+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(o){return!!o&&!!o[M]}function pe(o){var e;return!!o&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===js})(o)||Array.isArray(o)||!!o[Aa]||!!(!((e=o.constructor)===null||e===void 0)&&e[Aa])||io(o)||so(o))}function Be(o,e,r){r===void 0&&(r=!1),ct(o)===0?(r?Object.keys:st)(o).forEach((function(n){r&&typeof n=="symbol"||e(n,o[n],o)})):o.forEach((function(n,a){return e(a,n,o)}))}function ct(o){var e=o[M];return e?e.i>3?e.i-4:e.i:Array.isArray(o)?1:io(o)?2:so(o)?3:0}function it(o,e){return ct(o)===2?o.has(e):Object.prototype.hasOwnProperty.call(o,e)}function Us(o,e){return ct(o)===2?o.get(e):o[e]}function Ea(o,e,r){var n=ct(o);n===2?o.set(e,r):n===3?o.add(r):o[e]=r}function wa(o,e){return o===e?o!==0||1/o==1/e:o!=o&&e!=e}function io(o){return $s&&o instanceof Map}function so(o){return Ws&&o instanceof Set}function Ie(o){return o.o||o.t}function co(o){if(Array.isArray(o))return Array.prototype.slice.call(o);var e=Ra(o);delete e[M];for(var r=st(e),n=0;n<r.length;n++){var a=r[n],s=e[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(e[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:o[a]})}return Object.create(Object.getPrototypeOf(o),e)}function lo(o,e){return e===void 0&&(e=!1),uo(o)||ve(o)||!pe(o)||(ct(o)>1&&(o.set=o.add=o.clear=o.delete=Bs),Object.freeze(o),e&&Be(o,(function(r,n){return lo(n,!0)}),!0)),o}function Bs(){ce(2)}function uo(o){return o==null||typeof o!="object"||Object.isFrozen(o)}function ge(o){var e=ao[o];return e||ce(18,o),e}function Hs(o,e){ao[o]||(ao[o]=e)}function ro(){return Nt}function Xr(o,e){e&&(ge("Patches"),o.u=[],o.s=[],o.v=e)}function nr(o){oo(o),o.p.forEach(zs),o.p=null}function oo(o){o===Nt&&(Nt=o.l)}function ba(o){return Nt={p:[],l:Nt,h:o,m:!0,_:0}}function zs(o){var e=o[M];e.i===0||e.i===1?e.j():e.g=!0}function Jr(o,e){e._=e.p.length;var r=e.p[0],n=o!==void 0&&o!==r;return e.h.O||ge("ES5").S(e,o,n),n?(r[M].P&&(nr(e),ce(4)),pe(o)&&(o=ar(e,o),e.l||ir(e,o)),e.u&&ge("Patches").M(r[M].t,o,e.u,e.s)):o=ar(e,r,[]),nr(e),e.u&&e.v(e.u,e.s),o!==Ta?o:void 0}function ar(o,e,r){if(uo(e))return e;var n=e[M];if(!n)return Be(e,(function(d,u){return va(o,n,e,d,u,r)}),!0),e;if(n.A!==o)return e;if(!n.P)return ir(o,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=co(n.k):n.o,s=a,c=!1;n.i===3&&(s=new Set(a),a.clear(),c=!0),Be(s,(function(d,u){return va(o,n,a,d,u,r,c)})),ir(o,a,!1),r&&o.u&&ge("Patches").N(n,r,o.u,o.s)}return n.o}function va(o,e,r,n,a,s,c){if(ve(a)){var d=ar(o,a,s&&e&&e.i!==3&&!it(e.R,n)?s.concat(n):void 0);if(Ea(r,n,d),!ve(d))return;o.m=!1}else c&&r.add(a);if(pe(a)&&!uo(a)){if(!o.h.D&&o._<1)return;ar(o,a),e&&e.A.l||ir(o,a)}}function ir(o,e,r){r===void 0&&(r=!1),!o.l&&o.h.D&&o.m&&lo(e,r)}function eo(o,e){var r=o[M];return(r?Ie(r):o)[e]}function xa(o,e){if(e in o)for(var r=Object.getPrototypeOf(o);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(o){o.P||(o.P=!0,o.l&&Te(o.l))}function to(o){o.o||(o.o=co(o.t))}function no(o,e,r){var n=io(e)?ge("MapSet").F(e,r):so(e)?ge("MapSet").T(e,r):o.O?(function(a,s){var c=Array.isArray(a),d={i:c?1:0,A:s?s.A:ro(),P:!1,I:!1,R:{},l:s,t:a,k:null,o:null,j:null,C:!1},u=d,p=Pt;c&&(u=[d],p=kt);var h=Proxy.revocable(u,p),y=h.revoke,m=h.proxy;return d.k=m,d.j=y,m})(e,r):ge("ES5").J(e,r);return(r?r.A:ro()).p.push(n),n}function Gs(o){return ve(o)||ce(22,o),(function e(r){if(!pe(r))return r;var n,a=r[M],s=ct(r);if(a){if(!a.P&&(a.i<4||!ge("ES5").K(a)))return a.t;a.I=!0,n=Sa(r,s),a.I=!1}else n=Sa(r,s);return Be(n,(function(c,d){a&&Us(a.t,c)===d||Ea(n,c,e(d))})),s===3?new Set(n):n})(o)}function Sa(o,e){switch(e){case 2:return new Map(o);case 3:return Array.from(o)}return co(o)}function Ia(){function o(c,d){var u=s[c];return u?u.enumerable=d:s[c]=u={configurable:!0,enumerable:d,get:function(){var p=this[M];return Pt.get(p,c)},set:function(p){var h=this[M];Pt.set(h,c,p)}},u}function e(c){for(var d=c.length-1;d>=0;d--){var u=c[d][M];if(!u.P)switch(u.i){case 5:n(u)&&Te(u);break;case 4:r(u)&&Te(u)}}}function r(c){for(var d=c.t,u=c.k,p=st(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==M){var m=d[y];if(m===void 0&&!it(d,y))return!0;var v=u[y],b=v&&v[M];if(b?b.t!==m:!wa(v,m))return!0}}var S=!!d[M];return p.length!==st(d).length+(S?0:1)}function n(c){var d=c.k;if(d.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&ce(3,JSON.stringify(Ie(c)))}var s={};Hs("ES5",{J:function(c,d){var u=Array.isArray(c),p=(function(y,m){if(y){for(var v=Array(m.length),b=0;b<m.length;b++)Object.defineProperty(v,""+b,o(b,!0));return v}var S=Ra(m);delete S[M];for(var w=st(S),I=0;I<w.length;I++){var T=w[I];S[T]=o(T,y||!!S[T].enumerable)}return Object.create(Object.getPrototypeOf(m),S)})(u,c),h={i:u?5:4,A:d?d.A:ro(),P:!1,I:!1,R:{},l:d,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,M,{value:h,writable:!0}),p},S:function(c,d,u){u?ve(d)&&d[M].A===c&&e(c.p):(c.u&&(function p(h){if(h&&typeof h=="object"){var y=h[M];if(y){var m=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Be(v,(function(_){_!==M&&(m[_]!==void 0||it(m,_)?b[_]||p(v[_]):(b[_]=!0,Te(y)))})),Be(m,(function(_){v[_]!==void 0||it(v,_)||(b[_]=!1,Te(y))}));else if(S===5){if(n(y)&&(Te(y),b.length=!0),v.length<m.length)for(var w=v.length;w<m.length;w++)b[w]=!1;else for(var I=m.length;I<v.length;I++)b[I]=!0;for(var T=Math.min(v.length,m.length),D=0;D<T;D++)v.hasOwnProperty(D)||(b[D]=!0),b[D]===void 0&&p(v[D])}}}})(c.p[0]),e(c.p))},K:function(c){return c.i===4?r(c):n(c)}})}var Ca,Nt,po=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$s=typeof Map<"u",Ws=typeof Set<"u",Oa=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ta=po?Symbol.for("immer-nothing"):((Ca={})["immer-nothing"]=!0,Ca),Aa=po?Symbol.for("immer-draftable"):"__$immer_draftable",M=po?Symbol.for("immer-state"):"__$immer_state";var js=""+Object.prototype.constructor,st=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:Object.getOwnPropertyNames,Ra=Object.getOwnPropertyDescriptors||function(o){var e={};return st(o).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(o,r)})),e},ao={},Pt={get:function(o,e){if(e===M)return o;var r=Ie(o);if(!it(r,e))return(function(a,s,c){var d,u=xa(s,c);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(a.k):void 0})(o,r,e);var n=r[e];return o.I||!pe(n)?n:n===eo(o.t,e)?(to(o),o.o[e]=no(o.A.h,n,o)):n},has:function(o,e){return e in Ie(o)},ownKeys:function(o){return Reflect.ownKeys(Ie(o))},set:function(o,e,r){var n=xa(Ie(o),e);if(n?.set)return n.set.call(o.k,r),!0;if(!o.P){var a=eo(Ie(o),e),s=a?.[M];if(s&&s.t===r)return o.o[e]=r,o.R[e]=!1,!0;if(wa(r,a)&&(r!==void 0||it(o.t,e)))return!0;to(o),Te(o)}return o.o[e]===r&&(r!==void 0||e in o.o)||Number.isNaN(r)&&Number.isNaN(o.o[e])||(o.o[e]=r,o.R[e]=!0),!0},deleteProperty:function(o,e){return eo(o.t,e)!==void 0||e in o.t?(o.R[e]=!1,to(o),Te(o)):delete o.R[e],o.o&&delete o.o[e],!0},getOwnPropertyDescriptor:function(o,e){var r=Ie(o),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:o.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){ce(11)},getPrototypeOf:function(o){return Object.getPrototypeOf(o.t)},setPrototypeOf:function(){ce(12)}},kt={};Be(Pt,(function(o,e){kt[o]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),kt.deleteProperty=function(o,e){return kt.set.call(this,o,e,void 0)},kt.set=function(o,e,r){return Pt.set.call(this,o[0],e,r,o[0])};var Vs=(function(){function o(r){var n=this;this.O=Oa,this.D=!0,this.produce=function(a,s,c){if(typeof a=="function"&&typeof s!="function"){var d=s;s=a;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var I=arguments.length,T=Array(I>1?I-1:0),D=1;D<I;D++)T[D-1]=arguments[D];return u.produce(S,(function(_){var $;return($=s).call.apply($,[w,_].concat(T))}))}}var p;if(typeof s!="function"&&ce(6),c!==void 0&&typeof c!="function"&&ce(7),pe(a)){var h=ba(n),y=no(n,a,void 0),m=!0;try{p=s(y),m=!1}finally{m?nr(h):oo(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Xr(h,c),Jr(S,h)}),(function(S){throw nr(h),S})):(Xr(h,c),Jr(p,h))}if(!a||typeof a!="object"){if((p=s(a))===void 0&&(p=a),p===Ta&&(p=void 0),n.D&&lo(p,!0),c){var v=[],b=[];ge("Patches").M(a,p,v,b),c(v,b)}return p}ce(21,a)},this.produceWithPatches=function(a,s){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(y))}))};var c,d,u=n.produce(a,s,(function(p,h){c=p,d=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,c,d]})):[u,c,d]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=o.prototype;return e.createDraft=function(r){pe(r)||ce(8),ve(r)&&(r=Gs(r));var n=ba(this),a=no(this,r,void 0);return a[M].C=!0,oo(n),a},e.finishDraft=function(r,n){var a=r&&r[M],s=a.A;return Xr(s,n),Jr(void 0,s)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Oa&&ce(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var s=n[a];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}a>-1&&(n=n.slice(a+1));var c=ge("Patches").$;return ve(r)?c(r,n):this.produce(r,(function(d){return c(d,n)}))},o})(),re=new Vs,Ks=re.produce,od=re.produceWithPatches.bind(re),nd=re.setAutoFreeze.bind(re),ad=re.setUseProxies.bind(re),id=re.applyPatches.bind(re),sd=re.createDraft.bind(re),cd=re.finishDraft.bind(re),sr=Ks;function He(o){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(o)}function La(o,e){if(He(o)!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,e||"default");if(He(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function _a(o){var e=La(o,"string");return He(e)=="symbol"?e:e+""}function ka(o,e,r){return(e=_a(e))in o?Object.defineProperty(o,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[e]=r,o}function Na(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),r.push.apply(r,n)}return r}function fo(o){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Na(Object(r),!0).forEach(function(n){ka(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function K(o){return"Minified Redux error #"+o+"; visit https://redux.js.org/Errors?code="+o+" for the full message or use the non-minified dev environment for full errors. "}var Pa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ho=function(){return Math.random().toString(36).substring(7).split("").join(".")},cr={INIT:"@@redux/INIT"+ho(),REPLACE:"@@redux/REPLACE"+ho(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ho()}};function Zs(o){if(typeof o!="object"||o===null)return!1;for(var e=o;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(o)===e}function yo(o,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(K(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(K(1));return r(yo)(o,e)}if(typeof o!="function")throw new Error(K(2));var a=o,s=e,c=[],d=c,u=!1;function p(){d===c&&(d=c.slice())}function h(){if(u)throw new Error(K(3));return s}function y(S){if(typeof S!="function")throw new Error(K(4));if(u)throw new Error(K(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(K(6));w=!1,p();var T=d.indexOf(S);d.splice(T,1),c=null}}}function m(S){if(!Zs(S))throw new Error(K(7));if(typeof S.type>"u")throw new Error(K(8));if(u)throw new Error(K(9));try{u=!0,s=a(s,S)}finally{u=!1}for(var w=c=d,I=0;I<w.length;I++){var T=w[I];T()}return S}function v(S){if(typeof S!="function")throw new Error(K(10));a=S,m({type:cr.REPLACE})}function b(){var S,w=y;return S={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(K(11));function D(){T.next&&T.next(h())}D();var _=w(D);return{unsubscribe:_}}},S[Pa]=function(){return this},S}return m({type:cr.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:v},n[Pa]=b,n}function qs(o){Object.keys(o).forEach(function(e){var r=o[e],n=r(void 0,{type:cr.INIT});if(typeof n>"u")throw new Error(K(12));if(typeof r(void 0,{type:cr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(K(13))})}function Da(o){for(var e=Object.keys(o),r={},n=0;n<e.length;n++){var a=e[n];typeof o[a]=="function"&&(r[a]=o[a])}var s=Object.keys(r),c,d;try{qs(r)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var m=!1,v={},b=0;b<s.length;b++){var S=s[b],w=r[S],I=p[S],T=w(I,h);if(typeof T>"u"){var D=h&&h.type;throw new Error(K(14))}v[S]=T,m=m||T!==I}return m=m||s.length!==Object.keys(p).length,m?v:p}}function lt(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ma(){for(var o=arguments.length,e=new Array(o),r=0;r<o;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),s=function(){throw new Error(K(15))},c={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=e.map(function(u){return u(c)});return s=lt.apply(void 0,d)(a.dispatch),fo(fo({},a),{},{dispatch:s})}}}function Fa(o){var e=function(n){var a=n.dispatch,s=n.getState;return function(c){return function(d){return typeof d=="function"?d(a,s,o):c(d)}}};return e}var Ua=Fa();Ua.withExtraArgument=Fa;var go=Ua;var $a=(function(){var o=function(e,r){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])},o(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ys=function(o,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(s=p[0]&2?a.return:p[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,p[1])).done)return s;switch(a=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){r.label=p[1];break}if(p[0]===6&&r.label<s[1]){r.label=s[1],s=p;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(p);break}s[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(o,r)}catch(h){p=[6,h],a=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},dt=function(o,e){for(var r=0,n=e.length,a=o.length;r<n;r++,a++)o[a]=e[r];return o},Qs=Object.defineProperty,Xs=Object.defineProperties,Js=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,ec=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,Ha=function(o,e,r){return e in o?Qs(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r},Re=function(o,e){for(var r in e||(e={}))ec.call(e,r)&&Ha(o,r,e[r]);if(Ba)for(var n=0,a=Ba(e);n<a.length;n++){var r=a[n];tc.call(e,r)&&Ha(o,r,e[r])}return o},mo=function(o,e){return Xs(o,Js(e))},rc=function(o,e,r){return new Promise(function(n,a){var s=function(u){try{d(r.next(u))}catch(p){a(p)}},c=function(u){try{d(r.throw(u))}catch(p){a(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,c)};d((r=r.apply(o,e)).next())})};var oc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?lt:lt.apply(null,arguments)},wd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(o){return o}};function nc(o){if(typeof o!="object"||o===null)return!1;var e=Object.getPrototypeOf(o);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Le(o,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var s=e.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return Re(Re({type:o,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:o,payload:n[0]}}return r.toString=function(){return""+o},r.type=o,r.match=function(n){return n.type===o},r}var ac=(function(o){$a(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,dt([void 0],r[0].concat(this)))):new(e.bind.apply(e,dt([void 0],r.concat(this))))},e})(Array),ic=(function(o){$a(e,o);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,dt([void 0],r[0].concat(this)))):new(e.bind.apply(e,dt([void 0],r.concat(this))))},e})(Array);function xo(o){return pe(o)?sr(o,function(){}):o}function sc(o){return typeof o=="boolean"}function cc(){return function(e){return lc(e)}}function lc(o){o===void 0&&(o={});var e=o.thunk,r=e===void 0?!0:e,n=o.immutableCheck,a=n===void 0?!0:n,s=o.serializableCheck,c=s===void 0?!0:s,d=o.actionCreatorCheck,u=d===void 0?!0:d,p=new ac;if(r&&(sc(r)?p.push(go):p.push(go.withExtraArgument(r.extraArgument))),0){if(a)var h;if(c)var y;if(u)var m}return p}var bo=!0;function Wa(o){var e=cc(),r=o||{},n=r.reducer,a=n===void 0?void 0:n,s=r.middleware,c=s===void 0?e():s,d=r.devTools,u=d===void 0?!0:d,p=r.preloadedState,h=p===void 0?void 0:p,y=r.enhancers,m=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(nc(a))v=Da(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=c;if(typeof b=="function"&&(b=b(e),!bo&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bo&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Ma.apply(void 0,b),w=lt;u&&(w=oc(Re({trace:!bo},typeof u=="object"&&u)));var I=new ic(S),T=I;Array.isArray(m)?T=dt([S],m):typeof m=="function"&&(T=m(I));var D=w.apply(void 0,T);return yo(v,h,D)}function ja(o){var e={},r=[],n,a={addCase:function(s,c){var d=typeof s=="string"?s:s.type;if(!d)throw new Error("`builder.addCase` cannot be called with an empty action type");if(d in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[d]=c,a},addMatcher:function(s,c){return r.push({matcher:s,reducer:c}),a},addDefaultCase:function(s){return n=s,a}};return o(a),[e,r,n]}function dc(o){return typeof o=="function"}function uc(o,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?ja(e):[e,r,n],s=a[0],c=a[1],d=a[2],u;if(dc(o))u=function(){return xo(o())};else{var p=xo(o);u=function(){return p}}function h(y,m){y===void 0&&(y=u());var v=dt([s[m.type]],c.filter(function(b){var S=b.matcher;return S(m)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(ve(b)){var w=b,I=S(w,m);return I===void 0?b:I}else{if(pe(b))return sr(b,function(T){return S(T,m)});var I=S(b,m);if(I===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return b},y)}return h.getInitialState=u,h}function pc(o,e){return o+"/"+e}function Va(o){var e=o.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof o.initialState=="function"?o.initialState:xo(o.initialState),n=o.reducers||{},a=Object.keys(n),s={},c={},d={};a.forEach(function(h){var y=n[h],m=pc(e,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,c[m]=v,d[h]=b?Le(m,b):Le(m)});function u(){var h=typeof o.extraReducers=="function"?ja(o.extraReducers):[o.extraReducers],y=h[0],m=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,I=Re(Re({},m),c);return uc(r,function(T){for(var D in I)T.addCase(D,I[D]);for(var _=0,$=b;_<$.length;_++){var ue=$[_];T.addMatcher(ue.matcher,ue.reducer)}w&&T.addDefaultCase(w)})}var p;return{name:e,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var fc="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hc=function(o){o===void 0&&(o=21);for(var e="",r=o;r--;)e+=fc[Math.random()*64|0];return e},yc=["name","message","stack","code"],vo=(function(){function o(e,r){this.payload=e,this.meta=r}return o})(),za=(function(){function o(e,r){this.payload=e,this.meta=r}return o})(),gc=function(o){if(typeof o=="object"&&o!==null){for(var e={},r=0,n=yc;r<n.length;r++){var a=n[r];typeof o[a]=="string"&&(e[a]=o[a])}return e}return{message:String(o)}},Ld=(function(){function o(e,r,n){var a=Le(e+"/fulfilled",function(h,y,m,v){return{payload:h,meta:mo(Re({},v||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),s=Le(e+"/pending",function(h,y,m){return{payload:void 0,meta:mo(Re({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=Le(e+"/rejected",function(h,y,m,v,b){return{payload:v,error:(n&&n.serializeError||gc)(h||"Rejected"),meta:mo(Re({},b||{}),{arg:m,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(y,m,v){var b=n?.idGenerator?n.idGenerator(h):hc(),S=new u,w,I=!1;function T(_){w=_,S.abort()}var D=(function(){return rc(this,null,function(){var _,$,ue,Ne,X,Pe,Xe;return Ys(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),Ne=(_=n?.condition)==null?void 0:_.call(n,h,{getState:m,extra:v}),bc(Ne)?[4,Ne]:[3,2];case 1:Ne=f.sent(),f.label=2;case 2:if(Ne===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,X=new Promise(function(g,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:b,arg:h},{getState:m,extra:v}))),[4,Promise.race([X,Promise.resolve(r(h,{dispatch:y,getState:m,extra:v,requestId:b,signal:S.signal,abort:T,rejectWithValue:function(g,E){return new vo(g,E)},fulfillWithValue:function(g,E){return new za(g,E)}})).then(function(g){if(g instanceof vo)throw g;return g instanceof za?a(g.payload,b,h,g.meta):a(g,b,h)})])];case 3:return ue=f.sent(),[3,5];case 4:return Pe=f.sent(),ue=Pe instanceof vo?c(null,b,h,Pe.payload,Pe.meta):c(Pe,b,h),[3,5];case 5:return Xe=n&&!n.dispatchConditionRejection&&c.match(ue)&&ue.meta.condition,Xe||y(ue),[2,ue]}})})})();return Object.assign(D,{abort:T,requestId:b,arg:h,unwrap:function(){return D.then(mc)}})}}return Object.assign(p,{pending:s,rejected:c,fulfilled:a,typePrefix:e})}return o.withTypes=function(){return o},o})();function mc(o){if(o.meta&&o.meta.rejectedWithValue)throw o.payload;if(o.error)throw o.error;return o.payload}function bc(o){return o!==null&&typeof o=="object"&&typeof o.then=="function"}var Ka="listener",Za="completed",qa="cancelled",_d="task-"+qa,kd="task-"+Za,Nd=Ka+"-"+qa,Pd=Ka+"-"+Za;var So="listenerMiddleware";var Dd=Le(So+"/add"),Md=Le(So+"/removeAll"),Fd=Le(So+"/remove");var Ga,Ud=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(o){return(Ga||(Ga=Promise.resolve())).then(o).catch(function(e){return setTimeout(function(){throw e},0)})},vc=function(o){return function(e){setTimeout(e,o)}},Bd=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vc(10);Ia();var xc=Xt(Symbol("withEventBus"),function(o,e){return class extends o{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),lr=class extends xc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ya=class o extends lr{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,s=window.ftReduxStores[n];if(or(s))return s;if(a==null)return;let c=Va({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),d=Wa({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=Rt(c.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[a.name]=new o(c,d,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Jt;let a=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...h)=>{let y=p(...h.map(a));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}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(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var dr=class{static format(e,r,n,a,s){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!s)):this.getIntlDateTime(e,r,n,a,!!s)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,s){let c=typeof e=="string"?new Date(e):e,d=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(c);return s?u:a?`${d} ${u}`:d}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ur=C(L()),Sc="ft-app-info",xe=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:e})}};xe.eventName="authentication-change";var Dt=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:e})}};Dt.eventName="ui-locale-changed";var Cc={session:(o,e)=>{(0,ur.deepEqual)(o.session,e.payload)||(o.session=e.payload,setTimeout(()=>O.dispatchEvent(new xe(e.payload)),0))}},O=ur.FtReduxStore.get({name:Sc,reducers:Cc,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Qa=C(L()),pr=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},fu=(0,Qa.applyMixinOnce)(Symbol("withDateFormat"),function(o){class e extends o{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(O)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,s;return((s=(a=this.metadataDescriptors.find(d=>d.key===n))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1)?d=>dr.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pr([(0,Co.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pr([(0,Co.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pr([Qr({store:O.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),pr([Qr({store:O.name})],e.prototype,"uiLocale",void 0),e});var mr=C(L());var Oo=C(L());var ze=class o{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=O.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=o.get(e);if(n)r(n);else{let a=O.subscribe(()=>{n=o.get(e),n&&(a(),r(n))})}})}};var ut=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ze.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ze.await()}};var Z=class extends ut{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Oo.CacheRegistry,this.cache=e?a.commonCache:new Oo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var fr=class extends Z{async listMySearches(){let{session:e}=O.getState();return be(e,P.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var hr=class extends Z{async listMyBookmarks(){let e=O.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var yr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=O.getState().session;return!!e?.sessionAuthenticated}};var gr=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=O.getState().session;return!!e?.sessionAuthenticated}};var Oc="ft-user-assets",Ac={setAssetCount:(o,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;o.assetCounts.allAsset[r]=n},clearAssetCount:o=>{Object.values(se).forEach(e=>{o.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(o,e)=>{let r=e.payload.mapId;o.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:o=>{o.assetCounts.bookmarkByMap={}},addAsset:(o,e)=>{let{assetType:r,mapId:n,asset:a}=e.payload;Eo(o,r,[...Ao(o,r),a]),Xa(o,r,1,n),Ja(o,a)},editAsset:(o,e)=>{let{assetType:r,asset:n}=e.payload;Eo(o,r,Ao(o,r).map(a=>a.id===n.id?n:a)),Ja(o,n)},removeAsset:(o,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;Eo(o,r,Ao(o,r).filter(s=>s.id!==a)),Xa(o,r,-1,n)}},ei={[se.SEARCHES]:"savedSearches",[se.BOOKMARKS]:"bookmarks",[se.BOOKS]:void 0,[se.COLLECTIONS]:void 0},Ao=(o,e)=>{var r;let n=ei[e];return n?(r=o[n])!==null&&r!==void 0?r:[]:[]},Eo=(o,e,r)=>{let n=ei[e];n&&(o[n]=r)},Xa=(o,e,r,n)=>{let a=o.assetCounts.allAsset[e];if(a!==void 0&&(o.assetCounts.allAsset[e]=Math.max(0,a+r),e===se.BOOKMARKS&&n)){let s=o.assetCounts.bookmarkByMap[n];o.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},Ja=(o,e)=>{let r=o.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));o.assetLabels.push(...n)},oe=mr.FtReduxStore.get({name:Oc,reducers:Ac,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(se).map(o=>[o,void 0])),bookmarkByMap:{}},assetLabels:[]}}),wo=class{constructor(e=new yr,r=new gr){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=O.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new fr,O.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=O.getState();(0,mr.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),oe.actions.clearAssetCount(),oe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),oe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),oe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();oe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();oe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&oe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&oe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(oe.getState().assetCounts.bookmarkByMap).length!==0;e===se.BOOKMARKS&&r&&oe.actions.clearBookmarkCountByMap(),oe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;oe.actions.bookmarks(r)}}},Io=new wo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Io);var To=class{addCommand(e,r=!1){O.commands.add(e,r)}consumeCommand(e){return O.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new To;var le=C(L());var ti,pt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ec=Symbol("clearAfterUnitTest"),br=class extends(0,le.withEventBus)(Z){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new le.CacheRegistry,this.listeners={}},this.currentUiLocale=O.getState().uiLocale,O.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=O.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,le.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let s=e.toLowerCase(),c=this.resolveContext(s);return new le.ParametrizedLabelResolver((a=this.defaultMessages[s])!==null&&a!==void 0?a:{},c).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof le.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new pt({loadedContexts:e})),this.dispatchEvent(new pt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new pt({loadedContexts:[e]})),this.dispatchEvent(new pt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,le.delay)(0).then(()=>n()).catch(()=>null)))}};ti=Ec;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends br{constructor(){super(async(o,e)=>(await this.awaitApi).getFluidTopicsMessageContext(o,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends br{constructor(){super(async(o,e)=>(await this.awaitApi).getCustomMessageContext(o,e))}});var ri=window.FluidTopicsI18nService,Zu=window.FluidTopicsCustomI18nService;var oi=C(L()),Ro=class{highlightHtml(e,r,n){(0,oi.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Ro;var ni=C(L());var Lo=class{isDate(e){var r,n,a,s;return(s=(a=((n=(r=O.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===e))===null||a===void 0?void 0:a.date)!==null&&s!==void 0?s:!1}format(e,r){var n,a,s,c;if(e==null)return"";try{return ni.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:O.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(c=r?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(e)} is not valid`,d),d}}};window.FluidTopicsDateService=new Lo;var ai=C(L());var Mt=class{static get(e,r){var n,a;let s=O.getState(),{lang:c,region:d}=(a=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new ai.SearchPlaceConverter(s.baseUrl,e??20,s.searchInAllLanguagesAllowed,r??`${c}-${d}`)}};var vr=class extends Z{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([n,a])=>Array.isArray(a)?[n,a.map(s=>typeof s=="object"&&s!=null&&!Array.isArray(s)?this.sortEventArrays(s):s).sort((s,c)=>typeof s=="object"&&s!==null&&"key"in s?s.key.localeCompare(c.key):typeof s=="string"&&typeof c=="string"?s.localeCompare(c):String(s).localeCompare(String(c)))]:typeof a=="object"&&a!==null?[n,this.sortEventArrays(a)]:[n,a]);return Object.fromEntries(r)}sendEvents(e,r){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(a=>(console.info(r),console.debug(a),n)),1e3)}};var _o=class{urlToSearchRequest(e){return Mt.get().parse(e)}searchRequestToUrl(e){return Mt.get().serialize(e)}};window.FluidTopicsUrlService=new _o;var Se=C(L());var Ge=class o extends CustomEvent{constructor(e){super(o.eventName,{detail:{currentItem:e}})}};Ge.eventName="change";var ko=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},ii=new ko;var xr=class o extends Se.WithEventBus{static build(){return new o(window.history,ii,()=>window.location,!1)}constructor(e,r,n,a){var s,c;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(c=(s=e.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Se.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ge(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[s,c,d])=>{let u=r(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(a,[p,c,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Ge.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ge.eventName,e)}currentItem(){return(0,Se.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Se.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Se.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Se.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let a=e,s=e+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(a=s),s++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,s=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xr.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:o=>window.FluidTopicsInternalHistoryService.backwardItemMatching(o),addHistoryChangeListener:o=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(o),removeHistoryChangeListener:o=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(o)});var si=C(j());var ci=si.css`
50
50
  `;var ui=C(j()),ne=C(J()),We=C(L());var $e=C(L());function li(o,e){let{authenticationRequired:r,session:n}=O.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):o()}var Sr=class extends ut{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var No=class o extends $e.FtStateManager{static build(e){return new o(O,e)}constructor(e,r){super(),this.store=e,this.cache=new $e.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Sr,this.cleanSessionDebouncer=new $e.Debouncer,this.reloadDebouncer=new $e.Debouncer(500),this.apiProvider=r??(()=>ze.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(xe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>li(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){var r,n,a,s,c;this.localesConfiguration=e,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((s=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&s!==void 0?s:!1),this.store.actions.uiLanguageSetsReaderLanguage((c=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&c!==void 0?c:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Dt(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},di=No.build();var q=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},B=class extends We.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=di}render(){return ui.html`
51
51
  <slot></slot>
52
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService()}disconnectedCallback(){super.disconnectedCallback()}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>ri.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};B.elementDefinitions={};B.styles=ci;q([(0,ne.property)()],B.prototype,"baseUrl",void 0);q([(0,ne.property)()],B.prototype,"apiIntegrationIdentifier",void 0);q([(0,ne.property)()],B.prototype,"apiIntegrationAppVersion",void 0);q([(0,ne.property)()],B.prototype,"uiLocale",void 0);q([(0,We.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);q([(0,We.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"editorMode",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"noCustom",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);q([(0,ne.property)({converter:{fromAttribute(o){return o==="false"?!1:o==="true"||(o??!1)}}})],B.prototype,"noCustomComponent",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"withManualResources",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);q([(0,We.jsonProperty)([])],B.prototype,"messageContexts",void 0);q([(0,We.jsonProperty)(void 0)],B.prototype,"session",void 0);var fi=C(L());var pi={"ft-app-context":B};(0,fi.customElements)(pi);var Cr=class extends Z{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,n){super(!1,r),this.converter=e,this._mapId=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return be((r=(e=O.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(a=>this.fetchMapRating(a)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var n;return(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var n,a;let s=this.getMapNow(r);return s?.prettyUrl==e||`${s?.id}/root`===e?(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.toc[0]:(a=this.getEnrichedTocNow(r))===null||a===void 0?void 0:a.nodeByUrl[e]}async getPage(e,r){let n=await this.getEnrichedToc(r);return n.pages[e-1]||n.pages[0]}async getPageByTocId(e,r){let n=await this.getEnrichedToc(r);return n.pageByTocId[e]||n.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let n=this.getTocNodeNow(e);if(!n)return;let a=await this.getTopicInfo(n);return a?.metadata.find(s=>s.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,n){return this.cache.get("topic-relatives-"+[e,r,...n].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,n))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,n){let a=this.getNavigationData(e,r,n),s=this.getReaderLinkPrefix()+(a.prettyUrl?a.prettyUrl:`${a.mapId}/${a.tocId}`),c=new URL(s,this.api.tenantBaseUrl);return a.page!=null&&c.searchParams.set("page",`${a.page}`),a.prettyUrlDuplicated&&c.searchParams.set("tocId",a.tocId),a.section!=null&&c.searchParams.set("section",a.section),c.href}getNavigationData(e,r,n,a){var s,c;e=e||"root";let d=this.getEnrichedTocNow(a),u=d?.pageByTocId[e],p=d?.nodeByTocId[e],h=p?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(s=p?.title)!==null&&s!==void 0?s:"",untranslatedTopicTitle:p?.untranslatedTitle,page:r&&u&&u.number!==r?r:void 0,prettyUrl:h?.replace(/^r\//,""),prettyUrlDuplicated:(c=d?.duplicatedPrettyUrls.has(h??""))!==null&&c!==void 0?c:!1,section:n}}async getAccurateNavigationData(e,r,n,a){return await this.getEnrichedToc(a),this.getNavigationData(e,r,n,a)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var n;return r?{type:r.topics.type,rating:(n=r.topics)===null||n===void 0?void 0:n.ratings.find(a=>a.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,n){return this.makeRateTopicRequest(e,r,n).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=O.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,n){return this.makeTopicFeedbackRequest(e,r,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let n=this.getTocNodeNow(e,r),a=[{tocId:n.tocId,title:n.title,untranslatedTitle:n.untranslatedTitle}],s=this.getTocNodeNow(n.parentTocId,r);for(;s;)a.unshift({tocId:s.tocId,title:s.title,untranslatedTitle:s.untranslatedTitle}),s=this.getTocNodeNow(s.parentTocId,r);return a}isFeatureAccessible(e,{session:r}){var n;if(!this.isFeatureAvailable(e))return!1;switch(e){case me.FEEDBACK:return be(r??[],P.FEEDBACK_USER);case me.RATING:return be(r??[],P.RATING_USER);case me.PRINT:return be(r??[],P.PRINT_USER);case me.BOOKMARK:return!!r?.sessionAuthenticated;case me.COLLECTIONS:return be(r??[],P.COLLECTION_USER);case me.PERSONAL_BOOKS:return be(r??[],P.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Or=class o extends Cr{static async build(e){return new o(new Kt,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let n=await this.api.getMap(e,r);return this.fingerprint=n.fingerprint,n}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let n={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(n)}fetchRelativesForTopicInMap(e,r,n){let a={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:n}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(a)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,n){return this.api.rateTopic(this.mapId,e,r,n)}makeTopicFeedbackRequest(e,r,n){return this.api.sendTopicFeedback(this.mapId,e,r,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var wc="topicPivot";function hi(o,e){let r=new URL(o);return e?.values.forEach(n=>{r.searchParams.append(wc,n)}),r.href}var Ar=class o{static build(e,r){return new o(xn(e.trim()||"context"),r??Or.build)}loaded(){return(0,ee.waitUntil)(()=>this._loaded)}constructor(e,r,n,a){this.store=e,this.clusteringHelperProvider=n,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ee.Debouncer(10),this.analyticsEventsService=a??new vr,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,ee.waitFor)(()=>this.service)}async navigateToTopic(e,r,n){await this.loaded();let a=await this.awaitService(),s=await(n!=null?a.getPage(n,this.getTranslationSettings()):a.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(s);let c=this.resolveValidNonRootTocId(e,s);this.store.actions.scrollTarget({tocId:c,section:r}),this.store.getState().visibleTopics[0]!==c&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,r){var n,a,s;let c=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:r.rootTocId;return r.topics.includes(c)?c:(e!="root"&&this.store.dispatchEvent(new Event(Ae.requestedTopicNotFound)),(s=(a=r.topics[0])!==null&&a!==void 0?a:r.hiddenTopics[0])!==null&&s!==void 0?s:"root")}async navigateToPage(e){await this.loaded();let n=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(n)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,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),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,n,a,s,c;try{e&&this.setTranslationLoading(!0);let d=u=>{throw e&&this.setTranslationError(!0),u};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(u=>this.store.actions.map(u)).catch(d),(n=this.service)===null||n===void 0?void 0:n.getToc(e).then(u=>this.store.actions.toc(u)).catch(d),(a=this.service)===null||a===void 0?void 0:a.getPagesToc(e).then(u=>this.store.actions.pagesToc(u)).catch(d),(s=this.service)===null||s===void 0?void 0:s.getPaginationConfiguration().then(u=>this.store.actions.paginationConfiguration(u)).catch(d),(c=this.service)===null||c===void 0?void 0:c.getTranslationError(e).then(u=>this.setTranslationError(u))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(d){this.errorHandler&&!(d instanceof ee.CanceledPromiseError)&&this.errorHandler(d)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let n=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(a=>{var s;return a.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(a=>a.values);if(n!==void 0&&n.length>0){let a=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,n)),s=a?.results.flatMap(c=>c.entries);this.store.actions.relatives(s)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(Ae.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let n=this.store.getState().relatives;if(n){let a=n.find(c=>{var d;return((d=c.map)===null||d===void 0?void 0:d.mapId)==this.store.getState().mapId}),s=(r=(e=O.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new ee.ClusteringHelper(n,a,this.metadataForSwitchToRelatives,s)}}async navigateToRelativeTopicIfFound(e){var r,n,a;await this.loaded();let s=await(0,ee.waitFor)(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),c=this.store.getState().mapId,u=await(await this.awaitService()).getRelativesForTopicInMap(c,s,[e]);if(!((a=(n=(r=u?.results)===null||r===void 0?void 0:r[0])===null||n===void 0?void 0:n.entries)===null||a===void 0)&&a[0]){let p=u.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let n=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));n&&this.store.actions.setTopicsRating({[e]:n})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,r,n){return this.service.getAccurateNavigationData(e,r?.number,n?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,n;let a=this.getTranslationSettings();return a?(this.sendTopicAiTranslateEvent(a.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,a).then(s=>(s.isTranslationError&&this.setTranslationError(!0),s.content))):(n=this.service)===null||n===void 0?void 0:n.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(Ae.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,n,a;this.store.getState().relatives==null&&await this.fetchRelatives();let s=ee.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),c=(0,ee.accessResultUrl)(s);if(c){let d=this.store.getState().visibleTopics[0],u=(n=this.store.getState().configuration)===null||n===void 0?void 0:n.relativeTopicPivotMetadata;if(u&&d){let p=await((a=this.service)===null||a===void 0?void 0:a.getTopicMetadataValue(d,u));c=hi(c,p)}}return c}sendDocumentOnDemandTranslateEvent(e){let{editorMode:r,apiIntegrationIdentifier:n,apiIntegrationAppVersion:a}=O.getState(),s=this.store.getState(),c=s.map,d=s.translation.profileId;if(!(r||!c||!n||!a||!d))try{let u=this.analyticsEventsService.convertMapToAnalyticsDocument(c);this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:a,sourceLanguage:this.parseLanguageToAnalyticsFormat(c.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:d,document:u,translationOrigin:Yt.AI})}catch(u){console.warn("Failed to send on-demand document translate event:",u)}}sendTopicAiTranslateEvent(e,r){let{editorMode:n,apiIntegrationIdentifier:a,apiIntegrationAppVersion:s}=O.getState(),c=this.store.getState(),d=c.map,u=c.translation.profileId;if(!(n||!d||!a||!s||!u))try{let p=this.buildBreadcrumb(r.tocId);if(!p){console.warn("Failed to build breadcrumb for topic ai translate event");return}let h=this.analyticsEventsService.convertMapToAnalyticsDocument(d);this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:a,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(d.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:p.map(y=>({tocId:y.tocId,title:y.title})),document:h,profileId:u})}catch(p){console.warn("Failed to send topic ai translate event:",p)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Er=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},wr=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Ir=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},Tr=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},Rr=class extends Event{constructor(){super("ft-reader-map-not-found")}},Lr=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},_r=class extends Event{constructor(){super("ft-reader-map-forbidden")}},kr=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var te=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},Po=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},H=class extends z.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new z.Debouncer(5),this.navigationDebouncer=new z.Debouncer(10),this.mapLoadedEventDebouncer=new z.Debouncer(50),this.addStore(O)}render(){return Ft.html`
52
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.initService()}disconnectedCallback(){super.disconnectedCallback()}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>ri.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};B.elementDefinitions={};B.styles=ci;q([(0,ne.property)()],B.prototype,"baseUrl",void 0);q([(0,ne.property)()],B.prototype,"apiIntegrationIdentifier",void 0);q([(0,ne.property)()],B.prototype,"apiIntegrationAppVersion",void 0);q([(0,ne.property)()],B.prototype,"uiLocale",void 0);q([(0,We.jsonProperty)(null)],B.prototype,"availableUiLocales",void 0);q([(0,We.jsonProperty)(null)],B.prototype,"metadataConfiguration",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"editorMode",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"noCustom",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"openExternalDocumentInNewTab",void 0);q([(0,ne.property)({converter:{fromAttribute(o){return o==="false"?!1:o==="true"||(o??!1)}}})],B.prototype,"noCustomComponent",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"withManualResources",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"navigatorOnline",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"forcedOffline",void 0);q([(0,ne.property)({type:Boolean})],B.prototype,"authenticationRequired",void 0);q([(0,We.jsonProperty)([])],B.prototype,"messageContexts",void 0);q([(0,We.jsonProperty)(void 0)],B.prototype,"session",void 0);var fi=C(L());var pi={"ft-app-context":B};(0,fi.customElements)(pi);var Cr=class extends Z{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,n){super(!1,r),this.converter=e,this._mapId=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return be((r=(e=O.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(a=>this.fetchMapRating(a)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var n;return(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var n,a;let s=this.getMapNow(r);return s?.prettyUrl==e||`${s?.id}/root`===e?(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.toc[0]:(a=this.getEnrichedTocNow(r))===null||a===void 0?void 0:a.nodeByUrl[e]}async getPage(e,r){let n=await this.getEnrichedToc(r);return n.pages[e-1]||n.pages[0]}async getPageByTocId(e,r){let n=await this.getEnrichedToc(r);return n.pageByTocId[e]||n.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let n=this.getTocNodeNow(e);if(!n)return;let a=await this.getTopicInfo(n);return a?.metadata.find(s=>s.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,n){return this.cache.get("topic-relatives-"+[e,r,...n].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,n))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,n){let a=this.getNavigationData(e,r,n),s=this.getReaderLinkPrefix()+(a.prettyUrl?a.prettyUrl:`${a.mapId}/${a.tocId}`),c=new URL(s,this.api.tenantBaseUrl);return a.page!=null&&c.searchParams.set("page",`${a.page}`),a.prettyUrlDuplicated&&c.searchParams.set("tocId",a.tocId),a.section!=null&&c.searchParams.set("section",a.section),c.href}getNavigationData(e,r,n,a){var s,c;e=e||"root";let d=this.getEnrichedTocNow(a),u=d?.pageByTocId[e],p=d?.nodeByTocId[e],h=p?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(s=p?.title)!==null&&s!==void 0?s:"",untranslatedTopicTitle:p?.untranslatedTitle,page:r&&u&&u.number!==r?r:void 0,prettyUrl:h?.replace(/^r\//,""),prettyUrlDuplicated:(c=d?.duplicatedPrettyUrls.has(h??""))!==null&&c!==void 0?c:!1,section:n}}async getAccurateNavigationData(e,r,n,a){return await this.getEnrichedToc(a),this.getNavigationData(e,r,n,a)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var n;return r?{type:r.topics.type,rating:(n=r.topics)===null||n===void 0?void 0:n.ratings.find(a=>a.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,n){return this.makeRateTopicRequest(e,r,n).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=O.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,n){return this.makeTopicFeedbackRequest(e,r,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let n=this.getTocNodeNow(e,r),a=[{tocId:n.tocId,title:n.title,untranslatedTitle:n.untranslatedTitle}],s=this.getTocNodeNow(n.parentTocId,r);for(;s;)a.unshift({tocId:s.tocId,title:s.title,untranslatedTitle:s.untranslatedTitle}),s=this.getTocNodeNow(s.parentTocId,r);return a}isFeatureAccessible(e,{session:r}){var n;if(!this.isFeatureAvailable(e))return!1;switch(e){case me.FEEDBACK:return be(r??[],P.FEEDBACK_USER);case me.RATING:return be(r??[],P.RATING_USER);case me.PRINT:return be(r??[],P.PRINT_USER);case me.BOOKMARK:return!!r?.sessionAuthenticated;case me.COLLECTIONS:return be(r??[],P.COLLECTION_USER);case me.PERSONAL_BOOKS:return be(r??[],P.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Or=class o extends Cr{static async build(e){return new o(new Kt,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let n=await this.api.getMap(e,r);return this.fingerprint=n.fingerprint,n}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let n={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(n)}fetchRelativesForTopicInMap(e,r,n){let a={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:n}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(a)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,n){return this.api.rateTopic(this.mapId,e,r,n)}makeTopicFeedbackRequest(e,r,n){return this.api.sendTopicFeedback(this.mapId,e,r,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var wc="topicPivot";function hi(o,e){let r=new URL(o);return e?.values.forEach(n=>{r.searchParams.append(wc,n)}),r.href}var Ar=class o{static build(e,r){return new o(xn(e.trim()||"context"),r??Or.build)}loaded(){return(0,ee.waitUntil)(()=>this._loaded)}constructor(e,r,n,a){this.store=e,this.clusteringHelperProvider=n,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ee.Debouncer(10),this.analyticsEventsService=a??new vr,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,ee.waitFor)(()=>this.service)}async navigateToTopic(e,r,n){await this.loaded();let a=await this.awaitService(),s=await(n!=null?a.getPage(n,this.getTranslationSettings()):a.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(s);let c=this.resolveValidNonRootTocId(e,s);this.store.actions.scrollTarget({tocId:c,section:r}),this.store.getState().visibleTopics[0]!==c&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,r){var n,a,s;let c=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:r.rootTocId;return r.topics.includes(c)?c:(e!="root"&&this.store.dispatchEvent(new Event(Ae.requestedTopicNotFound)),(s=(a=r.topics[0])!==null&&a!==void 0?a:r.hiddenTopics[0])!==null&&s!==void 0?s:"root")}async navigateToPage(e){await this.loaded();let n=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(n)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,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),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,n,a,s,c;try{e&&this.setTranslationLoading(!0);let d=u=>{throw e&&this.setTranslationError(!0),u};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(u=>this.store.actions.map(u)).catch(d),(n=this.service)===null||n===void 0?void 0:n.getToc(e).then(u=>this.store.actions.toc(u)).catch(d),(a=this.service)===null||a===void 0?void 0:a.getPagesToc(e).then(u=>this.store.actions.pagesToc(u)).catch(d),(s=this.service)===null||s===void 0?void 0:s.getPaginationConfiguration().then(u=>this.store.actions.paginationConfiguration(u)).catch(d),(c=this.service)===null||c===void 0?void 0:c.getTranslationError(e).then(u=>this.setTranslationError(u))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(d){this.errorHandler&&!(d instanceof ee.CanceledPromiseError)&&this.errorHandler(d)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let n=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(a=>{var s;return a.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(a=>a.values);if(n!==void 0&&n.length>0){let a=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,n)),s=a?.results.flatMap(c=>c.entries);this.store.actions.relatives(s)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(Ae.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let n=this.store.getState().relatives;if(n){let a=n.find(c=>{var d;return((d=c.map)===null||d===void 0?void 0:d.mapId)==this.store.getState().mapId}),s=(r=(e=O.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new ee.ClusteringHelper(n,a,this.metadataForSwitchToRelatives,s)}}async navigateToRelativeTopicIfFound(e){var r,n,a;await this.loaded();let s=await(0,ee.waitFor)(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),c=this.store.getState().mapId,u=await(await this.awaitService()).getRelativesForTopicInMap(c,s,[e]);if(!((a=(n=(r=u?.results)===null||r===void 0?void 0:r[0])===null||n===void 0?void 0:n.entries)===null||a===void 0)&&a[0]){let p=u.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let n=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));n&&this.store.actions.setTopicsRating({[e]:n})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,r,n){return this.service.getAccurateNavigationData(e,r?.number,n?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,n;let a=this.getTranslationSettings();return a?(this.sendTopicAiTranslateEvent(a.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,a).then(s=>(s.isTranslationError&&this.setTranslationError(!0),s.content))):(n=this.service)===null||n===void 0?void 0:n.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(Ae.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,n,a;this.store.getState().relatives==null&&await this.fetchRelatives();let s=ee.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),c=(0,ee.accessResultUrl)(s);if(c){let d=this.store.getState().visibleTopics[0],u=(n=this.store.getState().configuration)===null||n===void 0?void 0:n.relativeTopicPivotMetadata;if(u&&d){let p=await((a=this.service)===null||a===void 0?void 0:a.getTopicMetadataValue(d,u));c=hi(c,p)}}return c}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:n,apiIntegrationIdentifier:a,apiIntegrationAppVersion:s}=O.getState(),c=this.store.getState(),d=c.map,u=c.translation.profileId;if(!(n||!d||!a||!s||!u))try{let h={...this.analyticsEventsService.convertMapToAnalyticsDocument(d),title:(r=d.untranslatedTitle)!==null&&r!==void 0?r:d.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:a,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(d.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:u,document:h,translationOrigin:Yt.AI})}catch(p){console.warn("Failed to send on-demand document translate event:",p)}}sendTopicAiTranslateEvent(e,r){var n;let{editorMode:a,apiIntegrationIdentifier:s,apiIntegrationAppVersion:c}=O.getState(),d=this.store.getState(),u=d.map,p=d.translation.profileId;if(!(a||!u||!s||!c||!p))try{let h=this.buildBreadcrumb(r.tocId);if(!h){console.warn("Failed to build breadcrumb for topic ai translate event");return}let m={...this.analyticsEventsService.convertMapToAnalyticsDocument(u),title:(n=u.untranslatedTitle)!==null&&n!==void 0?n:u.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:s,appVersion:c,sourceLanguage:this.parseLanguageToAnalyticsFormat(u.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:h.map(v=>{var b;return{tocId:v.tocId,title:(b=v.untranslatedTitle)!==null&&b!==void 0?b:v.title}}),document:m,profileId:p})}catch(h){console.warn("Failed to send topic ai translate event:",h)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Er=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},wr=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Ir=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},Tr=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},Rr=class extends Event{constructor(){super("ft-reader-map-not-found")}},Lr=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},_r=class extends Event{constructor(){super("ft-reader-map-forbidden")}},kr=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var te=function(o,e,r,n){var a=arguments.length,s=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,r,n);else for(var d=o.length-1;d>=0;d--)(c=o[d])&&(s=(a<3?c(s):a>3?c(e,r,s):c(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s},Po=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},H=class extends z.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new z.Debouncer(5),this.navigationDebouncer=new z.Debouncer(10),this.mapLoadedEventDebouncer=new z.Debouncer(50),this.addStore(O)}render(){return Ft.html`
53
53
  ${this.importStyleIfNeeded()}
54
54
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
55
55
  `}importStyleIfNeeded(){var e,r;let n=(e=this.stateManager.service)===null||e===void 0?void 0:e.themeStylesheet();return!n||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?Ft.nothing:Ft.html`
@@ -77,7 +77,7 @@
77
77
  }
78
78
  `;var Tt=C(j()),Qe=C(J());var ms=C(jr()),bs=C(L());var zo=globalThis,Nr=zo.trustedTypes,xi=Nr?Nr.createPolicy("lit-html",{createHTML:o=>o}):void 0,wi="$lit$",_e=`lit$${Math.random().toFixed(9).slice(2)}$`,Ii="?"+_e,Tc=`<${Ii}>`,Ze=document,Pr=()=>Ze.createComment(""),Bt=o=>o===null||typeof o!="object"&&typeof o!="function",Go=Array.isArray,Rc=o=>Go(o)||typeof o?.[Symbol.iterator]=="function",Do=`[
79
79
  \f\r]`,Ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Si=/-->/g,Ci=/>/g,Ve=RegExp(`>|${Do}(?:([^\\s"'>=/]+)(${Do}*=${Do}*(?:[^
80
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Oi=/'/g,Ai=/"/g,Ti=/^(?:script|style|textarea|title)$/i,$o=o=>(e,...r)=>({_$litType$:o,strings:e,values:r}),Ri=$o(1),Li=$o(2),_i=$o(3),Ht=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Ei=new WeakMap,Ke=Ze.createTreeWalker(Ze,129);function ki(o,e){if(!Go(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return xi!==void 0?xi.createHTML(e):e}var Lc=(o,e)=>{let r=o.length-1,n=[],a,s=e===2?"<svg>":e===3?"<math>":"",c=Ut;for(let d=0;d<r;d++){let u=o[d],p,h,y=-1,m=0;for(;m<u.length&&(c.lastIndex=m,h=c.exec(u),h!==null);)m=c.lastIndex,c===Ut?h[1]==="!--"?c=Si:h[1]!==void 0?c=Ci:h[2]!==void 0?(Ti.test(h[2])&&(a=RegExp("</"+h[2],"g")),c=Ve):h[3]!==void 0&&(c=Ve):c===Ve?h[0]===">"?(c=a??Ut,y=-1):h[1]===void 0?y=-2:(y=c.lastIndex-h[2].length,p=h[1],c=h[3]===void 0?Ve:h[3]==='"'?Ai:Oi):c===Ai||c===Oi?c=Ve:c===Si||c===Ci?c=Ut:(c=Ve,a=void 0);let x=c===Ve&&o[d+1].startsWith("/>")?" ":"";s+=c===Ut?u+Tc:y>=0?(n.push(p),u.slice(0,y)+wi+u.slice(y)+_e+x):u+_e+(y===-2?d:x)}return[ki(o,s+(o[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},zt=class o{constructor({strings:e,_$litType$:r},n){let a;this.parts=[];let s=0,c=0,d=e.length-1,u=this.parts,[p,h]=Lc(e,r);if(this.el=o.createElement(p,n),Ke.currentNode=this.el.content,r===2||r===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(a=Ke.nextNode())!==null&&u.length<d;){if(a.nodeType===1){if(a.hasAttributes())for(let y of a.getAttributeNames())if(y.endsWith(wi)){let m=h[c++],x=a.getAttribute(y).split(_e),b=/([.?@])?(.*)/.exec(m);u.push({type:1,index:s,name:b[2],strings:x,ctor:b[1]==="."?Fo:b[1]==="?"?Uo:b[1]==="@"?Bo:ht}),a.removeAttribute(y)}else y.startsWith(_e)&&(u.push({type:6,index:s}),a.removeAttribute(y));if(Ti.test(a.tagName)){let y=a.textContent.split(_e),m=y.length-1;if(m>0){a.textContent=Nr?Nr.emptyScript:"";for(let x=0;x<m;x++)a.append(y[x],Pr()),Ke.nextNode(),u.push({type:2,index:++s});a.append(y[m],Pr())}}}else if(a.nodeType===8)if(a.data===Ii)u.push({type:2,index:s});else{let y=-1;for(;(y=a.data.indexOf(_e,y+1))!==-1;)u.push({type:7,index:s}),y+=_e.length-1}s++}}static createElement(e,r){let n=Ze.createElement("template");return n.innerHTML=e,n}};function ft(o,e,r=o,n){if(e===Ht)return e;let a=n!==void 0?r._$Co?.[n]:r._$Cl,s=Bt(e)?void 0:e._$litDirective$;return a?.constructor!==s&&(a?._$AO?.(!1),s===void 0?a=void 0:(a=new s(o),a._$AT(o,r,n)),n!==void 0?(r._$Co??=[])[n]=a:r._$Cl=a),a!==void 0&&(e=ft(o,a._$AS(o,e.values),a,n)),e}var Mo=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,a=(e?.creationScope??Ze).importNode(r,!0);Ke.currentNode=a;let s=Ke.nextNode(),c=0,d=0,u=n[0];for(;u!==void 0;){if(c===u.index){let p;u.type===2?p=new Dr(s,s.nextSibling,this,e):u.type===1?p=new u.ctor(s,u.name,u.strings,this,e):u.type===6&&(p=new Ho(s,this,e)),this._$AV.push(p),u=n[++d]}c!==u?.index&&(s=Ke.nextNode(),c++)}return Ke.currentNode=Ze,a}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Dr=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,a){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=ft(this,e,r),Bt(e)?e===G||e==null||e===""?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==Ht&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Rc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&Bt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ze.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,a=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=zt.createElement(ki(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(r);else{let s=new Mo(a,this),c=s.u(this.options);s.p(r),this.T(c),this._$AH=s}}_$AC(e){let r=Ei.get(e.strings);return r===void 0&&Ei.set(e.strings,r=new zt(e)),r}k(e){Go(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,a=0;for(let s of e)a===r.length?r.push(n=new o(this.O(Pr()),this.O(Pr()),this,this.options)):n=r[a],n._$AI(s),a++;a<r.length&&(this._$AR(n&&n._$AB.nextSibling,a),r.length=a)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ht=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,a,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=r,this._$AM=a,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(e,r=this,n,a){let s=this.strings,c=!1;if(s===void 0)e=ft(this,e,r,0),c=!Bt(e)||e!==this._$AH&&e!==Ht,c&&(this._$AH=e);else{let d=e,u,p;for(e=s[0],u=0;u<s.length-1;u++)p=ft(this,d[n+u],r,u),p===Ht&&(p=this._$AH[u]),c||=!Bt(p)||p!==this._$AH[u],p===G?e=G:e!==G&&(e+=(p??"")+s[u+1]),this._$AH[u]=p}c&&!a&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Fo=class extends ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}},Uo=class extends ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}},Bo=class extends ht{constructor(e,r,n,a,s){super(e,r,n,a,s),this.type=5}_$AI(e,r=this){if((e=ft(this,e,r,0)??G)===Ht)return;let n=this._$AH,a=e===G&&n!==G||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==G&&(n===G||a);a&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ho=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ft(this,e)}};var _c=zo.litHtmlPolyfillSupport;_c?.(zt,Dr),(zo.litHtmlVersions??=[]).push("3.3.0");var Pi=Symbol.for(""),kc=o=>{if(o?.r===Pi)return o?._$litStatic$},yt=o=>({_$litStatic$:o,r:Pi});var Ni=new Map,Wo=o=>(e,...r)=>{let n=r.length,a,s,c=[],d=[],u,p=0,h=!1;for(;p<n;){for(u=e[p];p<n&&(s=r[p],(a=kc(s))!==void 0);)u+=a+e[++p],h=!0;p!==n&&d.push(s),c.push(u),p++}if(p===n&&c.push(e[n]),h){let y=c.join("$$lit$$");(e=Ni.get(y))===void 0&&(c.raw=c,Ni.set(y,e=c)),r=d}return o(e,...r)},gt=Wo(Ri),Gf=Wo(Li),$f=Wo(_i);var jo=C(J()),Ki=C(L());var Mr;(function(o){o.title="title",o.title_dense="title-dense",o.subtitle1="subtitle1",o.subtitle2="subtitle2",o.body1="body1",o.body2="body2",o.caption="caption",o.breadcrumb="breadcrumb",o.overline="overline",o.button="button"})(Mr||(Mr={}));var de=C(j()),v=C(L()),Di=v.FtCssVariableFactory.extend("--ft-typography-font-family","",v.designSystemVariables.titleFont),Ce=v.FtCssVariableFactory.extend("--ft-typography-font-family","",v.designSystemVariables.contentFont),A={fontFamily:Ce,fontSize:v.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:v.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:v.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:v.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:v.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},mt={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Di),fontSize:v.FtCssVariableFactory.extend("--ft-typography-title-font-size","",A.fontSize,"20px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",A.letterSpacing,"0.15px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-title-line-height","",A.lineHeight,"1.2"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",A.textTransform,"inherit")},bt={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Di),fontSize:v.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",A.fontSize,"14px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",A.letterSpacing,"0.105px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",A.lineHeight,"1.7"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",A.textTransform,"inherit")},vt={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",A.fontSize,"16px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",A.fontWeight,"600"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",A.letterSpacing,"0.144px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",A.lineHeight,"1.5"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",A.textTransform,"inherit")},xt={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",A.fontSize,"14px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",A.letterSpacing,"0.098px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",A.lineHeight,"1.7"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",A.textTransform,"inherit")},St={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",A.fontSize,"16px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",A.letterSpacing,"0.496px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",A.lineHeight,"1.5"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",A.textTransform,"inherit")},Ct={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",A.fontSize,"14px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",A.letterSpacing,"0.252px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",A.lineHeight,"1.4"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",A.textTransform,"inherit")},Ot={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",A.fontSize,"12px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",A.letterSpacing,"0.396px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",A.lineHeight,"1.33"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",A.textTransform,"inherit")},At={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",A.fontSize,"10px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",A.letterSpacing,"0.33px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",A.lineHeight,"1.6"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",A.textTransform,"inherit")},Et={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",A.fontSize,"10px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",A.fontWeight,"normal"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",A.letterSpacing,"1.5px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",A.lineHeight,"1.6"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",A.textTransform,"uppercase")},wt={fontFamily:v.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ce),fontSize:v.FtCssVariableFactory.extend("--ft-typography-button-font-size","",A.fontSize,"14px"),fontWeight:v.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",A.fontWeight,"600"),letterSpacing:v.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",A.letterSpacing,"1.246px"),lineHeight:v.FtCssVariableFactory.extend("--ft-typography-button-line-height","",A.lineHeight,"1.15"),textTransform:v.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",A.textTransform,"uppercase")},Mi=de.css`
80
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Oi=/'/g,Ai=/"/g,Ti=/^(?:script|style|textarea|title)$/i,$o=o=>(e,...r)=>({_$litType$:o,strings:e,values:r}),Ri=$o(1),Li=$o(2),_i=$o(3),Ht=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Ei=new WeakMap,Ke=Ze.createTreeWalker(Ze,129);function ki(o,e){if(!Go(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return xi!==void 0?xi.createHTML(e):e}var Lc=(o,e)=>{let r=o.length-1,n=[],a,s=e===2?"<svg>":e===3?"<math>":"",c=Ut;for(let d=0;d<r;d++){let u=o[d],p,h,y=-1,m=0;for(;m<u.length&&(c.lastIndex=m,h=c.exec(u),h!==null);)m=c.lastIndex,c===Ut?h[1]==="!--"?c=Si:h[1]!==void 0?c=Ci:h[2]!==void 0?(Ti.test(h[2])&&(a=RegExp("</"+h[2],"g")),c=Ve):h[3]!==void 0&&(c=Ve):c===Ve?h[0]===">"?(c=a??Ut,y=-1):h[1]===void 0?y=-2:(y=c.lastIndex-h[2].length,p=h[1],c=h[3]===void 0?Ve:h[3]==='"'?Ai:Oi):c===Ai||c===Oi?c=Ve:c===Si||c===Ci?c=Ut:(c=Ve,a=void 0);let v=c===Ve&&o[d+1].startsWith("/>")?" ":"";s+=c===Ut?u+Tc:y>=0?(n.push(p),u.slice(0,y)+wi+u.slice(y)+_e+v):u+_e+(y===-2?d:v)}return[ki(o,s+(o[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},zt=class o{constructor({strings:e,_$litType$:r},n){let a;this.parts=[];let s=0,c=0,d=e.length-1,u=this.parts,[p,h]=Lc(e,r);if(this.el=o.createElement(p,n),Ke.currentNode=this.el.content,r===2||r===3){let y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(a=Ke.nextNode())!==null&&u.length<d;){if(a.nodeType===1){if(a.hasAttributes())for(let y of a.getAttributeNames())if(y.endsWith(wi)){let m=h[c++],v=a.getAttribute(y).split(_e),b=/([.?@])?(.*)/.exec(m);u.push({type:1,index:s,name:b[2],strings:v,ctor:b[1]==="."?Fo:b[1]==="?"?Uo:b[1]==="@"?Bo:ht}),a.removeAttribute(y)}else y.startsWith(_e)&&(u.push({type:6,index:s}),a.removeAttribute(y));if(Ti.test(a.tagName)){let y=a.textContent.split(_e),m=y.length-1;if(m>0){a.textContent=Nr?Nr.emptyScript:"";for(let v=0;v<m;v++)a.append(y[v],Pr()),Ke.nextNode(),u.push({type:2,index:++s});a.append(y[m],Pr())}}}else if(a.nodeType===8)if(a.data===Ii)u.push({type:2,index:s});else{let y=-1;for(;(y=a.data.indexOf(_e,y+1))!==-1;)u.push({type:7,index:s}),y+=_e.length-1}s++}}static createElement(e,r){let n=Ze.createElement("template");return n.innerHTML=e,n}};function ft(o,e,r=o,n){if(e===Ht)return e;let a=n!==void 0?r._$Co?.[n]:r._$Cl,s=Bt(e)?void 0:e._$litDirective$;return a?.constructor!==s&&(a?._$AO?.(!1),s===void 0?a=void 0:(a=new s(o),a._$AT(o,r,n)),n!==void 0?(r._$Co??=[])[n]=a:r._$Cl=a),a!==void 0&&(e=ft(o,a._$AS(o,e.values),a,n)),e}var Mo=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,a=(e?.creationScope??Ze).importNode(r,!0);Ke.currentNode=a;let s=Ke.nextNode(),c=0,d=0,u=n[0];for(;u!==void 0;){if(c===u.index){let p;u.type===2?p=new Dr(s,s.nextSibling,this,e):u.type===1?p=new u.ctor(s,u.name,u.strings,this,e):u.type===6&&(p=new Ho(s,this,e)),this._$AV.push(p),u=n[++d]}c!==u?.index&&(s=Ke.nextNode(),c++)}return Ke.currentNode=Ze,a}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Dr=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,a){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=ft(this,e,r),Bt(e)?e===G||e==null||e===""?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==Ht&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Rc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&Bt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ze.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,a=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=zt.createElement(ki(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(r);else{let s=new Mo(a,this),c=s.u(this.options);s.p(r),this.T(c),this._$AH=s}}_$AC(e){let r=Ei.get(e.strings);return r===void 0&&Ei.set(e.strings,r=new zt(e)),r}k(e){Go(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,a=0;for(let s of e)a===r.length?r.push(n=new o(this.O(Pr()),this.O(Pr()),this,this.options)):n=r[a],n._$AI(s),a++;a<r.length&&(this._$AR(n&&n._$AB.nextSibling,a),r.length=a)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ht=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,a,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=r,this._$AM=a,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(e,r=this,n,a){let s=this.strings,c=!1;if(s===void 0)e=ft(this,e,r,0),c=!Bt(e)||e!==this._$AH&&e!==Ht,c&&(this._$AH=e);else{let d=e,u,p;for(e=s[0],u=0;u<s.length-1;u++)p=ft(this,d[n+u],r,u),p===Ht&&(p=this._$AH[u]),c||=!Bt(p)||p!==this._$AH[u],p===G?e=G:e!==G&&(e+=(p??"")+s[u+1]),this._$AH[u]=p}c&&!a&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Fo=class extends ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}},Uo=class extends ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}},Bo=class extends ht{constructor(e,r,n,a,s){super(e,r,n,a,s),this.type=5}_$AI(e,r=this){if((e=ft(this,e,r,0)??G)===Ht)return;let n=this._$AH,a=e===G&&n!==G||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==G&&(n===G||a);a&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ho=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ft(this,e)}};var _c=zo.litHtmlPolyfillSupport;_c?.(zt,Dr),(zo.litHtmlVersions??=[]).push("3.3.0");var Pi=Symbol.for(""),kc=o=>{if(o?.r===Pi)return o?._$litStatic$},yt=o=>({_$litStatic$:o,r:Pi});var Ni=new Map,Wo=o=>(e,...r)=>{let n=r.length,a,s,c=[],d=[],u,p=0,h=!1;for(;p<n;){for(u=e[p];p<n&&(s=r[p],(a=kc(s))!==void 0);)u+=a+e[++p],h=!0;p!==n&&d.push(s),c.push(u),p++}if(p===n&&c.push(e[n]),h){let y=c.join("$$lit$$");(e=Ni.get(y))===void 0&&(c.raw=c,Ni.set(y,e=c)),r=d}return o(e,...r)},gt=Wo(Ri),Gf=Wo(Li),$f=Wo(_i);var jo=C(J()),Ki=C(L());var Mr;(function(o){o.title="title",o.title_dense="title-dense",o.subtitle1="subtitle1",o.subtitle2="subtitle2",o.body1="body1",o.body2="body2",o.caption="caption",o.breadcrumb="breadcrumb",o.overline="overline",o.button="button"})(Mr||(Mr={}));var de=C(j()),x=C(L()),Di=x.FtCssVariableFactory.extend("--ft-typography-font-family","",x.designSystemVariables.titleFont),Ce=x.FtCssVariableFactory.extend("--ft-typography-font-family","",x.designSystemVariables.contentFont),A={fontFamily:Ce,fontSize:x.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:x.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:x.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:x.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:x.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},mt={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Di),fontSize:x.FtCssVariableFactory.extend("--ft-typography-title-font-size","",A.fontSize,"20px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",A.letterSpacing,"0.15px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-title-line-height","",A.lineHeight,"1.2"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",A.textTransform,"inherit")},bt={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Di),fontSize:x.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",A.fontSize,"14px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",A.letterSpacing,"0.105px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",A.lineHeight,"1.7"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",A.textTransform,"inherit")},vt={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",A.fontSize,"16px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",A.fontWeight,"600"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",A.letterSpacing,"0.144px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",A.lineHeight,"1.5"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",A.textTransform,"inherit")},xt={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",A.fontSize,"14px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",A.letterSpacing,"0.098px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",A.lineHeight,"1.7"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",A.textTransform,"inherit")},St={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",A.fontSize,"16px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",A.letterSpacing,"0.496px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",A.lineHeight,"1.5"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",A.textTransform,"inherit")},Ct={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",A.fontSize,"14px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",A.letterSpacing,"0.252px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",A.lineHeight,"1.4"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",A.textTransform,"inherit")},Ot={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",A.fontSize,"12px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",A.letterSpacing,"0.396px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",A.lineHeight,"1.33"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",A.textTransform,"inherit")},At={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",A.fontSize,"10px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",A.letterSpacing,"0.33px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",A.lineHeight,"1.6"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",A.textTransform,"inherit")},Et={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",A.fontSize,"10px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",A.fontWeight,"normal"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",A.letterSpacing,"1.5px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",A.lineHeight,"1.6"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",A.textTransform,"uppercase")},wt={fontFamily:x.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ce),fontSize:x.FtCssVariableFactory.extend("--ft-typography-button-font-size","",A.fontSize,"14px"),fontWeight:x.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",A.fontWeight,"600"),letterSpacing:x.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",A.letterSpacing,"1.246px"),lineHeight:x.FtCssVariableFactory.extend("--ft-typography-button-line-height","",A.lineHeight,"1.15"),textTransform:x.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",A.textTransform,"uppercase")},Mi=de.css`
81
81
  .ft-typography--title {
82
82
  font-family: ${mt.fontFamily};
83
83
  font-size: ${mt.fontSize};