@fluid-topics/ft-reader-context 1.0.11 → 1.0.13

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.
@@ -24,12 +24,12 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
24
24
  * @license
25
25
  * Copyright 2021 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */}var u;function a(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,n,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;0!=n--;)if(!a(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!a(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!a(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}null===(u=window.HTMLSlotElement)||void 0===u||u.prototype.assignedElements;const c=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function l(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!a(t,e),...null!=e?e:{}})}const h=t=>new Promise((e=>setTimeout(e,t)))
27
+ */}var u;null===(u=window.HTMLSlotElement)||void 0===u||u.prototype.assignedElements;const a=t=>new Promise((e=>setTimeout(e,t)));function c(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,n,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;0!=n--;)if(!c(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!c(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(r=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!Object.prototype.hasOwnProperty.call(e,r[n]))return!1;for(n=i;0!=n--;){var o=r[n];if(!c(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const l=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function h(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!c(t,e),...null!=e?e:{}})}
28
28
  /**
29
29
  * @license
30
30
  * Copyright 2019 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */,f=window,d=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),p=new WeakMap;let b=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}};const y=t=>new b("string"==typeof t?t:t+"",void 0,v),w=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new b(i,t,v)},m=(t,e)=>{d?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=f.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return y(e)})(t):t
32
+ */const f=window,d=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),p=new WeakMap;let b=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}};const y=t=>new b("string"==typeof t?t:t+"",void 0,v),w=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new b(i,t,v)},m=(t,e)=>{d?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=f.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return y(e)})(t):t
33
33
  /**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
@@ -46,7 +46,7 @@ var A;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRoot
46
46
  * Copyright 2017 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- var ft,dt;let vt=class extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new rt(e.insertBefore(_(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return X}};vt.finalized=!0,vt._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:vt});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:vt}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let n=t=>y(null!=t?t:i),r=w`var(${y(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${y(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=w`var(${y(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${y(t)}, ${n(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):y(null!=e?e:t.defaultValue),n=w`var(${y(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>w`var(${y(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),bt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class yt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return m(i,t.elementStyles),i}}var wt,mt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const gt=Symbol("constructorPrototype"),xt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends yt{constructor(){super(),this[wt]=new r(5),this[xt]=this.constructor.name,this[gt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[xt]&&Object.setPrototypeOf(this,this[gt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ot].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,o,s;const u=t=>null!=t&&t.trim().length>0,a=t.filter(u).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(u).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}wt=Ot,mt([s()],St.prototype,"exportpartsPrefix",void 0),mt([l([])],St.prototype,"exportpartsPrefixes",void 0),mt([s()],St.prototype,"customStylesheet",void 0),w`
49
+ var ft,dt;let vt=class extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new rt(e.insertBefore(_(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return X}};vt.finalized=!0,vt._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:vt});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:vt}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.3.2");class bt{static create(t,e,i){let n=t=>y(null!=t?t:i),r=w`var(${y(t)}, ${n(i)})`;return r.name=t,r.category=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${y(t)}, ${n(e)})`,r.breadcrumb=()=>[],r.lastResortDefaultValue=()=>i,r}static extend(t,e,i){let n=t=>e.get(null!=t?t:i),r=w`var(${y(t)}, ${n(i)})`;return r.name=t,r.category=e.category,r.fallbackVariable=e,r.defaultValue=i,r.defaultCssValue=n,r.get=e=>w`var(${y(t)}, ${n(e)})`,r.breadcrumb=()=>[e.name,...e.breadcrumb()],r.lastResortDefaultValue=()=>i,r}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):y(null!=e?e:t.defaultValue),n=w`var(${y(t.name)}, ${i(t.defaultValue)})`;return n.name=t.name,n.category=t.category,n.fallbackVariable=t.fallbackVariable,n.defaultValue=t.defaultValue,n.context=e,n.defaultCssValue=i,n.get=e=>w`var(${y(t.name)}, ${i(e)})`,n.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],n.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},n}}bt.create("--ft-color-primary","COLOR","#2196F3"),bt.create("--ft-color-primary-variant","COLOR","#1976D2"),bt.create("--ft-color-secondary","COLOR","#FFCC80"),bt.create("--ft-color-secondary-variant","COLOR","#F57C00"),bt.create("--ft-color-surface","COLOR","#FFFFFF"),bt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-error","COLOR","#B00020"),bt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),bt.create("--ft-color-opacity-high","NUMBER","1"),bt.create("--ft-color-opacity-medium","NUMBER","0.74"),bt.create("--ft-color-opacity-disabled","NUMBER","0.38"),bt.create("--ft-color-on-primary","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),bt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),bt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),bt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),bt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),bt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),bt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),bt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),bt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),bt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),bt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),bt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),bt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),bt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),bt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),bt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),bt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),bt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),bt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),bt.create("--ft-border-radius-S","SIZE","4px"),bt.create("--ft-border-radius-M","SIZE","8px"),bt.create("--ft-border-radius-L","SIZE","12px"),bt.create("--ft-border-radius-XL","SIZE","16px"),bt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),bt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),bt.create("--ft-transition-duration","UNKNOWN","250ms"),bt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class yt extends vt{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return m(i,t.elementStyles),i}}var wt,mt=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const gt=Symbol("constructorPrototype"),xt=Symbol("constructorName"),Ot=Symbol("exportpartsDebouncer");class St extends yt{constructor(){super(),this[wt]=new r(5),this[xt]=this.constructor.name,this[gt]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[xt]&&Object.setPrototypeOf(this,this[gt])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[Ot].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,n,r,o,s;const u=t=>null!=t&&t.trim().length>0,a=t.filter(u).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(r=null===(n=t.getAttribute("part"))||void 0===n?void 0:n.split(" "))&&void 0!==r?r:[],i=null!==(s=null===(o=t.getAttribute("exportparts"))||void 0===o?void 0:o.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(u).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const l=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...l].join(", "))}}wt=Ot,mt([s()],St.prototype,"exportpartsPrefix",void 0),mt([h([])],St.prototype,"exportpartsPrefixes",void 0),mt([s()],St.prototype,"customStylesheet",void 0),w`
50
50
  .ft-no-text-select {
51
51
  -webkit-touch-callout: none;
52
52
  -webkit-user-select: none;
@@ -78,10 +78,10 @@ var ft,dt;let vt=class extends M{constructor(){super(...arguments),this.renderOp
78
78
  display: inline-block;
79
79
  width: 0;
80
80
  }
81
- `;class Et{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function jt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ct(t){return!!t&&!!t[fe]}function Nt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===de}(t)||Array.isArray(t)||!!t[he]||!!(null===(e=t.constructor)||void 0===e?void 0:e[he])||kt(t)||It(t))}function Rt(t,e,i){void 0===i&&(i=!1),0===Mt(t)?(i?Object.keys:ve)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Mt(t){var e=t[fe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:kt(t)?2:It(t)?3:0}function At(t,e){return 2===Mt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ut(t,e,i){var n=Mt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Tt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function kt(t){return ue&&t instanceof Map}function It(t){return ae&&t instanceof Set}function Pt(t){return t.o||t.t}function $t(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pe(t);delete e[fe];for(var i=ve(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Lt(t,e){return void 0===e&&(e=!1),_t(t)||Ct(t)||!Nt(t)||(Mt(t)>1&&(t.set=t.add=t.clear=t.delete=Ft),Object.freeze(t),e&&Rt(t,(function(t,e){return Lt(e,!0)}),!0)),t}function Ft(){jt(2)}function _t(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Bt(t){var e=be[t];return e||jt(18,t),e}function Wt(){return oe}function Dt(t,e){e&&(Bt("Patches"),t.u=[],t.s=[],t.v=e)}function Kt(t){qt(t),t.p.forEach(Ht),t.p=null}function qt(t){t===oe&&(oe=t.l)}function Vt(t){return oe={p:[],l:oe,h:t,m:!0,_:0}}function Ht(t){var e=t[fe];0===e.i||1===e.i?e.j():e.g=!0}function zt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||Bt("ES5").S(e,t,n),n?(i[fe].P&&(Kt(e),jt(4)),Nt(t)&&(t=Jt(e,t),e.l||Gt(e,t)),e.u&&Bt("Patches").M(i[fe].t,t,e.u,e.s)):t=Jt(e,i,[]),Kt(e),e.u&&e.v(e.u,e.s),t!==le?t:void 0}function Jt(t,e,i){if(_t(e))return e;var n=e[fe];if(!n)return Rt(e,(function(r,o){return Zt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Gt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=$t(n.k):n.o,o=r,s=!1;3===n.i&&(o=new Set(r),r.clear(),s=!0),Rt(o,(function(e,o){return Zt(t,n,r,e,o,i,s)})),Gt(t,r,!1),i&&t.u&&Bt("Patches").N(n,i,t.u,t.s)}return n.o}function Zt(t,e,i,n,r,o,s){if(Ct(r)){var u=Jt(t,r,o&&e&&3!==e.i&&!At(e.R,n)?o.concat(n):void 0);if(Ut(i,n,u),!Ct(u))return;t.m=!1}else s&&i.add(r);if(Nt(r)&&!_t(r)){if(!t.h.D&&t._<1)return;Jt(t,r),e&&e.A.l||Gt(t,r)}}function Gt(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&Lt(e,i)}function Xt(t,e){var i=t[fe];return(i?Pt(i):t)[e]}function Qt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Yt(t){t.P||(t.P=!0,t.l&&Yt(t.l))}function te(t){t.o||(t.o=$t(t.t))}function ee(t,e,i){var n=kt(e)?Bt("MapSet").F(e,i):It(e)?Bt("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Wt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ye;i&&(r=[n],o=we);var s=Proxy.revocable(r,o),u=s.revoke,a=s.proxy;return n.k=a,n.j=u,a}(e,i):Bt("ES5").J(e,i);return(i?i.A:Wt()).p.push(n),n}function ie(t){return Ct(t)||jt(22,t),function t(e){if(!Nt(e))return e;var i,n=e[fe],r=Mt(e);if(n){if(!n.P&&(n.i<4||!Bt("ES5").K(n)))return n.t;n.I=!0,i=ne(e,r),n.I=!1}else i=ne(e,r);return Rt(i,(function(e,r){n&&function(t,e){return 2===Mt(t)?t.get(e):t[e]}(n.t,e)===r||Ut(i,e,t(r))})),3===r?new Set(i):i}(t)}function ne(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $t(t)}var re,oe,se="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ue="undefined"!=typeof Map,ae="undefined"!=typeof Set,ce="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,le=se?Symbol.for("immer-nothing"):((re={})["immer-nothing"]=!0,re),he=se?Symbol.for("immer-draftable"):"__$immer_draftable",fe=se?Symbol.for("immer-state"):"__$immer_state",de=""+Object.prototype.constructor,ve="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pe=Object.getOwnPropertyDescriptors||function(t){var e={};return ve(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},be={},ye={get:function(t,e){if(e===fe)return t;var i=Pt(t);if(!At(i,e))return function(t,e,i){var n,r=Qt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Nt(n)?n:n===Xt(t.t,e)?(te(t),t.o[e]=ee(t.A.h,n,t)):n},has:function(t,e){return e in Pt(t)},ownKeys:function(t){return Reflect.ownKeys(Pt(t))},set:function(t,e,i){var n=Qt(Pt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=Xt(Pt(t),e),o=null==r?void 0:r[fe];if(o&&o.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Tt(i,r)&&(void 0!==i||At(t.t,e)))return!0;te(t),Yt(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Xt(t.t,e)||e in t.t?(t.R[e]=!1,te(t),Yt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Pt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){jt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){jt(12)}},we={};Rt(ye,(function(t,e){we[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),we.deleteProperty=function(t,e){return we.set.call(this,t,e,void 0)},we.set=function(t,e,i){return ye.set.call(this,t[0],e,i,t[0])};var me=function(){function t(t){var e=this;this.O=ce,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),u=1;u<n;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&jt(6),void 0!==n&&"function"!=typeof n&&jt(7),Nt(t)){var u=Vt(e),a=ee(e,t,void 0),c=!0;try{s=i(a),c=!1}finally{c?Kt(u):qt(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Dt(u,n),zt(t,u)}),(function(t){throw Kt(u),t})):(Dt(u,n),zt(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===le&&(s=void 0),e.D&&Lt(s,!0),n){var l=[],h=[];Bt("Patches").M(t,s,l,h),n(l,h)}return s}jt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Nt(t)||jt(8),Ct(t)&&(t=ie(t));var e=Vt(this),i=ee(this,t,void 0);return i[fe].C=!0,qt(e),i},e.finishDraft=function(t,e){var i=(t&&t[fe]).A;return Dt(i,e),zt(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!ce&&jt(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Bt("Patches").$;return Ct(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),ge=new me,xe=ge.produce;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Se(t){var e=function(t,e){if("object"!==Oe(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Oe(e)?e:String(e)}function Ee(t,e,i){return(e=Se(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function je(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ce(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?je(Object(i),!0).forEach((function(e){Ee(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ne(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ge.produceWithPatches.bind(ge),ge.setAutoFreeze.bind(ge),ge.setUseProxies.bind(ge),ge.applyPatches.bind(ge),ge.createDraft.bind(ge),ge.finishDraft.bind(ge);var Re="function"==typeof Symbol&&Symbol.observable||"@@observable",Me=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ae={INIT:"@@redux/INIT"+Me(),REPLACE:"@@redux/REPLACE"+Me(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Me()}};function Ue(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ne(1));return i(Ue)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var r=t,o=e,s=[],u=s,a=!1;function c(){u===s&&(u=s.slice())}function l(){if(a)throw new Error(Ne(3));return o}function h(t){if("function"!=typeof t)throw new Error(Ne(4));if(a)throw new Error(Ne(5));var e=!0;return c(),u.push(t),function(){if(e){if(a)throw new Error(Ne(6));e=!1,c();var i=u.indexOf(t);u.splice(i,1),s=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(a)throw new Error(Ne(9));try{a=!0,o=r(o,t)}finally{a=!1}for(var e=s=u,i=0;i<e.length;i++){(0,e[i])()}return t}return f({type:Ae.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ne(10));r=t,f({type:Ae.REPLACE})}})[Re]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[Re]=function(){return this},t},n}function Te(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Ae.INIT}))throw new Error(Ne(12));if(void 0===i(void 0,{type:Ae.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},u=0;u<s.length;u++){var a=s[u],c=i[a],l=t[a],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(Ne(14));r[a]=h,n=n||h!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function ke(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ie(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Ne(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=ke.apply(void 0,o)(i.dispatch),Ce(Ce({},i),{},{dispatch:n})}}}function Pe(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var $e=Pe();$e.withExtraArgument=Pe;var Le,Fe=$e,_e=(Le=function(t,e){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Le(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Le(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Be=function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},We=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},De=Object.defineProperty,Ke=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Je=function(t,e,i){return e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ze=function(t,e){for(var i in e||(e={}))He.call(e,i)&&Je(t,i,e[i]);if(Ve)for(var n=0,r=Ve(e);n<r.length;n++){i=r[n];ze.call(e,i)&&Je(t,i,e[i])}return t},Ge=function(t,e){return Ke(t,qe(e))},Xe="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ke:ke.apply(null,arguments)};var Qe=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return _e(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array),Ye=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return _e(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function ti(t){return Nt(t)?xe(t,(function(){})):t}function ei(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Qe;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Fe.withExtraArgument(i.extraArgument)):n.push(Fe));return n}(t)}}function ii(t){var e,i=ei(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,u=void 0===s?i():s,a=n.devTools,c=void 0===a||a,l=n.preloadedState,h=void 0===l?void 0:l,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Te(o)}var v=u;"function"==typeof v&&(v=v(i));var p=Ie.apply(void 0,v),b=ke;c&&(b=Xe(Ze({trace:!1},"object"==typeof c&&c)));var y=new Ye(p),w=y;return Array.isArray(d)?w=We([p],d):"function"==typeof d&&(w=d(y)),Ue(e,h,b.apply(void 0,w))}function ni(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ze(Ze({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function ri(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function oi(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:ti(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},u={},a={};function c(){var e="function"==typeof t.extraReducers?ri(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,a=e[2],c=void 0===a?void 0:a,l=Ze(Ze({},r),u);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?ri(e):[e,i,n],s=o[0],u=o[1],a=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return ti(t())};else{var c=ti(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=We([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[a]),i.reduce((function(t,i){if(i){var n;if(Ct(t))return void 0===(n=i(t,e))?t:n;if(Nt(t))return xe(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,(function(t){for(var e in l)t.addCase(e,l[e]);for(var i=0,n=s;i<n.length;i++){var r=n[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,u[c]=i,a[t]=n?ni(c,n):ni(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:a,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var si=["name","message","stack","code"],ui=function(t,e){this.payload=t,this.meta=e},ai=function(t,e){this.payload=t,this.meta=e},ci=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=si;i<n.length;i++){var r=n[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function li(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=ni(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:Ge(Ze({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=ni(t+"/pending",(function(t,e,i){return{payload:void 0,meta:Ge(Ze({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=ni(t+"/rejected",(function(t,e,n,r,o){return{payload:r,error:(i&&i.serializeError||ci)(t||"Rejected"),meta:Ge(Ze({},o||{}),{arg:n,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(u,a,c){var l,h=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new s;function d(t){l=t,f.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,y,w;return Be(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:a,extra:c}),null===(g=b)||"object"!=typeof g||"function"!=typeof g.then?[3,2]:[4,b];case 1:b=m.sent(),m.label=2;case 2:if(!1===b||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return y=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),u(r(h,t,null==(v=null==i?void 0:i.getPendingMeta)?void 0:v.call(i,{requestId:h,arg:t},{getState:a,extra:c}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:u,getState:a,extra:c,requestId:h,signal:f.signal,abort:d,rejectWithValue:function(t,e){return new ui(t,e)},fulfillWithValue:function(t,e){return new ai(t,e)}})).then((function(e){if(e instanceof ui)throw e;return e instanceof ai?n(e.payload,h,t,e.meta):n(e,h,t)}))])];case 3:return p=m.sent(),[3,5];case 4:return w=m.sent(),p=w instanceof ui?o(null,h,t,w.payload,w.meta):o(w,h,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&o.match(p)&&p.meta.condition||u(p),[2,p]}var g}))},new Promise((function(t,e){var i=function(t){try{r(p.next(t))}catch(t){e(t)}},n=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:h,arg:t,unwrap:function(){return v.then(li)}})}}),{pending:r,rejected:o,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var hi,fi,di="listenerMiddleware";ni(di+"/add"),ni(di+"/removeAll"),ni(di+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[fe];return ye.get(e,t)},set:function(e){var i=this[fe];ye.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][fe];if(!r.P)switch(r.i){case 5:n(r)&&Yt(r);break;case 4:i(r)&&Yt(r)}}}function i(t){for(var e=t.t,i=t.k,n=ve(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==fe){var s=e[o];if(void 0===s&&!At(e,o))return!0;var u=i[o],a=u&&u[fe];if(a?a.t!==s:!Tt(u,s))return!0}}var c=!!e[fe];return n.length!==ve(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){be[t]||(be[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=pe(i);delete o[fe];for(var s=ve(o),u=0;u<s.length;u++){var a=s[u];o[a]=t(a,e||!!o[a].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Wt(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,fe,{value:o,writable:!0}),r},S:function(t,i,r){r?Ct(i)&&i[fe].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[fe];if(i){var r=i.t,o=i.k,s=i.R,u=i.i;if(4===u)Rt(o,(function(e){e!==fe&&(void 0!==r[e]||At(r,e)?s[e]||t(o[e]):(s[e]=!0,Yt(i)))})),Rt(r,(function(t){void 0!==o[t]||At(o,t)||(s[t]=!1,Yt(i))}));else if(5===u){if(n(i)&&(Yt(i),s.length=!0),o.length<r.length)for(var a=o.length;a<r.length;a++)s[a]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var l=Math.min(o.length,r.length),h=0;h<l;h++)o.hasOwnProperty(h)||(s[h]=!0),void 0===s[h]&&t(o[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const vi=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!a(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}},pi=Symbol("internalStoresUnsubscribers"),bi=Symbol("internalStores");class yi extends St{constructor(){super(...arguments),this[hi]=new Map,this[fi]=new Map}getUnnamedStore(){if(this[bi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[bi].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[bi].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:wi(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[bi].delete(e)}setupStore(t,e){this[bi].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[bi].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this[pi].set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[pi]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[pi].has(t)&&this[pi].get(t)(),this[pi].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function wi(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}hi=pi,fi=bi;class mi{static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(wi(n))return n;if(null==i)return;const r=oi(i),o=ii({reducer:r.reducer});return window.ftReduxStores[i.name]=new mi(r,o)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var gi,xi;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(xi=null===(gi=window.safari)||void 0===gi?void 0:gi.pushNotification)||void 0===xi||xi.toString());const Oi={setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setPagesToc:(t,e)=>{t.pagesToc=e.payload},setPaginationConfiguration:(t,e)=>{t.paginationConfiguration=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setConfiguration:(t,e)=>{t.configuration=e.payload}};class Si{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var n,r,o;if(null==t.tocId)return[...this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let s=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const u={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:s,depth:e,parentTocId:i,children:[]};this.register(u);const a=this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,u.tocId);return u.children=[...a,...c],[u]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var n;let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const o={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(o),o.children=this.convertSectionNodes(t.children,e+1,t.tocId),[o]}))}buildPage(t,e){var i,n,r,o,s,u;const a={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(n=t.tocId)&&void 0!==n?n:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?a.topics:a.hiddenTopics).push(t),l=null!==(s=null===(o=t.pageConfiguration)||void 0===o?void 0:o.parentsVisibility)&&void 0!==s?s:[];return a.breadcrumb.forEach(((t,e)=>{c(t,l[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),a.topics.push(...this.tocIds(null!==(u=t.pageToc)&&void 0!==u?u:[])),a}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Ei{convertPaginatedToc(t){return new Si(t).build()}}const ji=w`
82
- `,Ci=mi.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ni{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Ci.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?Ni.build(t):null!==(e=Ni.API)&&void 0!==e?e:Ni.API=Ni.build()}static await(t){return new Promise((e=>{let i=Ni.get(t);if(i)e(i);else{const n=Ci.subscribe((()=>{i=Ni.get(t),i&&(n(),e(i))}))}}))}}var Ri;const Mi=Symbol("clearAfterUnitTest");class Ai{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new n,this.listeners={},this.currentUiLocale="",this[Ri]=()=>{this.defaultMessages={},this.cache=new n,this.listeners={}},this.currentUiLocale=Ci.getState().uiLocale,Ci.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Ci.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};a(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new Et(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>h(0).then((()=>t())).catch((()=>null)))))}}Ri=Mi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Ai((async(t,e)=>(await Ni.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Ai((async(t,e)=>(await Ni.await()).getCustomMessageContext(t,e))));const Ui=window.FluidTopicsI18nService;var Ti=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ki extends St{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ni.get(),this.cache=new n,this.cleanSessionDebouncer=new r}render(){return G`
81
+ `;class Et{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function jt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ct(t){return!!t&&!!t[fe]}function Nt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===de}(t)||Array.isArray(t)||!!t[he]||!!(null===(e=t.constructor)||void 0===e?void 0:e[he])||kt(t)||It(t))}function Rt(t,e,i){void 0===i&&(i=!1),0===Mt(t)?(i?Object.keys:ve)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Mt(t){var e=t[fe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:kt(t)?2:It(t)?3:0}function At(t,e){return 2===Mt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ut(t,e,i){var n=Mt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Tt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function kt(t){return ue&&t instanceof Map}function It(t){return ae&&t instanceof Set}function Pt(t){return t.o||t.t}function $t(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pe(t);delete e[fe];for(var i=ve(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Lt(t,e){return void 0===e&&(e=!1),_t(t)||Ct(t)||!Nt(t)||(Mt(t)>1&&(t.set=t.add=t.clear=t.delete=Ft),Object.freeze(t),e&&Rt(t,(function(t,e){return Lt(e,!0)}),!0)),t}function Ft(){jt(2)}function _t(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Bt(t){var e=be[t];return e||jt(18,t),e}function Wt(){return oe}function Dt(t,e){e&&(Bt("Patches"),t.u=[],t.s=[],t.v=e)}function Kt(t){qt(t),t.p.forEach(Ht),t.p=null}function qt(t){t===oe&&(oe=t.l)}function Vt(t){return oe={p:[],l:oe,h:t,m:!0,_:0}}function Ht(t){var e=t[fe];0===e.i||1===e.i?e.j():e.g=!0}function zt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||Bt("ES5").S(e,t,n),n?(i[fe].P&&(Kt(e),jt(4)),Nt(t)&&(t=Jt(e,t),e.l||Gt(e,t)),e.u&&Bt("Patches").M(i[fe].t,t,e.u,e.s)):t=Jt(e,i,[]),Kt(e),e.u&&e.v(e.u,e.s),t!==le?t:void 0}function Jt(t,e,i){if(_t(e))return e;var n=e[fe];if(!n)return Rt(e,(function(r,o){return Zt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Gt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=$t(n.k):n.o,o=r,s=!1;3===n.i&&(o=new Set(r),r.clear(),s=!0),Rt(o,(function(e,o){return Zt(t,n,r,e,o,i,s)})),Gt(t,r,!1),i&&t.u&&Bt("Patches").N(n,i,t.u,t.s)}return n.o}function Zt(t,e,i,n,r,o,s){if(Ct(r)){var u=Jt(t,r,o&&e&&3!==e.i&&!At(e.R,n)?o.concat(n):void 0);if(Ut(i,n,u),!Ct(u))return;t.m=!1}else s&&i.add(r);if(Nt(r)&&!_t(r)){if(!t.h.D&&t._<1)return;Jt(t,r),e&&e.A.l||Gt(t,r)}}function Gt(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&Lt(e,i)}function Xt(t,e){var i=t[fe];return(i?Pt(i):t)[e]}function Qt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Yt(t){t.P||(t.P=!0,t.l&&Yt(t.l))}function te(t){t.o||(t.o=$t(t.t))}function ee(t,e,i){var n=kt(e)?Bt("MapSet").F(e,i):It(e)?Bt("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Wt(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ye;i&&(r=[n],o=we);var s=Proxy.revocable(r,o),u=s.revoke,a=s.proxy;return n.k=a,n.j=u,a}(e,i):Bt("ES5").J(e,i);return(i?i.A:Wt()).p.push(n),n}function ie(t){return Ct(t)||jt(22,t),function t(e){if(!Nt(e))return e;var i,n=e[fe],r=Mt(e);if(n){if(!n.P&&(n.i<4||!Bt("ES5").K(n)))return n.t;n.I=!0,i=ne(e,r),n.I=!1}else i=ne(e,r);return Rt(i,(function(e,r){n&&function(t,e){return 2===Mt(t)?t.get(e):t[e]}(n.t,e)===r||Ut(i,e,t(r))})),3===r?new Set(i):i}(t)}function ne(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $t(t)}var re,oe,se="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ue="undefined"!=typeof Map,ae="undefined"!=typeof Set,ce="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,le=se?Symbol.for("immer-nothing"):((re={})["immer-nothing"]=!0,re),he=se?Symbol.for("immer-draftable"):"__$immer_draftable",fe=se?Symbol.for("immer-state"):"__$immer_state",de=""+Object.prototype.constructor,ve="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pe=Object.getOwnPropertyDescriptors||function(t){var e={};return ve(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},be={},ye={get:function(t,e){if(e===fe)return t;var i=Pt(t);if(!At(i,e))return function(t,e,i){var n,r=Qt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Nt(n)?n:n===Xt(t.t,e)?(te(t),t.o[e]=ee(t.A.h,n,t)):n},has:function(t,e){return e in Pt(t)},ownKeys:function(t){return Reflect.ownKeys(Pt(t))},set:function(t,e,i){var n=Qt(Pt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=Xt(Pt(t),e),o=null==r?void 0:r[fe];if(o&&o.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Tt(i,r)&&(void 0!==i||At(t.t,e)))return!0;te(t),Yt(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Xt(t.t,e)||e in t.t?(t.R[e]=!1,te(t),Yt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Pt(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){jt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){jt(12)}},we={};Rt(ye,(function(t,e){we[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),we.deleteProperty=function(t,e){return we.set.call(this,t,e,void 0)},we.set=function(t,e,i){return ye.set.call(this,t[0],e,i,t[0])};var me=function(){function t(t){var e=this;this.O=ce,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),u=1;u<n;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&jt(6),void 0!==n&&"function"!=typeof n&&jt(7),Nt(t)){var u=Vt(e),a=ee(e,t,void 0),c=!0;try{s=i(a),c=!1}finally{c?Kt(u):qt(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Dt(u,n),zt(t,u)}),(function(t){throw Kt(u),t})):(Dt(u,n),zt(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===le&&(s=void 0),e.D&&Lt(s,!0),n){var l=[],h=[];Bt("Patches").M(t,s,l,h),n(l,h)}return s}jt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Nt(t)||jt(8),Ct(t)&&(t=ie(t));var e=Vt(this),i=ee(this,t,void 0);return i[fe].C=!0,qt(e),i},e.finishDraft=function(t,e){var i=(t&&t[fe]).A;return Dt(i,e),zt(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!ce&&jt(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Bt("Patches").$;return Ct(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),ge=new me,xe=ge.produce;function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function Se(t){var e=function(t,e){if("object"!==Oe(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Oe(e)?e:String(e)}function Ee(t,e,i){return(e=Se(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function je(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ce(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?je(Object(i),!0).forEach((function(e){Ee(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ne(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}ge.produceWithPatches.bind(ge),ge.setAutoFreeze.bind(ge),ge.setUseProxies.bind(ge),ge.applyPatches.bind(ge),ge.createDraft.bind(ge),ge.finishDraft.bind(ge);var Re="function"==typeof Symbol&&Symbol.observable||"@@observable",Me=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ae={INIT:"@@redux/INIT"+Me(),REPLACE:"@@redux/REPLACE"+Me(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Me()}};function Ue(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ne(1));return i(Ue)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var r=t,o=e,s=[],u=s,a=!1;function c(){u===s&&(u=s.slice())}function l(){if(a)throw new Error(Ne(3));return o}function h(t){if("function"!=typeof t)throw new Error(Ne(4));if(a)throw new Error(Ne(5));var e=!0;return c(),u.push(t),function(){if(e){if(a)throw new Error(Ne(6));e=!1,c();var i=u.indexOf(t);u.splice(i,1),s=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(a)throw new Error(Ne(9));try{a=!0,o=r(o,t)}finally{a=!1}for(var e=s=u,i=0;i<e.length;i++){(0,e[i])()}return t}return f({type:Ae.INIT}),(n={dispatch:f,subscribe:h,getState:l,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ne(10));r=t,f({type:Ae.REPLACE})}})[Re]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function i(){t.next&&t.next(l())}return i(),{unsubscribe:e(i)}}})[Re]=function(){return this},t},n}function Te(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Ae.INIT}))throw new Error(Ne(12));if(void 0===i(void 0,{type:Ae.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},u=0;u<s.length;u++){var a=s[u],c=i[a],l=t[a],h=c(l,e);if(void 0===h)throw e&&e.type,new Error(Ne(14));r[a]=h,n=n||h!==l}return(n=n||s.length!==Object.keys(t).length)?r:t}}function ke(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ie(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Ne(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=ke.apply(void 0,o)(i.dispatch),Ce(Ce({},i),{},{dispatch:n})}}}function Pe(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var $e=Pe();$e.withExtraArgument=Pe;var Le,Fe=$e,_e=(Le=function(t,e){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Le(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Le(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Be=function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},We=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},De=Object.defineProperty,Ke=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Je=function(t,e,i){return e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ze=function(t,e){for(var i in e||(e={}))He.call(e,i)&&Je(t,i,e[i]);if(Ve)for(var n=0,r=Ve(e);n<r.length;n++){i=r[n];ze.call(e,i)&&Je(t,i,e[i])}return t},Ge=function(t,e){return Ke(t,qe(e))},Xe="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ke:ke.apply(null,arguments)};var Qe=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return _e(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array),Ye=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return _e(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function ti(t){return Nt(t)?xe(t,(function(){})):t}function ei(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Qe;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(Fe.withExtraArgument(i.extraArgument)):n.push(Fe));return n}(t)}}function ii(t){var e,i=ei(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,u=void 0===s?i():s,a=n.devTools,c=void 0===a||a,l=n.preloadedState,h=void 0===l?void 0:l,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Te(o)}var v=u;"function"==typeof v&&(v=v(i));var p=Ie.apply(void 0,v),b=ke;c&&(b=Xe(Ze({trace:!1},"object"==typeof c&&c)));var y=new Ye(p),w=y;return Array.isArray(d)?w=We([p],d):"function"==typeof d&&(w=d(y)),Ue(e,h,b.apply(void 0,w))}function ni(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ze(Ze({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function ri(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function oi(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:ti(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},u={},a={};function c(){var e="function"==typeof t.extraReducers?ri(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,a=e[2],c=void 0===a?void 0:a,l=Ze(Ze({},r),u);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?ri(e):[e,i,n],s=o[0],u=o[1],a=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return ti(t())};else{var c=ti(t);r=function(){return c}}function l(t,e){void 0===t&&(t=r());var i=We([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[a]),i.reduce((function(t,i){if(i){var n;if(Ct(t))return void 0===(n=i(t,e))?t:n;if(Nt(t))return xe(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return l.getInitialState=r,l}(n,(function(t){for(var e in l)t.addCase(e,l[e]);for(var i=0,n=s;i<n.length;i++){var r=n[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,u[c]=i,a[t]=n?ni(c,n):ni(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:a,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var si=["name","message","stack","code"],ui=function(t,e){this.payload=t,this.meta=e},ai=function(t,e){this.payload=t,this.meta=e},ci=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=si;i<n.length;i++){var r=n[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function li(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=ni(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:Ge(Ze({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=ni(t+"/pending",(function(t,e,i){return{payload:void 0,meta:Ge(Ze({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),o=ni(t+"/rejected",(function(t,e,n,r,o){return{payload:r,error:(i&&i.serializeError||ci)(t||"Rejected"),meta:Ge(Ze({},o||{}),{arg:n,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(u,a,c){var l,h=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new s;function d(t){l=t,f.abort()}var v=function(){return s=this,v=null,p=function(){var s,v,p,b,y,w;return Be(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:a,extra:c}),null===(g=b)||"object"!=typeof g||"function"!=typeof g.then?[3,2]:[4,b];case 1:b=m.sent(),m.label=2;case 2:if(!1===b||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return y=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),u(r(h,t,null==(v=null==i?void 0:i.getPendingMeta)?void 0:v.call(i,{requestId:h,arg:t},{getState:a,extra:c}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:u,getState:a,extra:c,requestId:h,signal:f.signal,abort:d,rejectWithValue:function(t,e){return new ui(t,e)},fulfillWithValue:function(t,e){return new ai(t,e)}})).then((function(e){if(e instanceof ui)throw e;return e instanceof ai?n(e.payload,h,t,e.meta):n(e,h,t)}))])];case 3:return p=m.sent(),[3,5];case 4:return w=m.sent(),p=w instanceof ui?o(null,h,t,w.payload,w.meta):o(w,h,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&o.match(p)&&p.meta.condition||u(p),[2,p]}var g}))},new Promise((function(t,e){var i=function(t){try{r(p.next(t))}catch(t){e(t)}},n=function(t){try{r(p.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};r((p=p.apply(s,v)).next())}));var s,v,p}();return Object.assign(v,{abort:d,requestId:h,arg:t,unwrap:function(){return v.then(li)}})}}),{pending:r,rejected:o,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var hi,fi,di="listenerMiddleware";ni(di+"/add"),ni(di+"/removeAll"),ni(di+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[fe];return ye.get(e,t)},set:function(e){var i=this[fe];ye.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][fe];if(!r.P)switch(r.i){case 5:n(r)&&Yt(r);break;case 4:i(r)&&Yt(r)}}}function i(t){for(var e=t.t,i=t.k,n=ve(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==fe){var s=e[o];if(void 0===s&&!At(e,o))return!0;var u=i[o],a=u&&u[fe];if(a?a.t!==s:!Tt(u,s))return!0}}var c=!!e[fe];return n.length!==ve(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){be[t]||(be[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=pe(i);delete o[fe];for(var s=ve(o),u=0;u<s.length;u++){var a=s[u];o[a]=t(a,e||!!o[a].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Wt(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,fe,{value:o,writable:!0}),r},S:function(t,i,r){r?Ct(i)&&i[fe].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[fe];if(i){var r=i.t,o=i.k,s=i.R,u=i.i;if(4===u)Rt(o,(function(e){e!==fe&&(void 0!==r[e]||At(r,e)?s[e]||t(o[e]):(s[e]=!0,Yt(i)))})),Rt(r,(function(t){void 0!==o[t]||At(o,t)||(s[t]=!1,Yt(i))}));else if(5===u){if(n(i)&&(Yt(i),s.length=!0),o.length<r.length)for(var a=o.length;a<r.length;a++)s[a]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var l=Math.min(o.length,r.length),h=0;h<l;h++)o.hasOwnProperty(h)||(s[h]=!0),void 0===s[h]&&t(o[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const vi=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const r={hasChanged:(t,e)=>!c(t,e),attribute:!1,...e};s(r)(t,i);const o=t;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}},pi=Symbol("internalStoresUnsubscribers"),bi=Symbol("internalStores");class yi extends St{constructor(){super(...arguments),this[hi]=new Map,this[fi]=new Map}getUnnamedStore(){if(this[bi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[bi].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[bi].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:wi(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[bi].delete(e)}setupStore(t,e){this[bi].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[bi].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this[pi].set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this[pi]).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this[pi].has(t)&&this[pi].get(t)(),this[pi].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function wi(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}hi=pi,fi=bi;class mi{static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(wi(n))return n;if(null==i)return;const r=oi(i),o=ii({reducer:r.reducer});return window.ftReduxStores[i.name]=new mi(r,o)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var gi,xi;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(xi=null===(gi=window.safari)||void 0===gi?void 0:gi.pushNotification)||void 0===xi||xi.toString());const Oi={setMapId:(t,e)=>{t.mapId=e.payload},setTocId:(t,e)=>{t.tocId=e.payload},setMap:(t,e)=>{t.map=e.payload},setToc:(t,e)=>{t.toc=e.payload},setPagesToc:(t,e)=>{t.pagesToc=e.payload},setPaginationConfiguration:(t,e)=>{t.paginationConfiguration=e.payload},setCurrentPage:(t,e)=>{t.currentPage=e.payload},setScrollTarget:(t,e)=>{t.scrollTarget=e.payload},setVisibleTopics:(t,e)=>{t.visibleTopics=e.payload},setConfiguration:(t,e)=>{t.configuration=e.payload}};class Si{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,i){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,i)),null==t.tocId?this.extractPagesToc(t.children,e,i):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,i){return t.flatMap((t=>{var n,r,o;if(null==t.tocId)return[...this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let s=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const u={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,prettyUrl:s,depth:e,parentTocId:i,children:[]};this.register(u);const a=this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,u.tocId);return u.children=[...a,...c],[u]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var n;let r=null===(n=t.prettyUrl)||void 0===n?void 0:n.replace(/^\//,"");const o={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(o),o.children=this.convertSectionNodes(t.children,e+1,t.tocId),[o]}))}buildPage(t,e){var i,n,r,o,s,u;const a={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(n=t.tocId)&&void 0!==n?n:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?a.topics:a.hiddenTopics).push(t),l=null!==(s=null===(o=t.pageConfiguration)||void 0===o?void 0:o.parentsVisibility)&&void 0!==s?s:[];return a.breadcrumb.forEach(((t,e)=>{c(t,l[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),a.topics.push(...this.tocIds(null!==(u=t.pageToc)&&void 0!==u?u:[])),a}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Ei{convertPaginatedToc(t){return new Si(t).build()}}const ji=w`
82
+ `,Ci=mi.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ni{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Ci.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?Ni.build(t):null!==(e=Ni.API)&&void 0!==e?e:Ni.API=Ni.build()}static await(t){return new Promise((e=>{let i=Ni.get(t);if(i)e(i);else{const n=Ci.subscribe((()=>{i=Ni.get(t),i&&(n(),e(i))}))}}))}}var Ri;const Mi=Symbol("clearAfterUnitTest");class Ai{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new n,this.listeners={},this.currentUiLocale="",this[Ri]=()=>{this.defaultMessages={},this.cache=new n,this.listeners={}},this.currentUiLocale=Ci.getState().uiLocale,Ci.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Ci.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};c(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new Et(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>a(0).then((()=>t())).catch((()=>null)))))}}Ri=Mi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Ai((async(t,e)=>(await Ni.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Ai((async(t,e)=>(await Ni.await()).getCustomMessageContext(t,e))));const Ui=window.FluidTopicsI18nService;var Ti=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class ki extends St{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ni.get(),this.cache=new n,this.cleanSessionDebouncer=new r}render(){return G`
83
83
  <slot></slot>
84
- `}updated(t){super.updated(t),t.has("baseUrl")&&Ci.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Ci.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Ci.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Ci.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Ci.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Ci.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Ci.actions.setSession(this.session),t.has("availableUiLocales")&&Ci.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Ui.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}ki.elementDefinitions={},ki.styles=ji,Ti([s()],ki.prototype,"baseUrl",void 0),Ti([s()],ki.prototype,"apiIntegrationIdentifier",void 0),Ti([s()],ki.prototype,"uiLocale",void 0),Ti([l([])],ki.prototype,"availableUiLocales",void 0),Ti([s({type:Boolean})],ki.prototype,"editorMode",void 0),Ti([s({type:Boolean})],ki.prototype,"noCustom",void 0),Ti([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ki.prototype,"noCustomComponent",void 0),Ti([s({type:Boolean})],ki.prototype,"withManualResources",void 0),Ti([l([])],ki.prototype,"messageContexts",void 0),Ti([l(void 0)],ki.prototype,"session",void 0),Ti([s({type:Object})],ki.prototype,"apiProvider",void 0),c("ft-app-context")(ki);class Ii{static async build(t){return new Ii(new Ei,await Ni.await(),new n,t)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,n){this.converter=t,this.api=e,this.cache=i,this._mapId=n,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.api.getMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.api.getPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t;return(null===(t=Ci.getState().session)||void 0===t?void 0:t.profile.roles.includes("RATING_USER"))?this.withMapId((t=>this.api.getMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.api.tenantBaseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o=this.enrichedToc,s=null==o?void 0:o.pageByTocId[t],u=null==o?void 0:o.nodeByTocId[t],a=null==u?void 0:u.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==u?void 0:u.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=a?a.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=a?a:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return e?{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.api.rateMap(this.mapId,t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,e,i){return this.api.rateTopic(this.mapId,t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=Ci.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e){return this.api.sendTopicFeedback(this.mapId,t,e)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class Pi{static build(t){return new Pi((t=>mi.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[]},reducers:Oi}))(t.trim()||"context"),Ii.build)}constructor(t,e){this.store=t,this.reloadDebouncer=new r(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}async awaitService(){for(;null==this.service;)await h(5);return this.service}async navigateToTopic(t,e,i){const n=await this.awaitService();let r=await(null!=i?n.getPage(i):n.getPageByTocId(t));this.store.actions.setCurrentPage(r),this.store.actions.setScrollTarget({tocId:t,section:e})}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.setCurrentPage(i)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,e;this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),null===(t=this.service)||void 0===t||t.clear(),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,n,r,o;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.setMap(t))),null===(n=this.service)||void 0===n?void 0:n.getToc().then((t=>this.store.actions.setToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(o=this.service)||void 0===o?void 0:o.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}}const $i=w`
84
+ `}updated(t){super.updated(t),t.has("baseUrl")&&Ci.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Ci.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Ci.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Ci.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Ci.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Ci.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Ci.actions.setSession(this.session),t.has("availableUiLocales")&&Ci.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Ui.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}ki.elementDefinitions={},ki.styles=ji,Ti([s()],ki.prototype,"baseUrl",void 0),Ti([s()],ki.prototype,"apiIntegrationIdentifier",void 0),Ti([s()],ki.prototype,"uiLocale",void 0),Ti([h([])],ki.prototype,"availableUiLocales",void 0),Ti([s({type:Boolean})],ki.prototype,"editorMode",void 0),Ti([s({type:Boolean})],ki.prototype,"noCustom",void 0),Ti([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],ki.prototype,"noCustomComponent",void 0),Ti([s({type:Boolean})],ki.prototype,"withManualResources",void 0),Ti([h([])],ki.prototype,"messageContexts",void 0),Ti([h(void 0)],ki.prototype,"session",void 0),Ti([s({type:Object})],ki.prototype,"apiProvider",void 0),l("ft-app-context")(ki);class Ii{static async build(t){return new Ii(new Ei,await Ni.await(),new n,t)}get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,n){this.converter=t,this.api=e,this.cache=i,this._mapId=n,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.api.getMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.api.getPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t;return(null===(t=Ci.getState().session)||void 0===t?void 0:t.profile.roles.includes("RATING_USER"))?this.withMapId((t=>this.api.getMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t,(()=>this.api.getTopic(this.mapId,t)))}getTopicContent(t){return this.cache.get("topic-content-"+t,(()=>this.api.getTopicHTMLContent(this.mapId,t,"DESIGNED_READER")))}getLink(t,e,i){const n=this.getNavigationData(t,e,i),r="r/"+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),o=new URL(r,this.api.tenantBaseUrl);return null!=n.page&&o.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&o.searchParams.set("tocId",n.tocId),null!=n.section&&o.searchParams.set("section",n.section),o.href}getNavigationData(t,e,i){var n,r;t=t||"root";const o=this.enrichedToc,s=null==o?void 0:o.pageByTocId[t],u=null==o?void 0:o.nodeByTocId[t],a=null==u?void 0:u.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(n=null==u?void 0:u.title)&&void 0!==n?n:"",page:e&&s&&s.number!==e?e:void 0,prettyUrl:null!=a?a.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==o?void 0:o.duplicatedPrettyUrls.has(null!=a?a:""))&&void 0!==r&&r,section:i}}async getAccurateNavigationData(t,e,i){return await this.getEnrichedToc(),this.getNavigationData(t,e,i)}getRatingSummary(){return this.cache.get("ratingSummary")}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var i;return e?{type:e.topics.type,rating:null===(i=e.topics)||void 0===i?void 0:i.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.api.rateMap(this.mapId,t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.api.unrateMap(this.mapId).then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t){return this.api.sendMapFeedback(this.mapId,t)}rateTopic(t,e,i){return this.api.rateTopic(this.mapId,t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.api.unrateTopic(this.mapId,t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=Ci.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e){return this.api.sendTopicFeedback(this.mapId,t,e)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}}class Pi{static build(t){return new Pi((t=>mi.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[]},reducers:Oi}))(t.trim()||"context"),Ii.build)}constructor(t,e){this.store=t,this.reloadDebouncer=new r(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.setMapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.setVisibleTopics(t)}async awaitService(){for(;null==this.service;)await a(5);return this.service}async navigateToTopic(t,e,i){const n=await this.awaitService();let r=await(null!=i?n.getPage(i):n.getPageByTocId(t));this.store.actions.setCurrentPage(r),this.store.actions.setScrollTarget({tocId:t,section:e})}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.setCurrentPage(i)}scrollDone(){this.store.actions.setScrollTarget({})}async reload(){var t,e;this.store.actions.setConfiguration(void 0),this.store.actions.setMap(void 0),this.store.actions.setToc(void 0),this.store.actions.setPagesToc(void 0),this.store.actions.setCurrentPage(void 0),null===(t=this.service)||void 0===t||t.clear(),(null===(e=this.service)||void 0===e?void 0:e.mapId)&&await this.reloadDebouncer.run((()=>this.fetchData()))}async fetchData(){var t,i,n,r,o;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.setConfiguration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.setMap(t))),null===(n=this.service)||void 0===n?void 0:n.getToc().then((t=>this.store.actions.setToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.setPagesToc(t))),null===(o=this.service)||void 0===o?void 0:o.getPaginationConfiguration().then((t=>this.store.actions.setPaginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}}const $i=w`
85
85
  `;var Li=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,u=t.length-1;u>=0;u--)(r=t[u])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Fi extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class _i extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Bi extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class Wi extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class Di extends Event{constructor(){super("ft-reader-map-not-found")}}class Ki extends Event{constructor(){super("ft-reader-map-unauthorized")}}class qi extends yi{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new r(5),this.navigationDebouncer=new r(50),this.addStore(Ci)}render(){return G`
86
86
  ${this.importStyleIfNeeded()}
87
87
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
@@ -89,4 +89,4 @@ var ft,dt;let vt=class extends M{constructor(){super(...arguments),this.renderOp
89
89
  <style>
90
90
  @import "${i}"
91
91
  </style>
92
- `}get stateManager(){return null==this._stateManager&&(this._stateManager=Pi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(e&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}updated(t){super.updated(t),t.has("mapId")&&this.stateManager.setMapId(this.mapId),["tocId","section","page","mapId"].some((e=>t.has(e)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new Fi(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new Bi(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new _i(this.map,e))}))}buildBreadcrumb(t){var e,i,n,r;let o=[],s=null===(i=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId,u=null===(n=this.stateManager.service)||void 0===n?void 0:n.getTocNodeNow(s);for(;u;)o.unshift({tocId:u.tocId,title:u.title}),u=null===(r=this.stateManager.service)||void 0===r?void 0:r.getTocNodeNow(u.parentTocId);return o}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){this.navigationDebouncer.run((()=>{null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new Di):401===e.status?this.dispatchEvent(new Ki):this.dispatchEvent(new Wi(t))}}var Vi;qi.styles=$i,Li([vi({store:Ci.name})],qi.prototype,"baseUrl",void 0),Li([s()],qi.prototype,"mapId",void 0),Li([s()],qi.prototype,"tocId",void 0),Li([s()],qi.prototype,"section",void 0),Li([s({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:Vi}})],qi.prototype,"page",void 0),Li([vi({store:"reader"})],qi.prototype,"map",void 0),Li([vi({store:"reader"})],qi.prototype,"toc",void 0),Li([vi({store:"reader"})],qi.prototype,"visibleTopics",void 0),Li([vi({store:"reader"})],qi.prototype,"currentPage",void 0),Li([vi({store:"reader"})],qi.prototype,"scrollTarget",void 0),c("ft-reader-context")(qi),t.FtReaderContext=qi,t.FtReaderContextCssVariables={},t.LoadErrorEvent=Wi,t.MapLoadedEvent=Fi,t.NavigationDoneEvent=Bi,t.NotFoundErrorEvent=Di,t.UnauthorizedErrorEvent=Ki,t.VisibleTopicsChangeEvent=_i,t.styles=$i}({});
92
+ `}get stateManager(){return null==this._stateManager&&(this._stateManager=Pi.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0")),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(e&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}updated(t){super.updated(t),t.has("mapId")&&this.stateManager.setMapId(this.mapId),["tocId","section","page","mapId"].some((e=>t.has(e)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.map&&this.toc&&this.dispatchEvent(new Fi(this.map,this.toc)),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new Bi(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>({tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:this.buildBreadcrumb(t.tocId)})));this.dispatchEvent(new _i(this.map,e))}))}buildBreadcrumb(t){var e,i,n,r;let o=[],s=null===(i=null===(e=this.stateManager.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId,u=null===(n=this.stateManager.service)||void 0===n?void 0:n.getTocNodeNow(s);for(;u;)o.unshift({tocId:u.tocId,title:u.title}),u=null===(r=this.stateManager.service)||void 0===r?void 0:r.getTocNodeNow(u.parentTocId);return o}async reload(){await this.stateManager.reload(),this.navigateToTarget()}navigateToTarget(){this.navigationDebouncer.run((()=>{null!=this.tocId?this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;404===e.status?this.dispatchEvent(new Di):401===e.status?this.dispatchEvent(new Ki):this.dispatchEvent(new Wi(t))}}var Vi;qi.styles=$i,Li([vi({store:Ci.name})],qi.prototype,"baseUrl",void 0),Li([s()],qi.prototype,"mapId",void 0),Li([s()],qi.prototype,"tocId",void 0),Li([s()],qi.prototype,"section",void 0),Li([s({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:Vi}})],qi.prototype,"page",void 0),Li([vi({store:"reader"})],qi.prototype,"map",void 0),Li([vi({store:"reader"})],qi.prototype,"toc",void 0),Li([vi({store:"reader"})],qi.prototype,"visibleTopics",void 0),Li([vi({store:"reader"})],qi.prototype,"currentPage",void 0),Li([vi({store:"reader"})],qi.prototype,"scrollTarget",void 0),l("ft-reader-context")(qi),t.FtReaderContext=qi,t.FtReaderContextCssVariables={},t.LoadErrorEvent=Wi,t.MapLoadedEvent=Fi,t.NavigationDoneEvent=Bi,t.NotFoundErrorEvent=Di,t.UnauthorizedErrorEvent=Ki,t.VisibleTopicsChangeEvent=_i,t.styles=$i}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,8 +19,8 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "1.0.11",
23
- "@fluid-topics/ft-wc-utils": "1.0.11",
22
+ "@fluid-topics/ft-app-context": "1.0.13",
23
+ "@fluid-topics/ft-wc-utils": "1.0.13",
24
24
  "@reduxjs/toolkit": "^1.6.2",
25
25
  "lit": "2.7.2"
26
26
  },
@@ -30,5 +30,5 @@
30
30
  "peerDependencies": {
31
31
  "@fluid-topics/public-api": "1.0.34"
32
32
  },
33
- "gitHead": "96a368bb07212723b70ce83e4a5e0f9a27777cc2"
33
+ "gitHead": "3ce26f9002e59dd63fced5c00272dcb4cf863d10"
34
34
  }