@everymatrix/user-login 1.54.6 → 1.54.9
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/dist/cjs/{index-ec5acfb2.js → index-6ecc2fe2.js} +11 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-login.cjs.entry.js +10234 -9495
- package/dist/cjs/user-login.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/user-login/user-login.css +1 -0
- package/dist/collection/components/user-login/user-login.js +27 -12
- package/dist/esm/{index-a684ee07.js → index-c6348683.js} +11 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-login.entry.js +10237 -9498
- package/dist/esm/user-login.js +4 -4
- package/dist/types/components/user-login/user-login.d.ts +4 -0
- package/dist/user-login/p-4a2611d3.entry.js +2657 -0
- package/dist/user-login/{p-0ec11be8.js → p-7e21b2b2.js} +2 -2
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
- package/dist/user-login/p-08f0ee5a.entry.js +0 -3165
|
@@ -0,0 +1,2657 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-7e21b2b2.js";const i={en:{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",Unauthorized:"The player account number, e-mail address or password is incorrect",CountryRestricted:"Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."},tr:{invalidField:"Bu alan geçersiz",forgotPassword:"Şifremi Unuttum",userEmail:"Kullanıcı Adı veya E-posta",userPhone:"Telefon numarası",userPrefix:"Telefon kodu",password:"Şifre",login:"Giriş Yap",genericError:"Beklenmeyen bir hata oluştu",successMessage:"Giriş başarılı",Forbidden_UserAccount_Blocked:"Oyuncu hesabı engellendi",Unauthorized:"Oyuncu hesap numarası, e-posta adresi veya şifre hatalı",CountryRestricted:"Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin."},"en-us":{invalidField:"This field is invalid",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",Unauthorized:"The player account number, e-mail address or password is incorrect",CountryRestricted:"Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support."},ro:{invalidField:"Acest câmp este invalid",forgotPassword:"Ați uitat parola",userEmail:"Nume utilizator sau email",userPhone:"Număr de telefon",userPrefix:"Prefix telefon",password:"Parolă",login:"Autentificare",genericError:"A apărut o eroare neașteptată",successMessage:"Autentificare reușită",Forbidden_UserAccount_Blocked:"Contul de jucător este blocat",Unauthorized:"Numărul contului de jucător, adresa de e-mail sau parola sunt incorecte",CountryRestricted:"Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența."},hr:{invalidField:"Ovo polje je nevažeće",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",userPhone:"Broj telefona",userPrefix:"Telefonski prefix",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna",Forbidden_UserAccount_Blocked:"Vaš račun je blokiran",Unauthorized:"Lozinka, e-mail adresa ili korisničko ime su pogrešno uneseni",CountryRestricted:"Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku."},fr:{invalidField:"Ce champ est invalide",forgotPassword:"Mot de passe oublié",userEmail:"Nom d'utilisateur ou email",userPhone:"Numéro de téléphone",userPrefix:"Préfixe téléphonique",password:"Mot de passe",login:"Connexion",genericError:"Une erreur inattendue est survenue",successMessage:"Connexion réussie",Forbidden_UserAccount_Blocked:"Compte joueur bloqué",Unauthorized:"Le numéro de compte joueur, l'adresse e-mail ou le mot de passe est incorrect",CountryRestricted:"L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support."},cs:{invalidField:"Ovo polje je nevažeće.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",userPhone:"Telefonní číslo",userPrefix:"Telefonní předvolba",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",Unauthorized:"Číslo účtu hráče, e-mailová adresa nebo heslo je nesprávné",CountryRestricted:"Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu."},de:{invalidField:"Dieses Feld ist ungültig",forgotPassword:"Passwort vergessen",userEmail:"Benutzername oder E-Mail",userPhone:"Telefonnummer",userPrefix:"Telefonvorwahl",password:"Passwort",login:"Anmelden",genericError:"Ein unerwarteter Fehler ist aufgetreten",successMessage:"Erfolgreich angemeldet",Forbidden_UserAccount_Blocked:"Spielerkonto gesperrt",Unauthorized:"Die Spieler-Kontonummer, E-Mail-Adresse oder das Passwort ist falsch",CountryRestricted:"Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support."},"pt-br":{invalidField:"Este campo é inválido",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou e-mail",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Login",genericError:"Ocorreu um erro inesperado",successMessage:"Login bem-sucedido",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",Unauthorized:"O número da conta de jogador, o endereço de e-mail ou a senha estão incorretos",CountryRestricted:"O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte."},"es-mx":{invalidField:"Este campo es inválido",forgotPassword:"Olvidé la contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo telefónico",password:"Contraseña",login:"Iniciar sesión",genericError:"Ocurrió un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",Unauthorized:"El número de cuenta de jugador, la dirección de correo electrónico o la contraseña son incorrectos",CountryRestricted:"El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte."},es:{invalidField:"Este campo no es válido",forgotPassword:"Olvidé mi contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo de teléfono",password:"Contraseña",login:"Iniciar sesión",genericError:"Se ha producido un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",Unauthorized:"El número de cuenta, correo electrónico o contraseña es incorrecto",CountryRestricted:"No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte."},pt:{invalidField:"Este campo é inválido",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou email",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Entrar",genericError:"Ocorreu um erro inesperado",successMessage:"Login realizado com sucesso",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",Unauthorized:"O número da conta, e-mail ou senha está incorreto",CountryRestricted:"Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte."}},s=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})),o=(t,e,s)=>{let o=i[void 0!==e&&e in i?e:"en"][t];if(void 0!==s)for(const[t,e]of Object.entries(s.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
+
*/
|
|
7
|
+
window.Vaadin||={},window.Vaadin.featureFlags||={};const r={};function n(t,e="24.6.4"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!r[e])return r[e]=new Set,r[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===r[e].size,set(t){t&&r[e].size>0&&(r[e].forEach((t=>{customElements.define(t.is,t)})),r[e].clear())}});if(r[e])return void r[e].add(t)}var i;const s=customElements.get(t.is);if(s){const e=s.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${s.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
11
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
+
*/class a extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}n(a);
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2019 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/
|
|
18
|
+
const l=globalThis,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),d=new WeakMap;class u{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}}const p=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new u(i,t,c)},m=(t,e)=>{if(h)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=l.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},f=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,c))(e)})(t):t
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/,{is:v,defineProperty:g,getOwnPropertyDescriptor:b,getOwnPropertyNames:y,getOwnPropertySymbols:w,getPrototypeOf:x}=Object,_=globalThis,A=_.trustedTypes,C=A?A.emptyScript:"",k=_.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},S=(t,e)=>!v(t,e),P={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:S};Symbol.metadata??=Symbol("metadata"),_.litPropertyMetadata??=new WeakMap;class z extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=P){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&g(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=b(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const r=s?.call(this);o.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??P}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=x(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...y(t),...w(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return m(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:I).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:I;this._$Em=s,this[s]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??S)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),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._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}z.elementStyles=[],z.shadowRootOptions={mode:"open"},z.elementProperties=new Map,z.finalized=new Map,k?.({ReactiveElement:z}),(_.reactiveElementVersions??=[]).push("2.0.4");
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* Copyright 2017 Google LLC
|
|
27
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
+
*/
|
|
29
|
+
const E=globalThis,T=E.trustedTypes,O=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,B="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+F,M=`<${N}>`,j=document,L=()=>j.createComment(""),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,V=Array.isArray,U="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,H=/>/g,G=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,W=/"/g,Y=/^(?:script|style|textarea|title)$/i,J=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),K=new WeakMap,X=j.createTreeWalker(j,129);function Q(t,e){if(!V(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}const tt=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=D;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===D?"!--"===l[1]?n=q:void 0!==l[1]?n=H:void 0!==l[2]?(Y.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=G):void 0!==l[3]&&(n=G):n===G?">"===l[0]?(n=o??D,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?G:'"'===l[3]?W:$):n===W||n===$?n=G:n===q||n===H?n=D:(n=G,o=void 0);const d=n===G&&t[e+1].startsWith("/>")?" ":"";r+=n===D?i+M:h>=0?(s.push(a),i.slice(0,h)+B+i.slice(h)+F+d):i+F+(-2===h?e:d)}return[Q(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class et{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=tt(t,e);if(this.el=et.createElement(l,i),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=X.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(B)){const e=h[r++],i=s.getAttribute(t).split(F),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?nt:"?"===n[1]?at:"@"===n[1]?lt:rt}),s.removeAttribute(t)}else t.startsWith(F)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(Y.test(s.tagName)){const t=s.textContent.split(F),e=t.length-1;if(e>0){s.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),X.nextNode(),a.push({type:2,index:++o});s.append(t[e],L())}}}else if(8===s.nodeType)if(s.data===N)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(F,t+1));)a.push({type:7,index:o}),t+=F.length-1}o++}}static createElement(t,e){const i=j.createElement("template");return i.innerHTML=t,i}}function it(t,e,i=t,s){if(e===J)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=R(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=it(t,o._$AS(t,e.values),o,s)),e}class st{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??j).importNode(e,!0);X.currentNode=s;let o=X.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ot(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new ht(o,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(o=X.nextNode(),r++)}return X.currentNode=j,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ot{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=it(this,t,e),R(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):void 0!==t.nodeType?this.T(t):(t=>V(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Z&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=et.createElement(Q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new st(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){V(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new ot(this.O(L()),this.O(L()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=it(this,t,e,0),r=!R(t)||t!==this._$AH&&t!==J,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=it(this,s[i+n],e,n),a===J&&(a=this._$AH[n]),r||=!R(a)||a!==this._$AH[n],a===Z?t=Z:t!==Z&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class nt extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}class at extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Z)}}class lt extends rt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=it(this,t,e,0)??Z)===J)return;const i=this._$AH,s=t===Z&&i!==Z||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==Z&&(i===Z||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ht{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}}const ct=E.litHtmlPolyfillSupport;ct?.(et,ot),(E.litHtmlVersions??=[]).push("3.2.1");
|
|
30
|
+
/**
|
|
31
|
+
* @license
|
|
32
|
+
* Copyright 2017 Google LLC
|
|
33
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
+
*/
|
|
35
|
+
class dt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new ot(e.insertBefore(L(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}dt._$litElement$=!0,dt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:dt});const ut=globalThis.litElementPolyfillSupport;ut?.({LitElement:dt}),(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
39
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
40
|
+
*/
|
|
41
|
+
const pt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
45
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
+
*/,mt=[],ft=new Set,vt=new Set;function gt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function bt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function yt(t){return t.map((t=>t.cssText)).join("\n")}const wt="vaadin-themable-mixin-style";function xt(t){t.prototype instanceof dt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(wt).textContent=yt(t.getStylesForThis()),vt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&xt(i)}))}function _t(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof u||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):mt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&vt.forEach((i=>{if(bt(t,i)&&function(t){return gt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),xt(t),function(t){ft.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof dt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),m(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(wt).textContent=e.prototype._template.content.getElementById(wt).textContent}(i):i||ft.delete(e)}))}(t)}}))}function At(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():mt}function Ct(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=At().find((e=>e.moduleId===t));i?e.push(...kt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function It(t){const e=`${t}-default-theme`,i=At().filter((i=>i.moduleId!==e&&bt(i.themeFor,t))).map((t=>({...t,styles:[...kt(t),...t.styles],includePriority:Ct(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:At().filter((t=>t.moduleId===e))}const St=t=>class extends(pt(t)){constructor(){super(),ft.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&vt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!gt(this)&&function(t,e){const i=document.createElement("style");i.id=wt,i.textContent=yt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...It(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
50
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
|
+
*/,Pt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Pt("color-props",p`
|
|
52
|
+
:host {
|
|
53
|
+
/* Base (background) */
|
|
54
|
+
--lumo-base-color: #fff;
|
|
55
|
+
|
|
56
|
+
/* Tint */
|
|
57
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
58
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
59
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
60
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
61
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
62
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
63
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
64
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
65
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
66
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
67
|
+
--lumo-tint: #fff;
|
|
68
|
+
|
|
69
|
+
/* Shade */
|
|
70
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
71
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
72
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
73
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
74
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
75
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
76
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
77
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
78
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
79
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
80
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
81
|
+
|
|
82
|
+
/* Contrast */
|
|
83
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
84
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
85
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
86
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
87
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
88
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
89
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
90
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
91
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
92
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
93
|
+
--lumo-contrast: var(--lumo-shade);
|
|
94
|
+
|
|
95
|
+
/* Text */
|
|
96
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
97
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
98
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
99
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
100
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
101
|
+
|
|
102
|
+
/* Primary */
|
|
103
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
104
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
105
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
106
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
107
|
+
--lumo-primary-contrast-color: #fff;
|
|
108
|
+
|
|
109
|
+
/* Error */
|
|
110
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
111
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
112
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
113
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
114
|
+
--lumo-error-contrast-color: #fff;
|
|
115
|
+
|
|
116
|
+
/* Success */
|
|
117
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
118
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
119
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
120
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
121
|
+
--lumo-success-contrast-color: #fff;
|
|
122
|
+
|
|
123
|
+
/* Warning */
|
|
124
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
125
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
126
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
127
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* forced-colors mode adjustments */
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
html {
|
|
133
|
+
--lumo-disabled-text-color: GrayText;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`),_t("",p`
|
|
137
|
+
[theme~='dark'] {
|
|
138
|
+
/* Base (background) */
|
|
139
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
140
|
+
|
|
141
|
+
/* Tint */
|
|
142
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
143
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
144
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
145
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
146
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
147
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
148
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
149
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
150
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
151
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
152
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
153
|
+
|
|
154
|
+
/* Shade */
|
|
155
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
156
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
157
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
158
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
159
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
160
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
161
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
162
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
163
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
164
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
165
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
166
|
+
|
|
167
|
+
/* Contrast */
|
|
168
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
169
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
170
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
171
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
172
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
173
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
174
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
175
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
176
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
177
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
178
|
+
--lumo-contrast: var(--lumo-tint);
|
|
179
|
+
|
|
180
|
+
/* Text */
|
|
181
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
182
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
183
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
184
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
185
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
186
|
+
|
|
187
|
+
/* Primary */
|
|
188
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
189
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
190
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
191
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
192
|
+
--lumo-primary-contrast-color: #fff;
|
|
193
|
+
|
|
194
|
+
/* Error */
|
|
195
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
196
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
197
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
198
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
199
|
+
|
|
200
|
+
/* Success */
|
|
201
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
202
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
203
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
204
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
205
|
+
|
|
206
|
+
/* Warning */
|
|
207
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
208
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
209
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
210
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
html {
|
|
214
|
+
color: var(--lumo-body-text-color);
|
|
215
|
+
background-color: var(--lumo-base-color);
|
|
216
|
+
color-scheme: light;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[theme~='dark'] {
|
|
220
|
+
color: var(--lumo-body-text-color);
|
|
221
|
+
background-color: var(--lumo-base-color);
|
|
222
|
+
color-scheme: dark;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
h1,
|
|
226
|
+
h2,
|
|
227
|
+
h3,
|
|
228
|
+
h4,
|
|
229
|
+
h5,
|
|
230
|
+
h6 {
|
|
231
|
+
color: var(--lumo-header-text-color);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
a:where(:any-link) {
|
|
235
|
+
color: var(--lumo-primary-text-color);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
a:not(:any-link) {
|
|
239
|
+
color: var(--lumo-disabled-text-color);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
blockquote {
|
|
243
|
+
color: var(--lumo-secondary-text-color);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
code,
|
|
247
|
+
pre {
|
|
248
|
+
background-color: var(--lumo-contrast-10pct);
|
|
249
|
+
border-radius: var(--lumo-border-radius-m);
|
|
250
|
+
}
|
|
251
|
+
pre code {
|
|
252
|
+
background: transparent;
|
|
253
|
+
}
|
|
254
|
+
`,{moduleId:"lumo-color"}),Pt("spacing-props",p`
|
|
255
|
+
:host {
|
|
256
|
+
/* Square */
|
|
257
|
+
--lumo-space-xs: 0.25rem;
|
|
258
|
+
--lumo-space-s: 0.5rem;
|
|
259
|
+
--lumo-space-m: 1rem;
|
|
260
|
+
--lumo-space-l: 1.5rem;
|
|
261
|
+
--lumo-space-xl: 2.5rem;
|
|
262
|
+
|
|
263
|
+
/* Wide */
|
|
264
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
265
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
266
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
267
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
268
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
269
|
+
|
|
270
|
+
/* Tall */
|
|
271
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
272
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
273
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
274
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
275
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
276
|
+
}
|
|
277
|
+
`),p`
|
|
278
|
+
html {
|
|
279
|
+
/* Button */
|
|
280
|
+
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
281
|
+
--vaadin-button-border: none;
|
|
282
|
+
--vaadin-button-border-radius: var(--lumo-border-radius-m);
|
|
283
|
+
--vaadin-button-font-size: var(--lumo-font-size-m);
|
|
284
|
+
--vaadin-button-font-weight: 500;
|
|
285
|
+
--vaadin-button-height: var(--lumo-size-m);
|
|
286
|
+
--vaadin-button-margin: var(--lumo-space-xs) 0;
|
|
287
|
+
--vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
|
|
288
|
+
--vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
|
|
289
|
+
--vaadin-button-text-color: var(--lumo-primary-text-color);
|
|
290
|
+
--vaadin-button-primary-background: var(--lumo-primary-color);
|
|
291
|
+
--vaadin-button-primary-border: none;
|
|
292
|
+
--vaadin-button-primary-font-weight: 600;
|
|
293
|
+
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
|
294
|
+
--vaadin-button-tertiary-background: transparent !important;
|
|
295
|
+
--vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
|
|
296
|
+
--vaadin-button-tertiary-font-weight: 500;
|
|
297
|
+
--vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
|
|
298
|
+
/* Checkbox */
|
|
299
|
+
--vaadin-checkbox-background: var(--lumo-contrast-20pct);
|
|
300
|
+
--vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
|
|
301
|
+
--vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
|
|
302
|
+
--vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
|
|
303
|
+
--vaadin-checkbox-checkmark-char-indeterminate: '';
|
|
304
|
+
--vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
|
|
305
|
+
--vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
|
|
306
|
+
--vaadin-checkbox-label-color: var(--lumo-body-text-color);
|
|
307
|
+
--vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
|
|
308
|
+
--vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
|
|
309
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
310
|
+
--vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
|
|
311
|
+
--vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
|
|
312
|
+
/* Radio button */
|
|
313
|
+
--vaadin-radio-button-background: var(--lumo-contrast-20pct);
|
|
314
|
+
--vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
|
|
315
|
+
--vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
|
|
316
|
+
--vaadin-radio-button-dot-size: 3px;
|
|
317
|
+
--vaadin-radio-button-label-color: var(--lumo-body-text-color);
|
|
318
|
+
--vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
|
|
319
|
+
--vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
|
|
320
|
+
var(--lumo-space-xs);
|
|
321
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
322
|
+
--vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
|
|
323
|
+
--vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
|
|
324
|
+
--vaadin-selection-color: var(--lumo-primary-color);
|
|
325
|
+
--vaadin-selection-color-text: var(--lumo-primary-text-color);
|
|
326
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
327
|
+
--vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
|
|
328
|
+
--vaadin-focus-ring-width: 2px;
|
|
329
|
+
/* Label */
|
|
330
|
+
--vaadin-input-field-label-color: var(--lumo-secondary-text-color);
|
|
331
|
+
--vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
|
|
332
|
+
--vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
|
|
333
|
+
--vaadin-input-field-label-font-size: var(--lumo-font-size-s);
|
|
334
|
+
--vaadin-input-field-label-font-weight: 500;
|
|
335
|
+
/* Helper */
|
|
336
|
+
--vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
|
|
337
|
+
--vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
|
|
338
|
+
--vaadin-input-field-helper-font-weight: 400;
|
|
339
|
+
--vaadin-input-field-helper-spacing: 0.4em;
|
|
340
|
+
/* Error message */
|
|
341
|
+
--vaadin-input-field-error-color: var(--lumo-error-text-color);
|
|
342
|
+
--vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
|
|
343
|
+
--vaadin-input-field-error-font-weight: 400;
|
|
344
|
+
/* Input field */
|
|
345
|
+
--vaadin-input-field-background: var(--lumo-contrast-10pct);
|
|
346
|
+
--vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
|
|
347
|
+
--vaadin-input-field-icon-size: var(--lumo-icon-size-m);
|
|
348
|
+
--vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
|
|
349
|
+
--vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
|
|
350
|
+
--vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
|
|
351
|
+
--vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
|
|
352
|
+
--vaadin-input-field-height: var(--lumo-size-m);
|
|
353
|
+
--vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
|
|
354
|
+
--vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
|
|
355
|
+
--vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
|
|
356
|
+
--vaadin-input-field-value-color: var(--lumo-body-text-color);
|
|
357
|
+
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
358
|
+
--vaadin-input-field-value-font-weight: 500;
|
|
359
|
+
}
|
|
360
|
+
`,Pt("style-props",p`
|
|
361
|
+
:host {
|
|
362
|
+
/* Border radius */
|
|
363
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
364
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
365
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
366
|
+
|
|
367
|
+
/* Shadow */
|
|
368
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
369
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
370
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
371
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
372
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
373
|
+
|
|
374
|
+
/* Clickable element cursor */
|
|
375
|
+
--lumo-clickable-cursor: default;
|
|
376
|
+
}
|
|
377
|
+
`),Pt("font-icons",p`
|
|
378
|
+
@font-face {
|
|
379
|
+
font-family: 'lumo-icons';
|
|
380
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
381
|
+
format('woff');
|
|
382
|
+
font-weight: normal;
|
|
383
|
+
font-style: normal;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
html {
|
|
387
|
+
--lumo-icons-align-center: '\\ea01';
|
|
388
|
+
--lumo-icons-align-left: '\\ea02';
|
|
389
|
+
--lumo-icons-align-right: '\\ea03';
|
|
390
|
+
--lumo-icons-angle-down: '\\ea04';
|
|
391
|
+
--lumo-icons-angle-left: '\\ea05';
|
|
392
|
+
--lumo-icons-angle-right: '\\ea06';
|
|
393
|
+
--lumo-icons-angle-up: '\\ea07';
|
|
394
|
+
--lumo-icons-arrow-down: '\\ea08';
|
|
395
|
+
--lumo-icons-arrow-left: '\\ea09';
|
|
396
|
+
--lumo-icons-arrow-right: '\\ea0a';
|
|
397
|
+
--lumo-icons-arrow-up: '\\ea0b';
|
|
398
|
+
--lumo-icons-bar-chart: '\\ea0c';
|
|
399
|
+
--lumo-icons-bell: '\\ea0d';
|
|
400
|
+
--lumo-icons-calendar: '\\ea0e';
|
|
401
|
+
--lumo-icons-checkmark: '\\ea0f';
|
|
402
|
+
--lumo-icons-chevron-down: '\\ea10';
|
|
403
|
+
--lumo-icons-chevron-left: '\\ea11';
|
|
404
|
+
--lumo-icons-chevron-right: '\\ea12';
|
|
405
|
+
--lumo-icons-chevron-up: '\\ea13';
|
|
406
|
+
--lumo-icons-clock: '\\ea14';
|
|
407
|
+
--lumo-icons-cog: '\\ea15';
|
|
408
|
+
--lumo-icons-cross: '\\ea16';
|
|
409
|
+
--lumo-icons-download: '\\ea17';
|
|
410
|
+
--lumo-icons-drag-handle: '\\ea18';
|
|
411
|
+
--lumo-icons-dropdown: '\\ea19';
|
|
412
|
+
--lumo-icons-edit: '\\ea1a';
|
|
413
|
+
--lumo-icons-error: '\\ea1b';
|
|
414
|
+
--lumo-icons-eye: '\\ea1c';
|
|
415
|
+
--lumo-icons-eye-disabled: '\\ea1d';
|
|
416
|
+
--lumo-icons-menu: '\\ea1e';
|
|
417
|
+
--lumo-icons-minus: '\\ea1f';
|
|
418
|
+
--lumo-icons-ordered-list: '\\ea20';
|
|
419
|
+
--lumo-icons-phone: '\\ea21';
|
|
420
|
+
--lumo-icons-photo: '\\ea22';
|
|
421
|
+
--lumo-icons-play: '\\ea23';
|
|
422
|
+
--lumo-icons-plus: '\\ea24';
|
|
423
|
+
--lumo-icons-redo: '\\ea25';
|
|
424
|
+
--lumo-icons-reload: '\\ea26';
|
|
425
|
+
--lumo-icons-resize-handle: '\\ea27';
|
|
426
|
+
--lumo-icons-search: '\\ea28';
|
|
427
|
+
--lumo-icons-undo: '\\ea29';
|
|
428
|
+
--lumo-icons-unordered-list: '\\ea2a';
|
|
429
|
+
--lumo-icons-upload: '\\ea2b';
|
|
430
|
+
--lumo-icons-user: '\\ea2c';
|
|
431
|
+
}
|
|
432
|
+
`),Pt("sizing-props",p`
|
|
433
|
+
:host {
|
|
434
|
+
--lumo-size-xs: 1.625rem;
|
|
435
|
+
--lumo-size-s: 1.875rem;
|
|
436
|
+
--lumo-size-m: 2.25rem;
|
|
437
|
+
--lumo-size-l: 2.75rem;
|
|
438
|
+
--lumo-size-xl: 3.5rem;
|
|
439
|
+
|
|
440
|
+
/* Icons */
|
|
441
|
+
--lumo-icon-size-s: 1.25em;
|
|
442
|
+
--lumo-icon-size-m: 1.5em;
|
|
443
|
+
--lumo-icon-size-l: 2.25em;
|
|
444
|
+
/* For backwards compatibility */
|
|
445
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
446
|
+
}
|
|
447
|
+
`);
|
|
448
|
+
/**
|
|
449
|
+
* @license
|
|
450
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
451
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
452
|
+
*/
|
|
453
|
+
const zt=p`
|
|
454
|
+
:host {
|
|
455
|
+
/* prettier-ignore */
|
|
456
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
457
|
+
|
|
458
|
+
/* Font sizes */
|
|
459
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
460
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
461
|
+
--lumo-font-size-s: 0.875rem;
|
|
462
|
+
--lumo-font-size-m: 1rem;
|
|
463
|
+
--lumo-font-size-l: 1.125rem;
|
|
464
|
+
--lumo-font-size-xl: 1.375rem;
|
|
465
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
466
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
467
|
+
|
|
468
|
+
/* Line heights */
|
|
469
|
+
--lumo-line-height-xs: 1.25;
|
|
470
|
+
--lumo-line-height-s: 1.375;
|
|
471
|
+
--lumo-line-height-m: 1.625;
|
|
472
|
+
}
|
|
473
|
+
`;_t("",p`
|
|
474
|
+
body,
|
|
475
|
+
:host {
|
|
476
|
+
font-family: var(--lumo-font-family);
|
|
477
|
+
font-size: var(--lumo-font-size-m);
|
|
478
|
+
line-height: var(--lumo-line-height-m);
|
|
479
|
+
-webkit-text-size-adjust: 100%;
|
|
480
|
+
-webkit-font-smoothing: antialiased;
|
|
481
|
+
-moz-osx-font-smoothing: grayscale;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
small,
|
|
485
|
+
[theme~='font-size-s'] {
|
|
486
|
+
font-size: var(--lumo-font-size-s);
|
|
487
|
+
line-height: var(--lumo-line-height-s);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[theme~='font-size-xs'] {
|
|
491
|
+
font-size: var(--lumo-font-size-xs);
|
|
492
|
+
line-height: var(--lumo-line-height-xs);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
496
|
+
font-weight: 600;
|
|
497
|
+
line-height: var(--lumo-line-height-xs);
|
|
498
|
+
margin-block: 0;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
:where(h1) {
|
|
502
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
:where(h2) {
|
|
506
|
+
font-size: var(--lumo-font-size-xxl);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
:where(h3) {
|
|
510
|
+
font-size: var(--lumo-font-size-xl);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
:where(h4) {
|
|
514
|
+
font-size: var(--lumo-font-size-l);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
:where(h5) {
|
|
518
|
+
font-size: var(--lumo-font-size-m);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
:where(h6) {
|
|
522
|
+
font-size: var(--lumo-font-size-xs);
|
|
523
|
+
text-transform: uppercase;
|
|
524
|
+
letter-spacing: 0.03em;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
p,
|
|
528
|
+
blockquote {
|
|
529
|
+
margin-top: 0.5em;
|
|
530
|
+
margin-bottom: 0.75em;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
a {
|
|
534
|
+
text-decoration: none;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
a:where(:any-link):hover {
|
|
538
|
+
text-decoration: underline;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
hr {
|
|
542
|
+
display: block;
|
|
543
|
+
align-self: stretch;
|
|
544
|
+
height: 1px;
|
|
545
|
+
border: 0;
|
|
546
|
+
padding: 0;
|
|
547
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
548
|
+
background-color: var(--lumo-contrast-10pct);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
blockquote {
|
|
552
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
b,
|
|
556
|
+
strong {
|
|
557
|
+
font-weight: 600;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/* RTL specific styles */
|
|
561
|
+
blockquote[dir='rtl'] {
|
|
562
|
+
border-left: none;
|
|
563
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
564
|
+
}
|
|
565
|
+
`,{moduleId:"lumo-typography"}),Pt("typography-props",zt);const Et=p`
|
|
566
|
+
:host {
|
|
567
|
+
display: flex;
|
|
568
|
+
align-items: center;
|
|
569
|
+
box-sizing: border-box;
|
|
570
|
+
font-family: var(--lumo-font-family);
|
|
571
|
+
font-size: var(--lumo-font-size-m);
|
|
572
|
+
line-height: var(--lumo-line-height-xs);
|
|
573
|
+
padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
|
|
574
|
+
var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
575
|
+
min-height: var(--lumo-size-m);
|
|
576
|
+
outline: none;
|
|
577
|
+
border-radius: var(--lumo-border-radius-m);
|
|
578
|
+
cursor: var(--lumo-clickable-cursor);
|
|
579
|
+
-webkit-font-smoothing: antialiased;
|
|
580
|
+
-moz-osx-font-smoothing: grayscale;
|
|
581
|
+
-webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
|
|
582
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
583
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
584
|
+
--_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/* Checkmark */
|
|
588
|
+
[part='checkmark']::before {
|
|
589
|
+
display: var(--_lumo-item-selected-icon-display, none);
|
|
590
|
+
content: var(--lumo-icons-checkmark);
|
|
591
|
+
font-family: lumo-icons;
|
|
592
|
+
font-size: var(--lumo-icon-size-m);
|
|
593
|
+
line-height: 1;
|
|
594
|
+
font-weight: normal;
|
|
595
|
+
width: 1em;
|
|
596
|
+
height: 1em;
|
|
597
|
+
margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
|
|
598
|
+
color: var(--_selection-color-text);
|
|
599
|
+
flex: none;
|
|
600
|
+
opacity: 0;
|
|
601
|
+
transition:
|
|
602
|
+
transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
|
|
603
|
+
opacity 0.1s;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
:host([selected]) [part='checkmark']::before {
|
|
607
|
+
opacity: 1;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
:host([active]:not([selected])) [part='checkmark']::before {
|
|
611
|
+
transform: scale(0.8);
|
|
612
|
+
opacity: 0;
|
|
613
|
+
transition-duration: 0s;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
[part='content'] {
|
|
617
|
+
flex: auto;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/* Disabled */
|
|
621
|
+
:host([disabled]) {
|
|
622
|
+
color: var(--lumo-disabled-text-color);
|
|
623
|
+
cursor: default;
|
|
624
|
+
pointer-events: none;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
|
|
628
|
+
@media (any-hover: hover) {
|
|
629
|
+
:host(:hover:not([disabled])) {
|
|
630
|
+
background-color: var(--lumo-primary-color-10pct);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
:host([focus-ring]:not([disabled])) {
|
|
635
|
+
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/* RTL specific styles */
|
|
639
|
+
:host([dir='rtl']) {
|
|
640
|
+
padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
|
|
641
|
+
padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/* Slotted icons */
|
|
645
|
+
:host ::slotted(vaadin-icon) {
|
|
646
|
+
width: var(--lumo-icon-size-m);
|
|
647
|
+
height: var(--lumo-icon-size-m);
|
|
648
|
+
}
|
|
649
|
+
`;_t("vaadin-item",Et,{moduleId:"lumo-item"}),_t("vaadin-combo-box-item",[Et,p`
|
|
650
|
+
:host {
|
|
651
|
+
transition: background-color 100ms;
|
|
652
|
+
overflow: hidden;
|
|
653
|
+
--_lumo-item-selected-icon-display: block;
|
|
654
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
655
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
:host([focused]:not([disabled])) {
|
|
659
|
+
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
660
|
+
}
|
|
661
|
+
`],{moduleId:"lumo-combo-box-item"});
|
|
662
|
+
/**
|
|
663
|
+
* @license
|
|
664
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
665
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
666
|
+
*/
|
|
667
|
+
const Tt=p`
|
|
668
|
+
[part~='loader'] {
|
|
669
|
+
box-sizing: border-box;
|
|
670
|
+
width: var(--lumo-icon-size-s);
|
|
671
|
+
height: var(--lumo-icon-size-s);
|
|
672
|
+
border: 2px solid transparent;
|
|
673
|
+
border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color)
|
|
674
|
+
var(--lumo-primary-color);
|
|
675
|
+
border-radius: calc(0.5 * var(--lumo-icon-size-s));
|
|
676
|
+
opacity: 0;
|
|
677
|
+
pointer-events: none;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
:host(:not([loading])) [part~='loader'] {
|
|
681
|
+
display: none;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
:host([loading]) [part~='loader'] {
|
|
685
|
+
animation:
|
|
686
|
+
1s linear infinite lumo-loader-rotate,
|
|
687
|
+
0.3s 0.1s lumo-loader-fade-in both;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
@keyframes lumo-loader-fade-in {
|
|
691
|
+
0% {
|
|
692
|
+
opacity: 0;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
100% {
|
|
696
|
+
opacity: 1;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
@keyframes lumo-loader-rotate {
|
|
701
|
+
0% {
|
|
702
|
+
transform: rotate(0deg);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
100% {
|
|
706
|
+
transform: rotate(360deg);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
`
|
|
710
|
+
/**
|
|
711
|
+
* @license
|
|
712
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
713
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
714
|
+
*/,Ot=p`
|
|
715
|
+
:host {
|
|
716
|
+
top: var(--lumo-space-m);
|
|
717
|
+
right: var(--lumo-space-m);
|
|
718
|
+
bottom: var(--lumo-space-m);
|
|
719
|
+
left: var(--lumo-space-m);
|
|
720
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
721
|
+
/* stylelint-disable-next-line */
|
|
722
|
+
outline: 0px solid transparent;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
[part='overlay'] {
|
|
726
|
+
background-color: var(--lumo-base-color);
|
|
727
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
728
|
+
border-radius: var(--lumo-border-radius-m);
|
|
729
|
+
box-shadow:
|
|
730
|
+
0 0 0 1px var(--lumo-shade-5pct),
|
|
731
|
+
var(--lumo-box-shadow-m);
|
|
732
|
+
color: var(--lumo-body-text-color);
|
|
733
|
+
font-family: var(--lumo-font-family);
|
|
734
|
+
font-size: var(--lumo-font-size-m);
|
|
735
|
+
font-weight: 400;
|
|
736
|
+
line-height: var(--lumo-line-height-m);
|
|
737
|
+
letter-spacing: 0;
|
|
738
|
+
text-transform: none;
|
|
739
|
+
-webkit-text-size-adjust: 100%;
|
|
740
|
+
-webkit-font-smoothing: antialiased;
|
|
741
|
+
-moz-osx-font-smoothing: grayscale;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
[part='content'] {
|
|
745
|
+
padding: var(--lumo-space-xs);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
[part='backdrop'] {
|
|
749
|
+
background-color: var(--lumo-shade-20pct);
|
|
750
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
751
|
+
will-change: opacity;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@keyframes lumo-overlay-backdrop-enter {
|
|
755
|
+
0% {
|
|
756
|
+
opacity: 0;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
:host([closing]) [part='backdrop'] {
|
|
761
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
@keyframes lumo-overlay-backdrop-exit {
|
|
765
|
+
100% {
|
|
766
|
+
opacity: 0;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
@keyframes lumo-overlay-dummy-animation {
|
|
771
|
+
0% {
|
|
772
|
+
opacity: 1;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
100% {
|
|
776
|
+
opacity: 1;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
`;_t("",Ot,{moduleId:"lumo-overlay"});
|
|
780
|
+
/**
|
|
781
|
+
* @license
|
|
782
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
783
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
784
|
+
*/
|
|
785
|
+
const Bt=p`
|
|
786
|
+
:host([opening]),
|
|
787
|
+
:host([closing]) {
|
|
788
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
[part='overlay'] {
|
|
792
|
+
will-change: opacity, transform;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
:host([opening]) [part='overlay'] {
|
|
796
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
@keyframes lumo-menu-overlay-enter {
|
|
800
|
+
0% {
|
|
801
|
+
opacity: 0;
|
|
802
|
+
transform: translateY(-4px);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
:host([closing]) [part='overlay'] {
|
|
807
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
@keyframes lumo-menu-overlay-exit {
|
|
811
|
+
100% {
|
|
812
|
+
opacity: 0;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
`;_t("",Bt,{moduleId:"lumo-menu-overlay-core"}),_t("",[Ot,Bt,p`
|
|
816
|
+
/* Small viewport (bottom sheet) styles */
|
|
817
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
818
|
+
@media (max-width: 450px), (max-height: 450px) {
|
|
819
|
+
:host {
|
|
820
|
+
top: 0 !important;
|
|
821
|
+
right: 0 !important;
|
|
822
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
823
|
+
left: 0 !important;
|
|
824
|
+
align-items: stretch !important;
|
|
825
|
+
justify-content: flex-end !important;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
[part='overlay'] {
|
|
829
|
+
max-height: 50vh;
|
|
830
|
+
width: 100vw;
|
|
831
|
+
border-radius: 0;
|
|
832
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
836
|
+
[part='content'] {
|
|
837
|
+
padding: 30px var(--lumo-space-m);
|
|
838
|
+
max-height: inherit;
|
|
839
|
+
box-sizing: border-box;
|
|
840
|
+
-webkit-overflow-scrolling: touch;
|
|
841
|
+
overflow: auto;
|
|
842
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
843
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
[part='backdrop'] {
|
|
847
|
+
display: block;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/* Animations */
|
|
851
|
+
|
|
852
|
+
:host([opening]) [part='overlay'] {
|
|
853
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
:host([closing]),
|
|
857
|
+
:host([closing]) [part='backdrop'] {
|
|
858
|
+
animation-delay: 0.14s;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
:host([closing]) [part='overlay'] {
|
|
862
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
|
867
|
+
0% {
|
|
868
|
+
transform: translateY(150%);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
|
873
|
+
100% {
|
|
874
|
+
transform: translateY(150%);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
`],{moduleId:"lumo-menu-overlay"}),_t("vaadin-combo-box-overlay",[Ot,Bt,p`
|
|
878
|
+
[part='content'] {
|
|
879
|
+
padding: 0;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/* When items are empty, the spinner needs some room */
|
|
883
|
+
:host(:not([closing])) [part~='content'] {
|
|
884
|
+
min-height: calc(2 * var(--lumo-space-s) + var(--lumo-icon-size-s));
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
[part~='overlay'] {
|
|
888
|
+
position: relative;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
:host([top-aligned]) [part~='overlay'] {
|
|
892
|
+
margin-top: var(--lumo-space-xs);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
:host([bottom-aligned]) [part~='overlay'] {
|
|
896
|
+
margin-bottom: var(--lumo-space-xs);
|
|
897
|
+
}
|
|
898
|
+
`,Tt,p`
|
|
899
|
+
[part~='loader'] {
|
|
900
|
+
position: absolute;
|
|
901
|
+
z-index: 1;
|
|
902
|
+
inset-inline: var(--lumo-space-s);
|
|
903
|
+
top: var(--lumo-space-s);
|
|
904
|
+
margin-inline: auto 0;
|
|
905
|
+
}
|
|
906
|
+
`,p`
|
|
907
|
+
:host {
|
|
908
|
+
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
909
|
+
--_vaadin-combo-box-items-container-border-style: solid;
|
|
910
|
+
}
|
|
911
|
+
`],{moduleId:"lumo-combo-box-overlay"}),_t("vaadin-input-container",p`
|
|
912
|
+
:host {
|
|
913
|
+
background: var(--_background);
|
|
914
|
+
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
915
|
+
font-weight: var(--vaadin-input-field-value-font-weight, 500);
|
|
916
|
+
line-height: 1;
|
|
917
|
+
position: relative;
|
|
918
|
+
cursor: text;
|
|
919
|
+
box-sizing: border-box;
|
|
920
|
+
border-radius:
|
|
921
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
|
922
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
923
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
924
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
|
925
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
|
926
|
+
/* Fallback */
|
|
927
|
+
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
|
928
|
+
--_input-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
929
|
+
/* Default values */
|
|
930
|
+
--_background: var(--vaadin-input-field-background, var(--lumo-contrast-10pct));
|
|
931
|
+
--_hover-highlight: var(--vaadin-input-field-hover-highlight, var(--lumo-contrast-50pct));
|
|
932
|
+
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
933
|
+
--_icon-color: var(--vaadin-input-field-icon-color, var(--lumo-contrast-60pct));
|
|
934
|
+
--_icon-size: var(--vaadin-input-field-icon-size, var(--lumo-icon-size-m));
|
|
935
|
+
--_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
|
|
936
|
+
--_invalid-hover-highlight: var(--vaadin-input-field-invalid-hover-highlight, var(--lumo-error-color-50pct));
|
|
937
|
+
--_disabled-background: var(--vaadin-input-field-disabled-background, var(--lumo-contrast-5pct));
|
|
938
|
+
--_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
:host([dir='rtl']) {
|
|
942
|
+
border-radius:
|
|
943
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
944
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
945
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
946
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
|
947
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/* Used for hover and activation effects */
|
|
951
|
+
:host::after {
|
|
952
|
+
content: '';
|
|
953
|
+
position: absolute;
|
|
954
|
+
inset: 0;
|
|
955
|
+
border-radius: inherit;
|
|
956
|
+
pointer-events: none;
|
|
957
|
+
background: var(--_hover-highlight);
|
|
958
|
+
opacity: 0;
|
|
959
|
+
transition:
|
|
960
|
+
transform 0.15s,
|
|
961
|
+
opacity 0.2s;
|
|
962
|
+
transform-origin: 100% 0;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
::slotted(:not([slot$='fix'])) {
|
|
966
|
+
cursor: inherit;
|
|
967
|
+
min-height: var(--vaadin-input-field-height, var(--_input-height));
|
|
968
|
+
padding: 0 0.25em;
|
|
969
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
970
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
971
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/* Read-only */
|
|
975
|
+
:host([readonly]) {
|
|
976
|
+
color: var(--lumo-secondary-text-color);
|
|
977
|
+
background-color: transparent;
|
|
978
|
+
cursor: default;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
:host([readonly])::after {
|
|
982
|
+
background-color: transparent;
|
|
983
|
+
opacity: 1;
|
|
984
|
+
border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/* Disabled */
|
|
988
|
+
:host([disabled]) {
|
|
989
|
+
background: var(--_disabled-background);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
:host([disabled]) ::slotted(:not([slot$='fix'])) {
|
|
993
|
+
-webkit-text-fill-color: var(--_disabled-value-color);
|
|
994
|
+
color: var(--_disabled-value-color);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/* Invalid */
|
|
998
|
+
:host([invalid]) {
|
|
999
|
+
background: var(--_invalid-background);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
:host([invalid]:not([readonly]))::after {
|
|
1003
|
+
background: var(--_invalid-hover-highlight);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/* Slotted icons */
|
|
1007
|
+
::slotted(vaadin-icon) {
|
|
1008
|
+
color: var(--_icon-color);
|
|
1009
|
+
width: var(--_icon-size);
|
|
1010
|
+
height: var(--_icon-size);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
1014
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
1015
|
+
padding: 0.25em;
|
|
1016
|
+
box-sizing: border-box !important;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/* Text align */
|
|
1020
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1021
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
@-moz-document url-prefix() {
|
|
1025
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1026
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
1031
|
+
text-align: start;
|
|
1032
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
1036
|
+
text-align: center;
|
|
1037
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
1041
|
+
text-align: end;
|
|
1042
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
@-moz-document url-prefix() {
|
|
1046
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
1047
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
1048
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
@-moz-document url-prefix() {
|
|
1053
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
1054
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
1055
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* RTL specific styles */
|
|
1060
|
+
:host([dir='rtl'])::after {
|
|
1061
|
+
transform-origin: 0% 0;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1065
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1069
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1073
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
@-moz-document url-prefix() {
|
|
1077
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
1078
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1079
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
@-moz-document url-prefix() {
|
|
1084
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
1085
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1086
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
`,{moduleId:"lumo-input-container"});
|
|
1090
|
+
/**
|
|
1091
|
+
* @license
|
|
1092
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1093
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1094
|
+
*/
|
|
1095
|
+
const Ft=p`
|
|
1096
|
+
[part$='button'] {
|
|
1097
|
+
flex: none;
|
|
1098
|
+
width: 1em;
|
|
1099
|
+
height: 1em;
|
|
1100
|
+
line-height: 1;
|
|
1101
|
+
font-size: var(--lumo-icon-size-m);
|
|
1102
|
+
text-align: center;
|
|
1103
|
+
color: var(--lumo-contrast-60pct);
|
|
1104
|
+
transition: 0.2s color;
|
|
1105
|
+
cursor: var(--lumo-clickable-cursor);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
[part$='button']:hover {
|
|
1109
|
+
color: var(--lumo-contrast-90pct);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
:host([disabled]) [part$='button'],
|
|
1113
|
+
:host([readonly]) [part$='button'] {
|
|
1114
|
+
color: var(--lumo-contrast-20pct);
|
|
1115
|
+
cursor: default;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
[part$='button']::before {
|
|
1119
|
+
font-family: 'lumo-icons';
|
|
1120
|
+
display: block;
|
|
1121
|
+
}
|
|
1122
|
+
`;_t("",Ft,{moduleId:"lumo-field-button"});
|
|
1123
|
+
/**
|
|
1124
|
+
* @license
|
|
1125
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1126
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1127
|
+
*/
|
|
1128
|
+
const Nt=p`
|
|
1129
|
+
:host {
|
|
1130
|
+
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
:host([has-helper]) [part='helper-text']::before {
|
|
1134
|
+
content: '';
|
|
1135
|
+
display: block;
|
|
1136
|
+
height: var(--_helper-spacing);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
[part='helper-text'] {
|
|
1140
|
+
display: block;
|
|
1141
|
+
color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
|
|
1142
|
+
font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
|
|
1143
|
+
line-height: var(--lumo-line-height-xs);
|
|
1144
|
+
font-weight: var(--vaadin-input-field-helper-font-weight, 400);
|
|
1145
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1146
|
+
transition: color 0.2s;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
1150
|
+
color: var(--lumo-body-text-color);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
:host([disabled]) [part='helper-text'] {
|
|
1154
|
+
color: var(--lumo-disabled-text-color);
|
|
1155
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
1159
|
+
display: none;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
1163
|
+
content: '';
|
|
1164
|
+
display: block;
|
|
1165
|
+
height: var(--_helper-spacing);
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
1169
|
+
order: 0;
|
|
1170
|
+
padding-bottom: var(--_helper-spacing);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
1174
|
+
order: 1;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
1178
|
+
order: 2;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1182
|
+
order: 3;
|
|
1183
|
+
}
|
|
1184
|
+
`
|
|
1185
|
+
/**
|
|
1186
|
+
* @license
|
|
1187
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1188
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1189
|
+
*/,Mt=p`
|
|
1190
|
+
[part='label'] {
|
|
1191
|
+
align-self: flex-start;
|
|
1192
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
1193
|
+
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
1194
|
+
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
1195
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1196
|
+
transition: color 0.2s;
|
|
1197
|
+
line-height: 1;
|
|
1198
|
+
padding-right: 1em;
|
|
1199
|
+
padding-bottom: 0.5em;
|
|
1200
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
1201
|
+
negative margin to compensate */
|
|
1202
|
+
padding-top: 0.25em;
|
|
1203
|
+
margin-top: -0.25em;
|
|
1204
|
+
overflow: hidden;
|
|
1205
|
+
white-space: nowrap;
|
|
1206
|
+
text-overflow: ellipsis;
|
|
1207
|
+
position: relative;
|
|
1208
|
+
max-width: 100%;
|
|
1209
|
+
box-sizing: border-box;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
:host([focused]:not([readonly])) [part='label'] {
|
|
1213
|
+
color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
1217
|
+
color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
/* Touch device adjustment */
|
|
1221
|
+
@media (pointer: coarse) {
|
|
1222
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
1223
|
+
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
:host([has-label])::before {
|
|
1228
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
:host([has-label][theme~='small'])::before {
|
|
1232
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
:host([has-label]) {
|
|
1236
|
+
padding-top: var(--lumo-space-m);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
1240
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
:host([required]) [part='required-indicator']::after {
|
|
1244
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
|
1245
|
+
transition: opacity 0.2s;
|
|
1246
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
1247
|
+
position: absolute;
|
|
1248
|
+
right: 0;
|
|
1249
|
+
width: 1em;
|
|
1250
|
+
text-align: center;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
:host([invalid]) [part='required-indicator']::after {
|
|
1254
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
[part='error-message'] {
|
|
1258
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1259
|
+
font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
|
|
1260
|
+
line-height: var(--lumo-line-height-xs);
|
|
1261
|
+
font-weight: var(--vaadin-input-field-error-font-weight, 400);
|
|
1262
|
+
color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
|
|
1263
|
+
will-change: max-height;
|
|
1264
|
+
transition: 0.4s max-height;
|
|
1265
|
+
max-height: 5em;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
:host([has-error-message]) [part='error-message']::before,
|
|
1269
|
+
:host([has-error-message]) [part='error-message']::after {
|
|
1270
|
+
content: '';
|
|
1271
|
+
display: block;
|
|
1272
|
+
height: 0.4em;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
:host(:not([invalid])) [part='error-message'] {
|
|
1276
|
+
max-height: 0;
|
|
1277
|
+
overflow: hidden;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/* RTL specific styles */
|
|
1281
|
+
|
|
1282
|
+
:host([dir='rtl']) [part='label'] {
|
|
1283
|
+
margin-left: 0;
|
|
1284
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
:host([dir='rtl']) [part='label'] {
|
|
1288
|
+
padding-left: 1em;
|
|
1289
|
+
padding-right: 0;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
|
1293
|
+
right: auto;
|
|
1294
|
+
left: 0;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
:host([dir='rtl']) [part='error-message'] {
|
|
1298
|
+
margin-left: 0;
|
|
1299
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1300
|
+
}
|
|
1301
|
+
`;_t("",Mt,{moduleId:"lumo-required-field"});
|
|
1302
|
+
/**
|
|
1303
|
+
* @license
|
|
1304
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1305
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1306
|
+
*/
|
|
1307
|
+
const jt=[Mt,Ft,Nt,p`
|
|
1308
|
+
:host {
|
|
1309
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
|
1310
|
+
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
1311
|
+
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
1312
|
+
font-family: var(--lumo-font-family);
|
|
1313
|
+
-webkit-font-smoothing: antialiased;
|
|
1314
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1315
|
+
-webkit-tap-highlight-color: transparent;
|
|
1316
|
+
padding: var(--lumo-space-xs) 0;
|
|
1317
|
+
--_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
|
|
1318
|
+
--_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
|
|
1319
|
+
--_input-height: var(--vaadin-input-field-height, var(--lumo-text-field-size));
|
|
1320
|
+
--_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
:host::before {
|
|
1324
|
+
height: var(--_input-height);
|
|
1325
|
+
box-sizing: border-box;
|
|
1326
|
+
display: inline-flex;
|
|
1327
|
+
align-items: center;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
1331
|
+
-webkit-mask-image: none;
|
|
1332
|
+
mask-image: none;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
|
1336
|
+
color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
/* Hover */
|
|
1340
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1341
|
+
opacity: var(--vaadin-input-field-hover-highlight-opacity, 0.1);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/* Touch device adjustment */
|
|
1345
|
+
@media (pointer: coarse) {
|
|
1346
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1347
|
+
opacity: 0;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
1351
|
+
opacity: 0.2;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/* Trigger when not focusing using the keyboard */
|
|
1356
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
1357
|
+
transform: scaleX(0);
|
|
1358
|
+
transition-duration: 0.15s, 1s;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/* Focus-ring */
|
|
1362
|
+
:host([focus-ring]) [part='input-field'] {
|
|
1363
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/* Read-only and disabled */
|
|
1367
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
1368
|
+
opacity: 0;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/* Read-only style */
|
|
1372
|
+
:host([readonly]) {
|
|
1373
|
+
--vaadin-input-field-border-color: transparent;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/* Disabled style */
|
|
1377
|
+
:host([disabled]) {
|
|
1378
|
+
pointer-events: none;
|
|
1379
|
+
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
:host([disabled]) [part='label'],
|
|
1383
|
+
:host([disabled]) [part='input-field'] ::slotted([slot$='fix']) {
|
|
1384
|
+
color: var(--lumo-disabled-text-color);
|
|
1385
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
:host([disabled]) [part='input-field'] ::slotted(:not([slot$='fix'])) {
|
|
1389
|
+
color: var(--_disabled-value-color);
|
|
1390
|
+
-webkit-text-fill-color: var(--_disabled-value-color);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/* Invalid style */
|
|
1394
|
+
:host([invalid]) {
|
|
1395
|
+
--vaadin-input-field-border-color: var(--lumo-error-color);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
|
1399
|
+
box-shadow: 0 0 0 var(--_focus-ring-width) var(--lumo-error-color-50pct);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
:host([input-prevented]) [part='input-field'] {
|
|
1403
|
+
animation: shake 0.15s infinite;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
@keyframes shake {
|
|
1407
|
+
25% {
|
|
1408
|
+
transform: translateX(4px);
|
|
1409
|
+
}
|
|
1410
|
+
75% {
|
|
1411
|
+
transform: translateX(-4px);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
/* Small theme */
|
|
1416
|
+
:host([theme~='small']) {
|
|
1417
|
+
font-size: var(--lumo-font-size-s);
|
|
1418
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
:host([theme~='small']) [part='label'] {
|
|
1422
|
+
font-size: var(--lumo-font-size-xs);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
:host([theme~='small']) [part='error-message'] {
|
|
1426
|
+
font-size: var(--lumo-font-size-xxs);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/* Slotted content */
|
|
1430
|
+
[part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
|
|
1431
|
+
color: var(--lumo-secondary-text-color);
|
|
1432
|
+
font-weight: 400;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
[part='clear-button']::before {
|
|
1436
|
+
content: var(--lumo-icons-cross);
|
|
1437
|
+
}
|
|
1438
|
+
`];_t("",jt,{moduleId:"lumo-input-field-shared-styles"}),_t("vaadin-combo-box",[jt,p`
|
|
1439
|
+
[part='toggle-button']::before {
|
|
1440
|
+
content: var(--lumo-icons-dropdown);
|
|
1441
|
+
}
|
|
1442
|
+
`],{moduleId:"lumo-combo-box"}),
|
|
1443
|
+
/**
|
|
1444
|
+
@license
|
|
1445
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1446
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1447
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1448
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1449
|
+
Code distributed by Google as part of the polymer project is also
|
|
1450
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1451
|
+
*/
|
|
1452
|
+
window.JSCompiler_renameProperty=function(t){return t};
|
|
1453
|
+
/**
|
|
1454
|
+
@license
|
|
1455
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1456
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1457
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1458
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1459
|
+
Code distributed by Google as part of the polymer project is also
|
|
1460
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1461
|
+
*/
|
|
1462
|
+
let Lt,Rt,Vt=/(url\()([^)]*)(\))/g,Ut=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Dt(t,e){if(t&&Ut.test(t))return t;if("//"===t)return t;if(void 0===Lt){Lt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Lt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Lt)try{return new URL(t,e).href}catch(e){return t}return Rt||(Rt=document.implementation.createHTMLDocument("temp"),Rt.base=Rt.createElement("base"),Rt.head.appendChild(Rt.base),Rt.anchor=Rt.createElement("a"),Rt.body.appendChild(Rt.anchor)),Rt.base.href=e,Rt.anchor.href=t,Rt.anchor.href||t}function qt(t,e){return t.replace(Vt,(function(t,i,s,o){return i+"'"+Dt(s.replace(/["']/g,""),e)+"'"+o}))}function Ht(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
1463
|
+
/**
|
|
1464
|
+
@license
|
|
1465
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1466
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1467
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1468
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1469
|
+
Code distributed by Google as part of the polymer project is also
|
|
1470
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1471
|
+
*/const Gt=(!window.ShadyDOM||!window.ShadyDOM.inUse)&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let $t=window.Polymer&&window.Polymer.rootPath||Ht(document.baseURI||window.location.href),Wt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Yt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Jt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Zt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Kt=window.Polymer&&window.Polymer.legacyWarnings||!1,Xt=window.Polymer&&window.Polymer.syncInitialRender||!1,Qt=window.Polymer&&window.Polymer.legacyUndefined||!1,te=window.Polymer&&window.Polymer.orderedComputed||!1,ee=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ie=window.Polymer&&window.Polymer.fastDomIf||!1,se=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,oe=0;const re=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=oe++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
1472
|
+
/**
|
|
1473
|
+
@license
|
|
1474
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1475
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1476
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1477
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1478
|
+
Code distributed by Google as part of the polymer project is also
|
|
1479
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1480
|
+
*/let ne={},ae={};function le(t,e){ne[t]=ae[t.toLowerCase()]=e}function he(t){return ne[t]||ae[t.toLowerCase()]}class ce extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=he(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Dt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ht(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Yt&&void 0!==he(t))throw le(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,le(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}ce.prototype.modules=ne,customElements.define("dom-module",ce);
|
|
1481
|
+
/**
|
|
1482
|
+
@license
|
|
1483
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1484
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1485
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1486
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1487
|
+
Code distributed by Google as part of the polymer project is also
|
|
1488
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1489
|
+
*/
|
|
1490
|
+
const de="link[rel=import][type~=css]",ue="include",pe="shady-unscoped";function me(t){return ce.import(t)}function fe(t){const e=qt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ve(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...ge(e[t]));return i}function ge(t){const e=me(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...ye(e));const i=e.querySelector("template");i&&t.push(...be(i,e.assetpath)),e._styles=t}return e._styles}function be(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(ue);r&&i.push(...ve(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=qt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function ye(t){const e=[],i=t.querySelectorAll(de);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(pe);if(i&&!t._unscopedStyle){const e=fe(t);e.setAttribute(pe,""),t._unscopedStyle=e}else t._style||(t._style=fe(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
1491
|
+
/**
|
|
1492
|
+
@license
|
|
1493
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1494
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1495
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1496
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1497
|
+
Code distributed by Google as part of the polymer project is also
|
|
1498
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1499
|
+
*/const we=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
1500
|
+
/**
|
|
1501
|
+
@license
|
|
1502
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1503
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1504
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1505
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1506
|
+
Code distributed by Google as part of the polymer project is also
|
|
1507
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1508
|
+
*/function xe(t){return t.indexOf(".")>=0}function _e(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Ae(t,e){return 0===e.indexOf(t+".")}function Ce(t,e,i){return e+i.slice(t.length)}function ke(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Ie(t){return Array.isArray(t)?ke(t).split("."):t.toString().split(".")}function Se(t,e,i){let s=t,o=Ie(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Pe(t,e,i){let s=t,o=Ie(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
|
|
1509
|
+
/**
|
|
1510
|
+
@license
|
|
1511
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1512
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1513
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1514
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1515
|
+
Code distributed by Google as part of the polymer project is also
|
|
1516
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1517
|
+
*/const ze={},Ee=/-[a-z]/g,Te=/([A-Z])/g;function Oe(t){return ze[t]||(ze[t]=t.indexOf("-")<0?t:t.replace(Ee,(t=>t[1].toUpperCase())))}function Be(t){return ze[t]||(ze[t]=t.replace(Te,"-$1").toLowerCase())}
|
|
1518
|
+
/**
|
|
1519
|
+
@license
|
|
1520
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1521
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1522
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1523
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1524
|
+
Code distributed by Google as part of the polymer project is also
|
|
1525
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1526
|
+
*/let Fe=0,Ne=0,Me=[],je=0,Le=!1,Re=document.createTextNode("");new window.MutationObserver((function(){Le=!1;const t=Me.length;for(let e=0;e<t;e++){let t=Me[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Me.splice(0,t),Ne+=t})).observe(Re,{characterData:!0});const Ve={run:t=>(Le||(Le=!0,Re.textContent=je++),Me.push(t),Fe++),cancel(t){const e=t-Ne;if(e>=0){if(!Me[e])throw new Error("invalid async handle: "+t);Me[e]=null}}},Ue=re((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ve.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=we(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),De={};
|
|
1527
|
+
/**
|
|
1528
|
+
@license
|
|
1529
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1530
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1531
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1532
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1533
|
+
Code distributed by Google as part of the polymer project is also
|
|
1534
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1535
|
+
*/let qe=HTMLElement.prototype;for(;qe;){let t=Object.getOwnPropertyNames(qe);for(let e=0;e<t.length;e++)De[t[e]]=!0;qe=Object.getPrototypeOf(qe)}const He=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Ge=re((t=>{const e=Ue(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Oe(t[e]))}static attributeNameForProperty(t){return Be(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(He(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!De[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),$e={"dom-if":!0,"dom-repeat":!0};let We=!1,Ye=!1;const Je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function Ze(t){let e=t.getAttribute("is");if(e&&$e[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Je(t,i,e),i.removeAttribute(e)}}return t}function Ke(t,e){let i=e.parentInfo&&Ke(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Xe(t,e,i,s){s.id&&(e[s.id]=i)}function Qe(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function ti(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const ei=re((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!We){We=!0;const t=document.createElement("textarea");t.placeholder="a",Ye=t.placeholder===t.textContent}return Ye})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=Ze(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=Ke(s,t);Xe(0,s.$,i,t),ti(0,i,t,e),Qe(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
1536
|
+
/**
|
|
1537
|
+
* @fileoverview
|
|
1538
|
+
* @suppress {checkPrototypalTypes}
|
|
1539
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1540
|
+
* This code may only be used under the BSD style license found at
|
|
1541
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
1542
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
1543
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1544
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
1545
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1546
|
+
*/let ii=0;const si=[],oi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ri="__computeInfo",ni=/[A-Z]/;function ai(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function li(t,e,i,s,o,r){if(e){let n=!1;const a=ii++;for(let l in i){let h=e[o?_e(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!ci(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function hi(t,e,i,s,o,r,n,a){let l=!1,h=e[n?_e(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!ci(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function ci(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!Ae(i,t))}return!0}function di(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function ui(t,e,i){let s=_e(e);return s!==e&&(pi(t,Be(s)+"-changed",i[e],e),!0)}function pi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),we(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function mi(t,e,i,s,o,r){let n=(r?_e(e):e)!=e?e:null,a=n?Se(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),pi(t,o.eventName,a,n)}function fi(t,e,i,s,o){let r=t.__data[e];Wt&&(r=Wt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const vi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},gi=(t,e,i,s,o)=>{const r=e[o?_e(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===ii||o&&!ci(t,n.trigger)||(n.info.lastRun=ii,vi(n.info,i,s))}};function bi(t,e,i,s,o){let r=ki(t,e,i,0,o);if(r===si)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function yi(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Be(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,wi(t,e,a,s,l)}}function wi(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Oi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:xi,info:n,trigger:s})}}}function xi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Ce(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==si&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Wt&&(o=Wt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[oi.READ_ONLY]&&e[oi.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function _i(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=we(t)),t[r]=e.literal)}}function Ai(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Ce(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[oi.READ_ONLY]&&e[oi.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Ci(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function ki(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===si?si:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Ii=[],Si="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Pi="(?:("+Si+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",zi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Si+"\\s*(?:\\(\\s*(?:(?:"+Pi+"(?:,\\s*"+Pi+")*)?)\\)\\s*)?)(?:]]|}})","g");function Ei(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ti(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Ii};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Oi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Oi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=_e(e),i.structured=xe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Bi(t,e,i){let s=Se(t,i);return void 0===s&&(s=e[i]),s}function Fi(t,e,i,s){const o={indexSplices:s};Qt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Qt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Ni(t,e,i,s,o,r){Fi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Mi=re((t=>{const e=ei(Ge(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return oi}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(ji.length){let t=ji[ji.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[oi.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==oi.READ_ONLY);let s=ai(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ai(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,oi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,oi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,oi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,oi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||_e(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Se(this,t);if(!(t=Pe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ae(r,e)?(o=Ce(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ae(n,e)&&(o=Ce(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=we(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xe(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[oi.NOTIFY]&&this[oi.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[oi.READ_ONLY]&&this[oi.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[oi.COMPUTE];if(o)if(te){ii++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[oi.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[ri],i={},s=t[oi.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)gi(t,o,n,r,s);let a;for(;a=n.shift();)bi(t,"",e,0,a)&&gi(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;li(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),li(this,this[oi.REFLECT],e,i,o),li(this,this[oi.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[oi.NOTIFY],l=ii++;for(let n in e)e[n]&&(a&&hi(t,a,l,n,i,s,o)||o&&ui(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[oi.PROPAGATE]&&li(this,this[oi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{li(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=ke(t),e=ke(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ke(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Fi(this,Se(this,t,i),i.path,e)}get(t,e){return Se(e||this,t)}set(t,e,i){i?Pe(i,t,e):this[oi.READ_ONLY]&&this[oi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Se(this,t,i),o=s.length,r=s.push(...e);return e.length&&Ni(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Se(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Ni(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Se(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Ni(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Se(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Ni(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Se(this,t,i),o=s.unshift(...e);return e.length&&Ni(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Se(this,t,s),i=s.path}else i=Array.isArray(t)?ke(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,oi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,oi.OBSERVE,{fn:di,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,oi.OBSERVE,{fn:di,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ti(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ci(this,i,oi.OBSERVE,ki,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,oi.NOTIFY,{fn:mi,info:{eventName:Be(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,oi.REFLECT,{fn:fi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Ti(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Ci(this,s,oi.COMPUTE,bi,t,i);ai(this,ri)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ae(n,e),o=Bi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Se(s,n):o}}else h=a?Bi(s,i,n):s[n];if(Qt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return si;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),ji.push(this);let i=super._stampTemplate(t,e);if(ji.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];_i(o,i),Ai(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];we(we(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Ei(e)||" ",yi(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";ni.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Ei(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Oe(o)),yi(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ee&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(ie&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ee||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)yi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=zi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ti(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=zi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?ki(t,i,s,0,e.signature):i!=e.source?Se(t,e.source):r&&xe(i)?Se(t,i):t.__data[i],e.negate&&(n=!n),n}}})),ji=[],Li=re((t=>{const e=Ue(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1547
|
+
/**
|
|
1548
|
+
@license
|
|
1549
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1550
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1551
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1552
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1553
|
+
Code distributed by Google as part of the polymer project is also
|
|
1554
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1555
|
+
*/
|
|
1556
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ri=window.ShadyCSS&&window.ShadyCSS.cssBuild,Vi=re((t=>{const e=Li(Mi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Zt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Yt||Jt)&&(e=ce.import(t,"template"),Yt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Ht(t.url);else{const t=ce.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=$t,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return qt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Ri){const o=e.content.querySelectorAll("style"),r=be(e),n=function(t){let e=me(t);return e?ye(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),se&&Ri&&Gt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Dt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=we(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Xt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Dt(this.importPath)),Dt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Kt||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ui=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Di{constructor(t,e){Gi(t,e);const i=e.reduce(((e,i,s)=>e+qi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function qi(t){if(t instanceof Di)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Hi=function(t,...e){Gi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Di)return qi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ui&&(s=Ui.createHTML(s)),i.innerHTML=s,i},Gi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},$i=Vi(HTMLElement),Wi=[];function Yi(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Ji(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Ji();Wi.forEach((e=>{Yi(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Zi=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Yi(this,Ji(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Ji(),o=i===s&&-1===Wi.indexOf(this),r=!i&&e&&-1===Wi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Yi(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Wi.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){Wi.includes(this)||Wi.push(this)}__unsubscribe(){Wi.includes(this)&&Wi.splice(Wi.indexOf(this),1)}}
|
|
1557
|
+
/**
|
|
1558
|
+
* @license
|
|
1559
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1560
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1561
|
+
*/,Ki=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
|
|
1562
|
+
/**
|
|
1563
|
+
* @license
|
|
1564
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1565
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1566
|
+
*/;
|
|
1567
|
+
/**
|
|
1568
|
+
* @license
|
|
1569
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1570
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1571
|
+
*/
|
|
1572
|
+
_t("vaadin-input-container",p`
|
|
1573
|
+
:host {
|
|
1574
|
+
display: flex;
|
|
1575
|
+
align-items: center;
|
|
1576
|
+
flex: 0 1 auto;
|
|
1577
|
+
border-radius:
|
|
1578
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
|
1579
|
+
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
|
1580
|
+
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
|
1581
|
+
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
|
1582
|
+
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
|
1583
|
+
--_border-radius: var(--vaadin-input-field-border-radius, 0);
|
|
1584
|
+
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
1585
|
+
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
1586
|
+
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
:host([dir='rtl']) {
|
|
1590
|
+
border-radius:
|
|
1591
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
1592
|
+
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
|
1593
|
+
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
|
1594
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
|
1595
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
:host([hidden]) {
|
|
1599
|
+
display: none !important;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/* Reset the native input styles */
|
|
1603
|
+
::slotted(input) {
|
|
1604
|
+
-webkit-appearance: none;
|
|
1605
|
+
-moz-appearance: none;
|
|
1606
|
+
flex: auto;
|
|
1607
|
+
white-space: nowrap;
|
|
1608
|
+
overflow: hidden;
|
|
1609
|
+
width: 100%;
|
|
1610
|
+
height: 100%;
|
|
1611
|
+
outline: none;
|
|
1612
|
+
margin: 0;
|
|
1613
|
+
padding: 0;
|
|
1614
|
+
border: 0;
|
|
1615
|
+
border-radius: 0;
|
|
1616
|
+
min-width: 0;
|
|
1617
|
+
font: inherit;
|
|
1618
|
+
line-height: normal;
|
|
1619
|
+
color: inherit;
|
|
1620
|
+
background-color: transparent;
|
|
1621
|
+
/* Disable default invalid style in Firefox */
|
|
1622
|
+
box-shadow: none;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
::slotted(*) {
|
|
1626
|
+
flex: none;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
::slotted(:is(input, textarea))::placeholder {
|
|
1630
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
1631
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
1632
|
+
font: inherit;
|
|
1633
|
+
color: inherit;
|
|
1634
|
+
/* Override default opacity in Firefox */
|
|
1635
|
+
opacity: 1;
|
|
1636
|
+
}
|
|
1637
|
+
`,{moduleId:"vaadin-input-container-styles"});class Xi extends(Ki(St(Zi($i)))){static get is(){return"vaadin-input-container"}static get template(){return Hi`
|
|
1638
|
+
<slot name="prefix"></slot>
|
|
1639
|
+
<slot></slot>
|
|
1640
|
+
<slot name="suffix"></slot>
|
|
1641
|
+
`}}n(Xi);
|
|
1642
|
+
/**
|
|
1643
|
+
* @license
|
|
1644
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1645
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1646
|
+
*/
|
|
1647
|
+
const Qi=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0!==i&&void 0!==e&&(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
|
|
1648
|
+
/**
|
|
1649
|
+
* @license
|
|
1650
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1651
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1652
|
+
*/;class ts extends(Qi(St(Zi($i)))){static get template(){return Hi`
|
|
1653
|
+
<style>
|
|
1654
|
+
:host {
|
|
1655
|
+
display: block;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
:host([hidden]) {
|
|
1659
|
+
display: none;
|
|
1660
|
+
}
|
|
1661
|
+
</style>
|
|
1662
|
+
<span part="checkmark" aria-hidden="true"></span>
|
|
1663
|
+
<div part="content">
|
|
1664
|
+
<slot></slot>
|
|
1665
|
+
</div>
|
|
1666
|
+
`}static get is(){return"vaadin-combo-box-item"}}n(ts);
|
|
1667
|
+
/**
|
|
1668
|
+
@license
|
|
1669
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1670
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1671
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1672
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1673
|
+
Code distributed by Google as part of the polymer project is also
|
|
1674
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1675
|
+
*/
|
|
1676
|
+
let es=!1,is=[],ss=[];function os(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}
|
|
1677
|
+
/**
|
|
1678
|
+
* @license
|
|
1679
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1680
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1681
|
+
*/
|
|
1682
|
+
const rs=t=>t.test(navigator.userAgent),ns=t=>t.test(navigator.platform);rs(/Android/u),rs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),rs(/Firefox/u);const as=ns(/^iPad/u)||ns(/^Mac/u)&&navigator.maxTouchPoints>1,ls=ns(/^iPhone/u)||as,hs=rs(/^((?!chrome|android).)*safari/iu),cs=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
1683
|
+
/**
|
|
1684
|
+
* @license
|
|
1685
|
+
* Copyright (c) 2017 Anton Korzunov
|
|
1686
|
+
* SPDX-License-Identifier: MIT
|
|
1687
|
+
*/
|
|
1688
|
+
let ds=new WeakMap,us=new WeakMap,ps={},ms=0;const fs=t=>t&&t.nodeType===Node.ELEMENT_NODE,vs=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)};
|
|
1689
|
+
/**
|
|
1690
|
+
* @license
|
|
1691
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1692
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1693
|
+
*/
|
|
1694
|
+
class gs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=((t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>fs(t)?e.map((e=>{if(!fs(e))return vs(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return vs(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(vs(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);ps[i]||(ps[i]=new WeakMap);const r=ps[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(ds.get(t)||0)+1,l=(r.get(t)||0)+1;ds.set(t,a),r.set(t,l),n.push(t),1===a&&o&&us.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),a.clear(),ms+=1,()=>{n.forEach((t=>{const e=ds.get(t)-1,o=r.get(t)-1;ds.set(t,e),r.set(t,o),e||(us.has(t)?us.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),ms-=1,ms||(ds=new WeakMap,ds=new WeakMap,us=new WeakMap,ps={})}})(s,e,i,"aria-hidden")})(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
1695
|
+
/**
|
|
1696
|
+
* @license
|
|
1697
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1698
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1699
|
+
*/let bs=!1;function ys(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ws(){return bs}function xs(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function _s(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)xs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(_s(t.slice(0,i)),_s(t.slice(i)))}function As(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function Cs(t){return t.getRootNode().activeElement===t}function ks(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,s=function(t){if(!As(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=ks(t,e)||o})),o}window.addEventListener("keydown",(()=>{bs=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{bs=!1}),{capture:!0});
|
|
1700
|
+
/**
|
|
1701
|
+
* @license
|
|
1702
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1703
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1704
|
+
*/
|
|
1705
|
+
class Is{saveFocus(t){this.focusNode=t||ys()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ys()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
|
|
1706
|
+
/**
|
|
1707
|
+
* @license
|
|
1708
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1709
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1710
|
+
*/const Ss=[];class Ps{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return ks(t,e)?_s(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Cs).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ss.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Ss.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Ss).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
1711
|
+
/**
|
|
1712
|
+
* @license
|
|
1713
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1714
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1715
|
+
*/const zs=re((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Es=t=>class extends(zs(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new gs(this),this.__focusTrapController=new Ps(this),this.__focusRestorationController=new Is}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!ws();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ys();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
1716
|
+
/**
|
|
1717
|
+
* @license
|
|
1718
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1719
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1720
|
+
*/,Ts=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Os=()=>Ts().filter((t=>t.$.overlay)),Bs=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Os().pop())()}bringToFront(){let t="";const e=Ts().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Os().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Os();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
1721
|
+
/**
|
|
1722
|
+
* @license
|
|
1723
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1724
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1725
|
+
*/,Fs=t=>class extends(Es(Bs(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),ls&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){var i;t?(this._saveFocus(),this._animatedOpening(),i=()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)},es||(es=!0,requestAnimationFrame((function(){es=!1,function(t){for(;t.length;)os(t.shift())}(is),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)os(t.shift())}(ss)}))}))),ss.push([this,i,undefined]),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
1726
|
+
/**
|
|
1727
|
+
* @license
|
|
1728
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1729
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1730
|
+
*/,Ns=p`
|
|
1731
|
+
:host {
|
|
1732
|
+
z-index: 200;
|
|
1733
|
+
position: fixed;
|
|
1734
|
+
|
|
1735
|
+
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
1736
|
+
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
1737
|
+
|
|
1738
|
+
/* Default position constraints: the entire viewport. Note: themes can
|
|
1739
|
+
override this to introduce gaps between the overlay and the viewport. */
|
|
1740
|
+
inset: 0;
|
|
1741
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
1742
|
+
|
|
1743
|
+
/* Use flexbox alignment for the overlay part. */
|
|
1744
|
+
display: flex;
|
|
1745
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
|
1746
|
+
/* Align to center by default. */
|
|
1747
|
+
align-items: center;
|
|
1748
|
+
justify-content: center;
|
|
1749
|
+
|
|
1750
|
+
/* Allow centering when max-width/max-height applies. */
|
|
1751
|
+
margin: auto;
|
|
1752
|
+
|
|
1753
|
+
/* The host is not clickable, only the overlay part is. */
|
|
1754
|
+
pointer-events: none;
|
|
1755
|
+
|
|
1756
|
+
/* Remove tap highlight on touch devices. */
|
|
1757
|
+
-webkit-tap-highlight-color: transparent;
|
|
1758
|
+
|
|
1759
|
+
/* CSS API for host */
|
|
1760
|
+
--vaadin-overlay-viewport-bottom: 0;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
:host([hidden]),
|
|
1764
|
+
:host(:not([opened]):not([closing])),
|
|
1765
|
+
:host(:not([opened]):not([closing])) [part='overlay'] {
|
|
1766
|
+
display: none !important;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
[part='overlay'] {
|
|
1770
|
+
-webkit-overflow-scrolling: touch;
|
|
1771
|
+
overflow: auto;
|
|
1772
|
+
pointer-events: auto;
|
|
1773
|
+
|
|
1774
|
+
/* Prevent overflowing the host */
|
|
1775
|
+
max-width: 100%;
|
|
1776
|
+
box-sizing: border-box;
|
|
1777
|
+
|
|
1778
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
[part='backdrop'] {
|
|
1782
|
+
z-index: -1;
|
|
1783
|
+
content: '';
|
|
1784
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1785
|
+
position: fixed;
|
|
1786
|
+
inset: 0;
|
|
1787
|
+
pointer-events: auto;
|
|
1788
|
+
}
|
|
1789
|
+
`
|
|
1790
|
+
/**
|
|
1791
|
+
* @license
|
|
1792
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1793
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1794
|
+
*/;
|
|
1795
|
+
/**
|
|
1796
|
+
* @license
|
|
1797
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1798
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1799
|
+
*/function Ms(t){return t?new Set(t.split(" ")):new Set}function js(t){return t?[...t].join(" "):""}function Ls(t,e,i){const s=Ms(t.getAttribute(e));s.add(i),t.setAttribute(e,js(s))}
|
|
1800
|
+
/**
|
|
1801
|
+
* @license
|
|
1802
|
+
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1803
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1804
|
+
*/
|
|
1805
|
+
const Rs={start:"top",end:"bottom"},Vs={start:"left",end:"right"},Us=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Ds=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=
|
|
1806
|
+
/**
|
|
1807
|
+
* @license
|
|
1808
|
+
* Copyright (c) 2024 Vaadin Ltd.
|
|
1809
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1810
|
+
*/
|
|
1811
|
+
function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Us.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Us.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Rs,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Vs,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Vs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Rs)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Rs.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Vs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),c=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
|
|
1812
|
+
/**
|
|
1813
|
+
* @license
|
|
1814
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1815
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1816
|
+
*/,qs=t=>class extends(Ds(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!As(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
|
|
1817
|
+
/**
|
|
1818
|
+
* @license
|
|
1819
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1820
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1821
|
+
*/;_t("vaadin-combo-box-overlay",[Ns,p`
|
|
1822
|
+
#overlay {
|
|
1823
|
+
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
[part='content'] {
|
|
1827
|
+
display: flex;
|
|
1828
|
+
flex-direction: column;
|
|
1829
|
+
height: 100%;
|
|
1830
|
+
}
|
|
1831
|
+
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Hs extends(qs(Fs(Zi(St($i))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Hi`
|
|
1832
|
+
<div id="backdrop" part="backdrop" hidden></div>
|
|
1833
|
+
<div part="overlay" id="overlay">
|
|
1834
|
+
<div part="loader"></div>
|
|
1835
|
+
<div part="content" id="content"><slot></slot></div>
|
|
1836
|
+
</div>
|
|
1837
|
+
`}}
|
|
1838
|
+
/**
|
|
1839
|
+
* @license
|
|
1840
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1841
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1842
|
+
*/
|
|
1843
|
+
function Gs(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
1844
|
+
/**
|
|
1845
|
+
* @license
|
|
1846
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1847
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1848
|
+
*/n(Hs);let $s=0;function Ws(){return $s++}
|
|
1849
|
+
/**
|
|
1850
|
+
* @license
|
|
1851
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1852
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1853
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1854
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1855
|
+
* Code distributed by Google as part of the polymer project is also
|
|
1856
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1857
|
+
*/let Ys=0,Js=0;const Zs=[];let Ks=!1;const Xs={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Qs={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},to={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},eo={run(t){Ks||(Ks=!0,queueMicrotask((()=>function(){Ks=!1;const t=Zs.length;for(let e=0;e<t;e++){const t=Zs[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Zs.splice(0,t),Js+=t}()))),Zs.push(t);const e=Ys;return Ys+=1,e},cancel(t){const e=t-Js;if(e>=0){if(!Zs[e])throw new Error(`invalid async handle: ${t}`);Zs[e]=null}}},io=new Set;class so{static debounce(t,e,i){return t instanceof so?t._cancelAsync():t=new so,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,io.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),io.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function oo(t){io.add(t)}function ro(){const t=Boolean(io.size);return io.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const no=()=>{let t;do{t=ro()}while(t)},ao=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),lo=ao&&ao[1]>=8,ho={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),eo)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=l||i<=r);)if(t){if(a+o.length+1>=this._virtualCount)break;if(h+s>=c-this._scrollOffset)break;o.push(e),h+=s,e=(e+1)%l}else{if(n-o.length<=0)break;if(h+this._physicalSize-s<=d)break;o.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),to):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),eo))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Qs))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!lo&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(no(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Qs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=so.debounce(this._debouncers[t],i,e.bind(this)),oo(this._debouncers[t])}},co=1e3;
|
|
1858
|
+
/**
|
|
1859
|
+
* @license
|
|
1860
|
+
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
1861
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1862
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1863
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1864
|
+
* Code distributed by Google as part of the polymer project is also
|
|
1865
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1866
|
+
*/class uo{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<co?(i=t,this._vidxOffset=0):(i=co,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),no(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){no();let e=0,i=0;const s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=so.debounce(this.__placeholderClearDebouncer,Qs,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),no(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),no(),this._debounce("_update",this._update,eo)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=so.debounce(this.__fixInvalidItemPositioningDebouncer,Xs.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=so.debounce(this.__scrollReorderDebouncer,Xs.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=so.debounce(this.__debouncerWheelAnimationFrame,Qs,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=so.debounce(this._debouncerIgnoreNewWheel,Xs.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(hs){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=co,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(uo.prototype,ho);class po{constructor(t){this.__adapter=new uo(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
|
|
1867
|
+
/**
|
|
1868
|
+
* @license
|
|
1869
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1870
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1871
|
+
*/const mo=class{toString(){return""}},fo=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Ws()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof mo)&&(i&&void 0!==t&&void 0!==e?Gs(i,t)===Gs(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new po({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof mo&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
|
|
1872
|
+
/**
|
|
1873
|
+
* @license
|
|
1874
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1875
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1876
|
+
*/;
|
|
1877
|
+
/**
|
|
1878
|
+
* @license
|
|
1879
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1880
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1881
|
+
*/class vo extends(fo($i)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Hi`
|
|
1882
|
+
<style>
|
|
1883
|
+
:host {
|
|
1884
|
+
display: block;
|
|
1885
|
+
min-height: 1px;
|
|
1886
|
+
overflow: auto;
|
|
1887
|
+
|
|
1888
|
+
/* Fixes item background from getting on top of scrollbars on Safari */
|
|
1889
|
+
transform: translate3d(0, 0, 0);
|
|
1890
|
+
|
|
1891
|
+
/* Enable momentum scrolling on iOS */
|
|
1892
|
+
-webkit-overflow-scrolling: touch;
|
|
1893
|
+
|
|
1894
|
+
/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
|
|
1895
|
+
box-shadow: 0 0 0 white;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
#selector {
|
|
1899
|
+
border-width: var(--_vaadin-combo-box-items-container-border-width);
|
|
1900
|
+
border-style: var(--_vaadin-combo-box-items-container-border-style);
|
|
1901
|
+
border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);
|
|
1902
|
+
position: relative;
|
|
1903
|
+
}
|
|
1904
|
+
</style>
|
|
1905
|
+
<div id="selector">
|
|
1906
|
+
<slot></slot>
|
|
1907
|
+
</div>
|
|
1908
|
+
`}}n(vo);const go=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,bo=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function yo(t,e){if("function"!=typeof t)return;const i=go.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function wo(){
|
|
1909
|
+
/*! vaadin-dev-mode:start
|
|
1910
|
+
(function () {
|
|
1911
|
+
'use strict';
|
|
1912
|
+
|
|
1913
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
1914
|
+
return typeof obj;
|
|
1915
|
+
} : function (obj) {
|
|
1916
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1917
|
+
};
|
|
1918
|
+
|
|
1919
|
+
var classCallCheck = function (instance, Constructor) {
|
|
1920
|
+
if (!(instance instanceof Constructor)) {
|
|
1921
|
+
throw new TypeError("Cannot call a class as a function");
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
|
|
1925
|
+
var createClass = function () {
|
|
1926
|
+
function defineProperties(target, props) {
|
|
1927
|
+
for (var i = 0; i < props.length; i++) {
|
|
1928
|
+
var descriptor = props[i];
|
|
1929
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
1930
|
+
descriptor.configurable = true;
|
|
1931
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
1932
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
return function (Constructor, protoProps, staticProps) {
|
|
1937
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
1938
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
1939
|
+
return Constructor;
|
|
1940
|
+
};
|
|
1941
|
+
}();
|
|
1942
|
+
|
|
1943
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
1944
|
+
return window.Polymer && window.Polymer.version;
|
|
1945
|
+
};
|
|
1946
|
+
|
|
1947
|
+
var StatisticsGatherer = function () {
|
|
1948
|
+
function StatisticsGatherer(logger) {
|
|
1949
|
+
classCallCheck(this, StatisticsGatherer);
|
|
1950
|
+
|
|
1951
|
+
this.now = new Date().getTime();
|
|
1952
|
+
this.logger = logger;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
createClass(StatisticsGatherer, [{
|
|
1956
|
+
key: 'frameworkVersionDetectors',
|
|
1957
|
+
value: function frameworkVersionDetectors() {
|
|
1958
|
+
return {
|
|
1959
|
+
'Flow': function Flow() {
|
|
1960
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
1961
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
1962
|
+
return window.Vaadin.Flow.clients[key];
|
|
1963
|
+
}).filter(function (client) {
|
|
1964
|
+
return client.getVersionInfo;
|
|
1965
|
+
}).map(function (client) {
|
|
1966
|
+
return client.getVersionInfo().flow;
|
|
1967
|
+
});
|
|
1968
|
+
if (flowVersions.length > 0) {
|
|
1969
|
+
return flowVersions[0];
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
},
|
|
1973
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
1974
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
1975
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
1976
|
+
return client.getVersionInfo;
|
|
1977
|
+
}).map(function (client) {
|
|
1978
|
+
return client.getVersionInfo().vaadinVersion;
|
|
1979
|
+
});
|
|
1980
|
+
if (frameworkVersions.length > 0) {
|
|
1981
|
+
return frameworkVersions[0];
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
'AngularJs': function AngularJs() {
|
|
1986
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
1987
|
+
return window.angular.version.full;
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
'Angular': function Angular() {
|
|
1991
|
+
if (window.ng) {
|
|
1992
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
1993
|
+
if (tags.length > 0) {
|
|
1994
|
+
return tags[0].getAttribute("ng-version");
|
|
1995
|
+
}
|
|
1996
|
+
return "Unknown";
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
'Backbone.js': function BackboneJs() {
|
|
2000
|
+
if (window.Backbone) {
|
|
2001
|
+
return window.Backbone.VERSION;
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
'React': function React() {
|
|
2005
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
2006
|
+
if (!!document.querySelector(reactSelector)) {
|
|
2007
|
+
// React does not publish the version by default
|
|
2008
|
+
return "unknown";
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
'Ember': function Ember() {
|
|
2012
|
+
if (window.Em && window.Em.VERSION) {
|
|
2013
|
+
return window.Em.VERSION;
|
|
2014
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
2015
|
+
return window.Ember.VERSION;
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
'jQuery': function (_jQuery) {
|
|
2019
|
+
function jQuery() {
|
|
2020
|
+
return _jQuery.apply(this, arguments);
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
jQuery.toString = function () {
|
|
2024
|
+
return _jQuery.toString();
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
return jQuery;
|
|
2028
|
+
}(function () {
|
|
2029
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
2030
|
+
return jQuery.prototype.jquery;
|
|
2031
|
+
}
|
|
2032
|
+
}),
|
|
2033
|
+
'Polymer': function Polymer() {
|
|
2034
|
+
var version = getPolymerVersion();
|
|
2035
|
+
if (version) {
|
|
2036
|
+
return version;
|
|
2037
|
+
}
|
|
2038
|
+
},
|
|
2039
|
+
'LitElement': function LitElement() {
|
|
2040
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
2041
|
+
if (version) {
|
|
2042
|
+
return version;
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
'LitHtml': function LitHtml() {
|
|
2046
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
2047
|
+
if (version) {
|
|
2048
|
+
return version;
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
'Vue.js': function VueJs() {
|
|
2052
|
+
if (window.Vue) {
|
|
2053
|
+
return window.Vue.version;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
2057
|
+
}
|
|
2058
|
+
}, {
|
|
2059
|
+
key: 'getUsedVaadinElements',
|
|
2060
|
+
value: function getUsedVaadinElements(elements) {
|
|
2061
|
+
var version = getPolymerVersion();
|
|
2062
|
+
var elementClasses = void 0;
|
|
2063
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
2064
|
+
// Check all locations calling the method getEntries() in
|
|
2065
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
2066
|
+
// Currently it is only used by BootstrapHandler.
|
|
2067
|
+
if (version && version.indexOf('2') === 0) {
|
|
2068
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
2069
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
2070
|
+
return window.Vaadin[c];
|
|
2071
|
+
}).filter(function (c) {
|
|
2072
|
+
return c.is;
|
|
2073
|
+
});
|
|
2074
|
+
} else {
|
|
2075
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
2076
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
2077
|
+
}
|
|
2078
|
+
elementClasses.forEach(function (klass) {
|
|
2079
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
2080
|
+
elements[klass.is] = { version: version };
|
|
2081
|
+
});
|
|
2082
|
+
}
|
|
2083
|
+
}, {
|
|
2084
|
+
key: 'getUsedVaadinThemes',
|
|
2085
|
+
value: function getUsedVaadinThemes(themes) {
|
|
2086
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
2087
|
+
var theme;
|
|
2088
|
+
var version = getPolymerVersion();
|
|
2089
|
+
if (version && version.indexOf('2') === 0) {
|
|
2090
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
2091
|
+
theme = window.Vaadin[themeName];
|
|
2092
|
+
} else {
|
|
2093
|
+
// Polymer 3: themes are stored in custom element registry
|
|
2094
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
2095
|
+
}
|
|
2096
|
+
if (theme && theme.version) {
|
|
2097
|
+
themes[themeName] = { version: theme.version };
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
}
|
|
2101
|
+
}, {
|
|
2102
|
+
key: 'getFrameworks',
|
|
2103
|
+
value: function getFrameworks(frameworks) {
|
|
2104
|
+
var detectors = this.frameworkVersionDetectors();
|
|
2105
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
2106
|
+
var detector = detectors[framework];
|
|
2107
|
+
try {
|
|
2108
|
+
var version = detector();
|
|
2109
|
+
if (version) {
|
|
2110
|
+
frameworks[framework] = { version: version };
|
|
2111
|
+
}
|
|
2112
|
+
} catch (e) {}
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
}, {
|
|
2116
|
+
key: 'gather',
|
|
2117
|
+
value: function gather(storage) {
|
|
2118
|
+
var storedStats = storage.read();
|
|
2119
|
+
var gatheredStats = {};
|
|
2120
|
+
var types = ["elements", "frameworks", "themes"];
|
|
2121
|
+
|
|
2122
|
+
types.forEach(function (type) {
|
|
2123
|
+
gatheredStats[type] = {};
|
|
2124
|
+
if (!storedStats[type]) {
|
|
2125
|
+
storedStats[type] = {};
|
|
2126
|
+
}
|
|
2127
|
+
});
|
|
2128
|
+
|
|
2129
|
+
var previousStats = JSON.stringify(storedStats);
|
|
2130
|
+
|
|
2131
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
2132
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
2133
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
2134
|
+
|
|
2135
|
+
var now = this.now;
|
|
2136
|
+
types.forEach(function (type) {
|
|
2137
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
2138
|
+
keys.forEach(function (key) {
|
|
2139
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
2140
|
+
storedStats[type][key] = { firstUsed: now };
|
|
2141
|
+
}
|
|
2142
|
+
// Discards any previously logged version number
|
|
2143
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
2144
|
+
storedStats[type][key].lastUsed = now;
|
|
2145
|
+
});
|
|
2146
|
+
});
|
|
2147
|
+
|
|
2148
|
+
var newStats = JSON.stringify(storedStats);
|
|
2149
|
+
storage.write(newStats);
|
|
2150
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
2151
|
+
this.logger.debug("New stats: " + newStats);
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
}]);
|
|
2155
|
+
return StatisticsGatherer;
|
|
2156
|
+
}();
|
|
2157
|
+
|
|
2158
|
+
var StatisticsStorage = function () {
|
|
2159
|
+
function StatisticsStorage(key) {
|
|
2160
|
+
classCallCheck(this, StatisticsStorage);
|
|
2161
|
+
|
|
2162
|
+
this.key = key;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
createClass(StatisticsStorage, [{
|
|
2166
|
+
key: 'read',
|
|
2167
|
+
value: function read() {
|
|
2168
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
2169
|
+
try {
|
|
2170
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
2171
|
+
} catch (e) {
|
|
2172
|
+
return {};
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}, {
|
|
2176
|
+
key: 'write',
|
|
2177
|
+
value: function write(data) {
|
|
2178
|
+
localStorage.setItem(this.key, data);
|
|
2179
|
+
}
|
|
2180
|
+
}, {
|
|
2181
|
+
key: 'clear',
|
|
2182
|
+
value: function clear() {
|
|
2183
|
+
localStorage.removeItem(this.key);
|
|
2184
|
+
}
|
|
2185
|
+
}, {
|
|
2186
|
+
key: 'isEmpty',
|
|
2187
|
+
value: function isEmpty() {
|
|
2188
|
+
var storedStats = this.read();
|
|
2189
|
+
var empty = true;
|
|
2190
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
2191
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
2192
|
+
empty = false;
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
2195
|
+
|
|
2196
|
+
return empty;
|
|
2197
|
+
}
|
|
2198
|
+
}]);
|
|
2199
|
+
return StatisticsStorage;
|
|
2200
|
+
}();
|
|
2201
|
+
|
|
2202
|
+
var StatisticsSender = function () {
|
|
2203
|
+
function StatisticsSender(url, logger) {
|
|
2204
|
+
classCallCheck(this, StatisticsSender);
|
|
2205
|
+
|
|
2206
|
+
this.url = url;
|
|
2207
|
+
this.logger = logger;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
createClass(StatisticsSender, [{
|
|
2211
|
+
key: 'send',
|
|
2212
|
+
value: function send(data, errorHandler) {
|
|
2213
|
+
var logger = this.logger;
|
|
2214
|
+
|
|
2215
|
+
if (navigator.onLine === false) {
|
|
2216
|
+
logger.debug("Offline, can't send");
|
|
2217
|
+
errorHandler();
|
|
2218
|
+
return;
|
|
2219
|
+
}
|
|
2220
|
+
logger.debug("Sending data to " + this.url);
|
|
2221
|
+
|
|
2222
|
+
var req = new XMLHttpRequest();
|
|
2223
|
+
req.withCredentials = true;
|
|
2224
|
+
req.addEventListener("load", function () {
|
|
2225
|
+
// Stats sent, nothing more to do
|
|
2226
|
+
logger.debug("Response: " + req.responseText);
|
|
2227
|
+
});
|
|
2228
|
+
req.addEventListener("error", function () {
|
|
2229
|
+
logger.debug("Send failed");
|
|
2230
|
+
errorHandler();
|
|
2231
|
+
});
|
|
2232
|
+
req.addEventListener("abort", function () {
|
|
2233
|
+
logger.debug("Send aborted");
|
|
2234
|
+
errorHandler();
|
|
2235
|
+
});
|
|
2236
|
+
req.open("POST", this.url);
|
|
2237
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
2238
|
+
req.send(data);
|
|
2239
|
+
}
|
|
2240
|
+
}]);
|
|
2241
|
+
return StatisticsSender;
|
|
2242
|
+
}();
|
|
2243
|
+
|
|
2244
|
+
var StatisticsLogger = function () {
|
|
2245
|
+
function StatisticsLogger(id) {
|
|
2246
|
+
classCallCheck(this, StatisticsLogger);
|
|
2247
|
+
|
|
2248
|
+
this.id = id;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
createClass(StatisticsLogger, [{
|
|
2252
|
+
key: '_isDebug',
|
|
2253
|
+
value: function _isDebug() {
|
|
2254
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
2255
|
+
}
|
|
2256
|
+
}, {
|
|
2257
|
+
key: 'debug',
|
|
2258
|
+
value: function debug(msg) {
|
|
2259
|
+
if (this._isDebug()) {
|
|
2260
|
+
console.info(this.id + ": " + msg);
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
}]);
|
|
2264
|
+
return StatisticsLogger;
|
|
2265
|
+
}();
|
|
2266
|
+
|
|
2267
|
+
var UsageStatistics = function () {
|
|
2268
|
+
function UsageStatistics() {
|
|
2269
|
+
classCallCheck(this, UsageStatistics);
|
|
2270
|
+
|
|
2271
|
+
this.now = new Date();
|
|
2272
|
+
this.timeNow = this.now.getTime();
|
|
2273
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
2274
|
+
this.initialDelay = 24 * 60 * 60;
|
|
2275
|
+
|
|
2276
|
+
this.logger = new StatisticsLogger("statistics");
|
|
2277
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
2278
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
2279
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
createClass(UsageStatistics, [{
|
|
2283
|
+
key: 'maybeGatherAndSend',
|
|
2284
|
+
value: function maybeGatherAndSend() {
|
|
2285
|
+
var _this = this;
|
|
2286
|
+
|
|
2287
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
2288
|
+
return;
|
|
2289
|
+
}
|
|
2290
|
+
this.gatherer.gather(this.storage);
|
|
2291
|
+
setTimeout(function () {
|
|
2292
|
+
_this.maybeSend();
|
|
2293
|
+
}, this.gatherDelay * 1000);
|
|
2294
|
+
}
|
|
2295
|
+
}, {
|
|
2296
|
+
key: 'lottery',
|
|
2297
|
+
value: function lottery() {
|
|
2298
|
+
return true;
|
|
2299
|
+
}
|
|
2300
|
+
}, {
|
|
2301
|
+
key: 'currentMonth',
|
|
2302
|
+
value: function currentMonth() {
|
|
2303
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
2304
|
+
}
|
|
2305
|
+
}, {
|
|
2306
|
+
key: 'maybeSend',
|
|
2307
|
+
value: function maybeSend() {
|
|
2308
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2309
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
2310
|
+
|
|
2311
|
+
if (!firstUse) {
|
|
2312
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
2313
|
+
firstUse = this.timeNow;
|
|
2314
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
2318
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
2322
|
+
this.logger.debug("This month has already been processed");
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
2326
|
+
// Use random sampling
|
|
2327
|
+
if (this.lottery()) {
|
|
2328
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
2329
|
+
} else {
|
|
2330
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
2331
|
+
return;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
this.send();
|
|
2335
|
+
}
|
|
2336
|
+
}, {
|
|
2337
|
+
key: 'send',
|
|
2338
|
+
value: function send() {
|
|
2339
|
+
// Ensure we have the latest data
|
|
2340
|
+
this.gatherer.gather(this.storage);
|
|
2341
|
+
|
|
2342
|
+
// Read, send and clean up
|
|
2343
|
+
var data = this.storage.read();
|
|
2344
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2345
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
2346
|
+
var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
|
|
2347
|
+
var self = this;
|
|
2348
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
2349
|
+
// Revert the 'month processed' flag
|
|
2350
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
}], [{
|
|
2354
|
+
key: 'version',
|
|
2355
|
+
get: function get$1() {
|
|
2356
|
+
return '2.1.2';
|
|
2357
|
+
}
|
|
2358
|
+
}, {
|
|
2359
|
+
key: 'firstUseKey',
|
|
2360
|
+
get: function get$1() {
|
|
2361
|
+
return 'vaadin.statistics.firstuse';
|
|
2362
|
+
}
|
|
2363
|
+
}, {
|
|
2364
|
+
key: 'monthProcessedKey',
|
|
2365
|
+
get: function get$1() {
|
|
2366
|
+
return 'vaadin.statistics.monthProcessed';
|
|
2367
|
+
}
|
|
2368
|
+
}, {
|
|
2369
|
+
key: 'optOutKey',
|
|
2370
|
+
get: function get$1() {
|
|
2371
|
+
return 'vaadin.statistics.optout';
|
|
2372
|
+
}
|
|
2373
|
+
}]);
|
|
2374
|
+
return UsageStatistics;
|
|
2375
|
+
}();
|
|
2376
|
+
|
|
2377
|
+
try {
|
|
2378
|
+
window.Vaadin = window.Vaadin || {};
|
|
2379
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
2380
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
2381
|
+
} catch (e) {
|
|
2382
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
}());
|
|
2386
|
+
|
|
2387
|
+
vaadin-dev-mode:end **/}let xo;void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(bo?!(bo&&Object.keys(bo).map((t=>bo[t])).filter((t=>t.productionMode)).length>0):!yo((function(){return!0})))}catch(t){return!1}}()),
|
|
2388
|
+
/**
|
|
2389
|
+
* @license
|
|
2390
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2391
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2392
|
+
*/
|
|
2393
|
+
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)yo(t,e)}(wo)};const _o=new Set,Ao=t=>class extends(Zi(t)){static finalize(){super.finalize();const{is:t}=this;t&&!_o.has(t)&&(window.Vaadin.registrations.push(this),_o.add(t),window.Vaadin.developmentModeCallback&&(xo=so.debounce(xo,to,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),oo(xo)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
2394
|
+
/**
|
|
2395
|
+
* @license
|
|
2396
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2397
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2398
|
+
*/;class Co{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
|
|
2399
|
+
/**
|
|
2400
|
+
* @license
|
|
2401
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2402
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2403
|
+
*/class ko extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Ws()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Co(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
|
|
2404
|
+
/**
|
|
2405
|
+
* @license
|
|
2406
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2407
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2408
|
+
*/class Io extends ko{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
2409
|
+
/**
|
|
2410
|
+
* @license
|
|
2411
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2412
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2413
|
+
*/const So=re((t=>class extends t{get _keyboardActive(){return ws()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),Po=re((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),zo=t=>class extends(Po(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
2414
|
+
/**
|
|
2415
|
+
* @license
|
|
2416
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2417
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2418
|
+
*/,Eo=re((t=>class extends(So(zo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),To=re((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Oo=new WeakMap,Bo=re((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Oo.has(t)||Oo.set(t,new Set),Oo.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),Fo=re((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t),this._hasInputValue=t&&t.length>0}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),No=t=>class extends(Fo(To(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),cs||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
|
|
2419
|
+
/**
|
|
2420
|
+
* @license
|
|
2421
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2422
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2423
|
+
*/,Mo=new Map;
|
|
2424
|
+
/**
|
|
2425
|
+
* @license
|
|
2426
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2427
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2428
|
+
*/function jo(t){return Mo.has(t)||Mo.set(t,new WeakMap),Mo.get(t)}function Lo(t,e){t&&t.removeAttribute(e)}function Ro(t,e){if(!t||!e)return;const i=jo(e);if(i.has(t))return;const s=Ms(t.getAttribute(e));i.set(t,new Set(s))}function Vo(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=jo(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):Ro(t,e),Lo(t,e)),function(t,e,i){const s=Ms(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,js(s)):t.removeAttribute(e)}(t,e,o);const l=s||js(a);l&&Ls(t,e,l)}
|
|
2429
|
+
/**
|
|
2430
|
+
* @license
|
|
2431
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2432
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2433
|
+
*/
|
|
2434
|
+
class Uo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(Ro(e=this.__target,"aria-labelledby"),Lo(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=jo(e),s=i.get(t);s&&0!==s.size?Ls(t,e,js(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Vo(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Vo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Vo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
|
|
2435
|
+
/**
|
|
2436
|
+
* @license
|
|
2437
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2438
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2439
|
+
*/const Do=document.createElement("div");let qo;Do.style.position="fixed",Do.style.clip="rect(0px, 0px, 0px, 0px)",Do.setAttribute("aria-live","polite"),document.body.appendChild(Do);
|
|
2440
|
+
/**
|
|
2441
|
+
* @license
|
|
2442
|
+
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2443
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2444
|
+
*/
|
|
2445
|
+
class Ho extends ko{constructor(t,e,i,s={}){super(t,e,i,{...s,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
2446
|
+
/**
|
|
2447
|
+
* @license
|
|
2448
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2449
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2450
|
+
*/class Go extends Ho{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(Do.removeAttribute("aria-live"),Do.removeAttribute("role"),qo=so.debounce(qo,Qs,(()=>{Do.setAttribute("role","alert")}))):(qo&&qo.cancel(),Do.removeAttribute("role"),Do.setAttribute("aria-live",i)),Do.textContent="",setTimeout((()=>{Do.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
|
|
2451
|
+
/**
|
|
2452
|
+
* @license
|
|
2453
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2454
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2455
|
+
*/class $o extends Ho{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
2456
|
+
/**
|
|
2457
|
+
* @license
|
|
2458
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2459
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2460
|
+
*/class Wo extends Ho{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
2461
|
+
/**
|
|
2462
|
+
* @license
|
|
2463
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2464
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2465
|
+
*/const Yo=re((t=>class extends(zs(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Wo(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Jo=re((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}_requestValidation(){this.manualValidation||this.validate()}})),Zo=t=>class extends(Jo(Yo(zs(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Uo(this),this._helperController=new $o(this),this._errorController=new Go(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
2466
|
+
/**
|
|
2467
|
+
* @license
|
|
2468
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2469
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2470
|
+
*/,Ko=re((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),Xo=re((t=>class extends(Ko(Jo(Fo(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this._requestValidation():s&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),Qo=t=>class extends(Bo(Eo(Xo(Zo(No(To(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=so.debounce(this._preventInputDebouncer,Xs.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
2471
|
+
/**
|
|
2472
|
+
* @license
|
|
2473
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2474
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2475
|
+
*/;
|
|
2476
|
+
/**
|
|
2477
|
+
* @license
|
|
2478
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2479
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2480
|
+
*/class tr extends ko{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
|
|
2481
|
+
/**
|
|
2482
|
+
* @license
|
|
2483
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2484
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2485
|
+
*/class er{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
|
|
2486
|
+
/**
|
|
2487
|
+
* @license
|
|
2488
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2489
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2490
|
+
*/const ir=t=>class extends(Xo(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
|
|
2491
|
+
/**
|
|
2492
|
+
* @license
|
|
2493
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2494
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2495
|
+
*/,sr=[p`
|
|
2496
|
+
:host {
|
|
2497
|
+
display: inline-flex;
|
|
2498
|
+
outline: none;
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2501
|
+
:host::before {
|
|
2502
|
+
content: '\\2003';
|
|
2503
|
+
width: 0;
|
|
2504
|
+
display: inline-block;
|
|
2505
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
2506
|
+
to make vertical align for the host element work as expected */
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
:host([hidden]) {
|
|
2510
|
+
display: none !important;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
:host(:not([has-label])) [part='label'] {
|
|
2514
|
+
display: none;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
@media (forced-colors: active) {
|
|
2518
|
+
:host(:not([readonly])) [part='input-field'] {
|
|
2519
|
+
outline: 1px solid;
|
|
2520
|
+
outline-offset: -1px;
|
|
2521
|
+
}
|
|
2522
|
+
:host([focused]) [part='input-field'] {
|
|
2523
|
+
outline-width: 2px;
|
|
2524
|
+
}
|
|
2525
|
+
:host([disabled]) [part='input-field'] {
|
|
2526
|
+
outline-color: GrayText;
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
`
|
|
2530
|
+
/**
|
|
2531
|
+
* @license
|
|
2532
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2533
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2534
|
+
*/,p`
|
|
2535
|
+
[class$='container'] {
|
|
2536
|
+
display: flex;
|
|
2537
|
+
flex-direction: column;
|
|
2538
|
+
min-width: 100%;
|
|
2539
|
+
max-width: 100%;
|
|
2540
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
2541
|
+
}
|
|
2542
|
+
`
|
|
2543
|
+
/**
|
|
2544
|
+
* @license
|
|
2545
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2546
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2547
|
+
*/,p`
|
|
2548
|
+
[part='clear-button'] {
|
|
2549
|
+
display: none;
|
|
2550
|
+
cursor: default;
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
[part='clear-button']::before {
|
|
2554
|
+
content: '\\2715';
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
|
2558
|
+
display: block;
|
|
2559
|
+
}
|
|
2560
|
+
`
|
|
2561
|
+
/**
|
|
2562
|
+
* @license
|
|
2563
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
2564
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2565
|
+
*/];
|
|
2566
|
+
/**
|
|
2567
|
+
* @license
|
|
2568
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2569
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2570
|
+
*/
|
|
2571
|
+
function or(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return or(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function rr({getItemId:t},e,i,s=0,o=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:o+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=rr({getItemId:t},r,i,s+1,o+e.getFlatIndex(r.parentCacheIndex)+1);if(n)return n}}function nr(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const o=t.getFlatIndex(e),r=t.getSubCache(e);return r&&r.flatSize>0&&i.length?nr(r,i,s+o+1):s+o}
|
|
2572
|
+
/**
|
|
2573
|
+
* @license
|
|
2574
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2575
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2576
|
+
*/class ar{context;pageSize;items=[];pendingRequests={};__subCacheByIndex={};__size=0;__flatSize=0;constructor(t,e,i,s,o){this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=o,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let e=0;e<t;e++)this.items[e]||=this.context.placeholder}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new ar(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=or(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=or(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}
|
|
2577
|
+
/**
|
|
2578
|
+
* @license
|
|
2579
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2580
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2581
|
+
*/class lr extends EventTarget{host;dataProvider;dataProviderParams;pageSize;isExpanded;getItemId;rootCache;placeholder;isPlaceholder;constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:o,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),this.host=t,this.pageSize=i,this.getItemId=o,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return or(this.rootCache,t)}getItemContext(t){return rr({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return nr(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new ar(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i={...i,...this.dataProviderParams()});const s=(o,r)=>{t.pendingRequests[e]===s&&(void 0!==r?t.size=r:i.parentItem&&(t.size=o.length),t.setPage(e,o),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
|
|
2582
|
+
/**
|
|
2583
|
+
* @license
|
|
2584
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
2585
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2586
|
+
*/const hr=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new lr(this,{placeholder:new mo,isPlaceholder:t=>t instanceof mo,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){this._shouldFetchData()&&t&&(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),this.opened||this._isInputFocused()||this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}}
|
|
2587
|
+
/**
|
|
2588
|
+
* @license
|
|
2589
|
+
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2590
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2591
|
+
*/,cr=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
|
|
2592
|
+
/**
|
|
2593
|
+
* @license
|
|
2594
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2595
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2596
|
+
*/;
|
|
2597
|
+
/**
|
|
2598
|
+
* @license
|
|
2599
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2600
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2601
|
+
*/
|
|
2602
|
+
class dr{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
|
|
2603
|
+
/**
|
|
2604
|
+
* @license
|
|
2605
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
2606
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2607
|
+
*/function ur(t){return null!=t}function pr(t,e){return t.findIndex((t=>!(t instanceof mo)&&e(t)))}const mr=t=>class extends(cr(zs(Jo(So(To(Fo(Po(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new dr(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&Cs(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?this._isInputFocused()||cs||this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Gs(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Gs(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{cs&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(ur(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&ur(e)?pr(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?pr(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof mo||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(ws())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
2608
|
+
/**
|
|
2609
|
+
* @license
|
|
2610
|
+
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
2611
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2612
|
+
*/;_t("vaadin-combo-box",sr,{moduleId:"vaadin-combo-box-styles"});class fr extends(hr(mr(ir(Qo(St(Ao($i))))))){static get is(){return"vaadin-combo-box"}static get template(){return Hi`
|
|
2613
|
+
<style>
|
|
2614
|
+
:host([opened]) {
|
|
2615
|
+
pointer-events: auto;
|
|
2616
|
+
}
|
|
2617
|
+
</style>
|
|
2618
|
+
|
|
2619
|
+
<div class="vaadin-combo-box-container">
|
|
2620
|
+
<div part="label">
|
|
2621
|
+
<slot name="label"></slot>
|
|
2622
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
2623
|
+
</div>
|
|
2624
|
+
|
|
2625
|
+
<vaadin-input-container
|
|
2626
|
+
part="input-field"
|
|
2627
|
+
readonly="[[readonly]]"
|
|
2628
|
+
disabled="[[disabled]]"
|
|
2629
|
+
invalid="[[invalid]]"
|
|
2630
|
+
theme$="[[_theme]]"
|
|
2631
|
+
>
|
|
2632
|
+
<slot name="prefix" slot="prefix"></slot>
|
|
2633
|
+
<slot name="input"></slot>
|
|
2634
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
2635
|
+
<div id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
2636
|
+
</vaadin-input-container>
|
|
2637
|
+
|
|
2638
|
+
<div part="helper-text">
|
|
2639
|
+
<slot name="helper"></slot>
|
|
2640
|
+
</div>
|
|
2641
|
+
|
|
2642
|
+
<div part="error-message">
|
|
2643
|
+
<slot name="error-message"></slot>
|
|
2644
|
+
</div>
|
|
2645
|
+
</div>
|
|
2646
|
+
|
|
2647
|
+
<vaadin-combo-box-overlay
|
|
2648
|
+
id="overlay"
|
|
2649
|
+
opened="[[_overlayOpened]]"
|
|
2650
|
+
loading$="[[loading]]"
|
|
2651
|
+
theme$="[[_theme]]"
|
|
2652
|
+
position-target="[[_positionTarget]]"
|
|
2653
|
+
no-vertical-overlap
|
|
2654
|
+
></vaadin-combo-box-overlay>
|
|
2655
|
+
|
|
2656
|
+
<slot name="tooltip"></slot>
|
|
2657
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new tr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new er(this.inputElement,this._labelController)),this._tooltipController=new Io(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}n(fr);const vr=class{constructor(e){t(this,e),this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegexOptions="i",this.userPhoneRegexOptions="",this.passwordRegexOptions="",this.version="gm16",this.loginByPhoneNumber="false",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.userPhone="",this.userPrefix="",this.isValidPassword=!0,this.isValidUserPhone=!0,this.isPasswordVisible=!1,this.limitStylingAppends=!1,this.errorMessage="",this.hasError=!1,this.isLoginLoading=!1,this.errorCode="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.appendChild(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.appendChild(e)}),1)}))},this.getPhonePrefixes=()=>{const t=new URL("v1/player/validPhoneCodes",this.endpoint);return new Promise((e=>{fetch(t.href).then((t=>t.json())).then((t=>{this.userPrefixOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix}))),e()}))}))},this.autofillCredentialsHandler=t=>{this.userNameEmail=t.detail.userNameEmail,this.userPassword=t.detail.userPassword,this.handleLogin()},this.userLoginGm17=async()=>{const t={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contact:this.userNameEmail,password:this.userPassword})};try{const e=await fetch(`${this.endpoint}/api/v1/players/password-management/auth/password/verify`,t),i=await e.json(),{token:s}=i;if(!s)throw this.isLoginLoading=!1,new Error("Token not received from the API call.");await this.sendLegislationLogin(s)}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.sendLegislationLogin=async t=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,method:"login"})};try{const t=await fetch(`${this.endpoint}/api/v2/gm/legislation/login`,e),i=await t.json();if(!t.ok){const{message:t,errors:e}=i;throw this.isLoginLoading=!1,console.error(`Legislation login failed: ${t}`,e),new Error("Legislation login request failed.")}{const{sessionId:t,playerId:e}=i;t&&(this.isLoginLoading=!1,window.postMessage({type:"UserSessionID",session:t,userid:e},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1)}}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.userLogin=async()=>{const t=new URL("/v1/player/legislation/login",this.endpoint),e=new Headers;e.append("Content-Type","application/json");const i=JSON.stringify({username:"true"===this.loginByPhoneNumber?`${this.userPrefix} ${this.userPhone}`:this.userNameEmail,password:this.userPassword});fetch(t.href,{method:"POST",headers:e,body:i}).then((t=>t.json())).then((t=>{var e,i,s;(null===(e=t.sessionBlockers)||void 0===e?void 0:e.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==t?void 0:t.hasToSetPass)&&window.postMessage({type:"HasToSetPass"},window.location.href),t.sessionId?(window.postMessage({type:"UserSessionID",session:t.sessionId,userid:t.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1):(this.hasError=!0,this.errorCode=null===(i=null==t?void 0:t.thirdPartyResponse)||void 0===i?void 0:i.errorCode,this.errorMessage=o(`${this.errorCode}`,this.lang)||(null===(s=null==t?void 0:t.thirdPartyResponse)||void 0===s?void 0:s.message)||o("genericError",this.lang),this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((t=>{console.error(t),this.hasError=!0,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)})).finally((()=>{this.isLoginLoading=!1}))},this.handleLogin=()=>{this.isLoginLoading=!0,this.debounce({gm16:this.userLogin,gm17:this.userLoginGm17}[this.version]||this.userLogin,850)(),this.dispatchUpdateLoginCredentialsEvent()},this.handleInputChange=(t,e)=>{this.hasError=!1;const i=t.target.value;switch(e){case"user":this.userNameEmail=i,this.isValidUserEmail=this.validate("user",this.userNameEmail);break;case"phone":this.userPhone=i,this.isValidUserPhone=this.validate("phone",this.userPhone);break;case"prefix":this.userPrefix=i,this.isValidUserPhone=this.validate("phone",this.userPhone);break;case"password":this.userPassword=i,this.isValidPassword=this.validate("password",i)}},this.handleInputChangePartial=t=>e=>this.handleInputChange(e,t),this.validate=(t,e)=>{let i;switch(t){case"user":return i=new RegExp(this.userEmailRegex,this.userEmailRegexOptions),i.test(e);case"phone":return i=new RegExp(this.userPhoneRegex,this.userPhoneRegexOptions),i.test(e)&&!!this.userPrefix;case"password":return i=new RegExp(this.passwordRegex,this.passwordRegexOptions),i.test(e)}},this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)}}handleNewTranslations(){s(this.translationUrl)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}async componentWillLoad(){"true"===this.loginByPhoneNumber&&await this.getPhonePrefixes(),this.translationUrl.length>2&&await s(this.translationUrl)}componentDidLoad(){window.addEventListener("LoginCredentials",this.autofillCredentialsHandler),window.postMessage({type:"UserLoginDidLoad"})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){window.removeEventListener("LoginCredentials",this.autofillCredentialsHandler)}sendErrorNotification(t){window.postMessage({type:"HasError",error:t},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:t}},window.location.href)}debounce(t,e){let i;return function(...s){clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}dispatchUpdateLoginCredentialsEvent(){this.hasError||(this.updateLoginCredentialsEvent=new CustomEvent("UpdateLoginCredentials",{bubbles:!0,detail:{userNameEmail:this.userNameEmail,userPassword:this.userPassword}}),window.dispatchEvent(this.updateLoginCredentialsEvent))}render(){let t=e("span",{key:"08e1b988b208738091d8e78fa1f73eb3c58076ba",class:"InputIcon"},this.isPasswordVisible&&e("svg",{key:"5dfdfa39e8e2b3dbc84099a8496abf20382db924",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},e("g",{key:"24b728bd380f3661f1c382888aa4f0084bfe04c7",transform:"translate(-110.856 -23.242)"},e("circle",{key:"c0267c20cdca0b96a0ceedad3f92c41e3b3b6071",class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),e("g",{key:"87875ad14720b3da54b3c94ce020d62cb6eee8c4",transform:"translate(117.499 27.37)"},e("path",{key:"3c1dba505232ea8e94b90861cc659d5a536dd8a9",class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),e("path",{key:"8980532d12d0dfb5bf7a4334e478dbc801a47c0e",class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),e("g",{key:"996cd3f037a25e7e692a62e28f8bda18945291f8",transform:"translate(110.856 24.899)"},e("path",{key:"39b27797893b81aa835163eeb70f7db8103033d4",class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),e("path",{key:"076267866a6e0791a906068c2ba5b9862f11ef6a",class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),e("rect",{key:"cbeab68f4b831cedc7d57a68a35f3e0a979ec83a",class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&e("svg",{key:"b990b881b6fa53140440ac0646f36149b8111adf",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},e("g",{key:"c04390a04451b06ea6bb7e1ca7312d564e6e4b39",transform:"translate(-14.185 -27.832)"},e("path",{key:"02123a609b24029bce696bfc98aa4f565ca12853",class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),e("circle",{key:"e8ca3fd3f0dd3eef24071c0d13a874b04101a2c8",class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),i=e("div",{key:"252275c3e3b91c3e7fa995d824e4c6d3b1a4d4e0",class:"FormBox"},e("div",{key:"acc4edcaa9cfb7608bd0a81245895c7e59473310",class:"FormValue"},"true"===this.loginByPhoneNumber?e("div",{class:!this.isValidUserPhone||this.hasError?"InputBox InputInvalidBox":"InputBox "},e("div",{class:"PhoneInputBox"},e("div",{class:"PrefixBox"},e("vaadin-combo-box",{items:this.userPrefixOptions,value:this.userPrefix,onChange:this.handleInputChangePartial("prefix")}),e("label",{class:(this.userPrefix?"FieldFilledIn":"")+" "+(!this.isValidUserPhone||this.hasError?"FieldInvalid":"")},o("userPrefix",this.lang))),e("div",{class:"PhoneBox"},e("input",{type:"text",placeholder:"",value:this.userPhone,onFocus:this.handleInputChangePartial("phone"),onInput:this.handleInputChangePartial("phone"),autocapitalize:"none",required:!0}),e("label",{class:(this.userPhone?"FieldFilledIn":"")+" "+(!this.isValidUserPhone||this.hasError?"FieldInvalid":"")},o("userPhone",this.lang)))),!this.isValidUserPhone&&e("p",{class:"InvalidField"},o("invalidField",this.lang))):e("div",{class:!this.isValidUserEmail||this.hasError?"InputBox InputInvalidBox":"InputBox"},e("input",{type:"text",placeholder:"",value:this.userNameEmail,onFocus:this.handleInputChangePartial("user"),onInput:this.handleInputChangePartial("user"),autocapitalize:"none",required:!0}),e("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail||this.hasError?"FieldInvalid":"")},o("userEmail",this.lang)),!this.isValidUserEmail&&e("p",{class:"InvalidField"},o("invalidField",this.lang))),e("div",{key:"3857740f5455b51c30028eda6bd18ab48badf07d",class:!this.isValidPassword||this.hasError?"InputBox InputInvalidBox":"InputBox"},t,e("input",{key:"94f24b493711ed60bb56570e75ad0f5151b770a0",type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onFocus:this.handleInputChangePartial("password"),onInput:this.handleInputChangePartial("password"),autocapitalize:"none",required:!0}),e("label",{key:"6aed12d32525695fdecde970846aeced269c6ada",class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword||this.hasError?"FieldInvalid":"")},o("password",this.lang)),!this.isValidPassword&&e("p",{key:"49fd647b8d6bdcd58416aa8df6622d9fec2fd908",class:"InvalidField"},o("invalidField",this.lang))),"true"==this.passwordReset&&e("div",{key:"77e4d49f8d35131c7deb4cf0c4b7553c2c214917",class:"ForgotPassword"},e("button",{key:"3d4578732ff4b2888d67ca502338b259f67cd6ab",onClick:this.resetPassword},o("forgotPassword",this.lang))),e("button",{key:"cbd21b5e3514c26f98a57ec6d331be8d013dbc96",disabled:"true"!==this.loginByPhoneNumber&&(!this.isValidUserEmail||!this.userNameEmail)||"true"===this.loginByPhoneNumber&&(!this.isValidUserPhone||!this.userPhone||!this.userPrefix)||!this.userPassword||!this.isValidPassword||this.isLoginLoading,class:"SubmitCredentials",onClick:this.handleLogin},o("login",this.lang)),this.hasError&&e("p",{key:"bfc16dd160acda7ba5f57e861e013581a1703481",class:"CredentialsError"},this.errorMessage)));return e("section",{key:"f283f2a8e61feac8ec3003cc88fe47cf450df66c",ref:t=>this.stylingContainer=t},i)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};vr.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormValue{width:100%}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:100%;border-bottom:2px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .PhoneInputBox{display:flex;flex-direction:row}.InputBox .PhoneInputBox .PhoneBox{position:relative;width:100%}.InputBox .PhoneInputBox .PrefixBox{position:relative;width:fit-content}.InputBox.InputInvalidBox .PasswordVisibilityIcon{fill:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));font-size:var(--emw--font-size-medium, 16px);pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:var(--emw--font-size-medium, 16px);padding:0 35px 0 5px;color:var(--emw--registration-typography, var(--emw--color-typography, #000000));box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}vaadin-combo-box:focus-within~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}.ForgotPassword button{margin:-10px 0 17px;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.SubmitCredentials{display:block;margin:0 auto;outline:none;cursor:pointer;background-image:linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));border:2px solid var(--emw--button-border-color, #0E5924);border-radius:var(--emw--button-border-radius, 50px);padding:10px 20px;font-size:var(--emw--font-size-large, 20px);font-family:var(--emw--button-typography);color:var(--emw--button-text-color, #FFFFFF)}.SubmitCredentials:disabled{background:#707070;cursor:default}.Register{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-typography, var(--emw--color-typography, #FFFFFF));text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px)}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px);padding:0 0 20px 0;margin:0}.CredentialsError input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{vr as user_login}
|