@fluid-topics/ft-size-watcher 0.1.17 → 0.1.18
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-size-watcher.d.ts +2 -2
- package/build/ft-size-watcher.inline-styles.js +109 -0
- package/build/ft-size-watcher.js +25 -31
- package/build/ft-size-watcher.light.js +21 -21
- package/build/ft-size-watcher.min.js +52 -38
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +5 -5
|
@@ -20,7 +20,7 @@ export interface FtSizeWatcherProperties extends FtSizeProperties {
|
|
|
20
20
|
}
|
|
21
21
|
export declare class FtSizeWatcher extends FtLitElement implements FtSizeWatcherProperties {
|
|
22
22
|
static elementDefinitions: ElementDefinitionsMap;
|
|
23
|
-
|
|
23
|
+
static styles: import("lit").CSSResult;
|
|
24
24
|
debounceTimeout: number;
|
|
25
25
|
local: boolean;
|
|
26
26
|
size: number;
|
|
@@ -28,7 +28,7 @@ export declare class FtSizeWatcher extends FtLitElement implements FtSizeWatcher
|
|
|
28
28
|
private watcher?;
|
|
29
29
|
private resizeObserver;
|
|
30
30
|
private debouncer;
|
|
31
|
-
protected
|
|
31
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
32
32
|
protected contentAvailableCallback(props: PropertyValues): void;
|
|
33
33
|
private updateSize;
|
|
34
34
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
!function(){
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
* This code may only be used under the BSD style license found at
|
|
6
|
+
* http://polymer.github.io/LICENSE.txt
|
|
7
|
+
* The complete set of authors may be found at
|
|
8
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
+
* The complete set of contributors may be found at
|
|
10
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
+
* Code distributed by Google as part of the polymer project is also
|
|
12
|
+
* subject to an additional IP rights grant found at
|
|
13
|
+
* http://polymer.github.io/PATENTS.txt
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
|
+
*/
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,n=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap;let h;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,h=new Set(n.observedAttributes||[]);d(n,h,l);const a={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:h};this._definitionsByTag.set(t,a),this._definitionsByClass.set(n,a);let c=e.call(s,t);c||(c=u(t),i.call(s,t,c)),this===window.customElements&&(r.set(n,a),a.standInClass=c);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)o.delete(t),f(t,a,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){w.push(this),s.upgrade.apply(s,arguments),w.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=h;if(i)return h=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,c=t=>{let i=t.getRootNode();if(!a(i)){const t=w[w.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),a(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},u=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=c(e)||window.customElements,n=s._getDefinition(i);return n?f(e,n):o.set(e,s),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);s.call(this,o,n),e.call(this,o,t,n)}else s.call(this,o,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);n.call(this,s),e.call(this,s,t,null)}else n.call(this,s)})},p=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):p(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),h=t;try{new i.elementClass}catch(t){p(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let w=[document];const b=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){w.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&l.set(t,this),w.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){w.push(this),e.set.call(this,t),w.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),n=i.get(s)||[];this[+e]=t,n.push(t),i.set(s,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new o(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.warn(t,e,s,i)}}}class t{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}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
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/const i=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};function e(t){return(e,s)=>void 0!==s?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,e,s):i(t,e)
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/}
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2021 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/
|
|
33
|
+
var s;null===(s=window.HTMLSlotElement)||void 0===s||s.prototype.assignedElements;const n=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new Map;
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2019 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/class l{constructor(t,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=r.get(this.cssText);return n&&void 0===t&&(r.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const h=t=>new l("string"==typeof t?t:t+"",o),a=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(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.")})(e)+t[s+1]),t[0]);return new l(e,o)},c=(t,i)=>{n?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),s=window.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}))},u=n?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return h(i)})(t):t
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2017 Google LLC
|
|
42
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
+
*/;var d;const p=window.trustedTypes,f=p?p.emptyScript:"",v=window.reactiveElementPolyfillSupport,w={toAttribute(t,i){switch(i){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},b=(t,i)=>i!==t&&(i==i||t==t),x={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:b};class m extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Eh(e,i);void 0!==s&&(this._$Eu.set(s,e),t.push(s))})),t}static createProperty(t,i=x){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}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._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(u(t))}else void 0!==t&&i.push(u(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=x){var s,n;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(n=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:w.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,s,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(s=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:w.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||b)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
44
|
+
/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright 2017 Google LLC
|
|
47
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
+
*/
|
|
49
|
+
var y;m.finalized=!0,m.elementProperties=new Map,m.elementStyles=[],m.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:m}),(null!==(d=globalThis.reactiveElementVersions)&&void 0!==d?d:globalThis.reactiveElementVersions=[]).push("1.2.2");const g=globalThis.trustedTypes,O=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,R="?"+N,C=`<${R}>`,E=document,S=(t="")=>E.createComment(t),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,k=/-->/g,F=/>/g,L=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,T=/"/g,B=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),j=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),W=new WeakMap,K=E.createTreeWalker(E,129,null,!1),D=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=$;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,c=0;for(;c<e.length&&(r.lastIndex=c,h=r.exec(e),null!==h);)c=r.lastIndex,r===$?"!--"===h[1]?r=k:void 0!==h[1]?r=F:void 0!==h[2]?(B.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=L):void 0!==h[3]&&(r=L):r===L?">"===h[0]?(r=null!=n?n:$,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?L:'"'===h[3]?T:A):r===T||r===A?r=L:r===k||r===F?r=$:(r=L,n=void 0);const u=r===L&&t[i+1].startsWith("/>")?" ":"";o+=r===$?e+C:a>=0?(s.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+N+u):e+N+(-2===a?(s.push(void 0),i):u)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==O?O.createHTML(l):l,s]};class I{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=D(t,i);if(this.el=I.createElement(h,e),K.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=K.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(N)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(N),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?X:"?"===i[1]?J:"@"===i[1]?G:Z})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(B.test(s.tagName)){const t=s.textContent.split(N),i=t.length-1;if(i>0){s.textContent=g?g.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],S()),K.nextNode(),l.push({type:2,index:++n});s.append(t[i],S())}}}else if(8===s.nodeType)if(s.data===R)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(N,t+1));)l.push({type:7,index:n}),t+=N.length-1}n++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function H(t,i,e=t,s){var n,o,r,l;if(i===j)return i;let h=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const a=M(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=h:e._$Cu=h),void 0!==h&&(i=H(t,h._$AS(t,i.values),h,s)),i}class P{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:E).importNode(e,!0);K.currentNode=n;let o=K.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new V(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new Q(o,this,t)),this.v.push(i),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=K.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class V{constructor(t,i,e,s){var n;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=H(this,t,i),M(t)?t===z||null==t||""===t?(this._$AH!==z&&this._$AR(),this._$AH=z):t!==this._$AH&&t!==j&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return U(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==z&&M(this._$AH)?this._$AA.nextSibling.data=t:this.S(E.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=I.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new P(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new I(t)),i}A(t){U(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new V(this.M(S()),this.M(S()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Z{constructor(t,i,e,s,n){this.type=1,this._$AH=z,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=H(this,t,i,0),o=!M(t)||t!==this._$AH&&t!==j,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=H(this,s[e+r],i,r),l===j&&(l=this._$AH[r]),o||(o=!M(l)||l!==this._$AH[r]),l===z?t=z:t!==z&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.k(t)}k(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class X extends Z{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===z?void 0:t}}const q=g?g.emptyScript:"";class J extends Z{constructor(){super(...arguments),this.type=4}k(t){t&&t!==z?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class G extends Z{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=H(this,t,i,0))&&void 0!==e?e:z)===j)return;const s=this._$AH,n=t===z&&s!==z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==z&&(s===z||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const Y=window.litHtmlPolyfillSupport;
|
|
50
|
+
/**
|
|
51
|
+
* @license
|
|
52
|
+
* Copyright 2017 Google LLC
|
|
53
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
+
*/
|
|
55
|
+
var tt,it;null==Y||Y(I,V),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.1.3");class et extends m{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var s,n;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new V(i.insertBefore(S(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return j}}et.finalized=!0,et._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:et});const st=globalThis.litElementPolyfillSupport;null==st||st({LitElement:et}),(null!==(it=globalThis.litElementVersions)&&void 0!==it?it:globalThis.litElementVersions=[]).push("3.1.2");class nt{constructor(t,i,e,s,n){this.name=t,this.category=i,this.fallbackVariable=e,this.defaultValue=s,this.context=n,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,i,e){return new nt(t,i,void 0,e)}static extend(t,i,e){return new nt(t,i.category,i,e)}static external(t,i){return new nt(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return a`var(${h(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):h(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,i;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(i=this.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}nt.create("--ft-color-primary","COLOR","#2196F3"),nt.create("--ft-color-primary-variant","COLOR","#1976D2"),nt.create("--ft-color-secondary","COLOR","#FFCC80"),nt.create("--ft-color-secondary-variant","COLOR","#F57C00"),nt.create("--ft-color-surface","COLOR","#FFFFFF"),nt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),nt.create("--ft-color-error","COLOR","#B00020"),nt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),nt.create("--ft-color-opacity-high","NUMBER","1"),nt.create("--ft-color-opacity-medium","NUMBER","0.74"),nt.create("--ft-color-opacity-disabled","NUMBER","0.38"),nt.create("--ft-color-on-primary","COLOR","#FFFFFF"),nt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),nt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),nt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),nt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),nt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),nt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),nt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),nt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),nt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),nt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),nt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),nt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),nt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),nt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),nt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),nt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),nt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),nt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),nt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),nt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),nt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),nt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),nt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),nt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),nt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),nt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),nt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),nt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),nt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),nt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),nt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),nt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.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)"),nt.create("--ft-border-radius-S","SIZE","4px"),nt.create("--ft-border-radius-M","SIZE","8px"),nt.create("--ft-border-radius-L","SIZE","12px"),nt.create("--ft-border-radius-XL","SIZE","16px"),nt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),nt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),nt.create("--ft-transition-duration","UNKNOWN","250ms"),nt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class ot extends(
|
|
56
|
+
/**
|
|
57
|
+
* @license
|
|
58
|
+
* Copyright 2021 Google LLC
|
|
59
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
|
+
*/
|
|
61
|
+
function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:s}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const n=this.renderOptions.creationScope=this.attachShadow({...s,customElements:t.registry});return c(n,this.constructor.elementStyles),n}}}(et)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),_`
|
|
62
|
+
${t.map((t=>_`
|
|
63
|
+
<style>${t}</style>
|
|
64
|
+
`))}
|
|
65
|
+
${this.getTemplate()}
|
|
66
|
+
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}var rt,lt;a`
|
|
67
|
+
.ft-no-text-select {
|
|
68
|
+
-webkit-touch-callout: none;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-khtml-user-select: none;
|
|
71
|
+
-moz-user-select: none;
|
|
72
|
+
-ms-user-select: none;
|
|
73
|
+
user-select: none;
|
|
74
|
+
}
|
|
75
|
+
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(lt=null===(rt=window.safari)||void 0===rt?void 0:rt.pushNotification)||void 0===lt||lt.toString());var ht,at,ct=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(ht||(ht={}));class ut extends CustomEvent{constructor(t,i){super("change",{detail:{size:t,category:i}})}}class dt extends ot{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=ht.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new t}render(){return _`
|
|
76
|
+
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
77
|
+
<div class="ft-size-watcher--watcher"></div>
|
|
78
|
+
</div>
|
|
79
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=ht.S:this.size<976?this.category=ht.M:this.size<1024?this.category=ht.L:this.size<1440?this.category=ht.XL:this.category=ht.XXL,this.dispatchEvent(new ut(this.size,this.category)))}),this.debounceTimeout)}}dt.elementDefinitions={},dt.styles=a`
|
|
80
|
+
.ft-size-watcher--pixel {
|
|
81
|
+
width: 0;
|
|
82
|
+
height: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ft-size-watcher--watcher {
|
|
91
|
+
height: 1px;
|
|
92
|
+
width: 100vw;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
98
|
+
`,ct([e({type:Number})],dt.prototype,"debounceTimeout",void 0),ct([e({type:Boolean})],dt.prototype,"local",void 0),ct([e({type:Number,reflect:!0})],dt.prototype,"size",void 0),ct([e({type:String,reflect:!0})],dt.prototype,"category",void 0),ct([
|
|
99
|
+
/**
|
|
100
|
+
* @license
|
|
101
|
+
* Copyright 2017 Google LLC
|
|
102
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
|
+
*/
|
|
104
|
+
function(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}(".ft-size-watcher--watcher")],dt.prototype,"watcher",void 0),(at="ft-size-watcher",t=>{window.customElements.get(at)||window.customElements.define(at,t)})(function t(i){var e;let s;if("elementDefinitions"in i){s={};const e=i.elementDefinitions;for(let i in e)s[i]=t(e[i])}return e=class extends i{constructor(...t){super(t),this._constructor=this.constructor}render(){var t;let e=null!==(t=i.styles)&&void 0!==t?t:[];return Array.isArray(e)||(e=[e]),_`
|
|
105
|
+
${e.map((t=>_`
|
|
106
|
+
<style>${t}</style>
|
|
107
|
+
`))}
|
|
108
|
+
${super.render()}
|
|
109
|
+
`}},e.styles=void 0,e.elementDefinitions=s,e}(dt))}();
|
package/build/ft-size-watcher.js
CHANGED
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css, html } from "lit";
|
|
8
8
|
import { property, query } from "lit/decorators.js";
|
|
9
|
-
import {
|
|
9
|
+
import { Debouncer, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
export var FtSizeCategory;
|
|
11
11
|
(function (FtSizeCategory) {
|
|
12
12
|
FtSizeCategory["S"] = "S";
|
|
@@ -20,7 +20,7 @@ export class FtSizeChangeEvent extends CustomEvent {
|
|
|
20
20
|
super("change", { detail: { size, category } });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
export class FtSizeWatcher extends FtLitElement {
|
|
24
24
|
constructor() {
|
|
25
25
|
super(...arguments);
|
|
26
26
|
this.debounceTimeout = 100;
|
|
@@ -30,30 +30,7 @@ let FtSizeWatcher = class FtSizeWatcher extends FtLitElement {
|
|
|
30
30
|
this.resizeObserver = new ResizeObserver(() => this.updateSize());
|
|
31
31
|
this.debouncer = new Debouncer();
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
getStyles() {
|
|
35
|
-
return css `
|
|
36
|
-
.ft-size-watcher--pixel {
|
|
37
|
-
width: 0;
|
|
38
|
-
height: 0;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
43
|
-
width: 100%;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ft-size-watcher--watcher {
|
|
47
|
-
height: 1px;
|
|
48
|
-
width: 100vw;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
52
|
-
width: 100%;
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
getTemplate() {
|
|
33
|
+
render() {
|
|
57
34
|
return html `
|
|
58
35
|
<div class="ft-size-watcher--pixel ${this.local ? "ft-size-watcher--local" : ""}">
|
|
59
36
|
<div class="ft-size-watcher--watcher"></div>
|
|
@@ -90,8 +67,29 @@ let FtSizeWatcher = class FtSizeWatcher extends FtLitElement {
|
|
|
90
67
|
}
|
|
91
68
|
}, this.debounceTimeout);
|
|
92
69
|
}
|
|
93
|
-
}
|
|
70
|
+
}
|
|
94
71
|
FtSizeWatcher.elementDefinitions = {};
|
|
72
|
+
// language=CSS
|
|
73
|
+
FtSizeWatcher.styles = css `
|
|
74
|
+
.ft-size-watcher--pixel {
|
|
75
|
+
width: 0;
|
|
76
|
+
height: 0;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ft-size-watcher--watcher {
|
|
85
|
+
height: 1px;
|
|
86
|
+
width: 100vw;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
90
|
+
width: 100%;
|
|
91
|
+
}
|
|
92
|
+
`;
|
|
95
93
|
__decorate([
|
|
96
94
|
property({ type: Number })
|
|
97
95
|
], FtSizeWatcher.prototype, "debounceTimeout", void 0);
|
|
@@ -107,8 +105,4 @@ __decorate([
|
|
|
107
105
|
__decorate([
|
|
108
106
|
query(".ft-size-watcher--watcher")
|
|
109
107
|
], FtSizeWatcher.prototype, "watcher", void 0);
|
|
110
|
-
FtSizeWatcher = __decorate([
|
|
111
|
-
customElement("ft-size-watcher")
|
|
112
|
-
], FtSizeWatcher);
|
|
113
|
-
export { FtSizeWatcher };
|
|
114
108
|
//# sourceMappingURL=ft-size-watcher.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
!function(t,e,i,s){var h,r=function(t,e,i,s){for(var h,r=arguments.length,
|
|
2
|
-
.ft-size-watcher--pixel {
|
|
3
|
-
width: 0;
|
|
4
|
-
height: 0;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ft-size-watcher--watcher {
|
|
13
|
-
height: 1px;
|
|
14
|
-
width: 100vw;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
`}getTemplate(){return e.html`
|
|
1
|
+
!function(t,e,i,s){var h,r=function(t,e,i,s){for(var h,r=arguments.length,c=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(h=t[a])&&(c=(r<3?h(c):r>3?h(e,i,c):h(e,i))||c);return r>3&&c&&Object.defineProperty(e,i,c),c};t.FtSizeCategory=void 0,(h=t.FtSizeCategory||(t.FtSizeCategory={})).S="S",h.M="M",h.L="L",h.XL="XL",h.XXL="XXL";class c extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class a extends e.FtLitElement{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=t.FtSizeCategory.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e.Debouncer}render(){return i.html`
|
|
21
2
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
22
3
|
<div class="ft-size-watcher--watcher"></div>
|
|
23
4
|
</div>
|
|
24
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=t.FtSizeCategory.S:this.size<976?this.category=t.FtSizeCategory.M:this.size<1024?this.category=t.FtSizeCategory.L:this.size<1440?this.category=t.FtSizeCategory.XL:this.category=t.FtSizeCategory.XXL,this.dispatchEvent(new
|
|
5
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=t.FtSizeCategory.S:this.size<976?this.category=t.FtSizeCategory.M:this.size<1024?this.category=t.FtSizeCategory.L:this.size<1440?this.category=t.FtSizeCategory.XL:this.category=t.FtSizeCategory.XXL,this.dispatchEvent(new c(this.size,this.category)))}),this.debounceTimeout)}}a.elementDefinitions={},a.styles=i.css`
|
|
6
|
+
.ft-size-watcher--pixel {
|
|
7
|
+
width: 0;
|
|
8
|
+
height: 0;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ft-size-watcher--watcher {
|
|
17
|
+
height: 1px;
|
|
18
|
+
width: 100vw;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
`,r([s.property({type:Number})],a.prototype,"debounceTimeout",void 0),r([s.property({type:Boolean})],a.prototype,"local",void 0),r([s.property({type:Number,reflect:!0})],a.prototype,"size",void 0),r([s.property({type:String,reflect:!0})],a.prototype,"category",void 0),r([s.query(".ft-size-watcher--watcher")],a.prototype,"watcher",void 0),e.customElement("ft-size-watcher")(a),t.FtSizeChangeEvent=c,t.FtSizeWatcher=a,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators);
|
|
@@ -1,55 +1,69 @@
|
|
|
1
1
|
!function(t){
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
|
-
* Copyright
|
|
5
|
-
*
|
|
4
|
+
* Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
* This code may only be used under the BSD style license found at
|
|
6
|
+
* http://polymer.github.io/LICENSE.txt
|
|
7
|
+
* The complete set of authors may be found at
|
|
8
|
+
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
+
* The complete set of contributors may be found at
|
|
10
|
+
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
+
* Code distributed by Google as part of the polymer project is also
|
|
12
|
+
* subject to an additional IP rights grant found at
|
|
13
|
+
* http://polymer.github.io/PATENTS.txt
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
6
16
|
*/
|
|
7
|
-
const
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,n=new WeakMap,o=new WeakMap,r=new WeakMap,l=new WeakMap;let h;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=n.prototype.attributeChangedCallback,h=new Set(n.observedAttributes||[]);d(n,h,l);const a={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:h};this._definitionsByTag.set(t,a),this._definitionsByClass.set(n,a);let c=e.call(s,t);c||(c=u(t),i.call(s,t,c)),this===window.customElements&&(r.set(n,a),a.standInClass=c);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)o.delete(t),f(t,a,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){w.push(this),s.upgrade.apply(s,arguments),w.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=h;if(i)return h=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),n.set(i,e),i},window.HTMLElement.prototype=t.prototype;const a=t=>t===document||t instanceof ShadowRoot,c=t=>{let i=t.getRootNode();if(!a(i)){const t=w[w.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),a(i)||(i=l.get(i)?.getRootNode()||document)}return i.customElements},u=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=c(e)||window.customElements,n=s._getDefinition(i);return n?f(e,n):o.set(e,s),e}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):o.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){const o=t.toLowerCase();if(i.has(o)){const t=this.getAttribute(o);s.call(this,o,n),e.call(this,o,t,n)}else s.call(this,o,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);n.call(this,s),e.call(this,s,t,null)}else n.call(this,s)})},p=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):p(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),n.set(t,i),h=t;try{new i.elementClass}catch(t){p(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let w=[document];const b=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){w.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&l.set(t,this),w.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){w.push(this),e.set.call(this,t),w.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==n.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class o{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),n=i.get(s)||[];this[+e]=t,n.push(t),i.set(s,n)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=n.get(e);t&&!0!==t.formAssociated||i.push(e)}return new o(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.warn(t,e,s,i)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}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=[]}}
|
|
8
18
|
/**
|
|
9
19
|
* @license
|
|
10
20
|
* Copyright 2017 Google LLC
|
|
11
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
|
|
22
|
+
*/const e=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};function s(t){return(i,s)=>void 0!==s?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,s):e(t,i)
|
|
13
23
|
/**
|
|
14
24
|
* @license
|
|
15
25
|
* Copyright 2017 Google LLC
|
|
16
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/
|
|
18
|
-
var w;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:b}),(null!==(h=globalThis.reactiveElementVersions)&&void 0!==h?h:globalThis.reactiveElementVersions=[]).push("1.2.2");const y=globalThis.trustedTypes,x=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,m="?"+g,O=`<${m}>`,N=document,R=(t="")=>N.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,U=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,j=/'/g,k=/"/g,F=/^(?:script|style|textarea|title)$/i,L=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),B=new WeakMap,_=N.createTreeWalker(N,129,null,!1),z=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=S;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,c=0;for(;c<e.length&&(r.lastIndex=c,a=r.exec(e),null!==a);)c=r.lastIndex,r===S?"!--"===a[1]?r=M:void 0!==a[1]?r=U:void 0!==a[2]?(F.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=$):void 0!==a[3]&&(r=$):r===$?">"===a[0]?(r=null!=n?n:S,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?$:'"'===a[3]?k:j):r===k||r===j?r=$:r===M||r===U?r=S:(r=$,n=void 0);const u=r===$&&t[i+1].startsWith("/>")?" ":"";o+=r===S?e+O:h>=0?(s.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+g+u):e+g+(-2===h?(s.push(void 0),i):u)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(l):l,s]};class W{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[a,h]=z(t,i);if(this.el=W.createElement(a,e),_.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=_.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(g)){const e=h[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(g),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?P:"?"===i[1]?Z:"@"===i[1]?X:D})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(F.test(s.tagName)){const t=s.textContent.split(g),i=t.length-1;if(i>0){s.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],R()),_.nextNode(),l.push({type:2,index:++n});s.append(t[i],R())}}}else if(8===s.nodeType)if(s.data===m)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(g,t+1));)l.push({type:7,index:n}),t+=g.length-1}n++}}static createElement(t,i){const e=N.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,s){var n,o,r,l;if(i===T)return i;let a=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const h=E(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(o=null==a?void 0:a._$AO)||void 0===o||o.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=a:e._$Cu=a),void 0!==a&&(i=K(t,a._$AS(t,i.values),a,s)),i}class I{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:N).importNode(e,!0);_.currentNode=n;let o=_.nextNode(),r=0,l=0,a=s[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new H(o,o.nextSibling,this,t):1===a.type?i=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(i=new q(o,this,t)),this.v.push(i),a=s[++l]}r!==(null==a?void 0:a.index)&&(o=_.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class H{constructor(t,i,e,s){var n;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=K(this,t,i),E(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return C(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==A&&E(this._$AH)?this._$AA.nextSibling.data=t:this.S(N.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=W.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new I(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=B.get(t.strings);return void 0===i&&B.set(t.strings,i=new W(t)),i}A(t){C(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new H(this.M(R()),this.M(R()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class D{constructor(t,i,e,s,n){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=K(this,t,i,0),o=!E(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=K(this,s[e+r],i,r),l===T&&(l=this._$AH[r]),o||(o=!E(l)||l!==this._$AH[r]),l===A?t=A:t!==A&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.k(t)}k(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends D{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===A?void 0:t}}const V=y?y.emptyScript:"";class Z extends D{constructor(){super(...arguments),this.type=4}k(t){t&&t!==A?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class X extends D{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=K(this,t,i,0))&&void 0!==e?e:A)===T)return;const s=this._$AH,n=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==A&&(s===A||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class q{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const J=window.litHtmlPolyfillSupport;
|
|
27
|
+
*/}
|
|
19
28
|
/**
|
|
20
29
|
* @license
|
|
21
|
-
* Copyright
|
|
30
|
+
* Copyright 2021 Google LLC
|
|
22
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
32
|
*/
|
|
24
|
-
var
|
|
33
|
+
var n;null===(n=window.HTMLSlotElement)||void 0===n||n.prototype.assignedElements;const o=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),l=new Map;
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2019 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/class h{constructor(t,i){if(this._$cssResult$=!0,i!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=l.get(this.cssText);return o&&void 0===t&&(l.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const a=t=>new h("string"==typeof t?t:t+"",r),c=(t,...i)=>{const e=1===t.length?t[0]:i.reduce(((i,e,s)=>i+(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.")})(e)+t[s+1]),t[0]);return new h(e,r)},u=(t,i)=>{o?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const e=document.createElement("style"),s=window.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}))},d=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let i="";for(const e of t.cssRules)i+=e.cssText;return a(i)})(t):t
|
|
25
39
|
/**
|
|
26
40
|
* @license
|
|
27
41
|
* Copyright 2017 Google LLC
|
|
28
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
|
|
30
|
-
const it=(t,i)=>"method"===i.kind&&i.descriptor&&!("value"in i.descriptor)?{...i,finisher(e){e.createProperty(i.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,t)}};function et(t){return(i,e)=>void 0!==e?((t,i,e)=>{i.constructor.createProperty(e,t)})(t,i,e):it(t,i)
|
|
43
|
+
*/;var p;const f=window.trustedTypes,v=f?f.emptyScript:"",w=window.reactiveElementPolyfillSupport,b={toAttribute(t,i){switch(i){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let e=t;switch(i){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},x=(t,i)=>i!==t&&(i==i||t==t),m={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:x};class g extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var i;null!==(i=this.l)&&void 0!==i||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,e)=>{const s=this._$Eh(e,i);void 0!==s&&(this._$Eu.set(s,e),t.push(s))})),t}static createProperty(t,i=m){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const e="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,e,i);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,i,e){return{get(){return this[i]},set(s){const n=this[t];this[i]=s,this.requestUpdate(t,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||m}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._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const e of i)this.createProperty(e,t[e])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)i.unshift(d(t))}else void 0!==t&&i.push(d(t));return i}static _$Eh(t,i){const e=i.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,e;(null!==(i=this._$Eg)&&void 0!==i?i:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(e=t.hostConnected)||void 0===e||e.call(t))}removeController(t){var i;null===(i=this._$Eg)||void 0===i||i.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Et.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return u(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,e){this._$AK(t,e)}_$ES(t,i,e=m){var s,n;const o=this.constructor._$Eh(t,e);if(void 0!==o&&!0===e.reflect){const r=(null!==(n=null===(s=e.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==n?n:b.toAttribute)(i,e.type);this._$Ei=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Ei=null}}_$AK(t,i){var e,s,n;const o=this.constructor,r=o._$Eu.get(t);if(void 0!==r&&this._$Ei!==r){const t=o.getPropertyOptions(r),l=t.converter,h=null!==(n=null!==(s=null===(e=l)||void 0===e?void 0:e.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==n?n:b.fromAttribute;this._$Ei=r,this[r]=h(i,t.type),this._$Ei=null}}requestUpdate(t,i,e){let s=!0;void 0!==t&&(((e=e||this.constructor.getPropertyOptions(t)).hasChanged||x)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===e.reflect&&this._$Ei!==t&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(t,e))):s=!1),!this.isUpdatePending&&s&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}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._$Et&&(this._$Et.forEach(((t,i)=>this[i]=t)),this._$Et=void 0);let i=!1;const e=this._$AL;try{i=this.shouldUpdate(e),i?(this.willUpdate(e),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(e)):this._$EU()}catch(t){throw i=!1,this._$EU(),t}i&&this._$AE(e)}willUpdate(t){}_$AE(t){var i;null===(i=this._$Eg)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$E_&&(this._$E_.forEach(((t,i)=>this._$ES(i,this[i],t))),this._$E_=void 0),this._$EU()}updated(t){}firstUpdated(t){}}
|
|
31
44
|
/**
|
|
32
45
|
* @license
|
|
33
46
|
* Copyright 2017 Google LLC
|
|
34
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/
|
|
48
|
+
*/
|
|
49
|
+
var y;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:g}),(null!==(p=globalThis.reactiveElementVersions)&&void 0!==p?p:globalThis.reactiveElementVersions=[]).push("1.2.2");const O=globalThis.trustedTypes,N=O?O.createPolicy("lit-html",{createHTML:t=>t}):void 0,R=`lit$${(Math.random()+"").slice(9)}$`,C="?"+R,E=`<${C}>`,M=document,S=(t="")=>M.createComment(t),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,L=/>/g,A=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,B=/"/g,_=/^(?:script|style|textarea|title)$/i,j=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),z=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),K=new WeakMap,D=M.createTreeWalker(M,129,null,!1),I=(t,i)=>{const e=t.length-1,s=[];let n,o=2===i?"<svg>":"",r=$;for(let i=0;i<e;i++){const e=t[i];let l,h,a=-1,c=0;for(;c<e.length&&(r.lastIndex=c,h=r.exec(e),null!==h);)c=r.lastIndex,r===$?"!--"===h[1]?r=F:void 0!==h[1]?r=L:void 0!==h[2]?(_.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=A):void 0!==h[3]&&(r=A):r===A?">"===h[0]?(r=null!=n?n:$,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?A:'"'===h[3]?B:T):r===B||r===T?r=A:r===F||r===L?r=$:(r=A,n=void 0);const u=r===A&&t[i+1].startsWith("/>")?" ":"";o+=r===$?e+E:a>=0?(s.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+R+u):e+R+(-2===a?(s.push(void 0),i):u)}const l=o+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==N?N.createHTML(l):l,s]};class H{constructor({strings:t,_$litType$:i},e){let s;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=I(t,i);if(this.el=H.createElement(h,e),D.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(s=D.nextNode())&&l.length<r;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const i of s.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(R)){const e=a[o++];if(t.push(i),void 0!==e){const t=s.getAttribute(e.toLowerCase()+"$lit$").split(R),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?q:"?"===i[1]?G:"@"===i[1]?Q:X})}else l.push({type:6,index:n})}for(const i of t)s.removeAttribute(i)}if(_.test(s.tagName)){const t=s.textContent.split(R),i=t.length-1;if(i>0){s.textContent=O?O.emptyScript:"";for(let e=0;e<i;e++)s.append(t[e],S()),D.nextNode(),l.push({type:2,index:++n});s.append(t[i],S())}}}else if(8===s.nodeType)if(s.data===C)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(R,t+1));)l.push({type:7,index:n}),t+=R.length-1}n++}}static createElement(t,i){const e=M.createElement("template");return e.innerHTML=t,e}}function P(t,i,e=t,s){var n,o,r,l;if(i===z)return i;let h=void 0!==s?null===(n=e._$Cl)||void 0===n?void 0:n[s]:e._$Cu;const a=U(i)?void 0:i._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,e,s)),void 0!==s?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[s]=h:e._$Cu=h),void 0!==h&&(i=P(t,h._$AS(t,i.values),h,s)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:s}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:M).importNode(e,!0);D.currentNode=n;let o=D.nextNode(),r=0,l=0,h=s[0];for(;void 0!==h;){if(r===h.index){let i;2===h.type?i=new Z(o,o.nextSibling,this,t):1===h.type?i=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(i=new Y(o,this,t)),this.v.push(i),h=s[++l]}r!==(null==h?void 0:h.index)&&(o=D.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class Z{constructor(t,i,e,s){var n;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=s,this._$Cg=null===(n=null==s?void 0:s.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return k(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.S(M.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:s}=t,n="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=H.createElement(s.h,this.options)),s);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new V(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=K.get(t.strings);return void 0===i&&K.set(t.strings,i=new H(t)),i}A(t){k(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,s=0;for(const n of t)s===i.length?i.push(e=new Z(this.M(S()),this.M(S()),this,this.options)):e=i[s],e._$AI(n),s++;s<i.length&&(this._$AR(e&&e._$AB.nextSibling,s),i.length=s)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class X{constructor(t,i,e,s,n){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=i,this._$AM=s,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,s){const n=this.strings;let o=!1;if(void 0===n)t=P(this,t,i,0),o=!U(t)||t!==this._$AH&&t!==z,o&&(this._$AH=t);else{const s=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=P(this,s[e+r],i,r),l===z&&(l=this._$AH[r]),o||(o=!U(l)||l!==this._$AH[r]),l===W?t=W:t!==W&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}o&&!s&&this.k(t)}k(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends X{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===W?void 0:t}}const J=O?O.emptyScript:"";class G extends X{constructor(){super(...arguments),this.type=4}k(t){t&&t!==W?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class Q extends X{constructor(t,i,e,s,n){super(t,i,e,s,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=P(this,t,i,0))&&void 0!==e?e:W)===z)return;const s=this._$AH,n=t===W&&s!==W||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==W&&(s===W||n);n&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class Y{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const tt=window.litHtmlPolyfillSupport;
|
|
36
50
|
/**
|
|
37
51
|
* @license
|
|
38
|
-
* Copyright
|
|
52
|
+
* Copyright 2017 Google LLC
|
|
39
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
54
|
*/
|
|
41
|
-
var st;null===(st=window.HTMLSlotElement)||void 0===st||st.prototype.assignedElements,function(){function t(t){var i=0;return function(){return i<t.length?{done:!1,value:t[i++]}:{done:!0}}}function i(i){var e="undefined"!=typeof Symbol&&Symbol.iterator&&i[Symbol.iterator];return e?e.call(i):{next:t(i)}}function e(t){if(!(t instanceof Array)){t=i(t);for(var e,s=[];!(e=t.next()).done;)s.push(e.value);t=s}return t}var s="function"==typeof Object.create?Object.create:function(t){function i(){}return i.prototype=t,new i};var n,o=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var i=0;i<t.length;++i){var e=t[i];if(e&&e.Math==Math)return e}throw Error("Cannot find global object")}(this),r=function(){if("undefined"!=typeof Reflect&&Reflect.construct){if(function(){function t(){}return Reflect.construct(t,[],(function(){})),new t instanceof t}())return Reflect.construct;var t=Reflect.construct;return function(i,e,s){return i=t(i,e),s&&Reflect.setPrototypeOf(i,s.prototype),i}}return function(t,i,e){return void 0===e&&(e=t),e=s(e.prototype||Object.prototype),Function.prototype.apply.call(t,e,i)||e}}();if("function"==typeof Object.setPrototypeOf)n=Object.setPrototypeOf;else{var l;t:{var a={};try{a.__proto__={a:!0},l=a.a;break t}catch(t){}l=!1}n=l?function(t,i){if(t.__proto__=i,t.__proto__!==i)throw new TypeError(t+" is not extensible");return t}:null}var h=n;if(!ShadowRoot.prototype.createElement){var c,u=window.HTMLElement,d=window.customElements.define,f=window.customElements.get,p=window.customElements,v=new WeakMap,b=new WeakMap,w=new WeakMap,y=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map,this.o=new Map,this.i=new Map,this.h=new Map},window.CustomElementRegistry.prototype.define=function(t,e){if(t=t.toLowerCase(),void 0!==this.j(t))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+t+'" has already been used with this registry');if(void 0!==this.o.get(e))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var s=e.prototype.attributeChangedCallback,n=new Set(e.observedAttributes||[]);if(g(e,n,s),s={g:e,connectedCallback:e.prototype.connectedCallback,disconnectedCallback:e.prototype.disconnectedCallback,adoptedCallback:e.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:e.formAssociated,formAssociatedCallback:e.prototype.formAssociatedCallback,formDisabledCallback:e.prototype.formDisabledCallback,formResetCallback:e.prototype.formResetCallback,formStateRestoreCallback:e.prototype.formStateRestoreCallback,observedAttributes:n},this.l.set(t,s),this.o.set(e,s),(n=f.call(p,t))||(n=x(t),d.call(p,t,n)),this===window.customElements&&(w.set(e,s),s.s=n),n=this.h.get(t)){this.h.delete(t);for(var o=(n=i(n)).next();!o.done;o=n.next())o=o.value,b.delete(o),O(o,s,!0)}return void 0!==(s=this.i.get(t))&&(s.resolve(e),this.i.delete(t)),e},window.CustomElementRegistry.prototype.upgrade=function(){R.push(this),p.upgrade.apply(p,arguments),R.pop()},window.CustomElementRegistry.prototype.get=function(t){var i;return null==(i=this.l.get(t))?void 0:i.g},window.CustomElementRegistry.prototype.j=function(t){return this.l.get(t)},window.CustomElementRegistry.prototype.whenDefined=function(t){var i=this.j(t);if(void 0!==i)return Promise.resolve(i.g);var e=this.i.get(t);return void 0===e&&((e={}).promise=new Promise((function(t){return e.resolve=t})),this.i.set(t,e)),e.promise},window.CustomElementRegistry.prototype.m=function(t,i,e){var s=this.h.get(i);s||this.h.set(i,s=new Set),e?s.add(t):s.delete(t)},window.HTMLElement=function(){var t=c;if(t)return c=void 0,t;var i=w.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return t=Reflect.construct(u,[],i.s),Object.setPrototypeOf(t,this.constructor.prototype),v.set(t,i),t},window.HTMLElement.prototype=u.prototype;var x=function(t){function i(){var i=Reflect.construct(u,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);t:{var e=i.getRootNode();if(!(e===document||e instanceof ShadowRoot)){if((e=R[R.length-1])instanceof CustomElementRegistry){var s=e;break t}(e=e.getRootNode())===document||e instanceof ShadowRoot||(e=(null==(s=y.get(e))?void 0:s.getRootNode())||document)}s=e.customElements}return(e=(s=s||window.customElements).j(t))?O(i,e):b.set(i,s),i}return o.Object.defineProperty(i,"formAssociated",{configurable:!0,enumerable:!0,get:function(){return!0}}),i.prototype.connectedCallback=function(){var i=v.get(this);i?i.connectedCallback&&i.connectedCallback.apply(this,arguments):b.get(this).m(this,t,!0)},i.prototype.disconnectedCallback=function(){var i=v.get(this);i?i.disconnectedCallback&&i.disconnectedCallback.apply(this,arguments):b.get(this).m(this,t,!1)},i.prototype.adoptedCallback=function(){var t,i;null==(t=v.get(this))||null==(i=t.adoptedCallback)||i.apply(this,arguments)},i.prototype.formAssociatedCallback=function(){var t,i=v.get(this);i&&i.formAssociated&&(null==i||null==(t=i.formAssociatedCallback)||t.apply(this,arguments))},i.prototype.formDisabledCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formDisabledCallback)||t.apply(this,arguments))},i.prototype.formResetCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formResetCallback)||t.apply(this,arguments))},i.prototype.formStateRestoreCallback=function(){var t,i=v.get(this);null!=i&&i.formAssociated&&(null==i||null==(t=i.formStateRestoreCallback)||t.apply(this,arguments))},i},g=function(t,i,e){if(0!==i.size&&void 0!==e){var s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,n){if(t=t.toLowerCase(),i.has(t)){var o=this.getAttribute(t);s.call(this,t,n),e.call(this,t,o,n)}else s.call(this,t,n)});var n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){if(t=t.toLowerCase(),i.has(t)){var s=this.getAttribute(t);n.call(this,t),e.call(this,t,s,null)}else n.call(this,t)})}},m=function(t){var i=Object.getPrototypeOf(t);if(i!==window.HTMLElement)return i===u?Object.setPrototypeOf(t,window.HTMLElement):m(i)},O=function(t,i,e){e=void 0!==e&&e,Object.setPrototypeOf(t,i.g.prototype),v.set(t,i),c=t;try{new i.g}catch(t){m(i.g),new i.g}i.observedAttributes.forEach((function(e){t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},N=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){var i=N.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};var R=[document],E=function(t,i,e){var s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){R.push(this);var t=s.apply(e||this,arguments);return void 0!==t&&y.set(t,this),R.pop(),t}};E(ShadowRoot,"createElement",document),E(ShadowRoot,"importNode",document),E(Element,"insertAdjacentHTML");var C=function(t){var i=Object.getOwnPropertyDescriptor(t.prototype,"innerHTML");Object.defineProperty(t.prototype,"innerHTML",Object.assign({},i,{set:function(t){R.push(this),i.set.call(this,t),R.pop()}}))};if(C(Element),C(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var S=new WeakMap,M=HTMLElement.prototype.attachInternals;HTMLElement.prototype.attachInternals=function(t){for(var i=[],s=0;s<arguments.length;++s)i[s]=arguments[s];return i=M.call.apply(M,[this].concat(e(i))),S.set(i,this),i},["setFormValue","setValidity","checkValidity","reportValidity"].forEach((function(t){var i=window.ElementInternals.prototype,s=i[t];i[t]=function(t){for(var i=[],n=0;n<arguments.length;++n)i[n]=arguments[n];if(n=S.get(this),!0!==v.get(n).formAssociated)throw new DOMException("Failed to execute "+s+" on 'ElementInternals': The target element is not a form-associated custom element.");null==s||s.call.apply(s,[this].concat(e(i)))}}));var U=function(t){var i=r(Array,[].concat(e(t)),this.constructor);return i.h=t,i},$=U,j=Array;if($.prototype=s(j.prototype),$.prototype.constructor=$,h)h($,j);else for(var k in j)if("prototype"!=k)if(Object.defineProperties){var F=Object.getOwnPropertyDescriptor(j,k);F&&Object.defineProperty($,k,F)}else $[k]=j[k];$.u=j.prototype,o.Object.defineProperty(U.prototype,"value",{configurable:!0,enumerable:!0,get:function(){var t;return(null==(t=this.h.find((function(t){return!0===t.checked})))?void 0:t.value)||""}});var L=function(t){var i=this,e=new Map;t.forEach((function(t,s){var n=t.getAttribute("name"),o=e.get(n)||[];i[+s]=t,o.push(t),e.set(n,o)})),this.length=t.length,e.forEach((function(t,e){t&&(i[e]=1===t.length?t[0]:new U(t))}))};L.prototype.namedItem=function(t){return this[t]};var T=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){for(var t=T.get.call(this,[]),e=[],s=(t=i(t)).next();!s.done;s=t.next()){s=s.value;var n=v.get(s);n&&!0!==n.formAssociated||e.push(s)}return new L(e)}})}}}.call("object"==typeof globalThis?globalThis:window);try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.warn(t,e,s,i)}}}class nt{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){this.callbacks=[t],this.debounce(i)}queue(t,i){this.callbacks.push(t),this.debounce(i)}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=[]}}class ot{constructor(t,i,e,s,n){this.name=t,this.category=i,this.fallbackVariable=e,this.defaultValue=s,this.context=n,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,i,e){return new ot(t,i,void 0,e)}static extend(t,i,e){return new ot(t,i.category,i,e)}static external(t,i){return new ot(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return r`var(${o(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):o(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,i;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(i=this.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}ot.create("--ft-color-primary","COLOR","#2196F3"),ot.create("--ft-color-primary-variant","COLOR","#1976D2"),ot.create("--ft-color-secondary","COLOR","#FFCC80"),ot.create("--ft-color-secondary-variant","COLOR","#F57C00"),ot.create("--ft-color-surface","COLOR","#FFFFFF"),ot.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-error","COLOR","#B00020"),ot.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),ot.create("--ft-color-opacity-high","NUMBER","1"),ot.create("--ft-color-opacity-medium","NUMBER","0.74"),ot.create("--ft-color-opacity-disabled","NUMBER","0.38"),ot.create("--ft-color-on-primary","COLOR","#FFFFFF"),ot.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),ot.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ot.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ot.create("--ft-color-on-secondary","COLOR","#FFFFFF"),ot.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),ot.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ot.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ot.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),ot.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),ot.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),ot.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),ot.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),ot.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),ot.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),ot.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),ot.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),ot.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),ot.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),ot.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),ot.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),ot.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),ot.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),ot.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),ot.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),ot.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),ot.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),ot.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),ot.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),ot.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),ot.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.create("--ft-border-radius-S","SIZE","4px"),ot.create("--ft-border-radius-M","SIZE","8px"),ot.create("--ft-border-radius-L","SIZE","12px"),ot.create("--ft-border-radius-XL","SIZE","16px"),ot.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),ot.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),ot.create("--ft-transition-duration","UNKNOWN","250ms"),ot.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class rt extends(
|
|
55
|
+
var it,et;null==tt||tt(H,Z),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.1.3");class st extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,i;const e=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=e.firstChild),e}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,i,e)=>{var s,n;const o=null!==(s=null==e?void 0:e.renderBefore)&&void 0!==s?s:i;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==e?void 0:e.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new Z(i.insertBefore(S(),t),t,void 0,null!=e?e:{})}return r._$AI(t),r})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return z}}st.finalized=!0,st._$litElement$=!0,null===(it=globalThis.litElementHydrateSupport)||void 0===it||it.call(globalThis,{LitElement:st});const nt=globalThis.litElementPolyfillSupport;null==nt||nt({LitElement:st}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.1.2");class ot{constructor(t,i,e,s,n){this.name=t,this.category=i,this.fallbackVariable=e,this.defaultValue=s,this.context=n,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,i,e){return new ot(t,i,void 0,e)}static extend(t,i,e){return new ot(t,i.category,i,e)}static external(t,i){return new ot(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return c`var(${a(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):a(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,i;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(i=this.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}ot.create("--ft-color-primary","COLOR","#2196F3"),ot.create("--ft-color-primary-variant","COLOR","#1976D2"),ot.create("--ft-color-secondary","COLOR","#FFCC80"),ot.create("--ft-color-secondary-variant","COLOR","#F57C00"),ot.create("--ft-color-surface","COLOR","#FFFFFF"),ot.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-error","COLOR","#B00020"),ot.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),ot.create("--ft-color-opacity-high","NUMBER","1"),ot.create("--ft-color-opacity-medium","NUMBER","0.74"),ot.create("--ft-color-opacity-disabled","NUMBER","0.38"),ot.create("--ft-color-on-primary","COLOR","#FFFFFF"),ot.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),ot.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ot.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ot.create("--ft-color-on-secondary","COLOR","#FFFFFF"),ot.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),ot.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),ot.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),ot.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),ot.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),ot.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),ot.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),ot.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),ot.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),ot.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),ot.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),ot.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),ot.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),ot.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),ot.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),ot.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),ot.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),ot.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),ot.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),ot.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),ot.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),ot.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),ot.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),ot.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),ot.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),ot.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),ot.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.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)"),ot.create("--ft-border-radius-S","SIZE","4px"),ot.create("--ft-border-radius-M","SIZE","8px"),ot.create("--ft-border-radius-L","SIZE","12px"),ot.create("--ft-border-radius-XL","SIZE","16px"),ot.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),ot.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),ot.create("--ft-transition-duration","UNKNOWN","250ms"),ot.create("--ft-transition-timing-function","UNKNOWN","ease-in-out");class rt extends(
|
|
42
56
|
/**
|
|
43
57
|
* @license
|
|
44
58
|
* Copyright 2021 Google LLC
|
|
45
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
60
|
*/
|
|
47
|
-
function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:s}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const n=this.renderOptions.creationScope=this.attachShadow({...s,customElements:t.registry});return
|
|
48
|
-
${t.map((t=>
|
|
61
|
+
function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:i,elementDefinitions:e,shadowRootOptions:s}=t;e&&!i&&(t.registry=new CustomElementRegistry,Object.entries(e).forEach((([i,e])=>t.registry.define(i,e))));const n=this.renderOptions.creationScope=this.attachShadow({...s,customElements:t.registry});return u(n,this.constructor.elementStyles),n}}}(st)){getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),j`
|
|
62
|
+
${t.map((t=>j`
|
|
49
63
|
<style>${t}</style>
|
|
50
64
|
`))}
|
|
51
65
|
${this.getTemplate()}
|
|
52
|
-
`}
|
|
66
|
+
`}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}var lt,ht;c`
|
|
53
67
|
.ft-no-text-select {
|
|
54
68
|
-webkit-touch-callout: none;
|
|
55
69
|
-webkit-user-select: none;
|
|
@@ -58,33 +72,33 @@ function(t){return class extends t{createRenderRoot(){const t=this.constructor,{
|
|
|
58
72
|
-ms-user-select: none;
|
|
59
73
|
user-select: none;
|
|
60
74
|
}
|
|
61
|
-
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
62
|
-
.ft-size-watcher--pixel {
|
|
63
|
-
width: 0;
|
|
64
|
-
height: 0;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
69
|
-
width: 100%;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.ft-size-watcher--watcher {
|
|
73
|
-
height: 1px;
|
|
74
|
-
width: 100vw;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
78
|
-
width: 100%;
|
|
79
|
-
}
|
|
80
|
-
`}getTemplate(){return L`
|
|
75
|
+
`,navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(ht=null===(lt=window.safari)||void 0===lt?void 0:lt.pushNotification)||void 0===ht||ht.toString());var at,ct,ut=function(t,i,e,s){for(var n,o=arguments.length,r=o<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};t.FtSizeCategory=void 0,(at=t.FtSizeCategory||(t.FtSizeCategory={})).S="S",at.M="M",at.L="L",at.XL="XL",at.XXL="XXL";class dt extends CustomEvent{constructor(t,i){super("change",{detail:{size:t,category:i}})}}class pt extends rt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=t.FtSizeCategory.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new i}render(){return j`
|
|
81
76
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
82
77
|
<div class="ft-size-watcher--watcher"></div>
|
|
83
78
|
</div>
|
|
84
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=t.FtSizeCategory.S:this.size<976?this.category=t.FtSizeCategory.M:this.size<1024?this.category=t.FtSizeCategory.L:this.size<1440?this.category=t.FtSizeCategory.XL:this.category=t.FtSizeCategory.XXL,this.dispatchEvent(new dt(this.size,this.category)))}),this.debounceTimeout)}}
|
|
79
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=t.FtSizeCategory.S:this.size<976?this.category=t.FtSizeCategory.M:this.size<1024?this.category=t.FtSizeCategory.L:this.size<1440?this.category=t.FtSizeCategory.XL:this.category=t.FtSizeCategory.XXL,this.dispatchEvent(new dt(this.size,this.category)))}),this.debounceTimeout)}}pt.elementDefinitions={},pt.styles=c`
|
|
80
|
+
.ft-size-watcher--pixel {
|
|
81
|
+
width: 0;
|
|
82
|
+
height: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ft-size-watcher--pixel.ft-size-watcher--local {
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ft-size-watcher--watcher {
|
|
91
|
+
height: 1px;
|
|
92
|
+
width: 100vw;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
98
|
+
`,ut([s({type:Number})],pt.prototype,"debounceTimeout",void 0),ut([s({type:Boolean})],pt.prototype,"local",void 0),ut([s({type:Number,reflect:!0})],pt.prototype,"size",void 0),ut([s({type:String,reflect:!0})],pt.prototype,"category",void 0),ut([
|
|
85
99
|
/**
|
|
86
100
|
* @license
|
|
87
101
|
* Copyright 2017 Google LLC
|
|
88
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
89
103
|
*/
|
|
90
|
-
function(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}(".ft-size-watcher--watcher")],
|
|
104
|
+
function(t,i){return(({finisher:t,descriptor:i})=>(e,s)=>{var n;if(void 0===s){const s=null!==(n=e.originalKey)&&void 0!==n?n:e.key,o=null!=i?{kind:"method",placement:"prototype",key:s,descriptor:i(e.key)}:{...e,key:s};return null!=t&&(o.finisher=function(i){t(i,s)}),o}{const n=e.constructor;void 0!==i&&Object.defineProperty(e,s,i(s)),null==t||t(n,s)}})({descriptor:e=>{const s={get(){var i,e;return null!==(e=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==e?e:null},enumerable:!0,configurable:!0};if(i){const i="symbol"==typeof e?Symbol():"__"+e;s.get=function(){var e,s;return void 0===this[i]&&(this[i]=null!==(s=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==s?s:null),this[i]}}return s}})}(".ft-size-watcher--watcher")],pt.prototype,"watcher",void 0),(ct="ft-size-watcher",t=>{window.customElements.get(ct)||window.customElements.define(ct,t)})(pt),t.FtSizeChangeEvent=dt,t.FtSizeWatcher=pt,Object.defineProperty(t,"t",{value:!0})}({});
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-size-watcher",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Pixel component used to get viewport size",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
7
7
|
],
|
|
8
8
|
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
9
9
|
"license": "ISC",
|
|
10
|
-
"main": "build/
|
|
10
|
+
"main": "build/index.js",
|
|
11
11
|
"web": "build/ft-size-watcher.min.js",
|
|
12
|
-
"typings": "build/
|
|
12
|
+
"typings": "build/index",
|
|
13
13
|
"files": [
|
|
14
14
|
"build/*.ts",
|
|
15
15
|
"build/*.js"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "^0.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "^0.1.18",
|
|
23
23
|
"lit": "2.1.3"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "cb05ea190a9302378594a08d3a62a7002e461433"
|
|
26
26
|
}
|