@fluid-topics/ft-reader-content 0.3.19 → 0.3.21
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-content.light.js +79 -273
- package/build/ft-reader-content.min.js +97 -297
- package/package.json +6 -6
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,s=window.customElements,o=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){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(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=o.prototype.attributeChangedCallback,a=new Set(o.observedAttributes||[]);u(o,a,l);const c={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,c),this._definitionsByClass.set(o,c);let h=i.call(s,t);h||(h=d(t),e.call(s,t,h)),this===window.customElements&&(n.set(o,c),c.standInClass=h);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)r.delete(t),f(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){x.push(this),s.upgrade.apply(s,arguments),x.pop()}get(t){return this._definitionsByTag.get(t)?.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 s=this._awaitingUpgrade.get(e);s||this._awaitingUpgrade.set(e,s=new Set),i?s.add(t):s.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.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),o.set(e,i),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let e=t.getRootNode();if(!c(e)){const t=x[x.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},d=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const s=h(i)||window.customElements,o=s._getDefinition(e);return o?f(i,o):r.set(i,s),i}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,e,i)=>{if(0===e.size||void 0===i)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);s.call(this,r,o),i.call(this,r,t,o)}else s.call(this,r,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s),i.call(this,s,t,null)}else o.call(this,s)})},p=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):p(i)},f=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),o.set(t,e),a=t;try{new e.elementClass}catch(t){p(e.elementClass),new e.elementClass}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)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let x=[document];const m=(t,e,i)=>{const s=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){x.push(this);const t=s.apply(i||this,arguments);return void 0!==t&&l.set(t,this),x.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){x.push(this),i.set.call(this,t),x.pop()}})};if(b(Element,"innerHTML"),b(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 s=e.call(this,...i);return t.set(s,this),s},i.forEach((e=>{const i=window.ElementInternals.prototype,s=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==o.get(i).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...e)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const s=t.getAttribute("name"),o=e.get(s)||[];this[+i]=t,o.push(t),e.set(s,o)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new s(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=o.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Wt){const t=window.customElements.define;window.customElements.define=(e,i,s)=>{try{t.bind(window.customElements)(e,i,s)}catch(t){console.info(e,i,s,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const i=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function
|
|
22
|
+
*/const i=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function s(t){return(e,s)=>void 0!==s?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,s):i(t,e)
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/}function
|
|
27
|
+
*/}function o(t){return s({...t,state:!0})}
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2017 Google LLC
|
|
@@ -35,44 +35,44 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
37
|
*/
|
|
38
|
-
function
|
|
38
|
+
function r(t,e){return(({finisher:t,descriptor:e})=>(i,s)=>{var o;if(void 0===s){const s=null!==(o=i.originalKey)&&void 0!==o?o:i.key,r=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(r.finisher=function(e){t(e,s)}),r}{const o=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(o,s)}})({descriptor:i=>{const s={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i,s;return void 0===this[e]&&(this[e]=null!==(s=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==s?s:null),this[e]}}return s}})}
|
|
39
39
|
/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2021 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/var
|
|
43
|
+
*/var n;null===(n=window.HTMLSlotElement)||void 0===n||n.prototype.assignedElements;const l=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function a(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,s,o;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(s=i;0!=s--;)if(!a(t[s],e[s]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[0]))return!1;for(s of t.entries())if(!a(s[1],e.get(s[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(s of t.entries())if(!e.has(s[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=(o=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(s=i;0!=s--;)if(!Object.prototype.hasOwnProperty.call(e,o[s]))return!1;for(s=i;0!=s--;){var r=o[s];if(!a(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2019 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/const c=window.ShadowRoot&&(void 0===
|
|
48
|
+
*/const c=window,h=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),u=new WeakMap;class p{constructor(t,e,i){if(this._$cssResult$=!0,i!==d)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(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const f=t=>new p("string"==typeof t?t:t+"",void 0,d),v=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new p(i,t,d)},x=(t,e)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=c.litNonce;void 0!==s&&i.setAttribute("nonce",s),i.textContent=e.cssText,t.appendChild(i)}))},m=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(t):t
|
|
49
49
|
/**
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/;var
|
|
53
|
+
*/;var b;const g=window,y=g.trustedTypes,w=y?y.emptyScript:"",O=g.reactiveElementPolyfillSupport,$={toAttribute(t,e){switch(e){case Boolean:t=t?w: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)=>e!==t&&(e==e||t==t),N={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:S};class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),t}static createProperty(t,e=N){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||N}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}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(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return x(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=N){var s;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:$).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:$;this._$El=o,this[o]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||S)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2017 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
58
|
*/
|
|
59
|
-
var
|
|
59
|
+
var E;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==O||O({ReactiveElement:C}),(null!==(b=g.reactiveElementVersions)&&void 0!==b?b:g.reactiveElementVersions=[]).push("1.4.1");const R=window,M=R.trustedTypes,k=M?M.createPolicy("lit-html",{createHTML:t=>t}):void 0,j=`lit$${(Math.random()+"").slice(9)}$`,U="?"+j,A=`<${U}>`,F=document,T=(t="")=>F.createComment(t),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,P=t=>I(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,W=/>/g,D=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),z=/'/g,H=/"/g,K=/^(?:script|style|textarea|title)$/i,V=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Z=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),q=new WeakMap,X=F.createTreeWalker(F,129,null,!1),G=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":"",n=B;for(let e=0;e<i;e++){const i=t[e];let l,a,c=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===B?"!--"===a[1]?n=_:void 0!==a[1]?n=W:void 0!==a[2]?(K.test(a[2])&&(o=RegExp("</"+a[2],"g")),n=D):void 0!==a[3]&&(n=D):n===D?">"===a[0]?(n=null!=o?o:B,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?D:'"'===a[3]?H:z):n===H||n===z?n=D:n===_||n===W?n=B:(n=D,o=void 0);const d=n===D&&t[e+1].startsWith("/>")?" ":"";r+=n===B?i+A:c>=0?(s.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+j+d):i+j+(-2===c?(s.push(void 0),e):d)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==k?k.createHTML(l):l,s]};class Q{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,l=this.parts,[a,c]=G(t,e);if(this.el=Q.createElement(a,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=X.nextNode())&&l.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(j)){const i=c[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(j),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?st:"?"===e[1]?rt:"@"===e[1]?nt:it})}else l.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(K.test(s.tagName)){const t=s.textContent.split(j),e=t.length-1;if(e>0){s.textContent=M?M.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],T()),X.nextNode(),l.push({type:2,index:++o});s.append(t[e],T())}}}else if(8===s.nodeType)if(s.data===U)l.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(j,t+1));)l.push({type:7,index:o}),t+=j.length-1}o++}}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,s){var o,r,n,l;if(e===Z)return e;let a=void 0!==s?null===(o=i._$Co)||void 0===o?void 0:o[s]:i._$Cl;const c=L(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==c&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===c?a=void 0:(a=new c(t),a._$AT(t,i,s)),void 0!==s?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=Y(t,a._$AS(t,e.values),a,s)),e}class tt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(i,!0);X.currentNode=o;let r=X.nextNode(),n=0,l=0,a=s[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new et(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new lt(r,this,t)),this.u.push(e),a=s[++l]}n!==(null==a?void 0:a.index)&&(r=X.nextNode(),n++)}return o}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,s){var o;this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cm=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),L(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==Z&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):P(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==J&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(F.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Q.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new tt(o,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Q(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new et(this.O(T()),this.O(T()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,s,o){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=J}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=Y(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==Z,r&&(this._$AH=t);else{const s=t;let n,l;for(t=o[0],n=0;n<o.length-1;n++)l=Y(this,s[i+n],e,n),l===Z&&(l=this._$AH[n]),r||(r=!L(l)||l!==this._$AH[n]),l===J?t=J:t!==J&&(t+=(null!=l?l:"")+o[n+1]),this._$AH[n]=l}r&&!s&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class st extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}const ot=M?M.emptyScript:"";class rt extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==J?this.element.setAttribute(this.name,ot):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Y(this,t,e,0))&&void 0!==i?i:J)===Z)return;const s=this._$AH,o=t===J&&s!==J||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==J&&(s===J||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class lt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const at={P:"$lit$",A:j,M:U,C:1,L:G,R:tt,D:P,V:Y,I:et,H:it,N:rt,U:nt,B:st,F:lt},ct=R.litHtmlPolyfillSupport;null==ct||ct(Q,et),(null!==(E=R.litHtmlVersions)&&void 0!==E?E:R.litHtmlVersions=[]).push("2.4.0");
|
|
60
60
|
/**
|
|
61
61
|
* @license
|
|
62
62
|
* Copyright 2017 Google LLC
|
|
63
63
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var ht,dt;class ut extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,o;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=r._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=n=new et(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Z}}ut.finalized=!0,ut._$litElement$=!0,null===(ht=globalThis.litElementHydrateSupport)||void 0===ht||ht.call(globalThis,{LitElement:ut});const pt=globalThis.litElementPolyfillSupport;null==pt||pt({LitElement:ut}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.2.2");class ft{static create(t,e,i){let s=t=>f(null!=t?t:i),o=v`var(${f(t)}, ${s(i)})`;return o.name=t,o.category=e,o.defaultValue=i,o.defaultCssValue=s,o.get=e=>v`var(${f(t)}, ${s(e)})`,o.breadcrumb=()=>[],o.lastResortDefaultValue=()=>i,o}static extend(t,e,i){let s=t=>e.get(null!=t?t:i),o=v`var(${f(t)}, ${s(i)})`;return o.name=t,o.category=e.category,o.fallbackVariable=e,o.defaultValue=i,o.defaultCssValue=s,o.get=e=>v`var(${f(t)}, ${s(e)})`,o.breadcrumb=()=>[e.name,...e.breadcrumb()],o.lastResortDefaultValue=()=>i,o}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):f(null!=e?e:t.defaultValue),s=v`var(${f(t.name)}, ${i(t.defaultValue)})`;return s.name=t.name,s.category=t.category,s.fallbackVariable=t.fallbackVariable,s.defaultValue=t.defaultValue,s.context=e,s.defaultCssValue=i,s.get=e=>v`var(${f(t.name)}, ${i(e)})`,s.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],s.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},s}}const vt={colorPrimary:ft.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:ft.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:ft.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:ft.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:ft.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:ft.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:ft.create("--ft-color-error","COLOR","#B00020"),colorOutline:ft.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:ft.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:ft.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:ft.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:ft.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:ft.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:ft.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:ft.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:ft.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:ft.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:ft.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:ft.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:ft.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:ft.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:ft.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:ft.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:ft.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:ft.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:ft.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:ft.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:ft.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:ft.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:ft.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:ft.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:ft.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:ft.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:ft.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:ft.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:ft.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:ft.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:ft.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:ft.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:ft.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:ft.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:ft.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:ft.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:ft.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:ft.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:ft.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:ft.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:ft.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:ft.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:ft.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:ft.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:ft.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:ft.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:ft.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:ft.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:ft.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:ft.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:ft.create("--ft-border-radius-XL","SIZE","16px"),titleFont:ft.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:ft.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:ft.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:ft.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
66
66
|
/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/var
|
|
71
|
-
${t.map((t=>
|
|
70
|
+
*/var xt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class mt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:s}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...s,customElements:t.registry});return x(o,this.constructor.elementStyles),o}}}(ut)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),V`
|
|
71
|
+
${t.map((t=>V`
|
|
72
72
|
<style>${t}</style>
|
|
73
73
|
`))}
|
|
74
74
|
${this.getTemplate()}
|
|
75
|
-
`}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,o,n
|
|
75
|
+
`}updated(t){super.updated(t),setTimeout((()=>{var e;this.contentAvailableCallback(t),(null===(e=this.exportpartsPrefix)||void 0===e?void 0:e.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}),0)}setExportpartsAttribute(t){var e,i,s,o,r,n;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(o=null===(s=t.getAttribute("part"))||void 0===s?void 0:s.split(" "))&&void 0!==o?o:[],i=null!==(n=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const h=[...c.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}contentAvailableCallback(t){}}xt([s()],mt.prototype,"exportpartsPrefix",void 0),xt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return s({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],mt.prototype,"exportpartsPrefixes",void 0),v`
|
|
76
76
|
.ft-no-text-select {
|
|
77
77
|
-webkit-touch-callout: none;
|
|
78
78
|
-webkit-user-select: none;
|
|
@@ -81,7 +81,7 @@ var at,lt;null==rt||rt(q,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k
|
|
|
81
81
|
-ms-user-select: none;
|
|
82
82
|
user-select: none;
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,v`
|
|
85
85
|
.ft-word-wrap {
|
|
86
86
|
white-space: normal;
|
|
87
87
|
word-wrap: break-word;
|
|
@@ -93,30 +93,69 @@ var at,lt;null==rt||rt(q,G),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k
|
|
|
93
93
|
-webkit-hyphens: auto;
|
|
94
94
|
hyphens: auto
|
|
95
95
|
}
|
|
96
|
-
`;const
|
|
96
|
+
`;const bt=(t,e)=>(i,s)=>{i.constructor.createProperty(s,{attribute:!1,hasChanged:null!=e?e:(t,e)=>!a(t,e)});const o=i;o.reduxProperties=o.reduxProperties||new Map,o.reduxProperties.set(s,null!=t?t:t=>t[s])};class gt extends mt{get store(){return this.internalStore}set store(t){this.internalStore=t,this.store&&this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,i)=>{this[i]=e(t,this)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()})),this.onStoreAvailable(),this.requestUpdate()}onStoreAvailable(){}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}}var yt,wt,Ot;const $t=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Ot=null===(wt=null===(yt=window.safari)||void 0===yt?void 0:yt.pushNotification)||void 0===wt?void 0:wt.toString())&&void 0!==Ot?Ot:"");var St=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Nt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Ct extends gt{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new Nt)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}St([o()],Ct.prototype,"stateManager",void 0);const Et=v` `,Rt=ft.create("--ft-reader-topic-context-text-color","COLOR","#000000"),Mt=ft.external(vt.colorSurface,"Design system"),kt=v`
|
|
97
|
+
.ft-reader-topic-context {
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
color: ${Rt};
|
|
100
|
+
background-color: ${Mt};
|
|
101
|
+
}
|
|
102
|
+
`;var jt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ut extends Ct{constructor(){super(...arguments),this.registeredComponents=[]}render(){return V`
|
|
103
|
+
<article id=${this.tocId}>
|
|
104
|
+
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
105
|
+
</article>
|
|
106
|
+
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}Ut.styles=kt,jt([s()],Ut.prototype,"tocId",void 0),jt([o()],Ut.prototype,"tocNode",void 0),l("ft-reader-topic-context")(Ut);const At=ft.external(vt.titleFont,"Design system"),Ft=v`
|
|
107
|
+
.title {
|
|
108
|
+
font-family: ${At};
|
|
109
|
+
}
|
|
110
|
+
`;var Tt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Lt extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}class It extends Ct{connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new Lt)),10)}disconnectedCallback(){super.disconnectedCallback()}}Tt([o()],It.prototype,"tocId",void 0),Tt([o()],It.prototype,"tocNode",void 0);
|
|
97
111
|
/**
|
|
98
112
|
* @license
|
|
99
113
|
* Copyright 2017 Google LLC
|
|
100
114
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
115
|
*/
|
|
102
|
-
const
|
|
116
|
+
const Pt=2,Bt=t=>(...e)=>({_$litDirective$:t,values:e});class _t{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)}}
|
|
103
117
|
/**
|
|
104
118
|
* @license
|
|
105
119
|
* Copyright 2017 Google LLC
|
|
106
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
107
|
-
*/class
|
|
121
|
+
*/class Wt extends _t{constructor(t){if(super(t),this.it=J,t.type!==Pt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===Z)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Wt.directiveName="unsafeHTML",Wt.resultType=1;const Dt=Bt(Wt);var zt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ht extends It{render(){var t,e,i,s,o,r;if(!this.map||!this.tocNode)return J;const n=Math.min((null===(t=this.tocNode)||void 0===t?void 0:t.depth)||1,6),l=null!==(i=null===(e=this.map)||void 0===e?void 0:e.contentStyles.customCssClasses.join(" "))&&void 0!==i?i:"",a=null===(s=this.map)||void 0===s?void 0:s.lang;return V`
|
|
122
|
+
<style>
|
|
123
|
+
@import "${null===(o=this.map)||void 0===o?void 0:o.contentStyles.titleStylesheetUrl}";
|
|
124
|
+
</style>
|
|
125
|
+
<section class="title" lang="${a}">
|
|
126
|
+
<div class="depth-${null===(r=this.tocNode)||void 0===r?void 0:r.depth} content-locale-${a} ${l}">
|
|
127
|
+
${Dt(`<h${n}>${this.tocNode.title}</h${n}>`)}
|
|
128
|
+
</div>
|
|
129
|
+
</section>
|
|
130
|
+
`}}Ht.styles=Ft,zt([bt()],Ht.prototype,"baseUrl",void 0),zt([bt()],Ht.prototype,"map",void 0),l("ft-reader-topic-title")(Ht);const Kt=ft.external(vt.colorError,"Design system"),Vt=ft.external(vt.contentFont,"Design system"),Zt=v`
|
|
131
|
+
.topic {
|
|
132
|
+
font-family: ${Vt};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.topic-on-error {
|
|
136
|
+
display: flex;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.topic-on-error ft-icon {
|
|
140
|
+
color: ${Kt}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.topic-loading {
|
|
144
|
+
height: 100vh;
|
|
145
|
+
}
|
|
146
|
+
`;var Jt,qt;!function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",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=""}(Jt||(Jt={})),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=""}(qt||(qt={})),new Map([...["abw"].map((t=>[t,qt.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,qt.AUDIO])),...["avi"].map((t=>[t,qt.AVI])),...["chm","xhs"].map((t=>[t,qt.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,qt.CODE])),...["csv"].map((t=>[t,qt.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,qt.DITA])),...["epub"].map((t=>[t,qt.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,qt.EXCEL])),...["flac"].map((t=>[t,qt.FLAC])),...["gif"].map((t=>[t,qt.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,qt.GZIP])),...["html","htm","xhtml"].map((t=>[t,qt.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,qt.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,qt.JPEG])),...["json"].map((t=>[t,qt.JSON])),...["m4a","m4p"].map((t=>[t,qt.M4A])),...["mov","qt"].map((t=>[t,qt.MOV])),...["mp3"].map((t=>[t,qt.MP3])),...["mp4","m4v"].map((t=>[t,qt.MP4])),...["ogg","oga"].map((t=>[t,qt.OGG])),...["pdf","ps"].map((t=>[t,qt.PDF])),...["png"].map((t=>[t,qt.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,qt.POWERPOINT])),...["rar"].map((t=>[t,qt.RAR])),...["stp"].map((t=>[t,qt.STP])),...["txt","rtf","md","mdown"].map((t=>[t,qt.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,qt.VIDEO])),...["wav"].map((t=>[t,qt.WAV])),...["wma"].map((t=>[t,qt.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,qt.WORD])),...["xml","xsl","rdf"].map((t=>[t,qt.XML])),...["yaml","yml","x-yaml"].map((t=>[t,qt.YAML])),...["zip"].map((t=>[t,qt.ZIP]))]);const Xt=ft.create("--ft-icon-font-size","SIZE","24px"),Gt=ft.extend("--ft-icon-fluid-topics-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Qt=ft.extend("--ft-icon-file-format-font-family",ft.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Yt=ft.extend("--ft-icon-material-font-family",ft.create("--ft-icon-font-family","UNKNOWN","Material Icons")),te=ft.create("--ft-icon-vertical-align","UNKNOWN","unset"),ee=v`
|
|
108
147
|
:host {
|
|
109
148
|
display: inline-block;
|
|
110
149
|
}
|
|
111
150
|
|
|
112
151
|
:host, i.ft-icon {
|
|
113
|
-
width: ${
|
|
114
|
-
height: ${
|
|
152
|
+
width: ${Xt};
|
|
153
|
+
height: ${Xt};
|
|
115
154
|
text-align: center;
|
|
116
155
|
}
|
|
117
156
|
|
|
118
157
|
i.ft-icon {
|
|
119
|
-
font-size: ${
|
|
158
|
+
font-size: ${Xt};
|
|
120
159
|
line-height: 1;
|
|
121
160
|
font-weight: normal;
|
|
122
161
|
text-transform: none;
|
|
@@ -127,297 +166,58 @@ const St=1,kt=2,Nt=t=>(...e)=>({_$litDirective$:t,values:e});class Ct{constructo
|
|
|
127
166
|
text-rendering: auto;
|
|
128
167
|
-webkit-font-smoothing: antialiased;
|
|
129
168
|
-moz-osx-font-smoothing: grayscale;
|
|
130
|
-
vertical-align: ${
|
|
169
|
+
vertical-align: ${te};
|
|
131
170
|
}
|
|
132
171
|
|
|
133
172
|
.ft-icon--fluid-topics {
|
|
134
|
-
font-family: ${
|
|
173
|
+
font-family: ${Gt}, ft-icons, fticons, sans-serif;
|
|
135
174
|
}
|
|
136
175
|
|
|
137
176
|
.ft-icon--file-format {
|
|
138
|
-
font-family: ${
|
|
177
|
+
font-family: ${Qt}, ft-mime, sans-serif;
|
|
139
178
|
}
|
|
140
179
|
|
|
141
180
|
.ft-icon--material {
|
|
142
|
-
font-family: ${
|
|
181
|
+
font-family: ${Yt}, "Material Icons", sans-serif;
|
|
143
182
|
}
|
|
144
|
-
`;var
|
|
183
|
+
`;var ie;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(ie||(ie={}));var se=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class oe extends mt{constructor(){super(...arguments),this.variant=ie.fluid_topics,this.resolvedIcon=J}render(){const t="material"!==this.variant||this.value;return V`
|
|
145
184
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
146
|
-
${
|
|
185
|
+
${Dt(this.resolvedIcon)}
|
|
147
186
|
<slot ?hidden=${t}></slot>
|
|
148
187
|
</i>
|
|
149
|
-
`}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
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
text-transform: ${Yt};
|
|
163
|
-
}
|
|
164
|
-
`,Qe=u`
|
|
165
|
-
.ft-typography--title-dense {
|
|
166
|
-
font-family: ${Gt};
|
|
167
|
-
font-size: ${Qt};
|
|
168
|
-
font-weight: ${te};
|
|
169
|
-
letter-spacing: ${ee};
|
|
170
|
-
line-height: ${ie};
|
|
171
|
-
text-transform: ${oe};
|
|
172
|
-
}
|
|
173
|
-
`,ti=u`
|
|
174
|
-
.ft-typography--subtitle1 {
|
|
175
|
-
font-family: ${ne};
|
|
176
|
-
font-size: ${se};
|
|
177
|
-
font-weight: ${re};
|
|
178
|
-
letter-spacing: ${ae};
|
|
179
|
-
line-height: ${le};
|
|
180
|
-
text-transform: ${ce};
|
|
181
|
-
}
|
|
182
|
-
`,ei=u`
|
|
183
|
-
.ft-typography--subtitle2 {
|
|
184
|
-
font-family: ${he};
|
|
185
|
-
font-size: ${de};
|
|
186
|
-
font-weight: ${pe};
|
|
187
|
-
letter-spacing: ${fe};
|
|
188
|
-
line-height: ${ue};
|
|
189
|
-
text-transform: ${ve};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
`,ii=u`
|
|
193
|
-
.ft-typography--body1 {
|
|
194
|
-
font-family: ${ye};
|
|
195
|
-
font-size: ${xe};
|
|
196
|
-
font-weight: ${ge};
|
|
197
|
-
letter-spacing: ${me};
|
|
198
|
-
line-height: ${be};
|
|
199
|
-
text-transform: ${we};
|
|
200
|
-
}
|
|
201
|
-
`,oi=u`
|
|
202
|
-
.ft-typography--body2 {
|
|
203
|
-
font-family: ${$e};
|
|
204
|
-
font-size: ${Oe};
|
|
205
|
-
font-weight: ${Se};
|
|
206
|
-
letter-spacing: ${ke};
|
|
207
|
-
line-height: ${Ne};
|
|
208
|
-
text-transform: ${Ce};
|
|
209
|
-
}
|
|
210
|
-
`,ni=u`
|
|
211
|
-
.ft-typography--caption {
|
|
212
|
-
font-family: ${Ee};
|
|
213
|
-
font-size: ${Re};
|
|
214
|
-
font-weight: ${Me};
|
|
215
|
-
letter-spacing: ${Ue};
|
|
216
|
-
line-height: ${je};
|
|
217
|
-
text-transform: ${Fe};
|
|
218
|
-
}
|
|
219
|
-
`,si=u`
|
|
220
|
-
.ft-typography--breadcrumb {
|
|
221
|
-
font-family: ${Te};
|
|
222
|
-
font-size: ${Ae};
|
|
223
|
-
font-weight: ${ze};
|
|
224
|
-
letter-spacing: ${Le};
|
|
225
|
-
line-height: ${Ie};
|
|
226
|
-
text-transform: ${Pe};
|
|
227
|
-
}
|
|
228
|
-
`,ri=u`
|
|
229
|
-
.ft-typography--overline {
|
|
230
|
-
font-family: ${Be};
|
|
231
|
-
font-size: ${_e};
|
|
232
|
-
font-weight: ${We};
|
|
233
|
-
letter-spacing: ${De};
|
|
234
|
-
line-height: ${Ke};
|
|
235
|
-
text-transform: ${He};
|
|
236
|
-
}
|
|
237
|
-
`,ai=u`
|
|
238
|
-
.ft-typography--button {
|
|
239
|
-
font-family: ${Ze};
|
|
240
|
-
font-size: ${Ve};
|
|
241
|
-
font-weight: ${Je};
|
|
242
|
-
letter-spacing: ${qe};
|
|
243
|
-
line-height: ${Xe};
|
|
244
|
-
text-transform: ${Ye};
|
|
245
|
-
}
|
|
246
|
-
`,li=u`
|
|
247
|
-
.ft-typography {
|
|
248
|
-
vertical-align: inherit;
|
|
249
|
-
}
|
|
250
|
-
`;var ci=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class hi extends ut{constructor(){super(...arguments),this.variant=Wt.body1}render(){return this.element?_t`
|
|
251
|
-
<${Pt(this.element)}
|
|
252
|
-
class="ft-typography ft-typography--${this.variant}">
|
|
253
|
-
<slot></slot>
|
|
254
|
-
</${Pt(this.element)}>
|
|
255
|
-
`:_t`
|
|
256
|
-
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
257
|
-
`}}hi.styles=[Ge,Qe,ti,ei,ii,oi,ni,si,ri,ai,li],ci([o()],hi.prototype,"element",void 0),ci([o()],hi.prototype,"variant",void 0),a("ft-typography")(hi);const di=dt.extend("--ft-notice-color",pt.colorPrimary),pi=dt.extend("--ft-notice-icon-color",pt.colorOnPrimary),fi=dt.external(pt.borderRadiusS,"Design System"),ui=u`
|
|
258
|
-
.ft-notice {
|
|
259
|
-
display: inline-flex;
|
|
260
|
-
align-items: stretch;
|
|
261
|
-
box-sizing: border-box;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
ft-icon {
|
|
265
|
-
${vi=jt.size,yi="20px",f(`${vi.name}: ${yi}`)};
|
|
266
|
-
padding: 0 8px;
|
|
267
|
-
display: flex;
|
|
268
|
-
align-self: center;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.ft-icon {
|
|
272
|
-
color: ${pi};
|
|
273
|
-
background-color: ${di};
|
|
274
|
-
display: flex;
|
|
275
|
-
align-items: center;
|
|
276
|
-
border-top-left-radius: ${fi};
|
|
277
|
-
border-bottom-left-radius: ${fi};
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.ft-notice-label {
|
|
281
|
-
padding: 8px;
|
|
282
|
-
border-top-right-radius: ${fi};
|
|
283
|
-
border-bottom-right-radius: ${fi};
|
|
284
|
-
border: 1px solid ${di};
|
|
285
|
-
}
|
|
286
|
-
`;var vi,yi,xi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class gi extends ut{constructor(){super(...arguments),this.icon="info"}render(){return D`
|
|
287
|
-
<div class="ft-notice">
|
|
288
|
-
<div class="ft-icon">
|
|
289
|
-
<ft-icon>${this.icon}</ft-icon>
|
|
188
|
+
`}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 ie.file_format:this.resolvedIcon=null!==(t=qt[i.toUpperCase()])&&void 0!==t?t:i;break;case ie.fluid_topics:this.resolvedIcon=null!==(e=Jt[i.toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||J}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}oe.elementDefinitions={},oe.styles=ee,se([s()],oe.prototype,"variant",void 0),se([s()],oe.prototype,"value",void 0),se([o()],oe.prototype,"resolvedIcon",void 0),se([r("slot")],oe.prototype,"slottedContent",void 0),l("ft-icon")(oe);var re=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ne extends It{render(){var t;return this.map&&(this.error||this.content)?V`
|
|
189
|
+
<style>
|
|
190
|
+
@import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
|
|
191
|
+
</style>
|
|
192
|
+
<section class="topic" lang="${this.contentLocale}">
|
|
193
|
+
${this.renderTopicContent()}
|
|
194
|
+
</section>
|
|
195
|
+
`:V`
|
|
196
|
+
<section class="topic-loading"></section>
|
|
197
|
+
`}updated(t){super.updated(t),t.has("tocNode")&&this.updateContent()}updateContent(){var t;this.error=void 0,this.content=void 0,this.tocNode&&(null===(t=this.service)||void 0===t||t.getTopicContent(this.tocNode.contentId).then((t=>this.content=t)).catch((t=>this.error=t)))}contentAvailableCallback(t){var e,i,s,o;if(super.contentAvailableCallback(t),(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&this.tocId&&this.tocId===this.scrollTarget.tocId&&this.content){(null!==(s=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==s?s:this).scrollIntoView({block:"start"}),null===(o=this.stateManager)||void 0===o||o.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.updateContent()}renderTopicContent(){var t,e,i,s;if(this.error){let e=this.is404Error()?"topicMissingAdvice":"somethingWentWrong";return console.log("SERVICE : ",this.service),V`
|
|
198
|
+
<div class="topic-on-error">
|
|
199
|
+
<ft-icon>WARNING</ft-icon>
|
|
200
|
+
<div>${null===(t=this.service)||void 0===t?void 0:t.resolveLabel(e)}</div>
|
|
290
201
|
</div>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
202
|
+
`}const o=null!==(i=null===(e=this.map)||void 0===e?void 0:e.contentStyles.customCssClasses.join(" "))&&void 0!==i?i:"";return V`
|
|
203
|
+
<div class="depth-${null===(s=this.tocNode)||void 0===s?void 0:s.depth} content-locale-${this.contentLocale} ${o}">
|
|
204
|
+
${Dt(`${this.content}`)}
|
|
294
205
|
</div>
|
|
295
|
-
`}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
border-radius: ${Ni};
|
|
302
|
-
background: linear-gradient(
|
|
303
|
-
90deg,
|
|
304
|
-
transparent,
|
|
305
|
-
${Si} calc(0.45 * ${Oi}),
|
|
306
|
-
${Si} calc(0.55 * ${Oi}),
|
|
307
|
-
transparent ${Oi}
|
|
308
|
-
), ${$i};
|
|
309
|
-
background-repeat: repeat-y;
|
|
310
|
-
background-size: 100vw 100vh;
|
|
311
|
-
background-attachment: fixed;
|
|
312
|
-
background-position: calc(${Oi} * -1) 0;
|
|
313
|
-
animation: shine ${ki} infinite;
|
|
314
|
-
animation-timing-function: linear;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
@keyframes shine {
|
|
318
|
-
to {
|
|
319
|
-
background-position: calc(100vw + ${Oi}) 0, calc(${Oi} * -1) 0;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
`;class Ei extends ut{render(){return D`
|
|
323
|
-
`}}Ei.elementDefinitions={},Ei.styles=Ci,a("ft-skeleton")(Ei);
|
|
324
|
-
/**
|
|
325
|
-
* @license
|
|
326
|
-
* Copyright 2018 Google LLC
|
|
327
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
328
|
-
*/
|
|
329
|
-
const Ri=Nt(class extends Ct{constructor(t){var e;if(super(t),t.type!==St||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.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]){var i,o;if(void 0===this.nt){this.nt=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]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return K}}),Mi=dt.extend("--ft-reader-internal-link-outline-color",pt.colorPrimary),Ui=u`
|
|
330
|
-
a:focus {
|
|
331
|
-
outline-color: ${Mi};
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.ft-reader-link--remove-style {
|
|
335
|
-
text-decoration: none;
|
|
336
|
-
color: inherit;
|
|
337
|
-
}
|
|
338
|
-
`;var ji=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Fi extends Ot{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Ri({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return D`
|
|
339
|
-
<a class=${e}
|
|
340
|
-
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
341
|
-
@click=${t=>this.onClick(t)}>
|
|
342
|
-
<slot></slot>
|
|
343
|
-
</a>
|
|
344
|
-
`}onClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)))}}Fi.styles=Ui,ji([o()],Fi.prototype,"tocId",void 0),ji([o()],Fi.prototype,"section",void 0),ji([o({type:Number})],Fi.prototype,"pageNumber",void 0),ji([o({type:Boolean})],Fi.prototype,"removeStyle",void 0),a("ft-reader-internal-link")(Fi);const Ti=u`
|
|
345
|
-
.ft-reader-topic {
|
|
346
|
-
box-sizing: border-box;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.loading-topic {
|
|
350
|
-
height: 100vh;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
ft-skeleton {
|
|
354
|
-
margin: 8px 0;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.ft-reader-topic--content {
|
|
358
|
-
max-width: 100%;
|
|
359
|
-
overflow-x: auto;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
img {
|
|
363
|
-
max-width: 100%;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.ft-expanding-block-content,
|
|
367
|
-
.ft-expanding-block-inline-content {
|
|
368
|
-
display: none;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.ft-expanding-block-content.ft-expanding-block-expanded {
|
|
372
|
-
display: block;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.ft-expanding-block-inline-content.ft-expanding-block-expanded {
|
|
376
|
-
display: inline;
|
|
377
|
-
}
|
|
378
|
-
`;var Ai=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class zi extends Ot{constructor(){super(...arguments),this.tocId="",this.error=!1,this.displayLoading=!1,this.loadingDebouncer=new e(300)}render(){var t,e;if(this.error)return D`
|
|
379
|
-
<div class="loading-topic" part="error">
|
|
380
|
-
${this.renderTitle()}
|
|
381
|
-
<ft-notice part="error-notice" icon="warning" part="error-notice">
|
|
382
|
-
An error occured.
|
|
383
|
-
</ft-notice>
|
|
384
|
-
</div>
|
|
385
|
-
`;if(null==this.tocNode||null==this.content)return D`
|
|
386
|
-
<div class="loading-topic" part="loader">
|
|
387
|
-
${this.renderTitle()}
|
|
388
|
-
${this.displayLoading?D`
|
|
389
|
-
<ft-skeleton style="--ft-skeleton--width: 80%"></ft-skeleton>
|
|
390
|
-
<ft-skeleton style="--ft-skeleton--width: 40%;--ft-skeleton--height: 200px"></ft-skeleton>
|
|
391
|
-
<ft-skeleton style="--ft-skeleton--width: 50%"></ft-skeleton>
|
|
392
|
-
<ft-skeleton style="--ft-skeleton--width: 70%"></ft-skeleton>
|
|
393
|
-
<ft-skeleton style="--ft-skeleton--width: 30%"></ft-skeleton>
|
|
394
|
-
`:H}
|
|
395
|
-
</div>
|
|
396
|
-
`;const i=null!==(e=null===(t=this.tocNode)||void 0===t?void 0:t.depth)&&void 0!==e?e:1;return D`
|
|
397
|
-
<section class="ft-reader-topic readercontent-topic-depth-${i} depth-${i}" id="${this.tocId}"
|
|
398
|
-
part="container">
|
|
399
|
-
${this.renderTitle()}
|
|
400
|
-
<div class="ft-reader-topic--content topic" part="content">
|
|
401
|
-
${Rt(this.content)}
|
|
402
|
-
</div>
|
|
403
|
-
</section>
|
|
404
|
-
`}renderTitle(){var t;return this.tocNode?D`
|
|
405
|
-
<ft-typography variant="title" element="h${Math.min(this.tocNode.depth+1,6)}" part="title">
|
|
406
|
-
${null===(t=this.tocNode)||void 0===t?void 0:t.title}
|
|
407
|
-
</ft-typography>
|
|
408
|
-
`:!this.displayLoading||this.error?H:D`
|
|
409
|
-
<ft-skeleton style="--ft-skeleton--width: 50%;--ft-skeleton--height: 24px; margin-bottom: 24px">
|
|
410
|
-
</ft-skeleton>
|
|
411
|
-
`}updated(t){var e;super.updated(t),t.has("tocId")&&this.tocId&&this.getTocNode(),t.has("tocNode")&&this.tocNode&&(null===(e=this.service)||void 0===e||e.getTopicContent(this.tocNode.contentId).then((t=>this.content=t)))}contentAvailableCallback(t){var e,i,o,n;if(super.contentAvailableCallback(t),(null===(e=this.scrollTarget)||void 0===e?void 0:e.section)&&this.tocId&&this.tocId===this.scrollTarget.tocId&&this.content){(null!==(o=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector(`[id="${this.scrollTarget.section}"], [name="${this.scrollTarget.section}"]`))&&void 0!==o?o:this).scrollIntoView({block:"start"}),null===(n=this.stateManager)||void 0===n||n.scrollDone()}}onStoreAvailable(){super.onStoreAvailable(),this.getTocNode()}async getTocNode(){var t;this.content=void 0,this.tocNode=void 0,this.error=!1,this.displayLoading=!1,this.loadingDebouncer.run((()=>this.displayLoading=!0)),null===(t=this.service)||void 0===t||t.getTocNode(this.tocId).then((t=>this.tocNode=t)).catch((t=>this.error=!0))}}zi.styles=Ti,Ai([o()],zi.prototype,"tocId",void 0),Ai([n()],zi.prototype,"tocNode",void 0),Ai([n()],zi.prototype,"content",void 0),Ai([s(".ft-reader-topic")],zi.prototype,"container",void 0),Ai([vt()],zi.prototype,"scrollTarget",void 0),Ai([n()],zi.prototype,"error",void 0),Ai([n()],zi.prototype,"displayLoading",void 0),a("ft-reader-topic")(zi);
|
|
206
|
+
`}is404Error(){return 404===this.error.status}}ne.styles=Zt,re([bt((t=>{var e;return null===(e=t.map)||void 0===e?void 0:e.lang}))],ne.prototype,"contentLocale",void 0),re([bt()],ne.prototype,"map",void 0),re([bt()],ne.prototype,"scrollTarget",void 0),re([o()],ne.prototype,"content",void 0),re([o()],ne.prototype,"error",void 0),l("ft-reader-topic-content")(ne);var le=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ae extends mt{constructor(){super(...arguments),this.tocId=""}render(){return V`
|
|
207
|
+
<ft-reader-topic-context tocId="${this.tocId}">
|
|
208
|
+
<ft-reader-topic-title></ft-reader-topic-title>
|
|
209
|
+
<ft-reader-topic-content></ft-reader-topic-content>
|
|
210
|
+
</ft-reader-topic-context>
|
|
211
|
+
`}}ae.elementDefinitions={"ft-reader-topic-context":Ut,"ft-reader-topic-title":Ht,"ft-reader-topic-content":ne},ae.styles=Et,le([s()],ae.prototype,"tocId",void 0),l("ft-reader-topic")(ae);
|
|
412
212
|
/**
|
|
413
213
|
* @license
|
|
414
214
|
* Copyright 2020 Google LLC
|
|
415
215
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
416
216
|
*/
|
|
417
|
-
const{
|
|
217
|
+
const{I:ce}=at,he=()=>document.createComment(""),de=(t,e,i)=>{var s;const o=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(he(),r),s=o.insertBefore(he(),r);i=new ce(e,s,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==t;if(l){let e;null===(s=i._$AQ)||void 0===s||s.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,r),t=e}}}return i},ue=(t,e,i=t)=>(t._$AI(e,i),t),pe={},fe=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const s=t._$AB.nextSibling;for(;i!==s;){const t=i.nextSibling;i.remove(),i=t}},ve=(t,e,i)=>{const s=new Map;for(let o=e;o<=i;o++)s.set(t[o],o);return s},xe=Bt(class extends _t{constructor(t){if(super(t),t.type!==Pt)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const o=[],r=[];let n=0;for(const e of t)o[n]=s?s(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:o}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,s]){var o;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.ht(e,i,s);if(!Array.isArray(r))return this.ut=l,n;const a=null!==(o=this.ut)&&void 0!==o?o:this.ut=[],c=[];let h,d,u=0,p=r.length-1,f=0,v=n.length-1;for(;u<=p&&f<=v;)if(null===r[u])u++;else if(null===r[p])p--;else if(a[u]===l[f])c[f]=ue(r[u],n[f]),u++,f++;else if(a[p]===l[v])c[v]=ue(r[p],n[v]),p--,v--;else if(a[u]===l[v])c[v]=ue(r[u],n[v]),de(t,c[v+1],r[u]),u++,v--;else if(a[p]===l[f])c[f]=ue(r[p],n[f]),de(t,r[u],r[p]),p--,f++;else if(void 0===h&&(h=ve(l,f,v),d=ve(a,u,p)),h.has(a[u]))if(h.has(a[p])){const e=d.get(l[f]),i=void 0!==e?r[e]:null;if(null===i){const e=de(t,r[u]);ue(e,n[f]),c[f]=e}else c[f]=ue(i,n[f]),de(t,r[u],i),r[e]=null;f++}else fe(r[p]),p--;else fe(r[u]),u++;for(;f<=v;){const e=de(t,c[v+1]);ue(e,n[f]),c[f++]=e}for(;u<=p;){const t=r[u++];null!==t&&fe(t)}return this.ut=l,((t,e=pe)=>{t._$AH=e})(t,c),Z}}),me=ft.create("--ft-infinite-scroll-padding","SIZE","0"),be=v`
|
|
418
218
|
.items-container {
|
|
419
219
|
position: relative;
|
|
420
|
-
padding: ${
|
|
220
|
+
padding: ${me};
|
|
421
221
|
outline: none;
|
|
422
222
|
}
|
|
423
223
|
|
|
@@ -452,24 +252,24 @@ const{H:Li}=st,Ii=()=>document.createComment(""),Pi=(t,e,i)=>{var o;const n=t._$
|
|
|
452
252
|
* @license
|
|
453
253
|
* Copyright 2017 Google LLC
|
|
454
254
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
455
|
-
*/var
|
|
255
|
+
*/var ge=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ye extends CustomEvent{constructor(t,e){super("visible-items-change",{detail:{visibleIndexes:t,visibleItems:e}})}}class we extends Event{constructor(){super("scrolled-to-target")}}class Oe extends mt{constructor(){super(...arguments),this.items=[],this.renderItem=()=>V``,this.internalScroll=!1,this.renderBeforeFirst=1,this.renderAfterLast=1,this.visibleItems=[],this.scrolledToTarget=!1,this.alreadyRenderedIndexes=new Set,this.scrollDebouncer=new e(5),this.onVisibilityChange=t=>{const e=t.filter((t=>t.intersectionRect.height>1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>!this.visibleItems.includes(t))),i=t.filter((t=>t.intersectionRect.height<=1)).map((t=>+t.target.attributes.getNamedItem("data-item-index").value)).filter((t=>this.visibleItems.includes(t))),s=[...this.visibleItems].filter((t=>!i.includes(t)));this.visibleItems=[...e,...s].sort(((t,e)=>t-e))},this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange),this.onResize=t=>{this.triggerFindScrollableParent();let e=0;t=t.sort(((t,e)=>t.contentRect.top-e.contentRect.top));for(const i of t){const t=+i.target.parentElement.getAttribute("data-item-index"),s=i.target.parentElement.clientHeight,o=i.contentRect.height;this.alreadyRenderedIndexes.has(t)&&(i.target.parentElement.style.height=o+"px",e+=this.scrollable&&this.getOffset(i.target.parentElement)<this.scrollable.scrollTop+e?o-s:0)}this.scrollable&&$t&&(this.scrollable.scrollTop+=e)},this.resizeObserver=new ResizeObserver(this.onResize),this.onMutation=()=>{[...this.itemsContainer.children].forEach((t=>{this.intersectionObserver.observe(t),this.resizeObserver.observe(t.children.item(0))}))},this.mutationObserver=new MutationObserver(this.onMutation)}get scrollable(){return this.internalScroll?this.internalScrollable:this.firstScrollableParent}render(){return V`
|
|
456
256
|
<div class="items-container ${this.internalScroll?"scrollable":""}"
|
|
457
257
|
tabindex="-1"
|
|
458
258
|
@find-scrollable-parent=${this.findScrollableParent}>
|
|
459
|
-
${
|
|
259
|
+
${xe(this.items,((t,e)=>this.renderItemContainer(t,e)))}
|
|
460
260
|
</div>
|
|
461
|
-
`}renderItemContainer(t,e){const i=this.scrolledToTarget&&this.visibleItems.includes(e),
|
|
261
|
+
`}renderItemContainer(t,e){const i=this.scrolledToTarget&&this.visibleItems.includes(e),s=this.alreadyRenderedIndexes.has(e)||this.scrolledToTarget&&e>=this.visibleItems[0]-this.renderBeforeFirst&&e<=(null!=(o=this.visibleItems)?o:[])[(null!=o?o:[]).length-1]+this.renderAfterLast;var o;s&&this.alreadyRenderedIndexes.add(e);return V`
|
|
462
262
|
<div id="item-${e}"
|
|
463
263
|
class="item-container"
|
|
464
264
|
data-item-index="${e}">
|
|
465
|
-
<div class="resizable ${i?"visible":""} ${
|
|
466
|
-
${
|
|
265
|
+
<div class="resizable ${i?"visible":""} ${s?"rendered":""}">
|
|
266
|
+
${s?(()=>{const i=this.renderItem(t,e);return"string"==typeof i?V`${Dt(i)}`:i})():null}
|
|
467
267
|
</div>
|
|
468
268
|
</div>
|
|
469
|
-
`}resetScroll(){this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t,e;let i=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;i>=this.items.length&&(i=-1);let
|
|
470
|
-
`;var
|
|
269
|
+
`}resetScroll(){this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.visibleItems=[],this.scrolledToTarget=!1,this.scrollDebouncer.run((()=>{var t,e;let i=null!==(t=this.scrollToIndex)&&void 0!==t?t:this.scrollToItem?this.items.indexOf(this.scrollToItem):-1;i>=this.items.length&&(i=-1);let s=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(`#item-${i}`);this.scrollToTarget(s),this.onMutation(),setTimeout((()=>{this.scrolledToTarget=!0}),10)}))}scrollToTarget(t){var e;if(t){let i=+(null!==(e=t.getAttribute("data-item-index"))&&void 0!==e?e:"0");this.scrollable?this.scrollable.scrollTop=i>0?this.getOffset(t)+1:0:t.scrollIntoView({block:"start"})}}getOffset(t){var e;let i=0,s=t;for(;s&&s.offsetParent!==this.scrollable.offsetParent;)i+=s.offsetTop,s=s.offsetParent;return i+(null!==(e=null==s?void 0:s.offsetTop)&&void 0!==e?e:0)-this.scrollable.offsetTop}appendItems(...t){this.items=[...this.items,...t]}prependItems(...t){this.items=[...t,...this.items]}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.triggerFindScrollableParent(),this.intersectionObserver.disconnect(),this.intersectionObserver=new IntersectionObserver(this.onVisibilityChange,{rootMargin:"-2px",threshold:[0,.01,.1]}),this.mutationObserver.disconnect(),this.mutationObserver.observe(this.itemsContainer,{childList:!0})}),0)}triggerFindScrollableParent(){this.itemsContainer.dispatchEvent(new Event("find-scrollable-parent",{composed:!0}))}findScrollableParent(t){t.stopPropagation();for(let e of t.composedPath()){const t=e;if(t.clientHeight&&t.clientHeight<t.scrollHeight&&["auto","scroll"].includes(getComputedStyle(t).overflowY)){this.firstScrollableParent=t;break}}}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}firstUpdated(t){super.firstUpdated(t),this.resetScroll()}update(t){super.update(t),t.has("items")&&(this.alreadyRenderedIndexes=new Set),(t.has("scrollToItem")||t.has("scrollToIndex"))&&this.resetScroll()}updated(t){super.updated(t),(t.has("visibleItems")||t.has("items"))&&this.dispatchEvent(new ye(this.visibleItems,this.visibleItems.map((t=>this.items[t])))),t.has("scrolledToTarget")&&this.scrolledToTarget&&this.dispatchEvent(new we)}}Oe.styles=be,ge([s({type:Array})],Oe.prototype,"items",void 0),ge([s({attribute:!1})],Oe.prototype,"renderItem",void 0),ge([s({type:Object})],Oe.prototype,"scrollToItem",void 0),ge([s({type:Number})],Oe.prototype,"scrollToIndex",void 0),ge([s({type:Boolean})],Oe.prototype,"internalScroll",void 0),ge([s({type:Number})],Oe.prototype,"renderBeforeFirst",void 0),ge([s({type:Number})],Oe.prototype,"renderAfterLast",void 0),ge([o({hasChanged:(t,e)=>null!=t&&null==e||t.length!==e.length||t[0]!==e[0]})],Oe.prototype,"visibleItems",void 0),ge([r(".scrollable")],Oe.prototype,"internalScrollable",void 0),ge([r(".items-container")],Oe.prototype,"itemsContainer",void 0),ge([o()],Oe.prototype,"scrolledToTarget",void 0),l("ft-infinite-scroll")(Oe);const $e=v`
|
|
270
|
+
`;var Se=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ne extends Ct{constructor(){super(...arguments),this.renderTopic=t=>V`
|
|
471
271
|
<ft-reader-topic tocId="${t}" .exportpartsPrefix=${"topic"}></ft-reader-topic>
|
|
472
|
-
`,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;return
|
|
272
|
+
`,this.renderBeforeFirst=5,this.renderAfterLast=10,this.visibleTopicsDebouncer=new e(100)}render(){var t;return V`
|
|
473
273
|
<ft-infinite-scroll class="ft-reader-content"
|
|
474
274
|
.items=${(null===(t=this.currentPage)||void 0===t?void 0:t.topics)||[]}
|
|
475
275
|
.renderItem=${this.renderTopic}
|
|
@@ -482,4 +282,4 @@ const{H:Li}=st,Ii=()=>document.createComment(""),Pi=(t,e,i)=>{var o;const n=t._$
|
|
|
482
282
|
>
|
|
483
283
|
|
|
484
284
|
</ft-infinite-scroll>
|
|
485
|
-
`}getScrollTarget(){var t,e,i,o
|
|
285
|
+
`}getScrollTarget(){var t,e,i,s,o;const r=null!==(s=null===(t=this.visibleTopics)||void 0===t?void 0:t.includes(null!==(i=null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)&&void 0!==i?i:""))&&void 0!==s&&s;return!(null===(o=this.scrollTarget)||void 0===o?void 0:o.tocId)||r&&null!=this.scrollTarget.section?null:this.scrollTarget.tocId}visibleTopicChange(t){this.visibleTopicsDebouncer.run((()=>{var e;return null===(e=this.stateManager)||void 0===e?void 0:e.setVisibleTopics(t.detail.visibleItems)}))}onScrollDone(){var t,e;null==(null===(t=this.scrollTarget)||void 0===t?void 0:t.section)&&(null===(e=this.stateManager)||void 0===e||e.scrollDone())}}Ne.elementDefinitions={"ft-infinite-scroll":Oe},Ne.styles=$e,Se([s()],Ne.prototype,"renderTopic",void 0),Se([bt()],Ne.prototype,"currentPage",void 0),Se([bt()],Ne.prototype,"scrollTarget",void 0),Se([bt()],Ne.prototype,"visibleTopics",void 0),Se([bt()],Ne.prototype,"renderBeforeFirst",void 0),Se([bt()],Ne.prototype,"renderAfterLast",void 0),Se([r(".ft-reader-content")],Ne.prototype,"container",void 0),l("ft-reader-content")(Ne),t.FtReaderContent=Ne,t.FtReaderContentCssVariables={},t.styles=$e,Object.defineProperty(t,"i",{value:!0})}({});
|