@fluid-topics/ft-reader-feedback 1.1.11 → 1.1.12
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.
- package/build/ft-reader-feedback.css.js +0 -21
- package/build/ft-reader-feedback.d.ts +1 -3
- package/build/ft-reader-feedback.js +16 -41
- package/build/ft-reader-feedback.light.js +260 -301
- package/build/ft-reader-feedback.min.js +187 -228
- package/build/ft-reader-map-feedback.d.ts +1 -2
- package/build/ft-reader-map-feedback.js +5 -16
- package/build/ft-reader-topic-feedback.d.ts +1 -2
- package/build/ft-reader-topic-feedback.js +6 -17
- package/build/utils/InDesignerFeedbackComponentMessages.d.ts +0 -4
- package/build/utils/InDesignerFeedbackComponentMessages.js +0 -4
- package/package.json +5 -5
|
@@ -12,43 +12,43 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let f=i.call(o,t);f||(f=h(t),e.call(o,t,f)),this===window.customElements&&(a.set(r,c),c.standInClass=f);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=a.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,f=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=f(i)||window.customElements,r=o._getDefinition(e);return r?p(i,r):n.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,r),i.call(this,n,t,r)}else o.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,o){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,o);const e=this.getAttribute(r);i.call(this,r,t,e)}else n.call(this,r,o)})},u=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t?Object.setPrototypeOf(e,window.HTMLElement):u(i)},p=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){g.push(this),i.set.call(this,t),g.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0===r.get(i).formAssociated)return o?.call(this,...e);throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(ms){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e extends Error{constructor(t,e,i){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=i}}class i extends Promise{constructor(t){super(((i,o)=>t((t=>{this.isCanceled?o(new e("Promise has been canceled",t)):i(t)}),(t=>{this.isCanceled?o(new e("Promise has been canceled",void 0,t)):o(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class o{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof i&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,o){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(t=>new i(((e,i)=>t.then(e).catch(i))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let f=i.call(o,t);f||(f=h(t),e.call(o,t,f)),this===window.customElements&&(a.set(r,c),c.standInClass=f);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const y=this._whenDefinedPromises.get(t);return void 0!==y&&(y.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){g.push(this),o.upgrade.apply(o,arguments),g.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=a.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,f=t=>{let e=t.getRootNode();if(!c(e)){const t=g[g.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=f(i)||window.customElements,r=o._getDefinition(e);return r?p(i,r):n.set(i,o),i}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);o.call(this,n,r),i.call(this,n,t,r)}else o.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);r.call(this,o),i.call(this,o,t,null)}else r.call(this,o)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,o){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,o);const e=this.getAttribute(r);i.call(this,r,t,e)}else n.call(this,r,o)})},u=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t?Object.setPrototypeOf(e,window.HTMLElement):u(i)},p=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=y.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let g=[document];const b=(t,e,i=void 0)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){g.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&s.set(t,this),g.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const v=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){g.push(this),i.set.call(this,t),g.pop()}})};if(v(Element,"innerHTML"),v(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0===r.get(i).formAssociated)return o?.call(this,...e);throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),r=e.get(o)||[];this[+i]=t,r.push(t),e.set(o,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const i of t){const t=r.get(i);t&&!0!==t.formAssociated||e.push(i)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(Ja){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{if(null!==i)try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e extends Error{constructor(t,e,i){super(t),this.canceledPromiseResult=e,this.canceledPromiseError=i}}class i extends Promise{constructor(t){super(((i,o)=>t((t=>{this.isCanceled?o(new e("Promise has been canceled",t)):i(t)}),(t=>{this.isCanceled?o(new e("Promise has been canceled",void 0,t)):o(t)})))),this.isCanceled=!1}cancel(){this.isCanceled=!0}}class o{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof i&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,o){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=(t=>new i(((e,i)=>t.then(e).catch(i))))(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}}class r{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const
|
|
20
|
+
*/const n=globalThis,a=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),l=new WeakMap;const c=t=>new class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)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(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=l.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(e,t))}return t}toString(){return this.cssText}}("string"==typeof t?t:t+"",void 0,s),f=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return c(e)})(t):t
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/,{is:
|
|
25
|
+
*/,{is:h,defineProperty:d,getOwnPropertyDescriptor:u,getOwnPropertyNames:p,getOwnPropertySymbols:y,getPrototypeOf:g}=Object,b=globalThis,v=b.trustedTypes,m=v?v.emptyScript:"",x=b.reactiveElementPolyfillSupport,w=(t,e)=>t,O={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},S=(t,e)=>!h(t,e),$={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;let N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&d(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const n=o?.call(this);r.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??$}static _$Ei(){if(this.hasOwnProperty(w("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(w("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(w("properties"))){const t=this.properties,e=[...p(t),...y(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(a)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=n.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:O).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:O;this._$Em=o,this[o]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i,o=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??S)(o?r:this[t],e))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[w("elementProperties")]=new Map,N[w("finalized")]=new Map,x?.({ReactiveElement:N}),(b.reactiveElementVersions??=[]).push("2.0.2");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const C={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:S},E=(t=C,e,i)=>{const{kind:o,metadata:r}=i;let n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function k(t){return(e,i)=>"object"==typeof i?E(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
35
35
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/}function
|
|
36
|
+
*/}function R(t){return k({...t,state:!0,attribute:!1})}
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/function
|
|
41
|
+
*/function I(t){return(e,i)=>{const o="function"==typeof e?e:e[i];Object.assign(o,t)}}
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2017 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/const
|
|
46
|
+
*/const U=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,i)
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/;function
|
|
51
|
+
*/;function L(t,e){return(i,o,r)=>{const n=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:e}="object"==typeof o?i:r??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return U(0,0,{get(){let i=t.call(this);return void 0===i&&(i=n(this),(null!==i||this.hasUpdated)&&e.call(this,i)),i}})}return U(0,0,{get(){return n(this)}})}}
|
|
52
52
|
/**
|
|
53
53
|
* @license
|
|
54
54
|
* Copyright 2021 Google LLC
|
|
@@ -59,7 +59,7 @@ const N={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:O},C=(t=N,e,
|
|
|
59
59
|
* Copyright 2017 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
61
|
*/
|
|
62
|
-
function
|
|
62
|
+
function A(t){return(e,i)=>{const{slot:o}=t??{},r="slot"+(o?`[name=${o}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}const _=t=>new Promise((e=>setTimeout(e,t)));function T(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,o,r;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!T(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!T(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[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(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(o=i;0!=o--;){var n=r[o];if(!T(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const W=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function D(t,e){const i=()=>JSON.parse(JSON.stringify(t));return k({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)=>!T(t,e),...null!=e?e:{}})}
|
|
63
63
|
/**
|
|
64
64
|
* @license
|
|
65
65
|
* Copyright 2017 Google LLC
|
|
@@ -92,7 +92,7 @@ let Ne=class extends Kt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
92
92
|
* @license
|
|
93
93
|
* Copyright 2019 Google LLC
|
|
94
94
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
95
|
-
*/const We=window,De=We.ShadowRoot&&(void 0===We.ShadyCSS||We.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class Fe extends Ne{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((t,e)=>{De?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=We.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(i,t.elementStyles),i}}var Pe,Me=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const je=Symbol("constructorPrototype"),ze=Symbol("constructorName"),Be=Symbol("exportpartsDebouncer");class Ke extends Fe{constructor(){super(),this[Pe]=new
|
|
95
|
+
*/const We=window,De=We.ShadowRoot&&(void 0===We.ShadyCSS||We.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class Fe extends Ne{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((t,e)=>{De?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=We.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(i,t.elementStyles),i}}var Pe,Me=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const je=Symbol("constructorPrototype"),ze=Symbol("constructorName"),Be=Symbol("exportpartsDebouncer");class Ke extends Fe{constructor(){super(),this[Pe]=new r(5),this[ze]=this.constructor.name,this[je]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ze]&&Object.setPrototypeOf(this,this[je])}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[Be].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,o,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.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===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==r?r:[],i=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...i).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const f=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...f].join(", "))}}Pe=Be,Me([k()],Ke.prototype,"exportpartsPrefix",void 0),Me([D([])],Ke.prototype,"exportpartsPrefixes",void 0),Me([k()],Ke.prototype,"customStylesheet",void 0);const Ze=ke.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");kt`
|
|
96
96
|
.highlight-html-match {
|
|
97
97
|
background: ${Ze};
|
|
98
98
|
}
|
|
@@ -128,7 +128,7 @@ let Ne=class extends Kt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
128
128
|
display: inline-block;
|
|
129
129
|
width: 0;
|
|
130
130
|
}
|
|
131
|
-
`;class Ve{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let r=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";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()}}}const qe=t=>{const e=null!=t?t:{};return(t,i)=>{var o;const r={hasChanged:(t,e)=>!T(t,e),attribute:!1,...e};E(r)(t,i);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(i,{selector:null!==(o=e.selector)&&void 0!==o?o:t=>t[i],store:e.store})}};class Ye{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function Xe(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Je,Qe,ti;const ei=Symbol("internalReduxEventsUnsubscribers"),ii=Symbol("internalStoresUnsubscribers"),oi=Symbol("internalStores");class ri extends Ke{constructor(){super(...arguments),this[Je]=new Map,this[Qe]=new Map,this[ti]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[oi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[oi].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[oi].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Xe(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[oi].delete(e)}setupStore(t,e){this[oi].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[oi].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.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&&(t.store?this[ii].has(t.store):this[ii].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[ii].set(t,e.subscribe((()=>this.updateFromStores()))),Xe(e)&&e.eventBus&&(null===(i=this.reduxConstructor.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[ei].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ii].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[ei].forEach((t=>t())),this[ei]=[]}unsubscribeFromStore(t){this[ii].has(t)&&this[ii].get(t)(),this[ii].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function ni(t){for(var e=arguments.length,i=Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];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 ai(t){return!!t&&!!t[Hi]}function si(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)===Gi}(t)||Array.isArray(t)||!!t[Zi]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Zi])||ui(t)||pi(t))}function li(t,e,i){void 0===i&&(i=!1),0===ci(t)?(i?Object.keys:Vi)(t).forEach((function(o){i&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function ci(t){var e=t[Hi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ui(t)?2:pi(t)?3:0}function fi(t,e){return 2===ci(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function hi(t,e,i){var o=ci(t);2===o?t.set(e,i):3===o?t.add(i):t[e]=i}function di(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function ui(t){return ji&&t instanceof Map}function pi(t){return zi&&t instanceof Set}function yi(t){return t.o||t.t}function gi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qi(t);delete e[Hi];for(var i=Vi(e),o=0;o<i.length;o++){var r=i[o],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function bi(t,e){return void 0===e&&(e=!1),mi(t)||ai(t)||!si(t)||(ci(t)>1&&(t.set=t.add=t.clear=t.delete=vi),Object.freeze(t),e&&li(t,(function(t,e){return bi(e,!0)}),!0)),t}function vi(){ni(2)}function mi(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function xi(t){var e=Yi[t];return e||ni(18,t),e}function wi(){return Pi}function Oi(t,e){e&&(xi("Patches"),t.u=[],t.s=[],t.v=e)}function Si(t){$i(t),t.p.forEach(Ci),t.p=null}function $i(t){t===Pi&&(Pi=t.l)}function Ni(t){return Pi={p:[],l:Pi,h:t,m:!0,_:0}}function Ci(t){var e=t[Hi];0===e.i||1===e.i?e.j():e.g=!0}function Ei(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.O||xi("ES5").S(e,t,o),o?(i[Hi].P&&(Si(e),ni(4)),si(t)&&(t=ki(e,t),e.l||Ii(e,t)),e.u&&xi("Patches").M(i[Hi].t,t,e.u,e.s)):t=ki(e,i,[]),Si(e),e.u&&e.v(e.u,e.s),t!==Ki?t:void 0}function ki(t,e,i){if(mi(e))return e;var o=e[Hi];if(!o)return li(e,(function(r,n){return Ri(t,o,e,r,n,i)}),!0),e;if(o.A!==t)return e;if(!o.P)return Ii(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=gi(o.k):o.o,n=r,a=!1;3===o.i&&(n=new Set(r),r.clear(),a=!0),li(n,(function(e,n){return Ri(t,o,r,e,n,i,a)})),Ii(t,r,!1),i&&t.u&&xi("Patches").N(o,i,t.u,t.s)}return o.o}function Ri(t,e,i,o,r,n,a){if(ai(r)){var s=ki(t,r,n&&e&&3!==e.i&&!fi(e.R,o)?n.concat(o):void 0);if(hi(i,o,s),!ai(s))return;t.m=!1}else a&&i.add(r);if(si(r)&&!mi(r)){if(!t.h.D&&t._<1)return;ki(t,r),e&&e.A.l||Ii(t,r)}}function Ii(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&bi(e,i)}function Ui(t,e){var i=t[Hi];return(i?yi(i):t)[e]}function Li(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var o=Object.getOwnPropertyDescriptor(i,e);if(o)return o;i=Object.getPrototypeOf(i)}}function Ai(t){t.P||(t.P=!0,t.l&&Ai(t.l))}function _i(t){t.o||(t.o=gi(t.t))}function Ti(t,e,i){var o=ui(e)?xi("MapSet").F(e,i):pi(e)?xi("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),o={i:i?1:0,A:e?e.A:wi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=o,n=Xi;i&&(r=[o],n=Ji);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return o.k=l,o.j=s,l}(e,i):xi("ES5").J(e,i);return(i?i.A:wi()).p.push(o),o}function Wi(t){return ai(t)||ni(22,t),function t(e){if(!si(e))return e;var i,o=e[Hi],r=ci(e);if(o){if(!o.P&&(o.i<4||!xi("ES5").K(o)))return o.t;o.I=!0,i=Di(e,r),o.I=!1}else i=Di(e,r);return li(i,(function(e,r){o&&function(t,e){return 2===ci(t)?t.get(e):t[e]}(o.t,e)===r||hi(i,e,t(r))})),3===r?new Set(i):i}(t)}function Di(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gi(t)}Je=ii,Qe=oi,ti=ei,ri.reduxProperties=new Map,ri.reduxReactiveProperties=new Set,ri.reduxEventListeners=new Map;var Fi,Pi,Mi="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ji="undefined"!=typeof Map,zi="undefined"!=typeof Set,Bi="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ki=Mi?Symbol.for("immer-nothing"):((Fi={})["immer-nothing"]=!0,Fi),Zi=Mi?Symbol.for("immer-draftable"):"__$immer_draftable",Hi=Mi?Symbol.for("immer-state"):"__$immer_state",Gi=""+Object.prototype.constructor,Vi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qi=Object.getOwnPropertyDescriptors||function(t){var e={};return Vi(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Yi={},Xi={get:function(t,e){if(e===Hi)return t;var i=yi(t);if(!fi(i,e))return function(t,e,i){var o,r=Li(e,i);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(t.k):void 0}(t,i,e);var o=i[e];return t.I||!si(o)?o:o===Ui(t.t,e)?(_i(t),t.o[e]=Ti(t.A.h,o,t)):o},has:function(t,e){return e in yi(t)},ownKeys:function(t){return Reflect.ownKeys(yi(t))},set:function(t,e,i){var o=Li(yi(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,i),!0;if(!t.P){var r=Ui(yi(t),e),n=null==r?void 0:r[Hi];if(n&&n.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(di(i,r)&&(void 0!==i||fi(t.t,e)))return!0;_i(t),Ai(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!==Ui(t.t,e)||e in t.t?(t.R[e]=!1,_i(t),Ai(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=yi(t),o=Reflect.getOwnPropertyDescriptor(i,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:i[e]}:o},defineProperty:function(){ni(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ni(12)}},Ji={};li(Xi,(function(t,e){Ji[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ji.deleteProperty=function(t,e){return Ji.set.call(this,t,e,void 0)},Ji.set=function(t,e,i){return Xi.set.call(this,t[0],e,i,t[0])};var Qi=function(){function t(t){var e=this;this.O=Bi,this.D=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var o;return(o=i).call.apply(o,[e,t].concat(a))}))}}var a;if("function"!=typeof i&&ni(6),void 0!==o&&"function"!=typeof o&&ni(7),si(t)){var s=Ni(e),l=Ti(e,t,void 0),c=!0;try{a=i(l),c=!1}finally{c?Si(s):$i(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Oi(s,o),Ei(t,s)}),(function(t){throw Si(s),t})):(Oi(s,o),Ei(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=i(t))&&(a=t),a===Ki&&(a=void 0),e.D&&bi(a,!0),o){var f=[],h=[];xi("Patches").M(t,a,f,h),o(f,h)}return a}ni(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var o,r,n=e.produce(t,i,(function(t,e){o=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,o,r]})):[n,o,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){si(t)||ni(8),ai(t)&&(t=Wi(t));var e=Ni(this),i=Ti(this,t,void 0);return i[Hi].C=!0,$i(e),i},e.finishDraft=function(t,e){var i=(t&&t[Hi]).A;return Oi(i,e),Ei(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Bi&&ni(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var o=e[i];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}i>-1&&(e=e.slice(i+1));var r=xi("Patches").$;return ai(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),to=new Qi,eo=to.produce;function io(t){return io="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},io(t)}function oo(t){var e=function(t,e){if("object"!==io(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!==io(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===io(e)?e:String(e)}function ro(t,e,i){return(e=oo(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function no(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function ao(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?no(Object(i),!0).forEach((function(e){ro(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):no(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function so(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. "}to.produceWithPatches.bind(to),to.setAutoFreeze.bind(to),to.setUseProxies.bind(to),to.applyPatches.bind(to),to.createDraft.bind(to),to.finishDraft.bind(to);var lo="function"==typeof Symbol&&Symbol.observable||"@@observable",co=function(){return Math.random().toString(36).substring(7).split("").join(".")},fo={INIT:"@@redux/INIT"+co(),REPLACE:"@@redux/REPLACE"+co(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+co()}};function ho(t,e,i){var o;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(so(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(so(1));return i(ho)(t,e)}if("function"!=typeof t)throw new Error(so(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(so(3));return n}function h(t){if("function"!=typeof t)throw new Error(so(4));if(l)throw new Error(so(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(so(6));e=!1,c();var i=s.indexOf(t);s.splice(i,1),a=null}}}function d(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(so(7));if(void 0===t.type)throw new Error(so(8));if(l)throw new Error(so(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,i=0;i<e.length;i++){(0,e[i])()}return t}return d({type:fo.INIT}),(o={dispatch:d,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(so(10));r=t,d({type:fo.REPLACE})}})[lo]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(so(11));function i(){t.next&&t.next(f())}return i(),{unsubscribe:e(i)}}})[lo]=function(){return this},t},o}function uo(t){for(var e=Object.keys(t),i={},o=0;o<e.length;o++){var r=e[o];"function"==typeof t[r]&&(i[r]=t[r])}var n,a=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:fo.INIT}))throw new Error(so(12));if(void 0===i(void 0,{type:fo.PROBE_UNKNOWN_ACTION()}))throw new Error(so(13))}))}(i)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var o=!1,r={},s=0;s<a.length;s++){var l=a[s],c=i[l],f=t[l],h=c(f,e);if(void 0===h)throw e&&e.type,new Error(so(14));r[l]=h,o=o||h!==f}return(o=o||a.length!==Object.keys(t).length)?r:t}}function po(){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 yo(){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),o=function(){throw new Error(so(15))},r={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return o=po.apply(void 0,n)(i.dispatch),ao(ao({},i),{},{dispatch:o})}}}function go(t){return function(e){var i=e.dispatch,o=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,o,t):e(r)}}}}var bo=go();bo.withExtraArgument=go;var vo,mo=bo,xo=(vo=function(t,e){return vo=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])},vo(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}vo(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),wo=function(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},Oo=function(t,e){for(var i=0,o=e.length,r=t.length;i<o;i++,r++)t[r]=e[i];return t},So=Object.defineProperty,$o=Object.defineProperties,No=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,ko=Object.prototype.propertyIsEnumerable,Ro=function(t,e,i){return e in t?So(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Io=function(t,e){for(var i in e||(e={}))Eo.call(e,i)&&Ro(t,i,e[i]);if(Co)for(var o=0,r=Co(e);o<r.length;o++){i=r[o];ko.call(e,i)&&Ro(t,i,e[i])}return t},Uo=function(t,e){return $o(t,No(e))},Lo="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?po:po.apply(null,arguments)};var Ao=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return xo(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,Oo([void 0],t[0].concat(this)))):new(e.bind.apply(e,Oo([void 0],t.concat(this))))},e}(Array),_o=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return xo(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,Oo([void 0],t[0].concat(this)))):new(e.bind.apply(e,Oo([void 0],t.concat(this))))},e}(Array);function To(t){return si(t)?eo(t,(function(){})):t}function Wo(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var o=new Ao;i&&(!function(t){return"boolean"==typeof t}(i)?o.push(mo.withExtraArgument(i.extraArgument)):o.push(mo));return o}(t)}}function Do(t){var e,i=Wo(),o=t||{},r=o.reducer,n=void 0===r?void 0:r,a=o.middleware,s=void 0===a?i():a,l=o.devTools,c=void 0===l||l,f=o.preloadedState,h=void 0===f?void 0:f,d=o.enhancers,u=void 0===d?void 0:d;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=uo(n)}var p=s;"function"==typeof p&&(p=p(i));var y=yo.apply(void 0,p),g=po;c&&(g=Lo(Io({trace:!1},"object"==typeof c&&c)));var b=new _o(y),v=b;return Array.isArray(u)?v=Oo([y],u):"function"==typeof u&&(v=u(b)),ho(e,h,g.apply(void 0,v))}function Fo(t,e){function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Io(Io({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 Po(t){var e,i={},o=[],r={addCase:function(t,e){var o="string"==typeof t?t:t.type;if(o in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[o]=e,r},addMatcher:function(t,e){return o.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,o,e]}function Mo(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,o="function"==typeof t.initialState?t.initialState:To(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Po(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,f=Io(Io({},r),s);return function(t,e,i,o){void 0===i&&(i=[]);var r,n="function"==typeof e?Po(e):[e,i,o],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return To(t())};else{var c=To(t);r=function(){return c}}function f(t,e){void 0===t&&(t=r());var i=Oo([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var o;if(ai(t))return void 0===(o=i(t,e))?t:o;if(si(t))return eo(t,(function(t){return i(t,e)}));if(void 0===(o=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return t}),t)}return f.getInitialState=r,f}(o,(function(t){for(var e in f)t.addCase(e,f[e]);for(var i=0,o=a;i<o.length;i++){var r=o[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var i,o,n=r[t],c=e+"/"+t;"reducer"in n?(i=n.reducer,o=n.prepare):i=n,a[t]=i,s[c]=i,l[t]=o?Fo(c,o):Fo(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:a,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var jo=["name","message","stack","code"],zo=function(t,e){this.payload=t,this.meta=e},Bo=function(t,e){this.payload=t,this.meta=e},Ko=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,o=jo;i<o.length;i++){var r=o[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function Zo(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 o=Fo(t+"/fulfilled",(function(t,e,i,o){return{payload:t,meta:Uo(Io({},o||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=Fo(t+"/pending",(function(t,e,i){return{payload:void 0,meta:Uo(Io({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=Fo(t+"/rejected",(function(t,e,o,r,n){return{payload:r,error:(i&&i.serializeError||Ko)(t||"Rejected"),meta:Uo(Io({},n||{}),{arg:o,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,l,c){var f,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}(),d=new a;function u(t){f=t,d.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,v;return wo(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),g=null==(a=null==i?void 0:i.condition)?void 0:a.call(i,t,{getState:l,extra:c}),null===(x=g)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,g];case 1:g=m.sent(),m.label=2;case 2:if(!1===g||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return d.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(r(h,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:h,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:h,signal:d.signal,abort:u,rejectWithValue:function(t,e){return new zo(t,e)},fulfillWithValue:function(t,e){return new Bo(t,e)}})).then((function(e){if(e instanceof zo)throw e;return e instanceof Bo?o(e.payload,h,t,e.meta):o(e,h,t)}))])];case 3:return y=m.sent(),[3,5];case 4:return v=m.sent(),y=v instanceof zo?n(null,h,t,v.payload,v.meta):n(v,h,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var x}))},new Promise((function(t,e){var i=function(t){try{r(y.next(t))}catch(t){e(t)}},o=function(t){try{r(y.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,o)};r((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:u,requestId:h,arg:t,unwrap:function(){return p.then(Zo)}})}}),{pending:r,rejected:n,fulfilled:o,typePrefix:t})}t.withTypes=function(){return t}}();var Ho="listenerMiddleware";Fo(Ho+"/add"),Fo(Ho+"/removeAll"),Fo(Ho+"/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[Hi];return Xi.get(e,t)},set:function(e){var i=this[Hi];Xi.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Hi];if(!r.P)switch(r.i){case 5:o(r)&&Ai(r);break;case 4:i(r)&&Ai(r)}}}function i(t){for(var e=t.t,i=t.k,o=Vi(i),r=o.length-1;r>=0;r--){var n=o[r];if(n!==Hi){var a=e[n];if(void 0===a&&!fi(e,n))return!0;var s=i[n],l=s&&s[Hi];if(l?l.t!==a:!di(s,a))return!0}}var c=!!e[Hi];return o.length!==Vi(e).length+(c?0:1)}function o(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 o=0;o<e.length;o++)if(!e.hasOwnProperty(o))return!0;return!1}var r={};!function(t,e){Yi[t]||(Yi[t]=e)}("ES5",{J:function(e,i){var o=Array.isArray(e),r=function(e,i){if(e){for(var o=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(o,""+r,t(r,!0));return o}var n=qi(i);delete n[Hi];for(var a=Vi(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(i),n)}(o,e),n={i:o?5:4,A:i?i.A:wi(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,Hi,{value:n,writable:!0}),r},S:function(t,i,r){r?ai(i)&&i[Hi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Hi];if(i){var r=i.t,n=i.k,a=i.R,s=i.i;if(4===s)li(n,(function(e){e!==Hi&&(void 0!==r[e]||fi(r,e)?a[e]||t(n[e]):(a[e]=!0,Ai(i)))})),li(r,(function(t){void 0!==n[t]||fi(n,t)||(a[t]=!1,Ai(i))}));else if(5===s){if(o(i)&&(Ai(i),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var f=Math.min(n.length,r.length),h=0;h<f;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):o(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Go{static get(t){var e;const i="string"==typeof t?t:t.name,o="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(Xe(r))return r;if(null==o)return;const n=Mo({...o,reducers:null!==(e=o.reducers)&&void 0!==e?e:{}}),a=Do({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[o.name]=new Go(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ye,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const o=e,r=t[o];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[o]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const Vo=Symbol("elementInternals");function qo(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Vo].form}constructor(...t){super(t),this[Vo]=this.attachInternals(),this[Vo].role=e}setFormValue(t){this[Vo].setFormValue(t)}}}var Yo,Xo,Jo;const Qo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Jo=null===(Xo=null===(Yo=window.safari)||void 0===Yo?void 0:Yo.pushNotification)||void 0===Xo?void 0:Xo.toString())&&void 0!==Jo?Jo:"");var tr;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(tr||(tr={}));var er=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ir extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const or=Symbol("registerInterval");class rr extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[or]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[or]):this.dispatchEvent(new ir)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=or,er([k()],i.prototype,"stateManager",void 0),i}(ri)){}const nr=ke.extend("--ft-ripple-color","",_e.colorContent),ar={color:nr,backgroundColor:ke.extend("--ft-ripple-background-color","",nr),opacityContentOnSurfacePressed:ke.external(_e.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ke.external(_e.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ke.external(_e.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ke.external(_e.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ke.create("--ft-ripple-border-radius","","SIZE","0px")},sr=ke.extend("--ft-ripple-color","",_e.colorPrimary),lr=sr,cr=ke.extend("--ft-ripple-background-color","",sr),fr=ke.extend("--ft-ripple-color","",_e.colorSecondary),hr=fr,dr=ke.extend("--ft-ripple-background-color","",fr),ur=kt`
|
|
131
|
+
`;class Ve{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;t=this.resolvePluralKey(t,e);let r=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";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()}}}const qe=t=>{const e=null!=t?t:{};return(t,i)=>{var o;const r={hasChanged:(t,e)=>!T(t,e),attribute:!1,...e};k(r)(t,i);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(i,{selector:null!==(o=e.selector)&&void 0!==o?o:t=>t[i],store:e.store})}};class Ye{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function Xe(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Je,Qe,ti;const ei=Symbol("internalReduxEventsUnsubscribers"),ii=Symbol("internalStoresUnsubscribers"),oi=Symbol("internalStores");class ri extends Ke{constructor(){super(...arguments),this[Je]=new Map,this[Qe]=new Map,this[ti]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[oi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[oi].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[oi].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Xe(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[oi].delete(e)}setupStore(t,e){this[oi].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[oi].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.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&&(t.store?this[ii].has(t.store):this[ii].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[ii].set(t,e.subscribe((()=>this.updateFromStores()))),Xe(e)&&e.eventBus&&(null===(i=this.reduxConstructor.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const o=t=>this[i](t);e.eventBus.addEventListener(t.eventName,o),this[ei].push((()=>e.eventBus.removeEventListener(t.eventName,o)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ii].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[ei].forEach((t=>t())),this[ei]=[]}unsubscribeFromStore(t){this[ii].has(t)&&this[ii].get(t)(),this[ii].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function ni(t){for(var e=arguments.length,i=Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];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 ai(t){return!!t&&!!t[Hi]}function si(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)===Gi}(t)||Array.isArray(t)||!!t[Zi]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Zi])||ui(t)||pi(t))}function li(t,e,i){void 0===i&&(i=!1),0===ci(t)?(i?Object.keys:Vi)(t).forEach((function(o){i&&"symbol"==typeof o||e(o,t[o],t)})):t.forEach((function(i,o){return e(o,i,t)}))}function ci(t){var e=t[Hi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ui(t)?2:pi(t)?3:0}function fi(t,e){return 2===ci(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function hi(t,e,i){var o=ci(t);2===o?t.set(e,i):3===o?t.add(i):t[e]=i}function di(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function ui(t){return ji&&t instanceof Map}function pi(t){return zi&&t instanceof Set}function yi(t){return t.o||t.t}function gi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qi(t);delete e[Hi];for(var i=Vi(e),o=0;o<i.length;o++){var r=i[o],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function bi(t,e){return void 0===e&&(e=!1),mi(t)||ai(t)||!si(t)||(ci(t)>1&&(t.set=t.add=t.clear=t.delete=vi),Object.freeze(t),e&&li(t,(function(t,e){return bi(e,!0)}),!0)),t}function vi(){ni(2)}function mi(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function xi(t){var e=Yi[t];return e||ni(18,t),e}function wi(){return Pi}function Oi(t,e){e&&(xi("Patches"),t.u=[],t.s=[],t.v=e)}function Si(t){$i(t),t.p.forEach(Ci),t.p=null}function $i(t){t===Pi&&(Pi=t.l)}function Ni(t){return Pi={p:[],l:Pi,h:t,m:!0,_:0}}function Ci(t){var e=t[Hi];0===e.i||1===e.i?e.j():e.g=!0}function Ei(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.h.O||xi("ES5").S(e,t,o),o?(i[Hi].P&&(Si(e),ni(4)),si(t)&&(t=ki(e,t),e.l||Ii(e,t)),e.u&&xi("Patches").M(i[Hi].t,t,e.u,e.s)):t=ki(e,i,[]),Si(e),e.u&&e.v(e.u,e.s),t!==Ki?t:void 0}function ki(t,e,i){if(mi(e))return e;var o=e[Hi];if(!o)return li(e,(function(r,n){return Ri(t,o,e,r,n,i)}),!0),e;if(o.A!==t)return e;if(!o.P)return Ii(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=gi(o.k):o.o,n=r,a=!1;3===o.i&&(n=new Set(r),r.clear(),a=!0),li(n,(function(e,n){return Ri(t,o,r,e,n,i,a)})),Ii(t,r,!1),i&&t.u&&xi("Patches").N(o,i,t.u,t.s)}return o.o}function Ri(t,e,i,o,r,n,a){if(ai(r)){var s=ki(t,r,n&&e&&3!==e.i&&!fi(e.R,o)?n.concat(o):void 0);if(hi(i,o,s),!ai(s))return;t.m=!1}else a&&i.add(r);if(si(r)&&!mi(r)){if(!t.h.D&&t._<1)return;ki(t,r),e&&e.A.l||Ii(t,r)}}function Ii(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&bi(e,i)}function Ui(t,e){var i=t[Hi];return(i?yi(i):t)[e]}function Li(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var o=Object.getOwnPropertyDescriptor(i,e);if(o)return o;i=Object.getPrototypeOf(i)}}function Ai(t){t.P||(t.P=!0,t.l&&Ai(t.l))}function _i(t){t.o||(t.o=gi(t.t))}function Ti(t,e,i){var o=ui(e)?xi("MapSet").F(e,i):pi(e)?xi("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),o={i:i?1:0,A:e?e.A:wi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=o,n=Xi;i&&(r=[o],n=Ji);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return o.k=l,o.j=s,l}(e,i):xi("ES5").J(e,i);return(i?i.A:wi()).p.push(o),o}function Wi(t){return ai(t)||ni(22,t),function t(e){if(!si(e))return e;var i,o=e[Hi],r=ci(e);if(o){if(!o.P&&(o.i<4||!xi("ES5").K(o)))return o.t;o.I=!0,i=Di(e,r),o.I=!1}else i=Di(e,r);return li(i,(function(e,r){o&&function(t,e){return 2===ci(t)?t.get(e):t[e]}(o.t,e)===r||hi(i,e,t(r))})),3===r?new Set(i):i}(t)}function Di(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gi(t)}Je=ii,Qe=oi,ti=ei,ri.reduxProperties=new Map,ri.reduxReactiveProperties=new Set,ri.reduxEventListeners=new Map;var Fi,Pi,Mi="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ji="undefined"!=typeof Map,zi="undefined"!=typeof Set,Bi="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ki=Mi?Symbol.for("immer-nothing"):((Fi={})["immer-nothing"]=!0,Fi),Zi=Mi?Symbol.for("immer-draftable"):"__$immer_draftable",Hi=Mi?Symbol.for("immer-state"):"__$immer_state",Gi=""+Object.prototype.constructor,Vi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qi=Object.getOwnPropertyDescriptors||function(t){var e={};return Vi(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Yi={},Xi={get:function(t,e){if(e===Hi)return t;var i=yi(t);if(!fi(i,e))return function(t,e,i){var o,r=Li(e,i);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(t.k):void 0}(t,i,e);var o=i[e];return t.I||!si(o)?o:o===Ui(t.t,e)?(_i(t),t.o[e]=Ti(t.A.h,o,t)):o},has:function(t,e){return e in yi(t)},ownKeys:function(t){return Reflect.ownKeys(yi(t))},set:function(t,e,i){var o=Li(yi(t),e);if(null==o?void 0:o.set)return o.set.call(t.k,i),!0;if(!t.P){var r=Ui(yi(t),e),n=null==r?void 0:r[Hi];if(n&&n.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(di(i,r)&&(void 0!==i||fi(t.t,e)))return!0;_i(t),Ai(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!==Ui(t.t,e)||e in t.t?(t.R[e]=!1,_i(t),Ai(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=yi(t),o=Reflect.getOwnPropertyDescriptor(i,e);return o?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:o.enumerable,value:i[e]}:o},defineProperty:function(){ni(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ni(12)}},Ji={};li(Xi,(function(t,e){Ji[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ji.deleteProperty=function(t,e){return Ji.set.call(this,t,e,void 0)},Ji.set=function(t,e,i){return Xi.set.call(this,t[0],e,i,t[0])};var Qi=function(){function t(t){var e=this;this.O=Bi,this.D=!0,this.produce=function(t,i,o){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var o;return(o=i).call.apply(o,[e,t].concat(a))}))}}var a;if("function"!=typeof i&&ni(6),void 0!==o&&"function"!=typeof o&&ni(7),si(t)){var s=Ni(e),l=Ti(e,t,void 0),c=!0;try{a=i(l),c=!1}finally{c?Si(s):$i(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Oi(s,o),Ei(t,s)}),(function(t){throw Si(s),t})):(Oi(s,o),Ei(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=i(t))&&(a=t),a===Ki&&(a=void 0),e.D&&bi(a,!0),o){var f=[],h=[];xi("Patches").M(t,a,f,h),o(f,h)}return a}ni(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var o,r,n=e.produce(t,i,(function(t,e){o=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,o,r]})):[n,o,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){si(t)||ni(8),ai(t)&&(t=Wi(t));var e=Ni(this),i=Ti(this,t,void 0);return i[Hi].C=!0,$i(e),i},e.finishDraft=function(t,e){var i=(t&&t[Hi]).A;return Oi(i,e),Ei(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Bi&&ni(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var o=e[i];if(0===o.path.length&&"replace"===o.op){t=o.value;break}}i>-1&&(e=e.slice(i+1));var r=xi("Patches").$;return ai(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),to=new Qi,eo=to.produce;function io(t){return io="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},io(t)}function oo(t){var e=function(t,e){if("object"!==io(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!==io(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===io(e)?e:String(e)}function ro(t,e,i){return(e=oo(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function no(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function ao(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?no(Object(i),!0).forEach((function(e){ro(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):no(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function so(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. "}to.produceWithPatches.bind(to),to.setAutoFreeze.bind(to),to.setUseProxies.bind(to),to.applyPatches.bind(to),to.createDraft.bind(to),to.finishDraft.bind(to);var lo="function"==typeof Symbol&&Symbol.observable||"@@observable",co=function(){return Math.random().toString(36).substring(7).split("").join(".")},fo={INIT:"@@redux/INIT"+co(),REPLACE:"@@redux/REPLACE"+co(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+co()}};function ho(t,e,i){var o;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(so(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(so(1));return i(ho)(t,e)}if("function"!=typeof t)throw new Error(so(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function f(){if(l)throw new Error(so(3));return n}function h(t){if("function"!=typeof t)throw new Error(so(4));if(l)throw new Error(so(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(so(6));e=!1,c();var i=s.indexOf(t);s.splice(i,1),a=null}}}function d(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(so(7));if(void 0===t.type)throw new Error(so(8));if(l)throw new Error(so(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,i=0;i<e.length;i++){(0,e[i])()}return t}return d({type:fo.INIT}),(o={dispatch:d,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(so(10));r=t,d({type:fo.REPLACE})}})[lo]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(so(11));function i(){t.next&&t.next(f())}return i(),{unsubscribe:e(i)}}})[lo]=function(){return this},t},o}function uo(t){for(var e=Object.keys(t),i={},o=0;o<e.length;o++){var r=e[o];"function"==typeof t[r]&&(i[r]=t[r])}var n,a=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:fo.INIT}))throw new Error(so(12));if(void 0===i(void 0,{type:fo.PROBE_UNKNOWN_ACTION()}))throw new Error(so(13))}))}(i)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var o=!1,r={},s=0;s<a.length;s++){var l=a[s],c=i[l],f=t[l],h=c(f,e);if(void 0===h)throw e&&e.type,new Error(so(14));r[l]=h,o=o||h!==f}return(o=o||a.length!==Object.keys(t).length)?r:t}}function po(){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 yo(){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),o=function(){throw new Error(so(15))},r={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return o=po.apply(void 0,n)(i.dispatch),ao(ao({},i),{},{dispatch:o})}}}function go(t){return function(e){var i=e.dispatch,o=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,o,t):e(r)}}}}var bo=go();bo.withExtraArgument=go;var vo,mo=bo,xo=(vo=function(t,e){return vo=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])},vo(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}vo(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),wo=function(t,e){var i,o,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],o=0}finally{i=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},Oo=function(t,e){for(var i=0,o=e.length,r=t.length;i<o;i++,r++)t[r]=e[i];return t},So=Object.defineProperty,$o=Object.defineProperties,No=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,ko=Object.prototype.propertyIsEnumerable,Ro=function(t,e,i){return e in t?So(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Io=function(t,e){for(var i in e||(e={}))Eo.call(e,i)&&Ro(t,i,e[i]);if(Co)for(var o=0,r=Co(e);o<r.length;o++){i=r[o];ko.call(e,i)&&Ro(t,i,e[i])}return t},Uo=function(t,e){return $o(t,No(e))},Lo="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?po:po.apply(null,arguments)};var Ao=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return xo(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,Oo([void 0],t[0].concat(this)))):new(e.bind.apply(e,Oo([void 0],t.concat(this))))},e}(Array),_o=function(t){function e(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return xo(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,Oo([void 0],t[0].concat(this)))):new(e.bind.apply(e,Oo([void 0],t.concat(this))))},e}(Array);function To(t){return si(t)?eo(t,(function(){})):t}function Wo(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var o=new Ao;i&&(!function(t){return"boolean"==typeof t}(i)?o.push(mo.withExtraArgument(i.extraArgument)):o.push(mo));return o}(t)}}function Do(t){var e,i=Wo(),o=t||{},r=o.reducer,n=void 0===r?void 0:r,a=o.middleware,s=void 0===a?i():a,l=o.devTools,c=void 0===l||l,f=o.preloadedState,h=void 0===f?void 0:f,d=o.enhancers,u=void 0===d?void 0:d;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=uo(n)}var p=s;"function"==typeof p&&(p=p(i));var y=yo.apply(void 0,p),g=po;c&&(g=Lo(Io({trace:!1},"object"==typeof c&&c)));var b=new _o(y),v=b;return Array.isArray(u)?v=Oo([y],u):"function"==typeof u&&(v=u(b)),ho(e,h,g.apply(void 0,v))}function Fo(t,e){function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Io(Io({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 Po(t){var e,i={},o=[],r={addCase:function(t,e){var o="string"==typeof t?t:t.type;if(o in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[o]=e,r},addMatcher:function(t,e){return o.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,o,e]}function Mo(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,o="function"==typeof t.initialState?t.initialState:To(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Po(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,f=Io(Io({},r),s);return function(t,e,i,o){void 0===i&&(i=[]);var r,n="function"==typeof e?Po(e):[e,i,o],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return To(t())};else{var c=To(t);r=function(){return c}}function f(t,e){void 0===t&&(t=r());var i=Oo([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var o;if(ai(t))return void 0===(o=i(t,e))?t:o;if(si(t))return eo(t,(function(t){return i(t,e)}));if(void 0===(o=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return t}),t)}return f.getInitialState=r,f}(o,(function(t){for(var e in f)t.addCase(e,f[e]);for(var i=0,o=a;i<o.length;i++){var r=o[i];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var i,o,n=r[t],c=e+"/"+t;"reducer"in n?(i=n.reducer,o=n.prepare):i=n,a[t]=i,s[c]=i,l[t]=o?Fo(c,o):Fo(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:a,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var jo=["name","message","stack","code"],zo=function(t,e){this.payload=t,this.meta=e},Bo=function(t,e){this.payload=t,this.meta=e},Ko=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,o=jo;i<o.length;i++){var r=o[i];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function Zo(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 o=Fo(t+"/fulfilled",(function(t,e,i,o){return{payload:t,meta:Uo(Io({},o||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),r=Fo(t+"/pending",(function(t,e,i){return{payload:void 0,meta:Uo(Io({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=Fo(t+"/rejected",(function(t,e,o,r,n){return{payload:r,error:(i&&i.serializeError||Ko)(t||"Rejected"),meta:Uo(Io({},n||{}),{arg:o,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,l,c){var f,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}(),d=new a;function u(t){f=t,d.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,v;return wo(this,(function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),g=null==(a=null==i?void 0:i.condition)?void 0:a.call(i,t,{getState:l,extra:c}),null===(x=g)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,g];case 1:g=m.sent(),m.label=2;case 2:if(!1===g||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return d.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(r(h,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:h,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:h,signal:d.signal,abort:u,rejectWithValue:function(t,e){return new zo(t,e)},fulfillWithValue:function(t,e){return new Bo(t,e)}})).then((function(e){if(e instanceof zo)throw e;return e instanceof Bo?o(e.payload,h,t,e.meta):o(e,h,t)}))])];case 3:return y=m.sent(),[3,5];case 4:return v=m.sent(),y=v instanceof zo?n(null,h,t,v.payload,v.meta):n(v,h,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var x}))},new Promise((function(t,e){var i=function(t){try{r(y.next(t))}catch(t){e(t)}},o=function(t){try{r(y.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,o)};r((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:u,requestId:h,arg:t,unwrap:function(){return p.then(Zo)}})}}),{pending:r,rejected:n,fulfilled:o,typePrefix:t})}t.withTypes=function(){return t}}();var Ho="listenerMiddleware";Fo(Ho+"/add"),Fo(Ho+"/removeAll"),Fo(Ho+"/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[Hi];return Xi.get(e,t)},set:function(e){var i=this[Hi];Xi.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][Hi];if(!r.P)switch(r.i){case 5:o(r)&&Ai(r);break;case 4:i(r)&&Ai(r)}}}function i(t){for(var e=t.t,i=t.k,o=Vi(i),r=o.length-1;r>=0;r--){var n=o[r];if(n!==Hi){var a=e[n];if(void 0===a&&!fi(e,n))return!0;var s=i[n],l=s&&s[Hi];if(l?l.t!==a:!di(s,a))return!0}}var c=!!e[Hi];return o.length!==Vi(e).length+(c?0:1)}function o(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 o=0;o<e.length;o++)if(!e.hasOwnProperty(o))return!0;return!1}var r={};!function(t,e){Yi[t]||(Yi[t]=e)}("ES5",{J:function(e,i){var o=Array.isArray(e),r=function(e,i){if(e){for(var o=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(o,""+r,t(r,!0));return o}var n=qi(i);delete n[Hi];for(var a=Vi(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(i),n)}(o,e),n={i:o?5:4,A:i?i.A:wi(),P:!1,I:!1,R:{},l:i,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,Hi,{value:n,writable:!0}),r},S:function(t,i,r){r?ai(i)&&i[Hi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Hi];if(i){var r=i.t,n=i.k,a=i.R,s=i.i;if(4===s)li(n,(function(e){e!==Hi&&(void 0!==r[e]||fi(r,e)?a[e]||t(n[e]):(a[e]=!0,Ai(i)))})),li(r,(function(t){void 0!==n[t]||fi(n,t)||(a[t]=!1,Ai(i))}));else if(5===s){if(o(i)&&(Ai(i),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var f=Math.min(n.length,r.length),h=0;h<f;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):o(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Go{static get(t){var e;const i="string"==typeof t?t:t.name,o="string"==typeof t?void 0:t,r=window.ftReduxStores[i];if(Xe(r))return r;if(null==o)return;const n=Mo({...o,reducers:null!==(e=o.reducers)&&void 0!==e?e:{}}),a=Do({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[o.name]=new Go(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ye,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const o=e,r=t[o];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[o]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const Vo=Symbol("elementInternals");function qo(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Vo].form}constructor(...t){super(t),this[Vo]=this.attachInternals(),this[Vo].role=e}setFormValue(t){this[Vo].setFormValue(t)}}}var Yo,Xo,Jo;const Qo=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Jo=null===(Xo=null===(Yo=window.safari)||void 0===Yo?void 0:Yo.pushNotification)||void 0===Xo?void 0:Xo.toString())&&void 0!==Jo?Jo:"");var tr;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(tr||(tr={}));var er=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ir extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const or=Symbol("registerInterval");class rr extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[or]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[or]):this.dispatchEvent(new ir)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=or,er([R()],i.prototype,"stateManager",void 0),i}(ri)){}const nr=ke.extend("--ft-ripple-color","",_e.colorContent),ar={color:nr,backgroundColor:ke.extend("--ft-ripple-background-color","",nr),opacityContentOnSurfacePressed:ke.external(_e.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ke.external(_e.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ke.external(_e.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ke.external(_e.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ke.create("--ft-ripple-border-radius","","SIZE","0px")},sr=ke.extend("--ft-ripple-color","",_e.colorPrimary),lr=sr,cr=ke.extend("--ft-ripple-background-color","",sr),fr=ke.extend("--ft-ripple-color","",_e.colorSecondary),hr=fr,dr=ke.extend("--ft-ripple-background-color","",fr),ur=kt`
|
|
132
132
|
:host {
|
|
133
133
|
display: contents;
|
|
134
134
|
}
|
|
@@ -606,27 +606,6 @@ let Ne=class extends Kt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
606
606
|
gap: 16px;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
.ft-reader-feedback--placeholder {
|
|
610
|
-
display: flex;
|
|
611
|
-
flex-direction: row;
|
|
612
|
-
gap: 8px;
|
|
613
|
-
padding: 8px;
|
|
614
|
-
border: 1px dashed #e1e1e1;
|
|
615
|
-
color: #444444;
|
|
616
|
-
background: #f1f1f1;
|
|
617
|
-
border-radius: 4px;
|
|
618
|
-
align-items: center;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.ft-reader-feedback--placeholder ft-typography {
|
|
622
|
-
flex-grow: 1;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
.ft-reader-feedback--placeholder ft-tooltip {
|
|
626
|
-
flex-grow: 0;
|
|
627
|
-
flex-shrink: 0;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
609
|
.ft-reader-feedback--stars {
|
|
631
610
|
display: flex;
|
|
632
611
|
flex-direction: row;
|
|
@@ -671,35 +650,41 @@ let Ne=class extends Kt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
671
650
|
${Re(gn.color,Nn.sendFeedbackColor)};
|
|
672
651
|
${Re(gn.backgroundColor,Nn.sendFeedbackBackgroundColor)};
|
|
673
652
|
}
|
|
674
|
-
`;var En,kn,Rn,In,Un,Ln,An,_n,Tn,Wn,Dn,Fn,Pn,Mn;!function(t){!function(e){var i={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}}))}function h(t){var e=new FileReader,i=f(e);return e.readAsArrayBuffer(t),i}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,i=f(e);return e.readAsText(t),i}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),i=new Array(e.length),o=0;o<e.length;o++)i[o]=String.fromCharCode(e[o]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var i=this.map[t];this.map[t]=i?i+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var i in this.map)this.map.hasOwnProperty(i)&&t.call(e,this.map[i],i,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,i){t.push(i)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,i){t.push([i,e])})),s(t)},i.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,e){var i,o,r=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(i=e.method||this.method||"GET",o=i.toUpperCase(),p.indexOf(o)>-1?o:i),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var i=t.split("="),o=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(r))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},u.call(y.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];b.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var i=Error(t);this.stack=i.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function m(t,o){return new Promise((function(r,n){var a=new y(t,o);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,i={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var i=t.split(":"),o=i.shift().trim();if(o){var r=i.join(":").trim();e.append(o,r)}})),e)};i.url="responseURL"in s?s.responseURL:i.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new b(o,i))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}m.polyfill=!0,t.fetch||(t.fetch=m,t.Headers=l,t.Request=y,t.Response=b),e.Headers=l,e.Request=y,e.Response=b,e.fetch=m,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(En||(En={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(kn||(kn={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(Rn||(Rn={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(In||(In={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(Un||(Un={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Ln||(Ln={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(An||(An={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(_n||(_n={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Tn||(Tn={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Wn||(Wn={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Dn||(Dn={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Fn||(Fn={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Pn||(Pn={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(Mn||(Mn={}));const jn={[Mn.PERSONAL_BOOK_SHARE_USER]:[Mn.PERSONAL_BOOK_USER],[Mn.HTML_EXPORT_USER]:[Mn.PERSONAL_BOOK_USER],[Mn.PDF_EXPORT_USER]:[Mn.PERSONAL_BOOK_USER],[Mn.KHUB_ADMIN]:[Mn.CONTENT_PUBLISHER],[Mn.ADMIN]:[Mn.KHUB_ADMIN,Mn.USERS_ADMIN,Mn.PORTAL_ADMIN],[Mn.DEVELOPER]:[Mn.BETA_USER,Mn.DEBUG_USER]};function zn(t,e){return t===e||(jn[t]??[]).some((t=>zn(t,e)))}function Bn(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>zn(t,e)))}
|
|
653
|
+
`
|
|
675
654
|
/**
|
|
676
655
|
* @license
|
|
677
656
|
* Copyright 2020 Google LLC
|
|
678
657
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
679
|
-
|
|
680
|
-
<${
|
|
658
|
+
*/,En=Symbol.for(""),kn=t=>{if(t?.r===En)return t?._$litStatic$},Rn=t=>({_$litStatic$:t,r:En}),In=new Map,Un=(t=>(e,...i)=>{const o=i.length;let r,n;const a=[],s=[];let l,c=0,f=!1;for(;c<o;){for(l=e[c];c<o&&void 0!==(n=i[c],r=kn(n));)l+=r+e[++c],f=!0;c!==o&&s.push(n),a.push(l),c++}if(c===o&&a.push(e[o]),f){const t=a.join("$$lit$$");void 0===(e=In.get(t))&&(a.raw=a,In.set(t,e=a)),i=s}return t(e,...i)})(rt);var Ln;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Ln||(Ln={}));var An=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class _n extends Ke{constructor(){super(...arguments),this.variant=Ln.body1}render(){return this.element?Un`
|
|
659
|
+
<${Rn(this.element)}
|
|
681
660
|
class="ft-typography ft-typography--${this.variant}">
|
|
682
661
|
<slot></slot>
|
|
683
|
-
</${
|
|
684
|
-
`:
|
|
662
|
+
</${Rn(this.element)}>
|
|
663
|
+
`:Un`
|
|
685
664
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
686
|
-
`}}
|
|
665
|
+
`}}_n.styles=[Jr,Qr,tn,en,on,rn,nn,an,sn,ln,cn,...fn],An([k()],_n.prototype,"element",void 0),An([k()],_n.prototype,"variant",void 0),W("ft-typography")(_n);
|
|
687
666
|
/**
|
|
688
667
|
* @license
|
|
689
668
|
* Copyright 2017 Google LLC
|
|
690
669
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
691
670
|
*/
|
|
692
|
-
const
|
|
671
|
+
const Tn=1,Wn=2,Dn=t=>(...e)=>({_$litDirective$:t,values:e});class Fn{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
693
672
|
/**
|
|
694
673
|
* @license
|
|
695
|
-
* Copyright
|
|
674
|
+
* Copyright 2018 Google LLC
|
|
696
675
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
|
-
*/
|
|
698
|
-
<
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
676
|
+
*/const Pn=Dn(class extends Fn{constructor(t){if(super(t),t.type!==Tn||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.it)t in e||(i.remove(t),this.it.delete(t));for(const t in e){const o=!!e[t];o===this.it.has(t)||this.st?.has(t)||(o?(i.add(t),this.it.add(t)):(i.remove(t),this.it.delete(t)))}return nt}});var Mn=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class jn extends Ke{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new r(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new r(10),this.moveRipple=t=>{var e,i;let{x:o,y:r}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return fe`
|
|
677
|
+
<style>
|
|
678
|
+
.ft-ripple .ft-ripple--effect {
|
|
679
|
+
left: ${this.originX}px;
|
|
680
|
+
top: ${this.originY}px;
|
|
681
|
+
}
|
|
682
|
+
</style>
|
|
683
|
+
<div class="${Pn(t)}">
|
|
684
|
+
<div class="ft-ripple--background"></div>
|
|
685
|
+
<div class="ft-ripple--effect"></div>
|
|
686
|
+
</div>
|
|
687
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",i,n),t.addEventListener("touchstart",o,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",i,n),t.removeEventListener("touchstart",o,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}jn.elementDefinitions={},jn.styles=ur,Mn([k({type:Boolean})],jn.prototype,"primary",void 0),Mn([k({type:Boolean})],jn.prototype,"secondary",void 0),Mn([k({type:Boolean})],jn.prototype,"unbounded",void 0),Mn([k({type:Boolean})],jn.prototype,"activated",void 0),Mn([k({type:Boolean})],jn.prototype,"selected",void 0),Mn([k({type:Boolean})],jn.prototype,"disabled",void 0),Mn([R()],jn.prototype,"hovered",void 0),Mn([R()],jn.prototype,"focused",void 0),Mn([R()],jn.prototype,"pressed",void 0),Mn([R()],jn.prototype,"rippling",void 0),Mn([R()],jn.prototype,"originX",void 0),Mn([R()],jn.prototype,"originY",void 0),Mn([L(".ft-ripple")],jn.prototype,"ripple",void 0),Mn([L(".ft-ripple--effect")],jn.prototype,"rippleEffect",void 0),W("ft-ripple")(jn);const zn=ke.create("--ft-tooltip-distance","","SIZE","4px"),Bn=ke.create("--ft-tooltip-color","","COLOR","#FFFFFF"),Kn=ke.create("--ft-tooltip-background-color","","COLOR","#666666"),Zn=ke.create("--ft-tooltip-z-index","","NUMBER","100"),Hn=ke.external(_e.borderRadiusS,"Design system"),Gn=ke.create("--ft-tooltip-max-width","","SIZE","150px"),Vn=kt`
|
|
703
688
|
.ft-tooltip--container {
|
|
704
689
|
display: block;
|
|
705
690
|
}
|
|
@@ -714,21 +699,21 @@ const Jn=1,Qn=2,ta=t=>(...e)=>({_$litDirective$:t,values:e});class ea{constructo
|
|
|
714
699
|
box-sizing: border-box;
|
|
715
700
|
overflow: hidden;
|
|
716
701
|
width: max-content;
|
|
717
|
-
max-width: ${
|
|
702
|
+
max-width: ${Gn};
|
|
718
703
|
text-align: center;
|
|
719
|
-
padding: ${
|
|
720
|
-
z-index: ${
|
|
704
|
+
padding: ${zn};
|
|
705
|
+
z-index: ${Zn};
|
|
721
706
|
}
|
|
722
707
|
|
|
723
708
|
.ft-tooltip--content {
|
|
724
709
|
padding: 4px 8px;
|
|
725
|
-
border-radius: ${
|
|
726
|
-
background-color: ${
|
|
727
|
-
color: ${
|
|
710
|
+
border-radius: ${Hn};
|
|
711
|
+
background-color: ${Kn};
|
|
712
|
+
color: ${Bn};
|
|
728
713
|
position: relative;
|
|
729
714
|
word-break: break-word;
|
|
730
715
|
}
|
|
731
|
-
`,ga=["start","end"],ba=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+ga[0],e+"-"+ga[1])),[]),va=Math.min,ma=Math.max,xa=Math.round,wa=t=>({x:t,y:t}),Oa={left:"right",right:"left",bottom:"top",top:"bottom"},Sa={start:"end",end:"start"};function $a(t,e,i){return ma(t,va(e,i))}function Na(t,e){return"function"==typeof t?t(e):t}function Ca(t){return t.split("-")[0]}function Ea(t){return t.split("-")[1]}function ka(t){return"x"===t?"y":"x"}function Ra(t){return"y"===t?"height":"width"}function Ia(t){return["top","bottom"].includes(Ca(t))?"y":"x"}function Ua(t){return ka(Ia(t))}function La(t){return t.replace(/left|right|bottom|top/g,(t=>Oa[t]))}function Aa(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function _a(t,e,i){let{reference:o,floating:r}=t;const n=Ia(e),a=Ua(e),s=Ra(a),l=Ca(e),c="y"===n,f=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,d=o[s]/2-r[s]/2;let u;switch(l){case"top":u={x:f,y:o.y-r.height};break;case"bottom":u={x:f,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:h};break;case"left":u={x:o.x-r.width,y:h};break;default:u={x:o.x,y:o.y}}switch(Ea(e)){case"start":u[a]-=d*(i&&c?-1:1);break;case"end":u[a]+=d*(i&&c?-1:1)}return u}async function Ta(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:u=0}=Na(e,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),y=s[d?"floating"===h?"reference":"floating":h],g=Aa(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(y)))||i?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),b="floating"===h?{...a.floating,x:o,y:r}:a.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),m=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},x=Aa(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+p.top)/m.y,bottom:(x.bottom-g.bottom+p.bottom)/m.y,left:(g.left-x.left+p.left)/m.x,right:(x.right-g.right+p.right)/m.x}}function Wa(t,e,i){return(t?[...i.filter((e=>Ea(e)===t)),...i.filter((e=>Ea(e)!==t))]:i.filter((t=>Ca(t)===t))).filter((i=>!t||(Ea(i)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>Sa[t]))}(i)!==i)))}const Da=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,o,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:f=!1,alignment:h,allowedPlacements:d=ba,autoAlignment:u=!0,...p}=Na(t,e),y=void 0!==h||d===ba?Wa(h||null,u,d):d,g=await Ta(e,p),b=(null==(i=a.autoPlacement)?void 0:i.index)||0,v=y[b];if(null==v)return{};const m=function(t,e,i){void 0===i&&(i=!1);const o=Ea(t),r=Ua(t),n=Ra(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=La(a)),[a,La(a)]}(v,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==v)return{reset:{placement:y[0]}};const x=[g[Ca(v)],g[m[0]],g[m[1]]],w=[...(null==(o=a.autoPlacement)?void 0:o.overflows)||[],{placement:v,overflows:x}],O=y[b+1];if(O)return{data:{index:b+1,overflows:w},reset:{placement:O}};const S=w.map((t=>{const e=Ea(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),$=S.filter((t=>t[2].slice(0,Ea(t[0])?2:3).every((t=>t<=0)))),N=(null==(r=$[0])?void 0:r[0])||S[0][0];return N!==s?{data:{index:b+1,overflows:w},reset:{placement:N}}:{}}}};function Fa(t){return ja(t)?(t.nodeName||"").toLowerCase():"#document"}function Pa(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Ma(t){var e;return null==(e=(ja(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function ja(t){return t instanceof Node||t instanceof Pa(t).Node}function za(t){return t instanceof Element||t instanceof Pa(t).Element}function Ba(t){return t instanceof HTMLElement||t instanceof Pa(t).HTMLElement}function Ka(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof Pa(t).ShadowRoot)}function Za(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Ya(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Ha(t){return["table","td","th"].includes(Fa(t))}function Ga(t){const e=Va(),i=Ya(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Va(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function qa(t){return["html","body","#document"].includes(Fa(t))}function Ya(t){return Pa(t).getComputedStyle(t)}function Xa(t){return za(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ja(t){if("html"===Fa(t))return t;const e=t.assignedSlot||t.parentNode||Ka(t)&&t.host||Ma(t);return Ka(e)?e.host:e}function Qa(t){const e=Ja(t);return qa(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ba(e)&&Za(e)?e:Qa(e)}function ts(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=Qa(t),n=r===(null==(o=t.ownerDocument)?void 0:o.body),a=Pa(r);return n?e.concat(a,a.visualViewport||[],Za(r)?r:[],a.frameElement&&i?ts(a.frameElement):[]):e.concat(r,ts(r,[],i))}function es(t){const e=Ya(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Ba(t),n=r?t.offsetWidth:i,a=r?t.offsetHeight:o,s=xa(i)!==n||xa(o)!==a;return s&&(i=n,o=a),{width:i,height:o,$:s}}function is(t){return za(t)?t:t.contextElement}function os(t){const e=is(t);if(!Ba(e))return wa(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:n}=es(e);let a=(n?xa(i.width):i.width)/o,s=(n?xa(i.height):i.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const rs=wa(0);function ns(t){const e=Pa(t);return Va()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:rs}function as(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),n=is(t);let a=wa(1);e&&(o?za(o)&&(a=os(o)):a=os(t));const s=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Pa(t))&&e}(n,i,o)?ns(n):wa(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,f=r.width/a.x,h=r.height/a.y;if(n){const t=Pa(n),e=o&&za(o)?Pa(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=os(i),e=i.getBoundingClientRect(),o=Ya(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,n=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,h*=t.y,l+=r,c+=n,i=Pa(i).frameElement}}return Aa({width:f,height:h,x:l,y:c})}function ss(t){return as(Ma(t)).left+Xa(t).scrollLeft}function ls(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Pa(t),o=Ma(t),r=i.visualViewport;let n=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=Va();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,i);else if("document"===e)o=function(t){const e=Ma(t),i=Xa(t),o=t.ownerDocument.body,r=ma(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=ma(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+ss(t);const s=-i.scrollTop;return"rtl"===Ya(o).direction&&(a+=ma(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:a,y:s}}(Ma(t));else if(za(e))o=function(t,e){const i=as(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,n=Ba(t)?os(t):wa(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:o*n.y}}(e,i);else{const i=ns(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Aa(o)}function cs(t,e){const i=Ja(t);return!(i===e||!za(i)||qa(i))&&("fixed"===Ya(i).position||cs(i,e))}function fs(t,e,i){const o=Ba(e),r=Ma(e),n="fixed"===i,a=as(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=wa(0);if(o||!o&&!n)if(("body"!==Fa(e)||Za(r))&&(s=Xa(e)),o){const t=as(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=ss(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function hs(t,e){return Ba(t)&&"fixed"!==Ya(t).position?e?e(t):t.offsetParent:null}function ds(t,e){const i=Pa(t);if(!Ba(t))return i;let o=hs(t,e);for(;o&&Ha(o)&&"static"===Ya(o).position;)o=hs(o,e);return o&&("html"===Fa(o)||"body"===Fa(o)&&"static"===Ya(o).position&&!Ga(o))?i:o||function(t){let e=Ja(t);for(;Ba(e)&&!qa(e);){if(Ga(e))return e;e=Ja(e)}return null}(t)||i}const us={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Ba(i),n=Ma(i);if(i===n)return e;let a={scrollLeft:0,scrollTop:0},s=wa(1);const l=wa(0);if((r||!r&&"fixed"!==o)&&(("body"!==Fa(i)||Za(n))&&(a=Xa(i)),Ba(i))){const t=as(i);s=os(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:Ma,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const n="clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let o=ts(t,[],!1).filter((t=>za(t)&&"body"!==Fa(t))),r=null;const n="fixed"===Ya(t).position;let a=n?Ja(t):t;for(;za(a)&&!qa(a);){const e=Ya(a),i=Ga(a);i||"fixed"!==e.position||(r=null),(n?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Za(a)&&!i&&cs(t,a))?o=o.filter((t=>t!==a)):r=e,a=Ja(a)}return e.set(t,o),o}(e,this._c):[].concat(i),a=[...n,o],s=a[0],l=a.reduce(((t,i)=>{const o=ls(e,i,r);return t.top=ma(o.top,t.top),t.right=va(o.right,t.right),t.bottom=va(o.bottom,t.bottom),t.left=ma(o.left,t.left),t}),ls(e,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ds,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||ds,n=this.getDimensions;return{reference:fs(e,await r(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return es(t)},getScale:os,isElement:za,isRTL:function(t){return"rtl"===Ya(t).direction}},ps=(t,e,i)=>{const o=new Map,r={platform:us,...i},n={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:a}=i,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:h}=_a(c,o,l),d=o,u={},p=0;for(let i=0;i<s.length;i++){const{name:n,fn:y}=s[i],{x:g,y:b,data:v,reset:m}=await y({x:f,y:h,initialPlacement:o,placement:d,strategy:r,middlewareData:u,rects:c,platform:a,elements:{reference:t,floating:e}});f=null!=g?g:f,h=null!=b?b:h,u={...u,[n]:{...u[n],...v}},m&&p<=50&&(p++,"object"==typeof m&&(m.placement&&(d=m.placement),m.rects&&(c=!0===m.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):m.rects),({x:f,y:h}=_a(c,d,l))),i=-1)}return{x:f,y:h,placement:d,strategy:r,middlewareData:u}})(t,e,{...r,platform:n})};function ys(t){return function(t){for(let e=t;e;e=gs(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=gs(t);e;e=gs(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function gs(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var bs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class vs extends Ke{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new A,this.revealDebouncer=new A}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return fe`
|
|
716
|
+
`,qn=["start","end"],Yn=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+qn[0],e+"-"+qn[1])),[]),Xn=Math.min,Jn=Math.max,Qn=Math.round,ta=t=>({x:t,y:t}),ea={left:"right",right:"left",bottom:"top",top:"bottom"},ia={start:"end",end:"start"};function oa(t,e,i){return Jn(t,Xn(e,i))}function ra(t,e){return"function"==typeof t?t(e):t}function na(t){return t.split("-")[0]}function aa(t){return t.split("-")[1]}function sa(t){return"x"===t?"y":"x"}function la(t){return"y"===t?"height":"width"}function ca(t){return["top","bottom"].includes(na(t))?"y":"x"}function fa(t){return sa(ca(t))}function ha(t){return t.replace(/left|right|bottom|top/g,(t=>ea[t]))}function da(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function ua(t,e,i){let{reference:o,floating:r}=t;const n=ca(e),a=fa(e),s=la(a),l=na(e),c="y"===n,f=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,d=o[s]/2-r[s]/2;let u;switch(l){case"top":u={x:f,y:o.y-r.height};break;case"bottom":u={x:f,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:h};break;case"left":u={x:o.x-r.width,y:h};break;default:u={x:o.x,y:o.y}}switch(aa(e)){case"start":u[a]-=d*(i&&c?-1:1);break;case"end":u[a]+=d*(i&&c?-1:1)}return u}async function pa(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:n,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:u=0}=ra(e,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),y=s[d?"floating"===h?"reference":"floating":h],g=da(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(y)))||i?y:y.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),b="floating"===h?{...a.floating,x:o,y:r}:a.reference,v=await(null==n.getOffsetParent?void 0:n.getOffsetParent(s.floating)),m=await(null==n.isElement?void 0:n.isElement(v))&&await(null==n.getScale?void 0:n.getScale(v))||{x:1,y:1},x=da(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:v,strategy:l}):b);return{top:(g.top-x.top+p.top)/m.y,bottom:(x.bottom-g.bottom+p.bottom)/m.y,left:(g.left-x.left+p.left)/m.x,right:(x.right-g.right+p.right)/m.x}}function ya(t,e,i){return(t?[...i.filter((e=>aa(e)===t)),...i.filter((e=>aa(e)!==t))]:i.filter((t=>na(t)===t))).filter((i=>!t||(aa(i)===t||!!e&&function(t){return t.replace(/start|end/g,(t=>ia[t]))}(i)!==i)))}const ga=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,o,r;const{rects:n,middlewareData:a,placement:s,platform:l,elements:c}=e,{crossAxis:f=!1,alignment:h,allowedPlacements:d=Yn,autoAlignment:u=!0,...p}=ra(t,e),y=void 0!==h||d===Yn?ya(h||null,u,d):d,g=await pa(e,p),b=(null==(i=a.autoPlacement)?void 0:i.index)||0,v=y[b];if(null==v)return{};const m=function(t,e,i){void 0===i&&(i=!1);const o=aa(t),r=fa(t),n=la(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=ha(a)),[a,ha(a)]}(v,n,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(s!==v)return{reset:{placement:y[0]}};const x=[g[na(v)],g[m[0]],g[m[1]]],w=[...(null==(o=a.autoPlacement)?void 0:o.overflows)||[],{placement:v,overflows:x}],O=y[b+1];if(O)return{data:{index:b+1,overflows:w},reset:{placement:O}};const S=w.map((t=>{const e=aa(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),$=S.filter((t=>t[2].slice(0,aa(t[0])?2:3).every((t=>t<=0)))),N=(null==(r=$[0])?void 0:r[0])||S[0][0];return N!==s?{data:{index:b+1,overflows:w},reset:{placement:N}}:{}}}};function ba(t){return xa(t)?(t.nodeName||"").toLowerCase():"#document"}function va(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ma(t){var e;return null==(e=(xa(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function xa(t){return t instanceof Node||t instanceof va(t).Node}function wa(t){return t instanceof Element||t instanceof va(t).Element}function Oa(t){return t instanceof HTMLElement||t instanceof va(t).HTMLElement}function Sa(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof va(t).ShadowRoot)}function $a(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Ra(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Na(t){return["table","td","th"].includes(ba(t))}function Ca(t){const e=Ea(),i=Ra(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Ea(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ka(t){return["html","body","#document"].includes(ba(t))}function Ra(t){return va(t).getComputedStyle(t)}function Ia(t){return wa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ua(t){if("html"===ba(t))return t;const e=t.assignedSlot||t.parentNode||Sa(t)&&t.host||ma(t);return Sa(e)?e.host:e}function La(t){const e=Ua(t);return ka(e)?t.ownerDocument?t.ownerDocument.body:t.body:Oa(e)&&$a(e)?e:La(e)}function Aa(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=La(t),n=r===(null==(o=t.ownerDocument)?void 0:o.body),a=va(r);return n?e.concat(a,a.visualViewport||[],$a(r)?r:[],a.frameElement&&i?Aa(a.frameElement):[]):e.concat(r,Aa(r,[],i))}function _a(t){const e=Ra(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Oa(t),n=r?t.offsetWidth:i,a=r?t.offsetHeight:o,s=Qn(i)!==n||Qn(o)!==a;return s&&(i=n,o=a),{width:i,height:o,$:s}}function Ta(t){return wa(t)?t:t.contextElement}function Wa(t){const e=Ta(t);if(!Oa(e))return ta(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:n}=_a(e);let a=(n?Qn(i.width):i.width)/o,s=(n?Qn(i.height):i.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Da=ta(0);function Fa(t){const e=va(t);return Ea()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Da}function Pa(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),n=Ta(t);let a=ta(1);e&&(o?wa(o)&&(a=Wa(o)):a=Wa(t));const s=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==va(t))&&e}(n,i,o)?Fa(n):ta(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,f=r.width/a.x,h=r.height/a.y;if(n){const t=va(n),e=o&&wa(o)?va(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=Wa(i),e=i.getBoundingClientRect(),o=Ra(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,n=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,f*=t.x,h*=t.y,l+=r,c+=n,i=va(i).frameElement}}return da({width:f,height:h,x:l,y:c})}function Ma(t){return Pa(ma(t)).left+Ia(t).scrollLeft}function ja(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=va(t),o=ma(t),r=i.visualViewport;let n=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){n=r.width,a=r.height;const t=Ea();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:n,height:a,x:s,y:l}}(t,i);else if("document"===e)o=function(t){const e=ma(t),i=Ia(t),o=t.ownerDocument.body,r=Jn(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=Jn(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+Ma(t);const s=-i.scrollTop;return"rtl"===Ra(o).direction&&(a+=Jn(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:a,y:s}}(ma(t));else if(wa(e))o=function(t,e){const i=Pa(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,n=Oa(t)?Wa(t):ta(1);return{width:t.clientWidth*n.x,height:t.clientHeight*n.y,x:r*n.x,y:o*n.y}}(e,i);else{const i=Fa(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return da(o)}function za(t,e){const i=Ua(t);return!(i===e||!wa(i)||ka(i))&&("fixed"===Ra(i).position||za(i,e))}function Ba(t,e,i){const o=Oa(e),r=ma(e),n="fixed"===i,a=Pa(t,!0,n,e);let s={scrollLeft:0,scrollTop:0};const l=ta(0);if(o||!o&&!n)if(("body"!==ba(e)||$a(r))&&(s=Ia(e)),o){const t=Pa(e,!0,n,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=Ma(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ka(t,e){return Oa(t)&&"fixed"!==Ra(t).position?e?e(t):t.offsetParent:null}function Za(t,e){const i=va(t);if(!Oa(t))return i;let o=Ka(t,e);for(;o&&Na(o)&&"static"===Ra(o).position;)o=Ka(o,e);return o&&("html"===ba(o)||"body"===ba(o)&&"static"===Ra(o).position&&!Ca(o))?i:o||function(t){let e=Ua(t);for(;Oa(e)&&!ka(e);){if(Ca(e))return e;e=Ua(e)}return null}(t)||i}const Ha={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Oa(i),n=ma(i);if(i===n)return e;let a={scrollLeft:0,scrollTop:0},s=ta(1);const l=ta(0);if((r||!r&&"fixed"!==o)&&(("body"!==ba(i)||$a(n))&&(a=Ia(i)),Oa(i))){const t=Pa(i);s=Wa(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:ma,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const n="clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let o=Aa(t,[],!1).filter((t=>wa(t)&&"body"!==ba(t))),r=null;const n="fixed"===Ra(t).position;let a=n?Ua(t):t;for(;wa(a)&&!ka(a);){const e=Ra(a),i=Ca(a);i||"fixed"!==e.position||(r=null),(n?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||$a(a)&&!i&&za(t,a))?o=o.filter((t=>t!==a)):r=e,a=Ua(a)}return e.set(t,o),o}(e,this._c):[].concat(i),a=[...n,o],s=a[0],l=a.reduce(((t,i)=>{const o=ja(e,i,r);return t.top=Jn(o.top,t.top),t.right=Xn(o.right,t.right),t.bottom=Xn(o.bottom,t.bottom),t.left=Jn(o.left,t.left),t}),ja(e,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Za,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||Za,n=this.getDimensions;return{reference:Ba(e,await r(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return _a(t)},getScale:Wa,isElement:wa,isRTL:function(t){return"rtl"===Ra(t).direction}},Ga=(t,e,i)=>{const o=new Map,r={platform:Ha,...i},n={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:n=[],platform:a}=i,s=n.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:h}=ua(c,o,l),d=o,u={},p=0;for(let i=0;i<s.length;i++){const{name:n,fn:y}=s[i],{x:g,y:b,data:v,reset:m}=await y({x:f,y:h,initialPlacement:o,placement:d,strategy:r,middlewareData:u,rects:c,platform:a,elements:{reference:t,floating:e}});f=null!=g?g:f,h=null!=b?b:h,u={...u,[n]:{...u[n],...v}},m&&p<=50&&(p++,"object"==typeof m&&(m.placement&&(d=m.placement),m.rects&&(c=!0===m.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):m.rects),({x:f,y:h}=ua(c,d,l))),i=-1)}return{x:f,y:h,placement:d,strategy:r,middlewareData:u}})(t,e,{...r,platform:n})};function Va(t){return function(t){for(let e=t;e;e=qa(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=qa(t);e;e=qa(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return e;if("BODY"===e.tagName)return e}}return null}(t)}function qa(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}var Ya=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Xa extends Ke{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new r,this.revealDebouncer=new r}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return fe`
|
|
732
717
|
<div part="container"
|
|
733
718
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
734
719
|
@mouseenter=${this.onHover}
|
|
@@ -746,24 +731,18 @@ const Jn=1,Qn=2,ta=t=>(...e)=>({_$litDirective$:t,values:e});class ea{constructo
|
|
|
746
731
|
</div>
|
|
747
732
|
</div>
|
|
748
733
|
</div>
|
|
749
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",
|
|
734
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Ga(this.slottedElement,this.tooltip,{platform:{...Ha,getOffsetParent:t=>Ha.getOffsetParent(t,Va)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=ra(t,e),c={x:i,y:o},f=await pa(e,l),h=ca(na(r)),d=sa(h);let u=c[d],p=c[h];if(n){const t="y"===d?"bottom":"right";u=oa(u+f["y"===d?"top":"left"],u,u-f[t])}if(a){const t="y"===h?"bottom":"right";p=oa(p+f["y"===h?"top":"left"],p,p-f[t])}const y=s.fn({...e,[d]:u,[h]:p});return{...y,data:{x:y.x-i,y:y.y-o}}}}),ga({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Xa.elementDefinitions={"ft-typography":_n},Xa.styles=Vn,Ya([k()],Xa.prototype,"text",void 0),Ya([k({type:Boolean})],Xa.prototype,"manual",void 0),Ya([k({type:Boolean})],Xa.prototype,"inline",void 0),Ya([k({type:Number})],Xa.prototype,"delay",void 0),Ya([k()],Xa.prototype,"position",void 0),Ya([A()],Xa.prototype,"slotNodes",void 0),Ya([L(".ft-tooltip--container")],Xa.prototype,"container",void 0),Ya([L(".ft-tooltip")],Xa.prototype,"tooltip",void 0),Ya([L(".ft-tooltip--content")],Xa.prototype,"tooltipContent",void 0),Ya([R()],Xa.prototype,"visible",void 0),Ya([I({passive:!0})],Xa.prototype,"onTouch",null),Ya([I({passive:!0})],Xa.prototype,"onHover",null),Ya([I({passive:!0})],Xa.prototype,"onOut",null),W("ft-tooltip")(Xa);
|
|
750
735
|
/**
|
|
751
736
|
* @license
|
|
752
|
-
* Copyright
|
|
737
|
+
* Copyright 2017 Google LLC
|
|
753
738
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
754
739
|
*/
|
|
755
|
-
|
|
756
|
-
<
|
|
757
|
-
.
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
</style>
|
|
762
|
-
<div class="${ms(t)}">
|
|
763
|
-
<div class="ft-ripple--background"></div>
|
|
764
|
-
<div class="ft-ripple--effect"></div>
|
|
765
|
-
</div>
|
|
766
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",i,n),t.addEventListener("touchstart",o,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",i,n),t.removeEventListener("touchstart",o,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}ws.elementDefinitions={},ws.styles=ur,xs([E({type:Boolean})],ws.prototype,"primary",void 0),xs([E({type:Boolean})],ws.prototype,"secondary",void 0),xs([E({type:Boolean})],ws.prototype,"unbounded",void 0),xs([E({type:Boolean})],ws.prototype,"activated",void 0),xs([E({type:Boolean})],ws.prototype,"selected",void 0),xs([E({type:Boolean})],ws.prototype,"disabled",void 0),xs([k()],ws.prototype,"hovered",void 0),xs([k()],ws.prototype,"focused",void 0),xs([k()],ws.prototype,"pressed",void 0),xs([k()],ws.prototype,"rippling",void 0),xs([k()],ws.prototype,"originX",void 0),xs([k()],ws.prototype,"originY",void 0),xs([U(".ft-ripple")],ws.prototype,"ripple",void 0),xs([U(".ft-ripple--effect")],ws.prototype,"rippleEffect",void 0),W("ft-ripple")(ws);const Os={borderRadiusLeft:ke.extend("--ft-switch-option-border-radius-left","",_e.borderRadiusL),borderRadiusRight:ke.extend("--ft-switch-option-border-radius-right","",_e.borderRadiusL),borderWidthLeft:ke.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:ke.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:ke.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},Ss=kt`
|
|
740
|
+
class Ja extends Fn{constructor(t){if(super(t),this.et=at,t.type!==Wn)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===at||null==t)return this.vt=void 0,this.et=t;if(t===nt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ja.directiveName="unsafeHTML",Ja.resultType=1;const Qa=Dn(Ja);var ts,es,is;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(ts||(ts={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(es||(es={})),new Map([...["abw"].map((t=>[t,es.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,es.AUDIO])),...["avi"].map((t=>[t,es.AVI])),...["chm","xhs"].map((t=>[t,es.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,es.CODE])),...["csv"].map((t=>[t,es.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,es.DITA])),...["epub"].map((t=>[t,es.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,es.EXCEL])),...["flac"].map((t=>[t,es.FLAC])),...["gif"].map((t=>[t,es.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,es.GZIP])),...["html","htm","xhtml"].map((t=>[t,es.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,es.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,es.JPEG])),...["json"].map((t=>[t,es.JSON])),...["m4a","m4p"].map((t=>[t,es.M4A])),...["mov","qt"].map((t=>[t,es.MOV])),...["mp3"].map((t=>[t,es.MP3])),...["mp4","m4v"].map((t=>[t,es.MP4])),...["ogg","oga"].map((t=>[t,es.OGG])),...["pdf","ps"].map((t=>[t,es.PDF])),...["png"].map((t=>[t,es.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,es.POWERPOINT])),...["rar"].map((t=>[t,es.RAR])),...["stp"].map((t=>[t,es.STP])),...["txt","rtf","md","mdown"].map((t=>[t,es.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,es.VIDEO])),...["wav"].map((t=>[t,es.WAV])),...["wma"].map((t=>[t,es.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,es.WORD])),...["xml","xsl","rdf"].map((t=>[t,es.XML])),...["yaml","yml","x-yaml"].map((t=>[t,es.YAML])),...["zip"].map((t=>[t,es.ZIP]))]),es.ABW,es.AUDIO,es.AVI,es.CHM,es.CODE,es.CSV,es.DITA,es.EPUB,es.EXCEL,es.FLAC,es.GIF,es.GZIP,es.HTML,es.IMAGE,es.JPEG,es.JSON,es.M4A,es.MOV,es.MP3,es.MP4,es.OGG,es.PDF,es.PNG,es.POWERPOINT,es.RAR,es.STP,es.TEXT,es.UNKNOWN,es.VIDEO,es.WAV,es.WMA,es.WORD,es.XML,es.YAML,es.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(is||(is={}));var os=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class rs extends Ke{constructor(){super(...arguments),this.resolvedIcon=de}render(){const t=this.variant&&Object.values(is).includes(this.variant)?this.variant:is.fluid_topics,e=t!==is.material||!!this.value;return fe`
|
|
741
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
742
|
+
${Qa(this.resolvedIcon)}
|
|
743
|
+
<slot ?hidden=${e}></slot>
|
|
744
|
+
</i>
|
|
745
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case is.file_format:this.resolvedIcon=null!==(t=es[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case is.material:this.resolvedIcon=this.value||de;break;default:this.resolvedIcon=null!==(e=ts[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}rs.elementDefinitions={},rs.styles=pn,os([k()],rs.prototype,"variant",void 0),os([k()],rs.prototype,"value",void 0),os([R()],rs.prototype,"resolvedIcon",void 0),os([L("slot")],rs.prototype,"slottedContent",void 0),W("ft-icon")(rs);const ns={borderRadiusLeft:ke.extend("--ft-switch-option-border-radius-left","",_e.borderRadiusL),borderRadiusRight:ke.extend("--ft-switch-option-border-radius-right","",_e.borderRadiusL),borderWidthLeft:ke.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:ke.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:ke.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},as=kt`
|
|
767
746
|
.ft-switch-option {
|
|
768
747
|
position: relative;
|
|
769
748
|
display: inline-block;
|
|
@@ -782,8 +761,8 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
782
761
|
|
|
783
762
|
border-style: solid;
|
|
784
763
|
border-color: ${$n.borderColor};
|
|
785
|
-
border-width: ${
|
|
786
|
-
border-radius: ${
|
|
764
|
+
border-width: ${ns.borderWidthVertical} ${ns.borderWidthRight} ${ns.borderWidthVertical} ${ns.borderWidthLeft};
|
|
765
|
+
border-radius: ${ns.borderRadiusLeft} ${ns.borderRadiusRight} ${ns.borderRadiusRight} ${ns.borderRadiusLeft};
|
|
787
766
|
display: flex;
|
|
788
767
|
align-items: center;
|
|
789
768
|
justify-content: center;
|
|
@@ -800,7 +779,7 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
800
779
|
|
|
801
780
|
.ft-switch-option--selected .ft-switch-option--content:before {
|
|
802
781
|
background-color: ${$n.selectedBackgroundColor};
|
|
803
|
-
border-radius: ${
|
|
782
|
+
border-radius: ${ns.borderRadiusLeft} ${ns.borderRadiusRight} ${ns.borderRadiusRight} ${ns.borderRadiusLeft};
|
|
804
783
|
position: absolute;
|
|
805
784
|
inset: 0;
|
|
806
785
|
content: "";
|
|
@@ -847,8 +826,8 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
847
826
|
.ft-switch-option--selected ft-icon {
|
|
848
827
|
color: ${$n.selectedTextColor};
|
|
849
828
|
}
|
|
850
|
-
`;var
|
|
851
|
-
<label part="label" for="input" class=${
|
|
829
|
+
`;var ss=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ls extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class cs extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class fs extends Ke{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new cs(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(fe`
|
|
830
|
+
<label part="label" for="input" class=${Pn(t)}
|
|
852
831
|
@click=${this.onChange}>
|
|
853
832
|
<div class="ft-switch-option--content">
|
|
854
833
|
<ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
|
|
@@ -869,16 +848,16 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
869
848
|
position="${this.tooltipPosition}">
|
|
870
849
|
${t}
|
|
871
850
|
</ft-tooltip>
|
|
872
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new
|
|
851
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new ls(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?fe`
|
|
873
852
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
874
|
-
`:de}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}
|
|
875
|
-
<div @keydown=${this.onKeyDown} tabindex="0" class="${
|
|
853
|
+
`:de}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}fs.elementDefinitions={"ft-ripple":jn,"ft-typography":_n,"ft-tooltip":Xa,"ft-icon":rs},fs.styles=[Ge,as],ss([k()],fs.prototype,"value",void 0),ss([k()],fs.prototype,"icon",void 0),ss([k()],fs.prototype,"iconVariant",void 0),ss([k()],fs.prototype,"label",void 0),ss([k()],fs.prototype,"tooltipPosition",void 0),ss([k({type:Boolean,reflect:!0})],fs.prototype,"selected",void 0),ss([k({type:Boolean})],fs.prototype,"trailingIcon",void 0),ss([k({type:Boolean})],fs.prototype,"unselectable",void 0),ss([L(".ft-switch-option--content slot")],fs.prototype,"slottedContent",void 0),ss([L(".ft-switch-option--input")],fs.prototype,"input",void 0);var hs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ds extends CustomEvent{constructor(t){super("change",{detail:t})}}class us extends Ke{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return fe`
|
|
854
|
+
<div @keydown=${this.onKeyDown} tabindex="0" class="${Pn(t)}">
|
|
876
855
|
<slot @slotchange=${this.onSlotchange}
|
|
877
856
|
@option-change=${this.onOptionChangeByScript}
|
|
878
857
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
879
858
|
></slot>
|
|
880
859
|
</div>
|
|
881
|
-
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
860
|
+
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof fs&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new ds(null===(e=this.selectedOption)||void 0===e?void 0:e.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}us.elementDefinitions={},us.styles=kt`
|
|
882
861
|
:host {
|
|
883
862
|
display: inline-block;
|
|
884
863
|
}
|
|
@@ -894,25 +873,25 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
894
873
|
}
|
|
895
874
|
|
|
896
875
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
897
|
-
${Re(
|
|
898
|
-
${Re(
|
|
899
|
-
${Re(
|
|
876
|
+
${Re(ns.borderRadiusLeft,"0")};
|
|
877
|
+
${Re(ns.borderRadiusRight,"0")};
|
|
878
|
+
${Re(ns.borderWidthLeft,"0")};
|
|
900
879
|
}
|
|
901
880
|
|
|
902
881
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
903
|
-
${Re(
|
|
904
|
-
${Re(
|
|
882
|
+
${Re(ns.borderRadiusLeft,$n.borderRadius)};
|
|
883
|
+
${Re(ns.borderWidthLeft,"1px")};
|
|
905
884
|
}
|
|
906
885
|
|
|
907
886
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
908
|
-
${Re(
|
|
887
|
+
${Re(ns.borderRadiusRight,$n.borderRadius)};
|
|
909
888
|
}
|
|
910
889
|
|
|
911
890
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
912
891
|
--ft-switch-internal-vertical-padding: 2px;
|
|
913
892
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
914
893
|
}
|
|
915
|
-
`,
|
|
894
|
+
`,hs([k({type:Boolean})],us.prototype,"dense",void 0),hs([k({type:Boolean})],us.prototype,"unselectable",void 0),hs([L(".ft-switch slot")],us.prototype,"slottedContent",void 0),hs([R()],us.prototype,"selectedOption",void 0),hs([L(".ft-switch")],us.prototype,"ftSwitchDiv",void 0),W("ft-switch")(us),W("ft-switch-option")(fs);const ps=ke.external(_e.colorOutline,"Design system"),ys=ke.external(_e.colorOnSurfaceMedium,"Design system"),gs=kt`
|
|
916
895
|
:host {
|
|
917
896
|
display: block;
|
|
918
897
|
}
|
|
@@ -923,14 +902,14 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
923
902
|
|
|
924
903
|
ft-icon {
|
|
925
904
|
transform: rotate(-45deg);
|
|
926
|
-
color: ${
|
|
905
|
+
color: ${ps};
|
|
927
906
|
}
|
|
928
907
|
|
|
929
908
|
.ft-resizer--dragging ft-icon,
|
|
930
909
|
.ft-resizer:hover ft-icon {
|
|
931
|
-
color: ${
|
|
910
|
+
color: ${ys};
|
|
932
911
|
}
|
|
933
|
-
`;var
|
|
912
|
+
`;var bs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class vs extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class ms extends Ke{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=is.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return fe`
|
|
934
913
|
<style>
|
|
935
914
|
.ft-resizer {
|
|
936
915
|
cursor: ${Et(this.cursor)}
|
|
@@ -941,25 +920,25 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
941
920
|
@touchstart=${this.initDragFromTouch}>
|
|
942
921
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
943
922
|
</div>
|
|
944
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
923
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let i=this.fixedWidth+t-this.startX,o=this.fixedHeight+e-this.startY;this.dispatchEvent(new vs(i,o))}}ms.elementDefinitions={"ft-icon":rs},ms.styles=[He,gs],bs([k({type:Number})],ms.prototype,"initialWidth",void 0),bs([k({type:Number})],ms.prototype,"initialHeight",void 0),bs([k()],ms.prototype,"icon",void 0),bs([k()],ms.prototype,"iconVariant",void 0),bs([k()],ms.prototype,"cursor",void 0),bs([R()],ms.prototype,"dragging",void 0),bs([I({passive:!0})],ms.prototype,"initDragFromMouse",null),bs([I({passive:!0})],ms.prototype,"initDragFromTouch",null),W("ft-resizer")(ms);const xs={fontSize:ke.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:ke.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:ke.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:ke.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:ke.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:ke.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:ke.extend("--ft-input-label-border-color","",_e.colorOutline),textColor:ke.extend("--ft-input-label-text-color","",_e.colorOnSurfaceMedium),disabledTextColor:ke.extend("--ft-input-label-disabled-text-color","",_e.colorOnSurfaceDisabled),colorSurface:ke.external(_e.colorSurface,"Design system"),borderRadiusS:ke.external(_e.borderRadiusS,"Design system"),colorError:ke.external(_e.colorError,"Design system")},ws=kt`
|
|
945
924
|
.ft-input-label {
|
|
946
925
|
position: absolute;
|
|
947
926
|
inset: 0;
|
|
948
927
|
display: flex;
|
|
949
|
-
background-color: ${
|
|
950
|
-
border-radius: ${
|
|
928
|
+
background-color: ${xs.colorSurface};
|
|
929
|
+
border-radius: ${xs.borderRadiusS} ${xs.borderRadiusS} 0 0;
|
|
951
930
|
}
|
|
952
931
|
|
|
953
932
|
.ft-input-label--outlined {
|
|
954
|
-
border-radius: ${
|
|
933
|
+
border-radius: ${xs.borderRadiusS};
|
|
955
934
|
}
|
|
956
935
|
|
|
957
936
|
.ft-input-label {
|
|
958
|
-
border-color: ${
|
|
937
|
+
border-color: ${xs.borderColor};
|
|
959
938
|
}
|
|
960
939
|
|
|
961
940
|
.ft-input-label.ft-input-label--in-error {
|
|
962
|
-
border-color: ${
|
|
941
|
+
border-color: ${xs.colorError}
|
|
963
942
|
}
|
|
964
943
|
|
|
965
944
|
.ft-input-label:before,
|
|
@@ -972,7 +951,7 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
972
951
|
}
|
|
973
952
|
|
|
974
953
|
.ft-input-label:before {
|
|
975
|
-
width: calc(${
|
|
954
|
+
width: calc(${xs.horizontalSpacing} - 4px);
|
|
976
955
|
flex-shrink: 0;
|
|
977
956
|
}
|
|
978
957
|
|
|
@@ -988,20 +967,20 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
988
967
|
border-bottom-width: 1px;
|
|
989
968
|
border-bottom-style: solid;
|
|
990
969
|
border-color: inherit;
|
|
991
|
-
color: ${
|
|
970
|
+
color: ${xs.textColor};
|
|
992
971
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
993
|
-
max-width: calc(${
|
|
972
|
+
max-width: calc(${xs.labelMaxWidth} - 2 * (${xs.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
994
973
|
text-overflow: ellipsis;
|
|
995
|
-
${Re(Fr.fontSize,
|
|
996
|
-
${Re(Fr.lineHeight,
|
|
974
|
+
${Re(Fr.fontSize,xs.fontSize)};
|
|
975
|
+
${Re(Fr.lineHeight,xs.fontSize)};
|
|
997
976
|
}
|
|
998
977
|
|
|
999
978
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1000
|
-
color: ${
|
|
979
|
+
color: ${xs.colorError}
|
|
1001
980
|
}
|
|
1002
981
|
|
|
1003
982
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1004
|
-
color: ${
|
|
983
|
+
color: ${xs.disabledTextColor};
|
|
1005
984
|
}
|
|
1006
985
|
|
|
1007
986
|
.ft-input-label--hidden-text {
|
|
@@ -1018,19 +997,19 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1018
997
|
overflow: hidden;
|
|
1019
998
|
white-space: nowrap;
|
|
1020
999
|
text-overflow: ellipsis;
|
|
1021
|
-
padding: ${
|
|
1022
|
-
margin: calc(${
|
|
1000
|
+
padding: ${xs.verticalSpacing} 4px;
|
|
1001
|
+
margin: calc(${xs.verticalSpacing} * -1) 0;
|
|
1023
1002
|
max-width: 100%;
|
|
1024
1003
|
box-sizing: border-box;
|
|
1025
1004
|
}
|
|
1026
1005
|
|
|
1027
1006
|
.ft-input-label--raised .ft-input-label--text {
|
|
1028
|
-
${Re(Fr.fontSize,
|
|
1029
|
-
${Re(Fr.lineHeight,
|
|
1007
|
+
${Re(Fr.fontSize,xs.raisedFontSize)};
|
|
1008
|
+
${Re(Fr.lineHeight,xs.raisedFontSize)};
|
|
1030
1009
|
}
|
|
1031
1010
|
|
|
1032
1011
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1033
|
-
top: ${
|
|
1012
|
+
top: ${xs.verticalSpacing};
|
|
1034
1013
|
}
|
|
1035
1014
|
|
|
1036
1015
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1043,28 +1022,28 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1043
1022
|
.ft-input-label--outlined:before {
|
|
1044
1023
|
border-left-width: 1px;
|
|
1045
1024
|
border-left-style: solid;
|
|
1046
|
-
border-radius: ${
|
|
1025
|
+
border-radius: ${xs.borderRadiusS} 0 0 ${xs.borderRadiusS};
|
|
1047
1026
|
}
|
|
1048
1027
|
|
|
1049
1028
|
.ft-input-label--outlined:after {
|
|
1050
1029
|
border-right-width: 1px;
|
|
1051
1030
|
border-right-style: solid;
|
|
1052
|
-
border-radius: 0 ${
|
|
1031
|
+
border-radius: 0 ${xs.borderRadiusS} ${xs.borderRadiusS} 0;
|
|
1053
1032
|
}
|
|
1054
1033
|
|
|
1055
1034
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1056
1035
|
padding: 2px 4px;
|
|
1057
|
-
z-index: ${
|
|
1058
|
-
background-color: ${
|
|
1059
|
-
border-radius: ${
|
|
1036
|
+
z-index: ${xs.raisedZIndex};
|
|
1037
|
+
background-color: ${xs.colorSurface};
|
|
1038
|
+
border-radius: ${xs.borderRadiusS};
|
|
1060
1039
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1061
1040
|
}
|
|
1062
1041
|
|
|
1063
1042
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1064
1043
|
border-top: none;
|
|
1065
1044
|
}
|
|
1066
|
-
`;var
|
|
1067
|
-
<div class="${
|
|
1045
|
+
`;var Os=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Ss extends Ke{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return fe`
|
|
1046
|
+
<div class="${Pn(t)}">
|
|
1068
1047
|
${this.text?fe`
|
|
1069
1048
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1070
1049
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -1072,7 +1051,7 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1072
1051
|
</div>
|
|
1073
1052
|
`:null}
|
|
1074
1053
|
</div>
|
|
1075
|
-
`}}
|
|
1054
|
+
`}}Ss.elementDefinitions={},Ss.styles=[nn,ws],Os([k({type:String})],Ss.prototype,"text",void 0),Os([k({type:Boolean})],Ss.prototype,"raised",void 0),Os([k({type:Boolean})],Ss.prototype,"outlined",void 0),Os([k({type:Boolean})],Ss.prototype,"disabled",void 0),Os([k({type:Boolean})],Ss.prototype,"error",void 0),W("ft-input-label")(Ss);const $s={fontSize:ke.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:ke.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:ke.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:ke.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:ke.extend("--ft-text-area-helper-color","",_e.colorOnSurfaceMedium),colorPrimary:ke.external(_e.colorPrimary,"Design system"),colorOnSurface:ke.external(_e.colorOnSurface,"Design system"),colorOnSurfaceDisabled:ke.external(_e.colorOnSurfaceDisabled,"Design system"),borderRadiusS:ke.external(_e.borderRadiusS,"Design system"),colorError:ke.external(_e.colorError,"Design system")},Ns=kt`
|
|
1076
1055
|
*:focus {
|
|
1077
1056
|
outline: none;
|
|
1078
1057
|
}
|
|
@@ -1084,10 +1063,10 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1084
1063
|
}
|
|
1085
1064
|
|
|
1086
1065
|
ft-input-label {
|
|
1087
|
-
${Re(
|
|
1088
|
-
${Re(
|
|
1089
|
-
${Re(
|
|
1090
|
-
${Re(
|
|
1066
|
+
${Re(xs.fontSize,$s.fontSize)};
|
|
1067
|
+
${Re(xs.raisedFontSize,$s.labelSize)};
|
|
1068
|
+
${Re(xs.verticalSpacing,$s.verticalSpacing)};
|
|
1069
|
+
${Re(xs.horizontalSpacing,$s.horizontalSpacing)};
|
|
1091
1070
|
}
|
|
1092
1071
|
|
|
1093
1072
|
.ft-text-area--main-panel {
|
|
@@ -1118,12 +1097,12 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1118
1097
|
align-self: stretch;
|
|
1119
1098
|
resize: none;
|
|
1120
1099
|
|
|
1121
|
-
${Re(Ur.fontSize
|
|
1122
|
-
${Re(Ur.lineHeight
|
|
1123
|
-
color: ${
|
|
1100
|
+
${Re(Ur.fontSize,$s.fontSize)};
|
|
1101
|
+
${Re(Ur.lineHeight,$s.fontSize)};
|
|
1102
|
+
color: ${$s.colorOnSurface};
|
|
1124
1103
|
|
|
1125
|
-
padding: 0 ${
|
|
1126
|
-
margin: calc(${
|
|
1104
|
+
padding: 0 ${$s.horizontalSpacing};
|
|
1105
|
+
margin: calc(${$s.verticalSpacing} + ${$s.labelSize} / 2) 0 ${$s.verticalSpacing} 0;
|
|
1127
1106
|
|
|
1128
1107
|
border: none;
|
|
1129
1108
|
background: none;
|
|
@@ -1132,7 +1111,7 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1132
1111
|
}
|
|
1133
1112
|
|
|
1134
1113
|
.ft-text-area--disabled .ft-text-area--input {
|
|
1135
|
-
color: ${
|
|
1114
|
+
color: ${$s.colorOnSurfaceDisabled};
|
|
1136
1115
|
}
|
|
1137
1116
|
|
|
1138
1117
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -1140,49 +1119,49 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1140
1119
|
}
|
|
1141
1120
|
|
|
1142
1121
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
1143
|
-
${Re(
|
|
1144
|
-
${Re(
|
|
1122
|
+
${Re(xs.borderColor,$s.colorPrimary)};
|
|
1123
|
+
${Re(xs.textColor,$s.colorPrimary)};
|
|
1145
1124
|
}
|
|
1146
1125
|
|
|
1147
1126
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
1148
|
-
border-radius: ${
|
|
1127
|
+
border-radius: ${$s.borderRadiusS} ${$s.borderRadiusS} 0 0;
|
|
1149
1128
|
}
|
|
1150
1129
|
|
|
1151
1130
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
1152
1131
|
align-self: stretch;
|
|
1153
|
-
margin-bottom: ${
|
|
1154
|
-
margin-top: calc(${
|
|
1132
|
+
margin-bottom: ${$s.verticalSpacing};
|
|
1133
|
+
margin-top: calc(${$s.labelSize} + 2 * ${$s.verticalSpacing});
|
|
1155
1134
|
}
|
|
1156
1135
|
|
|
1157
1136
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
1158
|
-
border-radius: ${
|
|
1137
|
+
border-radius: ${$s.borderRadiusS};
|
|
1159
1138
|
}
|
|
1160
1139
|
|
|
1161
1140
|
.ft-text-area--helper-text {
|
|
1162
|
-
padding: 0 12px 0 ${
|
|
1163
|
-
color: ${
|
|
1141
|
+
padding: 0 12px 0 ${$s.horizontalSpacing};
|
|
1142
|
+
color: ${$s.helperColor};
|
|
1164
1143
|
}
|
|
1165
1144
|
|
|
1166
1145
|
.ft-text-area--in-error .ft-text-area--input,
|
|
1167
1146
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
1168
|
-
color: ${
|
|
1147
|
+
color: ${$s.colorError};
|
|
1169
1148
|
}
|
|
1170
1149
|
|
|
1171
1150
|
ft-resizer {
|
|
1172
1151
|
position: absolute;
|
|
1173
1152
|
bottom: 0;
|
|
1174
1153
|
}
|
|
1175
|
-
`;var
|
|
1154
|
+
`;var Cs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Es extends(qo(Ke,"textbox")){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return fe`
|
|
1176
1155
|
<style>
|
|
1177
1156
|
.ft-text-area--main-panel {
|
|
1178
|
-
height: calc(4 * ${
|
|
1157
|
+
height: calc(4 * ${$s.verticalSpacing} + ${$s.labelSize} + ${$s.fontSize} + ${this.height}px);
|
|
1179
1158
|
}
|
|
1180
1159
|
|
|
1181
1160
|
ft-resizer {
|
|
1182
1161
|
right: ${null!=this.textarea?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
|
|
1183
1162
|
}
|
|
1184
1163
|
</style>
|
|
1185
|
-
<div class="${
|
|
1164
|
+
<div class="${Pn(t)}">
|
|
1186
1165
|
<div class="ft-text-area--main-panel">
|
|
1187
1166
|
<ft-input-label text="${this.label}"
|
|
1188
1167
|
?disabled=${this.disabled}
|
|
@@ -1214,27 +1193,27 @@ const ms=ta(class extends ea{constructor(t){if(super(t),t.type!==Jn||"class"!==t
|
|
|
1214
1193
|
${this.helper}
|
|
1215
1194
|
</ft-typography>`:void 0}
|
|
1216
1195
|
</div>
|
|
1217
|
-
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
1196
|
+
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}Es.elementDefinitions={"ft-input-label":Ss,"ft-resizer":ms,"ft-ripple":jn,"ft-typography":_n},Es.styles=[on,Ns],Cs([k({type:String})],Es.prototype,"label",void 0),Cs([k({reflect:!0})],Es.prototype,"value",void 0),Cs([k({type:String})],Es.prototype,"helper",void 0),Cs([k({type:Boolean})],Es.prototype,"outlined",void 0),Cs([k({type:Boolean})],Es.prototype,"disabled",void 0),Cs([k({type:Boolean})],Es.prototype,"error",void 0),Cs([k({type:Number,reflect:!0})],Es.prototype,"height",void 0),Cs([L("textarea")],Es.prototype,"textarea",void 0),Cs([R()],Es.prototype,"focused",void 0),W("ft-text-area")(Es);
|
|
1218
1197
|
/**
|
|
1219
1198
|
* @license
|
|
1220
1199
|
* Copyright 2020 Google LLC
|
|
1221
1200
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1222
1201
|
*/
|
|
1223
|
-
const{D:
|
|
1202
|
+
const{D:ks}=xt,Rs=()=>document.createComment(""),Is=(t,e,i)=>{const o=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(Rs(),r),n=o.insertBefore(Rs(),r);i=new ks(e,n,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,a=n!==t;if(a){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,r),t=e}}}return i},Us=(t,e,i=t)=>(t._$AI(e,i),t),Ls={},As=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},_s=(t,e,i)=>{const o=new Map;for(let r=e;r<=i;r++)o.set(t[r],r);return o},Ts=Dn(class extends Fn{constructor(t){if(super(t),t.type!==Wn)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const r=[],n=[];let a=0;for(const e of t)r[a]=o?o(e,a):a,n[a]=i(e,a),a++;return{values:n,keys:r}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){const r=(t=>t._$AH)(t),{values:n,keys:a}=this.ht(e,i,o);if(!Array.isArray(r))return this.dt=a,n;const s=this.dt??=[],l=[];let c,f,h=0,d=r.length-1,u=0,p=n.length-1;for(;h<=d&&u<=p;)if(null===r[h])h++;else if(null===r[d])d--;else if(s[h]===a[u])l[u]=Us(r[h],n[u]),h++,u++;else if(s[d]===a[p])l[p]=Us(r[d],n[p]),d--,p--;else if(s[h]===a[p])l[p]=Us(r[h],n[p]),Is(t,l[p+1],r[h]),h++,p--;else if(s[d]===a[u])l[u]=Us(r[d],n[u]),Is(t,r[h],r[d]),d--,u++;else if(void 0===c&&(c=_s(a,u,p),f=_s(s,h,d)),c.has(s[h]))if(c.has(s[d])){const e=f.get(a[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Is(t,r[h]);Us(e,n[u]),l[u]=e}else l[u]=Us(i,n[u]),Is(t,r[h],i),r[e]=null;u++}else As(r[d]),d--;else As(r[h]),h++;for(;u<=p;){const e=Is(t,l[p+1]);Us(e,n[u]),l[u++]=e}for(;h<=d;){const t=r[h++];null!==t&&As(t)}return this.dt=a,((t,e=Ls)=>{t._$AH=e})(t,l),nt}});
|
|
1224
1203
|
/**
|
|
1225
1204
|
* @license
|
|
1226
1205
|
* Copyright 2017 Google LLC
|
|
1227
1206
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1228
|
-
*/class
|
|
1207
|
+
*/class Ws extends Ke{render(){return fe`
|
|
1229
1208
|
<div class="ft-loader">
|
|
1230
1209
|
<div></div>
|
|
1231
1210
|
<div></div>
|
|
1232
1211
|
<div></div>
|
|
1233
1212
|
<div></div>
|
|
1234
1213
|
</div>
|
|
1235
|
-
`}}
|
|
1214
|
+
`}}Ws.styles=dn,W("ft-loader")(Ws);var Ds=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Fs extends(qo(Ke,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}render(){return this.addTooltipIfNeeded(fe`
|
|
1236
1215
|
<button part="button"
|
|
1237
|
-
class="${
|
|
1216
|
+
class="${Pn(this.buttonClasses)}"
|
|
1238
1217
|
aria-label="${this.getLabel()}"
|
|
1239
1218
|
?disabled=${this.isDisabled()}>
|
|
1240
1219
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
@@ -1255,7 +1234,7 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1255
1234
|
</ft-tooltip>
|
|
1256
1235
|
`:t}resolveIcon(){return this.loading?fe`
|
|
1257
1236
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?fe`
|
|
1258
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:de}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
1237
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:de}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Fs.elementDefinitions={"ft-ripple":jn,"ft-tooltip":Xa,"ft-typography":_n,"ft-icon":rs,"ft-loader":Ws},Ds([k({type:String,reflect:!0})],Fs.prototype,"role",void 0),Ds([k()],Fs.prototype,"type",void 0),Ds([k({type:Boolean})],Fs.prototype,"disabled",void 0),Ds([k()],Fs.prototype,"label",void 0),Ds([k()],Fs.prototype,"icon",void 0),Ds([k()],Fs.prototype,"iconVariant",void 0),Ds([k({type:Boolean})],Fs.prototype,"trailingIcon",void 0),Ds([k({type:Boolean})],Fs.prototype,"loading",void 0),Ds([k()],Fs.prototype,"tooltipPosition",void 0),Ds([k({type:Boolean})],Fs.prototype,"hideTooltip",void 0),Ds([k({type:Boolean})],Fs.prototype,"forceTooltip",void 0),Ds([L(".ft-button")],Fs.prototype,"button",void 0),Ds([L(".ft-button--label slot")],Fs.prototype,"slottedContent",void 0);var Ps=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Ms extends Fs{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}Ms.styles=[Ge,Sn],Ps([k({type:Boolean})],Ms.prototype,"primary",void 0),Ps([k({type:Boolean})],Ms.prototype,"outlined",void 0),Ps([k({type:Boolean})],Ms.prototype,"dense",void 0),Ps([k({type:Boolean})],Ms.prototype,"round",void 0);const js=[kt`
|
|
1259
1238
|
:host {
|
|
1260
1239
|
display: inline-block;
|
|
1261
1240
|
max-width: 100%;
|
|
@@ -1473,15 +1452,15 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1473
1452
|
width: ${Ae.smallIconOnlyWidth};
|
|
1474
1453
|
padding: unset;
|
|
1475
1454
|
}
|
|
1476
|
-
`,He];var
|
|
1477
|
-
`,
|
|
1478
|
-
`,
|
|
1455
|
+
`,He];var zs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Bs extends Fs{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Ln.caption1medium:Ln.body2medium}}Bs.styles=[Ge,js],zs([k({type:Boolean})],Bs.prototype,"primary",void 0),zs([k({type:Boolean})],Bs.prototype,"secondary",void 0),zs([k({type:Boolean})],Bs.prototype,"tertiary",void 0),zs([k({type:Boolean})],Bs.prototype,"neutral",void 0),zs([k({type:Boolean})],Bs.prototype,"small",void 0),W("ft-button")(Ms),W("ftds-button")(Bs);const Ks=kt`
|
|
1456
|
+
`,Zs=kt`
|
|
1457
|
+
`,Hs=Go.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 Gs{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Hs.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?Gs.build(t):null!==(e=Gs.API)&&void 0!==e?e:Gs.API=Gs.build()}static await(t){return new Promise((e=>{let i=Gs.get(t);if(i)e(i);else{const o=Hs.subscribe((()=>{i=Gs.get(t),i&&(o(),e(i))}))}}))}}var Vs;const qs=Symbol("clearAfterUnitTest");class Ys{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new o,this.listeners={},this.currentUiLocale="",this[Vs]=()=>{this.defaultMessages={},this.cache=new o,this.listeners={}},this.currentUiLocale=Hs.getState().uiLocale,Hs.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Hs.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 o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};T(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new Ve(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).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=>_(0).then((()=>t())).catch((()=>null)))))}}Vs=qs,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Ys((async(t,e)=>(await Gs.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Ys((async(t,e)=>(await Gs.await()).getCustomMessageContext(t,e))));const Xs=window.FluidTopicsI18nService,Js=window.FluidTopicsCustomI18nService;var Qs=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class tl extends Ke{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=()=>Gs.get(),this.cache=new o,this.cleanSessionDebouncer=new r}render(){return fe`
|
|
1479
1458
|
<slot></slot>
|
|
1480
|
-
`}update(t){super.update(t),t.has("baseUrl")&&
|
|
1459
|
+
`}update(t){super.update(t),t.has("baseUrl")&&Hs.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Hs.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Hs.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Hs.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Hs.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Hs.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Hs.actions.setSession(this.session),t.has("availableUiLocales")&&Hs.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Xs.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()))))}}tl.elementDefinitions={},tl.styles=Zs,Qs([k()],tl.prototype,"baseUrl",void 0),Qs([k()],tl.prototype,"apiIntegrationIdentifier",void 0),Qs([k()],tl.prototype,"uiLocale",void 0),Qs([D([])],tl.prototype,"availableUiLocales",void 0),Qs([k({type:Boolean})],tl.prototype,"editorMode",void 0),Qs([k({type:Boolean})],tl.prototype,"noCustom",void 0),Qs([k({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],tl.prototype,"noCustomComponent",void 0),Qs([k({type:Boolean})],tl.prototype,"withManualResources",void 0),Qs([D([])],tl.prototype,"messageContexts",void 0),Qs([D(void 0)],tl.prototype,"session",void 0),Qs([k({type:Object})],tl.prototype,"apiProvider",void 0);class el{async listMySearches(){var t;return(null===(t=Hs.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Gs.await()).listMySearches(Hs.getState().session.profile.userId):[]}}const il=new o;class ol{async listMyBookmarks(){return il.get("bookmarks",(async()=>(await Gs.await()).listMyBookmarks(Hs.getState().session.profile.userId)))}clearCache(){il.clear("bookmarks")}}const rl=Go.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const nl=new class{constructor(){this.currentSession=Hs.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ol,Hs.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Hs.getState();T(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){rl.actions.savedSearches(void 0)}clearMyBookmarks(){rl.actions.bookmarks(void 0)}async reloadMySearches(){const t=new el,e=await t.listMySearches();rl.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;rl.actions.bookmarks(e)}}};W("ft-app-context")(tl);var al=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const sl=Symbol("i18nProperties"),ll=Symbol("i18nUnsubs");function cl(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Js:Xs}i18n(t,e,...i){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const r=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[sl])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[sl])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[sl]&&new Set([...this[sl].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[ll].has(t)||this[ll].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[ll].forEach((t=>t())),this[ll].clear()}}return e=ll,al([k({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class fl extends(cl(Ke)){}class hl extends(cl(ri)){}var dl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ul extends hl{constructor(){super(),this.editorMode=!1,this.addStore(Hs)}render(){return this.key&&this.context?fe`
|
|
1481
1460
|
<span class="ft-i18n">
|
|
1482
1461
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1483
1462
|
</span>
|
|
1484
|
-
`:this.editorMode?"Select a context and a label key.":de}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}
|
|
1463
|
+
`:this.editorMode?"Select a context and a label key.":de}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}ul.elementDefinitions={},ul.styles=Ks,dl([qe()],ul.prototype,"editorMode",void 0),dl([k()],ul.prototype,"context",void 0),dl([k()],ul.prototype,"key",void 0),dl([D([])],ul.prototype,"args",void 0),dl([k()],ul.prototype,"defaultMessage",void 0);class pl{static build(t){return new pl(t)}static fromGwt(t){return new pl(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>Xs.resolveMessage(this.name,e,...t)})}}const yl=(t,e)=>(i,o)=>{var r,n;i.constructor.createProperty(o,null!=e?e:{attribute:!1,type:String});const a={...t,key:null!==(r=t.key)&&void 0!==r?r:o};i[sl]=null!==(n=i[sl])&&void 0!==n?n:new Map,i[sl].set(o,a)};W("ft-i18n")(ul);const gl=pl.build("integratedFeedbackComponent"),bl={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"},vl={fontSize:ke.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:ke.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:ke.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:ke.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:ke.extend("--ft-text-field-helper-color","",_e.colorOnSurfaceMedium),colorPrimary:ke.external(_e.colorPrimary,"Design system"),colorOnSurface:ke.external(_e.colorOnSurface,"Design system"),colorOnSurfaceDisabled:ke.external(_e.colorOnSurfaceDisabled,"Design system"),borderRadiusS:ke.external(_e.borderRadiusS,"Design system"),colorError:ke.external(_e.colorError,"Design system"),prefixColor:ke.extend("--ft-text-field-prefix-color","",_e.colorOnSurfaceMedium),iconColor:ke.extend("--ft-text-field-icon-color","",_e.colorOnSurfaceMedium),floatingZIndex:ke.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),colorSurface:ke.external(_e.colorSurface,"Design system"),colorOutline:ke.external(_e.colorOutline,"Design system"),elevation02:ke.external(_e.elevation02,"Design system"),suggestSize:ke.create("--ft-text-field-suggest-size","","SIZE","300px")},ml=kt`
|
|
1485
1464
|
*:focus {
|
|
1486
1465
|
outline: none;
|
|
1487
1466
|
}
|
|
@@ -1494,16 +1473,16 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1494
1473
|
}
|
|
1495
1474
|
|
|
1496
1475
|
ft-input-label {
|
|
1497
|
-
${Re(
|
|
1498
|
-
${Re(
|
|
1499
|
-
${Re(
|
|
1500
|
-
${Re(
|
|
1476
|
+
${Re(xs.fontSize,vl.fontSize)};
|
|
1477
|
+
${Re(xs.raisedFontSize,vl.labelSize)};
|
|
1478
|
+
${Re(xs.verticalSpacing,vl.verticalSpacing)};
|
|
1479
|
+
${Re(xs.horizontalSpacing,vl.horizontalSpacing)};
|
|
1501
1480
|
}
|
|
1502
1481
|
|
|
1503
1482
|
.ft-text-field--main-panel {
|
|
1504
1483
|
position: relative;
|
|
1505
1484
|
display: flex;
|
|
1506
|
-
height: calc(4 * ${
|
|
1485
|
+
height: calc(4 * ${vl.verticalSpacing} + ${vl.labelSize} + ${vl.fontSize});
|
|
1507
1486
|
}
|
|
1508
1487
|
|
|
1509
1488
|
.ft-text-field--input-panel {
|
|
@@ -1512,10 +1491,10 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1512
1491
|
display: flex;
|
|
1513
1492
|
align-items: center;
|
|
1514
1493
|
overflow: hidden;
|
|
1515
|
-
padding: 0 ${
|
|
1494
|
+
padding: 0 ${vl.horizontalSpacing};
|
|
1516
1495
|
|
|
1517
|
-
${Re(Ur.fontSize,
|
|
1518
|
-
${Re(Ur.lineHeight,
|
|
1496
|
+
${Re(Ur.fontSize,vl.fontSize)};
|
|
1497
|
+
${Re(Ur.lineHeight,vl.fontSize)};
|
|
1519
1498
|
}
|
|
1520
1499
|
|
|
1521
1500
|
.ft-text-field--input-panel ft-ripple {
|
|
@@ -1525,11 +1504,11 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1525
1504
|
|
|
1526
1505
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
1527
1506
|
align-items: flex-end;
|
|
1528
|
-
padding: 0 ${
|
|
1507
|
+
padding: 0 ${vl.horizontalSpacing} ${vl.verticalSpacing} ${vl.horizontalSpacing};
|
|
1529
1508
|
}
|
|
1530
1509
|
|
|
1531
1510
|
.ft-text-field--prefix {
|
|
1532
|
-
color: ${
|
|
1511
|
+
color: ${vl.prefixColor};
|
|
1533
1512
|
margin-right: 2px;
|
|
1534
1513
|
flex-shrink: 1;
|
|
1535
1514
|
overflow: hidden;
|
|
@@ -1548,15 +1527,15 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1548
1527
|
flex-shrink: 1;
|
|
1549
1528
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
1550
1529
|
|
|
1551
|
-
color: ${
|
|
1552
|
-
padding: calc(2 * ${
|
|
1530
|
+
color: ${vl.colorOnSurface};
|
|
1531
|
+
padding: calc(2 * ${vl.verticalSpacing}) 0;
|
|
1553
1532
|
border: none;
|
|
1554
1533
|
background: none;
|
|
1555
1534
|
}
|
|
1556
1535
|
|
|
1557
1536
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
1558
1537
|
padding-bottom: 0;
|
|
1559
|
-
padding-top: calc(${
|
|
1538
|
+
padding-top: calc(${vl.labelSize} + 2 * ${vl.verticalSpacing});
|
|
1560
1539
|
}
|
|
1561
1540
|
|
|
1562
1541
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -1565,37 +1544,37 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1565
1544
|
}
|
|
1566
1545
|
|
|
1567
1546
|
.ft-text-field--disabled .ft-text-field--input {
|
|
1568
|
-
color: ${
|
|
1547
|
+
color: ${vl.colorOnSurfaceDisabled};
|
|
1569
1548
|
}
|
|
1570
1549
|
|
|
1571
1550
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
1572
|
-
${Re(
|
|
1573
|
-
${Re(
|
|
1551
|
+
${Re(xs.borderColor,vl.colorPrimary)};
|
|
1552
|
+
${Re(xs.textColor,vl.colorPrimary)};
|
|
1574
1553
|
}
|
|
1575
1554
|
|
|
1576
1555
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
1577
|
-
border-radius: ${
|
|
1556
|
+
border-radius: ${vl.borderRadiusS} ${vl.borderRadiusS} 0 0;
|
|
1578
1557
|
}
|
|
1579
1558
|
|
|
1580
1559
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
1581
|
-
border-radius: ${
|
|
1560
|
+
border-radius: ${vl.borderRadiusS};
|
|
1582
1561
|
}
|
|
1583
1562
|
|
|
1584
1563
|
.ft-text-field--helper-text {
|
|
1585
|
-
padding: 0 12px 0 ${
|
|
1586
|
-
color: ${
|
|
1564
|
+
padding: 0 12px 0 ${vl.horizontalSpacing};
|
|
1565
|
+
color: ${vl.helperColor};
|
|
1587
1566
|
}
|
|
1588
1567
|
|
|
1589
1568
|
.ft-text-field--in-error .ft-text-field--input,
|
|
1590
1569
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
1591
1570
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
1592
|
-
color: ${
|
|
1571
|
+
color: ${vl.colorError};
|
|
1593
1572
|
}
|
|
1594
1573
|
|
|
1595
1574
|
.ft-text-field--icon {
|
|
1596
1575
|
align-self: center;
|
|
1597
1576
|
margin-left: 8px;
|
|
1598
|
-
color: ${
|
|
1577
|
+
color: ${vl.iconColor};
|
|
1599
1578
|
}
|
|
1600
1579
|
|
|
1601
1580
|
.ft-text-field--container {
|
|
@@ -1608,13 +1587,13 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1608
1587
|
position: absolute;
|
|
1609
1588
|
left: 0;
|
|
1610
1589
|
right: 0;
|
|
1611
|
-
z-index: ${
|
|
1612
|
-
background: ${
|
|
1613
|
-
border: 1px solid ${
|
|
1614
|
-
border-radius: 0 0 ${
|
|
1615
|
-
box-shadow: ${
|
|
1590
|
+
z-index: ${vl.floatingZIndex};
|
|
1591
|
+
background: ${vl.colorSurface};
|
|
1592
|
+
border: 1px solid ${vl.colorOutline};
|
|
1593
|
+
border-radius: 0 0 ${vl.borderRadiusS} ${vl.borderRadiusS};
|
|
1594
|
+
box-shadow: ${vl.elevation02};
|
|
1616
1595
|
outline: none;
|
|
1617
|
-
max-height: ${
|
|
1596
|
+
max-height: ${vl.suggestSize};
|
|
1618
1597
|
overflow-y: auto;
|
|
1619
1598
|
}
|
|
1620
1599
|
|
|
@@ -1631,14 +1610,14 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1631
1610
|
}
|
|
1632
1611
|
|
|
1633
1612
|
.ft-text-field--with-icon {
|
|
1634
|
-
${Re(
|
|
1613
|
+
${Re(xs.labelMaxWidth,`calc(100% - ${un.size} - ${xs.horizontalSpacing})`)};
|
|
1635
1614
|
}
|
|
1636
1615
|
|
|
1637
1616
|
.ft-text-field--with-password ft-icon:hover {
|
|
1638
1617
|
cursor: pointer;
|
|
1639
1618
|
}
|
|
1640
|
-
`;var
|
|
1641
|
-
<div class="${
|
|
1619
|
+
`;var xl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class wl extends(qo(Ke,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.passwordHiddenIcon=ts.EYE_SLASH,this.passwordRevealedIcon=ts.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return fe`
|
|
1620
|
+
<div class="${Pn(t)}">
|
|
1642
1621
|
<div class="ft-text-field--main-panel"
|
|
1643
1622
|
@keydown=${this.handleKeyboardNavigation}
|
|
1644
1623
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -1688,7 +1667,7 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1688
1667
|
.variant=${this.iconVariant}
|
|
1689
1668
|
.value=${this.icon}
|
|
1690
1669
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
1691
|
-
`:de}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}
|
|
1670
|
+
`:de}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}wl.elementDefinitions={"ft-input-label":Ss,"ft-ripple":jn,"ft-typography":_n,"ft-icon":rs},wl.styles=[on,ml],xl([k()],wl.prototype,"label",void 0),xl([k({noAccessor:!0})],wl.prototype,"value",null),xl([R()],wl.prototype,"dispatchedValue",void 0),xl([k()],wl.prototype,"helper",void 0),xl([k({type:Boolean})],wl.prototype,"outlined",void 0),xl([k({type:Boolean})],wl.prototype,"disabled",void 0),xl([k({type:Boolean})],wl.prototype,"error",void 0),xl([k()],wl.prototype,"prefix",void 0),xl([k()],wl.prototype,"icon",void 0),xl([k()],wl.prototype,"passwordHiddenIcon",void 0),xl([k()],wl.prototype,"passwordRevealedIcon",void 0),xl([k()],wl.prototype,"iconVariant",void 0),xl([k({type:Boolean})],wl.prototype,"filterSuggestions",void 0),xl([k({type:Number})],wl.prototype,"maxLength",void 0),xl([k({type:Boolean})],wl.prototype,"password",void 0),xl([R()],wl.prototype,"focused",void 0),xl([R()],wl.prototype,"hidePassword",void 0),xl([R()],wl.prototype,"suggestionsOnTop",void 0),xl([R()],wl.prototype,"hideSuggestions",void 0),xl([R()],wl.prototype,"visibleSuggestions",void 0),xl([L(".ft-text-field--main-panel")],wl.prototype,"mainPanel",void 0),xl([L(".ft-text-field--input")],wl.prototype,"input",void 0),xl([L(".ft-text-field--suggestions")],wl.prototype,"suggestionsContainer",void 0),xl([function(t){return(e,i)=>{const{slot:o,selector:r}=t??{},n="slot"+(o?`[name=${o}]`:":not([name])");return U(0,0,{get(){const e=this.renderRoot?.querySelector(n),i=e?.assignedElements(t)??[];return void 0===r?i:i.filter((t=>t.matches(r)))}})}}({selector:"ft-text-field-suggestion"})],wl.prototype,"suggestions",void 0);const Ol=kt`
|
|
1692
1671
|
.ft-text-field-suggestion {
|
|
1693
1672
|
position: relative;
|
|
1694
1673
|
padding: 8px 16px;
|
|
@@ -1713,7 +1692,7 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1713
1692
|
slot {
|
|
1714
1693
|
pointer-events: none;
|
|
1715
1694
|
}
|
|
1716
|
-
`;var
|
|
1695
|
+
`;var Sl=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class $l extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Nl extends Ke{render(){return fe`
|
|
1717
1696
|
<div class="ft-text-field-suggestion"
|
|
1718
1697
|
tabindex="-1"
|
|
1719
1698
|
@keydown=${this.onKeyDown}
|
|
@@ -1725,21 +1704,21 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1725
1704
|
<slot></slot>
|
|
1726
1705
|
</ft-typography>
|
|
1727
1706
|
</div>
|
|
1728
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Bl(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Kl.elementDefinitions={"ft-ripple":ws,"ft-typography":Xn,"ft-icon":la},Kl.styles=jl,zl([E()],Kl.prototype,"value",void 0),zl([U(".ft-text-field-suggestion")],Kl.prototype,"container",void 0),zl([L()],Kl.prototype,"assignedNodes",void 0),W("ft-text-field")(Ml),W("ft-text-field-suggestion")(Kl);class Zl{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 o,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:i,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var o;let r=null===(o=t.prettyUrl)||void 0===o?void 0:o.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var i,o,r,n,a,s;const l={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(o=t.tocId)&&void 0!==o?o:"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?l.topics:l.hiddenTopics).push(t),f=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,f[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}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 Hl{convertPaginatedToc(t){return new Zl(t).build()}}class Gl{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,o){this.converter=t,this.api=e,this.cache=i,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return Bn(null!==(e=null===(t=cl.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getLink(t,e,i){const o=this.getNavigationData(t,e,i),r=this.getReaderLinkPrefix()+(o.prettyUrl?o.prettyUrl:`${o.mapId}/${o.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=o.page&&n.searchParams.set("page",`${o.page}`),o.prettyUrlDuplicated&&n.searchParams.set("tocId",o.tocId),null!=o.section&&n.searchParams.set("section",o.section),n.href}getNavigationData(t,e,i){var o,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(o=null==s?void 0:s.title)&&void 0!==o?o:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&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.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,i){return this.makeRateTopicRequest(t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=cl.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,i){return this.makeTopicFeedbackRequest(t,e,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),i=[{tocId:e.tocId,title:e.title}],o=this.getTocNodeNow(e.parentTocId);for(;o;)i.unshift({tocId:o.tocId,title:o.title}),o=this.getTocNodeNow(o.parentTocId);return i}isFeatureAccessible(t,{session:e,ratingType:i}){if(!this.isFeatureAvailable(t))return!1;switch(t){case tr.FEEDBACK:return Bn(null!=e?e:[],Mn.FEEDBACK_USER);case tr.RATING:return Bn(null!=e?e:[],Mn.RATING_USER)&&null!=i&&i!==In.NO_RATING;case tr.PRINT:return Bn(null!=e?e:[],Mn.PRINT_USER);case tr.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case tr.COLLECTIONS:return Bn(null!=e?e:[],Mn.COLLECTION_USER);case tr.PERSONAL_BOOKS:return Bn(null!=e?e:[],Mn.PERSONAL_BOOK_USER);default:return!1}}}class Vl extends Gl{static async build(t){return new Vl(new Hl,await fl.await(),new o,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const e=await this.api.getMap(t);return this.fingerprint=e.fingerprint,e}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,i){return this.api.rateTopic(this.mapId,t,e,i)}makeTopicFeedbackRequest(t,e,i){return this.api.sendTopicFeedback(this.mapId,t,e,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class ql{static build(t,e){return new ql((t=>Go.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0}}))(t.trim()||"context"),null!=e?e:Vl.build)}constructor(t,e){this.store=t,this.reloadDebouncer=new A(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){for(;null==this.service;)await _(5);return this.service}async navigateToTopic(t,e,i){const o=await this.awaitService(),r=await(null!=i?o.getPage(i):o.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var i,o,r;let n=null!==(i="root"===t?void 0:t)&&void 0!==i?i:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(o=e.topics[0])&&void 0!==o?o:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async reload(){var t,e;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),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,o,r,n;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}}const Yl=kt`
|
|
1729
|
-
`;class
|
|
1707
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new $l(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Nl.elementDefinitions={"ft-ripple":jn,"ft-typography":_n,"ft-icon":rs},Nl.styles=Ol,Sl([k()],Nl.prototype,"value",void 0),Sl([L(".ft-text-field-suggestion")],Nl.prototype,"container",void 0),Sl([A()],Nl.prototype,"assignedNodes",void 0),W("ft-text-field")(wl),W("ft-text-field-suggestion")(Nl);class Cl{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 o,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(o=t.pageToc)&&void 0!==o?o:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:i,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,i){return t.flatMap((t=>{var o;let r=null===(o=t.prettyUrl)||void 0===o?void 0:o.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:i,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var i,o,r,n,a,s;const l={number:this.pages.length+1,title:null!==(i=t.title)&&void 0!==i?i:"",rootTocId:null!==(o=t.tocId)&&void 0!==o?o:"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?l.topics:l.hiddenTopics).push(t),f=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,f[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}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 El{convertPaginatedToc(t){return new Cl(t).build()}}var kl,Rl,Il,Ul,Ll,Al,_l,Tl,Wl,Dl,Fl,Pl,Ml,jl;!function(t){!function(e){var i={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}}))}function h(t){var e=new FileReader,i=f(e);return e.readAsArrayBuffer(t),i}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,i=f(e);return e.readAsText(t),i}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),i=new Array(e.length),o=0;o<e.length;o++)i[o]=String.fromCharCode(e[o]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var i=this.map[t];this.map[t]=i?i+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var i in this.map)this.map.hasOwnProperty(i)&&t.call(e,this.map[i],i,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,i){t.push(i)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,i){t.push([i,e])})),s(t)},i.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(t,e){var i,o,r=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(i=e.method||this.method||"GET",o=i.toUpperCase(),p.indexOf(o)>-1?o:i),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var i=t.split("="),o=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(r))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},u.call(y.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var v=[301,302,303,307,308];b.redirect=function(t,e){if(-1===v.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var i=Error(t);this.stack=i.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function m(t,o){return new Promise((function(r,n){var a=new y(t,o);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,i={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var i=t.split(":"),o=i.shift().trim();if(o){var r=i.join(":").trim();e.append(o,r)}})),e)};i.url="responseURL"in s?s.responseURL:i.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new b(o,i))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}m.polyfill=!0,t.fetch||(t.fetch=m,t.Headers=l,t.Request=y,t.Response=b),e.Headers=l,e.Request=y,e.Response=b,e.fetch=m,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(kl||(kl={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Rl||(Rl={})),function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"}(Il||(Il={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Ul||(Ul={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(Ll||(Ll={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Al||(Al={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(_l||(_l={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Tl||(Tl={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Wl||(Wl={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Dl||(Dl={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Fl||(Fl={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Pl||(Pl={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Ml||(Ml={})),function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(jl||(jl={}));const zl={[jl.PERSONAL_BOOK_SHARE_USER]:[jl.PERSONAL_BOOK_USER],[jl.HTML_EXPORT_USER]:[jl.PERSONAL_BOOK_USER],[jl.PDF_EXPORT_USER]:[jl.PERSONAL_BOOK_USER],[jl.KHUB_ADMIN]:[jl.CONTENT_PUBLISHER],[jl.ADMIN]:[jl.KHUB_ADMIN,jl.USERS_ADMIN,jl.PORTAL_ADMIN],[jl.DEVELOPER]:[jl.BETA_USER,jl.DEBUG_USER]};function Bl(t,e){return t===e||(zl[t]??[]).some((t=>Bl(t,e)))}function Kl(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>Bl(t,e)))}class Zl{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,i,o){this.converter=t,this.api=e,this.cache=i,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return Kl(null!==(e=null===(t=Hs.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getAttachments(){return this.cache.get("map-attachments",(()=>this.fetchAttachments()))}getAttachmentDownloadLink(t){return this.makeAbsolute(this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content)}getLink(t,e,i){const o=this.getNavigationData(t,e,i),r=this.getReaderLinkPrefix()+(o.prettyUrl?o.prettyUrl:`${o.mapId}/${o.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=o.page&&n.searchParams.set("page",`${o.page}`),o.prettyUrlDuplicated&&n.searchParams.set("tocId",o.tocId),null!=o.section&&n.searchParams.set("section",o.section),n.href}getNavigationData(t,e,i){var o,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(o=null==s?void 0:s.title)&&void 0!==o?o:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&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.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,i){return this.makeRateTopicRequest(t,e,i).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=Hs.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,i){return this.makeTopicFeedbackRequest(t,e,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),i=[{tocId:e.tocId,title:e.title}],o=this.getTocNodeNow(e.parentTocId);for(;o;)i.unshift({tocId:o.tocId,title:o.title}),o=this.getTocNodeNow(o.parentTocId);return i}isFeatureAccessible(t,{session:e,ratingType:i}){if(!this.isFeatureAvailable(t))return!1;switch(t){case tr.FEEDBACK:return Kl(null!=e?e:[],jl.FEEDBACK_USER);case tr.RATING:return Kl(null!=e?e:[],jl.RATING_USER)&&null!=i&&i!==Ul.NO_RATING;case tr.PRINT:return Kl(null!=e?e:[],jl.PRINT_USER);case tr.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case tr.COLLECTIONS:return Kl(null!=e?e:[],jl.COLLECTION_USER);case tr.PERSONAL_BOOKS:return Kl(null!=e?e:[],jl.PERSONAL_BOOK_USER);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}}class Hl extends Zl{static async build(t){return new Hl(new El,await Gs.await(),new o,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const e=await this.api.getMap(t);return this.fingerprint=e.fingerprint,e}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch((()=>[]))}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,i){return this.api.rateTopic(this.mapId,t,e,i)}makeTopicFeedbackRequest(t,e,i){return this.api.sendTopicFeedback(this.mapId,t,e,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class Gl{static build(t,e){return new Gl((t=>Go.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0}}))(t.trim()||"context"),null!=e?e:Hl.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.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return async function(t,e=5){let i=await t();for(;null==i;)await _(e),i=await t();return i}((()=>this.service))}async navigateToTopic(t,e,i){const o=await this.awaitService(),r=await(null!=i?o.getPage(i):o.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var i,o,r;let n=null!==(i="root"===t?void 0:t)&&void 0!==i?i:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(o=e.topics[0])&&void 0!==o?o:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let i=await e.getPage(t);this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async reload(){var t,e;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),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,o,r,n;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(i=this.service)||void 0===i?void 0:i.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(r=this.service)||void 0===r?void 0:r.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(n=this.service)||void 0===n?void 0:n.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))])}catch(t){!this.errorHandler||t instanceof e||this.errorHandler(t)}}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}}const Vl=kt`
|
|
1708
|
+
`;class ql extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class Yl extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Xl extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class Jl extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class Ql extends Event{constructor(){super("ft-reader-map-not-found")}}class tc extends Event{constructor(){super("ft-reader-map-unauthorized")}}var ec=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class ic extends ri{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new r(5),this.navigationDebouncer=new r(10),this.addStore(Hs)}render(){return fe`
|
|
1730
1709
|
${this.importStyleIfNeeded()}
|
|
1731
1710
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
1732
1711
|
`}importStyleIfNeeded(){var t,e;const i=null===(t=this.stateManager.service)||void 0===t?void 0:t.themeStylesheet();return!i||window.location.href.startsWith(null!==(e=this.baseUrl)&&void 0!==e?e:"")?de:fe`
|
|
1733
1712
|
<style>
|
|
1734
1713
|
@import "${i}"
|
|
1735
1714
|
</style>
|
|
1736
|
-
`}get stateManager(){return null==this._stateManager&&(this._stateManager=
|
|
1715
|
+
`}get stateManager(){return null==this._stateManager&&(this._stateManager=Gl.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const 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)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&this.stateManager.setMapId(this.mapId),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["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 ql(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 Xl(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=>{var e;return{tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:null===(e=this.stateManager.service)||void 0===e?void 0:e.buildBreadcrumb(t.tocId)}}));this.dispatchEvent(new Yl(this.map,e))}))}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 Ql):401===e.status?this.dispatchEvent(new tc):this.dispatchEvent(new Jl(t))}reloadBookmarks(){nl.reloadBookmarks()}}var oc;ic.styles=Vl,ec([qe({store:Hs.name})],ic.prototype,"baseUrl",void 0),ec([k()],ic.prototype,"mapId",void 0),ec([k()],ic.prototype,"tocId",void 0),ec([k()],ic.prototype,"section",void 0),ec([k()],ic.prototype,"searchInDocumentQuery",void 0),ec([k({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:oc}})],ic.prototype,"page",void 0),ec([qe({store:"reader"})],ic.prototype,"map",void 0),ec([qe({store:"reader"})],ic.prototype,"toc",void 0),ec([qe({store:"reader"})],ic.prototype,"visibleTopics",void 0),ec([qe({store:"reader"})],ic.prototype,"currentPage",void 0),ec([qe({store:"reader"})],ic.prototype,"scrollTarget",void 0),ec([k({attribute:!1})],ic.prototype,"readerServiceProvider",void 0),W("ft-reader-context")(ic);var rc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class nc extends(cl(rr)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(gl,bl)}get canAccessFeedback(){var t;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(tr.FEEDBACK,{session:this.session})}get canAccessRating(){var t,e;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(tr.RATING,{session:this.session,ratingType:null===(e=this.ratingSummary)||void 0===e?void 0:e.type})}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,e;const i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.date;return"string"==typeof i?((o=i).match(/^\d{4}-\d{2}-\d{2}$/)&&(o=o.replace(/-/g,"/")),o=o.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,((t,e,i,o)=>e+i+":"+o)),new Date(o)):i;var o}render(){return this.canAccessFeedback||this.canAccessRating?fe`
|
|
1737
1716
|
<div class="ft-reader-feedback">
|
|
1738
1717
|
${this.hideTitle?de:fe`
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1718
|
+
<ft-typography variant="title" part="main-title">
|
|
1719
|
+
${this.i18n(this.i18nProperties.feedbackMainTitle)}
|
|
1720
|
+
</ft-typography>
|
|
1721
|
+
`}
|
|
1743
1722
|
${this.renderRatingSection()}
|
|
1744
1723
|
${this.renderFeedbackSection()}
|
|
1745
1724
|
</div>
|
|
@@ -1753,18 +1732,18 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1753
1732
|
${this.renderRatingDate()}
|
|
1754
1733
|
</ft-typography>
|
|
1755
1734
|
</div>
|
|
1756
|
-
`:
|
|
1735
|
+
`:de}renderRatingDate(){const t=this.ratingDate;if(null==t)return gl.messages.notRated();if(t.getTime()>(new Date).getTime()-6e4)return gl.messages.ratedNow();return(new Date).toLocaleDateString()===t.toLocaleDateString()?gl.messages.ratedToday():gl.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case"STARS":return fe`
|
|
1757
1736
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1758
|
-
${
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1737
|
+
${Ts(new Array(5),((t,e)=>e),((t,e)=>{let i="STARS"===this.ratingType&&this.ratingValue>e;const o=e+1;return fe`
|
|
1738
|
+
<ft-button round part="rating-stars-${o}"
|
|
1739
|
+
label="${gl.messages.starsRating(o)}"
|
|
1740
|
+
tooltipPosition="top"
|
|
1741
|
+
.iconVariant=${this.iconVariant}
|
|
1742
|
+
icon="${i?this.filledStarIcon:this.emptyStarIcon}"
|
|
1743
|
+
class="ft-reader-feedback--${i?"active":"inactive"}"
|
|
1744
|
+
@click=${()=>this.rate(this.ratingValue===o?void 0:o)}
|
|
1745
|
+
></ft-button>
|
|
1746
|
+
`}))}
|
|
1768
1747
|
</div>
|
|
1769
1748
|
`;case"LIKE":const t="LIKE"===this.ratingType&&0===this.ratingValue,e="LIKE"===this.ratingType&&1===this.ratingValue;return fe`
|
|
1770
1749
|
<ft-switch unselectable
|
|
@@ -1774,13 +1753,13 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1774
1753
|
?selected=${e}
|
|
1775
1754
|
.iconVariant=${this.iconVariant}
|
|
1776
1755
|
icon="${e?this.filledLikeIcon:this.emptyLikeIcon}">
|
|
1777
|
-
${
|
|
1756
|
+
${gl.messages.like()}
|
|
1778
1757
|
</ft-switch-option>
|
|
1779
1758
|
<ft-switch-option .value=${0}
|
|
1780
1759
|
?selected=${t}
|
|
1781
1760
|
.iconVariant=${this.iconVariant}
|
|
1782
1761
|
icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}">
|
|
1783
|
-
${
|
|
1762
|
+
${gl.messages.dislike()}
|
|
1784
1763
|
</ft-switch-option>
|
|
1785
1764
|
</ft-switch>
|
|
1786
1765
|
`;case"DICHOTOMOUS":const i="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,o="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return fe`
|
|
@@ -1789,11 +1768,11 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1789
1768
|
part="rating rating-dichotomous">
|
|
1790
1769
|
<ft-switch-option .value=${1}
|
|
1791
1770
|
?selected=${o}>
|
|
1792
|
-
${
|
|
1771
|
+
${gl.messages.dichotomousYes()}
|
|
1793
1772
|
</ft-switch-option>
|
|
1794
1773
|
<ft-switch-option .value=${0}
|
|
1795
1774
|
?selected=${i}>
|
|
1796
|
-
${
|
|
1775
|
+
${gl.messages.dichotomousNo()}
|
|
1797
1776
|
</ft-switch-option>
|
|
1798
1777
|
</ft-switch>
|
|
1799
1778
|
`}return de}rate(t){(null!=t?t:-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,e,i;if(this.canAccessFeedback){const o=this.feedbackMailLinkBuilder(this.feedbackMessage);let r=fe`
|
|
@@ -1802,7 +1781,7 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1802
1781
|
class="ft-reader-feedback--send-feedback"
|
|
1803
1782
|
?disabled=${!this.feedbackMessage||!this.validFromEmail()}
|
|
1804
1783
|
part="send-feedback">
|
|
1805
|
-
${
|
|
1784
|
+
${gl.messages.okButton()}
|
|
1806
1785
|
</ft-button>
|
|
1807
1786
|
`;return o&&(r=fe`
|
|
1808
1787
|
<a class="ft-reader-feedback--feedback-link" href="${o}">
|
|
@@ -1817,28 +1796,20 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1817
1796
|
${null==(null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)&&(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers)?fe`
|
|
1818
1797
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1819
1798
|
class="ft-reader-feedback--from-input"
|
|
1820
|
-
label=${
|
|
1799
|
+
label=${gl.messages.feedbackfromEmail()}
|
|
1821
1800
|
@change=${t=>this.from=t.detail.trim()}
|
|
1822
1801
|
?error=${this.from&&!this.validFromEmail()}
|
|
1823
|
-
helper=${this.from&&!this.validFromEmail()?
|
|
1802
|
+
helper=${this.from&&!this.validFromEmail()?gl.messages.feedbackfromEmailInvalid():""}
|
|
1824
1803
|
/>
|
|
1825
1804
|
`:de}
|
|
1826
1805
|
<ft-text-area outlined
|
|
1827
1806
|
class="ft-reader-feedback--feedback-input" part="feedback-input"
|
|
1828
|
-
label="${
|
|
1807
|
+
label="${gl.messages.feedbackInputLabel()}"
|
|
1829
1808
|
@live-change=${t=>this.feedbackMessage=t.detail.trim()}
|
|
1830
1809
|
></ft-text-area>
|
|
1831
1810
|
${r}
|
|
1832
1811
|
</form>
|
|
1833
|
-
`}return
|
|
1834
|
-
<div class="ft-reader-feedback--placeholder">
|
|
1835
|
-
<ft-typography variant="caption">${t}</ft-typography>
|
|
1836
|
-
<ft-tooltip position="left"
|
|
1837
|
-
text="${Tl.messages.inDesignerOnlyNotice()}">
|
|
1838
|
-
<ft-icon>INFO</ft-icon>
|
|
1839
|
-
</ft-tooltip>
|
|
1840
|
-
</div>
|
|
1841
|
-
`:de}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}sc.elementDefinitions={"ft-button":ol,"ft-typography":Xn,"ft-icon":la,"ft-tooltip":vs,"ft-switch":Is,"ft-switch-option":Es,"ft-text-area":Ks,"ft-text-field":Ml},sc.styles=Cn,ac([E({type:Boolean})],sc.prototype,"editorMode",void 0),ac([E({type:Boolean})],sc.prototype,"hideTitle",void 0),ac([E({type:Boolean})],sc.prototype,"ratingAllowed",void 0),ac([E({attribute:!1})],sc.prototype,"i18nProperties",void 0),ac([E({attribute:!1})],sc.prototype,"ratingSummary",void 0),ac([E({attribute:!1})],sc.prototype,"session",void 0),ac([U(".ft-reader-feedback--feedback-input")],sc.prototype,"feedbackInput",void 0),ac([k()],sc.prototype,"from",void 0),ac([k()],sc.prototype,"feedbackMessage",void 0),ac([E()],sc.prototype,"iconVariant",void 0),ac([E()],sc.prototype,"emptyStarIcon",void 0),ac([E()],sc.prototype,"filledStarIcon",void 0),ac([E()],sc.prototype,"emptyLikeIcon",void 0),ac([E()],sc.prototype,"filledLikeIcon",void 0),ac([E()],sc.prototype,"emptyDislikeIcon",void 0),ac([E()],sc.prototype,"filledDislikeIcon",void 0),ac([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],sc.prototype,"configuration",void 0),ac([E()],sc.prototype,"feedbackMailLinkBuilder",void 0);const lc=Ul.fromGwt("server");class cc{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,r){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=r,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${lc.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${r}&body=${n}`}}var fc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class hc extends(Cl(rr)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=aa.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new cc,this.i18nProperties={feedbackMainTitle:Al.properties.mapFeedbackMainTitle(),ratingSectionTitle:Al.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:Al.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:Al.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new A(100),this.sendRatingDebouncer=new A(500),this.addStore(cl)}render(){return this.map&&(this.editorMode||this.componentVisible)?fe`
|
|
1812
|
+
`}return de}onFormSubmitEvent(t,e){t.preventDefault(),e?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,e,i;return!(null==(null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)&&(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))||/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new CustomEvent("send-feedback",{detail:{message:this.feedbackInput.value,...(null===(t=this.configuration)||void 0===t?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}nc.elementDefinitions={"ft-button":Ms,"ft-typography":_n,"ft-switch":us,"ft-switch-option":fs,"ft-text-area":Es,"ft-text-field":wl},nc.styles=Cn,rc([k({type:Boolean})],nc.prototype,"editorMode",void 0),rc([k({type:Boolean})],nc.prototype,"hideTitle",void 0),rc([k({type:Boolean})],nc.prototype,"ratingAllowed",void 0),rc([k({attribute:!1})],nc.prototype,"i18nProperties",void 0),rc([k({attribute:!1})],nc.prototype,"ratingSummary",void 0),rc([k({attribute:!1})],nc.prototype,"session",void 0),rc([L(".ft-reader-feedback--feedback-input")],nc.prototype,"feedbackInput",void 0),rc([R()],nc.prototype,"from",void 0),rc([R()],nc.prototype,"feedbackMessage",void 0),rc([k()],nc.prototype,"iconVariant",void 0),rc([k()],nc.prototype,"emptyStarIcon",void 0),rc([k()],nc.prototype,"filledStarIcon",void 0),rc([k()],nc.prototype,"emptyLikeIcon",void 0),rc([k()],nc.prototype,"filledLikeIcon",void 0),rc([k()],nc.prototype,"emptyDislikeIcon",void 0),rc([k()],nc.prototype,"filledDislikeIcon",void 0),rc([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],nc.prototype,"configuration",void 0),rc([k()],nc.prototype,"feedbackMailLinkBuilder",void 0);const ac=pl.fromGwt("server");class sc{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,r){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=r,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${ac.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${r}&body=${n}`}}const lc=pl.build("inDesignerFeedbackComponent"),cc={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var fc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class hc extends(cl(rr)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=is.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new sc,this.i18nProperties={feedbackMainTitle:gl.properties.mapFeedbackMainTitle(),ratingSectionTitle:gl.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:gl.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:gl.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new r(100),this.sendRatingDebouncer=new r(500),this.addStore(Hs)}render(){return fe`
|
|
1842
1813
|
<ft-reader-feedback
|
|
1843
1814
|
ratingAllowed
|
|
1844
1815
|
.i18nProperties=${this.i18nProperties}
|
|
@@ -1858,16 +1829,10 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1858
1829
|
@send-feedback=${this.sendFeedback}
|
|
1859
1830
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1860
1831
|
></ft-reader-feedback>
|
|
1861
|
-
|
|
1862
|
-
<style>
|
|
1863
|
-
:host {
|
|
1864
|
-
display: none !important;
|
|
1865
|
-
}
|
|
1866
|
-
</style>
|
|
1867
|
-
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(tr.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(tr.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.map&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new Te({type:"error",message:Al.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Te({type:"info",message:Tl.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new Te({type:"info",message:Tl.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new Te({type:"info",message:Al.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Te({type:"error",message:Al.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}hc.elementDefinitions={"ft-reader-feedback":sc},fc([qe({store:cl.name})],hc.prototype,"session",void 0),fc([qe({store:"reader"})],hc.prototype,"map",void 0),fc([qe({store:cl.name})],hc.prototype,"editorMode",void 0),fc([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],hc.prototype,"configuration",void 0),fc([k()],hc.prototype,"ratingSummary",void 0),fc([E({type:Boolean})],hc.prototype,"hideTitle",void 0),fc([E()],hc.prototype,"iconVariant",void 0),fc([E()],hc.prototype,"emptyStarIcon",void 0),fc([E()],hc.prototype,"filledStarIcon",void 0),fc([E()],hc.prototype,"emptyLikeIcon",void 0),fc([E()],hc.prototype,"filledLikeIcon",void 0),fc([E()],hc.prototype,"emptyDislikeIcon",void 0),fc([E()],hc.prototype,"filledDislikeIcon",void 0),fc([U("ft-reader-feedback")],hc.prototype,"readerFeedback",void 0),fc([Ll(lc.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],hc.prototype,"mailSubject",void 0);var dc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class uc extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const pc=Symbol("registerInterval");class yc extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[pc]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[pc]):this.dispatchEvent(new uc)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=pc,dc([k()],i.prototype,"tocNode",void 0),dc([k()],i.prototype,"disableContextInteractions",void 0),i}(rr)){}var gc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class bc extends(Cl(yc)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=aa.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new cc,this.i18nProperties={feedbackMainTitle:Al.properties.topicFeedbackMainTitle(),ratingSectionTitle:Al.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:Al.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:Al.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new A(100),this.sendRatingDebouncer=new A(500),this.addStore(cl)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?fe`
|
|
1832
|
+
`}update(t){var e,i,o,r;super.update(t),t.has("map")&&this.map&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(lc,cc),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.map&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new Te({type:"error",message:gl.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Te({type:"info",message:lc.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new Te({type:"info",message:lc.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new Te({type:"info",message:gl.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Te({type:"error",message:gl.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}hc.elementDefinitions={"ft-reader-feedback":nc},fc([qe({store:Hs.name})],hc.prototype,"session",void 0),fc([qe({store:"reader"})],hc.prototype,"map",void 0),fc([qe({store:Hs.name})],hc.prototype,"editorMode",void 0),fc([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],hc.prototype,"configuration",void 0),fc([R()],hc.prototype,"ratingSummary",void 0),fc([k({type:Boolean})],hc.prototype,"hideTitle",void 0),fc([k()],hc.prototype,"iconVariant",void 0),fc([k()],hc.prototype,"emptyStarIcon",void 0),fc([k()],hc.prototype,"filledStarIcon",void 0),fc([k()],hc.prototype,"emptyLikeIcon",void 0),fc([k()],hc.prototype,"filledLikeIcon",void 0),fc([k()],hc.prototype,"emptyDislikeIcon",void 0),fc([k()],hc.prototype,"filledDislikeIcon",void 0),fc([L("ft-reader-feedback")],hc.prototype,"readerFeedback",void 0),fc([yl(ac.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],hc.prototype,"mailSubject",void 0);var dc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class uc extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const pc=Symbol("registerInterval");class yc extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[pc]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[pc]):this.dispatchEvent(new uc)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=pc,dc([R()],i.prototype,"tocNode",void 0),dc([R()],i.prototype,"disableContextInteractions",void 0),i}(rr)){}var gc=function(t,e,i,o){for(var r,n=arguments.length,a=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,i,a):r(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class bc extends(cl(yc)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=is.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new sc,this.i18nProperties={feedbackMainTitle:gl.properties.topicFeedbackMainTitle(),ratingSectionTitle:gl.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:gl.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:gl.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new r(100),this.sendRatingDebouncer=new r(500),this.addStore(Hs)}render(){var t;return fe`
|
|
1868
1833
|
<ft-reader-feedback
|
|
1869
1834
|
.i18nProperties=${this.i18nProperties}
|
|
1870
|
-
?ratingAllowed=${this.tocNode.hasRating}
|
|
1835
|
+
?ratingAllowed=${null===(t=this.tocNode)||void 0===t?void 0:t.hasRating}
|
|
1871
1836
|
.editorMode=${this.editorMode}
|
|
1872
1837
|
?hideTitle=${this.hideTitle}
|
|
1873
1838
|
.ratingSummary=${this.ratingSummary}
|
|
@@ -1884,10 +1849,4 @@ const{D:Zs}=xt,Hs=()=>document.createComment(""),Gs=(t,e,i)=>{const o=t._$AA.par
|
|
|
1884
1849
|
@send-feedback=${this.sendFeedback}
|
|
1885
1850
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1886
1851
|
></ft-reader-feedback>
|
|
1887
|
-
|
|
1888
|
-
<style>
|
|
1889
|
-
:host {
|
|
1890
|
-
display: none !important;
|
|
1891
|
-
}
|
|
1892
|
-
</style>
|
|
1893
|
-
`}get componentVisible(){var t,e,i;return(null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(tr.FEEDBACK,{session:this.session}))||(null===(e=this.service)||void 0===e?void 0:e.isFeatureAccessible(tr.RATING,{session:this.session,ratingType:null===(i=this.ratingSummary)||void 0===i?void 0:i.type}))}update(t){var e,i,o,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.tocNode&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new Te({type:"error",message:Al.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Te({type:"info",message:Tl.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Te({type:"info",message:Al.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Te({type:"info",message:Tl.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Te({type:"error",message:Al.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}bc.elementDefinitions={"ft-reader-feedback":sc},gc([qe({store:cl.name})],bc.prototype,"session",void 0),gc([qe({store:"reader"})],bc.prototype,"map",void 0),gc([qe({store:cl.name})],bc.prototype,"editorMode",void 0),gc([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],bc.prototype,"configuration",void 0),gc([k()],bc.prototype,"ratingSummary",void 0),gc([E({type:Boolean})],bc.prototype,"hideTitle",void 0),gc([E()],bc.prototype,"iconVariant",void 0),gc([E()],bc.prototype,"emptyStarIcon",void 0),gc([E()],bc.prototype,"filledStarIcon",void 0),gc([E()],bc.prototype,"emptyLikeIcon",void 0),gc([E()],bc.prototype,"filledLikeIcon",void 0),gc([E()],bc.prototype,"emptyDislikeIcon",void 0),gc([E()],bc.prototype,"filledDislikeIcon",void 0),gc([U("ft-reader-feedback")],bc.prototype,"readerFeedback",void 0),gc([Ll(lc.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],bc.prototype,"mailSubject",void 0),W("ft-reader-map-feedback")(hc),W("ft-reader-topic-feedback")(bc),t.FtReaderFeedbackCssVariables=Nn,t.FtReaderMapFeedback=hc,t.FtReaderTopicFeedback=bc,t.styles=Cn}({});
|
|
1852
|
+
`}update(t){var e,i,o,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(lc,cc),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(r=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e,i;this.tocNode&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(i=this.service)||void 0===i?void 0:i.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(o=this.ratingSummary)||void 0===o?void 0:o.type,t))}catch{this.dispatchEvent(new Te({type:"error",message:gl.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Te({type:"info",message:lc.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Te({type:"info",message:gl.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Te({type:"info",message:lc.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Te({type:"error",message:gl.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}bc.elementDefinitions={"ft-reader-feedback":nc},gc([qe({store:Hs.name})],bc.prototype,"session",void 0),gc([qe({store:"reader"})],bc.prototype,"map",void 0),gc([qe({store:Hs.name})],bc.prototype,"editorMode",void 0),gc([qe({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],bc.prototype,"configuration",void 0),gc([R()],bc.prototype,"ratingSummary",void 0),gc([k({type:Boolean})],bc.prototype,"hideTitle",void 0),gc([k()],bc.prototype,"iconVariant",void 0),gc([k()],bc.prototype,"emptyStarIcon",void 0),gc([k()],bc.prototype,"filledStarIcon",void 0),gc([k()],bc.prototype,"emptyLikeIcon",void 0),gc([k()],bc.prototype,"filledLikeIcon",void 0),gc([k()],bc.prototype,"emptyDislikeIcon",void 0),gc([k()],bc.prototype,"filledDislikeIcon",void 0),gc([L("ft-reader-feedback")],bc.prototype,"readerFeedback",void 0),gc([yl(ac.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],bc.prototype,"mailSubject",void 0),W("ft-reader-map-feedback")(hc),W("ft-reader-topic-feedback")(bc),t.FtReaderFeedbackCssVariables=Nn,t.FtReaderMapFeedback=hc,t.FtReaderTopicFeedback=bc,t.styles=Cn}({});
|