@everymatrix/player-bonus-history 1.53.11 → 1.54.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/{PlayerBonusCard-BqsxqaTC.js → PlayerBonusCard-Ck9SzPZG.js} +1763 -1726
- package/components/PlayerBonusCard-D6OuJh55.cjs +14 -0
- package/components/{PlayerBonusHistory-C5xP4Hg7.js → PlayerBonusHistory-CM6Ybgyg.js} +1629 -1545
- package/components/PlayerBonusHistory-DhX5-jhq.cjs +3828 -0
- package/es2015/player-bonus-history.cjs +1 -0
- package/es2015/player-bonus-history.js +16 -0
- package/package.json +11 -12
- package/esnext/player-bonus-history.js +0 -14
@@ -0,0 +1,3828 @@
|
|
1
|
+
"use strict";var sl=Object.defineProperty,il=Object.defineProperties;var nl=Object.getOwnPropertyDescriptors;var pn=Object.getOwnPropertySymbols;var rl=Object.prototype.hasOwnProperty,ol=Object.prototype.propertyIsEnumerable;var fn=(n,e,t)=>e in n?sl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ys=(n,e)=>{for(var t in e||(e={}))rl.call(e,t)&&fn(n,t,e[t]);if(pn)for(var t of pn(e))ol.call(e,t)&&fn(n,t,e[t]);return n},bs=(n,e)=>il(n,nl(e));var ue=(n,e,t)=>new Promise((s,i)=>{var r=l=>{try{a(t.next(l))}catch(d){i(d)}},o=l=>{try{a(t.throw(l))}catch(d){i(d)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(n,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./PlayerBonusCard-D6OuJh55.cjs");if(typeof window!="undefined"){let n=function(e){return function(...t){try{return e.apply(this,t)}catch(s){if(s instanceof DOMException&&s.message.includes("has already been used with this registry")||s.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw s}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("./PlayerBonusCard-D6OuJh55.cjs")).then(e=>e.PlayerBonusCard_ce).then(({default:e})=>{!customElements.get("player-bonus-card")&&customElements.define("player-bonus-card",e.element)})}/**
|
2
|
+
* @license
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
5
|
+
*/function Y(n){const e=customElements.get(n.is);if(!e)customElements.define(n.is,n);else{const t=e.version;t&&n.version&&t===n.version?console.warn(`The component ${n.is} has been loaded twice`):console.error(`Tried to define ${n.is} version ${n.version} when version ${e.version} is already in use. Something will probably break.`)}}/**
|
6
|
+
* @license
|
7
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
8
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
9
|
+
*/let al=class extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}};Y(al);/**
|
10
|
+
* @license
|
11
|
+
* Copyright 2019 Google LLC
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
+
*/const zt=window,Ni=zt.ShadowRoot&&(zt.ShadyCSS===void 0||zt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ii=Symbol(),_n=new WeakMap;let Bi=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Ii)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ni&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=_n.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&_n.set(t,e))}return e}toString(){return this.cssText}};const ll=n=>new Bi(typeof n=="string"?n:n+"",void 0,Ii),A=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new Bi(t,n,Ii)},dl=(n,e)=>{Ni?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const s=document.createElement("style"),i=zt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)})},mn=Ni?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ll(t)})(n):n;/**
|
14
|
+
* @license
|
15
|
+
* Copyright 2017 Google LLC
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
17
|
+
*/var vs;const qt=window,gn=qt.trustedTypes,ul=gn?gn.emptyScript:"",yn=qt.reactiveElementPolyfillSupport,si={toAttribute(n,e){switch(e){case Boolean:n=n?ul:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(s){t=null}}return t}},Jr=(n,e)=>e!==n&&(e==e||n==n),ws={attribute:!0,type:String,converter:si,reflect:!1,hasChanged:Jr},ii="finalized";let Oe=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,s)=>{const i=this._$Ep(s,t);i!==void 0&&(this._$Ev.set(i,s),e.push(i))}),e}static createProperty(e,t=ws){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const s=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||ws}static finalize(){if(this.hasOwnProperty(ii))return!1;this[ii]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of s)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(mn(i))}else e!==void 0&&t.push(mn(e));return t}static _$Ep(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)===null||s===void 0||s.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return dl(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostConnected)===null||s===void 0?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostDisconnected)===null||s===void 0?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EO(e,t,s=ws){var i;const r=this.constructor._$Ep(e,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:si).toAttribute(t,s.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var s;const i=this.constructor,r=i._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:si;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,s){let i=!0;e!==void 0&&(((s=s||this.constructor.getPropertyOptions(e)).hasChanged||Jr)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,r)=>this[r]=i),this._$Ei=void 0);let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(s)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,s)=>this._$EO(s,this[s],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Oe[ii]=!0,Oe.elementProperties=new Map,Oe.elementStyles=[],Oe.shadowRootOptions={mode:"open"},yn==null||yn({ReactiveElement:Oe}),((vs=qt.reactiveElementVersions)!==null&&vs!==void 0?vs:qt.reactiveElementVersions=[]).push("1.6.3");/**
|
18
|
+
* @license
|
19
|
+
* Copyright 2017 Google LLC
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
21
|
+
*/var As;const Kt=window,He=Kt.trustedTypes,bn=He?He.createPolicy("lit-html",{createHTML:n=>n}):void 0,ni="$lit$",te=`lit$${(Math.random()+"").slice(9)}$`,Xr="?"+te,cl=`<${Xr}>`,Ae=document,pt=()=>Ae.createComment(""),ft=n=>n===null||typeof n!="object"&&typeof n!="function",Zr=Array.isArray,hl=n=>Zr(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",xs=`[
|
22
|
+
\f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,vn=/-->/g,wn=/>/g,ce=RegExp(`>|${xs}(?:([^\\s"'>=/]+)(${xs}*=${xs}*(?:[^
|
23
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),An=/'/g,xn=/"/g,Qr=/^(?:script|style|textarea|title)$/i,Re=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),Cn=new WeakMap,_e=Ae.createTreeWalker(Ae,129,null,!1);function eo(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return bn!==void 0?bn.createHTML(e):e}const pl=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":"",o=et;for(let a=0;a<t;a++){const l=n[a];let d,c,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,c=o.exec(l),c!==null);)p=o.lastIndex,o===et?c[1]==="!--"?o=vn:c[1]!==void 0?o=wn:c[2]!==void 0?(Qr.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=ce):c[3]!==void 0&&(o=ce):o===ce?c[0]===">"?(o=i!=null?i:et,h=-1):c[1]===void 0?h=-2:(h=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?ce:c[3]==='"'?xn:An):o===xn||o===An?o=ce:o===vn||o===wn?o=et:(o=ce,i=void 0);const f=o===ce&&n[a+1].startsWith("/>")?" ":"";r+=o===et?l+cl:h>=0?(s.push(d),l.slice(0,h)+ni+l.slice(h)+te+f):l+te+(h===-2?(s.push(void 0),a):f)}return[eo(n,r+(n[t]||"<?>")+(e===2?"</svg>":"")),s]};let ri=class to{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,c]=pl(e,t);if(this.el=to.createElement(d,s),_e.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(i=_e.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes()){const h=[];for(const p of i.getAttributeNames())if(p.endsWith(ni)||p.startsWith(te)){const f=c[o++];if(h.push(p),f!==void 0){const _=i.getAttribute(f.toLowerCase()+ni).split(te),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:g[2],strings:_,ctor:g[1]==="."?_l:g[1]==="?"?gl:g[1]==="@"?yl:os})}else l.push({type:6,index:r})}for(const p of h)i.removeAttribute(p)}if(Qr.test(i.tagName)){const h=i.textContent.split(te),p=h.length-1;if(p>0){i.textContent=He?He.emptyScript:"";for(let f=0;f<p;f++)i.append(h[f],pt()),_e.nextNode(),l.push({type:2,index:++r});i.append(h[p],pt())}}}else if(i.nodeType===8)if(i.data===Xr)l.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(te,h+1))!==-1;)l.push({type:7,index:r}),h+=te.length-1}r++}}static createElement(e,t){const s=Ae.createElement("template");return s.innerHTML=e,s}};function Fe(n,e,t=n,s){var i,r,o,a;if(e===Re)return e;let l=s!==void 0?(i=t._$Co)===null||i===void 0?void 0:i[s]:t._$Cl;const d=ft(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==d&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),d===void 0?l=void 0:(l=new d(n),l._$AT(n,t,s)),s!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[s]=l:t._$Cl=l),l!==void 0&&(e=Fe(n,l._$AS(n,e.values),l,s)),e}let fl=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:s},parts:i}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ae).importNode(s,!0);_e.currentNode=r;let o=_e.nextNode(),a=0,l=0,d=i[0];for(;d!==void 0;){if(a===d.index){let c;d.type===2?c=new zi(o,o.nextSibling,this,e):d.type===1?c=new d.ctor(o,d.name,d.strings,this,e):d.type===6&&(c=new bl(o,this,e)),this._$AV.push(c),d=i[++l]}a!==(d==null?void 0:d.index)&&(o=_e.nextNode(),a++)}return _e.currentNode=Ae,r}v(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}},zi=class so{constructor(e,t,s,i){var r;this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cp=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Fe(this,e,t),ft(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==Re&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):hl(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==k&&ft(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ae.createTextNode(e)),this._$AH=e}g(e){var t;const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=ri.createElement(eo(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(s);else{const o=new fl(r,this),a=o.u(this.options);o.v(s),this.$(a),this._$AH=o}}_$AC(e){let t=Cn.get(e.strings);return t===void 0&&Cn.set(e.strings,t=new ri(e)),t}T(e){Zr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new so(this.k(pt()),this.k(pt()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},os=class{constructor(e,t,s,i,r){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=k}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=Fe(this,e,t,0),o=!ft(e)||e!==this._$AH&&e!==Re,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=Fe(this,a[s+l],t,l),d===Re&&(d=this._$AH[l]),o||(o=!ft(d)||d!==this._$AH[l]),d===k?e=k:e!==k&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!i&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},_l=class extends os{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}};const ml=He?He.emptyScript:"";let gl=class extends os{constructor(){super(...arguments),this.type=4}j(e){e&&e!==k?this.element.setAttribute(this.name,ml):this.element.removeAttribute(this.name)}},yl=class extends os{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){var s;if((e=(s=Fe(this,e,t,0))!==null&&s!==void 0?s:k)===Re)return;const i=this._$AH,r=e===k&&i!==k||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==k&&(i===k||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&s!==void 0?s:this.element,e):this._$AH.handleEvent(e)}},bl=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){Fe(this,e)}};const En=Kt.litHtmlPolyfillSupport;En==null||En(ri,zi),((As=Kt.litHtmlVersions)!==null&&As!==void 0?As:Kt.litHtmlVersions=[]).push("2.8.0");const vl=(n,e,t)=>{var s,i;const r=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e;let o=r._$litPart$;if(o===void 0){const a=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new zi(e.insertBefore(pt(),a),a,void 0,t!=null?t:{})}return o._$AI(n),o};/**
|
24
|
+
* @license
|
25
|
+
* Copyright 2017 Google LLC
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
27
|
+
*/var Cs,Es;let Lt=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=vl(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Re}};Lt.finalized=!0,Lt._$litElement$=!0,(Cs=globalThis.litElementHydrateSupport)===null||Cs===void 0||Cs.call(globalThis,{LitElement:Lt});const $n=globalThis.litElementPolyfillSupport;$n==null||$n({LitElement:Lt});((Es=globalThis.litElementVersions)!==null&&Es!==void 0?Es:globalThis.litElementVersions=[]).push("3.3.3");/**
|
28
|
+
* @license
|
29
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
30
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
31
|
+
*/const wl=n=>class extends n{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,s,i){super.attributeChangedCallback(t,s,i),t==="theme"&&this._set_theme(i)}};/**
|
32
|
+
* @license
|
33
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
34
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
35
|
+
*/const io=[];function no(n){return n&&Object.prototype.hasOwnProperty.call(n,"__themes")}function Al(n){return no(customElements.get(n))}function xl(n=[]){return[n].flat(1/0).filter(e=>e instanceof Bi?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function S(n,e,t={}){n&&Al(n)&&console.warn(`The custom element definition for "${n}"
|
36
|
+
was finalized before a style module was registered.
|
37
|
+
Make sure to add component specific style modules before
|
38
|
+
importing the corresponding custom element.`),e=xl(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(n,e,t):io.push({themeFor:n,styles:e,include:t.include,moduleId:t.moduleId})}function oi(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():io}function Cl(n,e){return(n||"").split(" ").some(t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e))}function El(n=""){let e=0;return n.startsWith("lumo-")||n.startsWith("material-")?e=1:n.startsWith("vaadin-")&&(e=2),e}function ro(n){const e=[];return n.include&&[].concat(n.include).forEach(t=>{const s=oi().find(i=>i.moduleId===t);s?e.push(...ro(s),...s.styles):console.warn(`Included moduleId ${t} not found in style registry`)},n.styles),e}function $l(n,e){const t=document.createElement("style");t.innerHTML=n.map(s=>s.cssText).join(`
|
39
|
+
`),e.content.appendChild(t)}function Sl(n){const e=`${n}-default-theme`,t=oi().filter(s=>s.moduleId!==e&&Cl(s.themeFor,n)).map(s=>bs(ys({},s),{styles:[...ro(s),...s.styles],includePriority:El(s.moduleId)})).sort((s,i)=>i.includePriority-s.includePriority);return t.length>0?t:oi().filter(s=>s.moduleId===e)}const $e=n=>class extends wl(n){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;!t||no(this)||$l(this.getStylesForThis(),t)}static finalizeStyles(t){const s=this.getStylesForThis();return t?[...super.finalizeStyles(t),...s]:s}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype),s=(t?t.constructor.__themes:[])||[];this.__themes=[...s,...Sl(this.is)];const i=this.__themes.flatMap(r=>r.styles);return i.filter((r,o)=>o===i.lastIndexOf(r))}};/**
|
40
|
+
* @license
|
41
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
42
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
43
|
+
*/const oo=(n,...e)=>{const t=document.createElement("style");t.id=n,t.textContent=e.map(s=>s.toString()).join(`
|
44
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},as=(n,...e)=>{oo(`lumo-${n}`,e)};/**
|
45
|
+
* @license
|
46
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
47
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
48
|
+
*/const Pl=A`
|
49
|
+
:host {
|
50
|
+
/* Base (background) */
|
51
|
+
--lumo-base-color: #fff;
|
52
|
+
|
53
|
+
/* Tint */
|
54
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
55
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
56
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
57
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
58
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
59
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
60
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
61
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
62
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
63
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
64
|
+
--lumo-tint: #fff;
|
65
|
+
|
66
|
+
/* Shade */
|
67
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
68
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
69
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
70
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
71
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
72
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
73
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
74
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
75
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
76
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
77
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
78
|
+
|
79
|
+
/* Contrast */
|
80
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
81
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
82
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
83
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
84
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
85
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
86
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
87
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
88
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
89
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
90
|
+
--lumo-contrast: var(--lumo-shade);
|
91
|
+
|
92
|
+
/* Text */
|
93
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
94
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
95
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
96
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
97
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
98
|
+
|
99
|
+
/* Primary */
|
100
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
101
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
102
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
103
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
104
|
+
--lumo-primary-contrast-color: #fff;
|
105
|
+
|
106
|
+
/* Error */
|
107
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
108
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
109
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
110
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
111
|
+
--lumo-error-contrast-color: #fff;
|
112
|
+
|
113
|
+
/* Success */
|
114
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
115
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
116
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
117
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
118
|
+
--lumo-success-contrast-color: #fff;
|
119
|
+
|
120
|
+
/* Warning */
|
121
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
122
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
123
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
124
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
125
|
+
}
|
126
|
+
|
127
|
+
/* forced-colors mode adjustments */
|
128
|
+
@media (forced-colors: active) {
|
129
|
+
html {
|
130
|
+
--lumo-disabled-text-color: GrayText;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
`;as("color-props",Pl);const Tl=A`
|
134
|
+
[theme~='dark'] {
|
135
|
+
/* Base (background) */
|
136
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
137
|
+
|
138
|
+
/* Tint */
|
139
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
140
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
141
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
142
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
143
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
144
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
145
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
146
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
147
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
148
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
149
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
150
|
+
|
151
|
+
/* Shade */
|
152
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
153
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
154
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
155
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
156
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
157
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
158
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
159
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
160
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
161
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
162
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
163
|
+
|
164
|
+
/* Contrast */
|
165
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
166
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
167
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
168
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
169
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
170
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
171
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
172
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
173
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
174
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
175
|
+
--lumo-contrast: var(--lumo-tint);
|
176
|
+
|
177
|
+
/* Text */
|
178
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
179
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
180
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
181
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
182
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
183
|
+
|
184
|
+
/* Primary */
|
185
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
186
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
187
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
188
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
189
|
+
--lumo-primary-contrast-color: #fff;
|
190
|
+
|
191
|
+
/* Error */
|
192
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
193
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
194
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
195
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
196
|
+
|
197
|
+
/* Success */
|
198
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
199
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
200
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
201
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
202
|
+
|
203
|
+
/* Warning */
|
204
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
205
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
206
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
207
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
208
|
+
}
|
209
|
+
|
210
|
+
html {
|
211
|
+
color: var(--lumo-body-text-color);
|
212
|
+
background-color: var(--lumo-base-color);
|
213
|
+
color-scheme: light;
|
214
|
+
}
|
215
|
+
|
216
|
+
[theme~='dark'] {
|
217
|
+
color: var(--lumo-body-text-color);
|
218
|
+
background-color: var(--lumo-base-color);
|
219
|
+
color-scheme: dark;
|
220
|
+
}
|
221
|
+
|
222
|
+
h1,
|
223
|
+
h2,
|
224
|
+
h3,
|
225
|
+
h4,
|
226
|
+
h5,
|
227
|
+
h6 {
|
228
|
+
color: var(--lumo-header-text-color);
|
229
|
+
}
|
230
|
+
|
231
|
+
a:where(:any-link) {
|
232
|
+
color: var(--lumo-primary-text-color);
|
233
|
+
}
|
234
|
+
|
235
|
+
a:not(:any-link) {
|
236
|
+
color: var(--lumo-disabled-text-color);
|
237
|
+
}
|
238
|
+
|
239
|
+
blockquote {
|
240
|
+
color: var(--lumo-secondary-text-color);
|
241
|
+
}
|
242
|
+
|
243
|
+
code,
|
244
|
+
pre {
|
245
|
+
background-color: var(--lumo-contrast-10pct);
|
246
|
+
border-radius: var(--lumo-border-radius-m);
|
247
|
+
}
|
248
|
+
`;S("",Tl,{moduleId:"lumo-color"});/**
|
249
|
+
* @license
|
250
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
251
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
252
|
+
*/const kl=A`
|
253
|
+
:host {
|
254
|
+
--lumo-size-xs: 1.625rem;
|
255
|
+
--lumo-size-s: 1.875rem;
|
256
|
+
--lumo-size-m: 2.25rem;
|
257
|
+
--lumo-size-l: 2.75rem;
|
258
|
+
--lumo-size-xl: 3.5rem;
|
259
|
+
|
260
|
+
/* Icons */
|
261
|
+
--lumo-icon-size-s: 1.25em;
|
262
|
+
--lumo-icon-size-m: 1.5em;
|
263
|
+
--lumo-icon-size-l: 2.25em;
|
264
|
+
/* For backwards compatibility */
|
265
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
266
|
+
}
|
267
|
+
`;as("sizing-props",kl);/**
|
268
|
+
* @license
|
269
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
270
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
271
|
+
*/const Dl=A`
|
272
|
+
:host {
|
273
|
+
/* Border radius */
|
274
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
275
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
276
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
277
|
+
|
278
|
+
/* Shadow */
|
279
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
280
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
281
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
282
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
283
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
284
|
+
|
285
|
+
/* Clickable element cursor */
|
286
|
+
--lumo-clickable-cursor: default;
|
287
|
+
}
|
288
|
+
`;A`
|
289
|
+
html {
|
290
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
291
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
292
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
293
|
+
}
|
294
|
+
`;as("style-props",Dl);/**
|
295
|
+
* @license
|
296
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
297
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
298
|
+
*/const Ol=A`
|
299
|
+
:host {
|
300
|
+
/* prettier-ignore */
|
301
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
302
|
+
|
303
|
+
/* Font sizes */
|
304
|
+
--lumo-font-size-xxs: 0.75rem;
|
305
|
+
--lumo-font-size-xs: 0.8125rem;
|
306
|
+
--lumo-font-size-s: 0.875rem;
|
307
|
+
--lumo-font-size-m: 1rem;
|
308
|
+
--lumo-font-size-l: 1.125rem;
|
309
|
+
--lumo-font-size-xl: 1.375rem;
|
310
|
+
--lumo-font-size-xxl: 1.75rem;
|
311
|
+
--lumo-font-size-xxxl: 2.5rem;
|
312
|
+
|
313
|
+
/* Line heights */
|
314
|
+
--lumo-line-height-xs: 1.25;
|
315
|
+
--lumo-line-height-s: 1.375;
|
316
|
+
--lumo-line-height-m: 1.625;
|
317
|
+
}
|
318
|
+
`,Ml=A`
|
319
|
+
body,
|
320
|
+
:host {
|
321
|
+
font-family: var(--lumo-font-family);
|
322
|
+
font-size: var(--lumo-font-size-m);
|
323
|
+
line-height: var(--lumo-line-height-m);
|
324
|
+
-webkit-text-size-adjust: 100%;
|
325
|
+
-webkit-font-smoothing: antialiased;
|
326
|
+
-moz-osx-font-smoothing: grayscale;
|
327
|
+
}
|
328
|
+
|
329
|
+
small,
|
330
|
+
[theme~='font-size-s'] {
|
331
|
+
font-size: var(--lumo-font-size-s);
|
332
|
+
line-height: var(--lumo-line-height-s);
|
333
|
+
}
|
334
|
+
|
335
|
+
[theme~='font-size-xs'] {
|
336
|
+
font-size: var(--lumo-font-size-xs);
|
337
|
+
line-height: var(--lumo-line-height-xs);
|
338
|
+
}
|
339
|
+
|
340
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
341
|
+
font-weight: 600;
|
342
|
+
line-height: var(--lumo-line-height-xs);
|
343
|
+
margin-block: 0;
|
344
|
+
}
|
345
|
+
|
346
|
+
:where(h1) {
|
347
|
+
font-size: var(--lumo-font-size-xxxl);
|
348
|
+
}
|
349
|
+
|
350
|
+
:where(h2) {
|
351
|
+
font-size: var(--lumo-font-size-xxl);
|
352
|
+
}
|
353
|
+
|
354
|
+
:where(h3) {
|
355
|
+
font-size: var(--lumo-font-size-xl);
|
356
|
+
}
|
357
|
+
|
358
|
+
:where(h4) {
|
359
|
+
font-size: var(--lumo-font-size-l);
|
360
|
+
}
|
361
|
+
|
362
|
+
:where(h5) {
|
363
|
+
font-size: var(--lumo-font-size-m);
|
364
|
+
}
|
365
|
+
|
366
|
+
:where(h6) {
|
367
|
+
font-size: var(--lumo-font-size-xs);
|
368
|
+
text-transform: uppercase;
|
369
|
+
letter-spacing: 0.03em;
|
370
|
+
}
|
371
|
+
|
372
|
+
p,
|
373
|
+
blockquote {
|
374
|
+
margin-top: 0.5em;
|
375
|
+
margin-bottom: 0.75em;
|
376
|
+
}
|
377
|
+
|
378
|
+
a {
|
379
|
+
text-decoration: none;
|
380
|
+
}
|
381
|
+
|
382
|
+
a:where(:any-link):hover {
|
383
|
+
text-decoration: underline;
|
384
|
+
}
|
385
|
+
|
386
|
+
hr {
|
387
|
+
display: block;
|
388
|
+
align-self: stretch;
|
389
|
+
height: 1px;
|
390
|
+
border: 0;
|
391
|
+
padding: 0;
|
392
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
393
|
+
background-color: var(--lumo-contrast-10pct);
|
394
|
+
}
|
395
|
+
|
396
|
+
blockquote {
|
397
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
398
|
+
}
|
399
|
+
|
400
|
+
b,
|
401
|
+
strong {
|
402
|
+
font-weight: 600;
|
403
|
+
}
|
404
|
+
|
405
|
+
/* RTL specific styles */
|
406
|
+
blockquote[dir='rtl'] {
|
407
|
+
border-left: none;
|
408
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
409
|
+
}
|
410
|
+
`;S("",Ml,{moduleId:"lumo-typography"});as("typography-props",Ol);S("vaadin-input-container",A`
|
411
|
+
:host {
|
412
|
+
background-color: var(--lumo-contrast-10pct);
|
413
|
+
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
414
|
+
font-weight: 500;
|
415
|
+
line-height: 1;
|
416
|
+
position: relative;
|
417
|
+
cursor: text;
|
418
|
+
box-sizing: border-box;
|
419
|
+
border-radius:
|
420
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
421
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
422
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
423
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
424
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
425
|
+
/* Fallback */
|
426
|
+
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
427
|
+
/* Default field border color */
|
428
|
+
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
429
|
+
}
|
430
|
+
|
431
|
+
:host([dir='rtl']) {
|
432
|
+
border-radius:
|
433
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
434
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
435
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
436
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
437
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
438
|
+
}
|
439
|
+
|
440
|
+
/* Used for hover and activation effects */
|
441
|
+
:host::after {
|
442
|
+
content: '';
|
443
|
+
position: absolute;
|
444
|
+
inset: 0;
|
445
|
+
border-radius: inherit;
|
446
|
+
pointer-events: none;
|
447
|
+
background-color: var(--lumo-contrast-50pct);
|
448
|
+
opacity: 0;
|
449
|
+
transition: transform 0.15s, opacity 0.2s;
|
450
|
+
transform-origin: 100% 0;
|
451
|
+
}
|
452
|
+
|
453
|
+
::slotted(:not([slot$='fix'])) {
|
454
|
+
cursor: inherit;
|
455
|
+
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
456
|
+
padding: 0 0.25em;
|
457
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
458
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
459
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
460
|
+
}
|
461
|
+
|
462
|
+
/* Read-only */
|
463
|
+
:host([readonly]) {
|
464
|
+
color: var(--lumo-secondary-text-color);
|
465
|
+
background-color: transparent;
|
466
|
+
cursor: default;
|
467
|
+
}
|
468
|
+
|
469
|
+
:host([readonly])::after {
|
470
|
+
background-color: transparent;
|
471
|
+
opacity: 1;
|
472
|
+
border: 1px dashed var(--lumo-contrast-30pct);
|
473
|
+
}
|
474
|
+
|
475
|
+
/* Disabled */
|
476
|
+
:host([disabled]) {
|
477
|
+
background-color: var(--lumo-contrast-5pct);
|
478
|
+
}
|
479
|
+
|
480
|
+
:host([disabled]) ::slotted(*) {
|
481
|
+
color: var(--lumo-disabled-text-color);
|
482
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
483
|
+
}
|
484
|
+
|
485
|
+
/* Invalid */
|
486
|
+
:host([invalid]) {
|
487
|
+
background-color: var(--lumo-error-color-10pct);
|
488
|
+
}
|
489
|
+
|
490
|
+
:host([invalid])::after {
|
491
|
+
background-color: var(--lumo-error-color-50pct);
|
492
|
+
}
|
493
|
+
|
494
|
+
/* Slotted icons */
|
495
|
+
::slotted(vaadin-icon) {
|
496
|
+
color: var(--lumo-contrast-60pct);
|
497
|
+
width: var(--lumo-icon-size-m);
|
498
|
+
height: var(--lumo-icon-size-m);
|
499
|
+
}
|
500
|
+
|
501
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
502
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
503
|
+
padding: 0.25em;
|
504
|
+
box-sizing: border-box !important;
|
505
|
+
}
|
506
|
+
|
507
|
+
/* Text align */
|
508
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
509
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
510
|
+
}
|
511
|
+
|
512
|
+
@-moz-document url-prefix() {
|
513
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
514
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
515
|
+
}
|
516
|
+
}
|
517
|
+
|
518
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
519
|
+
text-align: start;
|
520
|
+
--_lumo-text-field-overflow-mask-image: none;
|
521
|
+
}
|
522
|
+
|
523
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
524
|
+
text-align: center;
|
525
|
+
--_lumo-text-field-overflow-mask-image: none;
|
526
|
+
}
|
527
|
+
|
528
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
529
|
+
text-align: end;
|
530
|
+
--_lumo-text-field-overflow-mask-image: none;
|
531
|
+
}
|
532
|
+
|
533
|
+
@-moz-document url-prefix() {
|
534
|
+
/* Firefox is smart enough to align overflowing text to right */
|
535
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
536
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
537
|
+
}
|
538
|
+
}
|
539
|
+
|
540
|
+
@-moz-document url-prefix() {
|
541
|
+
/* Firefox is smart enough to align overflowing text to right */
|
542
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
543
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
544
|
+
}
|
545
|
+
}
|
546
|
+
|
547
|
+
/* RTL specific styles */
|
548
|
+
:host([dir='rtl'])::after {
|
549
|
+
transform-origin: 0% 0;
|
550
|
+
}
|
551
|
+
|
552
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
553
|
+
--_lumo-text-field-overflow-mask-image: none;
|
554
|
+
}
|
555
|
+
|
556
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
557
|
+
--_lumo-text-field-overflow-mask-image: none;
|
558
|
+
}
|
559
|
+
|
560
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
561
|
+
--_lumo-text-field-overflow-mask-image: none;
|
562
|
+
}
|
563
|
+
|
564
|
+
@-moz-document url-prefix() {
|
565
|
+
/* Firefox is smart enough to align overflowing text to right */
|
566
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
567
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
568
|
+
}
|
569
|
+
}
|
570
|
+
|
571
|
+
@-moz-document url-prefix() {
|
572
|
+
/* Firefox is smart enough to align overflowing text to right */
|
573
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
574
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
575
|
+
}
|
576
|
+
}
|
577
|
+
`,{moduleId:"lumo-input-container"});/**
|
578
|
+
@license
|
579
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
580
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
581
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
582
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
583
|
+
Code distributed by Google as part of the polymer project is also
|
584
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
585
|
+
*/window.JSCompiler_renameProperty=function(n,e){return n};/**
|
586
|
+
@license
|
587
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
588
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
589
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
590
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
591
|
+
Code distributed by Google as part of the polymer project is also
|
592
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
593
|
+
*/let Nl=/(url\()([^)]*)(\))/g,Il=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,Mt,R;function ut(n,e){if(n&&Il.test(n)||n==="//")return n;if(Mt===void 0){Mt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Mt=t.href==="http://a/c%20d"}catch(t){}}if(e||(e=document.baseURI||window.location.href),Mt)try{return new URL(n,e).href}catch(t){return n}return R||(R=document.implementation.createHTMLDocument("temp"),R.base=R.createElement("base"),R.head.appendChild(R.base),R.anchor=R.createElement("a"),R.body.appendChild(R.anchor)),R.base.href=e,R.anchor.href=n,R.anchor.href||n}function Li(n,e){return n.replace(Nl,function(t,s,i,r){return s+"'"+ut(i.replace(/["']/g,""),e)+"'"+r})}function Hi(n){return n.substring(0,n.lastIndexOf("/")+1)}/**
|
594
|
+
@license
|
595
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
596
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
597
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
598
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
599
|
+
Code distributed by Google as part of the polymer project is also
|
600
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
601
|
+
*/const ao=!window.ShadyDOM||!window.ShadyDOM.inUse;!window.ShadyCSS||window.ShadyCSS.nativeCss;const Bl=ao&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const n=new CSSStyleSheet;n.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[n],e.shadowRoot.adoptedStyleSheets[0]===n}catch(n){return!1}})();let zl=window.Polymer&&window.Polymer.rootPath||Hi(document.baseURI||window.location.href),Gt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;window.Polymer&&window.Polymer.setPassiveTouchGestures;let Jt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Ll=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,lo=window.Polymer&&window.Polymer.legacyOptimizations||!1,uo=window.Polymer&&window.Polymer.legacyWarnings||!1,Hl=window.Polymer&&window.Polymer.syncInitialRender||!1,ai=window.Polymer&&window.Polymer.legacyUndefined||!1,Rl=window.Polymer&&window.Polymer.orderedComputed||!1,Sn=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Fl=window.Polymer&&window.Polymer.fastDomIf||!1,Pn=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;window.Polymer&&window.Polymer.legacyNoObservedAttributes;let Ul=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
602
|
+
@license
|
603
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
604
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
605
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
606
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
607
|
+
Code distributed by Google as part of the polymer project is also
|
608
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
609
|
+
*/let Vl=0;const P=function(n){let e=n.__mixinApplications;e||(e=new WeakMap,n.__mixinApplications=e);let t=Vl++;function s(i){let r=i.__mixinSet;if(r&&r[t])return i;let o=e,a=o.get(i);if(!a){a=n(i),o.set(i,a);let l=Object.create(a.__mixinSet||r||null);l[t]=!0,a.__mixinSet=l}return a}return s};/**
|
610
|
+
@license
|
611
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
612
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
613
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
614
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
615
|
+
Code distributed by Google as part of the polymer project is also
|
616
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
617
|
+
*/let Ri={},co={};function Tn(n,e){Ri[n]=co[n.toLowerCase()]=e}function kn(n){return Ri[n]||co[n.toLowerCase()]}function jl(n){n.querySelector("style")&&console.warn("dom-module %s has style outside template",n.id)}class _t extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let s=kn(e);return s&&t?s.querySelector(t):s}return null}attributeChangedCallback(e,t,s,i){t!==s&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=ut(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=Hi(t)}return this.__assetpath}register(e){if(e=e||this.id,e){if(Jt&&kn(e)!==void 0)throw Tn(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Tn(e,this),jl(this)}}}_t.prototype.modules=Ri;customElements.define("dom-module",_t);/**
|
618
|
+
@license
|
619
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
620
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
621
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
622
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
623
|
+
Code distributed by Google as part of the polymer project is also
|
624
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
625
|
+
*/const Yl="link[rel=import][type~=css]",Wl="include",Dn="shady-unscoped";function ho(n){return _t.import(n)}function On(n){let e=n.body?n.body:n;const t=Li(e.textContent,n.baseURI),s=document.createElement("style");return s.textContent=t,s}function ql(n){const e=n.trim().split(/\s+/),t=[];for(let s=0;s<e.length;s++)t.push(...Kl(e[s]));return t}function Kl(n){const e=ho(n);if(!e)return console.warn("Could not find style data in module named",n),[];if(e._styles===void 0){const t=[];t.push(...fo(e));const s=e.querySelector("template");s&&t.push(...po(s,e.assetpath)),e._styles=t}return e._styles}function po(n,e){if(!n._styles){const t=[],s=n.content.querySelectorAll("style");for(let i=0;i<s.length;i++){let r=s[i],o=r.getAttribute(Wl);o&&t.push(...ql(o).filter(function(a,l,d){return d.indexOf(a)===l})),e&&(r.textContent=Li(r.textContent,e)),t.push(r)}n._styles=t}return n._styles}function Gl(n){let e=ho(n);return e?fo(e):[]}function fo(n){const e=[],t=n.querySelectorAll(Yl);for(let s=0;s<t.length;s++){let i=t[s];if(i.import){const r=i.import,o=i.hasAttribute(Dn);if(o&&!r._unscopedStyle){const a=On(r);a.setAttribute(Dn,""),r._unscopedStyle=a}else r._style||(r._style=On(r));e.push(o?r._unscopedStyle:r._style)}}return e}/**
|
626
|
+
@license
|
627
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
628
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
629
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
630
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
631
|
+
Code distributed by Google as part of the polymer project is also
|
632
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
633
|
+
*/const I=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?n=>ShadyDOM.patch(n):n=>n;/**
|
634
|
+
@license
|
635
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
636
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
637
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
638
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
639
|
+
Code distributed by Google as part of the polymer project is also
|
640
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
641
|
+
*/function li(n){return n.indexOf(".")>=0}function Se(n){let e=n.indexOf(".");return e===-1?n:n.slice(0,e)}function _o(n,e){return n.indexOf(e+".")===0}function mt(n,e){return e.indexOf(n+".")===0}function gt(n,e,t){return e+t.slice(n.length)}function Jl(n,e){return n===e||_o(n,e)||mt(n,e)}function lt(n){if(Array.isArray(n)){let e=[];for(let t=0;t<n.length;t++){let s=n[t].toString().split(".");for(let i=0;i<s.length;i++)e.push(s[i])}return e.join(".")}else return n}function mo(n){return Array.isArray(n)?lt(n).split("."):n.toString().split(".")}function H(n,e,t){let s=n,i=mo(e);for(let r=0;r<i.length;r++){if(!s)return;let o=i[r];s=s[o]}return t&&(t.path=i.join(".")),s}function Mn(n,e,t){let s=n,i=mo(e),r=i[i.length-1];if(i.length>1){for(let o=0;o<i.length-1;o++){let a=i[o];if(s=s[a],!s)return}s[r]=t}else s[e]=t;return i.join(".")}/**
|
642
|
+
@license
|
643
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
644
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
645
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
646
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
647
|
+
Code distributed by Google as part of the polymer project is also
|
648
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
649
|
+
*/const Xt={},Xl=/-[a-z]/g,Zl=/([A-Z])/g;function go(n){return Xt[n]||(Xt[n]=n.indexOf("-")<0?n:n.replace(Xl,e=>e[1].toUpperCase()))}function ls(n){return Xt[n]||(Xt[n]=n.replace(Zl,"-$1").toLowerCase())}/**
|
650
|
+
@license
|
651
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
652
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
653
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
654
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
655
|
+
Code distributed by Google as part of the polymer project is also
|
656
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
657
|
+
*/let Ql=0,yo=0,Be=[],ed=0,di=!1,bo=document.createTextNode("");new window.MutationObserver(td).observe(bo,{characterData:!0});function td(){di=!1;const n=Be.length;for(let e=0;e<n;e++){let t=Be[e];if(t)try{t()}catch(s){setTimeout(()=>{throw s})}}Be.splice(0,n),yo+=n}const sd={after(n){return{run(e){return window.setTimeout(e,n)},cancel(e){window.clearTimeout(e)}}},run(n,e){return window.setTimeout(n,e)},cancel(n){window.clearTimeout(n)}},vo={run(n){return di||(di=!0,bo.textContent=ed++),Be.push(n),Ql++},cancel(n){const e=n-yo;if(e>=0){if(!Be[e])throw new Error("invalid async handle: "+n);Be[e]=null}}};/**
|
658
|
+
@license
|
659
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
660
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
661
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
662
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
663
|
+
Code distributed by Google as part of the polymer project is also
|
664
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
665
|
+
*/const id=vo,wo=P(n=>{class e extends n{static createProperties(s){const i=this.prototype;for(let r in s)r in i||i._createPropertyAccessor(r)}static attributeNameForProperty(s){return s.toLowerCase()}static typeForProperty(s){}_createPropertyAccessor(s,i){this._addPropertyToAttributeMap(s),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[s]||(this.__dataHasAccessor[s]=!0,this._definePropertyAccessor(s,i))}_addPropertyToAttributeMap(s){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let i=this.__dataAttributes[s];return i||(i=this.constructor.attributeNameForProperty(s),this.__dataAttributes[i]=s),i}_definePropertyAccessor(s,i){Object.defineProperty(this,s,{get(){return this.__data[s]},set:i?function(){}:function(r){this._setPendingProperty(s,r,!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 s in this.__dataHasAccessor)this.hasOwnProperty(s)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[s]=this[s],delete this[s])}_initializeInstanceProperties(s){Object.assign(this,s)}_setProperty(s,i){this._setPendingProperty(s,i)&&this._invalidateProperties()}_getProperty(s){return this.__data[s]}_setPendingProperty(s,i,r){let o=this.__data[s],a=this._shouldPropertyChange(s,i,o);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(s in this.__dataOld)&&(this.__dataOld[s]=o),this.__data[s]=i,this.__dataPending[s]=i),a}_isPropertyPending(s){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(s))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,id.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 s=this.__data,i=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(s,i,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(s,i,r)),this.__dataCounter--}_shouldPropertiesChange(s,i,r){return!!i}_propertiesChanged(s,i,r){}_shouldPropertyChange(s,i,r){return r!==i&&(r===r||i===i)}attributeChangedCallback(s,i,r,o){i!==r&&this._attributeToProperty(s,r),super.attributeChangedCallback&&super.attributeChangedCallback(s,i,r,o)}_attributeToProperty(s,i,r){if(!this.__serializing){const o=this.__dataAttributes,a=o&&o[s]||s;this[a]=this._deserializeValue(i,r||this.constructor.typeForProperty(a))}}_propertyToAttribute(s,i,r){this.__serializing=!0,r=arguments.length<3?this[s]:r,this._valueToNodeAttribute(this,r,i||this.constructor.attributeNameForProperty(s)),this.__serializing=!1}_valueToNodeAttribute(s,i,r){const o=this._serializeValue(i);(r==="class"||r==="name"||r==="slot")&&(s=I(s)),o===void 0?s.removeAttribute(r):s.setAttribute(r,o===""&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_serializeValue(s){switch(typeof s){case"boolean":return s?"":void 0;default:return s!=null?s.toString():void 0}}_deserializeValue(s,i){switch(i){case Boolean:return s!==null;case Number:return Number(s);default:return s}}}return e});/**
|
666
|
+
@license
|
667
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
668
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
669
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
670
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
671
|
+
Code distributed by Google as part of the polymer project is also
|
672
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
673
|
+
*/const Ao={};let Nt=HTMLElement.prototype;for(;Nt;){let n=Object.getOwnPropertyNames(Nt);for(let e=0;e<n.length;e++)Ao[n[e]]=!0;Nt=Object.getPrototypeOf(Nt)}const nd=window.trustedTypes?n=>trustedTypes.isHTML(n)||trustedTypes.isScript(n)||trustedTypes.isScriptURL(n):()=>!1;function rd(n,e){if(!Ao[e]){let t=n[e];t!==void 0&&(n.__data?n._setPendingProperty(e,t):(n.__dataProto?n.hasOwnProperty(JSCompiler_renameProperty("__dataProto",n))||(n.__dataProto=Object.create(n.__dataProto)):n.__dataProto={},n.__dataProto[e]=t))}}const od=P(n=>{const e=wo(n);class t extends e{static createPropertiesForAttributes(){let i=this.observedAttributes;for(let r=0;r<i.length;r++)this.prototype._createPropertyAccessor(go(i[r]))}static attributeNameForProperty(i){return ls(i)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(i){for(let r in i)this._setProperty(r,i[r])}_ensureAttribute(i,r){const o=this;o.hasAttribute(i)||this._valueToNodeAttribute(o,r,i)}_serializeValue(i){switch(typeof i){case"object":if(i instanceof Date)return i.toString();if(i){if(nd(i))return i;try{return JSON.stringify(i)}catch(r){return""}}default:return super._serializeValue(i)}}_deserializeValue(i,r){let o;switch(r){case Object:try{o=JSON.parse(i)}catch(a){o=i}break;case Array:try{o=JSON.parse(i)}catch(a){o=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${i}`)}break;case Date:o=isNaN(i)?String(i):Number(i),o=new Date(o);break;default:o=super._deserializeValue(i,r);break}return o}_definePropertyAccessor(i,r){rd(this,i),super._definePropertyAccessor(i,r)}_hasAccessor(i){return this.__dataHasAccessor&&this.__dataHasAccessor[i]}_isPropertyPending(i){return!!(this.__dataPending&&i in this.__dataPending)}}return t});/**
|
674
|
+
@license
|
675
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
676
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
677
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
678
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
679
|
+
Code distributed by Google as part of the polymer project is also
|
680
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
681
|
+
*/const ad={"dom-if":!0,"dom-repeat":!0};let Nn=!1,In=!1;function ld(){if(!Nn){Nn=!0;const n=document.createElement("textarea");n.placeholder="a",In=n.placeholder===n.textContent}return In}function dd(n){ld()&&n.localName==="textarea"&&n.placeholder&&n.placeholder===n.textContent&&(n.textContent=null)}const ud=(()=>{const n=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(e,t,s)=>{const i=t.getAttribute(s);if(n&&s.startsWith("on-")){e.setAttribute(s,n.createScript(i,s));return}e.setAttribute(s,i)}})();function cd(n){let e=n.getAttribute("is");if(e&&ad[e]){let t=n;for(t.removeAttribute("is"),n=t.ownerDocument.createElement(e),t.parentNode.replaceChild(n,t),n.appendChild(t);t.attributes.length;){const{name:s}=t.attributes[0];ud(n,t,s),t.removeAttribute(s)}}return n}function xo(n,e){let t=e.parentInfo&&xo(n,e.parentInfo);if(t){for(let s=t.firstChild,i=0;s;s=s.nextSibling)if(e.parentIndex===i++)return s}else return n}function hd(n,e,t,s){s.id&&(e[s.id]=t)}function pd(n,e,t){if(t.events&&t.events.length)for(let s=0,i=t.events,r;s<i.length&&(r=i[s]);s++)n._addMethodEventListenerToNode(e,r.name,r.value,n)}function fd(n,e,t,s){t.templateInfo&&(e._templateInfo=t.templateInfo,e._parentTemplateInfo=s)}function _d(n,e,t){return n=n._methodHost||n,function(i){n[t]?n[t](i,i.detail):console.warn("listener method `"+t+"` not defined")}}const md=P(n=>{class e extends n{static _parseTemplate(s,i){if(!s._templateInfo){let r=s._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!i,r.stripWhiteSpace=i&&i.stripWhiteSpace||s.hasAttribute&&s.hasAttribute("strip-whitespace"),this._parseTemplateContent(s,r,{parent:null})}return s._templateInfo}static _parseTemplateContent(s,i,r){return this._parseTemplateNode(s.content,i,r)}static _parseTemplateNode(s,i,r){let o=!1,a=s;return a.localName=="template"&&!a.hasAttribute("preserve-content")?o=this._parseTemplateNestedTemplate(a,i,r)||o:a.localName==="slot"&&(i.hasInsertionPoint=!0),dd(a),a.firstChild&&this._parseTemplateChildNodes(a,i,r),a.hasAttributes&&a.hasAttributes()&&(o=this._parseTemplateNodeAttributes(a,i,r)||o),o||r.noted}static _parseTemplateChildNodes(s,i,r){if(!(s.localName==="script"||s.localName==="style"))for(let o=s.firstChild,a=0,l;o;o=l){if(o.localName=="template"&&(o=cd(o)),l=o.nextSibling,o.nodeType===Node.TEXT_NODE){let c=l;for(;c&&c.nodeType===Node.TEXT_NODE;)o.textContent+=c.textContent,l=c.nextSibling,s.removeChild(c),c=l;if(i.stripWhiteSpace&&!o.textContent.trim()){s.removeChild(o);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(o,i,d)&&(d.infoIndex=i.nodeInfoList.push(d)-1),o.parentNode&&a++}}static _parseTemplateNestedTemplate(s,i,r){let o=s,a=this._parseTemplate(o,i);return(a.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(s,i,r){let o=!1,a=Array.from(s.attributes);for(let l=a.length-1,d;d=a[l];l--)o=this._parseTemplateNodeAttribute(s,i,r,d.name,d.value)||o;return o}static _parseTemplateNodeAttribute(s,i,r,o,a){return o.slice(0,3)==="on-"?(s.removeAttribute(o),r.events=r.events||[],r.events.push({name:o.slice(3),value:a}),!0):o==="id"?(r.id=a,!0):!1}static _contentForTemplate(s){let i=s._templateInfo;return i&&i.content||s.content}_stampTemplate(s,i){s&&!s.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(s),i=i||this.constructor._parseTemplate(s);let r=i.nodeInfoList,o=i.content||s.content,a=document.importNode(o,!0);a.__noInsertionPoint=!i.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,c=r.length,h;d<c&&(h=r[d]);d++){let p=l[d]=xo(a,h);hd(this,a.$,p,h),fd(this,p,h,i),pd(this,p,h)}return a=a,a}_addMethodEventListenerToNode(s,i,r,o){o=o||s;let a=_d(o,i,r);return this._addEventListenerToNode(s,i,a),a}_addEventListenerToNode(s,i,r){s.addEventListener(i,r)}_removeEventListenerFromNode(s,i,r){s.removeEventListener(i,r)}}return e});/**
|
682
|
+
* @fileoverview
|
683
|
+
* @suppress {checkPrototypalTypes}
|
684
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
685
|
+
* This code may only be used under the BSD style license found at
|
686
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
687
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
688
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
689
|
+
* Google as part of the polymer project is also subject to an additional IP
|
690
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
691
|
+
*/let yt=0;const bt=[],v={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Co="__computeInfo",gd=/[A-Z]/;function $s(n,e,t){let s=n[e];if(!s)s=n[e]={};else if(!n.hasOwnProperty(e)&&(s=n[e]=Object.create(n[e]),t))for(let i in s){let r=s[i],o=s[i]=Array(r.length);for(let a=0;a<r.length;a++)o[a]=r[a]}return s}function dt(n,e,t,s,i,r){if(e){let o=!1;const a=yt++;for(let l in t){let d=i?Se(l):l,c=e[d];if(c)for(let h=0,p=c.length,f;h<p&&(f=c[h]);h++)(!f.info||f.info.lastRun!==a)&&(!i||Fi(l,f.trigger))&&(f.info&&(f.info.lastRun=a),f.fn(n,l,t,s,f.info,i,r),o=!0)}return o}return!1}function yd(n,e,t,s,i,r,o,a){let l=!1,d=o?Se(s):s,c=e[d];if(c)for(let h=0,p=c.length,f;h<p&&(f=c[h]);h++)(!f.info||f.info.lastRun!==t)&&(!o||Fi(s,f.trigger))&&(f.info&&(f.info.lastRun=t),f.fn(n,s,i,r,f.info,o,a),l=!0);return l}function Fi(n,e){if(e){let t=e.name;return t==n||!!(e.structured&&_o(t,n))||!!(e.wildcard&&mt(t,n))}else return!0}function Bn(n,e,t,s,i){let r=typeof i.method=="string"?n[i.method]:i.method,o=i.property;r?r.call(n,n.__data[o],s[o]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function bd(n,e,t,s,i){let r=n[v.NOTIFY],o,a=yt++;for(let d in e)e[d]&&(r&&yd(n,r,a,d,t,s,i)||i&&vd(n,d,t))&&(o=!0);let l;o&&(l=n.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function vd(n,e,t){let s=Se(e);if(s!==e){let i=ls(s)+"-changed";return Eo(n,i,t[e],e),!0}return!1}function Eo(n,e,t,s){let i={value:t,queueProperty:!0};s&&(i.path=s),I(n).dispatchEvent(new CustomEvent(e,{detail:i}))}function wd(n,e,t,s,i,r){let a=(r?Se(e):e)!=e?e:null,l=a?H(n,a):n.__data[e];a&&l===void 0&&(l=t[e]),Eo(n,i.eventName,l,a)}function Ad(n,e,t,s,i){let r,o=n.detail,a=o&&o.path;a?(s=gt(t,s,a),r=o&&o.value):r=n.currentTarget[t],r=i?!r:r,(!e[v.READ_ONLY]||!e[v.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!o||!o.queueProperty)&&e._invalidateProperties()}function xd(n,e,t,s,i){let r=n.__data[e];Gt&&(r=Gt(r,i.attrName,"attribute",n)),n._propertyToAttribute(e,i.attrName,r)}function Cd(n,e,t,s){let i=n[v.COMPUTE];if(i)if(Rl){yt++;const r=$d(n),o=[];for(let l in e)zn(l,i,o,r,s);let a;for(;a=o.shift();)$o(n,"",e,t,a)&&zn(a.methodInfo,i,o,r,s);Object.assign(t,n.__dataOld),Object.assign(e,n.__dataPending),n.__dataPending=null}else{let r=e;for(;dt(n,i,r,t,s);)Object.assign(t,n.__dataOld),Object.assign(e,n.__dataPending),r=n.__dataPending,n.__dataPending=null}}const Ed=(n,e,t)=>{let s=0,i=e.length-1,r=-1;for(;s<=i;){const o=s+i>>1,a=t.get(e[o].methodInfo)-t.get(n.methodInfo);if(a<0)s=o+1;else if(a>0)i=o-1;else{r=o;break}}r<0&&(r=i+1),e.splice(r,0,n)},zn=(n,e,t,s,i)=>{const r=i?Se(n):n,o=e[r];if(o)for(let a=0;a<o.length;a++){const l=o[a];l.info.lastRun!==yt&&(!i||Fi(n,l.trigger))&&(l.info.lastRun=yt,Ed(l.info,t,s))}};function $d(n){let e=n.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=n[v.COMPUTE];let{counts:s,ready:i,total:r}=Sd(n),o;for(;o=i.shift();){e.set(o,e.size);const a=t[o];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--s[d]===0&&i.push(d)})}r!==0&&console.warn(`Computed graph for ${n.localName} incomplete; circular?`),n.constructor.__orderedComputedDeps=e}return e}function Sd(n){const e=n[Co],t={},s=n[v.COMPUTE],i=[];let r=0;for(let o in e){const a=e[o];r+=t[o]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0)}for(let o in s)e[o]||i.push(o);return{counts:t,ready:i,total:r}}function $o(n,e,t,s,i){let r=ui(n,e,t,s,i);if(r===bt)return!1;let o=i.methodInfo;return n.__dataHasAccessor&&n.__dataHasAccessor[o]?n._setPendingProperty(o,r,!0):(n[o]=r,!1)}function Pd(n,e,t){let s=n.__dataLinkedPaths;if(s){let i;for(let r in s){let o=s[r];mt(r,e)?(i=gt(r,o,e),n._setPendingPropertyOrPath(i,t,!0,!0)):mt(o,e)&&(i=gt(o,r,e),n._setPendingPropertyOrPath(i,t,!0,!0))}}}function Ss(n,e,t,s,i,r,o){t.bindings=t.bindings||[];let a={kind:s,target:i,parts:r,literal:o,isCompound:r.length!==1};if(t.bindings.push(a),Md(a)){let{event:d,negate:c}=a.parts[0];a.listenerEvent=d||ls(i)+"-changed",a.listenerNegate=c}let l=e.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let c=a.parts[d];c.compoundIndex=d,Td(n,e,a,c,l)}}function Td(n,e,t,s,i){if(!s.literal)if(t.kind==="attribute"&&t.target[0]==="-")console.warn("Cannot set attribute "+t.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,o={index:i,binding:t,part:s,evaluator:n};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=Po(l),l.wildcard=!0),n._addTemplatePropertyEffect(e,l.rootProperty,{fn:kd,info:o,trigger:l})}}}function kd(n,e,t,s,i,r,o){let a=o[i.index],l=i.binding,d=i.part;if(r&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let c=t[e];e=gt(d.source,l.target,e),a._setPendingPropertyOrPath(e,c,!1,!0)&&n._enqueueClient(a)}else{let c=i.evaluator._evaluateBinding(n,d,e,t,s,r);c!==bt&&Dd(n,a,l,d,c)}}function Dd(n,e,t,s,i){if(i=Od(e,i,t,s),Gt&&(i=Gt(i,t.target,t.kind,e)),t.kind=="attribute")n._valueToNodeAttribute(e,i,t.target);else{let r=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?(!e[v.READ_ONLY]||!e[v.READ_ONLY][r])&&e._setPendingProperty(r,i)&&n._enqueueClient(e):n._setUnmanagedPropertyToNode(e,r,i)}}function Od(n,e,t,s){if(t.isCompound){let i=n.__dataCompoundStorage[t.target];i[s.compoundIndex]=e,e=i.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(n.localName==="input"||n.localName==="textarea"))&&(e=e==null?"":e),e}function Md(n){return!!n.target&&n.kind!="attribute"&&n.kind!="text"&&!n.isCompound&&n.parts[0].mode==="{"}function Nd(n,e){let{nodeList:t,nodeInfoList:s}=e;if(s.length)for(let i=0;i<s.length;i++){let r=s[i],o=t[i],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];Id(o,d),Bd(o,n,d)}o.__dataHost=n}}function Id(n,e){if(e.isCompound){let t=n.__dataCompoundStorage||(n.__dataCompoundStorage={}),s=e.parts,i=new Array(s.length);for(let o=0;o<s.length;o++)i[o]=s[o].literal;let r=e.target;t[r]=i,e.literal&&e.kind=="property"&&(r==="className"&&(n=I(n)),n[r]=e.literal)}}function Bd(n,e,t){if(t.listenerEvent){let s=t.parts[0];n.addEventListener(t.listenerEvent,function(i){Ad(i,e,t.target,s.source,s.negate)})}}function Ln(n,e,t,s,i,r){r=e.static||r&&(typeof r!="object"||r[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:r};for(let a=0,l;a<e.args.length&&(l=e.args[a]);a++)l.literal||n._addPropertyEffect(l.rootProperty,t,{fn:s,info:o,trigger:l});return r&&n._addPropertyEffect(e.methodName,t,{fn:s,info:o}),o}function ui(n,e,t,s,i){let r=n._methodHost||n,o=r[i.methodName];if(o){let a=n._marshalArgs(i.args,e,t);return a===bt?bt:o.apply(r,a)}else i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const zd=[],So="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ld="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",Hd="(?:'(?:[^'\\\\]|\\\\.)*')",Rd='(?:"(?:[^"\\\\]|\\\\.)*")',Fd="(?:"+Hd+"|"+Rd+")",Hn="(?:("+So+"|"+Ld+"|"+Fd+")\\s*)",Ud="(?:"+Hn+"(?:,\\s*"+Hn+")*)",Vd="(?:\\(\\s*(?:"+Ud+"?)\\)\\s*)",jd="("+So+"\\s*"+Vd+"?)",Yd="(\\[\\[|{{)\\s*",Wd="(?:]]|}})",qd="(?:(!)\\s*)?",Kd=Yd+qd+jd+Wd,Rn=new RegExp(Kd,"g");function Fn(n){let e="";for(let t=0;t<n.length;t++){let s=n[t].literal;e+=s||""}return e}function Ps(n){let e=n.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let s={methodName:e[1],static:!0,args:zd};if(e[2].trim()){let i=e[2].replace(/\\,/g,",").split(",");return Gd(i,s)}else return s}return null}function Gd(n,e){return e.args=n.map(function(t){let s=Po(t);return s.literal||(e.static=!1),s},this),e}function Po(n){let e=n.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},s=e[0];switch(s==="-"&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':t.value=e.slice(1,-1),t.literal=!0;break;case"#":t.value=Number(e),t.literal=!0;break}return t.literal||(t.rootProperty=Se(e),t.structured=li(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function Un(n,e,t){let s=H(n,t);return s===void 0&&(s=e[t]),s}function To(n,e,t,s){const i={indexSplices:s};ai&&!n._overrideLegacyUndefined&&(e.splices=i),n.notifyPath(t+".splices",i),n.notifyPath(t+".length",e.length),ai&&!n._overrideLegacyUndefined&&(i.indexSplices=[])}function tt(n,e,t,s,i,r){To(n,e,t,[{index:s,addedCount:i,removed:r,object:e,type:"splice"}])}function Jd(n){return n[0].toUpperCase()+n.substring(1)}const Ui=P(n=>{const e=md(od(n));class t extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return v}_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(st.length){let i=st[st.length-1];i._enqueueClient(this),this.__dataHost=i}}_initializeProtoProperties(i){this.__data=Object.create(i),this.__dataPending=Object.create(i),this.__dataOld={}}_initializeInstanceProperties(i){let r=this[v.READ_ONLY];for(let o in i)(!r||!r[o])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=i[o])}_addPropertyEffect(i,r,o){this._createPropertyAccessor(i,r==v.READ_ONLY);let a=$s(this,r,!0)[i];a||(a=this[r][i]=[]),a.push(o)}_removePropertyEffect(i,r,o){let a=$s(this,r,!0)[i],l=a.indexOf(o);l>=0&&a.splice(l,1)}_hasPropertyEffect(i,r){let o=this[r];return!!(o&&o[i])}_hasReadOnlyEffect(i){return this._hasPropertyEffect(i,v.READ_ONLY)}_hasNotifyEffect(i){return this._hasPropertyEffect(i,v.NOTIFY)}_hasReflectEffect(i){return this._hasPropertyEffect(i,v.REFLECT)}_hasComputedEffect(i){return this._hasPropertyEffect(i,v.COMPUTE)}_setPendingPropertyOrPath(i,r,o,a){if(a||Se(Array.isArray(i)?i[0]:i)!==i){if(!a){let l=H(this,i);if(i=Mn(this,i,r),!i||!super._shouldPropertyChange(i,r,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(i,r,o))return Pd(this,i,r),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[i])return this._setPendingProperty(i,r,o);this[i]=r}return!1}_setUnmanagedPropertyToNode(i,r,o){(o!==i[r]||typeof o=="object")&&(r==="className"&&(i=I(i)),i[r]=o)}_setPendingProperty(i,r,o){let a=this.__dataHasPaths&&li(i),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(i,r,l[i])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),i in this.__dataOld||(this.__dataOld[i]=this.__data[i]),a?this.__dataTemp[i]=r:this.__data[i]=r,this.__dataPending[i]=r,(a||this[v.NOTIFY]&&this[v.NOTIFY][i])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[i]=o),!0):!1}_setProperty(i,r){this._setPendingProperty(i,r,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(i){this.__dataPendingClients=this.__dataPendingClients||[],i!==this&&this.__dataPendingClients.push(i)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let i=this.__dataPendingClients;if(i){this.__dataPendingClients=null;for(let r=0;r<i.length;r++){let o=i[r];o.__dataEnabled?o.__dataPending&&o._flushProperties():o._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(i,r){for(let o in i)(r||!this[v.READ_ONLY]||!this[v.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,i[o],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(i,r,o){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;Cd(this,r,o,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,o,a),this._flushClients(),dt(this,this[v.REFLECT],r,o,a),dt(this,this[v.OBSERVE],r,o,a),l&&bd(this,l,r,o,a),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(i,r,o){this[v.PROPAGATE]&&dt(this,this[v.PROPAGATE],i,r,o),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,i,r,o)}_runEffectsForTemplate(i,r,o,a){const l=(d,c)=>{dt(this,i.propertyEffects,d,o,c,i.nodeList);for(let h=i.firstChild;h;h=h.nextSibling)this._runEffectsForTemplate(h,d,o,c)};i.runEffects?i.runEffects(l,r,a):l(r,a)}linkPaths(i,r){i=lt(i),r=lt(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[i]=r}unlinkPaths(i){i=lt(i),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[i]}notifySplices(i,r){let o={path:""},a=H(this,i,o);To(this,a,o.path,r)}get(i,r){return H(r||this,i)}set(i,r,o){o?Mn(o,i,r):(!this[v.READ_ONLY]||!this[v.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,r,!0)&&this._invalidateProperties()}push(i,...r){let o={path:""},a=H(this,i,o),l=a.length,d=a.push(...r);return r.length&&tt(this,a,o.path,l,r.length,[]),d}pop(i){let r={path:""},o=H(this,i,r),a=!!o.length,l=o.pop();return a&&tt(this,o,r.path,o.length,0,[l]),l}splice(i,r,o,...a){let l={path:""},d=H(this,i,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let c;return arguments.length===2?c=d.splice(r):c=d.splice(r,o,...a),(a.length||c.length)&&tt(this,d,l.path,r,a.length,c),c}shift(i){let r={path:""},o=H(this,i,r),a=!!o.length,l=o.shift();return a&&tt(this,o,r.path,0,0,[l]),l}unshift(i,...r){let o={path:""},a=H(this,i,o),l=a.unshift(...r);return r.length&&tt(this,a,o.path,0,r.length,[]),l}notifyPath(i,r){let o;if(arguments.length==1){let a={path:""};r=H(this,i,a),o=a.path}else Array.isArray(i)?o=lt(i):o=i;this._setPendingPropertyOrPath(o,r,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(i,r){this._addPropertyEffect(i,v.READ_ONLY),r&&(this["_set"+Jd(i)]=function(o){this._setProperty(i,o)})}_createPropertyObserver(i,r,o){let a={property:i,method:r,dynamicFn:!!o};this._addPropertyEffect(i,v.OBSERVE,{fn:Bn,info:a,trigger:{name:i}}),o&&this._addPropertyEffect(r,v.OBSERVE,{fn:Bn,info:a,trigger:{name:r}})}_createMethodObserver(i,r){let o=Ps(i);if(!o)throw new Error("Malformed observer expression '"+i+"'");Ln(this,o,v.OBSERVE,ui,null,r)}_createNotifyingProperty(i){this._addPropertyEffect(i,v.NOTIFY,{fn:wd,info:{eventName:ls(i)+"-changed",property:i}})}_createReflectedProperty(i){let r=this.constructor.attributeNameForProperty(i);r[0]==="-"?console.warn("Property "+i+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(i,v.REFLECT,{fn:xd,info:{attrName:r}})}_createComputedProperty(i,r,o){let a=Ps(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Ln(this,a,v.COMPUTE,$o,i,o);$s(this,Co)[i]=l}_marshalArgs(i,r,o){const a=this.__data,l=[];for(let d=0,c=i.length;d<c;d++){let{name:h,structured:p,wildcard:f,value:_,literal:g}=i[d];if(!g)if(f){const y=mt(h,r),b=Un(a,o,y?r:h);_={path:y?r:h,value:b,base:y?H(a,h):b}}else _=p?Un(a,o,h):a[h];if(ai&&!this._overrideLegacyUndefined&&_===void 0&&i.length>1)return bt;l[d]=_}return l}static addPropertyEffect(i,r,o){this.prototype._addPropertyEffect(i,r,o)}static createPropertyObserver(i,r,o){this.prototype._createPropertyObserver(i,r,o)}static createMethodObserver(i,r){this.prototype._createMethodObserver(i,r)}static createNotifyingProperty(i){this.prototype._createNotifyingProperty(i)}static createReadOnlyProperty(i,r){this.prototype._createReadOnlyProperty(i,r)}static createReflectedProperty(i){this.prototype._createReflectedProperty(i)}static createComputedProperty(i,r,o){this.prototype._createComputedProperty(i,r,o)}static bindTemplate(i){return this.prototype._bindTemplate(i)}_bindTemplate(i,r){let o=this.constructor._parseTemplate(i),a=this.__preBoundTemplateInfo==o;if(!a)for(let l in o.propertyEffects)this._createPropertyAccessor(l);if(r)if(o=Object.create(o),o.wasPreBound=a,!this.__templateInfo)this.__templateInfo=o;else{const l=i._parentTemplateInfo||this.__templateInfo,d=l.lastChild;o.parent=l,l.lastChild=o,o.previousSibling=d,d?d.nextSibling=o:l.firstChild=o}else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(i,r,o){let a=i.hostProps=i.hostProps||{};a[r]=!0;let l=i.propertyEffects=i.propertyEffects||{};(l[r]=l[r]||[]).push(o)}_stampTemplate(i,r){r=r||this._bindTemplate(i,!0),st.push(this);let o=super._stampTemplate(i,r);if(st.pop(),r.nodeList=o.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=o.firstChild;l;l=l.nextSibling)a.push(l)}return o.templateInfo=r,Nd(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),o}_removeBoundDom(i){const r=i.templateInfo,{previousSibling:o,nextSibling:a,parent:l}=r;o?o.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=o:l&&(l.lastChild=o),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let c=0;c<d.length;c++){let h=d[c];I(I(h).parentNode).removeChild(h)}}static _parseTemplateNode(i,r,o){let a=e._parseTemplateNode.call(this,i,r,o);if(i.nodeType===Node.TEXT_NODE){let l=this._parseBindings(i.textContent,r);l&&(i.textContent=Fn(l)||" ",Ss(this,r,o,"text","textContent",l),a=!0)}return a}static _parseTemplateNodeAttribute(i,r,o,a,l){let d=this._parseBindings(l,r);if(d){let c=a,h="property";gd.test(a)?h="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),h="attribute");let p=Fn(d);return p&&h=="attribute"&&(a=="class"&&i.hasAttribute("class")&&(p+=" "+i.getAttribute(a)),i.setAttribute(a,p)),h=="attribute"&&c=="disable-upgrade$"&&i.setAttribute(a,""),i.localName==="input"&&c==="value"&&i.setAttribute(c,""),i.removeAttribute(c),h==="property"&&(a=go(a)),Ss(this,r,o,h,a,d,p),!0}else return e._parseTemplateNodeAttribute.call(this,i,r,o,a,l)}static _parseTemplateNestedTemplate(i,r,o){let a=e._parseTemplateNestedTemplate.call(this,i,r,o);const l=i.parentNode,d=o.templateInfo,c=l.localName==="dom-if",h=l.localName==="dom-repeat";Sn&&(c||h)&&(l.removeChild(i),o=o.parentInfo,o.templateInfo=d,o.noted=!0,a=!1);let p=d.hostProps;if(Fl&&c)p&&(r.hostProps=Object.assign(r.hostProps||{},p),Sn||(o.parentInfo.noted=!0));else{let f="{";for(let _ in p){let g=[{mode:f,source:_,dependencies:[_],hostProp:!0}];Ss(this,r,o,"property","_host_"+_,g)}}return a}static _parseBindings(i,r){let o=[],a=0,l;for(;(l=Rn.exec(i))!==null;){l.index>a&&o.push({literal:i.slice(a,l.index)});let d=l[1][0],c=!!l[2],h=l[3].trim(),p=!1,f="",_=-1;d=="{"&&(_=h.indexOf("::"))>0&&(f=h.substring(_+2),h=h.substring(0,_),p=!0);let g=Ps(h),y=[];if(g){let{args:b,methodName:x}=g;for(let B=0;B<b.length;B++){let w=b[B];w.literal||y.push(w)}let N=r.dynamicFns;(N&&N[x]||g.static)&&(y.push(x),g.dynamicFn=!0)}else y.push(h);o.push({source:h,mode:d,negate:c,customEvent:p,signature:g,dependencies:y,event:f}),a=Rn.lastIndex}if(a&&a<i.length){let d=i.substring(a);d&&o.push({literal:d})}return o.length?o:null}static _evaluateBinding(i,r,o,a,l,d){let c;return r.signature?c=ui(i,o,a,l,r.signature):o!=r.source?c=H(i,r.source):d&&li(o)?c=H(i,o):c=i.__data[o],r.negate&&(c=!c),c}}return t}),st=[];/**
|
692
|
+
@license
|
693
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
694
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
695
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
696
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
697
|
+
Code distributed by Google as part of the polymer project is also
|
698
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
699
|
+
*//**
|
700
|
+
@license
|
701
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
702
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
703
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
704
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
705
|
+
Code distributed by Google as part of the polymer project is also
|
706
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
707
|
+
*/function Xd(n){const e={};for(let t in n){const s=n[t];e[t]=typeof s=="function"?{type:s}:s}return e}const Zd=P(n=>{const e=wo(n);function t(r){const o=Object.getPrototypeOf(r);return o.prototype instanceof i?o:null}function s(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let o=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(o=Xd(a))}r.__ownProperties=o}return r.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const o=this._properties;this.__observedAttributes=o?Object.keys(o).map(a=>this.prototype._addPropertyToAttributeMap(a)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const o=t(this);o&&o.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const o=s(this);o&&this.createProperties(o)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const o=t(this);this.__properties=Object.assign({},o&&o._properties,s(this))}return this.__properties}static typeForProperty(o){const a=this._properties[o];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i});/**
|
708
|
+
* @fileoverview
|
709
|
+
* @suppress {checkPrototypalTypes}
|
710
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
711
|
+
* This code may only be used under the BSD style license found at
|
712
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
713
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
714
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
715
|
+
* Google as part of the polymer project is also subject to an additional IP
|
716
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
717
|
+
*/const Qd="3.5.2",Vn=window.ShadyCSS&&window.ShadyCSS.cssBuild,eu=P(n=>{const e=Zd(Ui(n));function t(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let c in d){let h=d[c];"value"in h&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[c]=h)}}return l.__propertyDefaults}function s(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function i(l,d,c,h){c.computed&&(c.readOnly=!0),c.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,c.computed,h)),c.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!c.computed):c.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),c.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):c.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),c.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):c.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),c.observer&&l._createPropertyObserver(d,c.observer,h[c.observer]),l._addPropertyToAttributeMap(d)}function r(l,d,c,h){if(!Vn){const p=d.content.querySelectorAll("style"),f=po(d),_=Gl(c),g=d.content.firstElementChild;for(let b=0;b<_.length;b++){let x=_[b];x.textContent=l._processStyleText(x.textContent,h),d.content.insertBefore(x,g)}let y=0;for(let b=0;b<f.length;b++){let x=f[b],N=p[y];N!==x?(x=x.cloneNode(!0),N.parentNode.insertBefore(x,N)):y++,x.textContent=l._processStyleText(x.textContent,h)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,c),Ul&&Vn&&Bl){const p=d.content.querySelectorAll("style");if(p){let f="";Array.from(p).forEach(_=>{f+=_.textContent,_.parentNode.removeChild(_)}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(f)}}}function o(l){let d=null;if(l&&(!Jt||Ll)&&(d=_t.import(l,"template"),Jt&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends e{static get polymerElementVersion(){return Qd}static _finalizeClass(){e._finalizeClass.call(this);const d=s(this);d&&this.createObservers(d,this._properties),this._prepareTemplate()}static _prepareTemplate(){let d=this.template;d&&(typeof d=="string"?(console.error("template getter must return HTMLTemplateElement"),d=null):lo||(d=d.cloneNode(!0))),this.prototype._template=d}static createProperties(d){for(let c in d)i(this.prototype,c,d[c],d)}static createObservers(d,c){const h=this.prototype;for(let p=0;p<d.length;p++)h._createMethodObserver(d[p],c)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let d=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;typeof d=="function"&&(d=d()),this._template=d!==void 0?d:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&o(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(d){this._template=d}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const d=this.importMeta;if(d)this._importPath=Hi(d.url);else{const c=_t.import(this.is);this._importPath=c&&c.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=zl,this.importPath=this.constructor.importPath;let d=t(this.constructor);if(d)for(let c in d){let h=d[c];if(this._canApplyPropertyDefault(c)){let p=typeof h.value=="function"?h.value.call(this):h.value;this._hasAccessor(c)?this._setPendingProperty(c,p,!0):this[c]=p}}}_canApplyPropertyDefault(d){return!this.hasOwnProperty(d)}static _processStyleText(d,c){return Li(d,c)}static _finalizeTemplate(d){const c=this.prototype._template;if(c&&!c.__polymerFinalized){c.__polymerFinalized=!0;const h=this.importPath,p=h?ut(h):"";r(this,c,d,p),this.prototype._bindTemplate(c)}}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(d){const c=I(this);if(c.attachShadow)return d?(c.shadowRoot||(c.attachShadow({mode:"open",shadyUpgradeFragment:d}),c.shadowRoot.appendChild(d),this.constructor._styleSheet&&(c.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Hl&&window.ShadyDOM&&window.ShadyDOM.flushInitial(c.shadowRoot),c.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(d){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,d)}resolveUrl(d,c){return!c&&this.importPath&&(c=ut(this.importPath)),ut(d,c)}static _parseTemplateContent(d,c,h){return c.dynamicFns=c.dynamicFns||this._properties,e._parseTemplateContent.call(this,d,c,h)}static _addTemplatePropertyEffect(d,c,h){return uo&&!(c in this._properties)&&!(h.info.part.signature&&h.info.part.signature.static)&&!h.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${c}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,d,c,h)}}return a});/**
|
718
|
+
@license
|
719
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
720
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
721
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
722
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
723
|
+
Code distributed by Google as part of the polymer project is also
|
724
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
725
|
+
*/const jn=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:n=>n});class ko{constructor(e,t){Oo(e,t);const s=t.reduce((i,r,o)=>i+Do(r)+e[o+1],e[0]);this.value=s.toString()}toString(){return this.value}}function Do(n){if(n instanceof ko)return n.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${n}`)}function tu(n){if(n instanceof HTMLTemplateElement)return n.innerHTML;if(n instanceof ko)return Do(n);throw new Error(`non-template value passed to Polymer's html function: ${n}`)}const Pe=function(e,...t){Oo(e,t);const s=document.createElement("template");let i=t.reduce((r,o,a)=>r+tu(o)+e[a+1],e[0]);return jn&&(i=jn.createHTML(i)),s.innerHTML=i,s},Oo=(n,e)=>{if(!Array.isArray(n)||!Array.isArray(n.raw)||e.length!==n.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
726
|
+
@license
|
727
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
728
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
729
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
730
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
731
|
+
Code distributed by Google as part of the polymer project is also
|
732
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
733
|
+
*/const ae=eu(HTMLElement);/**
|
734
|
+
* @license
|
735
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
736
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
737
|
+
*/const X=[];function ci(n,e,t=n.getAttribute("dir")){e?n.setAttribute("dir",e):t!=null&&n.removeAttribute("dir")}function hi(){return document.documentElement.getAttribute("dir")}function su(){const n=hi();X.forEach(e=>{ci(e,n)})}const iu=new MutationObserver(su);iu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ds=n=>class extends n{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>t===""?null:t}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),ci(this,hi(),null))}attributeChangedCallback(t,s,i){if(super.attributeChangedCallback(t,s,i),t!=="dir")return;const r=hi(),o=i===r&&X.indexOf(this)===-1,a=!i&&s&&X.indexOf(this)===-1;o||a?(this.__subscribe(),ci(this,r,i)):i!==r&&s===r&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=X.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,s,i){i==="dir"&&s===""&&!t.hasAttribute("dir")||super._valueToNodeAttribute(t,s,i)}_attributeToProperty(t,s,i){t==="dir"&&!s?this.dir="":super._attributeToProperty(t,s,i)}__subscribe(){X.includes(this)||X.push(this)}__unsubscribe(){X.includes(this)&&X.splice(X.indexOf(this),1)}};/**
|
738
|
+
* @license
|
739
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
740
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
741
|
+
*/class nu extends $e(ds(ae)){static get is(){return"vaadin-input-container"}static get template(){return Pe`
|
742
|
+
<style>
|
743
|
+
:host {
|
744
|
+
display: flex;
|
745
|
+
align-items: center;
|
746
|
+
flex: 0 1 auto;
|
747
|
+
border-radius:
|
748
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
749
|
+
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
750
|
+
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
751
|
+
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
752
|
+
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
753
|
+
--_border-radius: var(--vaadin-input-field-border-radius, 0px);
|
754
|
+
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
755
|
+
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
756
|
+
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
757
|
+
}
|
758
|
+
|
759
|
+
:host([dir='rtl']) {
|
760
|
+
border-radius:
|
761
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
762
|
+
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
763
|
+
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
764
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
765
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
766
|
+
}
|
767
|
+
|
768
|
+
:host([hidden]) {
|
769
|
+
display: none !important;
|
770
|
+
}
|
771
|
+
|
772
|
+
/* Reset the native input styles */
|
773
|
+
::slotted(input) {
|
774
|
+
-webkit-appearance: none;
|
775
|
+
-moz-appearance: none;
|
776
|
+
flex: auto;
|
777
|
+
white-space: nowrap;
|
778
|
+
overflow: hidden;
|
779
|
+
width: 100%;
|
780
|
+
height: 100%;
|
781
|
+
outline: none;
|
782
|
+
margin: 0;
|
783
|
+
padding: 0;
|
784
|
+
border: 0;
|
785
|
+
border-radius: 0;
|
786
|
+
min-width: 0;
|
787
|
+
font: inherit;
|
788
|
+
line-height: normal;
|
789
|
+
color: inherit;
|
790
|
+
background-color: transparent;
|
791
|
+
/* Disable default invalid style in Firefox */
|
792
|
+
box-shadow: none;
|
793
|
+
}
|
794
|
+
|
795
|
+
::slotted(*) {
|
796
|
+
flex: none;
|
797
|
+
}
|
798
|
+
|
799
|
+
::slotted(:is(input, textarea))::placeholder {
|
800
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
801
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
802
|
+
font: inherit;
|
803
|
+
color: inherit;
|
804
|
+
/* Override default opacity in Firefox */
|
805
|
+
opacity: 1;
|
806
|
+
}
|
807
|
+
</style>
|
808
|
+
<slot name="prefix"></slot>
|
809
|
+
<slot></slot>
|
810
|
+
<slot name="suffix"></slot>
|
811
|
+
`}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",e=>{e.target===this&&e.preventDefault()}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(t=>t.focus&&t.focus())})}}Y(nu);/**
|
812
|
+
* @license
|
813
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
814
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
815
|
+
*/class ru extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}Y(ru);const Je=(n,...e)=>{oo(`lumo-${n}`,e)};/**
|
816
|
+
* @license
|
817
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
818
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
819
|
+
*/const ou=A`
|
820
|
+
:host {
|
821
|
+
--lumo-size-xs: 1.625rem;
|
822
|
+
--lumo-size-s: 1.875rem;
|
823
|
+
--lumo-size-m: 2.25rem;
|
824
|
+
--lumo-size-l: 2.75rem;
|
825
|
+
--lumo-size-xl: 3.5rem;
|
826
|
+
|
827
|
+
/* Icons */
|
828
|
+
--lumo-icon-size-s: 1.25em;
|
829
|
+
--lumo-icon-size-m: 1.5em;
|
830
|
+
--lumo-icon-size-l: 2.25em;
|
831
|
+
/* For backwards compatibility */
|
832
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
833
|
+
}
|
834
|
+
`;Je("sizing-props",ou);/**
|
835
|
+
* @license
|
836
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
837
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
838
|
+
*/const au=A`
|
839
|
+
:host {
|
840
|
+
/* Square */
|
841
|
+
--lumo-space-xs: 0.25rem;
|
842
|
+
--lumo-space-s: 0.5rem;
|
843
|
+
--lumo-space-m: 1rem;
|
844
|
+
--lumo-space-l: 1.5rem;
|
845
|
+
--lumo-space-xl: 2.5rem;
|
846
|
+
|
847
|
+
/* Wide */
|
848
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
849
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
850
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
851
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
852
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
853
|
+
|
854
|
+
/* Tall */
|
855
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
856
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
857
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
858
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
859
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
860
|
+
}
|
861
|
+
`;Je("spacing-props",au);/**
|
862
|
+
* @license
|
863
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
864
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
865
|
+
*/const lu=A`
|
866
|
+
:host {
|
867
|
+
/* Border radius */
|
868
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
869
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
870
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
871
|
+
|
872
|
+
/* Shadow */
|
873
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
874
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
875
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
876
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
877
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
878
|
+
|
879
|
+
/* Clickable element cursor */
|
880
|
+
--lumo-clickable-cursor: default;
|
881
|
+
}
|
882
|
+
`;A`
|
883
|
+
html {
|
884
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
885
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
886
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
887
|
+
}
|
888
|
+
`;Je("style-props",lu);/**
|
889
|
+
* @license
|
890
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
891
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
892
|
+
*/const du=A`
|
893
|
+
:host {
|
894
|
+
/* Base (background) */
|
895
|
+
--lumo-base-color: #fff;
|
896
|
+
|
897
|
+
/* Tint */
|
898
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
899
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
900
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
901
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
902
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
903
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
904
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
905
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
906
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
907
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
908
|
+
--lumo-tint: #fff;
|
909
|
+
|
910
|
+
/* Shade */
|
911
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
912
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
913
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
914
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
915
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
916
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
917
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
918
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
919
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
920
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
921
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
922
|
+
|
923
|
+
/* Contrast */
|
924
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
925
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
926
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
927
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
928
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
929
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
930
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
931
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
932
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
933
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
934
|
+
--lumo-contrast: var(--lumo-shade);
|
935
|
+
|
936
|
+
/* Text */
|
937
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
938
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
939
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
940
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
941
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
942
|
+
|
943
|
+
/* Primary */
|
944
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
945
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
946
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
947
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
948
|
+
--lumo-primary-contrast-color: #fff;
|
949
|
+
|
950
|
+
/* Error */
|
951
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
952
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
953
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
954
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
955
|
+
--lumo-error-contrast-color: #fff;
|
956
|
+
|
957
|
+
/* Success */
|
958
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
959
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
960
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
961
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
962
|
+
--lumo-success-contrast-color: #fff;
|
963
|
+
|
964
|
+
/* Warning */
|
965
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
966
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
967
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
968
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
969
|
+
}
|
970
|
+
|
971
|
+
/* forced-colors mode adjustments */
|
972
|
+
@media (forced-colors: active) {
|
973
|
+
html {
|
974
|
+
--lumo-disabled-text-color: GrayText;
|
975
|
+
}
|
976
|
+
}
|
977
|
+
`;Je("color-props",du);const uu=A`
|
978
|
+
[theme~='dark'] {
|
979
|
+
/* Base (background) */
|
980
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
981
|
+
|
982
|
+
/* Tint */
|
983
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
984
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
985
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
986
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
987
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
988
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
989
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
990
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
991
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
992
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
993
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
994
|
+
|
995
|
+
/* Shade */
|
996
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
997
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
998
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
999
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
1000
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
1001
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
1002
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
1003
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
1004
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
1005
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
1006
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
1007
|
+
|
1008
|
+
/* Contrast */
|
1009
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
1010
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
1011
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
1012
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
1013
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
1014
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
1015
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
1016
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
1017
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
1018
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
1019
|
+
--lumo-contrast: var(--lumo-tint);
|
1020
|
+
|
1021
|
+
/* Text */
|
1022
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
1023
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
1024
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
1025
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
1026
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
1027
|
+
|
1028
|
+
/* Primary */
|
1029
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
1030
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
1031
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
1032
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
1033
|
+
--lumo-primary-contrast-color: #fff;
|
1034
|
+
|
1035
|
+
/* Error */
|
1036
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
1037
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
1038
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
1039
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
1040
|
+
|
1041
|
+
/* Success */
|
1042
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
1043
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
1044
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
1045
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
1046
|
+
|
1047
|
+
/* Warning */
|
1048
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
1049
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
1050
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
1051
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
html {
|
1055
|
+
color: var(--lumo-body-text-color);
|
1056
|
+
background-color: var(--lumo-base-color);
|
1057
|
+
color-scheme: light;
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
[theme~='dark'] {
|
1061
|
+
color: var(--lumo-body-text-color);
|
1062
|
+
background-color: var(--lumo-base-color);
|
1063
|
+
color-scheme: dark;
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
h1,
|
1067
|
+
h2,
|
1068
|
+
h3,
|
1069
|
+
h4,
|
1070
|
+
h5,
|
1071
|
+
h6 {
|
1072
|
+
color: var(--lumo-header-text-color);
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
a:where(:any-link) {
|
1076
|
+
color: var(--lumo-primary-text-color);
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
a:not(:any-link) {
|
1080
|
+
color: var(--lumo-disabled-text-color);
|
1081
|
+
}
|
1082
|
+
|
1083
|
+
blockquote {
|
1084
|
+
color: var(--lumo-secondary-text-color);
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
code,
|
1088
|
+
pre {
|
1089
|
+
background-color: var(--lumo-contrast-10pct);
|
1090
|
+
border-radius: var(--lumo-border-radius-m);
|
1091
|
+
}
|
1092
|
+
`;S("",uu,{moduleId:"lumo-color"});/**
|
1093
|
+
* @license
|
1094
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
1095
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
1096
|
+
*/const cu=A`
|
1097
|
+
:host {
|
1098
|
+
/* prettier-ignore */
|
1099
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
1100
|
+
|
1101
|
+
/* Font sizes */
|
1102
|
+
--lumo-font-size-xxs: 0.75rem;
|
1103
|
+
--lumo-font-size-xs: 0.8125rem;
|
1104
|
+
--lumo-font-size-s: 0.875rem;
|
1105
|
+
--lumo-font-size-m: 1rem;
|
1106
|
+
--lumo-font-size-l: 1.125rem;
|
1107
|
+
--lumo-font-size-xl: 1.375rem;
|
1108
|
+
--lumo-font-size-xxl: 1.75rem;
|
1109
|
+
--lumo-font-size-xxxl: 2.5rem;
|
1110
|
+
|
1111
|
+
/* Line heights */
|
1112
|
+
--lumo-line-height-xs: 1.25;
|
1113
|
+
--lumo-line-height-s: 1.375;
|
1114
|
+
--lumo-line-height-m: 1.625;
|
1115
|
+
}
|
1116
|
+
`,hu=A`
|
1117
|
+
body,
|
1118
|
+
:host {
|
1119
|
+
font-family: var(--lumo-font-family);
|
1120
|
+
font-size: var(--lumo-font-size-m);
|
1121
|
+
line-height: var(--lumo-line-height-m);
|
1122
|
+
-webkit-text-size-adjust: 100%;
|
1123
|
+
-webkit-font-smoothing: antialiased;
|
1124
|
+
-moz-osx-font-smoothing: grayscale;
|
1125
|
+
}
|
1126
|
+
|
1127
|
+
small,
|
1128
|
+
[theme~='font-size-s'] {
|
1129
|
+
font-size: var(--lumo-font-size-s);
|
1130
|
+
line-height: var(--lumo-line-height-s);
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
[theme~='font-size-xs'] {
|
1134
|
+
font-size: var(--lumo-font-size-xs);
|
1135
|
+
line-height: var(--lumo-line-height-xs);
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
1139
|
+
font-weight: 600;
|
1140
|
+
line-height: var(--lumo-line-height-xs);
|
1141
|
+
margin-block: 0;
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
:where(h1) {
|
1145
|
+
font-size: var(--lumo-font-size-xxxl);
|
1146
|
+
}
|
1147
|
+
|
1148
|
+
:where(h2) {
|
1149
|
+
font-size: var(--lumo-font-size-xxl);
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
:where(h3) {
|
1153
|
+
font-size: var(--lumo-font-size-xl);
|
1154
|
+
}
|
1155
|
+
|
1156
|
+
:where(h4) {
|
1157
|
+
font-size: var(--lumo-font-size-l);
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
:where(h5) {
|
1161
|
+
font-size: var(--lumo-font-size-m);
|
1162
|
+
}
|
1163
|
+
|
1164
|
+
:where(h6) {
|
1165
|
+
font-size: var(--lumo-font-size-xs);
|
1166
|
+
text-transform: uppercase;
|
1167
|
+
letter-spacing: 0.03em;
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
p,
|
1171
|
+
blockquote {
|
1172
|
+
margin-top: 0.5em;
|
1173
|
+
margin-bottom: 0.75em;
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
a {
|
1177
|
+
text-decoration: none;
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
a:where(:any-link):hover {
|
1181
|
+
text-decoration: underline;
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
hr {
|
1185
|
+
display: block;
|
1186
|
+
align-self: stretch;
|
1187
|
+
height: 1px;
|
1188
|
+
border: 0;
|
1189
|
+
padding: 0;
|
1190
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
1191
|
+
background-color: var(--lumo-contrast-10pct);
|
1192
|
+
}
|
1193
|
+
|
1194
|
+
blockquote {
|
1195
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
b,
|
1199
|
+
strong {
|
1200
|
+
font-weight: 600;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
/* RTL specific styles */
|
1204
|
+
blockquote[dir='rtl'] {
|
1205
|
+
border-left: none;
|
1206
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
1207
|
+
}
|
1208
|
+
`;S("",hu,{moduleId:"lumo-typography"});Je("typography-props",cu);/**
|
1209
|
+
* @license
|
1210
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
1211
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
1212
|
+
*/const Mo=A`
|
1213
|
+
:host {
|
1214
|
+
top: var(--lumo-space-m);
|
1215
|
+
right: var(--lumo-space-m);
|
1216
|
+
bottom: var(--lumo-space-m);
|
1217
|
+
left: var(--lumo-space-m);
|
1218
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
1219
|
+
/* stylelint-disable-next-line */
|
1220
|
+
outline: 0px solid transparent;
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
[part='overlay'] {
|
1224
|
+
background-color: var(--lumo-base-color);
|
1225
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
1226
|
+
border-radius: var(--lumo-border-radius-m);
|
1227
|
+
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
1228
|
+
color: var(--lumo-body-text-color);
|
1229
|
+
font-family: var(--lumo-font-family);
|
1230
|
+
font-size: var(--lumo-font-size-m);
|
1231
|
+
font-weight: 400;
|
1232
|
+
line-height: var(--lumo-line-height-m);
|
1233
|
+
letter-spacing: 0;
|
1234
|
+
text-transform: none;
|
1235
|
+
-webkit-text-size-adjust: 100%;
|
1236
|
+
-webkit-font-smoothing: antialiased;
|
1237
|
+
-moz-osx-font-smoothing: grayscale;
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
[part='content'] {
|
1241
|
+
padding: var(--lumo-space-xs);
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
[part='backdrop'] {
|
1245
|
+
background-color: var(--lumo-shade-20pct);
|
1246
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
1247
|
+
will-change: opacity;
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
@keyframes lumo-overlay-backdrop-enter {
|
1251
|
+
0% {
|
1252
|
+
opacity: 0;
|
1253
|
+
}
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
:host([closing]) [part='backdrop'] {
|
1257
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
@keyframes lumo-overlay-backdrop-exit {
|
1261
|
+
100% {
|
1262
|
+
opacity: 0;
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
@keyframes lumo-overlay-dummy-animation {
|
1267
|
+
0% {
|
1268
|
+
opacity: 1;
|
1269
|
+
}
|
1270
|
+
|
1271
|
+
100% {
|
1272
|
+
opacity: 1;
|
1273
|
+
}
|
1274
|
+
}
|
1275
|
+
`;S("",Mo,{moduleId:"lumo-overlay"});/**
|
1276
|
+
* @license
|
1277
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
1278
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
1279
|
+
*/const No=A`
|
1280
|
+
:host([opening]),
|
1281
|
+
:host([closing]) {
|
1282
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
[part='overlay'] {
|
1286
|
+
will-change: opacity, transform;
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
:host([opening]) [part='overlay'] {
|
1290
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
@keyframes lumo-menu-overlay-enter {
|
1294
|
+
0% {
|
1295
|
+
opacity: 0;
|
1296
|
+
transform: translateY(-4px);
|
1297
|
+
}
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
:host([closing]) [part='overlay'] {
|
1301
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
@keyframes lumo-menu-overlay-exit {
|
1305
|
+
100% {
|
1306
|
+
opacity: 0;
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
`;S("",No,{moduleId:"lumo-menu-overlay-core"});const pu=A`
|
1310
|
+
/* Small viewport (bottom sheet) styles */
|
1311
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
1312
|
+
@media (max-width: 420px), (max-height: 420px) {
|
1313
|
+
:host {
|
1314
|
+
top: 0 !important;
|
1315
|
+
right: 0 !important;
|
1316
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
1317
|
+
left: 0 !important;
|
1318
|
+
align-items: stretch !important;
|
1319
|
+
justify-content: flex-end !important;
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
[part='overlay'] {
|
1323
|
+
max-height: 50vh;
|
1324
|
+
width: 100vw;
|
1325
|
+
border-radius: 0;
|
1326
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
1330
|
+
[part='content'] {
|
1331
|
+
padding: 30px var(--lumo-space-m);
|
1332
|
+
max-height: inherit;
|
1333
|
+
box-sizing: border-box;
|
1334
|
+
-webkit-overflow-scrolling: touch;
|
1335
|
+
overflow: auto;
|
1336
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
1337
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
[part='backdrop'] {
|
1341
|
+
display: block;
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
/* Animations */
|
1345
|
+
|
1346
|
+
:host([opening]) [part='overlay'] {
|
1347
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
:host([closing]),
|
1351
|
+
:host([closing]) [part='backdrop'] {
|
1352
|
+
animation-delay: 0.14s;
|
1353
|
+
}
|
1354
|
+
|
1355
|
+
:host([closing]) [part='overlay'] {
|
1356
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
1357
|
+
}
|
1358
|
+
}
|
1359
|
+
|
1360
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
1361
|
+
0% {
|
1362
|
+
transform: translateY(150%);
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
1367
|
+
100% {
|
1368
|
+
transform: translateY(150%);
|
1369
|
+
}
|
1370
|
+
}
|
1371
|
+
`,Io=[Mo,No,pu];S("",Io,{moduleId:"lumo-menu-overlay"});const fu=A`
|
1372
|
+
[part='overlay'] {
|
1373
|
+
/*
|
1374
|
+
Width:
|
1375
|
+
date cell widths
|
1376
|
+
+ month calendar side padding
|
1377
|
+
+ year scroller width
|
1378
|
+
*/
|
1379
|
+
/* prettier-ignore */
|
1380
|
+
width:
|
1381
|
+
calc(
|
1382
|
+
var(--lumo-size-m) * 7
|
1383
|
+
+ var(--lumo-space-xs) * 2
|
1384
|
+
+ 57px
|
1385
|
+
);
|
1386
|
+
height: 100%;
|
1387
|
+
max-height: calc(var(--lumo-size-m) * 14);
|
1388
|
+
overflow: hidden;
|
1389
|
+
-webkit-tap-highlight-color: transparent;
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
[part='overlay'] {
|
1393
|
+
flex-direction: column;
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
[part='content'] {
|
1397
|
+
padding: 0;
|
1398
|
+
height: 100%;
|
1399
|
+
overflow: hidden;
|
1400
|
+
-webkit-mask-image: none;
|
1401
|
+
mask-image: none;
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
:host([top-aligned]) [part~='overlay'] {
|
1405
|
+
margin-top: var(--lumo-space-xs);
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
:host([bottom-aligned]) [part~='overlay'] {
|
1409
|
+
margin-bottom: var(--lumo-space-xs);
|
1410
|
+
}
|
1411
|
+
|
1412
|
+
@media (max-width: 420px), (max-height: 420px) {
|
1413
|
+
[part='overlay'] {
|
1414
|
+
width: 100vw;
|
1415
|
+
height: 70vh;
|
1416
|
+
max-height: 70vh;
|
1417
|
+
}
|
1418
|
+
}
|
1419
|
+
`;S("vaadin-date-picker-overlay",[Io,fu],{moduleId:"lumo-date-picker-overlay"});const _u=A`
|
1420
|
+
:host {
|
1421
|
+
/* Sizing */
|
1422
|
+
--lumo-button-size: var(--lumo-size-m);
|
1423
|
+
min-width: calc(var(--lumo-button-size) * 2);
|
1424
|
+
height: var(--lumo-button-size);
|
1425
|
+
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
1426
|
+
margin: var(--lumo-space-xs) 0;
|
1427
|
+
box-sizing: border-box;
|
1428
|
+
/* Style */
|
1429
|
+
font-family: var(--lumo-font-family);
|
1430
|
+
font-size: var(--lumo-font-size-m);
|
1431
|
+
font-weight: 500;
|
1432
|
+
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
1433
|
+
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
1434
|
+
border-radius: var(--lumo-border-radius-m);
|
1435
|
+
cursor: var(--lumo-clickable-cursor);
|
1436
|
+
-webkit-tap-highlight-color: transparent;
|
1437
|
+
-webkit-font-smoothing: antialiased;
|
1438
|
+
-moz-osx-font-smoothing: grayscale;
|
1439
|
+
flex-shrink: 0;
|
1440
|
+
}
|
1441
|
+
|
1442
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
1443
|
+
[part='label'],
|
1444
|
+
[part='prefix'],
|
1445
|
+
[part='suffix'] {
|
1446
|
+
line-height: var(--lumo-line-height-xs);
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
[part='label'] {
|
1450
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
:host([theme~='small']) {
|
1454
|
+
font-size: var(--lumo-font-size-s);
|
1455
|
+
--lumo-button-size: var(--lumo-size-s);
|
1456
|
+
}
|
1457
|
+
|
1458
|
+
:host([theme~='large']) {
|
1459
|
+
font-size: var(--lumo-font-size-l);
|
1460
|
+
--lumo-button-size: var(--lumo-size-l);
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
/* For interaction states */
|
1464
|
+
:host::before,
|
1465
|
+
:host::after {
|
1466
|
+
content: '';
|
1467
|
+
/* We rely on the host always being relative */
|
1468
|
+
position: absolute;
|
1469
|
+
z-index: 1;
|
1470
|
+
inset: 0;
|
1471
|
+
background-color: currentColor;
|
1472
|
+
border-radius: inherit;
|
1473
|
+
opacity: 0;
|
1474
|
+
pointer-events: none;
|
1475
|
+
}
|
1476
|
+
|
1477
|
+
/* Hover */
|
1478
|
+
|
1479
|
+
@media (any-hover: hover) {
|
1480
|
+
:host(:hover)::before {
|
1481
|
+
opacity: 0.02;
|
1482
|
+
}
|
1483
|
+
}
|
1484
|
+
|
1485
|
+
/* Active */
|
1486
|
+
|
1487
|
+
:host::after {
|
1488
|
+
transition: opacity 1.4s, transform 0.1s;
|
1489
|
+
filter: blur(8px);
|
1490
|
+
}
|
1491
|
+
|
1492
|
+
:host([active])::before {
|
1493
|
+
opacity: 0.05;
|
1494
|
+
transition-duration: 0s;
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
:host([active])::after {
|
1498
|
+
opacity: 0.1;
|
1499
|
+
transition-duration: 0s, 0s;
|
1500
|
+
transform: scale(0);
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
/* Keyboard focus */
|
1504
|
+
|
1505
|
+
:host([focus-ring]) {
|
1506
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
1507
|
+
}
|
1508
|
+
|
1509
|
+
:host([theme~='primary'][focus-ring]) {
|
1510
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
1511
|
+
}
|
1512
|
+
|
1513
|
+
/* Types (primary, tertiary, tertiary-inline */
|
1514
|
+
|
1515
|
+
:host([theme~='tertiary']),
|
1516
|
+
:host([theme~='tertiary-inline']) {
|
1517
|
+
background-color: transparent !important;
|
1518
|
+
min-width: 0;
|
1519
|
+
}
|
1520
|
+
|
1521
|
+
:host([theme~='tertiary']) {
|
1522
|
+
padding: 0 calc(var(--lumo-button-size) / 6);
|
1523
|
+
}
|
1524
|
+
|
1525
|
+
:host([theme~='tertiary-inline'])::before {
|
1526
|
+
display: none;
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
:host([theme~='tertiary-inline']) {
|
1530
|
+
margin: 0;
|
1531
|
+
height: auto;
|
1532
|
+
padding: 0;
|
1533
|
+
line-height: inherit;
|
1534
|
+
font-size: inherit;
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
1538
|
+
padding: 0;
|
1539
|
+
overflow: visible;
|
1540
|
+
line-height: inherit;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
:host([theme~='primary']) {
|
1544
|
+
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
1545
|
+
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
1546
|
+
font-weight: 600;
|
1547
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
:host([theme~='primary'])::before {
|
1551
|
+
background-color: black;
|
1552
|
+
}
|
1553
|
+
|
1554
|
+
@media (any-hover: hover) {
|
1555
|
+
:host([theme~='primary']:hover)::before {
|
1556
|
+
opacity: 0.05;
|
1557
|
+
}
|
1558
|
+
}
|
1559
|
+
|
1560
|
+
:host([theme~='primary'][active])::before {
|
1561
|
+
opacity: 0.1;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
:host([theme~='primary'][active])::after {
|
1565
|
+
opacity: 0.2;
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
/* Colors (success, error, contrast) */
|
1569
|
+
|
1570
|
+
:host([theme~='success']) {
|
1571
|
+
color: var(--lumo-success-text-color);
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
:host([theme~='success'][theme~='primary']) {
|
1575
|
+
background-color: var(--lumo-success-color);
|
1576
|
+
color: var(--lumo-success-contrast-color);
|
1577
|
+
}
|
1578
|
+
|
1579
|
+
:host([theme~='error']) {
|
1580
|
+
color: var(--lumo-error-text-color);
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
:host([theme~='error'][theme~='primary']) {
|
1584
|
+
background-color: var(--lumo-error-color);
|
1585
|
+
color: var(--lumo-error-contrast-color);
|
1586
|
+
}
|
1587
|
+
|
1588
|
+
:host([theme~='contrast']) {
|
1589
|
+
color: var(--lumo-contrast);
|
1590
|
+
}
|
1591
|
+
|
1592
|
+
:host([theme~='contrast'][theme~='primary']) {
|
1593
|
+
background-color: var(--lumo-contrast);
|
1594
|
+
color: var(--lumo-base-color);
|
1595
|
+
}
|
1596
|
+
|
1597
|
+
/* Disabled state. Keep selectors after other color variants. */
|
1598
|
+
|
1599
|
+
:host([disabled]) {
|
1600
|
+
pointer-events: none;
|
1601
|
+
color: var(--lumo-disabled-text-color);
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
:host([theme~='primary'][disabled]) {
|
1605
|
+
background-color: var(--lumo-contrast-30pct);
|
1606
|
+
color: var(--lumo-base-color);
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
:host([theme~='primary'][disabled]) [part] {
|
1610
|
+
opacity: 0.7;
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
/* Icons */
|
1614
|
+
|
1615
|
+
[part] ::slotted(vaadin-icon) {
|
1616
|
+
display: inline-block;
|
1617
|
+
width: var(--lumo-icon-size-m);
|
1618
|
+
height: var(--lumo-icon-size-m);
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
1622
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
1623
|
+
padding: 0.25em;
|
1624
|
+
box-sizing: border-box !important;
|
1625
|
+
}
|
1626
|
+
|
1627
|
+
[part='prefix'] {
|
1628
|
+
margin-left: -0.25em;
|
1629
|
+
margin-right: 0.25em;
|
1630
|
+
}
|
1631
|
+
|
1632
|
+
[part='suffix'] {
|
1633
|
+
margin-left: 0.25em;
|
1634
|
+
margin-right: -0.25em;
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
/* Icon-only */
|
1638
|
+
|
1639
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
1640
|
+
min-width: var(--lumo-button-size);
|
1641
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
1642
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
1643
|
+
}
|
1644
|
+
|
1645
|
+
:host([theme~='icon']) [part='prefix'],
|
1646
|
+
:host([theme~='icon']) [part='suffix'] {
|
1647
|
+
margin-left: 0;
|
1648
|
+
margin-right: 0;
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
/* RTL specific styles */
|
1652
|
+
|
1653
|
+
:host([dir='rtl']) [part='prefix'] {
|
1654
|
+
margin-left: 0.25em;
|
1655
|
+
margin-right: -0.25em;
|
1656
|
+
}
|
1657
|
+
|
1658
|
+
:host([dir='rtl']) [part='suffix'] {
|
1659
|
+
margin-left: -0.25em;
|
1660
|
+
margin-right: 0.25em;
|
1661
|
+
}
|
1662
|
+
|
1663
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
1664
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
1665
|
+
margin-left: 0;
|
1666
|
+
margin-right: 0;
|
1667
|
+
}
|
1668
|
+
`;S("vaadin-button",_u,{moduleId:"lumo-button"});/**
|
1669
|
+
* @license
|
1670
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
1671
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
1672
|
+
*/const Xe=P(n=>typeof n.prototype.addController=="function"?n:class extends n{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),this.$!==void 0&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}),mu=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ht=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function gu(){function n(){return!0}return Bo(n)}function yu(){try{return bu()?!0:vu()?Ht?!wu():!gu():!1}catch(n){return!1}}function bu(){return localStorage.getItem("vaadin.developmentmode.force")}function vu(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function wu(){return!!(Ht&&Object.keys(Ht).map(e=>Ht[e]).filter(e=>e.productionMode).length>0)}function Bo(n,e){if(typeof n!="function")return;const t=mu.exec(n.toString());if(t)try{n=new Function(t[1])}catch(s){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",s)}return n(e)}window.Vaadin=window.Vaadin||{};const Yn=function(n,e){if(window.Vaadin.developmentMode)return Bo(n,e)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=yu());function Au(){/*! vaadin-dev-mode:start
|
1673
|
+
(function () {
|
1674
|
+
'use strict';
|
1675
|
+
|
1676
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
1677
|
+
return typeof obj;
|
1678
|
+
} : function (obj) {
|
1679
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1680
|
+
};
|
1681
|
+
|
1682
|
+
var classCallCheck = function (instance, Constructor) {
|
1683
|
+
if (!(instance instanceof Constructor)) {
|
1684
|
+
throw new TypeError("Cannot call a class as a function");
|
1685
|
+
}
|
1686
|
+
};
|
1687
|
+
|
1688
|
+
var createClass = function () {
|
1689
|
+
function defineProperties(target, props) {
|
1690
|
+
for (var i = 0; i < props.length; i++) {
|
1691
|
+
var descriptor = props[i];
|
1692
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
1693
|
+
descriptor.configurable = true;
|
1694
|
+
if ("value" in descriptor) descriptor.writable = true;
|
1695
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
1696
|
+
}
|
1697
|
+
}
|
1698
|
+
|
1699
|
+
return function (Constructor, protoProps, staticProps) {
|
1700
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
1701
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
1702
|
+
return Constructor;
|
1703
|
+
};
|
1704
|
+
}();
|
1705
|
+
|
1706
|
+
var getPolymerVersion = function getPolymerVersion() {
|
1707
|
+
return window.Polymer && window.Polymer.version;
|
1708
|
+
};
|
1709
|
+
|
1710
|
+
var StatisticsGatherer = function () {
|
1711
|
+
function StatisticsGatherer(logger) {
|
1712
|
+
classCallCheck(this, StatisticsGatherer);
|
1713
|
+
|
1714
|
+
this.now = new Date().getTime();
|
1715
|
+
this.logger = logger;
|
1716
|
+
}
|
1717
|
+
|
1718
|
+
createClass(StatisticsGatherer, [{
|
1719
|
+
key: 'frameworkVersionDetectors',
|
1720
|
+
value: function frameworkVersionDetectors() {
|
1721
|
+
return {
|
1722
|
+
'Flow': function Flow() {
|
1723
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
1724
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
1725
|
+
return window.Vaadin.Flow.clients[key];
|
1726
|
+
}).filter(function (client) {
|
1727
|
+
return client.getVersionInfo;
|
1728
|
+
}).map(function (client) {
|
1729
|
+
return client.getVersionInfo().flow;
|
1730
|
+
});
|
1731
|
+
if (flowVersions.length > 0) {
|
1732
|
+
return flowVersions[0];
|
1733
|
+
}
|
1734
|
+
}
|
1735
|
+
},
|
1736
|
+
'Vaadin Framework': function VaadinFramework() {
|
1737
|
+
if (window.vaadin && window.vaadin.clients) {
|
1738
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
1739
|
+
return client.getVersionInfo;
|
1740
|
+
}).map(function (client) {
|
1741
|
+
return client.getVersionInfo().vaadinVersion;
|
1742
|
+
});
|
1743
|
+
if (frameworkVersions.length > 0) {
|
1744
|
+
return frameworkVersions[0];
|
1745
|
+
}
|
1746
|
+
}
|
1747
|
+
},
|
1748
|
+
'AngularJs': function AngularJs() {
|
1749
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
1750
|
+
return window.angular.version.full;
|
1751
|
+
}
|
1752
|
+
},
|
1753
|
+
'Angular': function Angular() {
|
1754
|
+
if (window.ng) {
|
1755
|
+
var tags = document.querySelectorAll("[ng-version]");
|
1756
|
+
if (tags.length > 0) {
|
1757
|
+
return tags[0].getAttribute("ng-version");
|
1758
|
+
}
|
1759
|
+
return "Unknown";
|
1760
|
+
}
|
1761
|
+
},
|
1762
|
+
'Backbone.js': function BackboneJs() {
|
1763
|
+
if (window.Backbone) {
|
1764
|
+
return window.Backbone.VERSION;
|
1765
|
+
}
|
1766
|
+
},
|
1767
|
+
'React': function React() {
|
1768
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
1769
|
+
if (!!document.querySelector(reactSelector)) {
|
1770
|
+
// React does not publish the version by default
|
1771
|
+
return "unknown";
|
1772
|
+
}
|
1773
|
+
},
|
1774
|
+
'Ember': function Ember() {
|
1775
|
+
if (window.Em && window.Em.VERSION) {
|
1776
|
+
return window.Em.VERSION;
|
1777
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
1778
|
+
return window.Ember.VERSION;
|
1779
|
+
}
|
1780
|
+
},
|
1781
|
+
'jQuery': function (_jQuery) {
|
1782
|
+
function jQuery() {
|
1783
|
+
return _jQuery.apply(this, arguments);
|
1784
|
+
}
|
1785
|
+
|
1786
|
+
jQuery.toString = function () {
|
1787
|
+
return _jQuery.toString();
|
1788
|
+
};
|
1789
|
+
|
1790
|
+
return jQuery;
|
1791
|
+
}(function () {
|
1792
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
1793
|
+
return jQuery.prototype.jquery;
|
1794
|
+
}
|
1795
|
+
}),
|
1796
|
+
'Polymer': function Polymer() {
|
1797
|
+
var version = getPolymerVersion();
|
1798
|
+
if (version) {
|
1799
|
+
return version;
|
1800
|
+
}
|
1801
|
+
},
|
1802
|
+
'LitElement': function LitElement() {
|
1803
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
1804
|
+
if (version) {
|
1805
|
+
return version;
|
1806
|
+
}
|
1807
|
+
},
|
1808
|
+
'LitHtml': function LitHtml() {
|
1809
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
1810
|
+
if (version) {
|
1811
|
+
return version;
|
1812
|
+
}
|
1813
|
+
},
|
1814
|
+
'Vue.js': function VueJs() {
|
1815
|
+
if (window.Vue) {
|
1816
|
+
return window.Vue.version;
|
1817
|
+
}
|
1818
|
+
}
|
1819
|
+
};
|
1820
|
+
}
|
1821
|
+
}, {
|
1822
|
+
key: 'getUsedVaadinElements',
|
1823
|
+
value: function getUsedVaadinElements(elements) {
|
1824
|
+
var version = getPolymerVersion();
|
1825
|
+
var elementClasses = void 0;
|
1826
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
1827
|
+
// Check all locations calling the method getEntries() in
|
1828
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
1829
|
+
// Currently it is only used by BootstrapHandler.
|
1830
|
+
if (version && version.indexOf('2') === 0) {
|
1831
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
1832
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
1833
|
+
return window.Vaadin[c];
|
1834
|
+
}).filter(function (c) {
|
1835
|
+
return c.is;
|
1836
|
+
});
|
1837
|
+
} else {
|
1838
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
1839
|
+
elementClasses = window.Vaadin.registrations || [];
|
1840
|
+
}
|
1841
|
+
elementClasses.forEach(function (klass) {
|
1842
|
+
var version = klass.version ? klass.version : "0.0.0";
|
1843
|
+
elements[klass.is] = { version: version };
|
1844
|
+
});
|
1845
|
+
}
|
1846
|
+
}, {
|
1847
|
+
key: 'getUsedVaadinThemes',
|
1848
|
+
value: function getUsedVaadinThemes(themes) {
|
1849
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
1850
|
+
var theme;
|
1851
|
+
var version = getPolymerVersion();
|
1852
|
+
if (version && version.indexOf('2') === 0) {
|
1853
|
+
// Polymer 2: themes are stored in window.Vaadin
|
1854
|
+
theme = window.Vaadin[themeName];
|
1855
|
+
} else {
|
1856
|
+
// Polymer 3: themes are stored in custom element registry
|
1857
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
1858
|
+
}
|
1859
|
+
if (theme && theme.version) {
|
1860
|
+
themes[themeName] = { version: theme.version };
|
1861
|
+
}
|
1862
|
+
});
|
1863
|
+
}
|
1864
|
+
}, {
|
1865
|
+
key: 'getFrameworks',
|
1866
|
+
value: function getFrameworks(frameworks) {
|
1867
|
+
var detectors = this.frameworkVersionDetectors();
|
1868
|
+
Object.keys(detectors).forEach(function (framework) {
|
1869
|
+
var detector = detectors[framework];
|
1870
|
+
try {
|
1871
|
+
var version = detector();
|
1872
|
+
if (version) {
|
1873
|
+
frameworks[framework] = { version: version };
|
1874
|
+
}
|
1875
|
+
} catch (e) {}
|
1876
|
+
});
|
1877
|
+
}
|
1878
|
+
}, {
|
1879
|
+
key: 'gather',
|
1880
|
+
value: function gather(storage) {
|
1881
|
+
var storedStats = storage.read();
|
1882
|
+
var gatheredStats = {};
|
1883
|
+
var types = ["elements", "frameworks", "themes"];
|
1884
|
+
|
1885
|
+
types.forEach(function (type) {
|
1886
|
+
gatheredStats[type] = {};
|
1887
|
+
if (!storedStats[type]) {
|
1888
|
+
storedStats[type] = {};
|
1889
|
+
}
|
1890
|
+
});
|
1891
|
+
|
1892
|
+
var previousStats = JSON.stringify(storedStats);
|
1893
|
+
|
1894
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
1895
|
+
this.getFrameworks(gatheredStats.frameworks);
|
1896
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
1897
|
+
|
1898
|
+
var now = this.now;
|
1899
|
+
types.forEach(function (type) {
|
1900
|
+
var keys = Object.keys(gatheredStats[type]);
|
1901
|
+
keys.forEach(function (key) {
|
1902
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
1903
|
+
storedStats[type][key] = { firstUsed: now };
|
1904
|
+
}
|
1905
|
+
// Discards any previously logged version number
|
1906
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
1907
|
+
storedStats[type][key].lastUsed = now;
|
1908
|
+
});
|
1909
|
+
});
|
1910
|
+
|
1911
|
+
var newStats = JSON.stringify(storedStats);
|
1912
|
+
storage.write(newStats);
|
1913
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
1914
|
+
this.logger.debug("New stats: " + newStats);
|
1915
|
+
}
|
1916
|
+
}
|
1917
|
+
}]);
|
1918
|
+
return StatisticsGatherer;
|
1919
|
+
}();
|
1920
|
+
|
1921
|
+
var StatisticsStorage = function () {
|
1922
|
+
function StatisticsStorage(key) {
|
1923
|
+
classCallCheck(this, StatisticsStorage);
|
1924
|
+
|
1925
|
+
this.key = key;
|
1926
|
+
}
|
1927
|
+
|
1928
|
+
createClass(StatisticsStorage, [{
|
1929
|
+
key: 'read',
|
1930
|
+
value: function read() {
|
1931
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
1932
|
+
try {
|
1933
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
1934
|
+
} catch (e) {
|
1935
|
+
return {};
|
1936
|
+
}
|
1937
|
+
}
|
1938
|
+
}, {
|
1939
|
+
key: 'write',
|
1940
|
+
value: function write(data) {
|
1941
|
+
localStorage.setItem(this.key, data);
|
1942
|
+
}
|
1943
|
+
}, {
|
1944
|
+
key: 'clear',
|
1945
|
+
value: function clear() {
|
1946
|
+
localStorage.removeItem(this.key);
|
1947
|
+
}
|
1948
|
+
}, {
|
1949
|
+
key: 'isEmpty',
|
1950
|
+
value: function isEmpty() {
|
1951
|
+
var storedStats = this.read();
|
1952
|
+
var empty = true;
|
1953
|
+
Object.keys(storedStats).forEach(function (key) {
|
1954
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
1955
|
+
empty = false;
|
1956
|
+
}
|
1957
|
+
});
|
1958
|
+
|
1959
|
+
return empty;
|
1960
|
+
}
|
1961
|
+
}]);
|
1962
|
+
return StatisticsStorage;
|
1963
|
+
}();
|
1964
|
+
|
1965
|
+
var StatisticsSender = function () {
|
1966
|
+
function StatisticsSender(url, logger) {
|
1967
|
+
classCallCheck(this, StatisticsSender);
|
1968
|
+
|
1969
|
+
this.url = url;
|
1970
|
+
this.logger = logger;
|
1971
|
+
}
|
1972
|
+
|
1973
|
+
createClass(StatisticsSender, [{
|
1974
|
+
key: 'send',
|
1975
|
+
value: function send(data, errorHandler) {
|
1976
|
+
var logger = this.logger;
|
1977
|
+
|
1978
|
+
if (navigator.onLine === false) {
|
1979
|
+
logger.debug("Offline, can't send");
|
1980
|
+
errorHandler();
|
1981
|
+
return;
|
1982
|
+
}
|
1983
|
+
logger.debug("Sending data to " + this.url);
|
1984
|
+
|
1985
|
+
var req = new XMLHttpRequest();
|
1986
|
+
req.withCredentials = true;
|
1987
|
+
req.addEventListener("load", function () {
|
1988
|
+
// Stats sent, nothing more to do
|
1989
|
+
logger.debug("Response: " + req.responseText);
|
1990
|
+
});
|
1991
|
+
req.addEventListener("error", function () {
|
1992
|
+
logger.debug("Send failed");
|
1993
|
+
errorHandler();
|
1994
|
+
});
|
1995
|
+
req.addEventListener("abort", function () {
|
1996
|
+
logger.debug("Send aborted");
|
1997
|
+
errorHandler();
|
1998
|
+
});
|
1999
|
+
req.open("POST", this.url);
|
2000
|
+
req.setRequestHeader("Content-Type", "application/json");
|
2001
|
+
req.send(data);
|
2002
|
+
}
|
2003
|
+
}]);
|
2004
|
+
return StatisticsSender;
|
2005
|
+
}();
|
2006
|
+
|
2007
|
+
var StatisticsLogger = function () {
|
2008
|
+
function StatisticsLogger(id) {
|
2009
|
+
classCallCheck(this, StatisticsLogger);
|
2010
|
+
|
2011
|
+
this.id = id;
|
2012
|
+
}
|
2013
|
+
|
2014
|
+
createClass(StatisticsLogger, [{
|
2015
|
+
key: '_isDebug',
|
2016
|
+
value: function _isDebug() {
|
2017
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
2018
|
+
}
|
2019
|
+
}, {
|
2020
|
+
key: 'debug',
|
2021
|
+
value: function debug(msg) {
|
2022
|
+
if (this._isDebug()) {
|
2023
|
+
console.info(this.id + ": " + msg);
|
2024
|
+
}
|
2025
|
+
}
|
2026
|
+
}]);
|
2027
|
+
return StatisticsLogger;
|
2028
|
+
}();
|
2029
|
+
|
2030
|
+
var UsageStatistics = function () {
|
2031
|
+
function UsageStatistics() {
|
2032
|
+
classCallCheck(this, UsageStatistics);
|
2033
|
+
|
2034
|
+
this.now = new Date();
|
2035
|
+
this.timeNow = this.now.getTime();
|
2036
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
2037
|
+
this.initialDelay = 24 * 60 * 60;
|
2038
|
+
|
2039
|
+
this.logger = new StatisticsLogger("statistics");
|
2040
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
2041
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
2042
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
2043
|
+
}
|
2044
|
+
|
2045
|
+
createClass(UsageStatistics, [{
|
2046
|
+
key: 'maybeGatherAndSend',
|
2047
|
+
value: function maybeGatherAndSend() {
|
2048
|
+
var _this = this;
|
2049
|
+
|
2050
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
2051
|
+
return;
|
2052
|
+
}
|
2053
|
+
this.gatherer.gather(this.storage);
|
2054
|
+
setTimeout(function () {
|
2055
|
+
_this.maybeSend();
|
2056
|
+
}, this.gatherDelay * 1000);
|
2057
|
+
}
|
2058
|
+
}, {
|
2059
|
+
key: 'lottery',
|
2060
|
+
value: function lottery() {
|
2061
|
+
return true;
|
2062
|
+
}
|
2063
|
+
}, {
|
2064
|
+
key: 'currentMonth',
|
2065
|
+
value: function currentMonth() {
|
2066
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
2067
|
+
}
|
2068
|
+
}, {
|
2069
|
+
key: 'maybeSend',
|
2070
|
+
value: function maybeSend() {
|
2071
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
2072
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
2073
|
+
|
2074
|
+
if (!firstUse) {
|
2075
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
2076
|
+
firstUse = this.timeNow;
|
2077
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
2081
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
2082
|
+
return;
|
2083
|
+
}
|
2084
|
+
if (this.currentMonth() <= monthProcessed) {
|
2085
|
+
this.logger.debug("This month has already been processed");
|
2086
|
+
return;
|
2087
|
+
}
|
2088
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
2089
|
+
// Use random sampling
|
2090
|
+
if (this.lottery()) {
|
2091
|
+
this.logger.debug("Congratulations, we have a winner!");
|
2092
|
+
} else {
|
2093
|
+
this.logger.debug("Sorry, no stats from you this time");
|
2094
|
+
return;
|
2095
|
+
}
|
2096
|
+
|
2097
|
+
this.send();
|
2098
|
+
}
|
2099
|
+
}, {
|
2100
|
+
key: 'send',
|
2101
|
+
value: function send() {
|
2102
|
+
// Ensure we have the latest data
|
2103
|
+
this.gatherer.gather(this.storage);
|
2104
|
+
|
2105
|
+
// Read, send and clean up
|
2106
|
+
var data = this.storage.read();
|
2107
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
2108
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
2109
|
+
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';
|
2110
|
+
var self = this;
|
2111
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
2112
|
+
// Revert the 'month processed' flag
|
2113
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
2114
|
+
});
|
2115
|
+
}
|
2116
|
+
}], [{
|
2117
|
+
key: 'version',
|
2118
|
+
get: function get$1() {
|
2119
|
+
return '2.1.2';
|
2120
|
+
}
|
2121
|
+
}, {
|
2122
|
+
key: 'firstUseKey',
|
2123
|
+
get: function get$1() {
|
2124
|
+
return 'vaadin.statistics.firstuse';
|
2125
|
+
}
|
2126
|
+
}, {
|
2127
|
+
key: 'monthProcessedKey',
|
2128
|
+
get: function get$1() {
|
2129
|
+
return 'vaadin.statistics.monthProcessed';
|
2130
|
+
}
|
2131
|
+
}, {
|
2132
|
+
key: 'optOutKey',
|
2133
|
+
get: function get$1() {
|
2134
|
+
return 'vaadin.statistics.optout';
|
2135
|
+
}
|
2136
|
+
}]);
|
2137
|
+
return UsageStatistics;
|
2138
|
+
}();
|
2139
|
+
|
2140
|
+
try {
|
2141
|
+
window.Vaadin = window.Vaadin || {};
|
2142
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
2143
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
2144
|
+
} catch (e) {
|
2145
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
2146
|
+
}
|
2147
|
+
|
2148
|
+
}());
|
2149
|
+
|
2150
|
+
vaadin-dev-mode:end **/}const xu=function(){if(typeof Yn=="function")return Yn(Au)};/**
|
2151
|
+
* @license
|
2152
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
2153
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
2154
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
2155
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
2156
|
+
* Code distributed by Google as part of the polymer project is also
|
2157
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
2158
|
+
*/let Wn=0,zo=0;const ze=[];let pi=!1;function Cu(){pi=!1;const n=ze.length;for(let e=0;e<n;e++){const t=ze[e];if(t)try{t()}catch(s){setTimeout(()=>{throw s})}}ze.splice(0,n),zo+=n}const Zt={after(n){return{run(e){return window.setTimeout(e,n)},cancel(e){window.clearTimeout(e)}}},run(n,e){return window.setTimeout(n,e)},cancel(n){window.clearTimeout(n)}},Eu={run(n){return window.requestIdleCallback?window.requestIdleCallback(n):window.setTimeout(n,16)},cancel(n){window.cancelIdleCallback?window.cancelIdleCallback(n):window.clearTimeout(n)}},$u={run(n){pi||(pi=!0,queueMicrotask(()=>Cu())),ze.push(n);const e=Wn;return Wn+=1,e},cancel(n){const e=n-zo;if(e>=0){if(!ze[e])throw new Error(`invalid async handle: ${n}`);ze[e]=null}}};/**
|
2159
|
+
@license
|
2160
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
2161
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
2162
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
2163
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
2164
|
+
Code distributed by Google as part of the polymer project is also
|
2165
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
2166
|
+
*/const fi=new Set;let vt=class _i{static debounce(e,t,s){return e instanceof _i?e._cancelAsync():e=new _i,e.setConfig(t,s),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,fi.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),fi.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return this._timer!=null}};function Su(n){fi.add(n)}/**
|
2167
|
+
* @license
|
2168
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2169
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2170
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){xu()};let Ts;const qn=new Set,Lo=n=>class extends ds(n){static get version(){return"24.2.9"}static finalize(){super.finalize();const{is:t}=this;t&&!qn.has(t)&&(window.Vaadin.registrations.push(this),qn.add(t),window.Vaadin.developmentModeCallback&&(Ts=vt.debounce(Ts,Eu,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),Su(Ts)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};/**
|
2171
|
+
* @license
|
2172
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2173
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2174
|
+
*/function Pu(n){const e=[];for(;n;){if(n.nodeType===Node.DOCUMENT_NODE){e.push(n);break}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(n),n=n.host;continue}if(n.assignedSlot){n=n.assignedSlot;continue}n=n.parentNode}return e}function Vi(n){return n?new Set(n.split(" ")):new Set}function us(n){return n?[...n].join(" "):""}function Ho(n,e,t){const s=Vi(n.getAttribute(e));s.add(t),n.setAttribute(e,us(s))}function Tu(n,e,t){const s=Vi(n.getAttribute(e));if(s.delete(t),s.size===0){n.removeAttribute(e);return}n.setAttribute(e,us(s))}function ku(n){return n.nodeType===Node.TEXT_NODE&&n.textContent.trim()===""}/**
|
2175
|
+
* @license
|
2176
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
2177
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2178
|
+
*/class Du{constructor(e,t){this.slot=e,this.callback=t,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 e=this.slot.assignedNodes({flatten:!0});let t=[];const s=[],i=[];e.length&&(t=e.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,o)=>{const a=e.indexOf(r);a===-1?s.push(r):a!==o&&i.push(r)}),(t.length||s.length||i.length)&&this.callback({addedNodes:t,movedNodes:i,removedNodes:s}),this._storedNodes=e}}/**
|
2179
|
+
* @license
|
2180
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2181
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2182
|
+
*/let Ou=0;function Ro(){return Ou++}/**
|
2183
|
+
* @license
|
2184
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2185
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2186
|
+
*/class me extends EventTarget{static generateId(e,t){return`${t||"default"}-${e.localName}-${Ro()}`}constructor(e,t,s,i={}){super();const{initializer:r,multiple:o,observe:a,useUniqueId:l}=i;this.host=e,this.slotName=t,this.tagName=s,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof o=="boolean"?o:!1,this.slotInitializer=r,o&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(e,t))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let e=this.getSlotChild();e?(this.node=e,this.initAddedNode(e)):(e=this.attachDefaultNode(),this.initNode(e))}initMultiple(){const e=this.getSlotChildren();if(e.length===0){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=e,e.forEach(t=>{this.initAddedNode(t)})}attachDefaultNode(){const{host:e,slotName:t,tagName:s}=this;let i=this.defaultNode;return!i&&s&&(i=document.createElement(s),i instanceof Element&&(t!==""&&i.setAttribute("slot",t),this.node=i,this.defaultNode=i)),i&&e.appendChild(i),i}getSlotChildren(){const{slotName:e}=this;return Array.from(this.host.childNodes).filter(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot===e||t.nodeType===Node.TEXT_NODE&&t.textContent.trim()&&e==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(e){const{slotInitializer:t}=this;t&&t(e,this.host)}initCustomNode(e){}teardownNode(e){}initAddedNode(e){e!==this.defaultNode&&(this.initCustomNode(e),this.initNode(e))}observeSlot(){const{slotName:e}=this,t=e===""?"slot:not([name])":`slot[name=${e}]`,s=this.host.shadowRoot.querySelector(t);this.__slotObserver=new Du(s,({addedNodes:i,removedNodes:r})=>{const o=this.multiple?this.nodes:[this.node],a=i.filter(l=>!ku(l)&&!o.includes(l));r.length&&(this.nodes=o.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l)})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l)})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)))})}}/**
|
2187
|
+
* @license
|
2188
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
2189
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2190
|
+
*/class Fo extends me{constructor(e){super(e,"tooltip"),this.setTarget(e)}initCustomNode(e){e.target=this.target,this.ariaTarget!==void 0&&(e.ariaTarget=this.ariaTarget),this.context!==void 0&&(e.context=this.context),this.manual!==void 0&&(e.manual=this.manual),this.opened!==void 0&&(e.opened=this.opened),this.position!==void 0&&(e._position=this.position),this.shouldShow!==void 0&&(e.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(e){this.ariaTarget=e;const t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;const t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;const t=this.node;t&&(t.manual=e)}setOpened(e){this.opened=e;const t=this.node;t&&(t.opened=e)}setPosition(e){this.position=e;const t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;const t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;const t=this.node;t&&(t.target=e)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}/**
|
2191
|
+
* @license
|
2192
|
+
* Copyright 2019 Google LLC
|
2193
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
2194
|
+
*/const Rt=window,ji=Rt.ShadowRoot&&(Rt.ShadyCSS===void 0||Rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yi=Symbol(),Kn=new WeakMap;let Uo=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==Yi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ji&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Kn.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Kn.set(t,e))}return e}toString(){return this.cssText}};const Mu=n=>new Uo(typeof n=="string"?n:n+"",void 0,Yi),kt=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new Uo(t,n,Yi)},Nu=(n,e)=>{ji?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const s=document.createElement("style"),i=Rt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)})},Gn=ji?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Mu(t)})(n):n;/**
|
2195
|
+
* @license
|
2196
|
+
* Copyright 2017 Google LLC
|
2197
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
2198
|
+
*/var ks;const Qt=window,Jn=Qt.trustedTypes,Iu=Jn?Jn.emptyScript:"",Xn=Qt.reactiveElementPolyfillSupport,mi={toAttribute(n,e){switch(e){case Boolean:n=n?Iu:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(s){t=null}}return t}},Vo=(n,e)=>e!==n&&(e==e||n==n),Ds={attribute:!0,type:String,converter:mi,reflect:!1,hasChanged:Vo},gi="finalized";let Me=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,s)=>{const i=this._$Ep(s,t);i!==void 0&&(this._$Ev.set(i,s),e.push(i))}),e}static createProperty(e,t=Ds){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const s=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Ds}static finalize(){if(this.hasOwnProperty(gi))return!1;this[gi]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of s)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Gn(i))}else e!==void 0&&t.push(Gn(e));return t}static _$Ep(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)===null||s===void 0||s.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Nu(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostConnected)===null||s===void 0?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostDisconnected)===null||s===void 0?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EO(e,t,s=Ds){var i;const r=this.constructor._$Ep(e,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:mi).toAttribute(t,s.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var s;const i=this.constructor,r=i._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:mi;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,s){let i=!0;e!==void 0&&(((s=s||this.constructor.getPropertyOptions(e)).hasChanged||Vo)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,r)=>this[r]=i),this._$Ei=void 0);let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(s)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,s)=>this._$EO(s,this[s],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Me[gi]=!0,Me.elementProperties=new Map,Me.elementStyles=[],Me.shadowRootOptions={mode:"open"},Xn==null||Xn({ReactiveElement:Me}),((ks=Qt.reactiveElementVersions)!==null&&ks!==void 0?ks:Qt.reactiveElementVersions=[]).push("1.6.3");/**
|
2199
|
+
* @license
|
2200
|
+
* Copyright 2017 Google LLC
|
2201
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
2202
|
+
*/var Os;const es=window,Ue=es.trustedTypes,Zn=Ue?Ue.createPolicy("lit-html",{createHTML:n=>n}):void 0,yi="$lit$",se=`lit$${(Math.random()+"").slice(9)}$`,jo="?"+se,Bu=`<${jo}>`,xe=document,wt=()=>xe.createComment(""),At=n=>n===null||typeof n!="object"&&typeof n!="function",Yo=Array.isArray,zu=n=>Yo(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Ms=`[
|
2203
|
+
\f\r]`,it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qn=/-->/g,er=/>/g,he=RegExp(`>|${Ms}(?:([^\\s"'>=/]+)(${Ms}*=${Ms}*(?:[^
|
2204
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),tr=/'/g,sr=/"/g,Wo=/^(?:script|style|textarea|title)$/i,Ve=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),ir=new WeakMap,ge=xe.createTreeWalker(xe,129,null,!1);function qo(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zn!==void 0?Zn.createHTML(e):e}const Lu=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":"",o=it;for(let a=0;a<t;a++){const l=n[a];let d,c,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,c=o.exec(l),c!==null);)p=o.lastIndex,o===it?c[1]==="!--"?o=Qn:c[1]!==void 0?o=er:c[2]!==void 0?(Wo.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=he):c[3]!==void 0&&(o=he):o===he?c[0]===">"?(o=i!=null?i:it,h=-1):c[1]===void 0?h=-2:(h=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?he:c[3]==='"'?sr:tr):o===sr||o===tr?o=he:o===Qn||o===er?o=it:(o=he,i=void 0);const f=o===he&&n[a+1].startsWith("/>")?" ":"";r+=o===it?l+Bu:h>=0?(s.push(d),l.slice(0,h)+yi+l.slice(h)+se+f):l+se+(h===-2?(s.push(void 0),a):f)}return[qo(n,r+(n[t]||"<?>")+(e===2?"</svg>":"")),s]};let bi=class Ko{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,c]=Lu(e,t);if(this.el=Ko.createElement(d,s),ge.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(i=ge.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes()){const h=[];for(const p of i.getAttributeNames())if(p.endsWith(yi)||p.startsWith(se)){const f=c[o++];if(h.push(p),f!==void 0){const _=i.getAttribute(f.toLowerCase()+yi).split(se),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:g[2],strings:_,ctor:g[1]==="."?Ru:g[1]==="?"?Uu:g[1]==="@"?Vu:cs})}else l.push({type:6,index:r})}for(const p of h)i.removeAttribute(p)}if(Wo.test(i.tagName)){const h=i.textContent.split(se),p=h.length-1;if(p>0){i.textContent=Ue?Ue.emptyScript:"";for(let f=0;f<p;f++)i.append(h[f],wt()),ge.nextNode(),l.push({type:2,index:++r});i.append(h[p],wt())}}}else if(i.nodeType===8)if(i.data===jo)l.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(se,h+1))!==-1;)l.push({type:7,index:r}),h+=se.length-1}r++}}static createElement(e,t){const s=xe.createElement("template");return s.innerHTML=e,s}};function je(n,e,t=n,s){var i,r,o,a;if(e===Ve)return e;let l=s!==void 0?(i=t._$Co)===null||i===void 0?void 0:i[s]:t._$Cl;const d=At(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==d&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),d===void 0?l=void 0:(l=new d(n),l._$AT(n,t,s)),s!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[s]=l:t._$Cl=l),l!==void 0&&(e=je(n,l._$AS(n,e.values),l,s)),e}let Hu=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:s},parts:i}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:xe).importNode(s,!0);ge.currentNode=r;let o=ge.nextNode(),a=0,l=0,d=i[0];for(;d!==void 0;){if(a===d.index){let c;d.type===2?c=new Wi(o,o.nextSibling,this,e):d.type===1?c=new d.ctor(o,d.name,d.strings,this,e):d.type===6&&(c=new ju(o,this,e)),this._$AV.push(c),d=i[++l]}a!==(d==null?void 0:d.index)&&(o=ge.nextNode(),a++)}return ge.currentNode=xe,r}v(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}},Wi=class Go{constructor(e,t,s,i){var r;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cp=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=je(this,e,t),At(e)?e===D||e==null||e===""?(this._$AH!==D&&this._$AR(),this._$AH=D):e!==this._$AH&&e!==Ve&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):zu(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==D&&At(this._$AH)?this._$AA.nextSibling.data=e:this.$(xe.createTextNode(e)),this._$AH=e}g(e){var t;const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=bi.createElement(qo(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(s);else{const o=new Hu(r,this),a=o.u(this.options);o.v(s),this.$(a),this._$AH=o}}_$AC(e){let t=ir.get(e.strings);return t===void 0&&ir.set(e.strings,t=new bi(e)),t}T(e){Yo(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new Go(this.k(wt()),this.k(wt()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}},cs=class{constructor(e,t,s,i,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=je(this,e,t,0),o=!At(e)||e!==this._$AH&&e!==Ve,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=je(this,a[s+l],t,l),d===Ve&&(d=this._$AH[l]),o||(o=!At(d)||d!==this._$AH[l]),d===D?e=D:e!==D&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!i&&this.j(e)}j(e){e===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},Ru=class extends cs{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===D?void 0:e}};const Fu=Ue?Ue.emptyScript:"";let Uu=class extends cs{constructor(){super(...arguments),this.type=4}j(e){e&&e!==D?this.element.setAttribute(this.name,Fu):this.element.removeAttribute(this.name)}},Vu=class extends cs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){var s;if((e=(s=je(this,e,t,0))!==null&&s!==void 0?s:D)===Ve)return;const i=this._$AH,r=e===D&&i!==D||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==D&&(i===D||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&s!==void 0?s:this.element,e):this._$AH.handleEvent(e)}},ju=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){je(this,e)}};const nr=es.litHtmlPolyfillSupport;nr==null||nr(bi,Wi),((Os=es.litHtmlVersions)!==null&&Os!==void 0?Os:es.litHtmlVersions=[]).push("2.8.0");const Yu=(n,e,t)=>{var s,i;const r=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e;let o=r._$litPart$;if(o===void 0){const a=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new Wi(e.insertBefore(wt(),a),a,void 0,t!=null?t:{})}return o._$AI(n),o};/**
|
2205
|
+
* @license
|
2206
|
+
* Copyright 2017 Google LLC
|
2207
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
2208
|
+
*/var Ns,Is;let Ft=class extends Me{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Yu(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ve}};Ft.finalized=!0,Ft._$litElement$=!0,(Ns=globalThis.litElementHydrateSupport)===null||Ns===void 0||Ns.call(globalThis,{LitElement:Ft});const rr=globalThis.litElementPolyfillSupport;rr==null||rr({LitElement:Ft});((Is=globalThis.litElementVersions)!==null&&Is!==void 0?Is:globalThis.litElementVersions=[]).push("3.3.3");/**
|
2209
|
+
* @license
|
2210
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2211
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2212
|
+
*/const Wu=kt`
|
2213
|
+
:host {
|
2214
|
+
display: inline-block;
|
2215
|
+
position: relative;
|
2216
|
+
outline: none;
|
2217
|
+
white-space: nowrap;
|
2218
|
+
-webkit-user-select: none;
|
2219
|
+
-moz-user-select: none;
|
2220
|
+
user-select: none;
|
2221
|
+
}
|
2222
|
+
|
2223
|
+
:host([hidden]) {
|
2224
|
+
display: none !important;
|
2225
|
+
}
|
2226
|
+
|
2227
|
+
/* Aligns the button with form fields when placed on the same line.
|
2228
|
+
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
2229
|
+
.vaadin-button-container::before {
|
2230
|
+
content: '\\2003';
|
2231
|
+
display: inline-block;
|
2232
|
+
width: 0;
|
2233
|
+
max-height: 100%;
|
2234
|
+
}
|
2235
|
+
|
2236
|
+
.vaadin-button-container {
|
2237
|
+
display: inline-flex;
|
2238
|
+
align-items: center;
|
2239
|
+
justify-content: center;
|
2240
|
+
text-align: center;
|
2241
|
+
width: 100%;
|
2242
|
+
height: 100%;
|
2243
|
+
min-height: inherit;
|
2244
|
+
text-shadow: inherit;
|
2245
|
+
}
|
2246
|
+
|
2247
|
+
[part='prefix'],
|
2248
|
+
[part='suffix'] {
|
2249
|
+
flex: none;
|
2250
|
+
}
|
2251
|
+
|
2252
|
+
[part='label'] {
|
2253
|
+
white-space: nowrap;
|
2254
|
+
overflow: hidden;
|
2255
|
+
text-overflow: ellipsis;
|
2256
|
+
}
|
2257
|
+
|
2258
|
+
@media (forced-colors: active) {
|
2259
|
+
:host {
|
2260
|
+
outline: 1px solid;
|
2261
|
+
outline-offset: -1px;
|
2262
|
+
}
|
2263
|
+
|
2264
|
+
:host([focused]) {
|
2265
|
+
outline-width: 2px;
|
2266
|
+
}
|
2267
|
+
|
2268
|
+
:host([disabled]) {
|
2269
|
+
outline-color: GrayText;
|
2270
|
+
}
|
2271
|
+
}
|
2272
|
+
`,qu=n=>n`
|
2273
|
+
<div class="vaadin-button-container">
|
2274
|
+
<span part="prefix" aria-hidden="true">
|
2275
|
+
<slot name="prefix"></slot>
|
2276
|
+
</span>
|
2277
|
+
<span part="label">
|
2278
|
+
<slot></slot>
|
2279
|
+
</span>
|
2280
|
+
<span part="suffix" aria-hidden="true">
|
2281
|
+
<slot name="suffix"></slot>
|
2282
|
+
</span>
|
2283
|
+
</div>
|
2284
|
+
<slot name="tooltip"></slot>
|
2285
|
+
`;/**
|
2286
|
+
@license
|
2287
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
2288
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
2289
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
2290
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
2291
|
+
Code distributed by Google as part of the polymer project is also
|
2292
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
2293
|
+
*/const Ku=n=>n,Jo=typeof document.head.style.touchAction=="string",vi="__polymerGestures",Bs="__polymerGesturesHandled",wi="__polymerGesturesTouchAction",or=25,ar=5,Gu=2,Ju=["mousedown","mousemove","mouseup","click"],Xu=[0,1,4,2],Zu=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(n){return!1}}();function qi(n){return Ju.indexOf(n)>-1}let Qu=!1;(function(){try{const n=Object.defineProperty({},"passive",{get(){Qu=!0}});window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(n){}})();function ec(n){qi(n)}const tc=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),sc={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function we(n){const e=n.type;if(!qi(e))return!1;if(e==="mousemove"){let s=n.buttons===void 0?1:n.buttons;return n instanceof window.MouseEvent&&!Zu&&(s=Xu[n.which]||0),!!(s&1)}return(n.button===void 0?0:n.button)===0}function ic(n){if(n.type==="click"){if(n.detail===0)return!0;const e=re(n);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const t=e.getBoundingClientRect(),s=n.pageX,i=n.pageY;return!(s>=t.left&&s<=t.right&&i>=t.top&&i<=t.bottom)}return!1}const Z={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function nc(n){let e="auto";const t=Zo(n);for(let s=0,i;s<t.length;s++)if(i=t[s],i[wi]){e=i[wi];break}return e}function Xo(n,e,t){n.movefn=e,n.upfn=t,document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}function Le(n){document.removeEventListener("mousemove",n.movefn),document.removeEventListener("mouseup",n.upfn),n.movefn=null,n.upfn=null}const Zo=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:n=>n.composedPath&&n.composedPath()||[],Ki={},ye=[];function rc(n,e){let t=document.elementFromPoint(n,e),s=t;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const i=s;if(s=s.shadowRoot.elementFromPoint(n,e),i===s)break;s&&(t=s)}return t}function re(n){const e=Zo(n);return e.length>0?e[0]:n.target}function oc(n){const e=n.type,s=n.currentTarget[vi];if(!s)return;const i=s[e];if(!i)return;if(!n[Bs]&&(n[Bs]={},e.startsWith("touch"))){const o=n.changedTouches[0];if(e==="touchstart"&&n.touches.length===1&&(Z.touch.id=o.identifier),Z.touch.id!==o.identifier)return;Jo||(e==="touchstart"||e==="touchmove")&&ac(n)}const r=n[Bs];if(!r.skip){for(let o=0,a;o<ye.length;o++)a=ye[o],i[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(n.type)>-1&&a.reset&&a.reset();for(let o=0,a;o<ye.length;o++)a=ye[o],i[a.name]&&!r[a.name]&&(r[a.name]=!0,a[e](n))}}function ac(n){const e=n.changedTouches[0],t=n.type;if(t==="touchstart")Z.touch.x=e.clientX,Z.touch.y=e.clientY,Z.touch.scrollDecided=!1;else if(t==="touchmove"){if(Z.touch.scrollDecided)return;Z.touch.scrollDecided=!0;const s=nc(n);let i=!1;const r=Math.abs(Z.touch.x-e.clientX),o=Math.abs(Z.touch.y-e.clientY);n.cancelable&&(s==="none"?i=!0:s==="pan-x"?i=o>r:s==="pan-y"&&(i=r>o)),i?n.preventDefault():ts("track")}}function K(n,e,t){return Ki[e]?(lc(n,e,t),!0):!1}function lc(n,e,t){const s=Ki[e],i=s.deps,r=s.name;let o=n[vi];o||(n[vi]=o={});for(let a=0,l,d;a<i.length;a++)l=i[a],!(tc&&qi(l)&&l!=="click")&&(d=o[l],d||(o[l]=d={_count:0}),d._count===0&&n.addEventListener(l,oc,ec(l)),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);n.addEventListener(e,t),s.touchAction&&Qo(n,s.touchAction)}function Gi(n){ye.push(n),n.emits.forEach(e=>{Ki[e]=n})}function dc(n){for(let e=0,t;e<ye.length;e++){t=ye[e];for(let s=0,i;s<t.emits.length;s++)if(i=t.emits[s],i===n)return t}return null}function Qo(n,e){Jo&&n instanceof HTMLElement&&$u.run(()=>{n.style.touchAction=e}),n[wi]=e}function Ji(n,e,t){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=t,Ku(n).dispatchEvent(s),s.defaultPrevented){const i=t.preventer||t.sourceEvent;i&&i.preventDefault&&i.preventDefault()}}function ts(n){const e=dc(n);e.info&&(e.info.prevent=!0)}Gi({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Le(this.info)},mousedown(n){if(!we(n))return;const e=re(n),t=this,s=r=>{we(r)||(nt("up",e,r),Le(t.info))},i=r=>{we(r)&&nt("up",e,r),Le(t.info)};Xo(this.info,s,i),nt("down",e,n)},touchstart(n){nt("down",re(n),n.changedTouches[0],n)},touchend(n){nt("up",re(n),n.changedTouches[0],n)}});function nt(n,e,t,s){e&&Ji(e,n,{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:s,prevent(i){return ts(i)}})}Gi({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(n){this.moves.length>Gu&&this.moves.shift(),this.moves.push(n)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Le(this.info)},mousedown(n){if(!we(n))return;const e=re(n),t=this,s=r=>{const o=r.clientX,a=r.clientY;lr(t.info,o,a)&&(t.info.state=t.info.started?r.type==="mouseup"?"end":"track":"start",t.info.state==="start"&&ts("tap"),t.info.addMove({x:o,y:a}),we(r)||(t.info.state="end",Le(t.info)),e&&zs(t.info,e,r),t.info.started=!0)},i=r=>{t.info.started&&s(r),Le(t.info)};Xo(this.info,s,i),this.info.x=n.clientX,this.info.y=n.clientY},touchstart(n){const e=n.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(n){const e=re(n),t=n.changedTouches[0],s=t.clientX,i=t.clientY;lr(this.info,s,i)&&(this.info.state==="start"&&ts("tap"),this.info.addMove({x:s,y:i}),zs(this.info,e,t),this.info.state="track",this.info.started=!0)},touchend(n){const e=re(n),t=n.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:t.clientX,y:t.clientY}),zs(this.info,e,t))}});function lr(n,e,t){if(n.prevent)return!1;if(n.started)return!0;const s=Math.abs(n.x-e),i=Math.abs(n.y-t);return s>=ar||i>=ar}function zs(n,e,t){if(!e)return;const s=n.moves[n.moves.length-2],i=n.moves[n.moves.length-1],r=i.x-n.x,o=i.y-n.y;let a,l=0;s&&(a=i.x-s.x,l=i.y-s.y),Ji(e,"track",{state:n.state,x:t.clientX,y:t.clientY,dx:r,dy:o,ddx:a,ddy:l,sourceEvent:t,hover(){return rc(t.clientX,t.clientY)}})}Gi({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(n){we(n)&&(this.info.x=n.clientX,this.info.y=n.clientY)},click(n){we(n)&&dr(this.info,n)},touchstart(n){const e=n.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(n){dr(this.info,n.changedTouches[0],n)}});function dr(n,e,t){const s=Math.abs(e.clientX-n.x),i=Math.abs(e.clientY-n.y),r=re(t||e);!r||sc[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(i)||s<=or&&i<=or||ic(e))&&(n.prevent||Ji(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}/**
|
2294
|
+
* @license
|
2295
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2296
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2297
|
+
*/const ea=P(n=>class extends n{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}});/**
|
2298
|
+
* @license
|
2299
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2300
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2301
|
+
*/const hs=P(n=>class extends n{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);break}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}});/**
|
2302
|
+
* @license
|
2303
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2304
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2305
|
+
*/const uc=n=>class extends ea(hs(n)){get _activeKeys(){return[" "]}ready(){super.ready(),K(this,"down",t=>{this._shouldSetActive(t)&&this._setActive(!0)}),K(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",s=>{this._activeKeys.includes(s.key)&&this._setActive(!1)},{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}};/**
|
2306
|
+
* @license
|
2307
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2308
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2309
|
+
*/let Xi=!1;window.addEventListener("keydown",()=>{Xi=!0},{capture:!0});window.addEventListener("mousedown",()=>{Xi=!1},{capture:!0});function Ai(){let n=document.activeElement||document.body;for(;n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function cc(){return Xi}function hc(n){const e=n.style;if(e.visibility==="hidden"||e.display==="none")return!0;const t=window.getComputedStyle(n);return t.visibility==="hidden"||t.display==="none"}function pc(n,e){const t=Math.max(n.tabIndex,0),s=Math.max(e.tabIndex,0);return t===0||s===0?s>t:t>s}function fc(n,e){const t=[];for(;n.length>0&&e.length>0;)pc(n[0],e[0])?t.push(e.shift()):t.push(n.shift());return t.concat(n,e)}function xi(n){const e=n.length;if(e<2)return n;const t=Math.ceil(e/2),s=xi(n.slice(0,t)),i=xi(n.slice(t));return fc(s,i)}function _c(n){return n.matches('[tabindex="-1"]')?!1:n.matches("input, select, textarea, button, object")?n.matches(":not([disabled])"):n.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function mc(n){return n.getRootNode().activeElement===n}function gc(n){if(!_c(n))return-1;const e=n.getAttribute("tabindex")||0;return Number(e)}function ta(n,e){if(n.nodeType!==Node.ELEMENT_NODE||hc(n))return!1;const t=n,s=gc(t);let i=s>0;s>=0&&e.push(t);let r=[];return t.localName==="slot"?r=t.assignedNodes({flatten:!0}):r=(t.shadowRoot||t).children,[...r].forEach(o=>{i=ta(o,e)||i}),i}function yc(n){const e=[];return ta(n,e)?xi(e):e}/**
|
2310
|
+
* @license
|
2311
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2312
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2313
|
+
*/const Zi=P(n=>class extends n{get _keyboardActive(){return cc()}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}});/**
|
2314
|
+
* @license
|
2315
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
2316
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2317
|
+
*/const sa=n=>class extends ea(n){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,s){super._disabledChanged(t,s),t?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):s&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&t!==-1&&(this._lastTabIndex=t,this.tabindex=-1)}};/**
|
2318
|
+
* @license
|
2319
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2320
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2321
|
+
*/const bc=n=>class extends uc(sa(Zi(n))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),!(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)&&this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}};/**
|
2322
|
+
* @license
|
2323
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2324
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2325
|
+
*/S("vaadin-button",Wu,{moduleId:"vaadin-button-styles"});class vc extends bc(Lo($e(Xe(ae)))){static get is(){return"vaadin-button"}static get template(){return qu(Pe)}ready(){super.ready(),this._tooltipController=new Fo(this),this.addController(this._tooltipController)}}Y(vc);S("vaadin-date-picker-year",A`
|
2326
|
+
:host([current]) [part='year-number'] {
|
2327
|
+
color: var(--lumo-primary-text-color);
|
2328
|
+
}
|
2329
|
+
|
2330
|
+
:host(:not([current])) [part='year-number'],
|
2331
|
+
[part='year-separator'] {
|
2332
|
+
opacity: var(--_lumo-date-picker-year-opacity, 0.7);
|
2333
|
+
transition: 0.2s opacity;
|
2334
|
+
}
|
2335
|
+
|
2336
|
+
[part='year-number'],
|
2337
|
+
[part='year-separator'] {
|
2338
|
+
display: flex;
|
2339
|
+
align-items: center;
|
2340
|
+
justify-content: center;
|
2341
|
+
height: 50%;
|
2342
|
+
transform: translateY(-50%);
|
2343
|
+
}
|
2344
|
+
|
2345
|
+
[part='year-separator']::after {
|
2346
|
+
color: var(--lumo-disabled-text-color);
|
2347
|
+
content: '\\2022';
|
2348
|
+
}
|
2349
|
+
`,{moduleId:"lumo-date-picker-year"});S("vaadin-date-picker-overlay-content",A`
|
2350
|
+
:host {
|
2351
|
+
position: relative;
|
2352
|
+
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
2353
|
+
background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
|
2354
|
+
background-size: 57px 100%;
|
2355
|
+
background-position: top right;
|
2356
|
+
background-repeat: no-repeat;
|
2357
|
+
cursor: default;
|
2358
|
+
}
|
2359
|
+
|
2360
|
+
::slotted([slot='months']) {
|
2361
|
+
/* Month calendar height:
|
2362
|
+
header height + margin-bottom
|
2363
|
+
+ weekdays height + margin-bottom
|
2364
|
+
+ date cell heights
|
2365
|
+
+ small margin between month calendars
|
2366
|
+
*/
|
2367
|
+
/* prettier-ignore */
|
2368
|
+
--vaadin-infinite-scroller-item-height:
|
2369
|
+
calc(
|
2370
|
+
var(--lumo-font-size-l) + var(--lumo-space-m)
|
2371
|
+
+ var(--lumo-font-size-xs) + var(--lumo-space-s)
|
2372
|
+
+ var(--lumo-size-m) * 6
|
2373
|
+
+ var(--lumo-space-s)
|
2374
|
+
);
|
2375
|
+
--vaadin-infinite-scroller-buffer-offset: 10%;
|
2376
|
+
-webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
2377
|
+
mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
2378
|
+
position: relative;
|
2379
|
+
margin-right: 57px;
|
2380
|
+
}
|
2381
|
+
|
2382
|
+
::slotted([slot='years']) {
|
2383
|
+
/* TODO get rid of fixed magic number */
|
2384
|
+
--vaadin-infinite-scroller-buffer-width: 97px;
|
2385
|
+
width: 57px;
|
2386
|
+
height: auto;
|
2387
|
+
top: 0;
|
2388
|
+
bottom: 0;
|
2389
|
+
font-size: var(--lumo-font-size-s);
|
2390
|
+
box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
|
2391
|
+
-webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
2392
|
+
mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
2393
|
+
cursor: var(--lumo-clickable-cursor);
|
2394
|
+
}
|
2395
|
+
|
2396
|
+
::slotted([slot='years']:hover) {
|
2397
|
+
--_lumo-date-picker-year-opacity: 1;
|
2398
|
+
}
|
2399
|
+
|
2400
|
+
/* TODO unsupported selector */
|
2401
|
+
#scrollers {
|
2402
|
+
position: static;
|
2403
|
+
display: block;
|
2404
|
+
}
|
2405
|
+
|
2406
|
+
/* TODO fix this in vaadin-date-picker that it adapts to the width of the year scroller */
|
2407
|
+
:host([desktop]) ::slotted([slot='months']) {
|
2408
|
+
right: auto;
|
2409
|
+
}
|
2410
|
+
|
2411
|
+
/* Year scroller position indicator */
|
2412
|
+
::slotted([slot='years'])::before {
|
2413
|
+
border: none;
|
2414
|
+
width: 1em;
|
2415
|
+
height: 1em;
|
2416
|
+
background-color: var(--lumo-base-color);
|
2417
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
2418
|
+
transform: translate(-75%, -50%) rotate(45deg);
|
2419
|
+
border-top-right-radius: var(--lumo-border-radius-s);
|
2420
|
+
box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
|
2421
|
+
z-index: 1;
|
2422
|
+
}
|
2423
|
+
|
2424
|
+
[part='toolbar'] {
|
2425
|
+
padding: var(--lumo-space-s);
|
2426
|
+
border-bottom-left-radius: var(--lumo-border-radius-l);
|
2427
|
+
margin-right: 57px;
|
2428
|
+
}
|
2429
|
+
|
2430
|
+
[part='toolbar'] ::slotted(vaadin-button) {
|
2431
|
+
margin: 0;
|
2432
|
+
}
|
2433
|
+
|
2434
|
+
/* Narrow viewport mode (fullscreen) */
|
2435
|
+
|
2436
|
+
:host([fullscreen]) [part='toolbar'] {
|
2437
|
+
order: -1;
|
2438
|
+
background-color: var(--lumo-base-color);
|
2439
|
+
}
|
2440
|
+
|
2441
|
+
:host([fullscreen]) [part='overlay-header'] {
|
2442
|
+
order: -2;
|
2443
|
+
height: var(--lumo-size-m);
|
2444
|
+
padding: var(--lumo-space-s);
|
2445
|
+
position: absolute;
|
2446
|
+
left: 0;
|
2447
|
+
right: 0;
|
2448
|
+
justify-content: center;
|
2449
|
+
}
|
2450
|
+
|
2451
|
+
:host([fullscreen]) [part='toggle-button'],
|
2452
|
+
:host([fullscreen]) [part='clear-button'],
|
2453
|
+
[part='overlay-header'] [part='label'] {
|
2454
|
+
display: none;
|
2455
|
+
}
|
2456
|
+
|
2457
|
+
/* Very narrow screen (year scroller initially hidden) */
|
2458
|
+
|
2459
|
+
[part='years-toggle-button'] {
|
2460
|
+
display: flex;
|
2461
|
+
align-items: center;
|
2462
|
+
height: var(--lumo-size-s);
|
2463
|
+
padding: 0 0.5em;
|
2464
|
+
border-radius: var(--lumo-border-radius-m);
|
2465
|
+
z-index: 3;
|
2466
|
+
color: var(--lumo-primary-text-color);
|
2467
|
+
font-weight: 500;
|
2468
|
+
-webkit-font-smoothing: antialiased;
|
2469
|
+
-moz-osx-font-smoothing: grayscale;
|
2470
|
+
}
|
2471
|
+
|
2472
|
+
:host([years-visible]) [part='years-toggle-button'] {
|
2473
|
+
background-color: var(--lumo-primary-color);
|
2474
|
+
color: var(--lumo-primary-contrast-color);
|
2475
|
+
}
|
2476
|
+
|
2477
|
+
/* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
|
2478
|
+
@media screen and (max-width: 374px) {
|
2479
|
+
:host {
|
2480
|
+
background-image: none;
|
2481
|
+
}
|
2482
|
+
|
2483
|
+
[part='toolbar'],
|
2484
|
+
::slotted([slot='months']) {
|
2485
|
+
margin-right: 0;
|
2486
|
+
}
|
2487
|
+
|
2488
|
+
/* TODO make date-picker adapt to the width of the years part */
|
2489
|
+
::slotted([slot='years']) {
|
2490
|
+
--vaadin-infinite-scroller-buffer-width: 90px;
|
2491
|
+
width: 50px;
|
2492
|
+
background-color: var(--lumo-shade-5pct);
|
2493
|
+
}
|
2494
|
+
|
2495
|
+
:host([years-visible]) ::slotted([slot='months']) {
|
2496
|
+
padding-left: 50px;
|
2497
|
+
}
|
2498
|
+
}
|
2499
|
+
`,{moduleId:"lumo-date-picker-overlay-content"});S("vaadin-month-calendar",A`
|
2500
|
+
:host {
|
2501
|
+
-moz-user-select: none;
|
2502
|
+
-webkit-user-select: none;
|
2503
|
+
-webkit-tap-highlight-color: transparent;
|
2504
|
+
user-select: none;
|
2505
|
+
font-size: var(--lumo-font-size-m);
|
2506
|
+
color: var(--lumo-body-text-color);
|
2507
|
+
text-align: center;
|
2508
|
+
padding: 0 var(--lumo-space-xs);
|
2509
|
+
}
|
2510
|
+
|
2511
|
+
/* Month header */
|
2512
|
+
|
2513
|
+
[part='month-header'] {
|
2514
|
+
color: var(--lumo-header-text-color);
|
2515
|
+
font-size: var(--lumo-font-size-l);
|
2516
|
+
line-height: 1;
|
2517
|
+
font-weight: 500;
|
2518
|
+
margin-bottom: var(--lumo-space-m);
|
2519
|
+
}
|
2520
|
+
|
2521
|
+
/* Week days and numbers */
|
2522
|
+
|
2523
|
+
[part='weekdays'],
|
2524
|
+
[part='weekday'],
|
2525
|
+
[part='week-number'] {
|
2526
|
+
font-size: var(--lumo-font-size-xxs);
|
2527
|
+
line-height: 1;
|
2528
|
+
color: var(--lumo-secondary-text-color);
|
2529
|
+
}
|
2530
|
+
|
2531
|
+
[part='weekdays'] {
|
2532
|
+
margin-bottom: var(--lumo-space-s);
|
2533
|
+
}
|
2534
|
+
|
2535
|
+
[part='weekday']:empty,
|
2536
|
+
[part='week-number'] {
|
2537
|
+
width: var(--lumo-size-xs);
|
2538
|
+
}
|
2539
|
+
|
2540
|
+
/* Date and week number cells */
|
2541
|
+
|
2542
|
+
[part~='date'],
|
2543
|
+
[part='week-number'] {
|
2544
|
+
box-sizing: border-box;
|
2545
|
+
display: inline-flex;
|
2546
|
+
align-items: center;
|
2547
|
+
justify-content: center;
|
2548
|
+
height: var(--lumo-size-m);
|
2549
|
+
position: relative;
|
2550
|
+
}
|
2551
|
+
|
2552
|
+
[part~='date'] {
|
2553
|
+
transition: color 0.1s;
|
2554
|
+
}
|
2555
|
+
|
2556
|
+
[part~='date']:not(:empty) {
|
2557
|
+
cursor: var(--lumo-clickable-cursor);
|
2558
|
+
}
|
2559
|
+
|
2560
|
+
:host([week-numbers]) [part='weekday']:not(:empty),
|
2561
|
+
:host([week-numbers]) [part~='date'] {
|
2562
|
+
width: calc((100% - var(--lumo-size-xs)) / 7);
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
/* Today date */
|
2566
|
+
|
2567
|
+
[part~='date'][part~='today'] {
|
2568
|
+
color: var(--lumo-primary-text-color);
|
2569
|
+
}
|
2570
|
+
|
2571
|
+
/* Focused date */
|
2572
|
+
|
2573
|
+
[part~='date']::before {
|
2574
|
+
content: '';
|
2575
|
+
position: absolute;
|
2576
|
+
z-index: -1;
|
2577
|
+
top: 50%;
|
2578
|
+
left: 50%;
|
2579
|
+
transform: translate(-50%, -50%);
|
2580
|
+
min-width: 2em;
|
2581
|
+
min-height: 2em;
|
2582
|
+
width: 80%;
|
2583
|
+
height: 80%;
|
2584
|
+
max-height: 100%;
|
2585
|
+
max-width: 100%;
|
2586
|
+
border-radius: var(--lumo-border-radius-m);
|
2587
|
+
}
|
2588
|
+
|
2589
|
+
[part~='date'][part~='focused']::before {
|
2590
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
2591
|
+
}
|
2592
|
+
|
2593
|
+
:host(:not([focused])) [part~='date'][part~='focused']::before {
|
2594
|
+
animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
|
2595
|
+
}
|
2596
|
+
|
2597
|
+
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
2598
|
+
50% {
|
2599
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
|
2600
|
+
}
|
2601
|
+
}
|
2602
|
+
|
2603
|
+
[part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {
|
2604
|
+
background-color: var(--lumo-primary-color-10pct);
|
2605
|
+
}
|
2606
|
+
|
2607
|
+
[part~='date'][part~='selected'] {
|
2608
|
+
color: var(--lumo-primary-contrast-color);
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
[part~='date'][part~='selected']::before {
|
2612
|
+
background-color: var(--lumo-primary-color);
|
2613
|
+
}
|
2614
|
+
|
2615
|
+
[part~='date'][part~='disabled'] {
|
2616
|
+
color: var(--lumo-disabled-text-color);
|
2617
|
+
}
|
2618
|
+
|
2619
|
+
@media (pointer: coarse) {
|
2620
|
+
[part~='date']:hover:not([part~='selected'])::before,
|
2621
|
+
[part~='focused']:not([part~='selected'])::before {
|
2622
|
+
display: none;
|
2623
|
+
}
|
2624
|
+
|
2625
|
+
[part~='date']:not(:empty):not([part~='disabled']):active::before {
|
2626
|
+
display: block;
|
2627
|
+
}
|
2628
|
+
|
2629
|
+
[part~='date'][part~='selected']::before {
|
2630
|
+
box-shadow: none;
|
2631
|
+
}
|
2632
|
+
}
|
2633
|
+
|
2634
|
+
/* Disabled */
|
2635
|
+
|
2636
|
+
:host([disabled]) * {
|
2637
|
+
color: var(--lumo-disabled-text-color) !important;
|
2638
|
+
}
|
2639
|
+
`,{moduleId:"lumo-month-calendar"});const ia=document.createElement("template");ia.innerHTML=`
|
2640
|
+
<style>
|
2641
|
+
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
2642
|
+
50% {
|
2643
|
+
box-shadow: 0 0 0 2px transparent;
|
2644
|
+
}
|
2645
|
+
}
|
2646
|
+
</style>
|
2647
|
+
`;document.head.appendChild(ia.content);/**
|
2648
|
+
* @license
|
2649
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2650
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2651
|
+
*/const wc=A`
|
2652
|
+
@font-face {
|
2653
|
+
font-family: 'lumo-icons';
|
2654
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
|
2655
|
+
format('woff');
|
2656
|
+
font-weight: normal;
|
2657
|
+
font-style: normal;
|
2658
|
+
}
|
2659
|
+
|
2660
|
+
html {
|
2661
|
+
--lumo-icons-align-center: '\\ea01';
|
2662
|
+
--lumo-icons-align-left: '\\ea02';
|
2663
|
+
--lumo-icons-align-right: '\\ea03';
|
2664
|
+
--lumo-icons-angle-down: '\\ea04';
|
2665
|
+
--lumo-icons-angle-left: '\\ea05';
|
2666
|
+
--lumo-icons-angle-right: '\\ea06';
|
2667
|
+
--lumo-icons-angle-up: '\\ea07';
|
2668
|
+
--lumo-icons-arrow-down: '\\ea08';
|
2669
|
+
--lumo-icons-arrow-left: '\\ea09';
|
2670
|
+
--lumo-icons-arrow-right: '\\ea0a';
|
2671
|
+
--lumo-icons-arrow-up: '\\ea0b';
|
2672
|
+
--lumo-icons-bar-chart: '\\ea0c';
|
2673
|
+
--lumo-icons-bell: '\\ea0d';
|
2674
|
+
--lumo-icons-calendar: '\\ea0e';
|
2675
|
+
--lumo-icons-checkmark: '\\ea0f';
|
2676
|
+
--lumo-icons-chevron-down: '\\ea10';
|
2677
|
+
--lumo-icons-chevron-left: '\\ea11';
|
2678
|
+
--lumo-icons-chevron-right: '\\ea12';
|
2679
|
+
--lumo-icons-chevron-up: '\\ea13';
|
2680
|
+
--lumo-icons-clock: '\\ea14';
|
2681
|
+
--lumo-icons-cog: '\\ea15';
|
2682
|
+
--lumo-icons-cross: '\\ea16';
|
2683
|
+
--lumo-icons-download: '\\ea17';
|
2684
|
+
--lumo-icons-dropdown: '\\ea18';
|
2685
|
+
--lumo-icons-edit: '\\ea19';
|
2686
|
+
--lumo-icons-error: '\\ea1a';
|
2687
|
+
--lumo-icons-eye: '\\ea1b';
|
2688
|
+
--lumo-icons-eye-disabled: '\\ea1c';
|
2689
|
+
--lumo-icons-menu: '\\ea1d';
|
2690
|
+
--lumo-icons-minus: '\\ea1e';
|
2691
|
+
--lumo-icons-ordered-list: '\\ea1f';
|
2692
|
+
--lumo-icons-phone: '\\ea20';
|
2693
|
+
--lumo-icons-photo: '\\ea21';
|
2694
|
+
--lumo-icons-play: '\\ea22';
|
2695
|
+
--lumo-icons-plus: '\\ea23';
|
2696
|
+
--lumo-icons-redo: '\\ea24';
|
2697
|
+
--lumo-icons-reload: '\\ea25';
|
2698
|
+
--lumo-icons-search: '\\ea26';
|
2699
|
+
--lumo-icons-undo: '\\ea27';
|
2700
|
+
--lumo-icons-unordered-list: '\\ea28';
|
2701
|
+
--lumo-icons-upload: '\\ea29';
|
2702
|
+
--lumo-icons-user: '\\ea2a';
|
2703
|
+
}
|
2704
|
+
`;Je("font-icons",wc);/**
|
2705
|
+
* @license
|
2706
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2707
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2708
|
+
*/const na=A`
|
2709
|
+
[part$='button'] {
|
2710
|
+
flex: none;
|
2711
|
+
width: 1em;
|
2712
|
+
height: 1em;
|
2713
|
+
line-height: 1;
|
2714
|
+
font-size: var(--lumo-icon-size-m);
|
2715
|
+
text-align: center;
|
2716
|
+
color: var(--lumo-contrast-60pct);
|
2717
|
+
transition: 0.2s color;
|
2718
|
+
cursor: var(--lumo-clickable-cursor);
|
2719
|
+
}
|
2720
|
+
|
2721
|
+
[part$='button']:hover {
|
2722
|
+
color: var(--lumo-contrast-90pct);
|
2723
|
+
}
|
2724
|
+
|
2725
|
+
:host([disabled]) [part$='button'],
|
2726
|
+
:host([readonly]) [part$='button'] {
|
2727
|
+
color: var(--lumo-contrast-20pct);
|
2728
|
+
cursor: default;
|
2729
|
+
}
|
2730
|
+
|
2731
|
+
[part$='button']::before {
|
2732
|
+
font-family: 'lumo-icons';
|
2733
|
+
display: block;
|
2734
|
+
}
|
2735
|
+
`;S("",na,{moduleId:"lumo-field-button"});/**
|
2736
|
+
* @license
|
2737
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2738
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2739
|
+
*/const Ac=A`
|
2740
|
+
:host([has-helper]) [part='helper-text']::before {
|
2741
|
+
content: '';
|
2742
|
+
display: block;
|
2743
|
+
height: 0.4em;
|
2744
|
+
}
|
2745
|
+
|
2746
|
+
[part='helper-text'] {
|
2747
|
+
display: block;
|
2748
|
+
color: var(--lumo-secondary-text-color);
|
2749
|
+
font-size: var(--lumo-font-size-xs);
|
2750
|
+
line-height: var(--lumo-line-height-xs);
|
2751
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
2752
|
+
transition: color 0.2s;
|
2753
|
+
}
|
2754
|
+
|
2755
|
+
:host(:hover:not([readonly])) [part='helper-text'] {
|
2756
|
+
color: var(--lumo-body-text-color);
|
2757
|
+
}
|
2758
|
+
|
2759
|
+
:host([disabled]) [part='helper-text'] {
|
2760
|
+
color: var(--lumo-disabled-text-color);
|
2761
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
2762
|
+
}
|
2763
|
+
|
2764
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
2765
|
+
display: none;
|
2766
|
+
}
|
2767
|
+
|
2768
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
2769
|
+
content: '';
|
2770
|
+
display: block;
|
2771
|
+
height: 0.4em;
|
2772
|
+
}
|
2773
|
+
|
2774
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
2775
|
+
order: 0;
|
2776
|
+
padding-bottom: 0.4em;
|
2777
|
+
}
|
2778
|
+
|
2779
|
+
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
2780
|
+
order: 1;
|
2781
|
+
}
|
2782
|
+
|
2783
|
+
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
2784
|
+
order: 2;
|
2785
|
+
}
|
2786
|
+
|
2787
|
+
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
2788
|
+
order: 3;
|
2789
|
+
}
|
2790
|
+
`;/**
|
2791
|
+
* @license
|
2792
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2793
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2794
|
+
*/const ra=A`
|
2795
|
+
[part='label'] {
|
2796
|
+
align-self: flex-start;
|
2797
|
+
color: var(--lumo-secondary-text-color);
|
2798
|
+
font-weight: 500;
|
2799
|
+
font-size: var(--lumo-font-size-s);
|
2800
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
2801
|
+
transition: color 0.2s;
|
2802
|
+
line-height: 1;
|
2803
|
+
padding-right: 1em;
|
2804
|
+
padding-bottom: 0.5em;
|
2805
|
+
/* As a workaround for diacritics being cut off, add a top padding and a
|
2806
|
+
negative margin to compensate */
|
2807
|
+
padding-top: 0.25em;
|
2808
|
+
margin-top: -0.25em;
|
2809
|
+
overflow: hidden;
|
2810
|
+
white-space: nowrap;
|
2811
|
+
text-overflow: ellipsis;
|
2812
|
+
position: relative;
|
2813
|
+
max-width: 100%;
|
2814
|
+
box-sizing: border-box;
|
2815
|
+
}
|
2816
|
+
|
2817
|
+
:host([has-label])::before {
|
2818
|
+
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
2819
|
+
}
|
2820
|
+
|
2821
|
+
:host([has-label][theme~='small'])::before {
|
2822
|
+
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
2823
|
+
}
|
2824
|
+
|
2825
|
+
:host([has-label]) {
|
2826
|
+
padding-top: var(--lumo-space-m);
|
2827
|
+
}
|
2828
|
+
|
2829
|
+
:host([has-label]) ::slotted([slot='tooltip']) {
|
2830
|
+
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
2831
|
+
}
|
2832
|
+
|
2833
|
+
:host([required]) [part='required-indicator']::after {
|
2834
|
+
content: var(--lumo-required-field-indicator, '\\2022');
|
2835
|
+
transition: opacity 0.2s;
|
2836
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
2837
|
+
position: absolute;
|
2838
|
+
right: 0;
|
2839
|
+
width: 1em;
|
2840
|
+
text-align: center;
|
2841
|
+
}
|
2842
|
+
|
2843
|
+
:host([invalid]) [part='required-indicator']::after {
|
2844
|
+
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
2845
|
+
}
|
2846
|
+
|
2847
|
+
[part='error-message'] {
|
2848
|
+
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
2849
|
+
font-size: var(--lumo-font-size-xs);
|
2850
|
+
line-height: var(--lumo-line-height-xs);
|
2851
|
+
color: var(--lumo-error-text-color);
|
2852
|
+
will-change: max-height;
|
2853
|
+
transition: 0.4s max-height;
|
2854
|
+
max-height: 5em;
|
2855
|
+
}
|
2856
|
+
|
2857
|
+
:host([has-error-message]) [part='error-message']::before,
|
2858
|
+
:host([has-error-message]) [part='error-message']::after {
|
2859
|
+
content: '';
|
2860
|
+
display: block;
|
2861
|
+
height: 0.4em;
|
2862
|
+
}
|
2863
|
+
|
2864
|
+
:host(:not([invalid])) [part='error-message'] {
|
2865
|
+
max-height: 0;
|
2866
|
+
overflow: hidden;
|
2867
|
+
}
|
2868
|
+
|
2869
|
+
/* RTL specific styles */
|
2870
|
+
|
2871
|
+
:host([dir='rtl']) [part='label'] {
|
2872
|
+
margin-left: 0;
|
2873
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
2874
|
+
}
|
2875
|
+
|
2876
|
+
:host([dir='rtl']) [part='label'] {
|
2877
|
+
padding-left: 1em;
|
2878
|
+
padding-right: 0;
|
2879
|
+
}
|
2880
|
+
|
2881
|
+
:host([dir='rtl']) [part='required-indicator']::after {
|
2882
|
+
right: auto;
|
2883
|
+
left: 0;
|
2884
|
+
}
|
2885
|
+
|
2886
|
+
:host([dir='rtl']) [part='error-message'] {
|
2887
|
+
margin-left: 0;
|
2888
|
+
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
2889
|
+
}
|
2890
|
+
`;S("",ra,{moduleId:"lumo-required-field"});/**
|
2891
|
+
* @license
|
2892
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
2893
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
2894
|
+
*/const xc=A`
|
2895
|
+
:host {
|
2896
|
+
--lumo-text-field-size: var(--lumo-size-m);
|
2897
|
+
color: var(--lumo-body-text-color);
|
2898
|
+
font-size: var(--lumo-font-size-m);
|
2899
|
+
font-family: var(--lumo-font-family);
|
2900
|
+
-webkit-font-smoothing: antialiased;
|
2901
|
+
-moz-osx-font-smoothing: grayscale;
|
2902
|
+
-webkit-tap-highlight-color: transparent;
|
2903
|
+
padding: var(--lumo-space-xs) 0;
|
2904
|
+
}
|
2905
|
+
|
2906
|
+
:host::before {
|
2907
|
+
height: var(--lumo-text-field-size);
|
2908
|
+
box-sizing: border-box;
|
2909
|
+
display: inline-flex;
|
2910
|
+
align-items: center;
|
2911
|
+
}
|
2912
|
+
|
2913
|
+
:host([focused]:not([readonly])) [part='label'] {
|
2914
|
+
color: var(--lumo-primary-text-color);
|
2915
|
+
}
|
2916
|
+
|
2917
|
+
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
2918
|
+
-webkit-mask-image: none;
|
2919
|
+
mask-image: none;
|
2920
|
+
}
|
2921
|
+
|
2922
|
+
::slotted(:is(input, textarea):placeholder-shown) {
|
2923
|
+
color: var(--lumo-secondary-text-color);
|
2924
|
+
}
|
2925
|
+
|
2926
|
+
/* Hover */
|
2927
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
2928
|
+
color: var(--lumo-body-text-color);
|
2929
|
+
}
|
2930
|
+
|
2931
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
2932
|
+
opacity: 0.1;
|
2933
|
+
}
|
2934
|
+
|
2935
|
+
/* Touch device adjustment */
|
2936
|
+
@media (pointer: coarse) {
|
2937
|
+
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
2938
|
+
color: var(--lumo-secondary-text-color);
|
2939
|
+
}
|
2940
|
+
|
2941
|
+
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
2942
|
+
opacity: 0;
|
2943
|
+
}
|
2944
|
+
|
2945
|
+
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
2946
|
+
opacity: 0.2;
|
2947
|
+
}
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
/* Trigger when not focusing using the keyboard */
|
2951
|
+
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
2952
|
+
transform: scaleX(0);
|
2953
|
+
transition-duration: 0.15s, 1s;
|
2954
|
+
}
|
2955
|
+
|
2956
|
+
/* Focus-ring */
|
2957
|
+
:host([focus-ring]) [part='input-field'] {
|
2958
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
2959
|
+
}
|
2960
|
+
|
2961
|
+
/* Read-only and disabled */
|
2962
|
+
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
2963
|
+
opacity: 0;
|
2964
|
+
}
|
2965
|
+
|
2966
|
+
/* Read-only style */
|
2967
|
+
:host([readonly]) {
|
2968
|
+
--vaadin-input-field-border-color: transparent;
|
2969
|
+
}
|
2970
|
+
|
2971
|
+
/* Disabled style */
|
2972
|
+
:host([disabled]) {
|
2973
|
+
pointer-events: none;
|
2974
|
+
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
2975
|
+
}
|
2976
|
+
|
2977
|
+
:host([disabled]) [part='label'],
|
2978
|
+
:host([disabled]) [part='input-field'] ::slotted(*) {
|
2979
|
+
color: var(--lumo-disabled-text-color);
|
2980
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
2981
|
+
}
|
2982
|
+
|
2983
|
+
/* Invalid style */
|
2984
|
+
:host([invalid]) {
|
2985
|
+
--vaadin-input-field-border-color: var(--lumo-error-color);
|
2986
|
+
}
|
2987
|
+
|
2988
|
+
:host([invalid][focus-ring]) [part='input-field'] {
|
2989
|
+
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
2990
|
+
}
|
2991
|
+
|
2992
|
+
:host([input-prevented]) [part='input-field'] {
|
2993
|
+
animation: shake 0.15s infinite;
|
2994
|
+
}
|
2995
|
+
|
2996
|
+
@keyframes shake {
|
2997
|
+
25% {
|
2998
|
+
transform: translateX(4px);
|
2999
|
+
}
|
3000
|
+
75% {
|
3001
|
+
transform: translateX(-4px);
|
3002
|
+
}
|
3003
|
+
}
|
3004
|
+
|
3005
|
+
/* Small theme */
|
3006
|
+
:host([theme~='small']) {
|
3007
|
+
font-size: var(--lumo-font-size-s);
|
3008
|
+
--lumo-text-field-size: var(--lumo-size-s);
|
3009
|
+
}
|
3010
|
+
|
3011
|
+
:host([theme~='small']) [part='label'] {
|
3012
|
+
font-size: var(--lumo-font-size-xs);
|
3013
|
+
}
|
3014
|
+
|
3015
|
+
:host([theme~='small']) [part='error-message'] {
|
3016
|
+
font-size: var(--lumo-font-size-xxs);
|
3017
|
+
}
|
3018
|
+
|
3019
|
+
/* Slotted content */
|
3020
|
+
[part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
|
3021
|
+
color: var(--lumo-secondary-text-color);
|
3022
|
+
font-weight: 400;
|
3023
|
+
}
|
3024
|
+
|
3025
|
+
[part='clear-button']::before {
|
3026
|
+
content: var(--lumo-icons-cross);
|
3027
|
+
}
|
3028
|
+
`,oa=[ra,na,Ac,xc];S("",oa,{moduleId:"lumo-input-field-shared-styles"});const Cc=A`
|
3029
|
+
:host {
|
3030
|
+
outline: none;
|
3031
|
+
}
|
3032
|
+
|
3033
|
+
[part='toggle-button']::before {
|
3034
|
+
content: var(--lumo-icons-calendar);
|
3035
|
+
}
|
3036
|
+
|
3037
|
+
[part='clear-button']::before {
|
3038
|
+
content: var(--lumo-icons-cross);
|
3039
|
+
}
|
3040
|
+
|
3041
|
+
@media (max-width: 420px), (max-height: 420px) {
|
3042
|
+
[part='overlay-content'] {
|
3043
|
+
height: 70vh;
|
3044
|
+
}
|
3045
|
+
}
|
3046
|
+
|
3047
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
3048
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
3049
|
+
}
|
3050
|
+
|
3051
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
3052
|
+
--_lumo-text-field-overflow-mask-image: none;
|
3053
|
+
}
|
3054
|
+
`;S("vaadin-date-picker",[oa,Cc],{moduleId:"lumo-date-picker"});/**
|
3055
|
+
@license
|
3056
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3057
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3058
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3059
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3060
|
+
Code distributed by Google as part of the polymer project is also
|
3061
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3062
|
+
*/let Ci=!1,Ec=[],aa=[];function $c(){Ci=!0,requestAnimationFrame(function(){Ci=!1,Sc(Ec),setTimeout(function(){Pc(aa)})})}function Sc(n){for(;n.length;)la(n.shift())}function Pc(n){for(let e=0,t=n.length;e<t;e++)la(n.shift())}function la(n){const e=n[0],t=n[1],s=n[2];try{t.apply(e,s)}catch(i){setTimeout(()=>{throw i})}}function da(n,e,t){Ci||$c(),aa.push([n,e,t])}/**
|
3063
|
+
* @license
|
3064
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3065
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3066
|
+
*/const ps=n=>n.test(navigator.userAgent),Ei=n=>n.test(navigator.platform),Tc=n=>n.test(navigator.vendor);ps(/Android/u);ps(/Chrome/u)&&Tc(/Google Inc/u);const kc=ps(/Firefox/u),Dc=Ei(/^iPad/u)||Ei(/^Mac/u)&&navigator.maxTouchPoints>1,Oc=Ei(/^iPhone/u),ua=Oc||Dc;ps(/^((?!chrome|android).)*safari/iu);const Mc=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}})();/**
|
3067
|
+
* @license
|
3068
|
+
* Copyright (c) 2017 Anton Korzunov
|
3069
|
+
* SPDX-License-Identifier: MIT
|
3070
|
+
*/let De=new WeakMap,It=new WeakMap,Bt={},Ls=0;const ur=n=>n&&n.nodeType===Node.ELEMENT_NODE,Hs=(...n)=>{console.error(`Error: ${n.join(" ")}. Skip setting aria-hidden.`)},Nc=(n,e)=>ur(n)?e.map(t=>{if(!ur(t))return Hs(t,"is not a valid element"),null;let s=t;for(;s&&s!==n;){if(n.contains(s))return t;s=s.getRootNode().host}return Hs(t,"is not contained inside",n),null}).filter(t=>!!t):(Hs(n,"is not a valid element"),[]),Ic=(n,e,t,s)=>{const i=Nc(e,Array.isArray(n)?n:[n]);Bt[t]||(Bt[t]=new WeakMap);const r=Bt[t],o=[],a=new Set,l=new Set(i),d=h=>{if(!h||a.has(h))return;a.add(h);const p=h.assignedSlot;p&&d(p),d(h.parentNode||h.host)};i.forEach(d);const c=h=>{if(!h||l.has(h))return;const p=h.shadowRoot;(p?[...h.children,...p.children]:[...h.children]).forEach(_=>{if(!["template","script","style"].includes(_.localName))if(a.has(_))c(_);else{const g=_.getAttribute(s),y=g!==null&&g!=="false",b=(De.get(_)||0)+1,x=(r.get(_)||0)+1;De.set(_,b),r.set(_,x),o.push(_),b===1&&y&&It.set(_,!0),x===1&&_.setAttribute(t,"true"),y||_.setAttribute(s,"true")}})};return c(e),a.clear(),Ls+=1,()=>{o.forEach(h=>{const p=De.get(h)-1,f=r.get(h)-1;De.set(h,p),r.set(h,f),p||(It.has(h)?It.delete(h):h.removeAttribute(s)),f||h.removeAttribute(t)}),Ls-=1,Ls||(De=new WeakMap,De=new WeakMap,It=new WeakMap,Bt={})}},ca=(n,e=document.body,t="data-aria-hidden")=>{const s=Array.from(Array.isArray(n)?n:[n]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),Ic(s,e,t,"aria-hidden")};/**
|
3071
|
+
* @license
|
3072
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3073
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3074
|
+
*/class Bc{constructor(e,t){this.host=e,this.callback=typeof t=="function"?t:()=>e}showModal(){const e=this.callback();this.__showOthers=ca(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}/**
|
3075
|
+
* @license
|
3076
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3077
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3078
|
+
*/class zc{saveFocus(e){this.focusNode=e||Ai()}restoreFocus(){const e=this.focusNode;e&&(Ai()===document.body?setTimeout(()=>e.focus()):e.focus(),this.focusNode=null)}}/**
|
3079
|
+
* @license
|
3080
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3081
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3082
|
+
*/const Rs=[];class Lc{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return yc(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(mc).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Rs.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Rs.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(Rs).pop()&&e.key==="Tab"){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,s=e?-1:1,i=this.__focusedElementIndex,r=(t.length+i+s)%t.length,o=t[r];o.focus(),o.localName==="input"&&o.select()}}/**
|
3083
|
+
* @license
|
3084
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
3085
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3086
|
+
*/const Hc=n=>class extends Xe(n){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Bc(this),this.__focusTrapController=new Lc(this),this.__focusRestorationController=new zc}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=Ai();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let s=t;const i=t.ownerDocument;for(;s&&s!==i&&s!==this;)s=s.parentNode||s.host;return s===this}};/**
|
3087
|
+
* @license
|
3088
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
3089
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3090
|
+
*/const Ut=()=>Array.from(document.body.children).filter(n=>n instanceof HTMLElement&&n._hasOverlayStackMixin&&!n.hasAttribute("closing")).sort((n,e)=>n.__zIndex-e.__zIndex||0),Rc=n=>n===Ut().pop(),Fc=n=>class extends n{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return Rc(this)}bringToFront(){let t="";const s=Ut().filter(i=>i!==this).pop();s&&(t=s.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ut().forEach(t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")})}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Ut();let s;for(;(s=t.pop())&&!(s!==this&&(s.$.overlay.style.removeProperty("pointer-events"),!s.modeless)););}};/**
|
3091
|
+
* @license
|
3092
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
3093
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3094
|
+
*/const Uc=n=>class extends Hc(Fc(n)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!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),ua&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&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 s=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(s),s.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,i=window.innerWidth>t,r=document.documentElement.clientHeight;i&&r>t?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-t}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","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,s,i,r){const o=this._oldOwner!==s||this._oldModel!==i;this._oldModel=i,this._oldOwner=s;const a=this._oldRenderer!==t;this._oldRenderer=t;const l=this._oldOpened!==r;this._oldOpened=r,a&&(this.innerHTML="",delete this._$litPart$),r&&t&&(a||l||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,s){t?(this._saveFocus(),this._animatedOpening(),da(this,()=>{this._trapFocus();const i=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(i)}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):s&&(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),s=t.getPropertyValue("animation-name");return!(t.getPropertyValue("display")==="none")&&s&&s!=="none"}_enqueueAnimation(t,s){const i=`__${t}Handler`,r=o=>{o&&o.target!==this||(s(),this.removeEventListener("animationend",r),delete this[i])};this[i]=r,this.addEventListener("animationend",r)}_flushAnimation(t){const s=`__${t}Handler`;typeof this[s]=="function"&&this[s]()}_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){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(t))return;const s=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(s),this.opened&&!s.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&!(this.modeless&&!t.composedPath().includes(this.$.overlay))&&t.key==="Escape"){const s=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(s),this.opened&&!s.defaultPrevented&&this.close(t)}}};/**
|
3095
|
+
* @license
|
3096
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
3097
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3098
|
+
*/const Fs={start:"top",end:"bottom"},Us={start:"left",end:"right"},cr=new ResizeObserver(n=>{setTimeout(()=>{n.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),Vc=n=>class extends n{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value: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.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=Pu(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(t=>{t.addEventListener("scroll",this.__onScroll,!0)})}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(t=>{t.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,s){if(this.__removeUpdatePositionEventListeners(),s&&(s.__overlay=null,cr.unobserve(s),t&&(this.__addUpdatePositionEventListeners(),s.__overlay=this,cr.observe(s))),t){const i=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(i[r],10)})),this.setAttribute("dir",i.direction),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),s=this.__shouldAlignStartVertically(t);this.style.justifyContent=s?"flex-start":"flex-end";const i=this.__isRTL,r=this.__shouldAlignStartHorizontally(t,i),o=!i&&r||i&&!r;this.style.alignItems=o?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(t,a,this.noVerticalOverlap,Fs,this,s),d=this.__calculatePositionInOneDimension(t,a,this.noHorizontalOverlap,Us,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!s),this.toggleAttribute("top-aligned",s),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,s){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),o=!s&&this.horizontalAlign==="start"||s&&this.horizontalAlign==="end";return this.__shouldAlignStart(t,i,r,this.__margins,o,this.noHorizontalOverlap,Us)}__shouldAlignStartVertically(t){const s=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(t,s,i,this.__margins,r,this.noVerticalOverlap,Fs)}__shouldAlignStart(t,s,i,r,o,a,l){const d=i-t[a?l.end:l.start]-r[l.end],c=t[a?l.start:l.end]-r[l.start],h=o?d:c,f=h>(o?c:d)||h>s;return o===f}__adjustBottomProperty(t,s,i){let r;if(t===s.end){if(s.end===Fs.end){const o=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>o&&this.__oldViewportHeight){const a=this.__oldViewportHeight-o;r=i-a}this.__oldViewportHeight=o}if(s.end===Us.end){const o=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>o&&this.__oldViewportWidth){const a=this.__oldViewportWidth-o;r=i-a}this.__oldViewportWidth=o}}return r}__calculatePositionInOneDimension(t,s,i,r,o,a){const l=a?r.start:r.end,d=a?r.end:r.start,c=parseFloat(o.style[l]||getComputedStyle(o)[l]),h=this.__adjustBottomProperty(l,r,c),p=s[a?r.start:r.end]-t[i===a?r.end:r.start],f=h?`${h}px`:`${c+p*(a?-1:1)}px`;return{[l]:f,[d]:""}}};/**
|
3099
|
+
* @license
|
3100
|
+
* Copyright 2019 Google LLC
|
3101
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3102
|
+
*/const Vt=globalThis,Qi=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,en=Symbol(),hr=new WeakMap;let ha=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==en)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Qi&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=hr.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&hr.set(t,e))}return e}toString(){return this.cssText}};const jc=n=>new ha(typeof n=="string"?n:n+"",void 0,en),Yc=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new ha(t,n,en)},Wc=(n,e)=>{if(Qi)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=Vt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)}},pr=Qi?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return jc(t)})(n):n;/**
|
3103
|
+
* @license
|
3104
|
+
* Copyright 2017 Google LLC
|
3105
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3106
|
+
*/const{is:qc,defineProperty:Kc,getOwnPropertyDescriptor:Gc,getOwnPropertyNames:Jc,getOwnPropertySymbols:Xc,getPrototypeOf:Zc}=Object,oe=globalThis,fr=oe.trustedTypes,Qc=fr?fr.emptyScript:"",Vs=oe.reactiveElementPolyfillSupport,ct=(n,e)=>n,$i={toAttribute(n,e){switch(e){case Boolean:n=n?Qc:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(s){t=null}}return t}},pa=(n,e)=>!qc(n,e),_r={attribute:!0,type:String,converter:$i,reflect:!1,hasChanged:pa};var jr,Yr;(jr=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Yr=oe.litPropertyMetadata)!=null||(oe.litPropertyMetadata=new WeakMap);class Ne extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_r){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Kc(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){var o;const{get:i,set:r}=(o=Gc(this.prototype,e))!=null?o:{get(){return this[t]},set(a){this[t]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){const l=i==null?void 0:i.call(this);r.call(this,a),this.requestUpdate(e,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:_r}static _$Ei(){if(this.hasOwnProperty(ct("elementProperties")))return;const e=Zc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ct("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ct("properties"))){const t=this.properties,s=[...Jc(t),...Xc(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(pr(i))}else e!==void 0&&t.push(pr(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)==null||s.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;const e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return Wc(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var s;return(s=t.hostDisconnected)==null?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EC(e,t){var r;const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:$i).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var r;const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)==null?void 0:r.fromAttribute)!==void 0?o.converter:$i;this._$Em=i,this[i]=a.fromAttribute(t,o.type),this._$Em=null}}requestUpdate(e,t,s){var i;if(e!==void 0){if(s!=null||(s=this.constructor.getPropertyOptions(e)),!((i=s.hasChanged)!=null?i:pa)(this[e],t))return;this.P(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,s){var i;this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$Em!==e&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(e)}_$ET(){return ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[o,a]of r)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(r=>{var o;return(o=r.hostUpdate)==null?void 0:o.call(r)}),this.update(t)):this._$EU()}catch(r){throw e=!1,this._$EU(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(e){}firstUpdated(e){}}var Wr;Ne.elementStyles=[],Ne.shadowRootOptions={mode:"open"},Ne[ct("elementProperties")]=new Map,Ne[ct("finalized")]=new Map,Vs==null||Vs({ReactiveElement:Ne}),((Wr=oe.reactiveElementVersions)!=null?Wr:oe.reactiveElementVersions=[]).push("2.0.4");/**
|
3107
|
+
* @license
|
3108
|
+
* Copyright 2017 Google LLC
|
3109
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3110
|
+
*/const ht=globalThis,ss=ht.trustedTypes,mr=ss?ss.createPolicy("lit-html",{createHTML:n=>n}):void 0,fa="$lit$",ie=`lit$${Math.random().toFixed(9).slice(2)}$`,_a="?"+ie,eh=`<${_a}>`,Ce=document,xt=()=>Ce.createComment(""),Ct=n=>n===null||typeof n!="object"&&typeof n!="function",tn=Array.isArray,th=n=>tn(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",js=`[
|
3111
|
+
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gr=/-->/g,yr=/>/g,pe=RegExp(`>|${js}(?:([^\\s"'>=/]+)(${js}*=${js}*(?:[^
|
3112
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),br=/'/g,vr=/"/g,ma=/^(?:script|style|textarea|title)$/i,Ye=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),wr=new WeakMap,be=Ce.createTreeWalker(Ce,129);function ga(n,e){if(!tn(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return mr!==void 0?mr.createHTML(e):e}const sh=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":e===3?"<math>":"",o=rt;for(let a=0;a<t;a++){const l=n[a];let d,c,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,c=o.exec(l),c!==null);)p=o.lastIndex,o===rt?c[1]==="!--"?o=gr:c[1]!==void 0?o=yr:c[2]!==void 0?(ma.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=pe):c[3]!==void 0&&(o=pe):o===pe?c[0]===">"?(o=i!=null?i:rt,h=-1):c[1]===void 0?h=-2:(h=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?pe:c[3]==='"'?vr:br):o===vr||o===br?o=pe:o===gr||o===yr?o=rt:(o=pe,i=void 0);const f=o===pe&&n[a+1].startsWith("/>")?" ":"";r+=o===rt?l+eh:h>=0?(s.push(d),l.slice(0,h)+fa+l.slice(h)+ie+f):l+ie+(h===-2?a:f)}return[ga(n,r+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let Si=class ya{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,c]=sh(e,t);if(this.el=ya.createElement(d,s),be.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=be.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(fa)){const p=c[o++],f=i.getAttribute(h).split(ie),_=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:_[2],strings:f,ctor:_[1]==="."?nh:_[1]==="?"?rh:_[1]==="@"?oh:fs}),i.removeAttribute(h)}else h.startsWith(ie)&&(l.push({type:6,index:r}),i.removeAttribute(h));if(ma.test(i.tagName)){const h=i.textContent.split(ie),p=h.length-1;if(p>0){i.textContent=ss?ss.emptyScript:"";for(let f=0;f<p;f++)i.append(h[f],xt()),be.nextNode(),l.push({type:2,index:++r});i.append(h[p],xt())}}}else if(i.nodeType===8)if(i.data===_a)l.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(ie,h+1))!==-1;)l.push({type:7,index:r}),h+=ie.length-1}r++}}static createElement(e,t){const s=Ce.createElement("template");return s.innerHTML=e,s}};function We(n,e,t=n,s){var o,a,l;if(e===Ye)return e;let i=s!==void 0?(o=t._$Co)==null?void 0:o[s]:t._$Cl;const r=Ct(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),r===void 0?i=void 0:(i=new r(n),i._$AT(n,t,s)),s!==void 0?((l=t._$Co)!=null?l:t._$Co=[])[s]=i:t._$Cl=i),i!==void 0&&(e=We(n,i._$AS(n,e.values),i,s)),e}let ih=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var d;const{el:{content:t},parts:s}=this._$AD,i=((d=e==null?void 0:e.creationScope)!=null?d:Ce).importNode(t,!0);be.currentNode=i;let r=be.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new sn(r,r.nextSibling,this,e):l.type===1?c=new l.ctor(r,l.name,l.strings,this,e):l.type===6&&(c=new ah(r,this,e)),this._$AV.push(c),l=s[++a]}o!==(l==null?void 0:l.index)&&(r=be.nextNode(),o++)}return be.currentNode=Ce,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}},sn=class ba{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,s,i){var r;this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=(r=i==null?void 0:i.isConnected)!=null?r:!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=We(this,e,t),Ct(e)?e===O||e==null||e===""?(this._$AH!==O&&this._$AR(),this._$AH=O):e!==this._$AH&&e!==Ye&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):th(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==O&&Ct(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ce.createTextNode(e)),this._$AH=e}$(e){var r;const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Si.createElement(ga(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(t);else{const o=new ih(i,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=wr.get(e.strings);return t===void 0&&wr.set(e.strings,t=new Si(e)),t}k(e){tn(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new ba(this.O(xt()),this.O(xt()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},fs=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,r){this.type=1,this._$AH=O,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=O}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=We(this,e,t,0),o=!Ct(e)||e!==this._$AH&&e!==Ye,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=We(this,a[s+l],t,l),d===Ye&&(d=this._$AH[l]),o||(o=!Ct(d)||d!==this._$AH[l]),d===O?e=O:e!==O&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!i&&this.j(e)}j(e){e===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},nh=class extends fs{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===O?void 0:e}},rh=class extends fs{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==O)}},oh=class extends fs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){var o;if((e=(o=We(this,e,t,0))!=null?o:O)===Ye)return;const s=this._$AH,i=e===O&&s!==O||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,r=e!==O&&(s===O||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)==null?void 0:t.host)!=null?s:this.element,e):this._$AH.handleEvent(e)}},ah=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){We(this,e)}};const Ys=ht.litHtmlPolyfillSupport;var qr;Ys==null||Ys(Si,sn),((qr=ht.litHtmlVersions)!=null?qr:ht.litHtmlVersions=[]).push("3.2.1");const lh=(n,e,t)=>{var r,o;const s=(r=t==null?void 0:t.renderBefore)!=null?r:e;let i=s._$litPart$;if(i===void 0){const a=(o=t==null?void 0:t.renderBefore)!=null?o:null;s._$litPart$=i=new sn(e.insertBefore(xt(),a),a,void 0,t!=null?t:{})}return i._$AI(n),i};/**
|
3113
|
+
* @license
|
3114
|
+
* Copyright 2017 Google LLC
|
3115
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3116
|
+
*/let jt=class extends Ne{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,s;const e=super.createRenderRoot();return(s=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=lh(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Ye}};var Kr;jt._$litElement$=!0,jt.finalized=!0,(Kr=globalThis.litElementHydrateSupport)==null||Kr.call(globalThis,{LitElement:jt});const Ws=globalThis.litElementPolyfillSupport;Ws==null||Ws({LitElement:jt});var Gr;((Gr=globalThis.litElementVersions)!=null?Gr:globalThis.litElementVersions=[]).push("4.1.1");/**
|
3117
|
+
* @license
|
3118
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
3119
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3120
|
+
*/const dh=Yc`
|
3121
|
+
:host {
|
3122
|
+
z-index: 200;
|
3123
|
+
position: fixed;
|
3124
|
+
|
3125
|
+
/* Despite of what the names say, <vaadin-overlay> is just a container
|
3126
|
+
for position/sizing/alignment. The actual overlay is the overlay part. */
|
3127
|
+
|
3128
|
+
/* Default position constraints: the entire viewport. Note: themes can
|
3129
|
+
override this to introduce gaps between the overlay and the viewport. */
|
3130
|
+
inset: 0;
|
3131
|
+
bottom: var(--vaadin-overlay-viewport-bottom);
|
3132
|
+
|
3133
|
+
/* Use flexbox alignment for the overlay part. */
|
3134
|
+
display: flex;
|
3135
|
+
flex-direction: column; /* makes dropdowns sizing easier */
|
3136
|
+
/* Align to center by default. */
|
3137
|
+
align-items: center;
|
3138
|
+
justify-content: center;
|
3139
|
+
|
3140
|
+
/* Allow centering when max-width/max-height applies. */
|
3141
|
+
margin: auto;
|
3142
|
+
|
3143
|
+
/* The host is not clickable, only the overlay part is. */
|
3144
|
+
pointer-events: none;
|
3145
|
+
|
3146
|
+
/* Remove tap highlight on touch devices. */
|
3147
|
+
-webkit-tap-highlight-color: transparent;
|
3148
|
+
|
3149
|
+
/* CSS API for host */
|
3150
|
+
--vaadin-overlay-viewport-bottom: 0;
|
3151
|
+
}
|
3152
|
+
|
3153
|
+
:host([hidden]),
|
3154
|
+
:host(:not([opened]):not([closing])) {
|
3155
|
+
display: none !important;
|
3156
|
+
}
|
3157
|
+
|
3158
|
+
[part='overlay'] {
|
3159
|
+
-webkit-overflow-scrolling: touch;
|
3160
|
+
overflow: auto;
|
3161
|
+
pointer-events: auto;
|
3162
|
+
|
3163
|
+
/* Prevent overflowing the host */
|
3164
|
+
max-width: 100%;
|
3165
|
+
box-sizing: border-box;
|
3166
|
+
|
3167
|
+
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
3168
|
+
}
|
3169
|
+
|
3170
|
+
[part='backdrop'] {
|
3171
|
+
z-index: -1;
|
3172
|
+
content: '';
|
3173
|
+
background: rgba(0, 0, 0, 0.5);
|
3174
|
+
position: fixed;
|
3175
|
+
inset: 0;
|
3176
|
+
pointer-events: auto;
|
3177
|
+
}
|
3178
|
+
`;/**
|
3179
|
+
* @license
|
3180
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3181
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3182
|
+
*/const uh=kt`
|
3183
|
+
[part='overlay'] {
|
3184
|
+
display: flex;
|
3185
|
+
flex: auto;
|
3186
|
+
}
|
3187
|
+
|
3188
|
+
[part~='content'] {
|
3189
|
+
flex: auto;
|
3190
|
+
}
|
3191
|
+
|
3192
|
+
@media (forced-colors: active) {
|
3193
|
+
[part='overlay'] {
|
3194
|
+
outline: 3px solid;
|
3195
|
+
}
|
3196
|
+
}
|
3197
|
+
`;/**
|
3198
|
+
* @license
|
3199
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3200
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3201
|
+
*/S("vaadin-date-picker-overlay",[dh,uh],{moduleId:"vaadin-date-picker-overlay-styles"});class ch extends Vc(Uc(ds($e(ae)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Pe`
|
3202
|
+
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
3203
|
+
<div part="overlay" id="overlay">
|
3204
|
+
<div part="content" id="content">
|
3205
|
+
<slot></slot>
|
3206
|
+
</div>
|
3207
|
+
</div>
|
3208
|
+
`}}Y(ch);/**
|
3209
|
+
* @license
|
3210
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3211
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3212
|
+
*/function hh(n){let e=n.getDay();e===0&&(e=7);const t=4-e,s=new Date(n.getTime()+t*24*3600*1e3),i=new Date(0,0);i.setFullYear(s.getFullYear());const r=s.getTime()-i.getTime(),o=Math.round(r/(24*3600*1e3));return Math.floor(o/7+1)}function Q(n,e){return n instanceof Date&&e instanceof Date&&n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()&&n.getDate()===e.getDate()}function Et(n,e,t){return(!e||n>=e)&&(!t||n<=t)}function va(n,e){return e.filter(t=>t!==void 0).reduce((t,s)=>{if(!s)return t;if(!t)return s;const i=Math.abs(n.getTime()-s.getTime()),r=Math.abs(t.getTime()-n.getTime());return i<r?s:t})}function wa(n){return{day:n.getDate(),month:n.getMonth(),year:n.getFullYear()}}function Aa(n){const e=new Date,t=new Date(e);return t.setDate(1),t.setMonth(parseInt(n)+e.getMonth()),t}function ph(n,e,t=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let i=e+Math.floor(n.getFullYear()/100)*100;return n<new Date(i-50,t,s)?i-=100:n>new Date(i+50,t,s)&&(i+=100),i}function ot(n){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(n);if(!e)return;const t=new Date(0,0);return t.setFullYear(parseInt(e[1],10)),t.setMonth(parseInt(e[2],10)-1),t.setDate(parseInt(e[3],10)),t}/**
|
3213
|
+
* @license
|
3214
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3215
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3216
|
+
*/const xa=document.createElement("template");xa.innerHTML=`
|
3217
|
+
<style>
|
3218
|
+
:host {
|
3219
|
+
display: block;
|
3220
|
+
overflow: hidden;
|
3221
|
+
height: 500px;
|
3222
|
+
}
|
3223
|
+
|
3224
|
+
#scroller {
|
3225
|
+
position: relative;
|
3226
|
+
height: 100%;
|
3227
|
+
overflow: auto;
|
3228
|
+
outline: none;
|
3229
|
+
margin-right: -40px;
|
3230
|
+
-webkit-overflow-scrolling: touch;
|
3231
|
+
overflow-x: hidden;
|
3232
|
+
}
|
3233
|
+
|
3234
|
+
#scroller.notouchscroll {
|
3235
|
+
-webkit-overflow-scrolling: auto;
|
3236
|
+
}
|
3237
|
+
|
3238
|
+
#scroller::-webkit-scrollbar {
|
3239
|
+
display: none;
|
3240
|
+
}
|
3241
|
+
|
3242
|
+
.buffer {
|
3243
|
+
position: absolute;
|
3244
|
+
width: var(--vaadin-infinite-scroller-buffer-width, 100%);
|
3245
|
+
box-sizing: border-box;
|
3246
|
+
padding-right: 40px;
|
3247
|
+
top: var(--vaadin-infinite-scroller-buffer-offset, 0);
|
3248
|
+
animation: fadein 0.2s;
|
3249
|
+
}
|
3250
|
+
|
3251
|
+
@keyframes fadein {
|
3252
|
+
from {
|
3253
|
+
opacity: 0;
|
3254
|
+
}
|
3255
|
+
to {
|
3256
|
+
opacity: 1;
|
3257
|
+
}
|
3258
|
+
}
|
3259
|
+
</style>
|
3260
|
+
|
3261
|
+
<div id="scroller">
|
3262
|
+
<div class="buffer"></div>
|
3263
|
+
<div class="buffer"></div>
|
3264
|
+
<div id="fullHeight"></div>
|
3265
|
+
</div>
|
3266
|
+
`;class Ca extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(xa.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(e){e&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const e=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const s=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(s)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(()=>{this.$.scroller.classList.remove("notouchscroll")},10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${this._initialScroll*2}px`,kc&&(this.$.scroller.tabIndex=-1))}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_createElement(){}_updateElement(e,t){}_finishInit(){this._initDone||(this._buffers.forEach(e=>{[...e.children].forEach(t=>{this._ensureStampedInstance(t._itemWrapper)})}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(e){const t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform=`translate3d(0, ${this._buffers[t].translateY}px, 0)`,this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const t=this.itemHeight+this.bufferOffset,s=e>this._buffers[1].translateY+t,i=e<this._buffers[0].translateY+t;(s||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=vt.debounce(this._debouncerScrollFinish,Zt.after(200),()=>{const r=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],r)&&!this._isVisible(this._buffers[1],r)&&(this.position=this.position)})}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(e=>{e.style.transform=`translate3d(0, ${e.translateY}px, 0)`}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=vt.debounce(this._debouncerUpdateClones,Zt.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()}),this._scrollDisabled=!1}_createPool(){const e=this.getBoundingClientRect();this._buffers.forEach(t=>{for(let s=0;s<this.bufferSize;s++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const r=`vaadin-infinite-scroller-item-content-${Ro()}`,o=document.createElement("slot");o.setAttribute("name",r),o._itemWrapper=i,t.appendChild(o),i.setAttribute("slot",r),this.appendChild(i),this._isVisible(i,e)&&this._ensureStampedInstance(i)}}),requestAnimationFrame(()=>{this._finishInit()})}_ensureStampedInstance(e){if(e.firstElementChild)return;const t=e.instance;e.instance=this._createElement(),e.appendChild(e.instance),Object.keys(t).forEach(s=>{e.instance[s]=t[s]})}_updateClones(e){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((s,i)=>{if(!s.updated){const r=this._firstIndex+this.bufferSize*i;[...s.children].forEach((o,a)=>{const l=o._itemWrapper;(!e||this._isVisible(l,t))&&this._updateElement(l.instance,r+a)}),s.updated=!0}})}_isVisible(e,t){const s=e.getBoundingClientRect();return s.bottom>t.top&&s.top<t.bottom}}/**
|
3267
|
+
* @license
|
3268
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3269
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3270
|
+
*/const Ea=document.createElement("template");Ea.innerHTML=`
|
3271
|
+
<style>
|
3272
|
+
:host {
|
3273
|
+
--vaadin-infinite-scroller-item-height: 270px;
|
3274
|
+
position: absolute;
|
3275
|
+
top: 0;
|
3276
|
+
left: 0;
|
3277
|
+
right: 0;
|
3278
|
+
bottom: 0;
|
3279
|
+
height: 100%;
|
3280
|
+
}
|
3281
|
+
</style>
|
3282
|
+
`;class fh extends Ca{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Ea.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(e,t){e.month=Aa(t)}}Y(fh);/**
|
3283
|
+
* @license
|
3284
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3285
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3286
|
+
*/const $a=document.createElement("template");$a.innerHTML=`
|
3287
|
+
<style>
|
3288
|
+
:host {
|
3289
|
+
--vaadin-infinite-scroller-item-height: 80px;
|
3290
|
+
width: 50px;
|
3291
|
+
display: block;
|
3292
|
+
height: 100%;
|
3293
|
+
position: absolute;
|
3294
|
+
right: 0;
|
3295
|
+
transform: translateX(100%);
|
3296
|
+
-webkit-tap-highlight-color: transparent;
|
3297
|
+
-webkit-user-select: none;
|
3298
|
+
-moz-user-select: none;
|
3299
|
+
user-select: none;
|
3300
|
+
/* Center the year scroller position. */
|
3301
|
+
--vaadin-infinite-scroller-buffer-offset: 50%;
|
3302
|
+
}
|
3303
|
+
|
3304
|
+
:host::before {
|
3305
|
+
content: '';
|
3306
|
+
display: block;
|
3307
|
+
background: transparent;
|
3308
|
+
width: 0;
|
3309
|
+
height: 0;
|
3310
|
+
position: absolute;
|
3311
|
+
left: 0;
|
3312
|
+
top: 50%;
|
3313
|
+
transform: translateY(-50%);
|
3314
|
+
border-width: 6px;
|
3315
|
+
border-style: solid;
|
3316
|
+
border-color: transparent;
|
3317
|
+
border-left-color: #000;
|
3318
|
+
}
|
3319
|
+
</style>
|
3320
|
+
`;class _h extends Ca{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild($a.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(e,t){e.year=this._yearAfterXYears(t)}_yearAfterXYears(e){const t=new Date,s=new Date(t);return s.setFullYear(parseInt(e)+t.getFullYear()),s.getFullYear()}}Y(_h);/**
|
3321
|
+
* @license
|
3322
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3323
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3324
|
+
*/class mh extends $e(ae){static get is(){return"vaadin-date-picker-year"}static get template(){return Pe`
|
3325
|
+
<style>
|
3326
|
+
:host {
|
3327
|
+
display: block;
|
3328
|
+
height: 100%;
|
3329
|
+
}
|
3330
|
+
</style>
|
3331
|
+
<div part="year-number">[[year]]</div>
|
3332
|
+
<div part="year-separator" aria-hidden="true"></div>
|
3333
|
+
`}static get properties(){return{year:{type:String},selectedDate:{type:Object}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(e,t){this.toggleAttribute("selected",t&&t.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear())}}Y(mh);/**
|
3334
|
+
@license
|
3335
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3336
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3337
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3338
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3339
|
+
Code distributed by Google as part of the polymer project is also
|
3340
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3341
|
+
*/function nn(n,e,t,s,i){let r;i&&(r=typeof t=="object"&&t!==null,r&&(s=n.__dataTemp[e]));let o=s!==t&&(s===s||t===t);return r&&o&&(n.__dataTemp[e]=t),o}const rn=P(n=>{class e extends n{_shouldPropertyChange(s,i,r){return nn(this,s,i,r,!0)}}return e}),gh=P(n=>{class e extends n{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(s,i,r){return nn(this,s,i,r,this.mutableData)}}return e});rn._mutablePropertyChange=nn;/**
|
3342
|
+
@license
|
3343
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3344
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3345
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3346
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3347
|
+
Code distributed by Google as part of the polymer project is also
|
3348
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3349
|
+
*/let Pi=null;function Ti(){return Pi}Ti.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Ti,writable:!0}});const Sa=Ui(Ti),yh=rn(Sa);function bh(n,e){Pi=n,Object.setPrototypeOf(n,e.prototype),new e,Pi=null}const vh=Ui(class{});function wh(n,e){for(let t=0;t<e.length;t++){let s=e[t];if(!!n!=!!s.__hideTemplateChildren__)if(s.nodeType===Node.TEXT_NODE)n?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if(s.localName==="slot")if(n)s.__polymerReplaced__=document.createComment("hidden-slot"),I(I(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const i=s.__polymerReplaced__;i&&I(I(i).parentNode).replaceChild(s,i)}else s.style&&(n?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=n,s._showHideChildren&&s._showHideChildren(n)}}class le extends vh{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let i=this.root.firstChild;i;i=i.nextSibling)t.push(i),i.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let s=this.__templatizeOptions;(e&&s.instanceProps||!s.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let s in this.__hostProps)this._setPendingProperty(s,this.__dataHost["_host_"+s]);for(let s in e)this._setPendingProperty(s,e[s])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,s){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,i=>{i.model=this,s(i)});else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(e,t,s)}}_showHideChildren(e){wh(e,this.children)}_setUnmanagedPropertyToNode(e,t,s){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&t=="textContent"?e.__polymerTextContent__=s:super._setUnmanagedPropertyToNode(e,t,s)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do e=e.__dataHost.__dataHost;while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}le.prototype.__dataHost;le.prototype.__templatizeOptions;le.prototype._methodHost;le.prototype.__templatizeOwner;le.prototype.__hostProps;const Ah=rn(le);function Ar(n){let e=n.__dataHost;return e&&e._methodHost||e}function xh(n,e,t){let s=t.mutableData?Ah:le;ki.mixin&&(s=ki.mixin(s));let i=class extends s{};return i.prototype.__templatizeOptions=t,i.prototype._bindTemplate(n),$h(i,n,e,t),i}function Ch(n,e,t,s){let i=t.forwardHostProp;if(i&&e.hasHostProps){const r=n.localName=="template";let o=e.templatizeTemplateClass;if(!o){if(r){let l=t.mutableData?yh:Sa;class d extends l{}o=e.templatizeTemplateClass=d}else{const l=n.constructor;class d extends l{}o=e.templatizeTemplateClass=d}let a=e.hostProps;for(let l in a)o.prototype._addPropertyEffect("_host_"+l,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Eh(l,i)}),o.prototype._createNotifyingProperty("_host_"+l);uo&&s&&Th(e,t,s)}if(n.__dataProto&&Object.assign(n.__data,n.__dataProto),r)bh(n,o),n.__dataTemp={},n.__dataPending=null,n.__dataOld=null,n._enableProperties();else{Object.setPrototypeOf(n,o.prototype);const a=e.hostProps;for(let l in a)if(l="_host_"+l,l in n){const d=n[l];delete n[l],n.__data[l]=d}}}}function Eh(n,e){return function(s,i,r){e.call(s.__templatizeOwner,i.substring(6),r[i])}}function $h(n,e,t,s){let i=t.hostProps||{};for(let r in s.instanceProps){delete i[r];let o=s.notifyInstanceProp;o&&n.prototype._addPropertyEffect(r,n.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Sh(r,o)})}if(s.forwardHostProp&&e.__dataHost)for(let r in i)t.hasHostProps||(t.hasHostProps=!0),n.prototype._addPropertyEffect(r,n.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ph()})}function Sh(n,e){return function(s,i,r){e.call(s.__templatizeOwner,s,i,r[i])}}function Ph(){return function(e,t,s){e.__dataHost._setPendingPropertyOrPath("_host_"+t,s[t],!0,!0)}}function ki(n,e,t){if(Jt&&!Ar(n))throw new Error("strictTemplatePolicy: template owner not trusted");if(t=t||{},n.__templatizeOwner)throw new Error("A <template> can only be templatized once");n.__templatizeOwner=e;let i=(e?e.constructor:le)._parseTemplate(n),r=i.templatizeInstanceClass;r||(r=xh(n,i,t),i.templatizeInstanceClass=r);const o=Ar(n);Ch(n,i,t,o);let a=class extends r{};return a.prototype._methodHost=o,a.prototype.__dataHost=n,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=i.hostProps,a=a,a}function Th(n,e,t){const s=t.constructor._properties,{propertyEffects:i}=n,{instanceProps:r}=e;for(let o in i)if(!s[o]&&!(r&&r[o])){const a=i[o];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${o}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function kh(n,e){let t;for(;e;)if(t=e.__dataHost?e:e.__templatizeInstance)if(t.__dataHost!=n)e=t.__dataHost;else return t;else e=I(e).parentNode;return null}/**
|
3350
|
+
@license
|
3351
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3352
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3353
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3354
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3355
|
+
Code distributed by Google as part of the polymer project is also
|
3356
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3357
|
+
*/class is{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,$t.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),$t.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return this._timer!=null}static debounce(e,t,s){return e instanceof is?e._cancelAsync():e=new is,e.setConfig(t,s),e}}let $t=new Set;const Dh=function(n){$t.add(n)},Oh=function(){const n=!!$t.size;return $t.forEach(e=>{try{e.flush()}catch(t){setTimeout(()=>{throw t})}}),n};/**
|
3358
|
+
@license
|
3359
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3360
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3361
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3362
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3363
|
+
Code distributed by Google as part of the polymer project is also
|
3364
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3365
|
+
*/const Pa=function(){let n,e;do n=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Oh();while(n||e)};/**
|
3366
|
+
@license
|
3367
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3368
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3369
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3370
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3371
|
+
Code distributed by Google as part of the polymer project is also
|
3372
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3373
|
+
*/let xr=!1;function Mh(){if(lo&&!ao){if(!xr){xr=!0;const n=document.createElement("style");n.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(n)}return!0}return!1}/**
|
3374
|
+
@license
|
3375
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
3376
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3377
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
3378
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
3379
|
+
Code distributed by Google as part of the polymer project is also
|
3380
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
3381
|
+
*/const Nh=gh(ae);class Cr extends Nh{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Pn,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),Mh()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=I(I(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let i=new MutationObserver(()=>{if(this.querySelector("template"))i.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return i.observe(this,{childList:!0}),!1}let s={};s[this.as]=!0,s[this.indexAs]=!0,s[this.itemsIndexAs]=!0,this.__ctor=ki(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:s,forwardHostProp:function(i,r){let o=this.__instances;for(let a=0,l;a<o.length&&(l=o[a]);a++)l.forwardHostProp(i,r)},notifyInstanceProp:function(i,r,o){if(Jl(this.as,r)){let a=i[this.itemsIndexAs];r==this.as&&(this.items[a]=o);let l=gt(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,o)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if(typeof e=="string"){let t=e,s=this.__getMethodHost();return function(){return s[t].apply(s,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn){if(!e)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let t=this.__observePaths;for(let s=0;s<t.length;s++)e.indexOf(t[s])===0&&this.__debounceRender(this.__render,this.delay)}}}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||(e.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=is.debounce(this.__renderDebouncer,t>0?sd.after(t):vo,e.bind(this)),Dh(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Pa()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),s=this.__calculateLimit(t.length);this.__updateInstances(e,s,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking()})),this._setRenderedItemCount(this.__instances.length),(!Pn||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let s=0;s<e.length;s++)t[s]=s;return this.__filterFn&&(t=t.filter((s,i,r)=>this.__filterFn(e[s],i,r))),this.__sortFn&&t.sort((s,i)=>this.__sortFn(e[s],e[i])),t}__calculateLimit(e){let t=e;const s=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),i=Math.max(t-s,0),this.__chunkCount=i||1):(i=Math.min(Math.max(e-s,0),this.__chunkCount),t=Math.min(s+i,e)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,s){const i=this.__itemsIdxToInstIdx={};let r;for(r=0;r<t;r++){let o=this.__instances[r],a=s[r],l=e[a];i[a]=r,o?(o._setPendingProperty(this.as,l),o._setPendingProperty(this.indexAs,r),o._setPendingProperty(this.itemsIndexAs,a),o._flushProperties()):this.__insertInstance(l,r,a)}for(let o=this.__instances.length-1;o>=r;o--)this.__detachAndRemoveInstance(o)}__detachInstance(e){let t=this.__instances[e];const s=I(t.root);for(let i=0;i<t.children.length;i++){let r=t.children[i];s.appendChild(r)}return t}__attachInstance(e,t){let s=this.__instances[e];t.insertBefore(s.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,s){let i={};return i[this.as]=e,i[this.indexAs]=t,i[this.itemsIndexAs]=s,new this.__ctor(i)}__insertInstance(e,t,s){const i=this.__stampInstance(e,t,s);let r=this.__instances[t+1],o=r?r.children[0]:this;return I(I(this).parentNode).insertBefore(i.root,o),this.__instances[t]=i,i}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let s=e.slice(6),i=s.indexOf("."),r=i<0?s:s.substring(0,i);if(r==parseInt(r,10)){let o=i<0?"":s.substring(i+1);this.__handleObservedPaths(o);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(o?"."+o:"");l._setPendingPropertyOrPath(d,t,!1,!0),l._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return kh(this.template,e)}}customElements.define(Cr.is,Cr);/**
|
3382
|
+
* @license
|
3383
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3384
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3385
|
+
*/const Ih=n=>class extends Zi(n){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find(t=>Q(t.date,this.focusedDate))}ready(){super.ready(),K(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,s,i){const r=new Date(0,0);r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()),r.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),s&&i&&s.getMonth()===i.getMonth()&&s.getMonth()===t.getMonth()&&i.getDate()-s.getDate()>=0?!1:!Et(r,s,i)&&!Et(o,s,i)}_getTitle(t,s){if(!(t===void 0||s===void 0))return s.formatTitle(s.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300)}_dateAdd(t,s){t.setDate(t.getDate()+s)}_applyFirstDayOfWeek(t,s){if(!(t===void 0||s===void 0))return t.slice(s).concat(t.slice(0,s))}_getWeekDayNames(t,s){if(t===void 0||s===void 0)return[];const{weekdays:i,weekdaysShort:r,firstDayOfWeek:o}=t,a=this._applyFirstDayOfWeek(r,o);return this._applyFirstDayOfWeek(i,o).map((d,c)=>({weekDay:d,weekDayShort:a[c]}))}__focusedDateChanged(t,s){Array.isArray(s)&&s.some(i=>Q(i,t))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,s){return t&&s&&s.firstDayOfWeek===1}_isToday(t){return Q(new Date,t)}_getDays(t,s){if(t===void 0||s===void 0)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==s.firstDayOfWeek;)this._dateAdd(i,-1);const r=[],o=i.getMonth(),a=t.getMonth();for(;i.getMonth()===a||i.getMonth()===o;)r.push(i.getMonth()===a?new Date(i.getTime()):null),this._dateAdd(i,1);return r}_getWeeks(t){return t.reduce((s,i,r)=>(r%7===0&&s.push([]),s[s.length-1].push(i),s),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){const s=t.reduce((i,r)=>!i&&r?r:i);return hh(s)}__getDayAriaLabel(t){if(!t)return"";let s=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(s+=`, ${this.i18n.today}`),s}};/**
|
3386
|
+
* @license
|
3387
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3388
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3389
|
+
*/const Bh=kt`
|
3390
|
+
:host {
|
3391
|
+
display: block;
|
3392
|
+
}
|
3393
|
+
|
3394
|
+
#monthGrid {
|
3395
|
+
width: 100%;
|
3396
|
+
border-collapse: collapse;
|
3397
|
+
}
|
3398
|
+
|
3399
|
+
#days-container tr,
|
3400
|
+
#weekdays-container tr {
|
3401
|
+
display: flex;
|
3402
|
+
}
|
3403
|
+
|
3404
|
+
[part~='date'] {
|
3405
|
+
outline: none;
|
3406
|
+
}
|
3407
|
+
|
3408
|
+
[part~='disabled'] {
|
3409
|
+
pointer-events: none;
|
3410
|
+
}
|
3411
|
+
|
3412
|
+
[part='week-number'][hidden],
|
3413
|
+
[part='weekday'][hidden] {
|
3414
|
+
display: none;
|
3415
|
+
}
|
3416
|
+
|
3417
|
+
[part='weekday'],
|
3418
|
+
[part~='date'] {
|
3419
|
+
width: calc(100% / 7);
|
3420
|
+
padding: 0;
|
3421
|
+
font-weight: normal;
|
3422
|
+
}
|
3423
|
+
|
3424
|
+
[part='weekday']:empty,
|
3425
|
+
[part='week-number'] {
|
3426
|
+
width: 12.5%;
|
3427
|
+
flex-shrink: 0;
|
3428
|
+
padding: 0;
|
3429
|
+
}
|
3430
|
+
|
3431
|
+
:host([week-numbers]) [part='weekday']:not(:empty),
|
3432
|
+
:host([week-numbers]) [part~='date'] {
|
3433
|
+
width: 12.5%;
|
3434
|
+
}
|
3435
|
+
|
3436
|
+
@media (forced-colors: active) {
|
3437
|
+
[part~='date'][part~='focused'] {
|
3438
|
+
outline: 1px solid;
|
3439
|
+
}
|
3440
|
+
|
3441
|
+
[part~='date'][part~='selected'] {
|
3442
|
+
outline: 3px solid;
|
3443
|
+
}
|
3444
|
+
}
|
3445
|
+
`;/**
|
3446
|
+
* @license
|
3447
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3448
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3449
|
+
*/S("vaadin-month-calendar",Bh,{moduleId:"vaadin-month-calendar-styles"});class zh extends Ih($e(ae)){static get template(){return Pe`
|
3450
|
+
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
3451
|
+
<table
|
3452
|
+
id="monthGrid"
|
3453
|
+
role="grid"
|
3454
|
+
aria-labelledby="month-header"
|
3455
|
+
on-touchend="_preventDefault"
|
3456
|
+
on-touchstart="_onMonthGridTouchStart"
|
3457
|
+
>
|
3458
|
+
<thead id="weekdays-container">
|
3459
|
+
<tr role="row" part="weekdays">
|
3460
|
+
<th part="weekday" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]"></th>
|
3461
|
+
<template is="dom-repeat" items="[[_getWeekDayNames(i18n, showWeekNumbers)]]">
|
3462
|
+
<th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
|
3463
|
+
[[item.weekDayShort]]
|
3464
|
+
</th>
|
3465
|
+
</template>
|
3466
|
+
</tr>
|
3467
|
+
</thead>
|
3468
|
+
<tbody id="days-container">
|
3469
|
+
<template is="dom-repeat" items="[[_weeks]]" as="week">
|
3470
|
+
<tr role="row">
|
3471
|
+
<td part="week-number" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]">
|
3472
|
+
[[__getWeekNumber(week)]]
|
3473
|
+
</td>
|
3474
|
+
<template is="dom-repeat" items="[[week]]">
|
3475
|
+
<td
|
3476
|
+
role="gridcell"
|
3477
|
+
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate)]]"
|
3478
|
+
date="[[item]]"
|
3479
|
+
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
3480
|
+
disabled$="[[__isDayDisabled(item, minDate, maxDate)]]"
|
3481
|
+
aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
|
3482
|
+
aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate)]]"
|
3483
|
+
aria-label$="[[__getDayAriaLabel(item)]]"
|
3484
|
+
>[[_getDate(item)]]</td
|
3485
|
+
>
|
3486
|
+
</template>
|
3487
|
+
</tr>
|
3488
|
+
</template>
|
3489
|
+
</tbody>
|
3490
|
+
</table>
|
3491
|
+
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(e,t){e&&t&&t.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(e,t,s,i,r){const o=["date"];return this.__isDayDisabled(e,i,r)&&o.push("disabled"),this.__isDayFocused(e,t)&&o.push("focused"),this.__isDaySelected(e,s)&&o.push("selected"),this._isToday(e)&&o.push("today"),o.join(" ")}__isDayFocused(e,t){return Q(e,t)}__isDaySelected(e,t){return Q(e,t)}__getDayAriaSelected(e,t){if(this.__isDaySelected(e,t))return"true"}__isDayDisabled(e,t,s){return!Et(e,t,s)}__getDayAriaDisabled(e,t,s){if(!(e===void 0||t===void 0||s===void 0)&&this.__isDayDisabled(e,t,s))return"true"}__getDayTabindex(e,t){return this.__isDayFocused(e,t)?"0":"-1"}}Y(zh);/**
|
3492
|
+
* @license
|
3493
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3494
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3495
|
+
*/class Ta{constructor(e,t){this.query=e,this.callback=t,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(e){typeof this.callback=="function"&&this.callback(e.matches)}}/**
|
3496
|
+
* @license
|
3497
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3498
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3499
|
+
*/const Lh=n=>class extends n{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(t=>t.focusableDateElement).find(Boolean)}_addListeners(){Qo(this.$.scrollers,"pan-y"),K(this.$.scrollers,"track",this._track.bind(this)),K(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),K(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),K(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Ta(this._desktopMediaQuery,t=>{this._desktopMode=t})),this.addController(new me(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",s=>this.__onTodayButtonKeyDown(s)),K(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new me(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",s=>this.__onCancelButtonKeyDown(s)),K(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,s){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,s),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new me(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),t.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),t.addEventListener("keydown",s=>{this.__onMonthCalendarKeyDown(s)}),t.addEventListener("init-done",()=>{const s=[...this.querySelectorAll("vaadin-month-calendar")];s.forEach(i=>{i.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value})}),this.calendars=s}),this._monthScroller=t}}))}__initYearScroller(){this.addController(new me(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),K(t,"tap",s=>{this._onYearTap(s)}),t.addEventListener("custom-scroll",()=>{this._onYearScroll()}),t.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),t.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=t}}))}__updateCancelButton(t,s){t&&(t.textContent=s&&s.cancel)}__updateTodayButton(t,s,i,r){t&&(t.textContent=s&&s.today,t.disabled=!this._isTodayAllowed(i,r))}__updateCalendars(t,s,i,r,o,a,l,d,c){t&&t.length&&t.forEach(h=>{h.i18n=s,h.minDate=i,h.maxDate=r,h.focusedDate=a,h.selectedDate=o,h.showWeekNumbers=l,h.ignoreTaps=d,c?h.setAttribute("theme",c):h.removeAttribute("theme")})}__updateYears(t,s,i){t&&t.length&&t.forEach(r=>{r.selectedDate=s,i?r.setAttribute("theme",i):r.removeAttribute("theme")})}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,s=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(t);this._scrollToPosition(i+d,s);return}const r=this._monthScroller.position>i,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<i;r?this._scrollToPosition(i,s):l&&this._scrollToPosition(i-a+1,s)}_calculateWeekScrollOffset(t){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);let i=0;for(;s.getDate()<t.getDate();)s.setDate(s.getDate()+1),s.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=vt.debounce(this._debouncer,Zt.after(300),()=>{this._ignoreTaps=!1})}_formatDisplayed(t,s,i){return t&&s&&typeof s.formatDate=="function"?s.formatDate(wa(t)):i}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const i=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+i*12,!0)}}_scrollToPosition(t,s){if(this._targetPosition!==void 0){this._targetPosition=t;return}if(!s){this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=t;let i;this._revealPromise=new Promise(d=>{i=d});const r=(d,c,h,p)=>(d/=p/2,d<1?h/2*d*d+c:(d-=1,-h/2*(d*(d-2)-1)+c));let o=0;const a=this._monthScroller.position,l=d=>{o||(o=d);const c=d-o;if(c<this.scrollDuration){const h=r(c,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=h,window.requestAnimationFrame(l)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(l)}_limit(t,s){return Math.min(s.max,Math.max(s.min,t))}_handleTrack(t){if(Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10)return;Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const s=this._translateX+t.detail.ddx;this._translateX=this._limit(s,{min:0,max:this._yearScrollerWidth})}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return Aa(t).getFullYear()}_differenceInMonths(t,s){return(t.getFullYear()-s.getFullYear())*12-s.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Q(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let s=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),s=!0;break;case"ArrowUp":this._moveFocusByDays(-7),s=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),s=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),s=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),s=!0;break;case" ":this.__toggleDate(this.focusedDate),s=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),s=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),s=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),s=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),s=!0;break;case"Tab":this._onTabKeyDown(t,"calendar");break}s&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,s){switch(t.stopPropagation(),s){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(t){t.key==="Tab"&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){t.key==="Tab"&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const s=this.focusableDateElement;s&&Q(s.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,s.focus())}}focusDate(t,s){return ue(this,null,function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,s||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)})}focusDateElement(t=!0){return ue(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(s=>{da(this,()=>{Pa(),s()})})),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()})}_focusClosestDate(t){this.focusDate(va(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,s,i){this._dateAllowed(t)?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?s>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,s){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),s&&i.setDate(this.focusedDate.getDate()+s),i}_moveFocusByDays(t){const s=this._getDateDiff(0,t);this._focusAllowedDate(s,t,!1)}_moveFocusByMonths(t){const s=this._getDateDiff(t),i=s.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),s.setDate(this._focusedMonthDate),s.getMonth()!==i&&s.setDate(0),this._focusAllowedDate(s,t,!0)}_moveFocusInsideMonth(t,s){const i=new Date(0,0);i.setFullYear(t.getFullYear()),s==="minDate"?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[s]):this._focusClosestDate(t)}_dateAllowed(t,s=this.minDate,i=this.maxDate){return(!s||t>=s)&&(!i||t<=i)}_isTodayAllowed(t,s){const i=new Date,r=new Date(0,0);return r.setFullYear(i.getFullYear()),r.setMonth(i.getMonth()),r.setDate(i.getDate()),this._dateAllowed(r,t,s)}};/**
|
3500
|
+
* @license
|
3501
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3502
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3503
|
+
*/const Hh=kt`
|
3504
|
+
:host {
|
3505
|
+
display: flex;
|
3506
|
+
flex-direction: column;
|
3507
|
+
height: 100%;
|
3508
|
+
width: 100%;
|
3509
|
+
outline: none;
|
3510
|
+
}
|
3511
|
+
|
3512
|
+
[part='overlay-header'] {
|
3513
|
+
display: flex;
|
3514
|
+
flex-shrink: 0;
|
3515
|
+
flex-wrap: nowrap;
|
3516
|
+
align-items: center;
|
3517
|
+
}
|
3518
|
+
|
3519
|
+
:host(:not([fullscreen])) [part='overlay-header'] {
|
3520
|
+
display: none;
|
3521
|
+
}
|
3522
|
+
|
3523
|
+
[part='label'] {
|
3524
|
+
flex-grow: 1;
|
3525
|
+
}
|
3526
|
+
|
3527
|
+
[hidden] {
|
3528
|
+
display: none !important;
|
3529
|
+
}
|
3530
|
+
|
3531
|
+
[part='years-toggle-button'] {
|
3532
|
+
display: flex;
|
3533
|
+
}
|
3534
|
+
|
3535
|
+
#scrollers {
|
3536
|
+
display: flex;
|
3537
|
+
height: 100%;
|
3538
|
+
width: 100%;
|
3539
|
+
position: relative;
|
3540
|
+
overflow: hidden;
|
3541
|
+
}
|
3542
|
+
|
3543
|
+
:host([desktop]) ::slotted([slot='months']) {
|
3544
|
+
right: 50px;
|
3545
|
+
transform: none !important;
|
3546
|
+
}
|
3547
|
+
|
3548
|
+
:host([desktop]) ::slotted([slot='years']) {
|
3549
|
+
transform: none !important;
|
3550
|
+
}
|
3551
|
+
|
3552
|
+
:host(.animate) ::slotted([slot='months']),
|
3553
|
+
:host(.animate) ::slotted([slot='years']) {
|
3554
|
+
transition: all 200ms;
|
3555
|
+
}
|
3556
|
+
|
3557
|
+
[part='toolbar'] {
|
3558
|
+
display: flex;
|
3559
|
+
justify-content: space-between;
|
3560
|
+
z-index: 2;
|
3561
|
+
flex-shrink: 0;
|
3562
|
+
}
|
3563
|
+
`;/**
|
3564
|
+
* @license
|
3565
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3566
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3567
|
+
*/S("vaadin-date-picker-overlay-content",Hh,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Rh extends Lh(Xe($e(ds(ae)))){static get template(){return Pe`
|
3568
|
+
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
3569
|
+
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
3570
|
+
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
3571
|
+
<div part="toggle-button"></div>
|
3572
|
+
|
3573
|
+
<div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
|
3574
|
+
[[_yearAfterXMonths(_visibleMonthIndex)]]
|
3575
|
+
</div>
|
3576
|
+
</div>
|
3577
|
+
|
3578
|
+
<div id="scrollers">
|
3579
|
+
<slot name="months"></slot>
|
3580
|
+
<slot name="years"></slot>
|
3581
|
+
</div>
|
3582
|
+
|
3583
|
+
<div on-touchend="_preventDefault" role="toolbar" part="toolbar">
|
3584
|
+
<slot name="today-button"></slot>
|
3585
|
+
<slot name="cancel-button"></slot>
|
3586
|
+
</div>
|
3587
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}Y(Rh);/**
|
3588
|
+
* @license
|
3589
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3590
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3591
|
+
*/const ka=P(n=>class extends Zi(sa(n)){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,s){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):s&&this._removeFocusListeners(s)}_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,s){super._disabledChanged(t,s),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){t!==void 0&&this.focusElement&&(this.focusElement.tabIndex=t,t!==-1&&(this.tabindex=void 0)),this.disabled&&t&&(t!==-1&&(this._lastTabIndex=t),this.tabindex=void 0)}});/**
|
3592
|
+
* @license
|
3593
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3594
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3595
|
+
*/const qs=new WeakMap;function Fh(n){return qs.has(n)||qs.set(n,new Set),qs.get(n)}function Uh(n,e){const t=document.createElement("style");t.textContent=n,e===document?document.head.appendChild(t):e.insertBefore(t,e.firstChild)}const Vh=P(n=>class extends n{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),s=Fh(t);this.slotStyles.forEach(i=>{s.has(i)||(Uh(i,t),s.add(i))})}});/**
|
3596
|
+
* @license
|
3597
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3598
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3599
|
+
*/const Da=P(n=>class extends n{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 this.value!=null&&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)}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=t!=null?t:"")}_inputElementChanged(t,s){t?this._addInputListeners(t):s&&this._removeInputListeners(s)}_hasInputValueChanged(t,s){(t||s)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const s=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=s.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,s){this._toggleHasValue(this._hasValue),!(t===""&&s===void 0)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const s=t.composedPath()[0];this._hasInputValue=s.value.length>0}});/**
|
3600
|
+
* @license
|
3601
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3602
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3603
|
+
*/const jh=n=>class extends Da(hs(n)){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(),Mc||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};/**
|
3604
|
+
* @license
|
3605
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
3606
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3607
|
+
*/const Ks=new Map;function on(n){return Ks.has(n)||Ks.set(n,new WeakMap),Ks.get(n)}function Oa(n,e){n&&n.removeAttribute(e)}function Ma(n,e){if(!n||!e)return;const t=on(e);if(t.has(n))return;const s=Vi(n.getAttribute(e));t.set(n,new Set(s))}function Yh(n,e){if(!n)return;const t=on(e),s=t.get(n);!s||s.size===0?n.removeAttribute(e):Ho(n,e,us(s)),t.delete(n)}function Gs(n,e,t={newId:null,oldId:null,fromUser:!1}){if(!n||!e)return;const{newId:s,oldId:i,fromUser:r}=t,o=on(e),a=o.get(n);if(!r&&a){i&&a.delete(i),s&&a.add(s);return}r&&(a?s||o.delete(n):Ma(n,e),Oa(n,e)),Tu(n,e,i);const l=s||us(a);l&&Ho(n,e,l)}function Wh(n,e){Ma(n,e),Oa(n,e)}/**
|
3608
|
+
* @license
|
3609
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3610
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3611
|
+
*/class qh{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const s=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,s,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){this.__target&&(e?(Wh(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(Yh(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,s){Gs(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:s})}__setErrorIdToAriaAttribute(e,t){Gs(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){Gs(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}/**
|
3612
|
+
* @license
|
3613
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
3614
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3615
|
+
*/class an extends me{constructor(e,t,s,i={}){super(e,t,s,bs(ys({},i),{useUniqueId:!0}))}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(t=>{t.forEach(s=>{const i=s.target,r=i===this.node;s.type==="attributes"?r&&this.__updateNodeId(i):(r||i.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return e?e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&e.textContent.trim()!=="":!1}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType===Node.ELEMENT_NODE&&(!this.multiple||t)&&!e.id&&(e.id=this.defaultId)}}/**
|
3616
|
+
* @license
|
3617
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3618
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3619
|
+
*/class Kh extends an{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:s}=this,i=!!(s&&t&&t.trim()!=="");e&&(e.textContent=i?t:"",e.hidden=!i,i?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}/**
|
3620
|
+
* @license
|
3621
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3622
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3623
|
+
*/class Gh extends an{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&e.trim()!==""){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}/**
|
3624
|
+
* @license
|
3625
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3626
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3627
|
+
*/class Jh extends an{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&e.trim()!==""){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}/**
|
3628
|
+
* @license
|
3629
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3630
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3631
|
+
*/const Xh=P(n=>class extends Xe(n){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Jh(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)}});/**
|
3632
|
+
* @license
|
3633
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3634
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3635
|
+
*/const Na=P(n=>class extends n{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,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}});/**
|
3636
|
+
* @license
|
3637
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3638
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3639
|
+
*/const Zh=n=>class extends Na(Xh(Xe(n))){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 qh(this),this._helperController=new Gh(this),this._errorController=new Kh(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:s,node:i}=t.detail;this.__labelChanged(s,i)}),this._helperController.addEventListener("slot-content-changed",t=>{const{hasContent:s,node:i}=t.detail;this.toggleAttribute("has-helper",s),this.__helperChanged(s,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,s){t?this._fieldAriaController.setHelperId(s.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,s){t?this._fieldAriaController.setLabelId(s.id):this._fieldAriaController.setLabelId(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 s=this._errorNode;this._fieldAriaController.setErrorId(s&&s.id)}else this._fieldAriaController.setErrorId(null)})}};/**
|
3640
|
+
* @license
|
3641
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3642
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3643
|
+
*/const Qh=P(n=>class extends n{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((s,i)=>{this._delegateAttribute(s,t[i])})}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach((s,i)=>{this._delegateProperty(s,t[i])})}_delegateAttribute(t,s){this.stateTarget&&(t==="invalid"&&this._delegateAttribute("aria-invalid",s?"true":!1),typeof s=="boolean"?this.stateTarget.toggleAttribute(t,s):s?this.stateTarget.setAttribute(t,s):this.stateTarget.removeAttribute(t))}_delegateProperty(t,s){this.stateTarget&&(this.stateTarget[t]=s)}});/**
|
3644
|
+
* @license
|
3645
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3646
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3647
|
+
*/const Ia=P(n=>class extends Qh(Na(Da(n))){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(s=>this.__isValidConstraint(s))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...s){if(!t)return;const i=this._hasValidConstraints(s),r=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||t===0}});/**
|
3648
|
+
* @license
|
3649
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3650
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3651
|
+
*/const ep=n=>class extends Vh(ka(Ia(Zh(jh(hs(n)))))){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[`
|
3652
|
+
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
3653
|
+
font: inherit;
|
3654
|
+
color: inherit;
|
3655
|
+
}
|
3656
|
+
`]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_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.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=vt.debounce(this._preventInputDebouncer,Zt.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||t.key.length!==1||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const s=t.clipboardData.getData("text");this.__allowedTextRegExp.test(s)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const s=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(s)||(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(s){console.error(s)}}};/**
|
3657
|
+
* @license
|
3658
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3659
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3660
|
+
*/class tp extends me{constructor(e,t){super(e,"input","input",{initializer:(s,i)=>{i.value&&(s.value=i.value),i.type&&s.setAttribute("type",i.type),s.id=this.defaultId,typeof t=="function"&&t(s)},useUniqueId:!0})}}/**
|
3661
|
+
* @license
|
3662
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3663
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3664
|
+
*/class sp{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",s=>{this.__initLabel(s.detail.node)}),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}/**
|
3665
|
+
* @license
|
3666
|
+
* Copyright 2019 Google LLC
|
3667
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3668
|
+
*/const Yt=window,ln=Yt.ShadowRoot&&(Yt.ShadyCSS===void 0||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dn=Symbol(),Er=new WeakMap;let Ba=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==dn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(ln&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Er.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Er.set(t,e))}return e}toString(){return this.cssText}};const ip=n=>new Ba(typeof n=="string"?n:n+"",void 0,dn),un=(n,...e)=>{const t=n.length===1?n[0]:e.reduce((s,i,r)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[r+1],n[0]);return new Ba(t,n,dn)},np=(n,e)=>{ln?n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const s=document.createElement("style"),i=Yt.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,n.appendChild(s)})},$r=ln?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ip(t)})(n):n;/**
|
3669
|
+
* @license
|
3670
|
+
* Copyright 2017 Google LLC
|
3671
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3672
|
+
*/var Js;const ns=window,Sr=ns.trustedTypes,rp=Sr?Sr.emptyScript:"",Pr=ns.reactiveElementPolyfillSupport,Di={toAttribute(n,e){switch(e){case Boolean:n=n?rp:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch(s){t=null}}return t}},za=(n,e)=>e!==n&&(e==e||n==n),Xs={attribute:!0,type:String,converter:Di,reflect:!1,hasChanged:za},Oi="finalized";let Ie=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,s)=>{const i=this._$Ep(s,t);i!==void 0&&(this._$Ev.set(i,s),e.push(i))}),e}static createProperty(e,t=Xs){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const s=typeof e=="symbol"?Symbol():"__"+e,i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Xs}static finalize(){if(this.hasOwnProperty(Oi))return!1;this[Oi]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,s=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of s)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift($r(i))}else e!==void 0&&t.push($r(e));return t}static _$Ep(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,s;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((s=e.hostConnected)===null||s===void 0||s.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return np(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostConnected)===null||s===void 0?void 0:s.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var s;return(s=t.hostDisconnected)===null||s===void 0?void 0:s.call(t)})}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$EO(e,t,s=Xs){var i;const r=this.constructor._$Ep(e,s);if(r!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:Di).toAttribute(t,s.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var s;const i=this.constructor,r=i._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=i.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:Di;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,s){let i=!0;e!==void 0&&(((s=s||this.constructor.getPropertyOptions(e)).hasChanged||za)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),s.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,r)=>this[r]=i),this._$Ei=void 0);let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(e=this._$ES)===null||e===void 0||e.forEach(i=>{var r;return(r=i.hostUpdate)===null||r===void 0?void 0:r.call(i)}),this.update(s)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(s)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,s)=>this._$EO(s,this[s],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Ie[Oi]=!0,Ie.elementProperties=new Map,Ie.elementStyles=[],Ie.shadowRootOptions={mode:"open"},Pr==null||Pr({ReactiveElement:Ie}),((Js=ns.reactiveElementVersions)!==null&&Js!==void 0?Js:ns.reactiveElementVersions=[]).push("1.6.3");/**
|
3673
|
+
* @license
|
3674
|
+
* Copyright 2017 Google LLC
|
3675
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3676
|
+
*/var Zs;const rs=window,qe=rs.trustedTypes,Tr=qe?qe.createPolicy("lit-html",{createHTML:n=>n}):void 0,Mi="$lit$",ne=`lit$${(Math.random()+"").slice(9)}$`,La="?"+ne,op=`<${La}>`,Ee=document,St=()=>Ee.createComment(""),Pt=n=>n===null||typeof n!="object"&&typeof n!="function",Ha=Array.isArray,ap=n=>Ha(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Qs=`[
|
3677
|
+
\f\r]`,at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kr=/-->/g,Dr=/>/g,fe=RegExp(`>|${Qs}(?:([^\\s"'>=/]+)(${Qs}*=${Qs}*(?:[^
|
3678
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Or=/'/g,Mr=/"/g,Ra=/^(?:script|style|textarea|title)$/i,Ke=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Nr=new WeakMap,ve=Ee.createTreeWalker(Ee,129,null,!1);function Fa(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Tr!==void 0?Tr.createHTML(e):e}const lp=(n,e)=>{const t=n.length-1,s=[];let i,r=e===2?"<svg>":"",o=at;for(let a=0;a<t;a++){const l=n[a];let d,c,h=-1,p=0;for(;p<l.length&&(o.lastIndex=p,c=o.exec(l),c!==null);)p=o.lastIndex,o===at?c[1]==="!--"?o=kr:c[1]!==void 0?o=Dr:c[2]!==void 0?(Ra.test(c[2])&&(i=RegExp("</"+c[2],"g")),o=fe):c[3]!==void 0&&(o=fe):o===fe?c[0]===">"?(o=i!=null?i:at,h=-1):c[1]===void 0?h=-2:(h=o.lastIndex-c[2].length,d=c[1],o=c[3]===void 0?fe:c[3]==='"'?Mr:Or):o===Mr||o===Or?o=fe:o===kr||o===Dr?o=at:(o=fe,i=void 0);const f=o===fe&&n[a+1].startsWith("/>")?" ":"";r+=o===at?l+op:h>=0?(s.push(d),l.slice(0,h)+Mi+l.slice(h)+ne+f):l+ne+(h===-2?(s.push(void 0),a):f)}return[Fa(n,r+(n[t]||"<?>")+(e===2?"</svg>":"")),s]};class Tt{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,c]=lp(e,t);if(this.el=Tt.createElement(d,s),ve.currentNode=this.el.content,t===2){const h=this.el.content,p=h.firstChild;p.remove(),h.append(...p.childNodes)}for(;(i=ve.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes()){const h=[];for(const p of i.getAttributeNames())if(p.endsWith(Mi)||p.startsWith(ne)){const f=c[o++];if(h.push(p),f!==void 0){const _=i.getAttribute(f.toLowerCase()+Mi).split(ne),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:g[2],strings:_,ctor:g[1]==="."?up:g[1]==="?"?hp:g[1]==="@"?pp:_s})}else l.push({type:6,index:r})}for(const p of h)i.removeAttribute(p)}if(Ra.test(i.tagName)){const h=i.textContent.split(ne),p=h.length-1;if(p>0){i.textContent=qe?qe.emptyScript:"";for(let f=0;f<p;f++)i.append(h[f],St()),ve.nextNode(),l.push({type:2,index:++r});i.append(h[p],St())}}}else if(i.nodeType===8)if(i.data===La)l.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(ne,h+1))!==-1;)l.push({type:7,index:r}),h+=ne.length-1}r++}}static createElement(e,t){const s=Ee.createElement("template");return s.innerHTML=e,s}}function Ge(n,e,t=n,s){var i,r,o,a;if(e===Ke)return e;let l=s!==void 0?(i=t._$Co)===null||i===void 0?void 0:i[s]:t._$Cl;const d=Pt(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==d&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),d===void 0?l=void 0:(l=new d(n),l._$AT(n,t,s)),s!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[s]=l:t._$Cl=l),l!==void 0&&(e=Ge(n,l._$AS(n,e.values),l,s)),e}class dp{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:s},parts:i}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:Ee).importNode(s,!0);ve.currentNode=r;let o=ve.nextNode(),a=0,l=0,d=i[0];for(;d!==void 0;){if(a===d.index){let c;d.type===2?c=new Dt(o,o.nextSibling,this,e):d.type===1?c=new d.ctor(o,d.name,d.strings,this,e):d.type===6&&(c=new fp(o,this,e)),this._$AV.push(c),d=i[++l]}a!==(d==null?void 0:d.index)&&(o=ve.nextNode(),a++)}return ve.currentNode=Ee,r}v(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class Dt{constructor(e,t,s,i){var r;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cp=(r=i==null?void 0:i.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ge(this,e,t),Pt(e)?e===M||e==null||e===""?(this._$AH!==M&&this._$AR(),this._$AH=M):e!==this._$AH&&e!==Ke&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):ap(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==M&&Pt(this._$AH)?this._$AA.nextSibling.data=e:this.$(Ee.createTextNode(e)),this._$AH=e}g(e){var t;const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Tt.createElement(Fa(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(s);else{const o=new dp(r,this),a=o.u(this.options);o.v(s),this.$(a),this._$AH=o}}_$AC(e){let t=Nr.get(e.strings);return t===void 0&&Nr.set(e.strings,t=new Tt(e)),t}T(e){Ha(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const r of e)i===t.length?t.push(s=new Dt(this.k(St()),this.k(St()),this,this.options)):s=t[i],s._$AI(r),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class _s{constructor(e,t,s,i,r){this.type=1,this._$AH=M,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const r=this.strings;let o=!1;if(r===void 0)e=Ge(this,e,t,0),o=!Pt(e)||e!==this._$AH&&e!==Ke,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=Ge(this,a[s+l],t,l),d===Ke&&(d=this._$AH[l]),o||(o=!Pt(d)||d!==this._$AH[l]),d===M?e=M:e!==M&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!i&&this.j(e)}j(e){e===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class up extends _s{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===M?void 0:e}}const cp=qe?qe.emptyScript:"";class hp extends _s{constructor(){super(...arguments),this.type=4}j(e){e&&e!==M?this.element.setAttribute(this.name,cp):this.element.removeAttribute(this.name)}}class pp extends _s{constructor(e,t,s,i,r){super(e,t,s,i,r),this.type=5}_$AI(e,t=this){var s;if((e=(s=Ge(this,e,t,0))!==null&&s!==void 0?s:M)===Ke)return;const i=this._$AH,r=e===M&&i!==M||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==M&&(i===M||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;typeof this._$AH=="function"?this._$AH.call((s=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&s!==void 0?s:this.element,e):this._$AH.handleEvent(e)}}class fp{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){Ge(this,e)}}const Ir=rs.litHtmlPolyfillSupport;Ir==null||Ir(Tt,Dt),((Zs=rs.litHtmlVersions)!==null&&Zs!==void 0?Zs:rs.litHtmlVersions=[]).push("2.8.0");const _p=(n,e,t)=>{var s,i;const r=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:e;let o=r._$litPart$;if(o===void 0){const a=(i=t==null?void 0:t.renderBefore)!==null&&i!==void 0?i:null;r._$litPart$=o=new Dt(e.insertBefore(St(),a),a,void 0,t!=null?t:{})}return o._$AI(n),o};/**
|
3679
|
+
* @license
|
3680
|
+
* Copyright 2017 Google LLC
|
3681
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
3682
|
+
*/var ei,ti;class Wt extends Ie{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const s=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=s.firstChild),s}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=_p(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Ke}}Wt.finalized=!0,Wt._$litElement$=!0,(ei=globalThis.litElementHydrateSupport)===null||ei===void 0||ei.call(globalThis,{LitElement:Wt});const Br=globalThis.litElementPolyfillSupport;Br==null||Br({LitElement:Wt});((ti=globalThis.litElementVersions)!==null&&ti!==void 0?ti:globalThis.litElementVersions=[]).push("3.3.3");/**
|
3683
|
+
* @license
|
3684
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
3685
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3686
|
+
*/const mp=un`
|
3687
|
+
[part='clear-button'] {
|
3688
|
+
display: none;
|
3689
|
+
cursor: default;
|
3690
|
+
}
|
3691
|
+
|
3692
|
+
[part='clear-button']::before {
|
3693
|
+
content: '\\2715';
|
3694
|
+
}
|
3695
|
+
|
3696
|
+
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
3697
|
+
display: block;
|
3698
|
+
}
|
3699
|
+
`;/**
|
3700
|
+
* @license
|
3701
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
3702
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3703
|
+
*/const gp=un`
|
3704
|
+
:host {
|
3705
|
+
display: inline-flex;
|
3706
|
+
outline: none;
|
3707
|
+
}
|
3708
|
+
|
3709
|
+
:host::before {
|
3710
|
+
content: '\\2003';
|
3711
|
+
width: 0;
|
3712
|
+
display: inline-block;
|
3713
|
+
/* Size and position this element on the same vertical position as the input-field element
|
3714
|
+
to make vertical align for the host element work as expected */
|
3715
|
+
}
|
3716
|
+
|
3717
|
+
:host([hidden]) {
|
3718
|
+
display: none !important;
|
3719
|
+
}
|
3720
|
+
|
3721
|
+
:host(:not([has-label])) [part='label'] {
|
3722
|
+
display: none;
|
3723
|
+
}
|
3724
|
+
|
3725
|
+
@media (forced-colors: active) {
|
3726
|
+
:host(:not([readonly])) [part='input-field'] {
|
3727
|
+
outline: 1px solid;
|
3728
|
+
outline-offset: -1px;
|
3729
|
+
}
|
3730
|
+
:host([focused]) [part='input-field'] {
|
3731
|
+
outline-width: 2px;
|
3732
|
+
}
|
3733
|
+
:host([disabled]) [part='input-field'] {
|
3734
|
+
outline-color: GrayText;
|
3735
|
+
}
|
3736
|
+
}
|
3737
|
+
`;/**
|
3738
|
+
* @license
|
3739
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
3740
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3741
|
+
*/const yp=un`
|
3742
|
+
[class$='container'] {
|
3743
|
+
display: flex;
|
3744
|
+
flex-direction: column;
|
3745
|
+
min-width: 100%;
|
3746
|
+
max-width: 100%;
|
3747
|
+
width: var(--vaadin-field-default-width, 12em);
|
3748
|
+
}
|
3749
|
+
`;/**
|
3750
|
+
* @license
|
3751
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
3752
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3753
|
+
*/const bp=[gp,yp,mp];/**
|
3754
|
+
* @license
|
3755
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
3756
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3757
|
+
*/const vp=n=>class extends n{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,s){if(!s||t===void 0)return;const{classList:i}=s;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const o=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));o.length>0&&i.remove(...o)}const r=typeof t=="string"?t.split(" "):[];r.length>0&&i.add(...r),this.__previousClasses=r}};/**
|
3758
|
+
* @license
|
3759
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
3760
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3761
|
+
*/class wp{constructor(e){this.host=e,e.addEventListener("opened-changed",()=>{e.opened||this.__setVirtualKeyboardEnabled(!1)}),e.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),e.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0))}__setVirtualKeyboardEnabled(e){this.host.inputElement&&(this.host.inputElement.inputMode=e?"":"none")}}/**
|
3762
|
+
* @license
|
3763
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3764
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3765
|
+
*/const Ap=n=>class extends vp(Xe(ka(Ia(hs(n))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const s=String(t.year).replace(/\d+/u,i=>"0000".substr(i.length)+i);return[t.month+1,t.day,s].join("/")},parseDate(t){const s=t.split("/"),i=new Date;let r,o=i.getMonth(),a=i.getFullYear();if(s.length===3){if(o=parseInt(s[0])-1,r=parseInt(s[1]),a=parseInt(s[2]),s[2].length<3&&a>=0){const l=this.referenceDate?ot(this.referenceDate):new Date;a=ph(l,a,o,r)}}else s.length===2?(o=parseInt(s[0])-1,r=parseInt(s[1])):s.length===1&&(r=parseInt(s[0]));if(r!==void 0)return{day:r,month:o,year:a}},formatTitle:(t,s)=>`${t} ${s}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ua},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ta(this._fullscreenMediaQuery,s=>{this._fullscreen=s})),this.addController(new wp(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",()=>this.__bringToFront()),this.addEventListener("touchstart",()=>this.__bringToFront())}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const s=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(s),this._overlayContent=s,s.addEventListener("close",()=>{this._close()}),s.addEventListener("focus-input",this._focusAndSelect.bind(this)),s.addEventListener("date-tap",i=>{this.__userConfirmedDate=!0,this._selectDate(i.detail.date),this._close()}),s.addEventListener("date-selected",i=>{this.__userConfirmedDate=!!i.detail.date,this._selectDate(i.detail.date)}),s.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),s.addEventListener("focused-date-changed",i=>{this._focusedDate=i.detail.value})}__parseDate(t){if(!this.i18n.parseDate)return;let s=this.i18n.parseDate(t);if(s&&(s=ot(`${s.year}-${s.month+1}-${s.day}`)),s&&!isNaN(s.getTime()))return s}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(wa(t))}checkValidity(){const t=this._inputElementValue,s=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Et(this._selectedDate,this._minDate,this._maxDate);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),s&&i&&r}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(t){const s=this.value;this._selectedDate=t,s!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront()})}_isNoInput(t,s,i,r,o,a){return!t||s&&(!a||o)||i&&o||!r.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const s=(c,h="00")=>(h+c).substr((h+c).length-h.length);let i="",r="0000",o=t.getFullYear();o<0?(o=-o,i="-",r="000000"):t.getFullYear()>=1e4&&(i="+",r="000000");const a=i+s(o,r),l=s(t.getMonth()+1),d=s(t.getDate());return[a,l,d].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,s){t===void 0||s===void 0||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,s){t===void 0||s===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,s){const i=ot(t);if(t&&!i){this.value=s;return}t?Q(this._selectedDate,i)||(this._selectedDate=i,s!==void 0&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)}__updateOverlayContent(t,s,i,r,o,a,l,d){t&&(t.i18n=s,t.label=i,t.minDate=r,t.maxDate=o,t.focusedDate=a,t.selectedDate=l,t.showWeekNumbers=d)}__updateOverlayContentTheme(t,s){t&&(s?t.setAttribute("theme",s):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,s){t&&t.toggleAttribute("fullscreen",s)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const t=this._overlayContent;t.reset();const s=this._getInitialPosition();t.initialPosition=s;const i=t.focusedDate||s;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const o=this._noInput?t:[r,t];this.__showOthers=ca(o)}_getInitialPosition(){const t=ot(this.initialPosition),s=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Et(s,this._minDate,this._maxDate)?s:va(s,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this._inputElementValue||"",s=this.__parseDate(t);s?this._selectDate(s):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,s){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,s)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&[9].indexOf(t.keyCode)===-1&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(t){const s=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),s===this.value&&this.validate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value){t.stopPropagation(),this._onClearButtonClick(t);return}this.autoOpenDisabled?(this.inputElement.value===""&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate())}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Q(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ot(t)}};/**
|
3766
|
+
* @license
|
3767
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3768
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3769
|
+
*/const xp=kt`
|
3770
|
+
:host([opened]) {
|
3771
|
+
pointer-events: auto;
|
3772
|
+
}
|
3773
|
+
|
3774
|
+
:host([dir='rtl']) [part='input-field'] {
|
3775
|
+
direction: ltr;
|
3776
|
+
}
|
3777
|
+
|
3778
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
3779
|
+
direction: rtl;
|
3780
|
+
text-align: left;
|
3781
|
+
}
|
3782
|
+
`;/**
|
3783
|
+
* @license
|
3784
|
+
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
3785
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
3786
|
+
*/S("vaadin-date-picker",[bp,xp],{moduleId:"vaadin-date-picker-styles"});class Cp extends Ap(ep($e(Lo(ae)))){static get is(){return"vaadin-date-picker"}static get template(){return Pe`
|
3787
|
+
<div class="vaadin-date-picker-container">
|
3788
|
+
<div part="label">
|
3789
|
+
<slot name="label"></slot>
|
3790
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
3791
|
+
</div>
|
3792
|
+
|
3793
|
+
<vaadin-input-container
|
3794
|
+
part="input-field"
|
3795
|
+
readonly="[[readonly]]"
|
3796
|
+
disabled="[[disabled]]"
|
3797
|
+
invalid="[[invalid]]"
|
3798
|
+
theme$="[[_theme]]"
|
3799
|
+
>
|
3800
|
+
<slot name="prefix" slot="prefix"></slot>
|
3801
|
+
<slot name="input"></slot>
|
3802
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
3803
|
+
<div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
|
3804
|
+
</vaadin-input-container>
|
3805
|
+
|
3806
|
+
<div part="helper-text">
|
3807
|
+
<slot name="helper"></slot>
|
3808
|
+
</div>
|
3809
|
+
|
3810
|
+
<div part="error-message">
|
3811
|
+
<slot name="error-message"></slot>
|
3812
|
+
</div>
|
3813
|
+
</div>
|
3814
|
+
|
3815
|
+
<vaadin-date-picker-overlay
|
3816
|
+
id="overlay"
|
3817
|
+
fullscreen$="[[_fullscreen]]"
|
3818
|
+
theme$="[[_theme]]"
|
3819
|
+
opened="{{opened}}"
|
3820
|
+
on-vaadin-overlay-escape-press="_onOverlayEscapePress"
|
3821
|
+
on-vaadin-overlay-open="_onOverlayOpened"
|
3822
|
+
on-vaadin-overlay-closing="_onOverlayClosed"
|
3823
|
+
restore-focus-on-close
|
3824
|
+
restore-focus-node="[[inputElement]]"
|
3825
|
+
></vaadin-date-picker-overlay>
|
3826
|
+
|
3827
|
+
<slot name="tooltip"></slot>
|
3828
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new tp(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t})),this.addController(new sp(this.inputElement,this._labelController)),this._tooltipController=new Fo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",t=>t.preventDefault()),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(e){e.detail.sourceEvent&&e.detail.sourceEvent.composedPath().includes(this)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(e){super._openedChanged(e),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}Y(Cp);function zr(n,e){u.addMessages(n,e)}function Ep(n){u.$locale.set(n)}const Lr={en:{titleBonusesHistory:"Bonus History",dateFrom:"From:",dateTo:"To:",dateFilter:"Filter",noBonusHistory:"You have no bonuses for the selected period."},"zh-hk":{titleBonusesHistory:"獎金歷史",dateFrom:"從:",dateTo:"至:",dateFilter:"篩選",noBonusHistory:"您目前沒有獎金歷史。"},fr:{titleBonusesHistory:"Historique du bonus",dateFrom:"De:",dateTo:"A:",dateFilter:"Filtre",noBonusHistory:"Vous n'avez pas d'historique de bonus pour le moment."},ro:{titleBonusesHistory:"Istoric bonusuri",dateFrom:"De la",dateTo:"La",dateFilter:"Filtru",noBonusHistory:"Nu ai bonusuri pentru perioada selectata."},es:{titleBonusesHistory:"Historial de Bonos",dateFrom:"Desde:",dateTo:"A:",dateFilter:"Filtro",noBonusHistory:"No tiene Bonos para el periodo seleccionado."},pt:{titleBonusesHistory:"Histórico de bônus",dateFrom:"A partir de:",dateTo:"Para:",dateFilter:"Filtro:",noBonusHistory:"Você não tem histórico de bônus no momento."},hr:{titleBonusesHistory:"Povijest bonusa",dateFrom:"Od:",dateTo:"Do:",dateFilter:"Filter",noBonusHistory:"Nemate bonusa u povijesti."},"pt-br":{titleBonusesHistory:"Histórico de bônus",dateFrom:"De:",dateTo:"PARA:",dateFilter:"Filtro",noBonusHistory:"Não há bônus para o período selecionado"},"es-mx":{titleBonusesHistory:"Historial de bonos",dateFrom:"De:",dateTo:"A:",dateFilter:"Filtro",noBonusHistory:"No tiene bonus para el periodo seleccionado"},tr:{titleBonusesHistory:"Bonus Geçmişi",dateFrom:"İtibaren:",dateTo:"İle:",dateFilter:"Filtre",noBonusHistory:"Seçilen dönem için bonusunuz yok."},"en-us":{titleBonusesHistory:"Bonus History",dateFrom:"From:",dateTo:"To:",dateFilter:"Filter",noBonusHistory:"You have no bonuses for the selected period."}};function $p(n){u.append_styles(n,"svelte-15nn5yf",".BonusesWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--color-typography-cotrast, #444444);padding:50px;max-width:850px}.BonusesWrapper.BonusesWrapperMobile{padding:20px 15px;max-width:unset}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusesTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.BonusesTitleMobile{font-size:var(--emw--size-standard, 16px)}.BonusesTitleNone{display:none}.BonusCalendarWrapper{display:flex;gap:15px;padding-bottom:30px;align-items:center}.BonusCalendarWrapper.BonusCalendarWrapperMobile{flex-direction:column;gap:10px;padding-bottom:15px}.BonusesCalendarContainer{display:flex;gap:20px}.BonusesCalendarContainer.BonusesCalendarContainerMobile{flex-direction:row;gap:0;justify-content:space-between;padding-bottom:0;width:100%}.BonusesCalendarStartDate,.BonusesCalendarEndDate{color:var(--emw--color-gray-300, #58586B);display:flex;position:relative;align-items:center;gap:10px}.BonusesCalendarStartDate.BonusesCalendarMobile,.BonusesCalendarEndDate.BonusesCalendarMobile{flex-direction:column;align-items:flex-start;gap:5px;width:48%}.BonusesCalendarStartDate.BonusesCalendarMobile .VaadinDatePicker,.BonusesCalendarEndDate.BonusesCalendarMobile .VaadinDatePicker{width:100%;border-radius:var(--emw--border-radius-large, 20px)}.BonusesCalendarStartDate label,.BonusesCalendarEndDate label{font-size:var(--emw--font-size-small, 14px);font-weight:300}.BonusesCalendarStartDate input,.BonusesCalendarEndDate input{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:var(--emw--border-radius-small, 5px);box-sizing:border-box;padding:5px 15px;font-size:var(--emw--size-standard, 16px);line-height:18px;outline-color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusesCalendarFilter{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);color:var(--emw--button-text-color, #FFFFFF);border-radius:var(--emw--button-border-radius, 50px);cursor:pointer;width:120px;height:40px;font-size:var(--emw--font-size-medium, 15px);text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px;outline:none}.BonusesCalendarFilter.BonusesCalendarFilterMobile{width:100%;height:44px}.BonusesCalendarFilter:active{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusesGrid{display:grid;grid-template-columns:1fr 1fr;gap:50px;border-radius:var(--emw--border-radius-large, 20px)}.BonusesGrid.BonusesGridMobile{grid-template-columns:1fr;gap:20px}.BonusesPaginationWrapper{margin:40px 0;display:block;line-break:anywhere;line-height:2em}.BonusesPaginationWrapper.BonusesPaginationWrapperMobile{text-align:center}.BonusesPaginationWrapper .BonusesFirst,.BonusesPaginationWrapper .BonusesPrev,.BonusesPaginationWrapper .BonusesNext,.BonusesPaginationWrapper .BonusesLast{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-size:var(--emw--size-standard, 16px);cursor:pointer;padding:5px 10px;font-weight:var(--emw--font-weight-bold, 700)}.BonusesPaginationWrapper .BonusesFirst.Inactive,.BonusesPaginationWrapper .BonusesPrev.Inactive,.BonusesPaginationWrapper .BonusesNext.Inactive,.BonusesPaginationWrapper .BonusesLast.Inactive{color:var(--emw--color-gray-100, #E6E6E6);cursor:default}.BonusesPaginationWrapper .BonusesPage{margin:0 5px;color:var(--emw--color-typography-cotrast, #444444);font-size:var(--emw--size-standard, 16px);cursor:pointer;padding:5px 10px;white-space:nowrap}.BonusesPaginationWrapper .BonusesPage.BonusPageActive{background-color:var(--emw--color-white, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700)}")}function Hr(n,e,t){const s=n.slice();return s[44]=e[t],s[46]=t,s}function Rr(n,e,t){const s=n.slice();return s[47]=e[t],s}function Sp(n){let e,t,s,i=n[17]("titleBonusesHistory")+"",r,o,a,l,d,c,h=n[17]("dateFrom")+"",p,f,_,g,y,b,x=n[17]("dateTo")+"",N,B,w,C,T,E=n[17]("dateFilter")+"",W,Ze,ee,Ot,Te,V,q=n[18]&&Pp(n);function Qe($,L){return $[16].length===0?kp:Tp}let ke=Qe(n),F=ke(n),z=n[16].length!==0&&Ur(n);return{c(){e=u.element("div"),q&&q.c(),t=u.space(),s=u.element("h2"),r=u.text(i),o=u.space(),a=u.element("div"),l=u.element("div"),d=u.element("div"),c=u.element("label"),p=u.text(h),f=u.space(),_=u.element("vaadin-date-picker"),g=u.space(),y=u.element("div"),b=u.element("label"),N=u.text(x),B=u.space(),w=u.element("vaadin-date-picker"),C=u.space(),T=u.element("button"),W=u.text(E),Ze=u.space(),ee=u.element("div"),F.c(),Ot=u.space(),z&&z.c(),u.attr(s,"class","BonusesTitle "+(n[18]?"BonusesTitleNone":"")),u.attr(s,"part","BonusesTitle "+(n[18]?"BonusesTitleNone":"")),u.attr(c,"for","BonusCalendarStartDate"),u.set_custom_element_data(_,"max",n[9]),u.set_custom_element_data(_,"value",n[10]),u.set_custom_element_data(_,"placeholder","From"),u.set_custom_element_data(_,"class","VaadinDatePicker"),u.attr(d,"class","BonusesCalendarStartDate "+(n[18]?"BonusesCalendarMobile":"")),u.attr(b,"for","BonusesCalendarEndDate"),u.set_custom_element_data(w,"max",n[9]),u.set_custom_element_data(w,"value",n[9]),u.set_custom_element_data(w,"placeholder","To"),u.set_custom_element_data(w,"class","VaadinDatePicker"),u.attr(y,"class","BonusesCalendarEndDate "+(n[18]?"BonusesCalendarMobile":"")),u.attr(l,"class","BonusesCalendarContainer "+(n[18]?"BonusesCalendarContainerMobile":"")),u.attr(T,"class","BonusesCalendarFilter "+(n[18]?"BonusesCalendarFilterMobile":"")),u.attr(a,"class","BonusCalendarWrapper "+(n[18]?"BonusCalendarWrapperMobile":"")),u.attr(ee,"class","BonusesGrid "+(n[18]?"BonusesGridMobile":"")),u.attr(e,"class","BonusesWrapper "+(n[18]?"BonusesWrapperMobile":""))},m($,L){u.insert($,e,L),q&&q.m(e,null),u.append(e,t),u.append(e,s),u.append(s,r),u.append(e,o),u.append(e,a),u.append(a,l),u.append(l,d),u.append(d,c),u.append(c,p),u.append(d,f),u.append(d,_),n[25](_),u.append(l,g),u.append(l,y),u.append(y,b),u.append(b,N),u.append(y,B),u.append(y,w),n[26](w),u.append(a,C),u.append(a,T),u.append(T,W),u.append(e,Ze),u.append(e,ee),F.m(ee,null),u.append(e,Ot),z&&z.m(e,null),Te||(V=u.listen(T,"click",n[27]),Te=!0)},p($,L){$[18]&&q.p($,L),L[0]&131072&&i!==(i=$[17]("titleBonusesHistory")+"")&&u.set_data(r,i),L[0]&131072&&h!==(h=$[17]("dateFrom")+"")&&u.set_data(p,h),L[0]&512&&u.set_custom_element_data(_,"max",$[9]),L[0]&1024&&u.set_custom_element_data(_,"value",$[10]),L[0]&131072&&x!==(x=$[17]("dateTo")+"")&&u.set_data(N,x),L[0]&512&&u.set_custom_element_data(w,"max",$[9]),L[0]&512&&u.set_custom_element_data(w,"value",$[9]),L[0]&131072&&E!==(E=$[17]("dateFilter")+"")&&u.set_data(W,E),ke===(ke=Qe($))&&F?F.p($,L):(F.d(1),F=ke($),F&&(F.c(),F.m(ee,null))),$[16].length!==0?z?z.p($,L):(z=Ur($),z.c(),z.m(e,null)):z&&(z.d(1),z=null)},d($){$&&u.detach(e),q&&q.d(),n[25](null),n[26](null),F.d(),z&&z.d(),Te=!1,V()}}}function Pp(n){let e,t,s,i,r,o,a,l,d,c,h=n[17]("titleBonusesHistory")+"",p,f,_;return{c(){e=u.element("div"),t=u.svg_element("svg"),s=u.svg_element("defs"),i=u.svg_element("style"),r=u.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),o=u.svg_element("g"),a=u.svg_element("g"),l=u.svg_element("path"),d=u.space(),c=u.element("h2"),p=u.text(h),u.attr(l,"class","aaa"),u.attr(l,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),u.attr(l,"transform","translate(15 15) rotate(180)"),u.attr(a,"transform","translate(20 158)"),u.attr(o,"transform","translate(-20 -158)"),u.attr(t,"xmlns","http://www.w3.org/2000/svg"),u.attr(t,"width","15"),u.attr(t,"height","15"),u.attr(t,"viewBox","0 0 15 15"),u.attr(c,"class","BonusesTitleMobile"),u.attr(e,"class","MenuReturnButton")},m(g,y){u.insert(g,e,y),u.append(e,t),u.append(t,s),u.append(s,i),u.append(i,r),u.append(t,o),u.append(o,a),u.append(a,l),u.append(e,d),u.append(e,c),u.append(c,p),f||(_=u.listen(e,"click",n[24]),f=!0)},p(g,y){y[0]&131072&&h!==(h=g[17]("titleBonusesHistory")+"")&&u.set_data(p,h)},d(g){g&&u.detach(e),f=!1,_()}}}function Tp(n){let e,t=u.ensure_array_like(n[16]),s=[];for(let i=0;i<t.length;i+=1)s[i]=Fr(Rr(n,t,i));return{c(){for(let i=0;i<s.length;i+=1)s[i].c();e=u.empty()},m(i,r){for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,r);u.insert(i,e,r)},p(i,r){if(r[0]&65551){t=u.ensure_array_like(i[16]);let o;for(o=0;o<t.length;o+=1){const a=Rr(i,t,o);s[o]?s[o].p(a,r):(s[o]=Fr(a),s[o].c(),s[o].m(e.parentNode,e))}for(;o<s.length;o+=1)s[o].d(1);s.length=t.length}},d(i){i&&u.detach(e),u.destroy_each(s,i)}}}function kp(n){let e,t=n[17]("noBonusHistory")+"",s;return{c(){e=u.element("p"),s=u.text(t)},m(i,r){u.insert(i,e,r),u.append(e,s)},p(i,r){r[0]&131072&&t!==(t=i[17]("noBonusHistory")+"")&&u.set_data(s,t)},d(i){i&&u.detach(e)}}}function Dp(n){let e,t,s,i,r,o,a,l,d,c;return{c(){e=u.element("player-bonus-card"),u.set_custom_element_data(e,"bonuswalletid",t=n[47].walletId),u.set_custom_element_data(e,"bonusdate",s=n[47].granted),u.set_custom_element_data(e,"bonusstatus",i=n[47].status),u.set_custom_element_data(e,"bonusname",r=n[47].name),u.set_custom_element_data(e,"bonustype",o=n[47].type),u.set_custom_element_data(e,"bonusamount",a=n[47].extension.grantedPlayerCurrencyAmount),u.set_custom_element_data(e,"bonuswageringamount",l=`${n[47].fulfilledWR} / ${n[47].originalWageringRequirement}`),u.set_custom_element_data(e,"bonusremainingamount",d=n[47].currentAmount),u.set_custom_element_data(e,"bonuscurrency",c=n[47].currency),u.set_custom_element_data(e,"lang",n[0]),u.set_custom_element_data(e,"clientstyling",n[1]),u.set_custom_element_data(e,"clientstylingurl",n[2]),u.set_custom_element_data(e,"translationurl",n[3])},m(h,p){u.insert(h,e,p)},p(h,p){p[0]&65536&&t!==(t=h[47].walletId)&&u.set_custom_element_data(e,"bonuswalletid",t),p[0]&65536&&s!==(s=h[47].granted)&&u.set_custom_element_data(e,"bonusdate",s),p[0]&65536&&i!==(i=h[47].status)&&u.set_custom_element_data(e,"bonusstatus",i),p[0]&65536&&r!==(r=h[47].name)&&u.set_custom_element_data(e,"bonusname",r),p[0]&65536&&o!==(o=h[47].type)&&u.set_custom_element_data(e,"bonustype",o),p[0]&65536&&a!==(a=h[47].extension.grantedPlayerCurrencyAmount)&&u.set_custom_element_data(e,"bonusamount",a),p[0]&65536&&l!==(l=`${h[47].fulfilledWR} / ${h[47].originalWageringRequirement}`)&&u.set_custom_element_data(e,"bonuswageringamount",l),p[0]&65536&&d!==(d=h[47].currentAmount)&&u.set_custom_element_data(e,"bonusremainingamount",d),p[0]&65536&&c!==(c=h[47].currency)&&u.set_custom_element_data(e,"bonuscurrency",c),p[0]&1&&u.set_custom_element_data(e,"lang",h[0]),p[0]&2&&u.set_custom_element_data(e,"clientstyling",h[1]),p[0]&4&&u.set_custom_element_data(e,"clientstylingurl",h[2]),p[0]&8&&u.set_custom_element_data(e,"translationurl",h[3])},d(h){h&&u.detach(e)}}}function Op(n){let e,t,s,i,r,o,a;return{c(){e=u.element("player-bonus-card"),u.set_custom_element_data(e,"bonuswalletid",t=n[47].walletId),u.set_custom_element_data(e,"bonusdate",s=n[47].granted),u.set_custom_element_data(e,"bonusstatus",i=n[47].status),u.set_custom_element_data(e,"bonusname",r=n[47].name),u.set_custom_element_data(e,"bonustype",o=n[47].type),u.set_custom_element_data(e,"bonuscurrency",a=n[47].currency),u.set_custom_element_data(e,"lang",n[0]),u.set_custom_element_data(e,"clientstyling",n[1]),u.set_custom_element_data(e,"clientstylingurl",n[2]),u.set_custom_element_data(e,"translationurl",n[3])},m(l,d){u.insert(l,e,d)},p(l,d){d[0]&65536&&t!==(t=l[47].walletId)&&u.set_custom_element_data(e,"bonuswalletid",t),d[0]&65536&&s!==(s=l[47].granted)&&u.set_custom_element_data(e,"bonusdate",s),d[0]&65536&&i!==(i=l[47].status)&&u.set_custom_element_data(e,"bonusstatus",i),d[0]&65536&&r!==(r=l[47].name)&&u.set_custom_element_data(e,"bonusname",r),d[0]&65536&&o!==(o=l[47].type)&&u.set_custom_element_data(e,"bonustype",o),d[0]&65536&&a!==(a=l[47].currency)&&u.set_custom_element_data(e,"bonuscurrency",a),d[0]&1&&u.set_custom_element_data(e,"lang",l[0]),d[0]&2&&u.set_custom_element_data(e,"clientstyling",l[1]),d[0]&4&&u.set_custom_element_data(e,"clientstylingurl",l[2]),d[0]&8&&u.set_custom_element_data(e,"translationurl",l[3])},d(l){l&&u.detach(e)}}}function Fr(n){let e;function t(r,o){return r[47].type==="freeRound"?Op:Dp}let s=t(n),i=s(n);return{c(){i.c(),e=u.empty()},m(r,o){i.m(r,o),u.insert(r,e,o)},p(r,o){s===(s=t(r))&&i?i.p(r,o):(i.d(1),i=s(r),i&&(i.c(),i.m(e.parentNode,e)))},d(r){r&&u.detach(e),i.d(r)}}}function Ur(n){let e,t,s,i,r,o,a,l,d,c,h,p,f,_,g,y,b,x,N,B=u.ensure_array_like(Array(n[14])),w=[];for(let C=0;C<B.length;C+=1)w[C]=Vr(Hr(n,B,C));return{c(){e=u.element("div"),t=u.element("span"),s=u.text("|<"),r=u.space(),o=u.element("span"),a=u.text("<"),d=u.space();for(let C=0;C<w.length;C+=1)w[C].c();c=u.space(),h=u.element("span"),p=u.text(">"),_=u.space(),g=u.element("span"),y=u.text(">|"),u.attr(t,"class",i="BonusesFirst "+(n[15]===0?"Inactive":"")),u.attr(o,"class",l="BonusesPrev "+(n[15]===0?"Inactive":"")),u.attr(h,"class",f="BonusesNext "+(n[15]===n[14]-1?"Inactive":"")),u.attr(g,"class",b="BonusesLast "+(n[15]===n[14]-1?"Inactive":"")),u.attr(e,"class","BonusesPaginationWrapper "+(n[18]?"BonusesPaginationWrapperMobile":""))},m(C,T){u.insert(C,e,T),u.append(e,t),u.append(t,s),u.append(e,r),u.append(e,o),u.append(o,a),u.append(e,d);for(let E=0;E<w.length;E+=1)w[E]&&w[E].m(e,null);u.append(e,c),u.append(e,h),u.append(h,p),u.append(e,_),u.append(e,g),u.append(g,y),x||(N=[u.listen(t,"click",n[28]),u.listen(o,"click",n[29]),u.listen(h,"click",n[31]),u.listen(g,"click",n[32])],x=!0)},p(C,T){if(T[0]&32768&&i!==(i="BonusesFirst "+(C[15]===0?"Inactive":""))&&u.attr(t,"class",i),T[0]&32768&&l!==(l="BonusesPrev "+(C[15]===0?"Inactive":""))&&u.attr(o,"class",l),T[0]&1097776){B=u.ensure_array_like(Array(C[14]));let E;for(E=0;E<B.length;E+=1){const W=Hr(C,B,E);w[E]?w[E].p(W,T):(w[E]=Vr(W),w[E].c(),w[E].m(e,c))}for(;E<w.length;E+=1)w[E].d(1);w.length=B.length}T[0]&49152&&f!==(f="BonusesNext "+(C[15]===C[14]-1?"Inactive":""))&&u.attr(h,"class",f),T[0]&49152&&b!==(b="BonusesLast "+(C[15]===C[14]-1?"Inactive":""))&&u.attr(g,"class",b)},d(C){C&&u.detach(e),u.destroy_each(w,C),x=!1,u.run_all(N)}}}function Vr(n){let e,t=n[46]+1+"",s,i,r,o;function a(){return n[30](n[46])}return{c(){e=u.element("span"),s=u.text(t),u.attr(e,"class",i="BonusesPage "+(n[46]===n[15]?"BonusPageActive":""))},m(l,d){u.insert(l,e,d),u.append(e,s),r||(o=u.listen(e,"click",a),r=!0)},p(l,d){n=l,d[0]&32768&&i!==(i="BonusesPage "+(n[46]===n[15]?"BonusPageActive":""))&&u.attr(e,"class",i)},d(l){l&&u.detach(e),r=!1,o()}}}function Mp(n){let e;function t(r,o){return Sp}let i=t()(n);return{c(){e=u.element("div"),i.c()},m(r,o){u.insert(r,e,o),i.m(e,null),n[33](e)},p(r,o){i.p(r,o)},i:u.noop,o:u.noop,d(r){r&&u.detach(e),i.d(),n[33](null)}}}let J=6;function Np(n,e,t){let s;u.component_subscribe(n,u.$format,m=>t(17,s=m));let{endpoint:i=""}=e,{session:r=""}=e,{playerid:o=""}=e,{lang:a="en"}=e,{clientstyling:l=""}=e,{clientstylingurl:d=""}=e,{translationurl:c=""}=e,{bonushistorystatus:h=""}=e,{bonushistorytype:p=""}=e,f,_=window.navigator.userAgent,g=u.getDevice(_)!=="PC",y,b,x,N;x=u.hooks(new Date).format("YYYY-MM-DD"),N=u.hooks(new Date).subtract(3,"months").format("YYYY-MM-DD");let B=N,w=x,C=0,T=0,E=0,W=0,Ze=0,ee=[];const Ot=()=>{fetch(c).then(U=>U.json()).then(U=>{Object.keys(U).forEach(G=>{zr(G,U[G])})}).catch(U=>{console.log(U)})};Object.keys(Lr).forEach(m=>{zr(m,Lr[m])});const Te=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:g},window.location.href)},V=(m,U,G)=>{let ms=new URL(`${i}/v1/player/${o}/bonusWallet`),Za=u.hooks(B).startOf("day").utc().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"),Qa=u.hooks(w).endOf("day").utc().format("YYYY-MM-DDTHH:mm:ss.SSS[Z]"),de="",cn="",hn="";U&&(cn=U.split(",").map(gs=>`status=${gs}`).join(","),de=de+cn+","),G&&(hn=G.split(",").map(gs=>`type=${gs}`).join(","),de=de+hn+","),de=de+`granted=[${Za}~${Qa}]`,ms.searchParams.append("filter",de),ms.searchParams.append("pagination",`offset=${m},limit=${J}`);let el={method:"GET",headers:{"X-SessionId":r}};fetch(ms.href,el).then(j=>j.json()).then(j=>{t(14,W=Math.ceil(j.total/J)),m-J>=0&&t(11,C=m-J),m+J<j.total&&t(12,T=m+J),t(13,E=(W-1)*J),t(15,Ze=m/J),t(16,ee=(j==null?void 0:j.items)||[])},j=>{console.error(j)}),window.postMessage({type:"ScrollToTop"},window.location.href)},q=m=>{B=m.target.value},Qe=m=>{w=m.target.value},ke=()=>{y.addEventListener("change",q,!1),b.addEventListener("change",Qe,!1)};u.onMount(()=>()=>{y.removeEventListener("change",q),b.removeEventListener("change",Qe)});const F=()=>{Ep(a)},z=()=>{let m=document.createElement("style");m.innerHTML=l,f.appendChild(m)},$=()=>{let m=new URL(d),U=document.createElement("style");fetch(m.href).then(G=>G.text()).then(G=>{U.innerHTML=G,setTimeout(()=>{f.appendChild(U)},1)})},L=()=>Te();function Va(m){u.binding_callbacks[m?"unshift":"push"](()=>{y=m,t(7,y)})}function ja(m){u.binding_callbacks[m?"unshift":"push"](()=>{b=m,t(8,b)})}const Ya=()=>V(0,h,p),Wa=()=>V(0,h,p),qa=()=>V(C,h,p),Ka=m=>V(m*J,h,p),Ga=()=>V(T,h,p),Ja=()=>V(E,h,p);function Xa(m){u.binding_callbacks[m?"unshift":"push"](()=>{f=m,t(6,f)})}return n.$$set=m=>{"endpoint"in m&&t(21,i=m.endpoint),"session"in m&&t(22,r=m.session),"playerid"in m&&t(23,o=m.playerid),"lang"in m&&t(0,a=m.lang),"clientstyling"in m&&t(1,l=m.clientstyling),"clientstylingurl"in m&&t(2,d=m.clientstylingurl),"translationurl"in m&&t(3,c=m.translationurl),"bonushistorystatus"in m&&t(4,h=m.bonushistorystatus),"bonushistorytype"in m&&t(5,p=m.bonushistorytype)},n.$$.update=()=>{n.$$.dirty[0]&1&&a&&F(),n.$$.dirty[0]&384&&y&&b&&ke(),n.$$.dirty[0]&14680112&&r&&o&&i&&V(0,h,p),n.$$.dirty[0]&68&&d&&f&&$(),n.$$.dirty[0]&66&&l&&f&&z(),n.$$.dirty[0]&8&&c&&Ot()},[a,l,d,c,h,p,f,y,b,x,N,C,T,E,W,Ze,ee,s,g,Te,V,i,r,o,L,Va,ja,Ya,Wa,qa,Ka,Ga,Ja,Xa]}class Ua extends u.SvelteComponent{constructor(e){super(),u.init(this,e,Np,Mp,u.safe_not_equal,{endpoint:21,session:22,playerid:23,lang:0,clientstyling:1,clientstylingurl:2,translationurl:3,bonushistorystatus:4,bonushistorytype:5},$p,[-1,-1])}get endpoint(){return this.$$.ctx[21]}set endpoint(e){this.$$set({endpoint:e}),u.flush()}get session(){return this.$$.ctx[22]}set session(e){this.$$set({session:e}),u.flush()}get playerid(){return this.$$.ctx[23]}set playerid(e){this.$$set({playerid:e}),u.flush()}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),u.flush()}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),u.flush()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),u.flush()}get translationurl(){return this.$$.ctx[3]}set translationurl(e){this.$$set({translationurl:e}),u.flush()}get bonushistorystatus(){return this.$$.ctx[4]}set bonushistorystatus(e){this.$$set({bonushistorystatus:e}),u.flush()}get bonushistorytype(){return this.$$.ctx[5]}set bonushistorytype(e){this.$$set({bonushistorytype:e}),u.flush()}}u.create_custom_element(Ua,{endpoint:{},session:{},playerid:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{},bonushistorystatus:{},bonushistorytype:{}},[],[],!0);exports.default=Ua;
|