@everymatrix/player-bonus-history 1.73.1 → 1.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{PlayerBonusHistory-BEAQKpL-.cjs → PlayerBonusHistory-1X7q1Aej.cjs} +388 -394
- package/components/{PlayerBonusHistory-BBISzLa3.js → PlayerBonusHistory-CUJP3qa8.js} +1773 -1754
- package/components/{PlayerBonusHistory-UxGbkp6L.js → PlayerBonusHistory-DQXTXf0M.js} +1768 -1749
- package/es2015/player-bonus-history.cjs +1 -1
- package/es2015/player-bonus-history.js +1 -1
- package/esnext/player-bonus-history.js +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Vl=Object.defineProperty,Ml=Object.defineProperties;var Bl=Object.getOwnPropertyDescriptors;var Xs=Object.getOwnPropertySymbols;var Fl=Object.prototype.hasOwnProperty,Rl=Object.prototype.propertyIsEnumerable;var Js=(i,e,t)=>e in i?Vl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Di=(i,e)=>{for(var t in e||(e={}))Fl.call(e,t)&&Js(i,t,e[t]);if(Xs)for(var t of Xs(e))Rl.call(e,t)&&Js(i,t,e[t]);return i},Oi=(i,e)=>Ml(i,Bl(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./PlayerBonusCard-CA2vlJDl.cjs");function Qs(i,e){h.addMessages(i,e)}function Hl(i){h.$locale.set(i)}const Zs={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."}};if(typeof window!="undefined"){let i=function(e){return function(...t){try{return e.apply(this,t)}catch(o){if(o instanceof DOMException&&o.message.includes("has already been used with this registry")||o.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw o}}};customElements.define=i(customElements.define),Promise.resolve().then(()=>require("./PlayerBonusCard-CA2vlJDl.cjs")).then(e=>e.PlayerBonusCard_ce).then(({default:e})=>{!customElements.get("player-bonus-card")&&customElements.define("player-bonus-card",e.element)})}var ql=Object.defineProperty,$l=Object.defineProperties,Wl=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,Ul=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable,so=(i,e,t)=>e in i?ql(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,we=(i,e)=>{for(var t in e||(e={}))Ul.call(e,t)&&so(i,t,e[t]);if(er)for(var t of er(e))jl.call(e,t)&&so(i,t,e[t]);return i},ci=(i,e)=>$l(i,Wl(e)),A=(i,e,t)=>(so(i,typeof e!="symbol"?e+"":e,t),t),Jt=(i,e,t)=>new Promise((o,s)=>{var r=l=>{try{a(t.next(l))}catch(d){s(d)}},n=l=>{try{a(t.throw(l))}catch(d){s(d)}},a=l=>l.done?o(l.value):Promise.resolve(l.value).then(r,n);a((t=t.apply(i,e)).next())});/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/function
|
|
5
|
+
*/function D(i,e="24.5.12"){Object.defineProperty(i,"version",{get(){return e}});const t=customElements.get(i.is);if(!t)customElements.define(i.is,i);else{const o=t.version;o&&i.version&&o===i.version?console.warn(`The component ${i.is} has been loaded twice`):console.error(`Tried to define ${i.is} version ${i.version} when version ${t.version} is already in use. Something will probably break.`)}}/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
8
8
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9
|
-
*/let
|
|
9
|
+
*/let Yl=class extends HTMLElement{static get is(){return"vaadin-lumo-styles"}};D(Yl);/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2019 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
13
|
+
*/const jt=globalThis,qo=jt.ShadowRoot&&(jt.ShadyCSS===void 0||jt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$o=Symbol(),tr=new WeakMap;let ui=class{constructor(i,e,t){if(this._$cssResult$=!0,t!==$o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=i,this.t=e}get styleSheet(){let i=this.o;const e=this.t;if(qo&&i===void 0){const t=e!==void 0&&e.length===1;t&&(i=tr.get(e)),i===void 0&&((this.o=i=new CSSStyleSheet).replaceSync(this.cssText),t&&tr.set(e,i))}return i}toString(){return this.cssText}};const Gl=i=>new ui(typeof i=="string"?i:i+"",void 0,$o),m=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((o,s,r)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[r+1],i[0]);return new ui(t,i,$o)},Wo=(i,e)=>{if(qo)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const o=document.createElement("style"),s=jt.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=t.cssText,i.appendChild(o)}},ir=qo?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return Gl(t)})(i):i;/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/const{is:
|
|
17
|
+
*/const{is:Kl,defineProperty:Xl,getOwnPropertyDescriptor:Jl,getOwnPropertyNames:Ql,getOwnPropertySymbols:Zl,getPrototypeOf:ed}=Object,Ge=globalThis,or=Ge.trustedTypes,td=or?or.emptyScript:"",sr=Ge.reactiveElementPolyfillSupport,mt=(i,e)=>i,ro={toAttribute(i,e){switch(e){case Boolean:i=i?td:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(o){t=null}}return t}},_n=(i,e)=>!Kl(i,e),rr={attribute:!0,type:String,converter:ro,reflect:!1,useDefault:!1,hasChanged:_n};Symbol.metadata!=null||(Symbol.metadata=Symbol("metadata")),Ge.litPropertyMetadata!=null||(Ge.litPropertyMetadata=new WeakMap);class $e 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=rr){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const o=Symbol(),s=this.getPropertyDescriptor(e,o,t);s!==void 0&&Xl(this.prototype,e,s)}}static getPropertyDescriptor(e,t,o){var s;const{get:r,set:n}=(s=Jl(this.prototype,e))!=null?s:{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){const l=r==null?void 0:r.call(this);n==null||n.call(this,a),this.requestUpdate(e,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:rr}static _$Ei(){if(this.hasOwnProperty(mt("elementProperties")))return;const e=ed(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mt("properties"))){const t=this.properties,o=[...Ql(t),...Zl(t)];for(const s of o)this.createProperty(s,t[s])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[o,s]of t)this.elementProperties.set(o,s)}this._$Eh=new Map;for(const[t,o]of this.elementProperties){const s=this._$Eu(t,o);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const s of o)t.unshift(ir(s))}else e!==void 0&&t.push(ir(e));return t}static _$Eu(e,t){const o=t.attribute;return o===!1?void 0:typeof o=="string"?o: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,o;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return Wo(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var o;return(o=t.hostConnected)==null?void 0:o.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var o;return(o=t.hostDisconnected)==null?void 0:o.call(t)})}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){var o;const s=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,s);if(r!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:ro).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,t){var o,s,r,n;const a=this.constructor,l=a._$Eh.get(e);if(l!==void 0&&this._$Em!==l){const d=a.getPropertyOptions(l),u=typeof d.converter=="function"?{fromAttribute:d.converter}:((o=d.converter)==null?void 0:o.fromAttribute)!==void 0?d.converter:ro;this._$Em=l,this[l]=(n=(r=u.fromAttribute(t,d.type))!=null?r:(s=this._$Ej)==null?void 0:s.get(l))!=null?n:null,this._$Em=null}}requestUpdate(e,t,o){var s,r;if(e!==void 0){const n=this.constructor,a=this[e];if(o!=null||(o=n.getPropertyOptions(e)),!(((s=o.hasChanged)!=null?s:_n)(a,t)||o.useDefault&&o.reflect&&a===((r=this._$Ej)==null?void 0:r.get(e))&&!this.hasAttribute(n._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:s,wrapped:r},n){var a,l,d;o&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,(l=n!=null?n:t)!=null?l:this[e]),r!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&((d=this._$Eq)!=null?d:this._$Eq=new Set).add(e))}_$EP(){return Jt(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 e;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[r,n]of s){const{wrapped:a}=n,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,n,l)}}let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),(e=this._$EO)==null||e.forEach(s=>{var r;return(r=s.hostUpdate)==null?void 0:r.call(s)}),this.update(o)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(o)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(o=>{var s;return(s=o.hostUpdated)==null?void 0:s.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}}var nr;$e.elementStyles=[],$e.shadowRootOptions={mode:"open"},$e[mt("elementProperties")]=new Map,$e[mt("finalized")]=new Map,sr==null||sr({ReactiveElement:$e}),((nr=Ge.reactiveElementVersions)!=null?nr:Ge.reactiveElementVersions=[]).push("2.1.0");/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/const
|
|
22
|
-
\f\r]`,
|
|
23
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),hr=/'/g,cr=/"/g,vn=/^(?:script|style|textarea|title)$/i,
|
|
21
|
+
*/const Qt=globalThis,Zt=Qt.trustedTypes,ar=Zt?Zt.createPolicy("lit-html",{createHTML:i=>i}):void 0,mn="$lit$",ge=`lit$${Math.random().toFixed(9).slice(2)}$`,fn="?"+ge,id=`<${fn}>`,Ne=document,vt=()=>Ne.createComment(""),gt=i=>i===null||typeof i!="object"&&typeof i!="function",Uo=Array.isArray,od=i=>Uo(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",zi=`[
|
|
22
|
+
\f\r]`,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lr=/-->/g,dr=/>/g,Te=RegExp(`>|${zi}(?:([^\\s"'>=/]+)(${zi}*=${zi}*(?:[^
|
|
23
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),hr=/'/g,cr=/"/g,vn=/^(?:script|style|textarea|title)$/i,Ke=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),ur=new WeakMap,De=Ne.createTreeWalker(Ne,129);function gn(i,e){if(!Uo(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ar!==void 0?ar.createHTML(e):e}const sd=(i,e)=>{const t=i.length-1,o=[];let s,r=e===2?"<svg>":e===3?"<math>":"",n=nt;for(let a=0;a<t;a++){const l=i[a];let d,u,c=-1,p=0;for(;p<l.length&&(n.lastIndex=p,u=n.exec(l),u!==null);)p=n.lastIndex,n===nt?u[1]==="!--"?n=lr:u[1]!==void 0?n=dr:u[2]!==void 0?(vn.test(u[2])&&(s=RegExp("</"+u[2],"g")),n=Te):u[3]!==void 0&&(n=Te):n===Te?u[0]===">"?(n=s!=null?s:nt,c=-1):u[1]===void 0?c=-2:(c=n.lastIndex-u[2].length,d=u[1],n=u[3]===void 0?Te:u[3]==='"'?cr:hr):n===cr||n===hr?n=Te:n===lr||n===dr?n=nt:(n=Te,s=void 0);const _=n===Te&&i[a+1].startsWith("/>")?" ":"";r+=n===nt?l+id:c>=0?(o.push(d),l.slice(0,c)+mn+l.slice(c)+ge+_):l+ge+(c===-2?a:_)}return[gn(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]};class bt{constructor({strings:e,_$litType$:t},o){let s;this.parts=[];let r=0,n=0;const a=e.length-1,l=this.parts,[d,u]=sd(e,t);if(this.el=bt.createElement(d,o),De.currentNode=this.el.content,t===2||t===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=De.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const c of s.getAttributeNames())if(c.endsWith(mn)){const p=u[n++],_=s.getAttribute(c).split(ge),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:v[2],strings:_,ctor:v[1]==="."?nd:v[1]==="?"?ad:v[1]==="@"?ld:pi}),s.removeAttribute(c)}else c.startsWith(ge)&&(l.push({type:6,index:r}),s.removeAttribute(c));if(vn.test(s.tagName)){const c=s.textContent.split(ge),p=c.length-1;if(p>0){s.textContent=Zt?Zt.emptyScript:"";for(let _=0;_<p;_++)s.append(c[_],vt()),De.nextNode(),l.push({type:2,index:++r});s.append(c[p],vt())}}}else if(s.nodeType===8)if(s.data===fn)l.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(ge,c+1))!==-1;)l.push({type:7,index:r}),c+=ge.length-1}r++}}static createElement(e,t){const o=Ne.createElement("template");return o.innerHTML=e,o}}function Xe(i,e,t=i,o){var s,r,n;if(e===Ke)return e;let a=o!==void 0?(s=t._$Co)==null?void 0:s[o]:t._$Cl;const l=gt(e)?void 0:e._$litDirective$;return(a==null?void 0:a.constructor)!==l&&((r=a==null?void 0:a._$AO)==null||r.call(a,!1),l===void 0?a=void 0:(a=new l(i),a._$AT(i,t,o)),o!==void 0?((n=t._$Co)!=null?n:t._$Co=[])[o]=a:t._$Cl=a),a!==void 0&&(e=Xe(i,a._$AS(i,e.values),a,o)),e}class rd{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:o},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!=null?t:Ne).importNode(o,!0);De.currentNode=r;let n=De.nextNode(),a=0,l=0,d=s[0];for(;d!==void 0;){if(a===d.index){let u;d.type===2?u=new Dt(n,n.nextSibling,this,e):d.type===1?u=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(u=new dd(n,this,e)),this._$AV.push(u),d=s[++l]}a!==(d==null?void 0:d.index)&&(n=De.nextNode(),a++)}return De.currentNode=Ne,r}p(e){let t=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}}class Dt{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,o,s){var r;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=s,this._$Cv=(r=s==null?void 0:s.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=Xe(this,e,t),gt(e)?e===R||e==null||e===""?(this._$AH!==R&&this._$AR(),this._$AH=R):e!==this._$AH&&e!==Ke&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):od(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!==R&>(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ne.createTextNode(e)),this._$AH=e}$(e){var t;const{values:o,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=bt.createElement(gn(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)==null?void 0:t._$AD)===r)this._$AH.p(o);else{const n=new rd(r,this),a=n.u(this.options);n.p(o),this.T(a),this._$AH=n}}_$AC(e){let t=ur.get(e.strings);return t===void 0&&ur.set(e.strings,t=new bt(e)),t}k(e){Uo(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let o,s=0;for(const r of e)s===t.length?t.push(o=new Dt(this.O(vt()),this.O(vt()),this,this.options)):o=t[s],o._$AI(r),s++;s<t.length&&(this._$AR(o&&o._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class pi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,s,r){this.type=1,this._$AH=R,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=R}_$AI(e,t=this,o,s){const r=this.strings;let n=!1;if(r===void 0)e=Xe(this,e,t,0),n=!gt(e)||e!==this._$AH&&e!==Ke,n&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=Xe(this,a[o+l],t,l),d===Ke&&(d=this._$AH[l]),n||(n=!gt(d)||d!==this._$AH[l]),d===R?e=R:e!==R&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}n&&!s&&this.j(e)}j(e){e===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class nd extends pi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===R?void 0:e}}class ad extends pi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==R)}}class ld extends pi{constructor(e,t,o,s,r){super(e,t,o,s,r),this.type=5}_$AI(e,t=this){var o;if((e=(o=Xe(this,e,t,0))!=null?o:R)===Ke)return;const s=this._$AH,r=e===R&&s!==R||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==R&&(s===R||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,o;typeof this._$AH=="function"?this._$AH.call((o=(t=this.options)==null?void 0:t.host)!=null?o:this.element,e):this._$AH.handleEvent(e)}}class dd{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){Xe(this,e)}}const pr=Qt.litHtmlPolyfillSupport;var _r;pr==null||pr(bt,Dt),((_r=Qt.litHtmlVersions)!=null?_r:Qt.litHtmlVersions=[]).push("3.3.0");const bn=(i,e,t)=>{var o,s;const r=(o=t==null?void 0:t.renderBefore)!=null?o:e;let n=r._$litPart$;if(n===void 0){const a=(s=t==null?void 0:t.renderBefore)!=null?s:null;r._$litPart$=n=new Dt(e.insertBefore(vt(),a),a,void 0,t!=null?t:{})}return n._$AI(i),n};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const yt=globalThis;class be extends $e{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore!=null||(e.renderBefore=t.firstChild),t}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=bn(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 Ke}}var mr;be._$litElement$=!0,be.finalized=!0,(mr=yt.litElementHydrateSupport)==null||mr.call(yt,{LitElement:be});const fr=yt.litElementPolyfillSupport;fr==null||fr({LitElement:be});var vr;((vr=yt.litElementVersions)!=null?vr:yt.litElementVersions=[]).push("4.2.0");/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
30
30
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
34
34
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
35
|
-
*/const xn=[],
|
|
36
|
-
`)}const
|
|
35
|
+
*/const xn=[],no=new Set,jo=new Set;function wn(i){return i&&Object.prototype.hasOwnProperty.call(i,"__themes")}function hd(i){return wn(customElements.get(i))}function cd(i=[]){return[i].flat(1/0).filter(e=>e instanceof ui?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Cn(i,e){return(i||"").split(" ").some(t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e))}function In(i){return i.map(e=>e.cssText).join(`
|
|
36
|
+
`)}const ei="vaadin-themable-mixin-style";function ud(i,e){const t=document.createElement("style");t.id=ei,t.textContent=In(i),e.content.appendChild(t)}function pd(i){if(!i.shadowRoot)return;const e=i.constructor;if(i instanceof be)[...i.shadowRoot.querySelectorAll("style")].forEach(t=>t.remove()),Wo(i.shadowRoot,e.elementStyles);else{const t=i.shadowRoot.getElementById(ei),o=e.prototype._template;t.textContent=o.content.getElementById(ei).textContent}}function _d(i){no.forEach(e=>{const t=e.deref();t instanceof i?pd(t):t||no.delete(e)})}function An(i){if(i.prototype instanceof be)i.elementStyles=i.finalizeStyles(i.styles);else{const e=i.prototype._template;e.content.getElementById(ei).textContent=In(i.getStylesForThis())}jo.forEach(e=>{const t=customElements.get(e);t!==i&&t.prototype instanceof i&&An(t)})}function md(i,e){const t=i.__themes;return!t||!e?!1:t.some(o=>o.styles.some(s=>e.some(r=>r.cssText===s.cssText)))}function b(i,e,t={}){e=cd(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(i,e,t):xn.push({themeFor:i,styles:e,include:t.include,moduleId:t.moduleId}),i&&jo.forEach(o=>{if(Cn(i,o)&&hd(o)){const s=customElements.get(o);md(s,e)?console.warn(`Registering styles that already exist for ${o}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${o}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),An(s),_d(s)}})}function ao(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():xn}function fd(i=""){let e=0;return i.startsWith("lumo-")||i.startsWith("material-")?e=1:i.startsWith("vaadin-")&&(e=2),e}function En(i){const e=[];return i.include&&[].concat(i.include).forEach(t=>{const o=ao().find(s=>s.moduleId===t);o?e.push(...En(o),...o.styles):console.warn(`Included moduleId ${t} not found in style registry`)},i.styles),e}function vd(i){const e=`${i}-default-theme`,t=ao().filter(o=>o.moduleId!==e&&Cn(o.themeFor,i)).map(o=>ci(we({},o),{styles:[...En(o),...o.styles],includePriority:fd(o.moduleId)})).sort((o,s)=>s.includePriority-o.includePriority);return t.length>0?t:ao().filter(o=>o.moduleId===e)}const N=i=>class extends yn(i){constructor(){super(),no.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&jo.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||wn(this)||ud(this.getStylesForThis(),e)}static finalizeStyles(e){const t=this.getStylesForThis();return e?[...[e].flat(1/0),...t]:t}static getStylesForThis(){const e=i.__themes||[],t=Object.getPrototypeOf(this.prototype),o=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...o,...vd(this.is)];const s=this.__themes.flatMap(r=>r.styles);return s.filter((r,n)=>n===s.lastIndexOf(r))}};/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
39
39
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
40
|
-
*/const
|
|
41
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},
|
|
40
|
+
*/const gd=(i,...e)=>{const t=document.createElement("style");t.id=i,t.textContent=e.map(o=>o.toString()).join(`
|
|
41
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},Ze=(i,...e)=>{gd(`lumo-${i}`,e)};/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
44
44
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
45
|
-
*/const
|
|
45
|
+
*/const bd=m`
|
|
46
46
|
:host {
|
|
47
47
|
/* Base (background) */
|
|
48
48
|
--lumo-base-color: #fff;
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
--lumo-disabled-text-color: GrayText;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
`;
|
|
130
|
+
`;Ze("color-props",bd);const yd=m`
|
|
131
131
|
[theme~='dark'] {
|
|
132
132
|
/* Base (background) */
|
|
133
133
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -245,11 +245,11 @@
|
|
|
245
245
|
pre code {
|
|
246
246
|
background: transparent;
|
|
247
247
|
}
|
|
248
|
-
`;b("",
|
|
248
|
+
`;b("",yd,{moduleId:"lumo-color"});/**
|
|
249
249
|
* @license
|
|
250
250
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
251
251
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
252
|
-
*/const
|
|
252
|
+
*/const xd=m`
|
|
253
253
|
@font-face {
|
|
254
254
|
font-family: 'lumo-icons';
|
|
255
255
|
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==)
|
|
@@ -302,11 +302,11 @@
|
|
|
302
302
|
--lumo-icons-upload: '\\ea29';
|
|
303
303
|
--lumo-icons-user: '\\ea2a';
|
|
304
304
|
}
|
|
305
|
-
`;
|
|
305
|
+
`;Ze("font-icons",xd);/**
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
308
308
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
309
|
-
*/const
|
|
309
|
+
*/const wd=m`
|
|
310
310
|
:host {
|
|
311
311
|
--lumo-size-xs: 1.625rem;
|
|
312
312
|
--lumo-size-s: 1.875rem;
|
|
@@ -321,11 +321,11 @@
|
|
|
321
321
|
/* For backwards compatibility */
|
|
322
322
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
323
323
|
}
|
|
324
|
-
`;
|
|
324
|
+
`;Ze("sizing-props",wd);/**
|
|
325
325
|
* @license
|
|
326
326
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
327
327
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
328
|
-
*/const
|
|
328
|
+
*/const Cd=m`
|
|
329
329
|
:host {
|
|
330
330
|
/* Square */
|
|
331
331
|
--lumo-space-xs: 0.25rem;
|
|
@@ -348,11 +348,11 @@
|
|
|
348
348
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
349
349
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
350
350
|
}
|
|
351
|
-
`;
|
|
351
|
+
`;Ze("spacing-props",Cd);/**
|
|
352
352
|
* @license
|
|
353
353
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
354
354
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
355
|
-
*/const
|
|
355
|
+
*/const Id=m`
|
|
356
356
|
:host {
|
|
357
357
|
/* Border radius */
|
|
358
358
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -452,11 +452,11 @@
|
|
|
452
452
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
453
453
|
--vaadin-input-field-value-font-weight: 500;
|
|
454
454
|
}
|
|
455
|
-
`;
|
|
455
|
+
`;Ze("style-props",Id);/**
|
|
456
456
|
* @license
|
|
457
457
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
458
458
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
459
|
-
*/const
|
|
459
|
+
*/const Ad=m`
|
|
460
460
|
:host {
|
|
461
461
|
/* prettier-ignore */
|
|
462
462
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
--lumo-line-height-s: 1.375;
|
|
477
477
|
--lumo-line-height-m: 1.625;
|
|
478
478
|
}
|
|
479
|
-
`,
|
|
479
|
+
`,Ed=m`
|
|
480
480
|
body,
|
|
481
481
|
:host {
|
|
482
482
|
font-family: var(--lumo-font-family);
|
|
@@ -568,7 +568,7 @@
|
|
|
568
568
|
border-left: none;
|
|
569
569
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
570
570
|
}
|
|
571
|
-
`;b("",
|
|
571
|
+
`;b("",Ed,{moduleId:"lumo-typography"});Ze("typography-props",Ad);b("vaadin-checkbox",m`
|
|
572
572
|
:host {
|
|
573
573
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
574
574
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -888,7 +888,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
888
888
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
889
889
|
Code distributed by Google as part of the polymer project is also
|
|
890
890
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
891
|
-
*/let
|
|
891
|
+
*/let kd=/(url\()([^)]*)(\))/g,Sd=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,Lt,Y;function ft(i,e){if(i&&Sd.test(i)||i==="//")return i;if(Lt===void 0){Lt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Lt=t.href==="http://a/c%20d"}catch(t){}}if(e||(e=document.baseURI||window.location.href),Lt)try{return new URL(i,e).href}catch(t){return i}return Y||(Y=document.implementation.createHTMLDocument("temp"),Y.base=Y.createElement("base"),Y.head.appendChild(Y.base),Y.anchor=Y.createElement("a"),Y.body.appendChild(Y.anchor)),Y.base.href=e,Y.anchor.href=i,Y.anchor.href||i}function Yo(i,e){return i.replace(kd,function(t,o,s,r){return o+"'"+ft(s.replace(/["']/g,""),e)+"'"+r})}function Go(i){return i.substring(0,i.lastIndexOf("/")+1)}/**
|
|
892
892
|
@license
|
|
893
893
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
894
894
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -896,7 +896,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
896
896
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
897
897
|
Code distributed by Google as part of the polymer project is also
|
|
898
898
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
899
|
-
*/const kn=!window.ShadyDOM||!window.ShadyDOM.inUse;!window.ShadyCSS||window.ShadyCSS.nativeCss;const
|
|
899
|
+
*/const kn=!window.ShadyDOM||!window.ShadyDOM.inUse;!window.ShadyCSS||window.ShadyCSS.nativeCss;const Pd=kn&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const i=new CSSStyleSheet;i.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[i],e.shadowRoot.adoptedStyleSheets[0]===i}catch(i){return!1}})();let Td=window.Polymer&&window.Polymer.rootPath||Go(document.baseURI||window.location.href),ti=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;window.Polymer&&window.Polymer.setPassiveTouchGestures;let ii=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Dd=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Sn=window.Polymer&&window.Polymer.legacyOptimizations||!1,Pn=window.Polymer&&window.Polymer.legacyWarnings||!1,Od=window.Polymer&&window.Polymer.syncInitialRender||!1,lo=window.Polymer&&window.Polymer.legacyUndefined||!1,zd=window.Polymer&&window.Polymer.orderedComputed||!1,gr=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Nd=window.Polymer&&window.Polymer.fastDomIf||!1,br=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;window.Polymer&&window.Polymer.legacyNoObservedAttributes;let Ld=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
900
900
|
@license
|
|
901
901
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
902
902
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -904,7 +904,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
904
904
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
905
905
|
Code distributed by Google as part of the polymer project is also
|
|
906
906
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
907
|
-
*/let
|
|
907
|
+
*/let Vd=0;const M=function(i){let e=i.__mixinApplications;e||(e=new WeakMap,i.__mixinApplications=e);let t=Vd++;function o(s){let r=s.__mixinSet;if(r&&r[t])return s;let n=e,a=n.get(s);if(!a){a=i(s),n.set(s,a);let l=Object.create(a.__mixinSet||r||null);l[t]=!0,a.__mixinSet=l}return a}return o};/**
|
|
908
908
|
@license
|
|
909
909
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
910
910
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -912,7 +912,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
912
912
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
913
913
|
Code distributed by Google as part of the polymer project is also
|
|
914
914
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
915
|
-
*/let
|
|
915
|
+
*/let Ko={},Tn={};function yr(i,e){Ko[i]=Tn[i.toLowerCase()]=e}function xr(i){return Ko[i]||Tn[i.toLowerCase()]}function Md(i){i.querySelector("style")&&console.warn("dom-module %s has style outside template",i.id)}class xt extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let o=xr(e);return o&&t?o.querySelector(t):o}return null}attributeChangedCallback(e,t,o,s){t!==o&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=ft(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=Go(t)}return this.__assetpath}register(e){if(e=e||this.id,e){if(ii&&xr(e)!==void 0)throw yr(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,yr(e,this),Md(this)}}}xt.prototype.modules=Ko;customElements.define("dom-module",xt);/**
|
|
916
916
|
@license
|
|
917
917
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
918
918
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -920,7 +920,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
920
920
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
921
921
|
Code distributed by Google as part of the polymer project is also
|
|
922
922
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
923
|
-
*/const
|
|
923
|
+
*/const Bd="link[rel=import][type~=css]",Fd="include",wr="shady-unscoped";function Dn(i){return xt.import(i)}function Cr(i){let e=i.body?i.body:i;const t=Yo(e.textContent,i.baseURI),o=document.createElement("style");return o.textContent=t,o}function Rd(i){const e=i.trim().split(/\s+/),t=[];for(let o=0;o<e.length;o++)t.push(...Hd(e[o]));return t}function Hd(i){const e=Dn(i);if(!e)return console.warn("Could not find style data in module named",i),[];if(e._styles===void 0){const t=[];t.push(...zn(e));const o=e.querySelector("template");o&&t.push(...On(o,e.assetpath)),e._styles=t}return e._styles}function On(i,e){if(!i._styles){const t=[],o=i.content.querySelectorAll("style");for(let s=0;s<o.length;s++){let r=o[s],n=r.getAttribute(Fd);n&&t.push(...Rd(n).filter(function(a,l,d){return d.indexOf(a)===l})),e&&(r.textContent=Yo(r.textContent,e)),t.push(r)}i._styles=t}return i._styles}function qd(i){let e=Dn(i);return e?zn(e):[]}function zn(i){const e=[],t=i.querySelectorAll(Bd);for(let o=0;o<t.length;o++){let s=t[o];if(s.import){const r=s.import,n=s.hasAttribute(wr);if(n&&!r._unscopedStyle){const a=Cr(r);a.setAttribute(wr,""),r._unscopedStyle=a}else r._style||(r._style=Cr(r));e.push(n?r._unscopedStyle:r._style)}}return e}/**
|
|
924
924
|
@license
|
|
925
925
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
926
926
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -936,7 +936,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
936
936
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
937
937
|
Code distributed by Google as part of the polymer project is also
|
|
938
938
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
939
|
-
*/function
|
|
939
|
+
*/function ho(i){return i.indexOf(".")>=0}function Le(i){let e=i.indexOf(".");return e===-1?i:i.slice(0,e)}function Nn(i,e){return i.indexOf(e+".")===0}function wt(i,e){return e.indexOf(i+".")===0}function Ct(i,e,t){return e+t.slice(i.length)}function $d(i,e){return i===e||Nn(i,e)||wt(i,e)}function ct(i){if(Array.isArray(i)){let e=[];for(let t=0;t<i.length;t++){let o=i[t].toString().split(".");for(let s=0;s<o.length;s++)e.push(o[s])}return e.join(".")}else return i}function Ln(i){return Array.isArray(i)?ct(i).split("."):i.toString().split(".")}function W(i,e,t){let o=i,s=Ln(e);for(let r=0;r<s.length;r++){if(!o)return;let n=s[r];o=o[n]}return t&&(t.path=s.join(".")),o}function Ir(i,e,t){let o=i,s=Ln(e),r=s[s.length-1];if(s.length>1){for(let n=0;n<s.length-1;n++){let a=s[n];if(o=o[a],!o)return}o[r]=t}else o[e]=t;return s.join(".")}/**
|
|
940
940
|
@license
|
|
941
941
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
942
942
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -944,7 +944,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
944
944
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
945
945
|
Code distributed by Google as part of the polymer project is also
|
|
946
946
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
947
|
-
*/const
|
|
947
|
+
*/const oi={},Wd=/-[a-z]/g,Ud=/([A-Z])/g;function Vn(i){return oi[i]||(oi[i]=i.indexOf("-")<0?i:i.replace(Wd,e=>e[1].toUpperCase()))}function _i(i){return oi[i]||(oi[i]=i.replace(Ud,"-$1").toLowerCase())}/**
|
|
948
948
|
@license
|
|
949
949
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
950
950
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -952,7 +952,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
952
952
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
953
953
|
Code distributed by Google as part of the polymer project is also
|
|
954
954
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
955
|
-
*/let
|
|
955
|
+
*/let jd=0,Mn=0,We=[],Yd=0,co=!1,Bn=document.createTextNode("");new window.MutationObserver(Gd).observe(Bn,{characterData:!0});function Gd(){co=!1;const i=We.length;for(let e=0;e<i;e++){let t=We[e];if(t)try{t()}catch(o){setTimeout(()=>{throw o})}}We.splice(0,i),Mn+=i}const Kd={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},Fn={run(i){return co||(co=!0,Bn.textContent=Yd++),We.push(i),jd++},cancel(i){const e=i-Mn;if(e>=0){if(!We[e])throw new Error("invalid async handle: "+i);We[e]=null}}};/**
|
|
956
956
|
@license
|
|
957
957
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
958
958
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -960,7 +960,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
960
960
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
961
961
|
Code distributed by Google as part of the polymer project is also
|
|
962
962
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
963
|
-
*/const
|
|
963
|
+
*/const Xd=Fn,Rn=M(i=>{class e extends i{static createProperties(o){const s=this.prototype;for(let r in o)r in s||s._createPropertyAccessor(r)}static attributeNameForProperty(o){return o.toLowerCase()}static typeForProperty(o){}_createPropertyAccessor(o,s){this._addPropertyToAttributeMap(o),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[o]||(this.__dataHasAccessor[o]=!0,this._definePropertyAccessor(o,s))}_addPropertyToAttributeMap(o){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let s=this.__dataAttributes[o];return s||(s=this.constructor.attributeNameForProperty(o),this.__dataAttributes[s]=o),s}_definePropertyAccessor(o,s){Object.defineProperty(this,o,{get(){return this.__data[o]},set:s?function(){}:function(r){this._setPendingProperty(o,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 o in this.__dataHasAccessor)this.hasOwnProperty(o)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[o]=this[o],delete this[o])}_initializeInstanceProperties(o){Object.assign(this,o)}_setProperty(o,s){this._setPendingProperty(o,s)&&this._invalidateProperties()}_getProperty(o){return this.__data[o]}_setPendingProperty(o,s,r){let n=this.__data[o],a=this._shouldPropertyChange(o,s,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(o in this.__dataOld)&&(this.__dataOld[o]=n),this.__data[o]=s,this.__dataPending[o]=s),a}_isPropertyPending(o){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(o))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Xd.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 o=this.__data,s=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(o,s,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(o,s,r)),this.__dataCounter--}_shouldPropertiesChange(o,s,r){return!!s}_propertiesChanged(o,s,r){}_shouldPropertyChange(o,s,r){return r!==s&&(r===r||s===s)}attributeChangedCallback(o,s,r,n){s!==r&&this._attributeToProperty(o,r),super.attributeChangedCallback&&super.attributeChangedCallback(o,s,r,n)}_attributeToProperty(o,s,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[o]||o;this[a]=this._deserializeValue(s,r||this.constructor.typeForProperty(a))}}_propertyToAttribute(o,s,r){this.__serializing=!0,r=arguments.length<3?this[o]:r,this._valueToNodeAttribute(this,r,s||this.constructor.attributeNameForProperty(o)),this.__serializing=!1}_valueToNodeAttribute(o,s,r){const n=this._serializeValue(s);(r==="class"||r==="name"||r==="slot")&&(o=H(o)),n===void 0?o.removeAttribute(r):o.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n)}_serializeValue(o){switch(typeof o){case"boolean":return o?"":void 0;default:return o!=null?o.toString():void 0}}_deserializeValue(o,s){switch(s){case Boolean:return o!==null;case Number:return Number(o);default:return o}}}return e});/**
|
|
964
964
|
@license
|
|
965
965
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
966
966
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -968,7 +968,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
968
968
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
969
969
|
Code distributed by Google as part of the polymer project is also
|
|
970
970
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
971
|
-
*/const Hn={};let
|
|
971
|
+
*/const Hn={};let Vt=HTMLElement.prototype;for(;Vt;){let i=Object.getOwnPropertyNames(Vt);for(let e=0;e<i.length;e++)Hn[i[e]]=!0;Vt=Object.getPrototypeOf(Vt)}const Jd=window.trustedTypes?i=>trustedTypes.isHTML(i)||trustedTypes.isScript(i)||trustedTypes.isScriptURL(i):()=>!1;function Qd(i,e){if(!Hn[e]){let t=i[e];t!==void 0&&(i.__data?i._setPendingProperty(e,t):(i.__dataProto?i.hasOwnProperty(JSCompiler_renameProperty("__dataProto",i))||(i.__dataProto=Object.create(i.__dataProto)):i.__dataProto={},i.__dataProto[e]=t))}}const Zd=M(i=>{const e=Rn(i);class t extends e{static createPropertiesForAttributes(){let s=this.observedAttributes;for(let r=0;r<s.length;r++)this.prototype._createPropertyAccessor(Vn(s[r]))}static attributeNameForProperty(s){return _i(s)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(s){for(let r in s)this._setProperty(r,s[r])}_ensureAttribute(s,r){const n=this;n.hasAttribute(s)||this._valueToNodeAttribute(n,r,s)}_serializeValue(s){switch(typeof s){case"object":if(s instanceof Date)return s.toString();if(s){if(Jd(s))return s;try{return JSON.stringify(s)}catch(r){return""}}default:return super._serializeValue(s)}}_deserializeValue(s,r){let n;switch(r){case Object:try{n=JSON.parse(s)}catch(a){n=s}break;case Array:try{n=JSON.parse(s)}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${s}`)}break;case Date:n=isNaN(s)?String(s):Number(s),n=new Date(n);break;default:n=super._deserializeValue(s,r);break}return n}_definePropertyAccessor(s,r){Qd(this,s),super._definePropertyAccessor(s,r)}_hasAccessor(s){return this.__dataHasAccessor&&this.__dataHasAccessor[s]}_isPropertyPending(s){return!!(this.__dataPending&&s in this.__dataPending)}}return t});/**
|
|
972
972
|
@license
|
|
973
973
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
974
974
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -976,7 +976,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
976
976
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
977
977
|
Code distributed by Google as part of the polymer project is also
|
|
978
978
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
979
|
-
*/const
|
|
979
|
+
*/const eh={"dom-if":!0,"dom-repeat":!0};let Ar=!1,Er=!1;function th(){if(!Ar){Ar=!0;const i=document.createElement("textarea");i.placeholder="a",Er=i.placeholder===i.textContent}return Er}function ih(i){th()&&i.localName==="textarea"&&i.placeholder&&i.placeholder===i.textContent&&(i.textContent=null)}const oh=(()=>{const i=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(e,t,o)=>{const s=t.getAttribute(o);if(i&&o.startsWith("on-")){e.setAttribute(o,i.createScript(s,o));return}e.setAttribute(o,s)}})();function sh(i){let e=i.getAttribute("is");if(e&&eh[e]){let t=i;for(t.removeAttribute("is"),i=t.ownerDocument.createElement(e),t.parentNode.replaceChild(i,t),i.appendChild(t);t.attributes.length;){const{name:o}=t.attributes[0];oh(i,t,o),t.removeAttribute(o)}}return i}function qn(i,e){let t=e.parentInfo&&qn(i,e.parentInfo);if(t){for(let o=t.firstChild,s=0;o;o=o.nextSibling)if(e.parentIndex===s++)return o}else return i}function rh(i,e,t,o){o.id&&(e[o.id]=t)}function nh(i,e,t){if(t.events&&t.events.length)for(let o=0,s=t.events,r;o<s.length&&(r=s[o]);o++)i._addMethodEventListenerToNode(e,r.name,r.value,i)}function ah(i,e,t,o){t.templateInfo&&(e._templateInfo=t.templateInfo,e._parentTemplateInfo=o)}function lh(i,e,t){return i=i._methodHost||i,function(o){i[t]?i[t](o,o.detail):console.warn("listener method `"+t+"` not defined")}}const dh=M(i=>{class e extends i{static _parseTemplate(o,s){if(!o._templateInfo){let r=o._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!s,r.stripWhiteSpace=s&&s.stripWhiteSpace||o.hasAttribute&&o.hasAttribute("strip-whitespace"),this._parseTemplateContent(o,r,{parent:null})}return o._templateInfo}static _parseTemplateContent(o,s,r){return this._parseTemplateNode(o.content,s,r)}static _parseTemplateNode(o,s,r){let n=!1,a=o;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,s,r)||n:a.localName==="slot"&&(s.hasInsertionPoint=!0),ih(a),a.firstChild&&this._parseTemplateChildNodes(a,s,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,s,r)||n),n||r.noted}static _parseTemplateChildNodes(o,s,r){if(!(o.localName==="script"||o.localName==="style"))for(let n=o.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=sh(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let u=l;for(;u&&u.nodeType===Node.TEXT_NODE;)n.textContent+=u.textContent,l=u.nextSibling,o.removeChild(u),u=l;if(s.stripWhiteSpace&&!n.textContent.trim()){o.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,s,d)&&(d.infoIndex=s.nodeInfoList.push(d)-1),n.parentNode&&a++}}static _parseTemplateNestedTemplate(o,s,r){let n=o,a=this._parseTemplate(n,s);return(a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(o,s,r){let n=!1,a=Array.from(o.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(o,s,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(o,s,r,n,a){return n.slice(0,3)==="on-"?(o.removeAttribute(n),r.events=r.events||[],r.events.push({name:n.slice(3),value:a}),!0):n==="id"?(r.id=a,!0):!1}static _contentForTemplate(o){let s=o._templateInfo;return s&&s.content||o.content}_stampTemplate(o,s){o&&!o.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(o),s=s||this.constructor._parseTemplate(o);let r=s.nodeInfoList,n=s.content||o.content,a=document.importNode(n,!0);a.__noInsertionPoint=!s.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,u=r.length,c;d<u&&(c=r[d]);d++){let p=l[d]=qn(a,c);rh(this,a.$,p,c),ah(this,p,c,s),nh(this,p,c)}return a=a,a}_addMethodEventListenerToNode(o,s,r,n){n=n||o;let a=lh(n,s,r);return this._addEventListenerToNode(o,s,a),a}_addEventListenerToNode(o,s,r){o.addEventListener(s,r)}_removeEventListenerFromNode(o,s,r){o.removeEventListener(s,r)}}return e});/**
|
|
980
980
|
* @fileoverview
|
|
981
981
|
* @suppress {checkPrototypalTypes}
|
|
982
982
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -986,7 +986,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
986
986
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
987
987
|
* Google as part of the polymer project is also subject to an additional IP
|
|
988
988
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
989
|
-
*/let Ct=0;const It=[],I={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},qn="__computeInfo",lh=/[A-Z]/;function zi(i,e,t){let o=i[e];if(!o)o=i[e]={};else if(!i.hasOwnProperty(e)&&(o=i[e]=Object.create(i[e]),t))for(let s in o){let r=o[s],n=o[s]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a]}return o}function ct(i,e,t,o,s,r){if(e){let n=!1;const a=Ct++;for(let l in t){let d=s?Ne(l):l,u=e[d];if(u)for(let c=0,p=u.length,_;c<p&&(_=u[c]);c++)(!_.info||_.info.lastRun!==a)&&(!s||Ko(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(i,l,t,o,_.info,s,r),n=!0)}return n}return!1}function dh(i,e,t,o,s,r,n,a){let l=!1,d=n?Ne(o):o,u=e[d];if(u)for(let c=0,p=u.length,_;c<p&&(_=u[c]);c++)(!_.info||_.info.lastRun!==t)&&(!n||Ko(o,_.trigger))&&(_.info&&(_.info.lastRun=t),_.fn(i,o,s,r,_.info,n,a),l=!0);return l}function Ko(i,e){if(e){let t=e.name;return t==i||!!(e.structured&&Nn(t,i))||!!(e.wildcard&&xt(t,i))}else return!0}function kr(i,e,t,o,s){let r=typeof s.method=="string"?i[s.method]:s.method,n=s.property;r?r.call(i,i.__data[n],o[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function hh(i,e,t,o,s){let r=i[I.NOTIFY],n,a=Ct++;for(let d in e)e[d]&&(r&&dh(i,r,a,d,t,o,s)||s&&ch(i,d,t))&&(n=!0);let l;n&&(l=i.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function ch(i,e,t){let o=Ne(e);if(o!==e){let s=pi(o)+"-changed";return Wn(i,s,t[e],e),!0}return!1}function Wn(i,e,t,o){let s={value:t,queueProperty:!0};o&&(s.path=o),H(i).dispatchEvent(new CustomEvent(e,{detail:s}))}function uh(i,e,t,o,s,r){let n=(r?Ne(e):e)!=e?e:null,a=n?W(i,n):i.__data[e];n&&a===void 0&&(a=t[e]),Wn(i,s.eventName,a,n)}function ph(i,e,t,o,s){let r,n=i.detail,a=n&&n.path;a?(o=wt(t,o,a),r=n&&n.value):r=i.currentTarget[t],r=s?!r:r,(!e[I.READ_ONLY]||!e[I.READ_ONLY][o])&&e._setPendingPropertyOrPath(o,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}function _h(i,e,t,o,s){let r=i.__data[e];ei&&(r=ei(r,s.attrName,"attribute",i)),i._propertyToAttribute(e,s.attrName,r)}function mh(i,e,t,o){let s=i[I.COMPUTE];if(s)if(Dd){Ct++;const r=vh(i),n=[];for(let l in e)Sr(l,s,n,r,o);let a;for(;a=n.shift();)Un(i,"",e,t,a)&&Sr(a.methodInfo,s,n,r,o);Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),i.__dataPending=null}else{let r=e;for(;ct(i,s,r,t,o);)Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),r=i.__dataPending,i.__dataPending=null}}const fh=(i,e,t)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const n=o+s>>1,a=t.get(e[n].methodInfo)-t.get(i.methodInfo);if(a<0)o=n+1;else if(a>0)s=n-1;else{r=n;break}}r<0&&(r=s+1),e.splice(r,0,i)},Sr=(i,e,t,o,s)=>{const r=s?Ne(i):i,n=e[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Ct&&(!s||Ko(i,l.trigger))&&(l.info.lastRun=Ct,fh(l.info,t,o))}};function vh(i){let e=i.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=i[I.COMPUTE];let{counts:o,ready:s,total:r}=gh(i),n;for(;n=s.shift();){e.set(n,e.size);const a=t[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--o[d]===0&&s.push(d)})}r!==0&&console.warn(`Computed graph for ${i.localName} incomplete; circular?`),i.constructor.__orderedComputedDeps=e}return e}function gh(i){const e=i[qn],t={},o=i[I.COMPUTE],s=[];let r=0;for(let n in e){const a=e[n];r+=t[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0)}for(let n in o)e[n]||s.push(n);return{counts:t,ready:s,total:r}}function Un(i,e,t,o,s){let r=co(i,e,t,o,s);if(r===It)return!1;let n=s.methodInfo;return i.__dataHasAccessor&&i.__dataHasAccessor[n]?i._setPendingProperty(n,r,!0):(i[n]=r,!1)}function bh(i,e,t){let o=i.__dataLinkedPaths;if(o){let s;for(let r in o){let n=o[r];xt(r,e)?(s=wt(r,n,e),i._setPendingPropertyOrPath(s,t,!0,!0)):xt(n,e)&&(s=wt(n,r,e),i._setPendingPropertyOrPath(s,t,!0,!0))}}}function Ni(i,e,t,o,s,r,n){t.bindings=t.bindings||[];let a={kind:o,target:s,parts:r,literal:n,isCompound:r.length!==1};if(t.bindings.push(a),Ih(a)){let{event:d,negate:u}=a.parts[0];a.listenerEvent=d||pi(s)+"-changed",a.listenerNegate=u}let l=e.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let u=a.parts[d];u.compoundIndex=d,yh(i,e,a,u,l)}}function yh(i,e,t,o,s){if(!o.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=o.dependencies,n={index:s,binding:t,part:o,evaluator:i};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=Yn(l),l.wildcard=!0),i._addTemplatePropertyEffect(e,l.rootProperty,{fn:xh,info:n,trigger:l})}}}function xh(i,e,t,o,s,r,n){let a=n[s.index],l=s.binding,d=s.part;if(r&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let u=t[e];e=wt(d.source,l.target,e),a._setPendingPropertyOrPath(e,u,!1,!0)&&i._enqueueClient(a)}else{let u=s.evaluator._evaluateBinding(i,d,e,t,o,r);u!==It&&wh(i,a,l,d,u)}}function wh(i,e,t,o,s){if(s=Ch(e,s,t,o),ei&&(s=ei(s,t.target,t.kind,e)),t.kind=="attribute")i._valueToNodeAttribute(e,s,t.target);else{let r=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?(!e[I.READ_ONLY]||!e[I.READ_ONLY][r])&&e._setPendingProperty(r,s)&&i._enqueueClient(e):i._setUnmanagedPropertyToNode(e,r,s)}}function Ch(i,e,t,o){if(t.isCompound){let s=i.__dataCompoundStorage[t.target];s[o.compoundIndex]=e,e=s.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(i.localName==="input"||i.localName==="textarea"))&&(e=e==null?"":e),e}function Ih(i){return!!i.target&&i.kind!="attribute"&&i.kind!="text"&&!i.isCompound&&i.parts[0].mode==="{"}function Ah(i,e){let{nodeList:t,nodeInfoList:o}=e;if(o.length)for(let s=0;s<o.length;s++){let r=o[s],n=t[s],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];Eh(n,d),kh(n,i,d)}n.__dataHost=i}}function Eh(i,e){if(e.isCompound){let t=i.__dataCompoundStorage||(i.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let n=0;n<o.length;n++)s[n]=o[n].literal;let r=e.target;t[r]=s,e.literal&&e.kind=="property"&&(r==="className"&&(i=H(i)),i[r]=e.literal)}}function kh(i,e,t){if(t.listenerEvent){let o=t.parts[0];i.addEventListener(t.listenerEvent,function(s){ph(s,e,t.target,o.source,o.negate)})}}function Pr(i,e,t,o,s,r){r=e.static||r&&(typeof r!="object"||r[e.methodName]);let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r};for(let a=0,l;a<e.args.length&&(l=e.args[a]);a++)l.literal||i._addPropertyEffect(l.rootProperty,t,{fn:o,info:n,trigger:l});return r&&i._addPropertyEffect(e.methodName,t,{fn:o,info:n}),n}function co(i,e,t,o,s){let r=i._methodHost||i,n=r[s.methodName];if(n){let a=i._marshalArgs(s.args,e,t);return a===It?It:n.apply(r,a)}else s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Sh=[],jn="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ph="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",Th="(?:'(?:[^'\\\\]|\\\\.)*')",Dh='(?:"(?:[^"\\\\]|\\\\.)*")',Oh="(?:"+Th+"|"+Dh+")",Tr="(?:("+jn+"|"+Ph+"|"+Oh+")\\s*)",zh="(?:"+Tr+"(?:,\\s*"+Tr+")*)",Nh="(?:\\(\\s*(?:"+zh+"?)\\)\\s*)",Lh="("+jn+"\\s*"+Nh+"?)",Vh="(\\[\\[|{{)\\s*",Mh="(?:]]|}})",Bh="(?:(!)\\s*)?",Fh=Vh+Bh+Lh+Mh,Dr=new RegExp(Fh,"g");function Or(i){let e="";for(let t=0;t<i.length;t++){let o=i[t].literal;e+=o||""}return e}function Li(i){let e=i.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Sh};if(e[2].trim()){let o=e[2].replace(/\\,/g,",").split(",");return Rh(o,t)}else return t}return null}function Rh(i,e){return e.args=i.map(function(t){let o=Yn(t);return o.literal||(e.static=!1),o},this),e}function Yn(i){let e=i.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},o=e[0];switch(o==="-"&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=Ne(e),t.structured=lo(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function zr(i,e,t){let o=W(i,t);return o===void 0&&(o=e[t]),o}function Gn(i,e,t,o){const s={indexSplices:o};ao&&!i._overrideLegacyUndefined&&(e.splices=s),i.notifyPath(t+".splices",s),i.notifyPath(t+".length",e.length),ao&&!i._overrideLegacyUndefined&&(s.indexSplices=[])}function nt(i,e,t,o,s,r){Gn(i,e,t,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}function Hh(i){return i[0].toUpperCase()+i.substring(1)}const Xo=E(i=>{const e=ah(Jd(i));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 I}_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(at.length){let s=at[at.length-1];s._enqueueClient(this),this.__dataHost=s}}_initializeProtoProperties(s){this.__data=Object.create(s),this.__dataPending=Object.create(s),this.__dataOld={}}_initializeInstanceProperties(s){let r=this[I.READ_ONLY];for(let n in s)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=s[n])}_addPropertyEffect(s,r,n){this._createPropertyAccessor(s,r==I.READ_ONLY);let a=zi(this,r,!0)[s];a||(a=this[r][s]=[]),a.push(n)}_removePropertyEffect(s,r,n){let a=zi(this,r,!0)[s],l=a.indexOf(n);l>=0&&a.splice(l,1)}_hasPropertyEffect(s,r){let n=this[r];return!!(n&&n[s])}_hasReadOnlyEffect(s){return this._hasPropertyEffect(s,I.READ_ONLY)}_hasNotifyEffect(s){return this._hasPropertyEffect(s,I.NOTIFY)}_hasReflectEffect(s){return this._hasPropertyEffect(s,I.REFLECT)}_hasComputedEffect(s){return this._hasPropertyEffect(s,I.COMPUTE)}_setPendingPropertyOrPath(s,r,n,a){if(a||Ne(Array.isArray(s)?s[0]:s)!==s){if(!a){let l=W(this,s);if(s=Ir(this,s,r),!s||!super._shouldPropertyChange(s,r,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(s,r,n))return bh(this,s,r),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[s])return this._setPendingProperty(s,r,n);this[s]=r}return!1}_setUnmanagedPropertyToNode(s,r,n){(n!==s[r]||typeof n=="object")&&(r==="className"&&(s=H(s)),s[r]=n)}_setPendingProperty(s,r,n){let a=this.__dataHasPaths&&lo(s),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(s,r,l[s])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),s in this.__dataOld||(this.__dataOld[s]=this.__data[s]),a?this.__dataTemp[s]=r:this.__data[s]=r,this.__dataPending[s]=r,(a||this[I.NOTIFY]&&this[I.NOTIFY][s])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[s]=n),!0):!1}_setProperty(s,r){this._setPendingProperty(s,r,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(s){this.__dataPendingClients=this.__dataPendingClients||[],s!==this&&this.__dataPendingClients.push(s)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let s=this.__dataPendingClients;if(s){this.__dataPendingClients=null;for(let r=0;r<s.length;r++){let n=s[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(s,r){for(let n in s)(r||!this[I.READ_ONLY]||!this[I.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,s[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(s,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;mh(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),ct(this,this[I.REFLECT],r,n,a),ct(this,this[I.OBSERVE],r,n,a),l&&hh(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(s,r,n){this[I.PROPAGATE]&&ct(this,this[I.PROPAGATE],s,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,s,r,n)}_runEffectsForTemplate(s,r,n,a){const l=(d,u)=>{ct(this,s.propertyEffects,d,n,u,s.nodeList);for(let c=s.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,u)};s.runEffects?s.runEffects(l,r,a):l(r,a)}linkPaths(s,r){s=ht(s),r=ht(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[s]=r}unlinkPaths(s){s=ht(s),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[s]}notifySplices(s,r){let n={path:""},a=W(this,s,n);Gn(this,a,n.path,r)}get(s,r){return W(r||this,s)}set(s,r,n){n?Ir(n,s,r):(!this[I.READ_ONLY]||!this[I.READ_ONLY][s])&&this._setPendingPropertyOrPath(s,r,!0)&&this._invalidateProperties()}push(s,...r){let n={path:""},a=W(this,s,n),l=a.length,d=a.push(...r);return r.length&&nt(this,a,n.path,l,r.length,[]),d}pop(s){let r={path:""},n=W(this,s,r),a=!!n.length,l=n.pop();return a&&nt(this,n,r.path,n.length,0,[l]),l}splice(s,r,n,...a){let l={path:""},d=W(this,s,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let u;return arguments.length===2?u=d.splice(r):u=d.splice(r,n,...a),(a.length||u.length)&&nt(this,d,l.path,r,a.length,u),u}shift(s){let r={path:""},n=W(this,s,r),a=!!n.length,l=n.shift();return a&&nt(this,n,r.path,0,0,[l]),l}unshift(s,...r){let n={path:""},a=W(this,s,n),l=a.unshift(...r);return r.length&&nt(this,a,n.path,0,r.length,[]),l}notifyPath(s,r){let n;if(arguments.length==1){let a={path:""};r=W(this,s,a),n=a.path}else Array.isArray(s)?n=ht(s):n=s;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(s,r){this._addPropertyEffect(s,I.READ_ONLY),r&&(this["_set"+Hh(s)]=function(n){this._setProperty(s,n)})}_createPropertyObserver(s,r,n){let a={property:s,method:r,dynamicFn:!!n};this._addPropertyEffect(s,I.OBSERVE,{fn:kr,info:a,trigger:{name:s}}),n&&this._addPropertyEffect(r,I.OBSERVE,{fn:kr,info:a,trigger:{name:r}})}_createMethodObserver(s,r){let n=Li(s);if(!n)throw new Error("Malformed observer expression '"+s+"'");Pr(this,n,I.OBSERVE,co,null,r)}_createNotifyingProperty(s){this._addPropertyEffect(s,I.NOTIFY,{fn:uh,info:{eventName:pi(s)+"-changed",property:s}})}_createReflectedProperty(s){let r=this.constructor.attributeNameForProperty(s);r[0]==="-"?console.warn("Property "+s+" 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(s,I.REFLECT,{fn:_h,info:{attrName:r}})}_createComputedProperty(s,r,n){let a=Li(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Pr(this,a,I.COMPUTE,Un,s,n);zi(this,qn)[s]=l}_marshalArgs(s,r,n){const a=this.__data,l=[];for(let d=0,u=s.length;d<u;d++){let{name:c,structured:p,wildcard:_,value:v,literal:x}=s[d];if(!x)if(_){const g=xt(c,r),y=zr(a,n,g?r:c);v={path:g?r:c,value:y,base:g?W(a,c):y}}else v=p?zr(a,n,c):a[c];if(ao&&!this._overrideLegacyUndefined&&v===void 0&&s.length>1)return It;l[d]=v}return l}static addPropertyEffect(s,r,n){this.prototype._addPropertyEffect(s,r,n)}static createPropertyObserver(s,r,n){this.prototype._createPropertyObserver(s,r,n)}static createMethodObserver(s,r){this.prototype._createMethodObserver(s,r)}static createNotifyingProperty(s){this.prototype._createNotifyingProperty(s)}static createReadOnlyProperty(s,r){this.prototype._createReadOnlyProperty(s,r)}static createReflectedProperty(s){this.prototype._createReflectedProperty(s)}static createComputedProperty(s,r,n){this.prototype._createComputedProperty(s,r,n)}static bindTemplate(s){return this.prototype._bindTemplate(s)}_bindTemplate(s,r){let n=this.constructor._parseTemplate(s),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else{const l=s._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(s,r,n){let a=s.hostProps=s.hostProps||{};a[r]=!0;let l=s.propertyEffects=s.propertyEffects||{};(l[r]=l[r]||[]).push(n)}_stampTemplate(s,r){r=r||this._bindTemplate(s,!0),at.push(this);let n=super._stampTemplate(s,r);if(at.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l)}return n.templateInfo=r,Ah(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(s){const r=s.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let u=0;u<d.length;u++){let c=d[u];H(H(c).parentNode).removeChild(c)}}static _parseTemplateNode(s,r,n){let a=e._parseTemplateNode.call(this,s,r,n);if(s.nodeType===Node.TEXT_NODE){let l=this._parseBindings(s.textContent,r);l&&(s.textContent=Or(l)||" ",Ni(this,r,n,"text","textContent",l),a=!0)}return a}static _parseTemplateNodeAttribute(s,r,n,a,l){let d=this._parseBindings(l,r);if(d){let u=a,c="property";lh.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let p=Or(d);return p&&c=="attribute"&&(a=="class"&&s.hasAttribute("class")&&(p+=" "+s.getAttribute(a)),s.setAttribute(a,p)),c=="attribute"&&u=="disable-upgrade$"&&s.setAttribute(a,""),s.localName==="input"&&u==="value"&&s.setAttribute(u,""),s.removeAttribute(u),c==="property"&&(a=Vn(a)),Ni(this,r,n,c,a,d,p),!0}else return e._parseTemplateNodeAttribute.call(this,s,r,n,a,l)}static _parseTemplateNestedTemplate(s,r,n){let a=e._parseTemplateNestedTemplate.call(this,s,r,n);const l=s.parentNode,d=n.templateInfo,u=l.localName==="dom-if",c=l.localName==="dom-repeat";gr&&(u||c)&&(l.removeChild(s),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let p=d.hostProps;if(Od&&u)p&&(r.hostProps=Object.assign(r.hostProps||{},p),gr||(n.parentInfo.noted=!0));else{let _="{";for(let v in p){let x=[{mode:_,source:v,dependencies:[v],hostProp:!0}];Ni(this,r,n,"property","_host_"+v,x)}}return a}static _parseBindings(s,r){let n=[],a=0,l;for(;(l=Dr.exec(s))!==null;){l.index>a&&n.push({literal:s.slice(a,l.index)});let d=l[1][0],u=!!l[2],c=l[3].trim(),p=!1,_="",v=-1;d=="{"&&(v=c.indexOf("::"))>0&&(_=c.substring(v+2),c=c.substring(0,v),p=!0);let x=Li(c),g=[];if(x){let{args:y,methodName:P}=x;for(let C=0;C<y.length;C++){let w=y[C];w.literal||g.push(w)}let V=r.dynamicFns;(V&&V[P]||x.static)&&(g.push(P),x.dynamicFn=!0)}else g.push(c);n.push({source:c,mode:d,negate:u,customEvent:p,signature:x,dependencies:g,event:_}),a=Dr.lastIndex}if(a&&a<s.length){let d=s.substring(a);d&&n.push({literal:d})}return n.length?n:null}static _evaluateBinding(s,r,n,a,l,d){let u;return r.signature?u=co(s,n,a,l,r.signature):n!=r.source?u=W(s,r.source):d&&lo(n)?u=W(s,n):u=s.__data[n],r.negate&&(u=!u),u}}return t}),at=[];/**
|
|
989
|
+
*/let It=0;const At=[],I={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},$n="__computeInfo",hh=/[A-Z]/;function Ni(i,e,t){let o=i[e];if(!o)o=i[e]={};else if(!i.hasOwnProperty(e)&&(o=i[e]=Object.create(i[e]),t))for(let s in o){let r=o[s],n=o[s]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a]}return o}function ut(i,e,t,o,s,r){if(e){let n=!1;const a=It++;for(let l in t){let d=s?Le(l):l,u=e[d];if(u)for(let c=0,p=u.length,_;c<p&&(_=u[c]);c++)(!_.info||_.info.lastRun!==a)&&(!s||Xo(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(i,l,t,o,_.info,s,r),n=!0)}return n}return!1}function ch(i,e,t,o,s,r,n,a){let l=!1,d=n?Le(o):o,u=e[d];if(u)for(let c=0,p=u.length,_;c<p&&(_=u[c]);c++)(!_.info||_.info.lastRun!==t)&&(!n||Xo(o,_.trigger))&&(_.info&&(_.info.lastRun=t),_.fn(i,o,s,r,_.info,n,a),l=!0);return l}function Xo(i,e){if(e){let t=e.name;return t==i||!!(e.structured&&Nn(t,i))||!!(e.wildcard&&wt(t,i))}else return!0}function kr(i,e,t,o,s){let r=typeof s.method=="string"?i[s.method]:s.method,n=s.property;r?r.call(i,i.__data[n],o[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function uh(i,e,t,o,s){let r=i[I.NOTIFY],n,a=It++;for(let d in e)e[d]&&(r&&ch(i,r,a,d,t,o,s)||s&&ph(i,d,t))&&(n=!0);let l;n&&(l=i.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function ph(i,e,t){let o=Le(e);if(o!==e){let s=_i(o)+"-changed";return Wn(i,s,t[e],e),!0}return!1}function Wn(i,e,t,o){let s={value:t,queueProperty:!0};o&&(s.path=o),H(i).dispatchEvent(new CustomEvent(e,{detail:s}))}function _h(i,e,t,o,s,r){let n=(r?Le(e):e)!=e?e:null,a=n?W(i,n):i.__data[e];n&&a===void 0&&(a=t[e]),Wn(i,s.eventName,a,n)}function mh(i,e,t,o,s){let r,n=i.detail,a=n&&n.path;a?(o=Ct(t,o,a),r=n&&n.value):r=i.currentTarget[t],r=s?!r:r,(!e[I.READ_ONLY]||!e[I.READ_ONLY][o])&&e._setPendingPropertyOrPath(o,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}function fh(i,e,t,o,s){let r=i.__data[e];ti&&(r=ti(r,s.attrName,"attribute",i)),i._propertyToAttribute(e,s.attrName,r)}function vh(i,e,t,o){let s=i[I.COMPUTE];if(s)if(zd){It++;const r=bh(i),n=[];for(let l in e)Sr(l,s,n,r,o);let a;for(;a=n.shift();)Un(i,"",e,t,a)&&Sr(a.methodInfo,s,n,r,o);Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),i.__dataPending=null}else{let r=e;for(;ut(i,s,r,t,o);)Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),r=i.__dataPending,i.__dataPending=null}}const gh=(i,e,t)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const n=o+s>>1,a=t.get(e[n].methodInfo)-t.get(i.methodInfo);if(a<0)o=n+1;else if(a>0)s=n-1;else{r=n;break}}r<0&&(r=s+1),e.splice(r,0,i)},Sr=(i,e,t,o,s)=>{const r=s?Le(i):i,n=e[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==It&&(!s||Xo(i,l.trigger))&&(l.info.lastRun=It,gh(l.info,t,o))}};function bh(i){let e=i.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=i[I.COMPUTE];let{counts:o,ready:s,total:r}=yh(i),n;for(;n=s.shift();){e.set(n,e.size);const a=t[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--o[d]===0&&s.push(d)})}r!==0&&console.warn(`Computed graph for ${i.localName} incomplete; circular?`),i.constructor.__orderedComputedDeps=e}return e}function yh(i){const e=i[$n],t={},o=i[I.COMPUTE],s=[];let r=0;for(let n in e){const a=e[n];r+=t[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0)}for(let n in o)e[n]||s.push(n);return{counts:t,ready:s,total:r}}function Un(i,e,t,o,s){let r=uo(i,e,t,o,s);if(r===At)return!1;let n=s.methodInfo;return i.__dataHasAccessor&&i.__dataHasAccessor[n]?i._setPendingProperty(n,r,!0):(i[n]=r,!1)}function xh(i,e,t){let o=i.__dataLinkedPaths;if(o){let s;for(let r in o){let n=o[r];wt(r,e)?(s=Ct(r,n,e),i._setPendingPropertyOrPath(s,t,!0,!0)):wt(n,e)&&(s=Ct(n,r,e),i._setPendingPropertyOrPath(s,t,!0,!0))}}}function Li(i,e,t,o,s,r,n){t.bindings=t.bindings||[];let a={kind:o,target:s,parts:r,literal:n,isCompound:r.length!==1};if(t.bindings.push(a),Eh(a)){let{event:d,negate:u}=a.parts[0];a.listenerEvent=d||_i(s)+"-changed",a.listenerNegate=u}let l=e.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let u=a.parts[d];u.compoundIndex=d,wh(i,e,a,u,l)}}function wh(i,e,t,o,s){if(!o.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=o.dependencies,n={index:s,binding:t,part:o,evaluator:i};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=Yn(l),l.wildcard=!0),i._addTemplatePropertyEffect(e,l.rootProperty,{fn:Ch,info:n,trigger:l})}}}function Ch(i,e,t,o,s,r,n){let a=n[s.index],l=s.binding,d=s.part;if(r&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let u=t[e];e=Ct(d.source,l.target,e),a._setPendingPropertyOrPath(e,u,!1,!0)&&i._enqueueClient(a)}else{let u=s.evaluator._evaluateBinding(i,d,e,t,o,r);u!==At&&Ih(i,a,l,d,u)}}function Ih(i,e,t,o,s){if(s=Ah(e,s,t,o),ti&&(s=ti(s,t.target,t.kind,e)),t.kind=="attribute")i._valueToNodeAttribute(e,s,t.target);else{let r=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?(!e[I.READ_ONLY]||!e[I.READ_ONLY][r])&&e._setPendingProperty(r,s)&&i._enqueueClient(e):i._setUnmanagedPropertyToNode(e,r,s)}}function Ah(i,e,t,o){if(t.isCompound){let s=i.__dataCompoundStorage[t.target];s[o.compoundIndex]=e,e=s.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(i.localName==="input"||i.localName==="textarea"))&&(e=e==null?"":e),e}function Eh(i){return!!i.target&&i.kind!="attribute"&&i.kind!="text"&&!i.isCompound&&i.parts[0].mode==="{"}function kh(i,e){let{nodeList:t,nodeInfoList:o}=e;if(o.length)for(let s=0;s<o.length;s++){let r=o[s],n=t[s],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];Sh(n,d),Ph(n,i,d)}n.__dataHost=i}}function Sh(i,e){if(e.isCompound){let t=i.__dataCompoundStorage||(i.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let n=0;n<o.length;n++)s[n]=o[n].literal;let r=e.target;t[r]=s,e.literal&&e.kind=="property"&&(r==="className"&&(i=H(i)),i[r]=e.literal)}}function Ph(i,e,t){if(t.listenerEvent){let o=t.parts[0];i.addEventListener(t.listenerEvent,function(s){mh(s,e,t.target,o.source,o.negate)})}}function Pr(i,e,t,o,s,r){r=e.static||r&&(typeof r!="object"||r[e.methodName]);let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r};for(let a=0,l;a<e.args.length&&(l=e.args[a]);a++)l.literal||i._addPropertyEffect(l.rootProperty,t,{fn:o,info:n,trigger:l});return r&&i._addPropertyEffect(e.methodName,t,{fn:o,info:n}),n}function uo(i,e,t,o,s){let r=i._methodHost||i,n=r[s.methodName];if(n){let a=i._marshalArgs(s.args,e,t);return a===At?At:n.apply(r,a)}else s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Th=[],jn="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Dh="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",Oh="(?:'(?:[^'\\\\]|\\\\.)*')",zh='(?:"(?:[^"\\\\]|\\\\.)*")',Nh="(?:"+Oh+"|"+zh+")",Tr="(?:("+jn+"|"+Dh+"|"+Nh+")\\s*)",Lh="(?:"+Tr+"(?:,\\s*"+Tr+")*)",Vh="(?:\\(\\s*(?:"+Lh+"?)\\)\\s*)",Mh="("+jn+"\\s*"+Vh+"?)",Bh="(\\[\\[|{{)\\s*",Fh="(?:]]|}})",Rh="(?:(!)\\s*)?",Hh=Bh+Rh+Mh+Fh,Dr=new RegExp(Hh,"g");function Or(i){let e="";for(let t=0;t<i.length;t++){let o=i[t].literal;e+=o||""}return e}function Vi(i){let e=i.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Th};if(e[2].trim()){let o=e[2].replace(/\\,/g,",").split(",");return qh(o,t)}else return t}return null}function qh(i,e){return e.args=i.map(function(t){let o=Yn(t);return o.literal||(e.static=!1),o},this),e}function Yn(i){let e=i.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},o=e[0];switch(o==="-"&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=Le(e),t.structured=ho(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function zr(i,e,t){let o=W(i,t);return o===void 0&&(o=e[t]),o}function Gn(i,e,t,o){const s={indexSplices:o};lo&&!i._overrideLegacyUndefined&&(e.splices=s),i.notifyPath(t+".splices",s),i.notifyPath(t+".length",e.length),lo&&!i._overrideLegacyUndefined&&(s.indexSplices=[])}function at(i,e,t,o,s,r){Gn(i,e,t,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}function $h(i){return i[0].toUpperCase()+i.substring(1)}const Jo=M(i=>{const e=dh(Zd(i));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 I}_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(lt.length){let s=lt[lt.length-1];s._enqueueClient(this),this.__dataHost=s}}_initializeProtoProperties(s){this.__data=Object.create(s),this.__dataPending=Object.create(s),this.__dataOld={}}_initializeInstanceProperties(s){let r=this[I.READ_ONLY];for(let n in s)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=s[n])}_addPropertyEffect(s,r,n){this._createPropertyAccessor(s,r==I.READ_ONLY);let a=Ni(this,r,!0)[s];a||(a=this[r][s]=[]),a.push(n)}_removePropertyEffect(s,r,n){let a=Ni(this,r,!0)[s],l=a.indexOf(n);l>=0&&a.splice(l,1)}_hasPropertyEffect(s,r){let n=this[r];return!!(n&&n[s])}_hasReadOnlyEffect(s){return this._hasPropertyEffect(s,I.READ_ONLY)}_hasNotifyEffect(s){return this._hasPropertyEffect(s,I.NOTIFY)}_hasReflectEffect(s){return this._hasPropertyEffect(s,I.REFLECT)}_hasComputedEffect(s){return this._hasPropertyEffect(s,I.COMPUTE)}_setPendingPropertyOrPath(s,r,n,a){if(a||Le(Array.isArray(s)?s[0]:s)!==s){if(!a){let l=W(this,s);if(s=Ir(this,s,r),!s||!super._shouldPropertyChange(s,r,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(s,r,n))return xh(this,s,r),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[s])return this._setPendingProperty(s,r,n);this[s]=r}return!1}_setUnmanagedPropertyToNode(s,r,n){(n!==s[r]||typeof n=="object")&&(r==="className"&&(s=H(s)),s[r]=n)}_setPendingProperty(s,r,n){let a=this.__dataHasPaths&&ho(s),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(s,r,l[s])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),s in this.__dataOld||(this.__dataOld[s]=this.__data[s]),a?this.__dataTemp[s]=r:this.__data[s]=r,this.__dataPending[s]=r,(a||this[I.NOTIFY]&&this[I.NOTIFY][s])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[s]=n),!0):!1}_setProperty(s,r){this._setPendingProperty(s,r,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(s){this.__dataPendingClients=this.__dataPendingClients||[],s!==this&&this.__dataPendingClients.push(s)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let s=this.__dataPendingClients;if(s){this.__dataPendingClients=null;for(let r=0;r<s.length;r++){let n=s[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(s,r){for(let n in s)(r||!this[I.READ_ONLY]||!this[I.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,s[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(s,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;vh(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),ut(this,this[I.REFLECT],r,n,a),ut(this,this[I.OBSERVE],r,n,a),l&&uh(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(s,r,n){this[I.PROPAGATE]&&ut(this,this[I.PROPAGATE],s,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,s,r,n)}_runEffectsForTemplate(s,r,n,a){const l=(d,u)=>{ut(this,s.propertyEffects,d,n,u,s.nodeList);for(let c=s.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,u)};s.runEffects?s.runEffects(l,r,a):l(r,a)}linkPaths(s,r){s=ct(s),r=ct(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[s]=r}unlinkPaths(s){s=ct(s),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[s]}notifySplices(s,r){let n={path:""},a=W(this,s,n);Gn(this,a,n.path,r)}get(s,r){return W(r||this,s)}set(s,r,n){n?Ir(n,s,r):(!this[I.READ_ONLY]||!this[I.READ_ONLY][s])&&this._setPendingPropertyOrPath(s,r,!0)&&this._invalidateProperties()}push(s,...r){let n={path:""},a=W(this,s,n),l=a.length,d=a.push(...r);return r.length&&at(this,a,n.path,l,r.length,[]),d}pop(s){let r={path:""},n=W(this,s,r),a=!!n.length,l=n.pop();return a&&at(this,n,r.path,n.length,0,[l]),l}splice(s,r,n,...a){let l={path:""},d=W(this,s,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let u;return arguments.length===2?u=d.splice(r):u=d.splice(r,n,...a),(a.length||u.length)&&at(this,d,l.path,r,a.length,u),u}shift(s){let r={path:""},n=W(this,s,r),a=!!n.length,l=n.shift();return a&&at(this,n,r.path,0,0,[l]),l}unshift(s,...r){let n={path:""},a=W(this,s,n),l=a.unshift(...r);return r.length&&at(this,a,n.path,0,r.length,[]),l}notifyPath(s,r){let n;if(arguments.length==1){let a={path:""};r=W(this,s,a),n=a.path}else Array.isArray(s)?n=ct(s):n=s;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(s,r){this._addPropertyEffect(s,I.READ_ONLY),r&&(this["_set"+$h(s)]=function(n){this._setProperty(s,n)})}_createPropertyObserver(s,r,n){let a={property:s,method:r,dynamicFn:!!n};this._addPropertyEffect(s,I.OBSERVE,{fn:kr,info:a,trigger:{name:s}}),n&&this._addPropertyEffect(r,I.OBSERVE,{fn:kr,info:a,trigger:{name:r}})}_createMethodObserver(s,r){let n=Vi(s);if(!n)throw new Error("Malformed observer expression '"+s+"'");Pr(this,n,I.OBSERVE,uo,null,r)}_createNotifyingProperty(s){this._addPropertyEffect(s,I.NOTIFY,{fn:_h,info:{eventName:_i(s)+"-changed",property:s}})}_createReflectedProperty(s){let r=this.constructor.attributeNameForProperty(s);r[0]==="-"?console.warn("Property "+s+" 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(s,I.REFLECT,{fn:fh,info:{attrName:r}})}_createComputedProperty(s,r,n){let a=Vi(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Pr(this,a,I.COMPUTE,Un,s,n);Ni(this,$n)[s]=l}_marshalArgs(s,r,n){const a=this.__data,l=[];for(let d=0,u=s.length;d<u;d++){let{name:c,structured:p,wildcard:_,value:v,literal:x}=s[d];if(!x)if(_){const g=wt(c,r),y=zr(a,n,g?r:c);v={path:g?r:c,value:y,base:g?W(a,c):y}}else v=p?zr(a,n,c):a[c];if(lo&&!this._overrideLegacyUndefined&&v===void 0&&s.length>1)return At;l[d]=v}return l}static addPropertyEffect(s,r,n){this.prototype._addPropertyEffect(s,r,n)}static createPropertyObserver(s,r,n){this.prototype._createPropertyObserver(s,r,n)}static createMethodObserver(s,r){this.prototype._createMethodObserver(s,r)}static createNotifyingProperty(s){this.prototype._createNotifyingProperty(s)}static createReadOnlyProperty(s,r){this.prototype._createReadOnlyProperty(s,r)}static createReflectedProperty(s){this.prototype._createReflectedProperty(s)}static createComputedProperty(s,r,n){this.prototype._createComputedProperty(s,r,n)}static bindTemplate(s){return this.prototype._bindTemplate(s)}_bindTemplate(s,r){let n=this.constructor._parseTemplate(s),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else{const l=s._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(s,r,n){let a=s.hostProps=s.hostProps||{};a[r]=!0;let l=s.propertyEffects=s.propertyEffects||{};(l[r]=l[r]||[]).push(n)}_stampTemplate(s,r){r=r||this._bindTemplate(s,!0),lt.push(this);let n=super._stampTemplate(s,r);if(lt.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l)}return n.templateInfo=r,kh(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(s){const r=s.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let u=0;u<d.length;u++){let c=d[u];H(H(c).parentNode).removeChild(c)}}static _parseTemplateNode(s,r,n){let a=e._parseTemplateNode.call(this,s,r,n);if(s.nodeType===Node.TEXT_NODE){let l=this._parseBindings(s.textContent,r);l&&(s.textContent=Or(l)||" ",Li(this,r,n,"text","textContent",l),a=!0)}return a}static _parseTemplateNodeAttribute(s,r,n,a,l){let d=this._parseBindings(l,r);if(d){let u=a,c="property";hh.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let p=Or(d);return p&&c=="attribute"&&(a=="class"&&s.hasAttribute("class")&&(p+=" "+s.getAttribute(a)),s.setAttribute(a,p)),c=="attribute"&&u=="disable-upgrade$"&&s.setAttribute(a,""),s.localName==="input"&&u==="value"&&s.setAttribute(u,""),s.removeAttribute(u),c==="property"&&(a=Vn(a)),Li(this,r,n,c,a,d,p),!0}else return e._parseTemplateNodeAttribute.call(this,s,r,n,a,l)}static _parseTemplateNestedTemplate(s,r,n){let a=e._parseTemplateNestedTemplate.call(this,s,r,n);const l=s.parentNode,d=n.templateInfo,u=l.localName==="dom-if",c=l.localName==="dom-repeat";gr&&(u||c)&&(l.removeChild(s),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let p=d.hostProps;if(Nd&&u)p&&(r.hostProps=Object.assign(r.hostProps||{},p),gr||(n.parentInfo.noted=!0));else{let _="{";for(let v in p){let x=[{mode:_,source:v,dependencies:[v],hostProp:!0}];Li(this,r,n,"property","_host_"+v,x)}}return a}static _parseBindings(s,r){let n=[],a=0,l;for(;(l=Dr.exec(s))!==null;){l.index>a&&n.push({literal:s.slice(a,l.index)});let d=l[1][0],u=!!l[2],c=l[3].trim(),p=!1,_="",v=-1;d=="{"&&(v=c.indexOf("::"))>0&&(_=c.substring(v+2),c=c.substring(0,v),p=!0);let x=Vi(c),g=[];if(x){let{args:y,methodName:S}=x;for(let C=0;C<y.length;C++){let w=y[C];w.literal||g.push(w)}let L=r.dynamicFns;(L&&L[S]||x.static)&&(g.push(S),x.dynamicFn=!0)}else g.push(c);n.push({source:c,mode:d,negate:u,customEvent:p,signature:x,dependencies:g,event:_}),a=Dr.lastIndex}if(a&&a<s.length){let d=s.substring(a);d&&n.push({literal:d})}return n.length?n:null}static _evaluateBinding(s,r,n,a,l,d){let u;return r.signature?u=uo(s,n,a,l,r.signature):n!=r.source?u=W(s,r.source):d&&ho(n)?u=W(s,n):u=s.__data[n],r.negate&&(u=!u),u}}return t}),lt=[];/**
|
|
990
990
|
@license
|
|
991
991
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
992
992
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1002,7 +1002,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1002
1002
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1003
1003
|
Code distributed by Google as part of the polymer project is also
|
|
1004
1004
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1005
|
-
*/function
|
|
1005
|
+
*/function Wh(i){const e={};for(let t in i){const o=i[t];e[t]=typeof o=="function"?{type:o}:o}return e}const Uh=M(i=>{const e=Rn(i);function t(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof s?n:null}function o(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=Wh(a))}r.__ownProperties=n}return r.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const n=this._properties;this.__observedAttributes=n?Object.keys(n).map(a=>this.prototype._addPropertyToAttributeMap(a)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const n=t(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const n=o(this);n&&this.createProperties(n)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=t(this);this.__properties=Object.assign({},n&&n._properties,o(this))}return this.__properties}static typeForProperty(n){const a=this._properties[n];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s});/**
|
|
1006
1006
|
* @fileoverview
|
|
1007
1007
|
* @suppress {checkPrototypalTypes}
|
|
1008
1008
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1012,7 +1012,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1012
1012
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1013
1013
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1014
1014
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1015
|
-
*/const
|
|
1015
|
+
*/const jh="3.5.2",Nr=window.ShadyCSS&&window.ShadyCSS.cssBuild,Yh=M(i=>{const e=Uh(Jo(i));function t(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let u in d){let c=d[u];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[u]=c)}}return l.__propertyDefaults}function o(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function s(l,d,u,c){u.computed&&(u.readOnly=!0),u.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,u.computed,c)),u.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!u.computed):u.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),u.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):u.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),u.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):u.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),u.observer&&l._createPropertyObserver(d,u.observer,c[u.observer]),l._addPropertyToAttributeMap(d)}function r(l,d,u,c){if(!Nr){const p=d.content.querySelectorAll("style"),_=On(d),v=qd(u),x=d.content.firstElementChild;for(let y=0;y<v.length;y++){let S=v[y];S.textContent=l._processStyleText(S.textContent,c),d.content.insertBefore(S,x)}let g=0;for(let y=0;y<_.length;y++){let S=_[y],L=p[g];L!==S?(S=S.cloneNode(!0),L.parentNode.insertBefore(S,L)):g++,S.textContent=l._processStyleText(S.textContent,c)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,u),Ld&&Nr&&Pd){const p=d.content.querySelectorAll("style");if(p){let _="";Array.from(p).forEach(v=>{_+=v.textContent,v.parentNode.removeChild(v)}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(_)}}}function n(l){let d=null;if(l&&(!ii||Dd)&&(d=xt.import(l,"template"),ii&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends e{static get polymerElementVersion(){return jh}static _finalizeClass(){e._finalizeClass.call(this);const d=o(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):Sn||(d=d.cloneNode(!0))),this.prototype._template=d}static createProperties(d){for(let u in d)s(this.prototype,u,d[u],d)}static createObservers(d,u){const c=this.prototype;for(let p=0;p<d.length;p++)c._createMethodObserver(d[p],u)}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))&&n(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=Go(d.url);else{const u=xt.import(this.is);this._importPath=u&&u.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=Td,this.importPath=this.constructor.importPath;let d=t(this.constructor);if(d)for(let u in d){let c=d[u];if(this._canApplyPropertyDefault(u)){let p=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(u)?this._setPendingProperty(u,p,!0):this[u]=p}}}_canApplyPropertyDefault(d){return!this.hasOwnProperty(d)}static _processStyleText(d,u){return Yo(d,u)}static _finalizeTemplate(d){const u=this.prototype._template;if(u&&!u.__polymerFinalized){u.__polymerFinalized=!0;const c=this.importPath,p=c?ft(c):"";r(this,u,d,p),this.prototype._bindTemplate(u)}}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 u=H(this);if(u.attachShadow)return d?(u.shadowRoot||(u.attachShadow({mode:"open",shadyUpgradeFragment:d}),u.shadowRoot.appendChild(d),this.constructor._styleSheet&&(u.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Od&&window.ShadyDOM&&window.ShadyDOM.flushInitial(u.shadowRoot),u.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,u){return!u&&this.importPath&&(u=ft(this.importPath)),ft(d,u)}static _parseTemplateContent(d,u,c){return u.dynamicFns=u.dynamicFns||this._properties,e._parseTemplateContent.call(this,d,u,c)}static _addTemplatePropertyEffect(d,u,c){return Pn&&!(u in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${u}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,d,u,c)}}return a});/**
|
|
1016
1016
|
@license
|
|
1017
1017
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1018
1018
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1020,7 +1020,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1020
1020
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1021
1021
|
Code distributed by Google as part of the polymer project is also
|
|
1022
1022
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1023
|
-
*/const Lr=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:i=>i});class Kn{constructor(e,t){Jn(e,t);const o=t.reduce((s,r,n)=>s+Xn(r)+e[n+1],e[0]);this.value=o.toString()}toString(){return this.value}}function Xn(i){if(i instanceof Kn)return i.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${i}`)}function
|
|
1023
|
+
*/const Lr=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:i=>i});class Kn{constructor(e,t){Jn(e,t);const o=t.reduce((s,r,n)=>s+Xn(r)+e[n+1],e[0]);this.value=o.toString()}toString(){return this.value}}function Xn(i){if(i instanceof Kn)return i.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${i}`)}function Gh(i){if(i instanceof HTMLTemplateElement)return i.innerHTML;if(i instanceof Kn)return Xn(i);throw new Error(`non-template value passed to Polymer's html function: ${i}`)}const E=function(i,...e){Jn(i,e);const t=document.createElement("template");let o=e.reduce((s,r,n)=>s+Gh(r)+i[n+1],i[0]);return Lr&&(o=Lr.createHTML(o)),t.innerHTML=o,t},Jn=(i,e)=>{if(!Array.isArray(i)||!Array.isArray(i.raw)||e.length!==i.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
1024
1024
|
@license
|
|
1025
1025
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1026
1026
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1028,7 +1028,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1028
1028
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1029
1029
|
Code distributed by Google as part of the polymer project is also
|
|
1030
1030
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1031
|
-
*/const
|
|
1031
|
+
*/const k=Yh(HTMLElement),Kh=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Yt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Xh(){function i(){return!0}return Qn(i)}function Jh(){try{return Qh()?!0:Zh()?Yt?!ec():!Xh():!1}catch(i){return!1}}function Qh(){return localStorage.getItem("vaadin.developmentmode.force")}function Zh(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function ec(){return!!(Yt&&Object.keys(Yt).map(i=>Yt[i]).filter(i=>i.productionMode).length>0)}function Qn(i,e){if(typeof i!="function")return;const t=Kh.exec(i.toString());if(t)try{i=new Function(t[1])}catch(o){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",o)}return i(e)}window.Vaadin=window.Vaadin||{};const Vr=function(i,e){if(window.Vaadin.developmentMode)return Qn(i,e)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Jh());function tc(){/*! vaadin-dev-mode:start
|
|
1032
1032
|
(function () {
|
|
1033
1033
|
'use strict';
|
|
1034
1034
|
|
|
@@ -1506,7 +1506,7 @@ try {
|
|
|
1506
1506
|
|
|
1507
1507
|
}());
|
|
1508
1508
|
|
|
1509
|
-
vaadin-dev-mode:end **/}const Zn=function(){if(typeof Vr=="function")return Vr(
|
|
1509
|
+
vaadin-dev-mode:end **/}const Zn=function(){if(typeof Vr=="function")return Vr(tc)};/**
|
|
1510
1510
|
* @license
|
|
1511
1511
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1512
1512
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1514,7 +1514,7 @@ try {
|
|
|
1514
1514
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1515
1515
|
* Code distributed by Google as part of the polymer project is also
|
|
1516
1516
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1517
|
-
*/let Mr=0,ea=0;const
|
|
1517
|
+
*/let Mr=0,ea=0;const Ue=[];let po=!1;function ic(){po=!1;const i=Ue.length;for(let e=0;e<i;e++){const t=Ue[e];if(t)try{t()}catch(o){setTimeout(()=>{throw o})}}Ue.splice(0,i),ea+=i}const ye={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},Et={run(i){return window.requestAnimationFrame(i)},cancel(i){window.cancelAnimationFrame(i)}},ta={run(i){return window.requestIdleCallback?window.requestIdleCallback(i):window.setTimeout(i,16)},cancel(i){window.cancelIdleCallback?window.cancelIdleCallback(i):window.clearTimeout(i)}},si={run(i){po||(po=!0,queueMicrotask(()=>ic())),Ue.push(i);const e=Mr;return Mr+=1,e},cancel(i){const e=i-ea;if(e>=0){if(!Ue[e])throw new Error(`invalid async handle: ${i}`);Ue[e]=null}}};/**
|
|
1518
1518
|
@license
|
|
1519
1519
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1520
1520
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1522,35 +1522,35 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1522
1522
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1523
1523
|
Code distributed by Google as part of the polymer project is also
|
|
1524
1524
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1525
|
-
*/const
|
|
1525
|
+
*/const kt=new Set;let G=class _o{static debounce(e,t,o){return e instanceof _o?e._cancelAsync():e=new _o,e.setConfig(t,o),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,kt.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),kt.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 ia(i){kt.add(i)}function oc(){const i=!!kt.size;return kt.forEach(e=>{try{e.flush()}catch(t){setTimeout(()=>{throw t})}}),i}const pt=()=>{let i;do i=oc();while(i)};/**
|
|
1526
1526
|
* @license
|
|
1527
1527
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1528
1528
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1529
|
-
*/const
|
|
1529
|
+
*/const ae=[];function mo(i,e,t=i.getAttribute("dir")){e?i.setAttribute("dir",e):t!=null&&i.removeAttribute("dir")}function fo(){return document.documentElement.getAttribute("dir")}function sc(){const i=fo();ae.forEach(e=>{mo(e,i)})}const rc=new MutationObserver(sc);rc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const oe=i=>class extends i{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),mo(this,fo(),null))}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),e!=="dir")return;const s=fo(),r=o===s&&ae.indexOf(this)===-1,n=!o&&t&&ae.indexOf(this)===-1;r||n?(this.__subscribe(),mo(this,s,o)):o!==s&&t===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=ae.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,o){o==="dir"&&t===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,t,o)}_attributeToProperty(e,t,o){e==="dir"&&!t?this.dir="":super._attributeToProperty(e,t,o)}__subscribe(){ae.includes(this)||ae.push(this)}__unsubscribe(){ae.includes(this)&&ae.splice(ae.indexOf(this),1)}};/**
|
|
1530
1530
|
* @license
|
|
1531
1531
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1532
1532
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1533
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zn()};let
|
|
1533
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zn()};let Mi;const Br=new Set,pe=i=>class extends oe(i){static finalize(){super.finalize();const{is:e}=this;e&&!Br.has(e)&&(window.Vaadin.registrations.push(this),Br.add(e),window.Vaadin.developmentModeCallback&&(Mi=G.debounce(Mi,ta,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),ia(Mi)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};/**
|
|
1534
1534
|
* @license
|
|
1535
1535
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1536
1536
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1537
|
-
*/function
|
|
1537
|
+
*/function nc(i){const e=[];for(;i;){if(i.nodeType===Node.DOCUMENT_NODE){e.push(i);break}if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(i),i=i.host;continue}if(i.assignedSlot){i=i.assignedSlot;continue}i=i.parentNode}return e}function oa(i){const e=[];let t;return i.localName==="slot"?t=i.assignedElements():(e.push(i),t=[...i.children]),t.forEach(o=>e.push(...oa(o))),e}function Qo(i){return i?new Set(i.split(" ")):new Set}function mi(i){return i?[...i].join(" "):""}function sa(i,e,t){const o=Qo(i.getAttribute(e));o.add(t),i.setAttribute(e,mi(o))}function ac(i,e,t){const o=Qo(i.getAttribute(e));if(o.delete(t),o.size===0){i.removeAttribute(e);return}i.setAttribute(e,mi(o))}function lc(i){return i.nodeType===Node.TEXT_NODE&&i.textContent.trim()===""}/**
|
|
1538
1538
|
* @license
|
|
1539
1539
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1540
1540
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1541
|
-
*/let
|
|
1541
|
+
*/let Zo=class{constructor(i,e){this.slot=i,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush()}))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const i=this.slot.assignedNodes({flatten:!0});let e=[];const t=[],o=[];i.length&&(e=i.filter(s=>!this._storedNodes.includes(s))),this._storedNodes.length&&this._storedNodes.forEach((s,r)=>{const n=i.indexOf(s);n===-1?t.push(s):n!==r&&o.push(s)}),(e.length||t.length||o.length)&&this.callback({addedNodes:e,currentNodes:i,movedNodes:o,removedNodes:t}),this._storedNodes=i}};/**
|
|
1542
1542
|
* @license
|
|
1543
1543
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1544
1544
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1545
|
-
*/let
|
|
1545
|
+
*/let dc=0;function fi(){return dc++}/**
|
|
1546
1546
|
* @license
|
|
1547
1547
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1548
1548
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1549
|
-
*/let
|
|
1549
|
+
*/let ce=class extends EventTarget{static generateId(i,e="default"){return`${e}-${i.localName}-${fi()}`}constructor(i,e,t,o={}){super();const{initializer:s,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=o;this.host=i,this.slotName=e,this.tagName=t,this.observe=typeof n=="boolean"?n:!0,this.multiple=typeof r=="boolean"?r:!1,this.slotInitializer=s,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(i,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let i=this.getSlotChild();i?(this.node=i,this.initAddedNode(i)):(i=this.attachDefaultNode(),this.initNode(i))}initMultiple(){const i=this.getSlotChildren();if(i.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e))}else this.nodes=i,i.forEach(e=>{this.initAddedNode(e)})}attachDefaultNode(){const{host:i,slotName:e,tagName:t}=this;let o=this.defaultNode;return!o&&t&&(o=document.createElement(t),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,i.appendChild(o)),o}getSlotChildren(){const{slotName:i}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===i||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&i==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(i){const{slotInitializer:e}=this;e&&e(i,this.host)}initCustomNode(i){}teardownNode(i){}initAddedNode(i){i!==this.defaultNode&&(this.initCustomNode(i),this.initNode(i))}observeSlot(){const{slotName:i}=this,e=i===""?"slot:not([name])":`slot[name=${i}]`,t=this.host.shadowRoot.querySelector(e);this.__slotObserver=new Zo(t,({addedNodes:o,removedNodes:s})=>{const r=this.multiple?this.nodes:[this.node],n=o.filter(a=>!lc(a)&&!r.includes(a));s.length&&(this.nodes=r.filter(a=>!s.includes(a)),s.forEach(a=>{this.teardownNode(a)})),n&&n.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...r,...n].filter(a=>a!==this.defaultNode),n.forEach(a=>{this.initAddedNode(a)})):(this.node&&this.node.remove(),this.node=n[0],this.initAddedNode(this.node)))})}};/**
|
|
1550
1550
|
* @license
|
|
1551
1551
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1552
1552
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1553
|
-
*/let
|
|
1553
|
+
*/let Ve=class extends ce{constructor(i){super(i,"tooltip"),this.setTarget(i)}initCustomNode(i){i.target=this.target,this.ariaTarget!==void 0&&(i.ariaTarget=this.ariaTarget),this.context!==void 0&&(i.context=this.context),this.manual!==void 0&&(i.manual=this.manual),this.opened!==void 0&&(i.opened=this.opened),this.position!==void 0&&(i._position=this.position),this.shouldShow!==void 0&&(i.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(i){this.ariaTarget=i;const e=this.node;e&&(e.ariaTarget=i)}setContext(i){this.context=i;const e=this.node;e&&(e.context=i)}setManual(i){this.manual=i;const e=this.node;e&&(e.manual=i)}setOpened(i){this.opened=i;const e=this.node;e&&(e.opened=i)}setPosition(i){this.position=i;const e=this.node;e&&(e._position=i)}setShouldShow(i){this.shouldShow=i;const e=this.node;e&&(e.shouldShow=i)}setTarget(i){this.target=i;const e=this.node;e&&(e.target=i)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}};/**
|
|
1554
1554
|
@license
|
|
1555
1555
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1556
1556
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1558,107 +1558,107 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1558
1558
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1559
1559
|
Code distributed by Google as part of the polymer project is also
|
|
1560
1560
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1561
|
-
*/const
|
|
1561
|
+
*/const hc=i=>i,ra=typeof document.head.style.touchAction=="string",vo="__polymerGestures",Bi="__polymerGesturesHandled",go="__polymerGesturesTouchAction",Fr=25,Rr=5,cc=2,uc=["mousedown","mousemove","mouseup","click"],pc=[0,1,4,2],_c=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(i){return!1}}();function na(i){return uc.indexOf(i)>-1}let mc=!1;(function(){try{const i=Object.defineProperty({},"passive",{get(){mc=!0}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}})();const fc=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),vc={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ze(i){const e=i.type;if(!na(e))return!1;if(e==="mousemove"){let t=i.buttons===void 0?1:i.buttons;return i instanceof window.MouseEvent&&!_c&&(t=pc[i.which]||0),!!(t&1)}return(i.button===void 0?0:i.button)===0}function gc(i){if(i.type==="click"){if(i.detail===0)return!0;const e=xe(i);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const t=e.getBoundingClientRect(),o=i.pageX,s=i.pageY;return!(o>=t.left&&o<=t.right&&s>=t.top&&s<=t.bottom)}return!1}const de={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function bc(i){let e="auto";const t=la(i);for(let o=0,s;o<t.length;o++)if(s=t[o],s[go]){e=s[go];break}return e}function aa(i,e,t){i.movefn=e,i.upfn=t,document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}function je(i){document.removeEventListener("mousemove",i.movefn),document.removeEventListener("mouseup",i.upfn),i.movefn=null,i.upfn=null}const la=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:i=>i.composedPath&&i.composedPath()||[],es={},Oe=[];function yc(i,e){let t=document.elementFromPoint(i,e),o=t;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(i,e),s===o)break;o&&(t=o)}return t}function xe(i){const e=la(i);return e.length>0?e[0]:i.target}function xc(i){const e=i.type,t=i.currentTarget[vo];if(!t)return;const o=t[e];if(!o)return;if(!i[Bi]&&(i[Bi]={},e.startsWith("touch"))){const r=i.changedTouches[0];if(e==="touchstart"&&i.touches.length===1&&(de.touch.id=r.identifier),de.touch.id!==r.identifier)return;ra||(e==="touchstart"||e==="touchmove")&&wc(i)}const s=i[Bi];if(!s.skip){for(let r=0,n;r<Oe.length;r++)n=Oe[r],o[n.name]&&!s[n.name]&&n.flow&&n.flow.start.indexOf(i.type)>-1&&n.reset&&n.reset();for(let r=0,n;r<Oe.length;r++)n=Oe[r],o[n.name]&&!s[n.name]&&(s[n.name]=!0,n[e](i))}}function wc(i){const e=i.changedTouches[0],t=i.type;if(t==="touchstart")de.touch.x=e.clientX,de.touch.y=e.clientY,de.touch.scrollDecided=!1;else if(t==="touchmove"){if(de.touch.scrollDecided)return;de.touch.scrollDecided=!0;const o=bc(i);let s=!1;const r=Math.abs(de.touch.x-e.clientX),n=Math.abs(de.touch.y-e.clientY);i.cancelable&&(o==="none"?s=!0:o==="pan-x"?s=n>r:o==="pan-y"&&(s=r>n)),s?i.preventDefault():ri("track")}}function ie(i,e,t){return es[e]?(Cc(i,e,t),!0):!1}function Cc(i,e,t){const o=es[e],s=o.deps,r=o.name;let n=i[vo];n||(i[vo]=n={});for(let a=0,l,d;a<s.length;a++)l=s[a],!(fc&&na(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&i.addEventListener(l,xc,void 0),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);i.addEventListener(e,t),o.touchAction&&da(i,o.touchAction)}function ts(i){Oe.push(i),i.emits.forEach(e=>{es[e]=i})}function Ic(i){for(let e=0,t;e<Oe.length;e++){t=Oe[e];for(let o=0,s;o<t.emits.length;o++)if(s=t.emits[o],s===i)return t}return null}function da(i,e){ra&&i instanceof HTMLElement&&si.run(()=>{i.style.touchAction=e}),i[go]=e}function is(i,e,t){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=t,hc(i).dispatchEvent(o),o.defaultPrevented){const s=t.preventer||t.sourceEvent;s&&s.preventDefault&&s.preventDefault()}}function ri(i){const e=Ic(i);e.info&&(e.info.prevent=!0)}ts({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){je(this.info)},mousedown(i){if(!ze(i))return;const e=xe(i),t=this,o=r=>{ze(r)||(dt("up",e,r),je(t.info))},s=r=>{ze(r)&&dt("up",e,r),je(t.info)};aa(this.info,o,s),dt("down",e,i)},touchstart(i){dt("down",xe(i),i.changedTouches[0],i)},touchend(i){dt("up",xe(i),i.changedTouches[0],i)}});function dt(i,e,t,o){e&&is(e,i,{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:o,prevent(s){return ri(s)}})}ts({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(i){this.moves.length>cc&&this.moves.shift(),this.moves.push(i)},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,je(this.info)},mousedown(i){if(!ze(i))return;const e=xe(i),t=this,o=r=>{const n=r.clientX,a=r.clientY;Hr(t.info,n,a)&&(t.info.state=t.info.started?r.type==="mouseup"?"end":"track":"start",t.info.state==="start"&&ri("tap"),t.info.addMove({x:n,y:a}),ze(r)||(t.info.state="end",je(t.info)),e&&Fi(t.info,e,r),t.info.started=!0)},s=r=>{t.info.started&&o(r),je(t.info)};aa(this.info,o,s),this.info.x=i.clientX,this.info.y=i.clientY},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(i){const e=xe(i),t=i.changedTouches[0],o=t.clientX,s=t.clientY;Hr(this.info,o,s)&&(this.info.state==="start"&&ri("tap"),this.info.addMove({x:o,y:s}),Fi(this.info,e,t),this.info.state="track",this.info.started=!0)},touchend(i){const e=xe(i),t=i.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:t.clientX,y:t.clientY}),Fi(this.info,e,t))}});function Hr(i,e,t){if(i.prevent)return!1;if(i.started)return!0;const o=Math.abs(i.x-e),s=Math.abs(i.y-t);return o>=Rr||s>=Rr}function Fi(i,e,t){if(!e)return;const o=i.moves[i.moves.length-2],s=i.moves[i.moves.length-1],r=s.x-i.x,n=s.y-i.y;let a,l=0;o&&(a=s.x-o.x,l=s.y-o.y),is(e,"track",{state:i.state,x:t.clientX,y:t.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:t,hover(){return yc(t.clientX,t.clientY)}})}ts({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(i){ze(i)&&(this.info.x=i.clientX,this.info.y=i.clientY)},click(i){ze(i)&&qr(this.info,i)},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(i){qr(this.info,i.changedTouches[0],i)}});function qr(i,e,t){const o=Math.abs(e.clientX-i.x),s=Math.abs(e.clientY-i.y),r=xe(t||e);!r||vc[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=Fr&&s<=Fr||gc(e))&&(i.prevent||is(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}/**
|
|
1562
1562
|
* @license
|
|
1563
1563
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1564
1564
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1565
|
-
*/const
|
|
1565
|
+
*/const et=M(i=>class extends i{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}});/**
|
|
1566
1566
|
* @license
|
|
1567
1567
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1568
1568
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1569
|
-
*/const
|
|
1569
|
+
*/const Me=M(i=>class extends i{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
1570
1570
|
* @license
|
|
1571
1571
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1572
1572
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1573
|
-
*/const
|
|
1573
|
+
*/const os=i=>class extends et(Me(i)){get _activeKeys(){return[" "]}ready(){super.ready(),ie(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),ie(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}};/**
|
|
1574
1574
|
* @license
|
|
1575
1575
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1576
1576
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1577
|
-
*/let
|
|
1577
|
+
*/let ss=!1;window.addEventListener("keydown",()=>{ss=!0},{capture:!0});window.addEventListener("mousedown",()=>{ss=!1},{capture:!0});function bo(){let i=document.activeElement||document.body;for(;i.shadowRoot&&i.shadowRoot.activeElement;)i=i.shadowRoot.activeElement;return i}function vi(){return ss}function ha(i){const e=i.style;if(e.visibility==="hidden"||e.display==="none")return!0;const t=window.getComputedStyle(i);return t.visibility==="hidden"||t.display==="none"}function Ac(i,e){const t=Math.max(i.tabIndex,0),o=Math.max(e.tabIndex,0);return t===0||o===0?o>t:t>o}function Ec(i,e){const t=[];for(;i.length>0&&e.length>0;)Ac(i[0],e[0])?t.push(e.shift()):t.push(i.shift());return t.concat(i,e)}function yo(i){const e=i.length;if(e<2)return i;const t=Math.ceil(e/2),o=yo(i.slice(0,t)),s=yo(i.slice(t));return Ec(o,s)}function xo(i){return i.offsetParent===null&&i.clientWidth===0&&i.clientHeight===0?!0:ha(i)}function rs(i){return i.matches('[tabindex="-1"]')?!1:i.matches("input, select, textarea, button, object")?i.matches(":not([disabled])"):i.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function ns(i){return i.getRootNode().activeElement===i}function kc(i){if(!rs(i))return-1;const e=i.getAttribute("tabindex")||0;return Number(e)}function ca(i,e){if(i.nodeType!==Node.ELEMENT_NODE||ha(i))return!1;const t=i,o=kc(t);let s=o>0;o>=0&&e.push(t);let r=[];return t.localName==="slot"?r=t.assignedNodes({flatten:!0}):r=(t.shadowRoot||t).children,[...r].forEach(n=>{s=ca(n,e)||s}),s}function Sc(i){const e=[];return ca(i,e)?yo(e):e}/**
|
|
1578
1578
|
* @license
|
|
1579
1579
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1580
1580
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1581
|
-
*/const
|
|
1581
|
+
*/const Be=M(i=>class extends i{get _keyboardActive(){return vi()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}});/**
|
|
1582
1582
|
* @license
|
|
1583
1583
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1584
1584
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1585
|
-
*/const ua=i=>class extends
|
|
1585
|
+
*/const ua=i=>class extends et(i){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):t&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1)}};/**
|
|
1586
1586
|
* @license
|
|
1587
1587
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1588
1588
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1589
|
-
*/const
|
|
1589
|
+
*/const gi=M(i=>class extends Be(ua(i)){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(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0)}});/**
|
|
1590
1590
|
* @license
|
|
1591
1591
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1592
1592
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1593
|
-
*/const
|
|
1593
|
+
*/const as=M(i=>class extends i{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(e){e&&(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(e=>{this._delegateAttribute(e,this[e])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e])})}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((t,o)=>{this._delegateAttribute(t,e[o])})}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((t,o)=>{this._delegateProperty(t,e[o])})}_delegateAttribute(e,t){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",t?"true":!1),typeof t=="boolean"?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}});/**
|
|
1594
1594
|
* @license
|
|
1595
1595
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1596
1596
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1597
|
-
*/const
|
|
1597
|
+
*/const Ot=M(i=>class extends i{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(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),!(e===""&&t===void 0)&&(this.__userInput||this._forwardInputValue(e))}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}});/**
|
|
1598
1598
|
* @license
|
|
1599
1599
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1600
1600
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1601
|
-
*/const
|
|
1601
|
+
*/const Pc=M(i=>class extends as(et(Ot(i))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(e){const t=e.target;this._toggleChecked(t.checked)}_toggleChecked(e){this.checked=e}});/**
|
|
1602
1602
|
* @license
|
|
1603
1603
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1604
1604
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1605
|
-
*/const
|
|
1605
|
+
*/const Ri=new Map;function ls(i){return Ri.has(i)||Ri.set(i,new WeakMap),Ri.get(i)}function pa(i,e){i&&i.removeAttribute(e)}function _a(i,e){if(!i||!e)return;const t=ls(e);if(t.has(i))return;const o=Qo(i.getAttribute(e));t.set(i,new Set(o))}function Tc(i,e){if(!i||!e)return;const t=ls(e),o=t.get(i);!o||o.size===0?i.removeAttribute(e):sa(i,e,mi(o)),t.delete(i)}function Gt(i,e,t={newId:null,oldId:null,fromUser:!1}){if(!i||!e)return;const{newId:o,oldId:s,fromUser:r}=t,n=ls(e),a=n.get(i);if(!r&&a){s&&a.delete(s),o&&a.add(o);return}r&&(a?o||n.delete(i):_a(i,e),pa(i,e)),ac(i,e,s);const l=o||mi(a);l&&sa(i,e,l)}function Dc(i,e){_a(i,e),pa(i,e)}/**
|
|
1606
1606
|
* @license
|
|
1607
1607
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1608
1608
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1609
|
-
*/let
|
|
1609
|
+
*/let Oc=class{constructor(i){this.host=i,this.__required=!1}setTarget(i){this.__target=i,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(i){this.__setAriaRequiredAttribute(i),this.__required=i}setAriaLabel(i){this.__setAriaLabelToAttribute(i),this.__label=i}setLabelId(i,e=!1){const t=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(i,t,e),e?this.__labelIdFromUser=i:this.__labelId=i}setErrorId(i){this.__setErrorIdToAriaAttribute(i,this.__errorId),this.__errorId=i}setHelperId(i){this.__setHelperIdToAriaAttribute(i,this.__helperId),this.__helperId=i}__setAriaLabelToAttribute(i){this.__target&&(i?(Dc(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",i)):this.__label&&(Tc(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(i,e,t){Gt(this.__target,"aria-labelledby",{newId:i,oldId:e,fromUser:t})}__setErrorIdToAriaAttribute(i,e){Gt(this.__target,"aria-describedby",{newId:i,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(i,e){Gt(this.__target,"aria-describedby",{newId:i,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(i){this.__target&&(["input","textarea"].includes(this.__target.localName)||(i?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}};/**
|
|
1610
1610
|
* @license
|
|
1611
1611
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1612
1612
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1613
|
-
*/const
|
|
1613
|
+
*/const Ie=M(i=>typeof i.prototype.addController=="function"?i:class extends i{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected()})}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected()}removeController(e){this.__controllers.delete(e)}});/**
|
|
1614
1614
|
* @license
|
|
1615
1615
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1616
1616
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1617
|
-
*/const
|
|
1617
|
+
*/const Z=document.createElement("div");Z.style.position="fixed";Z.style.clip="rect(0px, 0px, 0px, 0px)";Z.setAttribute("aria-live","polite");document.body.appendChild(Z);let Mt;function zc(i,e={}){const t=e.mode||"polite",o=e.timeout===void 0?150:e.timeout;t==="alert"?(Z.removeAttribute("aria-live"),Z.removeAttribute("role"),Mt=G.debounce(Mt,Et,()=>{Z.setAttribute("role","alert")})):(Mt&&Mt.cancel(),Z.removeAttribute("role"),Z.setAttribute("aria-live",t)),Z.textContent="",setTimeout(()=>{Z.textContent=i},o)}/**
|
|
1618
1618
|
* @license
|
|
1619
1619
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1620
1620
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1621
|
-
*/let
|
|
1621
|
+
*/let ds=class extends ce{constructor(i,e,t,o={}){super(i,e,t,ci(we({},o),{useUniqueId:!0}))}initCustomNode(i){this.__updateNodeId(i),this.__notifyChange(i)}teardownNode(i){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const i=super.attachDefaultNode();return i&&this.__updateNodeId(i),i}restoreDefaultNode(){}updateDefaultNode(i){this.__notifyChange(i)}observeNode(i){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(t=>{const o=t.target,s=o===this.node;t.type==="attributes"?s&&this.__updateNodeId(o):(s||o.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(i,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(i){return i?i.nodeType===Node.ELEMENT_NODE&&(customElements.get(i.localName)||i.children.length>0)||i.textContent&&i.textContent.trim()!=="":!1}__notifyChange(i){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(i),node:i}}))}__updateNodeId(i){const e=!this.nodes||i===this.nodes[0];i.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!i.id&&(i.id=this.defaultId)}};/**
|
|
1622
1622
|
* @license
|
|
1623
1623
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1624
1624
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1625
|
-
*/let
|
|
1625
|
+
*/let Nc=class extends ds{constructor(i){super(i,"error-message","div")}setErrorMessage(i){this.errorMessage=i,this.updateDefaultNode(this.node)}setInvalid(i){this.invalid=i,this.updateDefaultNode(this.node)}initAddedNode(i){i!==this.defaultNode&&this.initCustomNode(i)}initNode(i){this.updateDefaultNode(i)}initCustomNode(i){i.textContent&&!this.errorMessage&&(this.errorMessage=i.textContent.trim()),super.initCustomNode(i)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(i){const{errorMessage:e,invalid:t}=this,o=!!(t&&e&&e.trim()!=="");i&&(i.textContent=o?e:"",i.hidden=!o,o&&zc(e,{mode:"assertive"})),super.updateDefaultNode(i)}};/**
|
|
1626
1626
|
* @license
|
|
1627
1627
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1628
1628
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1629
|
-
*/let
|
|
1629
|
+
*/let Lc=class extends ds{constructor(i){super(i,"helper",null)}setHelperText(i){this.helperText=i,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:i}=this;if(i&&i.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(i){i&&(i.textContent=this.helperText),super.updateDefaultNode(i)}initCustomNode(i){super.initCustomNode(i),this.observeNode(i)}};/**
|
|
1630
1630
|
* @license
|
|
1631
1631
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1632
1632
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1633
|
-
*/let ma=class extends
|
|
1633
|
+
*/let ma=class extends ds{constructor(i){super(i,"label","label")}setLabel(i){this.label=i,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:i}=this;if(i&&i.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(i){i&&(i.textContent=this.label),super.updateDefaultNode(i)}initCustomNode(i){super.initCustomNode(i),this.observeNode(i)}};/**
|
|
1634
1634
|
* @license
|
|
1635
1635
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1636
1636
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1637
|
-
*/const
|
|
1637
|
+
*/const Vc=M(i=>class extends Ie(i){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new ma(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}});/**
|
|
1638
1638
|
* @license
|
|
1639
1639
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1640
1640
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1641
|
-
*/const
|
|
1641
|
+
*/const hs=M(i=>class extends i{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}});/**
|
|
1642
1642
|
* @license
|
|
1643
1643
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1644
1644
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1645
|
-
*/const
|
|
1645
|
+
*/const bi=i=>class extends hs(Vc(Ie(i))){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 Oc(this),this._helperController=new Lc(this),this._errorController=new Nc(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:o}=e.detail;this.__labelChanged(t,o)}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:o}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,o)})}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(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)})}};/**
|
|
1646
1646
|
* @license
|
|
1647
1647
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1648
1648
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1649
|
-
*/let
|
|
1649
|
+
*/let yi=class extends ce{constructor(i,e,t={}){const{uniqueIdPrefix:o}=t;super(i,"input","input",{initializer:(s,r)=>{r.value&&(s.value=r.value),r.type&&s.setAttribute("type",r.type),s.id=this.defaultId,typeof e=="function"&&e(s)},useUniqueId:!0,uniqueIdPrefix:o})}};/**
|
|
1650
1650
|
* @license
|
|
1651
1651
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1652
1652
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1653
|
-
*/let
|
|
1653
|
+
*/let xi=class{constructor(i,e){this.input=i,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",t=>{this.__initLabel(t.detail.node)}),this.__initLabel(e.node)}__initLabel(i){i&&(i.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&i.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const i=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",i)};this.input.addEventListener("click",i)}};/**
|
|
1654
1654
|
* @license
|
|
1655
1655
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1656
1656
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1657
|
-
*/const
|
|
1657
|
+
*/const Mc=i=>class extends bi(Pc(gi(os(i)))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new yi(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new xi(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(e){return this.readonly||e.target.localName==="a"||e.target===this._helperNode||e.target===this._errorNode?!1:super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick)}_onInputClick(e){this.readonly&&e.preventDefault()}__readonlyChanged(e,t){t&&(e?t.setAttribute("aria-readonly","true"):t.removeAttribute("aria-readonly"))}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e)}checkValidity(){return!this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_checkedChanged(e){(e||this.__oldChecked)&&this.validate(),this.__oldChecked=e}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}};/**
|
|
1658
1658
|
* @license
|
|
1659
1659
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1660
1660
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1661
|
-
*/const
|
|
1661
|
+
*/const Bc=m`
|
|
1662
1662
|
:host {
|
|
1663
1663
|
display: inline-block;
|
|
1664
1664
|
}
|
|
@@ -1750,7 +1750,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1750
1750
|
* @license
|
|
1751
1751
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1752
1752
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1753
|
-
*/b("vaadin-checkbox",
|
|
1753
|
+
*/b("vaadin-checkbox",Bc,{moduleId:"vaadin-checkbox-styles"});class Fc extends Mc(pe(N(k))){static get is(){return"vaadin-checkbox"}static get template(){return E`
|
|
1754
1754
|
<div class="vaadin-checkbox-container">
|
|
1755
1755
|
<div part="checkbox" aria-hidden="true"></div>
|
|
1756
1756
|
<slot name="input"></slot>
|
|
@@ -1766,7 +1766,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1766
1766
|
</div>
|
|
1767
1767
|
</div>
|
|
1768
1768
|
<slot name="tooltip"></slot>
|
|
1769
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
1769
|
+
`}ready(){super.ready(),this._tooltipController=new Ve(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}D(Fc);/**
|
|
1770
1770
|
* @license
|
|
1771
1771
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1772
1772
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1830,7 +1830,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1830
1830
|
* @license
|
|
1831
1831
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1832
1832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1833
|
-
*/const
|
|
1833
|
+
*/const cs=m`
|
|
1834
1834
|
[part='label'] {
|
|
1835
1835
|
align-self: flex-start;
|
|
1836
1836
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -1942,7 +1942,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1942
1942
|
margin-left: 0;
|
|
1943
1943
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1944
1944
|
}
|
|
1945
|
-
`;b("",
|
|
1945
|
+
`;b("",cs,{moduleId:"lumo-required-field"});const Rc=m`
|
|
1946
1946
|
:host {
|
|
1947
1947
|
color: var(--lumo-body-text-color);
|
|
1948
1948
|
font-size: var(--lumo-font-size-m);
|
|
@@ -1985,15 +1985,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1985
1985
|
color: var(--lumo-secondary-text-color);
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
|
-
`;b("vaadin-checkbox-group",[
|
|
1988
|
+
`;b("vaadin-checkbox-group",[cs,fa,Rc],{moduleId:"lumo-checkbox-group"});/**
|
|
1989
1989
|
* @license
|
|
1990
1990
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1991
1991
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1992
|
-
*/const
|
|
1992
|
+
*/const Hc=i=>class extends bi(Be(et(i))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Ve(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const t=e.detail.node;if(t&&t.isConnected){const o=this.__checkboxes.map(s=>s.inputElement);this._tooltipController.setAriaTarget(o)}else this._tooltipController.setAriaTarget([])})}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Zo(e,({addedNodes:t,removedNodes:o})=>{const s=this.__filterCheckboxes(t),r=this.__filterCheckboxes(o);s.forEach(this.__registerCheckbox),r.forEach(this.__unregisterCheckbox);const n=this.__checkboxes.map(a=>a.inputElement);this._tooltipController.setAriaTarget(n),this.__warnOfCheckboxesWithoutValue(s)}),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(t=>t.nodeType===Node.ELEMENT_NODE&&t.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(t=>{const{value:o}=t;return!t.hasAttribute("value")&&(!o||o==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0)}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value)}_disabledChanged(e,t){super._disabledChanged(e,t),!(!e&&t===void 0)&&t!==e&&this.__checkboxes.forEach(o=>{o.disabled=e})}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e]}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(t=>t!==e))}__onCheckboxCheckedChanged(e){const t=e.target;t.checked?this.__addCheckboxToValue(t.value):this.__removeCheckboxFromValue(t.value)}__valueChanged(e,t){e&&e.length===0&&t===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value)}),t!==void 0&&this.validate())}__readonlyChanged(e,t){(e||t)&&this.__checkboxes.forEach(o=>{o.readonly=e})}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}};/**
|
|
1993
1993
|
* @license
|
|
1994
1994
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1995
1995
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1996
|
-
*/const
|
|
1996
|
+
*/const qc=m`
|
|
1997
1997
|
:host {
|
|
1998
1998
|
display: inline-flex;
|
|
1999
1999
|
}
|
|
@@ -2026,7 +2026,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2026
2026
|
* @license
|
|
2027
2027
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2028
2028
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2029
|
-
*/b("vaadin-checkbox-group",
|
|
2029
|
+
*/b("vaadin-checkbox-group",qc,{moduleId:"vaadin-checkbox-group-styles"});class $c extends Hc(pe(N(k))){static get is(){return"vaadin-checkbox-group"}static get template(){return E`
|
|
2030
2030
|
<div class="vaadin-group-field-container">
|
|
2031
2031
|
<div part="label">
|
|
2032
2032
|
<slot name="label"></slot>
|
|
@@ -2047,11 +2047,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2047
2047
|
</div>
|
|
2048
2048
|
|
|
2049
2049
|
<slot name="tooltip"></slot>
|
|
2050
|
-
`}}
|
|
2050
|
+
`}}D($c);/**
|
|
2051
2051
|
* @license
|
|
2052
2052
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2053
2053
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2054
|
-
*/const
|
|
2054
|
+
*/const us=m`
|
|
2055
2055
|
:host {
|
|
2056
2056
|
top: var(--lumo-space-m);
|
|
2057
2057
|
right: var(--lumo-space-m);
|
|
@@ -2116,11 +2116,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2116
2116
|
opacity: 1;
|
|
2117
2117
|
}
|
|
2118
2118
|
}
|
|
2119
|
-
`;b("",
|
|
2119
|
+
`;b("",us,{moduleId:"lumo-overlay"});/**
|
|
2120
2120
|
* @license
|
|
2121
2121
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2122
2122
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2123
|
-
*/const
|
|
2123
|
+
*/const ps=m`
|
|
2124
2124
|
:host([opening]),
|
|
2125
2125
|
:host([closing]) {
|
|
2126
2126
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2150,7 +2150,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2150
2150
|
opacity: 0;
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
|
-
`;b("",
|
|
2153
|
+
`;b("",ps,{moduleId:"lumo-menu-overlay-core"});const Wc=m`
|
|
2154
2154
|
/* Small viewport (bottom sheet) styles */
|
|
2155
2155
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2156
2156
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2212,7 +2212,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2212
2212
|
transform: translateY(150%);
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
|
-
`,
|
|
2215
|
+
`,_s=[us,ps,Wc];b("",_s,{moduleId:"lumo-menu-overlay"});const Uc=m`
|
|
2216
2216
|
[part='overlay'] {
|
|
2217
2217
|
/*
|
|
2218
2218
|
Width:
|
|
@@ -2257,7 +2257,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2257
2257
|
max-height: 70vh;
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
|
-
`;b("vaadin-date-picker-overlay",[
|
|
2260
|
+
`;b("vaadin-date-picker-overlay",[_s,Uc],{moduleId:"lumo-date-picker-overlay"});const va=m`
|
|
2261
2261
|
:host {
|
|
2262
2262
|
/* Sizing */
|
|
2263
2263
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -3067,7 +3067,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3067
3067
|
* @license
|
|
3068
3068
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3069
3069
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3070
|
-
*/const
|
|
3070
|
+
*/const jc=m`
|
|
3071
3071
|
:host {
|
|
3072
3072
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3073
3073
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3198,7 +3198,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3198
3198
|
[part='clear-button']::before {
|
|
3199
3199
|
content: var(--lumo-icons-cross);
|
|
3200
3200
|
}
|
|
3201
|
-
`,
|
|
3201
|
+
`,tt=[cs,ga,fa,jc];b("",tt,{moduleId:"lumo-input-field-shared-styles"});const Yc=m`
|
|
3202
3202
|
[part='toggle-button']::before {
|
|
3203
3203
|
content: var(--lumo-icons-calendar);
|
|
3204
3204
|
}
|
|
@@ -3220,15 +3220,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3220
3220
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
3221
3221
|
--_lumo-text-field-overflow-mask-image: none;
|
|
3222
3222
|
}
|
|
3223
|
-
`;b("vaadin-date-picker",[
|
|
3223
|
+
`;b("vaadin-date-picker",[tt,Yc],{moduleId:"lumo-date-picker"});/**
|
|
3224
3224
|
* @license
|
|
3225
3225
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3226
3226
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3227
|
-
*/const
|
|
3227
|
+
*/const Gc=i=>class extends i{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())})}};/**
|
|
3228
3228
|
* @license
|
|
3229
3229
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3230
3230
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3231
|
-
*/const
|
|
3231
|
+
*/const Kc=m`
|
|
3232
3232
|
:host {
|
|
3233
3233
|
display: flex;
|
|
3234
3234
|
align-items: center;
|
|
@@ -3297,15 +3297,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3297
3297
|
* @license
|
|
3298
3298
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3299
3299
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3300
|
-
*/b("vaadin-input-container",
|
|
3300
|
+
*/b("vaadin-input-container",Kc,{moduleId:"vaadin-input-container-styles"});let Xc=class extends Gc(N(oe(k))){static get is(){return"vaadin-input-container"}static get template(){return E`
|
|
3301
3301
|
<slot name="prefix"></slot>
|
|
3302
3302
|
<slot></slot>
|
|
3303
3303
|
<slot name="suffix"></slot>
|
|
3304
|
-
`}};
|
|
3304
|
+
`}};D(Xc);/**
|
|
3305
3305
|
* @license
|
|
3306
3306
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3307
3307
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3308
|
-
*/const
|
|
3308
|
+
*/const ms=m`
|
|
3309
3309
|
:host {
|
|
3310
3310
|
z-index: 200;
|
|
3311
3311
|
position: fixed;
|
|
@@ -3372,55 +3372,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3372
3372
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3373
3373
|
Code distributed by Google as part of the polymer project is also
|
|
3374
3374
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3375
|
-
*/let
|
|
3375
|
+
*/let wo=!1,Jc=[],ba=[];function Qc(){wo=!0,requestAnimationFrame(function(){wo=!1,Zc(Jc),setTimeout(function(){eu(ba)})})}function Zc(i){for(;i.length;)ya(i.shift())}function eu(i){for(let e=0,t=i.length;e<t;e++)ya(i.shift())}function ya(i){const e=i[0],t=i[1],o=i[2];try{t.apply(e,o)}catch(s){setTimeout(()=>{throw s})}}function xa(i,e,t){wo||Qc(),ba.push([i,e,t])}/**
|
|
3376
3376
|
* @license
|
|
3377
3377
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3378
3378
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3379
|
-
*/const
|
|
3379
|
+
*/const wi=i=>i.test(navigator.userAgent),Co=i=>i.test(navigator.platform),tu=i=>i.test(navigator.vendor);wi(/Android/u);wi(/Chrome/u)&&tu(/Google Inc/u);wi(/Firefox/u);const iu=Co(/^iPad/u)||Co(/^Mac/u)&&navigator.maxTouchPoints>1,ou=Co(/^iPhone/u),fs=ou||iu,su=wi(/^((?!chrome|android).)*safari/iu),Io=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(i){return!1}})();/**
|
|
3380
3380
|
* @license
|
|
3381
3381
|
* Copyright (c) 2017 Anton Korzunov
|
|
3382
3382
|
* SPDX-License-Identifier: MIT
|
|
3383
|
-
*/let
|
|
3383
|
+
*/let He=new WeakMap,Bt=new WeakMap,Ft={},Hi=0;const $r=i=>i&&i.nodeType===Node.ELEMENT_NODE,qi=(...i)=>{console.error(`Error: ${i.join(" ")}. Skip setting aria-hidden.`)},ru=(i,e)=>$r(i)?e.map(t=>{if(!$r(t))return qi(t,"is not a valid element"),null;let o=t;for(;o&&o!==i;){if(i.contains(o))return t;o=o.getRootNode().host}return qi(t,"is not contained inside",i),null}).filter(t=>!!t):(qi(i,"is not a valid element"),[]),nu=(i,e,t,o)=>{const s=ru(e,Array.isArray(i)?i:[i]);Ft[t]||(Ft[t]=new WeakMap);const r=Ft[t],n=[],a=new Set,l=new Set(s),d=c=>{if(!c||a.has(c))return;a.add(c);const p=c.assignedSlot;p&&d(p),d(c.parentNode||c.host)};s.forEach(d);const u=c=>{if(!c||l.has(c))return;const p=c.shadowRoot;(p?[...c.children,...p.children]:[...c.children]).forEach(_=>{if(!["template","script","style"].includes(_.localName))if(a.has(_))u(_);else{const v=_.getAttribute(o),x=v!==null&&v!=="false",g=(He.get(_)||0)+1,y=(r.get(_)||0)+1;He.set(_,g),r.set(_,y),n.push(_),g===1&&x&&Bt.set(_,!0),y===1&&_.setAttribute(t,"true"),x||_.setAttribute(o,"true")}})};return u(e),a.clear(),Hi+=1,()=>{n.forEach(c=>{const p=He.get(c)-1,_=r.get(c)-1;He.set(c,p),r.set(c,_),p||(Bt.has(c)?Bt.delete(c):c.removeAttribute(o)),_||c.removeAttribute(t)}),Hi-=1,Hi||(He=new WeakMap,He=new WeakMap,Bt=new WeakMap,Ft={})}},wa=(i,e=document.body,t="data-aria-hidden")=>{const o=Array.from(Array.isArray(i)?i:[i]);return e&&o.push(...Array.from(e.querySelectorAll("[aria-live]"))),nu(o,e,t,"aria-hidden")};/**
|
|
3384
3384
|
* @license
|
|
3385
3385
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3386
3386
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3387
|
-
*/let
|
|
3387
|
+
*/let au=class{constructor(i,e){this.host=i,this.callback=typeof e=="function"?e:()=>i}showModal(){const i=this.callback();this.__showOthers=wa(i)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}};/**
|
|
3388
3388
|
* @license
|
|
3389
3389
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3390
3390
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3391
|
-
*/let
|
|
3391
|
+
*/let lu=class{saveFocus(i){this.focusNode=i||bo()}restoreFocus(i){const e=this.focusNode;if(!e)return;const t=i?i.preventScroll:!1;bo()===document.body?setTimeout(()=>e.focus({preventScroll:t})):e.focus({preventScroll:t}),this.focusNode=null}};/**
|
|
3392
3392
|
* @license
|
|
3393
3393
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3394
3394
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3395
|
-
*/const $i=[];let
|
|
3395
|
+
*/const $i=[];let du=class{constructor(i){this.host=i,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return Sc(this.__trapNode)}get __focusedElementIndex(){const i=this.__focusableElements;return i.indexOf(i.filter(ns).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(i){if(this.__trapNode=i,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");$i.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,$i.pop()}__onKeyDown(i){if(this.__trapNode&&this===Array.from($i).pop()&&i.key==="Tab"){i.preventDefault();const e=i.shiftKey;this.__focusNextElement(e)}}__focusNextElement(i=!1){const e=this.__focusableElements,t=i?-1:1,o=this.__focusedElementIndex,s=(e.length+o+t)%e.length,r=e[s];r.focus(),r.localName==="input"&&r.select()}};/**
|
|
3396
3396
|
* @license
|
|
3397
3397
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3398
3398
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3399
|
-
*/const
|
|
3399
|
+
*/const hu=i=>class extends Ie(i){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new au(this),this.__focusTrapController=new du(this),this.__focusRestorationController=new lu}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!vi();this.__focusRestorationController.restoreFocus({preventScroll:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=bo();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}};/**
|
|
3400
3400
|
* @license
|
|
3401
3401
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3402
3402
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3403
|
-
*/const
|
|
3403
|
+
*/const Ca=()=>Array.from(document.body.children).filter(i=>i instanceof HTMLElement&&i._hasOverlayStackMixin&&!i.hasAttribute("closing")).sort((i,e)=>i.__zIndex-e.__zIndex||0),Ao=()=>Ca().filter(i=>i.$.overlay),cu=i=>i===Ao().pop(),Ia=i=>class extends i{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return cu(this)}bringToFront(){let e="";const t=Ca().filter(o=>o!==this).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ao().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=Ao();let t;for(;(t=e.pop())&&!(t!==this&&(t.$.overlay.style.removeProperty("pointer-events"),!t.modeless)););}};/**
|
|
3404
3404
|
* @license
|
|
3405
3405
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3406
3406
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3407
|
-
*/const vs=i=>class extends
|
|
3407
|
+
*/const vs=i=>class extends hu(Ia(i)){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),fs&&(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(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${o-e}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(e,t,o,s){const r=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const n=this._oldRenderer!==e,a=this._oldRenderer!==void 0;this._oldRenderer=e;const l=this._oldOpened!==s;this._oldOpened=s,n&&a&&(this.innerHTML="",delete this._$litPart$),s&&e&&(n||l||r)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),xa(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o)}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return e.getPropertyValue("display")!=="none"&&t&&t!=="none"}_enqueueAnimation(e,t){const o=`__${e}Handler`,s=r=>{r&&r.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;typeof this[t]=="function"&&this[t]()}_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(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}};/**
|
|
3408
3408
|
* @license
|
|
3409
3409
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
3410
3410
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3411
|
-
*/function
|
|
3411
|
+
*/function uu(i,e){let t=null;const o=document.documentElement;function s(){t&&t.disconnect(),t=null}function r(n=!1,a=1){s();const{left:l,top:d,width:u,height:c}=i.getBoundingClientRect();if(n||e(),!u||!c)return;const p=Math.floor(d),_=Math.floor(o.clientWidth-(l+u)),v=Math.floor(o.clientHeight-(d+c)),x=Math.floor(l),g={rootMargin:`${-p}px ${-_}px ${-v}px ${-x}px`,threshold:Math.max(0,Math.min(1,a))||1};let y=!0;function S(L){let C=L[0].intersectionRatio;if(C!==a){if(!y)return r();C===0&&(C=1e-7),r(!1,C)}y=!1}t=new IntersectionObserver(S,g),t.observe(i)}return r(!0),s}/**
|
|
3412
3412
|
* @license
|
|
3413
3413
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3414
3414
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3415
|
-
*/const
|
|
3415
|
+
*/const Wi={start:"top",end:"bottom"},Ui={start:"left",end:"right"},Wr=new ResizeObserver(i=>{setTimeout(()=>{i.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),gs=i=>class extends i{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=nc(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=uu(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,Wr.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,Wr.observe(t))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(s=>{this.__margins[s]=parseInt(o[s],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";const o=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,o),r=!o&&s||o&&!s;this.style.alignItems=r?"flex-start":"flex-end";const n=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,Wi,this,t),l=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,Ui,this,s);Object.assign(this.style,a,l),this.toggleAttribute("bottom-aligned",!t),this.toggleAttribute("top-aligned",t),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,t){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!t&&this.horizontalAlign==="start"||t&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,s,this.__margins,r,this.noHorizontalOverlap,Ui)}__shouldAlignStartVertically(e){const t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),s=this.verticalAlign==="top";return this.__shouldAlignStart(e,t,o,this.__margins,s,this.noVerticalOverlap,Wi)}__shouldAlignStart(e,t,o,s,r,n,a){const l=o-e[n?a.end:a.start]-s[a.end],d=e[n?a.start:a.end]-s[a.start],u=r?l:d,c=u>(r?d:l)||u>t;return r===c}__adjustBottomProperty(e,t,o){let s;if(e===t.end){if(t.end===Wi.end){const r=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>r&&this.__oldViewportHeight){const n=this.__oldViewportHeight-r;s=o-n}this.__oldViewportHeight=r}if(t.end===Ui.end){const r=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>r&&this.__oldViewportWidth){const n=this.__oldViewportWidth-r;s=o-n}this.__oldViewportWidth=r}}return s}__calculatePositionInOneDimension(e,t,o,s,r,n){const a=n?s.start:s.end,l=n?s.end:s.start,d=parseFloat(r.style[a]||getComputedStyle(r)[a]),u=this.__adjustBottomProperty(a,s,d),c=t[n?s.start:s.end]-e[o===n?s.end:s.start],p=u?`${u}px`:`${d+c*(n?-1:1)}px`;return{[a]:p,[l]:""}}};/**
|
|
3416
3416
|
* @license
|
|
3417
3417
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3418
3418
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3419
|
-
*/const
|
|
3419
|
+
*/const pu=i=>class extends gs(vs(i)){_shouldCloseOnOutsideClick(e){return!e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!rs(e.composedPath()[0])&&e.preventDefault()}};/**
|
|
3420
3420
|
* @license
|
|
3421
3421
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3422
3422
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3423
|
-
*/const
|
|
3423
|
+
*/const _u=m`
|
|
3424
3424
|
[part='overlay'] {
|
|
3425
3425
|
display: flex;
|
|
3426
3426
|
flex: auto;
|
|
@@ -3439,18 +3439,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3439
3439
|
* @license
|
|
3440
3440
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3441
3441
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3442
|
-
*/b("vaadin-date-picker-overlay",[
|
|
3442
|
+
*/b("vaadin-date-picker-overlay",[ms,_u],{moduleId:"vaadin-date-picker-overlay-styles"});class mu extends pu(oe(N(k))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return E`
|
|
3443
3443
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3444
3444
|
<div part="overlay" id="overlay">
|
|
3445
3445
|
<div part="content" id="content">
|
|
3446
3446
|
<slot></slot>
|
|
3447
3447
|
</div>
|
|
3448
3448
|
</div>
|
|
3449
|
-
`}}
|
|
3449
|
+
`}}D(mu);/**
|
|
3450
3450
|
* @license
|
|
3451
3451
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3452
3452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3453
|
-
*/const
|
|
3453
|
+
*/const Aa=m`
|
|
3454
3454
|
:host {
|
|
3455
3455
|
display: inline-block;
|
|
3456
3456
|
position: relative;
|
|
@@ -3510,7 +3510,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3510
3510
|
outline-color: GrayText;
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
3513
|
-
`,
|
|
3513
|
+
`,fu=i=>i`
|
|
3514
3514
|
<div class="vaadin-button-container">
|
|
3515
3515
|
<span part="prefix" aria-hidden="true">
|
|
3516
3516
|
<slot name="prefix"></slot>
|
|
@@ -3527,15 +3527,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3527
3527
|
* @license
|
|
3528
3528
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3529
3529
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3530
|
-
*/const bs=i=>class extends
|
|
3530
|
+
*/const bs=i=>class extends os(ua(Be(i))){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(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click())}};/**
|
|
3531
3531
|
* @license
|
|
3532
3532
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3533
3533
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3534
|
-
*/b("vaadin-button",
|
|
3534
|
+
*/b("vaadin-button",Aa,{moduleId:"vaadin-button-styles"});class vu extends bs(pe(N(Ie(k)))){static get is(){return"vaadin-button"}static get template(){return fu(E)}ready(){super.ready(),this._tooltipController=new Ve(this),this.addController(this._tooltipController)}}D(vu);/**
|
|
3535
3535
|
* @license
|
|
3536
3536
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3537
3537
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3538
|
-
*/function
|
|
3538
|
+
*/function gu(i){let e=i.getDay();e===0&&(e=7);const t=4-e,o=new Date(i.getTime()+t*24*3600*1e3),s=new Date(0,0);s.setFullYear(o.getFullYear());const r=o.getTime()-s.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function Eo(i){const e=new Date(i);return e.setHours(0,0,0,0),e}function ue(i,e,t=Eo){return i instanceof Date&&e instanceof Date&&t(i).getTime()===t(e).getTime()}function ys(i){return{day:i.getDate(),month:i.getMonth(),year:i.getFullYear()}}function Je(i,e,t,o){let s=!1;if(typeof o=="function"&&i){const r=ys(i);s=o(r)}return(!e||i>=e)&&(!t||i<=t)&&!s}function Ea(i,e){return e.filter(t=>t!==void 0).reduce((t,o)=>{if(!o)return t;if(!t)return o;const s=Math.abs(i.getTime()-o.getTime()),r=Math.abs(t.getTime()-i.getTime());return s<r?o:t})}function ka(i){const e=new Date,t=new Date(e);return t.setDate(1),t.setMonth(parseInt(i)+e.getMonth()),t}function bu(i,e,t=0,o=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 s=e+Math.floor(i.getFullYear()/100)*100;return i<new Date(s-50,t,o)?s-=100:i>new Date(s+50,t,o)&&(s+=100),s}function ht(i){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(i);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}function yu(i){const e=(l,d="00")=>(d+l).substr((d+l).length-d.length);let t="",o="0000",s=i.year;s<0?(s=-s,t="-",o="000000"):i.year>=1e4&&(t="+",o="000000");const r=t+e(s,o),n=e(i.month+1),a=e(i.day);return[r,n,a].join("-")}function xu(i){return i instanceof Date?yu({year:i.getFullYear(),month:i.getMonth(),day:i.getDate()}):""}/**
|
|
3539
3539
|
@license
|
|
3540
3540
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3541
3541
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3543,7 +3543,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3543
3543
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3544
3544
|
Code distributed by Google as part of the polymer project is also
|
|
3545
3545
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3546
|
-
*/let
|
|
3546
|
+
*/let wu=class ko{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,St.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),St.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,o){return e instanceof ko?e._cancelAsync():e=new ko,e.setConfig(t,o),e}},St=new Set;const Cu=function(i){St.add(i)},Iu=function(){const i=!!St.size;return St.forEach(e=>{try{e.flush()}catch(t){setTimeout(()=>{throw t})}}),i};/**
|
|
3547
3547
|
@license
|
|
3548
3548
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3549
3549
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3551,11 +3551,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3551
3551
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3552
3552
|
Code distributed by Google as part of the polymer project is also
|
|
3553
3553
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3554
|
-
*/const xs=function(){let i,e;do i=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=
|
|
3554
|
+
*/const xs=function(){let i,e;do i=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Iu();while(i||e)};/**
|
|
3555
3555
|
* @license
|
|
3556
3556
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3557
3557
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3558
|
-
*/const
|
|
3558
|
+
*/const Sa=document.createElement("template");Sa.innerHTML=`
|
|
3559
3559
|
<style>
|
|
3560
3560
|
:host {
|
|
3561
3561
|
display: block;
|
|
@@ -3605,11 +3605,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3605
3605
|
<div class="buffer"></div>
|
|
3606
3606
|
<div id="fullHeight"></div>
|
|
3607
3607
|
</div>
|
|
3608
|
-
`;class
|
|
3608
|
+
`;class Pa extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Sa.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 o=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(o)}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`)}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),xs()}_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,o=e>this._buffers[1].translateY+t,s=e<this._buffers[0].translateY+t;(o||s)&&(this._translateBuffer(s),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=G.debounce(this._debouncerScrollFinish,ye.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=G.debounce(this._debouncerUpdateClones,ye.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 o=0;o<this.bufferSize;o++){const s=document.createElement("div");s.style.height=`${this.itemHeight}px`,s.instance={};const r=`vaadin-infinite-scroller-item-content-${fi()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=s,t.appendChild(n),s.setAttribute("slot",r),this.appendChild(s),this._isVisible(s,e)&&this._ensureStampedInstance(s)}}),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(o=>{e.instance[o]=t[o]})}_updateClones(e){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((o,s)=>{if(!o.updated){const r=this._firstIndex+this.bufferSize*s;[...o.children].forEach((n,a)=>{const l=n._itemWrapper;(!e||this._isVisible(l,t))&&this._updateElement(l.instance,r+a)}),o.updated=!0}})}_isVisible(e,t){const o=e.getBoundingClientRect();return o.bottom>t.top&&o.top<t.bottom}}/**
|
|
3609
3609
|
* @license
|
|
3610
3610
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3611
3611
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3612
|
-
*/const
|
|
3612
|
+
*/const Ta=document.createElement("template");Ta.innerHTML=`
|
|
3613
3613
|
<style>
|
|
3614
3614
|
:host {
|
|
3615
3615
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -3621,11 +3621,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3621
3621
|
height: 100%;
|
|
3622
3622
|
}
|
|
3623
3623
|
</style>
|
|
3624
|
-
`;class
|
|
3624
|
+
`;class Au extends Pa{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Ta.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(e,t){e.month=ka(t)}}D(Au);/**
|
|
3625
3625
|
* @license
|
|
3626
3626
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3627
3627
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3628
|
-
*/const
|
|
3628
|
+
*/const Da=document.createElement("template");Da.innerHTML=`
|
|
3629
3629
|
<style>
|
|
3630
3630
|
:host {
|
|
3631
3631
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -3659,15 +3659,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3659
3659
|
border-left-color: #000;
|
|
3660
3660
|
}
|
|
3661
3661
|
</style>
|
|
3662
|
-
`;class
|
|
3662
|
+
`;class Eu extends Pa{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Da.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,o=new Date(t);return o.setFullYear(parseInt(e)+t.getFullYear()),o.getFullYear()}}D(Eu);/**
|
|
3663
3663
|
* @license
|
|
3664
3664
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3665
3665
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3666
|
-
*/const
|
|
3666
|
+
*/const ku=i=>class extends i{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(e,t){this.toggleAttribute("selected",t&&t.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear())}};/**
|
|
3667
3667
|
* @license
|
|
3668
3668
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3669
3669
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3670
|
-
*/class
|
|
3670
|
+
*/class Su extends N(ku(k)){static get is(){return"vaadin-date-picker-year"}static get template(){return E`
|
|
3671
3671
|
<style>
|
|
3672
3672
|
:host {
|
|
3673
3673
|
display: block;
|
|
@@ -3676,7 +3676,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3676
3676
|
</style>
|
|
3677
3677
|
<div part="year-number">[[year]]</div>
|
|
3678
3678
|
<div part="year-separator" aria-hidden="true"></div>
|
|
3679
|
-
`}}
|
|
3679
|
+
`}}D(Su);/**
|
|
3680
3680
|
@license
|
|
3681
3681
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3682
3682
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3684,7 +3684,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3684
3684
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3685
3685
|
Code distributed by Google as part of the polymer project is also
|
|
3686
3686
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3687
|
-
*/function ws(i,e,t,o,s){let r;s&&(r=typeof t=="object"&&t!==null,r&&(o=i.__dataTemp[e]));let n=o!==t&&(o===o||t===t);return r&&n&&(i.__dataTemp[e]=t),n}const Cs=
|
|
3687
|
+
*/function ws(i,e,t,o,s){let r;s&&(r=typeof t=="object"&&t!==null,r&&(o=i.__dataTemp[e]));let n=o!==t&&(o===o||t===t);return r&&n&&(i.__dataTemp[e]=t),n}const Cs=M(i=>{class e extends i{_shouldPropertyChange(o,s,r){return ws(this,o,s,r,!0)}}return e}),Pu=M(i=>{class e extends i{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(o,s,r){return ws(this,o,s,r,this.mutableData)}}return e});Cs._mutablePropertyChange=ws;/**
|
|
3688
3688
|
@license
|
|
3689
3689
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3690
3690
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3692,7 +3692,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3692
3692
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3693
3693
|
Code distributed by Google as part of the polymer project is also
|
|
3694
3694
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3695
|
-
*/let
|
|
3695
|
+
*/let So=null;function Po(){return So}Po.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Po,writable:!0}});const Oa=Jo(Po),Tu=Cs(Oa);function Du(i,e){So=i,Object.setPrototypeOf(i,e.prototype),new e,So=null}const Ou=Jo(class{});function zu(i,e){for(let t=0;t<e.length;t++){let o=e[t];if(!!i!=!!o.__hideTemplateChildren__)if(o.nodeType===Node.TEXT_NODE)i?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if(o.localName==="slot")if(i)o.__polymerReplaced__=document.createComment("hidden-slot"),H(H(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const s=o.__polymerReplaced__;s&&H(H(s).parentNode).replaceChild(o,s)}else o.style&&(i?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=i,o._showHideChildren&&o._showHideChildren(i)}}class Ae extends Ou{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let s=this.root.firstChild;s;s=s.nextSibling)t.push(s),s.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let o=this.__templatizeOptions;(e&&o.instanceProps||!o.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let t in e)this._setPendingProperty(t,e[t])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,o){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,s=>{s.model=this,o(s)});else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(e,t,o)}}_showHideChildren(e){zu(e,this.children)}_setUnmanagedPropertyToNode(e,t,o){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&t=="textContent"?e.__polymerTextContent__=o:super._setUnmanagedPropertyToNode(e,t,o)}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}}Ae.prototype.__dataHost;Ae.prototype.__templatizeOptions;Ae.prototype._methodHost;Ae.prototype.__templatizeOwner;Ae.prototype.__hostProps;const Nu=Cs(Ae);function Ur(i){let e=i.__dataHost;return e&&e._methodHost||e}function Lu(i,e,t){let o=t.mutableData?Nu:Ae;To.mixin&&(o=To.mixin(o));let s=class extends o{};return s.prototype.__templatizeOptions=t,s.prototype._bindTemplate(i),Bu(s,i,e,t),s}function Vu(i,e,t,o){let s=t.forwardHostProp;if(s&&e.hasHostProps){const r=i.localName=="template";let n=e.templatizeTemplateClass;if(!n){if(r){let l=t.mutableData?Tu:Oa;class d extends l{}n=e.templatizeTemplateClass=d}else{const l=i.constructor;class d extends l{}n=e.templatizeTemplateClass=d}let a=e.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Mu(l,s)}),n.prototype._createNotifyingProperty("_host_"+l);Pn&&o&&Hu(e,t,o)}if(i.__dataProto&&Object.assign(i.__data,i.__dataProto),r)Du(i,n),i.__dataTemp={},i.__dataPending=null,i.__dataOld=null,i._enableProperties();else{Object.setPrototypeOf(i,n.prototype);const a=e.hostProps;for(let l in a)if(l="_host_"+l,l in i){const d=i[l];delete i[l],i.__data[l]=d}}}}function Mu(i,e){return function(t,o,s){e.call(t.__templatizeOwner,o.substring(6),s[o])}}function Bu(i,e,t,o){let s=t.hostProps||{};for(let r in o.instanceProps){delete s[r];let n=o.notifyInstanceProp;n&&i.prototype._addPropertyEffect(r,i.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Fu(r,n)})}if(o.forwardHostProp&&e.__dataHost)for(let r in s)t.hasHostProps||(t.hasHostProps=!0),i.prototype._addPropertyEffect(r,i.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ru()})}function Fu(i,e){return function(t,o,s){e.call(t.__templatizeOwner,t,o,s[o])}}function Ru(){return function(i,e,t){i.__dataHost._setPendingPropertyOrPath("_host_"+e,t[e],!0,!0)}}function To(i,e,t){if(ii&&!Ur(i))throw new Error("strictTemplatePolicy: template owner not trusted");if(t=t||{},i.__templatizeOwner)throw new Error("A <template> can only be templatized once");i.__templatizeOwner=e;let o=(e?e.constructor:Ae)._parseTemplate(i),s=o.templatizeInstanceClass;s||(s=Lu(i,o,t),o.templatizeInstanceClass=s);const r=Ur(i);Vu(i,o,t,r);let n=class extends s{};return n.prototype._methodHost=r,n.prototype.__dataHost=i,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=o.hostProps,n=n,n}function Hu(i,e,t){const o=t.constructor._properties,{propertyEffects:s}=i,{instanceProps:r}=e;for(let n in s)if(!o[n]&&!(r&&r[n])){const a=s[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function qu(i,e){let t;for(;e;)if(t=e.__dataHost?e:e.__templatizeInstance)if(t.__dataHost!=i)e=t.__dataHost;else return t;else e=H(e).parentNode;return null}/**
|
|
3696
3696
|
@license
|
|
3697
3697
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3698
3698
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3700,7 +3700,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3700
3700
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3701
3701
|
Code distributed by Google as part of the polymer project is also
|
|
3702
3702
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3703
|
-
*/let jr=!1;function
|
|
3703
|
+
*/let jr=!1;function $u(){if(Sn&&!kn){if(!jr){jr=!0;const i=document.createElement("style");i.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(i)}return!0}return!1}/**
|
|
3704
3704
|
@license
|
|
3705
3705
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3706
3706
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3708,15 +3708,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3708
3708
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3709
3709
|
Code distributed by Google as part of the polymer project is also
|
|
3710
3710
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3711
|
-
*/const
|
|
3711
|
+
*/const Wu=Pu(k);class Yr extends Wu{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:!br,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(),$u()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=H(H(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 s=new MutationObserver(()=>{if(this.querySelector("template"))s.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return s.observe(this,{childList:!0}),!1}let o={};o[this.as]=!0,o[this.indexAs]=!0,o[this.itemsIndexAs]=!0,this.__ctor=To(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:o,forwardHostProp:function(s,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(s,r)},notifyInstanceProp:function(s,r,n){if($d(this.as,r)){let a=s[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Ct(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if(typeof e=="string"){let t=e,o=this.__getMethodHost();return function(){return o[t].apply(o,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 o=0;o<t.length;o++)e.indexOf(t[o])===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=wu.debounce(this.__renderDebouncer,t>0?Kd.after(t):Fn,e.bind(this)),Cu(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),xs()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),o=this.__calculateLimit(t.length);this.__updateInstances(e,o,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking()})),this._setRenderedItemCount(this.__instances.length),(!br||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let o=0;o<e.length;o++)t[o]=o;return this.__filterFn&&(t=t.filter((o,s,r)=>this.__filterFn(e[o],s,r))),this.__sortFn&&t.sort((o,s)=>this.__sortFn(e[o],e[s])),t}__calculateLimit(e){let t=e;const o=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),s=Math.max(t-o,0),this.__chunkCount=s||1):(s=Math.min(Math.max(e-o,0),this.__chunkCount),t=Math.min(o+s,e)),this.__shouldMeasureChunk=s===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,o){const s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<t;r++){let n=this.__instances[r],a=o[r],l=e[a];s[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a)}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n)}__detachInstance(e){let t=this.__instances[e];const o=H(t.root);for(let s=0;s<t.children.length;s++){let r=t.children[s];o.appendChild(r)}return t}__attachInstance(e,t){let o=this.__instances[e];t.insertBefore(o.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,o){let s={};return s[this.as]=e,s[this.indexAs]=t,s[this.itemsIndexAs]=o,new this.__ctor(s)}__insertInstance(e,t,o){const s=this.__stampInstance(e,t,o);let r=this.__instances[t+1],n=r?r.children[0]:this;return H(H(this).parentNode).insertBefore(s.root,n),this.__instances[t]=s,s}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let o=e.slice(6),s=o.indexOf("."),r=s<0?o:o.substring(0,s);if(r==parseInt(r,10)){let n=s<0?"":o.substring(s+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");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 qu(this.template,e)}}customElements.define(Yr.is,Yr);/**
|
|
3712
3712
|
* @license
|
|
3713
3713
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3714
3714
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3715
|
-
*/const
|
|
3715
|
+
*/const Uu=i=>class extends Be(i){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},isDateDisabled:{type:Function,value:()=>!1},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(e=>ue(e.date,this.focusedDate))}ready(){super.ready(),ie(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(e,t,o){const s=new Date(0,0);s.setFullYear(e.getFullYear()),s.setMonth(e.getMonth()),s.setDate(1);const r=new Date(0,0);return r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()+1),r.setDate(0),t&&o&&t.getMonth()===o.getMonth()&&t.getMonth()===e.getMonth()&&o.getDate()-t.getDate()>=0?!1:!Je(s,t,o)&&!Je(r,t,o)}_getTitle(e,t){if(!(e===void 0||t===void 0))return t.formatTitle(t.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300)}_dateAdd(e,t){e.setDate(e.getDate()+t)}_applyFirstDayOfWeek(e,t){if(!(e===void 0||t===void 0))return e.slice(t).concat(e.slice(0,t))}_getWeekDayNames(e,t){if(e===void 0||t===void 0)return[];const{weekdays:o,weekdaysShort:s,firstDayOfWeek:r}=e,n=this._applyFirstDayOfWeek(s,r);return this._applyFirstDayOfWeek(o,r).map((a,l)=>({weekDay:a,weekDayShort:n[l]})).slice(0,7)}__focusedDateChanged(e,t){Array.isArray(t)&&t.some(o=>ue(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,t){return e&&t&&t.firstDayOfWeek===1}_isToday(e){return ue(new Date,e)}_getDays(e,t){if(e===void 0||t===void 0)return[];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==t.firstDayOfWeek;)this._dateAdd(o,-1);const s=[],r=o.getMonth(),n=e.getMonth();for(;o.getMonth()===n||o.getMonth()===r;)s.push(o.getMonth()===n?new Date(o.getTime()):null),this._dateAdd(o,1);return s}_getWeeks(e){return e.reduce((t,o,s)=>(s%7===0&&t.push([]),t[t.length-1].push(o),t),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})))}_preventDefault(e){e.preventDefault()}__getWeekNumber(e){const t=e.reduce((o,s)=>!o&&s?s:o);return gu(t)}__getDayAriaLabel(e){if(!e)return"";let t=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(t+=`, ${this.i18n.today}`),t}};/**
|
|
3716
3716
|
* @license
|
|
3717
3717
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3718
3718
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3719
|
-
*/const
|
|
3719
|
+
*/const ju=m`
|
|
3720
3720
|
:host {
|
|
3721
3721
|
display: block;
|
|
3722
3722
|
}
|
|
@@ -3776,7 +3776,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3776
3776
|
* @license
|
|
3777
3777
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3778
3778
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3779
|
-
*/b("vaadin-month-calendar",
|
|
3779
|
+
*/b("vaadin-month-calendar",ju,{moduleId:"vaadin-month-calendar-styles"});class Yu extends Uu(N(k)){static get template(){return E`
|
|
3780
3780
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
3781
3781
|
<table
|
|
3782
3782
|
id="monthGrid"
|
|
@@ -3818,7 +3818,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3818
3818
|
</template>
|
|
3819
3819
|
</tbody>
|
|
3820
3820
|
</table>
|
|
3821
|
-
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_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,o,s,r,n){const a=["date"],l=e>
|
|
3821
|
+
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_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,o,s,r,n){const a=["date"],l=e>Eo(new Date),d=e<Eo(new Date);return this.__isDayDisabled(e,s,r,n)&&a.push("disabled"),this.__isDayFocused(e,t)&&a.push("focused"),this.__isDaySelected(e,o)&&a.push("selected"),this._isToday(e)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(e,t){return ue(e,t)}__isDaySelected(e,t){return ue(e,t)}__getDayAriaSelected(e,t){if(this.__isDaySelected(e,t))return"true"}__isDayDisabled(e,t,o,s){return!Je(e,t,o,s)}__getDayAriaDisabled(e,t,o,s){if(!(e===void 0||t===void 0&&o===void 0&&s===void 0)&&this.__isDayDisabled(e,t,o,s))return"true"}__getDayTabindex(e,t){return this.__isDayFocused(e,t)?"0":"-1"}}D(Yu);/**
|
|
3822
3822
|
* @license
|
|
3823
3823
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3824
3824
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3826,11 +3826,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3826
3826
|
* @license
|
|
3827
3827
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3828
3828
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3829
|
-
*/const ju=i=>class extends i{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},isDateDisabled:{type:Function},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, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){da(this.$.scrollers,"pan-y"),te(this.$.scrollers,"track",this._track.bind(this)),te(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),te(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),te(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Is(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new he(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onTodayButtonKeyDown(t)),te(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new he(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onCancelButtonKeyDown(t)),te(e,"tap",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new he(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",t=>{this.__onMonthCalendarKeyDown(t)}),e.addEventListener("init-done",()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach(o=>{o.addEventListener("selected-date-changed",s=>{this.selectedDate=s.detail.value})}),this.calendars=t}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new he(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),te(e,"tap",t=>{this._onYearTap(t)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t&&t.cancel)}__updateTodayButton(e,t,o,s,r){e&&(e.textContent=t&&t.today,e.disabled=!this._isTodayAllowed(o,s,r))}__updateCalendars(e,t,o,s,r,n,a,l,d,u){e&&e.length&&e.forEach(c=>{c.i18n=t,c.minDate=o,c.maxDate=s,c.isDateDisabled=u,c.focusedDate=n,c.selectedDate=r,c.showWeekNumbers=a,c.ignoreTaps=l,d?c.setAttribute("theme",d):c.removeAttribute("theme")})}__updateYears(e,t,o){e&&e.length&&e.forEach(s=>{s.selectedDate=t,o?s.setAttribute("theme",o):s.removeAttribute("theme")})}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const a=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+a,t);return}const s=this._monthScroller.position>o,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,n=this._monthScroller.position+r-1<o;s?this._scrollToPosition(o,t):n&&this._scrollToPosition(o-r+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let o=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+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=G.debounce(this._debouncer,be.after(300),()=>{this._ignoreTaps=!1})}_formatDisplayed(e,t,o){return e&&t&&typeof t.formatDate=="function"?t.formatDate(ys(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+t*12,!0)}}_scrollToPosition(e,t){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(l=>{o=l});const s=(l,d,u,c)=>(l/=c/2,l<1?u/2*l*l+d:(l-=1,-u/2*(l*(l-2)-1)+d));let r=0;const n=this._monthScroller.position,a=l=>{r||(r=l);const d=l-r;if(d<this.scrollDuration){const u=s(d,n,this._targetPosition-n,this.scrollDuration);this._monthScroller.position=u,window.requestAnimationFrame(a)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:n}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(a)}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`)}_yearAfterXMonths(e){return Ea(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}__toggleDate(e){ce(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const e=this.focusableDateElement;e&&ce(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}focusDate(e,t){return Xt(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,t||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1)})}focusDateElement(e=!0){return Xt(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(t=>{ms(this,()=>{xs(),t()})})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()})}_focusClosestDate(e){this.focusDate(Aa(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),t&&o.setDate(this.focusedDate.getDate()+t),o}_moveFocusByDays(e){const t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){const t=this._getDateDiff(e),o=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==o&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){const o=new Date(0,0);o.setFullYear(e.getFullYear()),t==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,o=this.maxDate,s=this.isDateDisabled){return Xe(e,t,o,s)}_isTodayAllowed(e,t,o){return this._dateAllowed(this._getTodayMidnight(),e,t,o)}_getTodayMidnight(){const e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};/**
|
|
3829
|
+
*/const Gu=i=>class extends i{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},isDateDisabled:{type:Function},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, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){da(this.$.scrollers,"pan-y"),ie(this.$.scrollers,"track",this._track.bind(this)),ie(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),ie(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),ie(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Is(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new ce(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onTodayButtonKeyDown(t)),ie(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new ce(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onCancelButtonKeyDown(t)),ie(e,"tap",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new ce(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",t=>{this.__onMonthCalendarKeyDown(t)}),e.addEventListener("init-done",()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach(o=>{o.addEventListener("selected-date-changed",s=>{this.selectedDate=s.detail.value})}),this.calendars=t}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new ce(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),ie(e,"tap",t=>{this._onYearTap(t)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t&&t.cancel)}__updateTodayButton(e,t,o,s,r){e&&(e.textContent=t&&t.today,e.disabled=!this._isTodayAllowed(o,s,r))}__updateCalendars(e,t,o,s,r,n,a,l,d,u){e&&e.length&&e.forEach(c=>{c.i18n=t,c.minDate=o,c.maxDate=s,c.isDateDisabled=u,c.focusedDate=n,c.selectedDate=r,c.showWeekNumbers=a,c.ignoreTaps=l,d?c.setAttribute("theme",d):c.removeAttribute("theme")})}__updateYears(e,t,o){e&&e.length&&e.forEach(s=>{s.selectedDate=t,o?s.setAttribute("theme",o):s.removeAttribute("theme")})}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const a=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+a,t);return}const s=this._monthScroller.position>o,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,n=this._monthScroller.position+r-1<o;s?this._scrollToPosition(o,t):n&&this._scrollToPosition(o-r+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let o=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+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=G.debounce(this._debouncer,ye.after(300),()=>{this._ignoreTaps=!1})}_formatDisplayed(e,t,o){return e&&t&&typeof t.formatDate=="function"?t.formatDate(ys(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+t*12,!0)}}_scrollToPosition(e,t){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(l=>{o=l});const s=(l,d,u,c)=>(l/=c/2,l<1?u/2*l*l+d:(l-=1,-u/2*(l*(l-2)-1)+d));let r=0;const n=this._monthScroller.position,a=l=>{r||(r=l);const d=l-r;if(d<this.scrollDuration){const u=s(d,n,this._targetPosition-n,this.scrollDuration);this._monthScroller.position=u,window.requestAnimationFrame(a)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:n}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(a)}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`)}_yearAfterXMonths(e){return ka(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}__toggleDate(e){ue(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const e=this.focusableDateElement;e&&ue(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}focusDate(e,t){return Jt(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,t||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1)})}focusDateElement(e=!0){return Jt(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(t=>{xa(this,()=>{xs(),t()})})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()})}_focusClosestDate(e){this.focusDate(Ea(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),t&&o.setDate(this.focusedDate.getDate()+t),o}_moveFocusByDays(e){const t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){const t=this._getDateDiff(e),o=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==o&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){const o=new Date(0,0);o.setFullYear(e.getFullYear()),t==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,o=this.maxDate,s=this.isDateDisabled){return Je(e,t,o,s)}_isTodayAllowed(e,t,o){return this._dateAllowed(this._getTodayMidnight(),e,t,o)}_getTodayMidnight(){const e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};/**
|
|
3830
3830
|
* @license
|
|
3831
3831
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3832
3832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3833
|
-
*/const
|
|
3833
|
+
*/const Ku=m`
|
|
3834
3834
|
:host {
|
|
3835
3835
|
display: flex;
|
|
3836
3836
|
flex-direction: column;
|
|
@@ -3894,7 +3894,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3894
3894
|
* @license
|
|
3895
3895
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3896
3896
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3897
|
-
*/b("vaadin-date-picker-overlay-content",
|
|
3897
|
+
*/b("vaadin-date-picker-overlay-content",Ku,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Xu extends Gu(Ie(N(oe(k)))){static get template(){return E`
|
|
3898
3898
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3899
3899
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3900
3900
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3914,32 +3914,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3914
3914
|
<slot name="today-button"></slot>
|
|
3915
3915
|
<slot name="cancel-button"></slot>
|
|
3916
3916
|
</div>
|
|
3917
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}
|
|
3917
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}D(Xu);/**
|
|
3918
3918
|
* @license
|
|
3919
3919
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3920
3920
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3921
|
-
*/const
|
|
3921
|
+
*/const ji=new WeakMap;function Ju(i){return ji.has(i)||ji.set(i,new Set),ji.get(i)}function Qu(i,e){const t=document.createElement("style");t.textContent=i,e===document?document.head.appendChild(t):e.insertBefore(t,e.firstChild)}const za=M(i=>class extends i{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=Ju(e);this.slotStyles.forEach(o=>{t.has(o)||(Qu(o,e),t.add(o))})}});/**
|
|
3922
3922
|
* @license
|
|
3923
3923
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3924
3924
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3925
|
-
*/const
|
|
3925
|
+
*/const Zu=i=>class extends Ot(Me(i)){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",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){e.preventDefault(),Io||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};/**
|
|
3926
3926
|
* @license
|
|
3927
3927
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3928
3928
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3929
|
-
*/const As=
|
|
3929
|
+
*/const As=M(i=>class extends as(hs(Ot(i))){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(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(t=>this.__isValidConstraint(t))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;const o=this._hasValidConstraints(t),s=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=o}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return!!e||e===0}});/**
|
|
3930
3930
|
* @license
|
|
3931
3931
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3932
3932
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3933
|
-
*/const Es=i=>class extends
|
|
3933
|
+
*/const Es=i=>class extends za(gi(As(bi(Zu(Me(i)))))){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[`
|
|
3934
3934
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
3935
3935
|
font: inherit;
|
|
3936
3936
|
color: inherit;
|
|
3937
3937
|
}
|
|
3938
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=G.debounce(this._preventInputDebouncer,
|
|
3938
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=G.debounce(this._preventInputDebouncer,ye.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){const t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u")}catch(t){console.error(t)}}};/**
|
|
3939
3939
|
* @license
|
|
3940
3940
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3941
3941
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3942
|
-
*/const
|
|
3942
|
+
*/const ep=m`
|
|
3943
3943
|
[part='clear-button'] {
|
|
3944
3944
|
display: none;
|
|
3945
3945
|
cursor: default;
|
|
@@ -3956,7 +3956,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3956
3956
|
* @license
|
|
3957
3957
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3958
3958
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3959
|
-
*/const
|
|
3959
|
+
*/const Na=m`
|
|
3960
3960
|
:host {
|
|
3961
3961
|
display: inline-flex;
|
|
3962
3962
|
outline: none;
|
|
@@ -3994,7 +3994,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3994
3994
|
* @license
|
|
3995
3995
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3996
3996
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3997
|
-
*/const
|
|
3997
|
+
*/const La=m`
|
|
3998
3998
|
[class$='container'] {
|
|
3999
3999
|
display: flex;
|
|
4000
4000
|
flex-direction: column;
|
|
@@ -4006,23 +4006,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4006
4006
|
* @license
|
|
4007
4007
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4008
4008
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4009
|
-
*/const ks=[
|
|
4009
|
+
*/const ks=[Na,La,ep];/**
|
|
4010
4010
|
* @license
|
|
4011
4011
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4012
4012
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4013
|
-
*/const
|
|
4013
|
+
*/const Ci=i=>class extends i{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t||e===void 0)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const r=this.__previousClasses.filter(n=>!this.__initialClasses.has(n));r.length>0&&o.remove(...r)}const s=typeof e=="string"?e.split(" ").filter(Boolean):[];s.length>0&&o.add(...s),this.__previousClasses=s}};/**
|
|
4014
4014
|
* @license
|
|
4015
4015
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4016
4016
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4017
|
-
*/let
|
|
4017
|
+
*/let Va=class{constructor(i){this.host=i,i.addEventListener("opened-changed",()=>{i.opened||this.__setVirtualKeyboardEnabled(!1)}),i.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),i.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0))}__setVirtualKeyboardEnabled(i){this.host.inputElement&&(this.host.inputElement.inputMode=i?"":"none")}};/**
|
|
4018
4018
|
* @license
|
|
4019
4019
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4020
4020
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4021
|
-
*/const Zu=i=>class extends wi(Ce(vi(As(Ve(i))))){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: 450px), (max-height: 450px)"},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(e){const t=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),o=new Date;let s,r=o.getMonth(),n=o.getFullYear();if(t.length===3){if(r=parseInt(t[0])-1,s=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0){const a=this.referenceDate?dt(this.referenceDate):new Date;n=vu(a,n,r,s)}}else t.length===2?(r=parseInt(t[0])-1,s=parseInt(t[1])):t.length===1&&(s=parseInt(t[0]));if(s!==void 0)return{day:s,month:r,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_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:fs},_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, isDateDisabled)","__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(e){super._inputElementValue=e,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!fi()&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Is(this._fullscreenMediaQuery,t=>{this._fullscreen=t})),this.addController(new La(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",()=>{this._close()}),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close()}),t.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date)}),t.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),t.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1)}),t.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value}),t.addEventListener("click",o=>o.stopPropagation())}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);if(t&&(t=dt(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(ys(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Xe(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),t&&o&&s}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:t}=e;return this.opened&&t!==null&&t!==document.body&&!this.contains(t)&&!this._overlayContent.contains(t)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront()})}_isNoInput(e,t,o,s,r,n){return!e||t&&(!n||r)||o&&r||!s.parseDate}_formatISO(e){return bu(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){e===void 0||t===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){e===void 0||t===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e)}_valueChanged(e,t){const o=dt(e);if(e&&!o){this.value=t;return}e?ce(this._selectedDate,o)||(this._selectedDate=o,t!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,o,s,r,n,a,l,d){e&&(e.i18n=t,e.label=o,e.minDate=s,e.maxDate=r,e.focusedDate=n,e.selectedDate=a,e.showWeekNumbers=l,e.isDateDisabled=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const o=e.focusedDate||t;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement());const r=this._noInput?e:[s,e];this.__showOthers=xa(r)}_getInitialPosition(){const e=dt(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Xe(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?Aa(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,ce(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return dt(e)}};/**
|
|
4021
|
+
*/const tp=i=>class extends Ci(Ie(gi(As(Me(i))))){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: 450px), (max-height: 450px)"},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(e){const t=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),o=new Date;let s,r=o.getMonth(),n=o.getFullYear();if(t.length===3){if(r=parseInt(t[0])-1,s=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0){const a=this.referenceDate?ht(this.referenceDate):new Date;n=bu(a,n,r,s)}}else t.length===2?(r=parseInt(t[0])-1,s=parseInt(t[1])):t.length===1&&(s=parseInt(t[0]));if(s!==void 0)return{day:s,month:r,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_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:fs},_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, isDateDisabled)","__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(e){super._inputElementValue=e,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!vi()&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Is(this._fullscreenMediaQuery,t=>{this._fullscreen=t})),this.addController(new Va(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",()=>{this._close()}),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close()}),t.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date)}),t.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),t.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1)}),t.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value}),t.addEventListener("click",o=>o.stopPropagation())}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);if(t&&(t=ht(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(ys(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Je(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),t&&o&&s}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:t}=e;return this.opened&&t!==null&&t!==document.body&&!this.contains(t)&&!this._overlayContent.contains(t)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront()})}_isNoInput(e,t,o,s,r,n){return!e||t&&(!n||r)||o&&r||!s.parseDate}_formatISO(e){return xu(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){e===void 0||t===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){e===void 0||t===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e)}_valueChanged(e,t){const o=ht(e);if(e&&!o){this.value=t;return}e?ue(this._selectedDate,o)||(this._selectedDate=o,t!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,o,s,r,n,a,l,d){e&&(e.i18n=t,e.label=o,e.minDate=s,e.maxDate=r,e.focusedDate=n,e.selectedDate=a,e.showWeekNumbers=l,e.isDateDisabled=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const o=e.focusedDate||t;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement());const r=this._noInput?e:[s,e];this.__showOthers=wa(r)}_getInitialPosition(){const e=ht(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Je(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?Ea(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,ue(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return ht(e)}};/**
|
|
4022
4022
|
* @license
|
|
4023
4023
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4024
4024
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4025
|
-
*/const
|
|
4025
|
+
*/const ip=m`
|
|
4026
4026
|
:host([opened]) {
|
|
4027
4027
|
pointer-events: auto;
|
|
4028
4028
|
}
|
|
@@ -4039,7 +4039,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4039
4039
|
* @license
|
|
4040
4040
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4041
4041
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4042
|
-
*/b("vaadin-date-picker",[ks,
|
|
4042
|
+
*/b("vaadin-date-picker",[ks,ip],{moduleId:"vaadin-date-picker-styles"});class op extends tp(Es(N(pe(k)))){static get is(){return"vaadin-date-picker"}static get template(){return E`
|
|
4043
4043
|
<div class="vaadin-date-picker-container">
|
|
4044
4044
|
<div part="label">
|
|
4045
4045
|
<slot name="label"></slot>
|
|
@@ -4081,23 +4081,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4081
4081
|
></vaadin-date-picker-overlay>
|
|
4082
4082
|
|
|
4083
4083
|
<slot name="tooltip"></slot>
|
|
4084
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new
|
|
4084
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new yi(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new xi(this.inputElement,this._labelController)),this._tooltipController=new Ve(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.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}}D(op);/**
|
|
4085
4085
|
* @license
|
|
4086
4086
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4087
4087
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4088
|
-
*/b("vaadin-text-field",
|
|
4088
|
+
*/b("vaadin-text-field",tt,{moduleId:"lumo-text-field-styles"});/**
|
|
4089
4089
|
* @license
|
|
4090
4090
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4091
4091
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4092
|
-
*/const
|
|
4092
|
+
*/const sp=i=>class extends Es(i){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_onInput(e){super._onInput(e),this.invalid&&this.validate()}_valueChanged(e,t){super._valueChanged(e,t),t!==void 0&&this.invalid&&this.validate()}};/**
|
|
4093
4093
|
* @license
|
|
4094
4094
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4095
4095
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4096
|
-
*/const
|
|
4096
|
+
*/const rp=i=>class extends sp(i){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new yi(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new xi(this.inputElement,this._labelController))}};/**
|
|
4097
4097
|
* @license
|
|
4098
4098
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4099
4099
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4100
|
-
*/b("vaadin-text-field",ks,{moduleId:"vaadin-text-field-styles"});class
|
|
4100
|
+
*/b("vaadin-text-field",ks,{moduleId:"vaadin-text-field-styles"});class Ma extends rp(N(pe(k))){static get is(){return"vaadin-text-field"}static get template(){return E`
|
|
4101
4101
|
<div class="vaadin-field-container">
|
|
4102
4102
|
<div part="label">
|
|
4103
4103
|
<slot name="label"></slot>
|
|
@@ -4126,11 +4126,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4126
4126
|
</div>
|
|
4127
4127
|
</div>
|
|
4128
4128
|
<slot name="tooltip"></slot>
|
|
4129
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
4129
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Ve(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}D(Ma);/**
|
|
4130
4130
|
* @license
|
|
4131
4131
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4132
4132
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4133
|
-
*/const
|
|
4133
|
+
*/const np=m`
|
|
4134
4134
|
:host {
|
|
4135
4135
|
position: absolute;
|
|
4136
4136
|
right: 0;
|
|
@@ -4143,11 +4143,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4143
4143
|
background: transparent;
|
|
4144
4144
|
outline: none;
|
|
4145
4145
|
}
|
|
4146
|
-
`;b("vaadin-password-field-button",[va,
|
|
4146
|
+
`;b("vaadin-password-field-button",[va,np],{moduleId:"lumo-password-field-button"});/**
|
|
4147
4147
|
* @license
|
|
4148
4148
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4149
4149
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4150
|
-
*/const
|
|
4150
|
+
*/const ap=m`
|
|
4151
4151
|
[part='reveal-button']::before {
|
|
4152
4152
|
content: var(--lumo-icons-eye);
|
|
4153
4153
|
}
|
|
@@ -4165,27 +4165,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4165
4165
|
[part='reveal-button'][hidden] {
|
|
4166
4166
|
display: none !important;
|
|
4167
4167
|
}
|
|
4168
|
-
`;b("vaadin-password-field",[
|
|
4168
|
+
`;b("vaadin-password-field",[tt,ap],{moduleId:"lumo-password-field"});/**
|
|
4169
4169
|
* @license
|
|
4170
4170
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4171
4171
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4172
|
-
*/b("vaadin-password-field-button",
|
|
4172
|
+
*/b("vaadin-password-field-button",Aa,{moduleId:"vaadin-password-field-button-styles"});class lp extends bs(oe(N(k))){static get is(){return"vaadin-password-field-button"}static get template(){return E``}}D(lp);/**
|
|
4173
4173
|
* @license
|
|
4174
4174
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4175
4175
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4176
|
-
*/const
|
|
4176
|
+
*/const dp=i=>class extends za(et(Be(Ot(i)))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){const e=this.localName;return[...super.slotStyles,`
|
|
4177
4177
|
${e} [slot="input"]::-ms-reveal {
|
|
4178
4178
|
display: none;
|
|
4179
4179
|
}
|
|
4180
|
-
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new
|
|
4180
|
+
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new ce(this,"reveal","vaadin-password-field-button",{initializer:e=>{e.disabled=this.disabled,e.addEventListener("click",this.__boundRevealButtonClick),e.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(e){super._onChange(e),this.__lastChange=this.inputElement.value}_shouldSetFocus(e){return e.target===this.inputElement||e.target===this._revealNode}_shouldRemoveFocus(e){return!(e.relatedTarget===this._revealNode||e.relatedTarget===this.inputElement&&e.target===this._revealNode)}_setFocused(e){if(super._setFocused(e),!e)this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})));else{const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}}__updateAriaLabel(e){e&&e.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",e.reveal)}__i18nChanged(e){this.__updateAriaLabel(e)}_revealButtonHiddenChanged(e){this._toggleRevealHidden(e)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(e){this._revealNode&&(e?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(e){this._revealNode&&this._revealNode.setAttribute("aria-pressed",e?"true":"false")}_passwordVisibleChanged(e){this._setType(e?"text":"password"),this._updateToggleState(e)}_disabledChanged(e,t){super._disabledChanged(e,t),this._revealNode&&(this._revealNode.disabled=e)}};/**
|
|
4181
4181
|
* @license
|
|
4182
4182
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4183
4183
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4184
|
-
*/const
|
|
4184
|
+
*/const hp=E`
|
|
4185
4185
|
<div part="reveal-button" slot="suffix">
|
|
4186
4186
|
<slot name="reveal"></slot>
|
|
4187
4187
|
</div>
|
|
4188
|
-
`;let
|
|
4188
|
+
`;let Rt;class cp extends dp(Ma){static get is(){return"vaadin-password-field"}static get template(){if(!Rt){Rt=super.template.cloneNode(!0);const e=hp.content.querySelector('[part="reveal-button"]');Rt.content.querySelector('[part="input-field"]').appendChild(e)}return Rt}}D(cp);const Ss=m`
|
|
4189
4189
|
:host {
|
|
4190
4190
|
display: flex;
|
|
4191
4191
|
align-items: center;
|
|
@@ -4269,7 +4269,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4269
4269
|
width: var(--lumo-icon-size-m);
|
|
4270
4270
|
height: var(--lumo-icon-size-m);
|
|
4271
4271
|
}
|
|
4272
|
-
`;b("vaadin-item",Ss,{moduleId:"lumo-item"});const
|
|
4272
|
+
`;b("vaadin-item",Ss,{moduleId:"lumo-item"});const up=m`
|
|
4273
4273
|
:host {
|
|
4274
4274
|
transition: background-color 100ms;
|
|
4275
4275
|
overflow: hidden;
|
|
@@ -4281,11 +4281,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4281
4281
|
:host([focused]:not([disabled])) {
|
|
4282
4282
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
4283
4283
|
}
|
|
4284
|
-
`;b("vaadin-combo-box-item",[Ss,
|
|
4284
|
+
`;b("vaadin-combo-box-item",[Ss,up],{moduleId:"lumo-combo-box-item"});/**
|
|
4285
4285
|
* @license
|
|
4286
4286
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
4287
4287
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4288
|
-
*/const
|
|
4288
|
+
*/const pp=m`
|
|
4289
4289
|
[part~='loader'] {
|
|
4290
4290
|
box-sizing: border-box;
|
|
4291
4291
|
width: var(--lumo-icon-size-s);
|
|
@@ -4327,7 +4327,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4327
4327
|
transform: rotate(360deg);
|
|
4328
4328
|
}
|
|
4329
4329
|
}
|
|
4330
|
-
`,
|
|
4330
|
+
`,_p=m`
|
|
4331
4331
|
[part='content'] {
|
|
4332
4332
|
padding: 0;
|
|
4333
4333
|
}
|
|
@@ -4348,7 +4348,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4348
4348
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4349
4349
|
margin-bottom: var(--lumo-space-xs);
|
|
4350
4350
|
}
|
|
4351
|
-
`,
|
|
4351
|
+
`,mp=m`
|
|
4352
4352
|
[part~='loader'] {
|
|
4353
4353
|
position: absolute;
|
|
4354
4354
|
z-index: 1;
|
|
@@ -4356,24 +4356,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4356
4356
|
top: var(--lumo-space-s);
|
|
4357
4357
|
margin-inline: auto 0;
|
|
4358
4358
|
}
|
|
4359
|
-
`;b("vaadin-combo-box-overlay",[
|
|
4359
|
+
`;b("vaadin-combo-box-overlay",[us,ps,_p,pp,mp,m`
|
|
4360
4360
|
:host {
|
|
4361
4361
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4362
4362
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4363
4363
|
}
|
|
4364
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
4364
|
+
`],{moduleId:"lumo-combo-box-overlay"});const fp=m`
|
|
4365
4365
|
[part='toggle-button']::before {
|
|
4366
4366
|
content: var(--lumo-icons-dropdown);
|
|
4367
4367
|
}
|
|
4368
|
-
`;b("vaadin-combo-box",[
|
|
4368
|
+
`;b("vaadin-combo-box",[tt,fp],{moduleId:"lumo-combo-box"});/**
|
|
4369
4369
|
* @license
|
|
4370
4370
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4371
4371
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4372
|
-
*/const
|
|
4372
|
+
*/const vp=i=>class extends i{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(e,t,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,t,o)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e)}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e)}__rendererOrItemChanged(e,t,o){o===void 0||t===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()))}__updateLabel(e,t){t||(this.textContent=e)}};/**
|
|
4373
4373
|
* @license
|
|
4374
4374
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4375
4375
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4376
|
-
*/class
|
|
4376
|
+
*/class gp extends vp(N(oe(k))){static get template(){return E`
|
|
4377
4377
|
<style>
|
|
4378
4378
|
:host {
|
|
4379
4379
|
display: block;
|
|
@@ -4387,15 +4387,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4387
4387
|
<div part="content">
|
|
4388
4388
|
<slot></slot>
|
|
4389
4389
|
</div>
|
|
4390
|
-
`}static get is(){return"vaadin-combo-box-item"}}
|
|
4390
|
+
`}static get is(){return"vaadin-combo-box-item"}}D(gp);/**
|
|
4391
4391
|
* @license
|
|
4392
4392
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4393
4393
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4394
|
-
*/const
|
|
4394
|
+
*/const bp=i=>class extends gs(i){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const e=this._comboBox,t=e&&e.getAttribute("dir");t&&this.setAttribute("dir",t)}_shouldCloseOnOutsideClick(e){const t=e.composedPath();return!t.includes(this.positionTarget)&&!t.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!rs(e.composedPath()[0])&&e.preventDefault()}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const t=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);t===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,t)}_setOverlayWidth(e,t){e&&t&&(this._updateOverlayWidth(),this._updatePosition())}};/**
|
|
4395
4395
|
* @license
|
|
4396
4396
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4397
4397
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4398
|
-
*/const
|
|
4398
|
+
*/const yp=m`
|
|
4399
4399
|
#overlay {
|
|
4400
4400
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4401
4401
|
}
|
|
@@ -4405,17 +4405,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4405
4405
|
flex-direction: column;
|
|
4406
4406
|
height: 100%;
|
|
4407
4407
|
}
|
|
4408
|
-
`;b("vaadin-combo-box-overlay",[
|
|
4408
|
+
`;b("vaadin-combo-box-overlay",[ms,yp],{moduleId:"vaadin-combo-box-overlay-styles"});class xp extends bp(vs(oe(N(k)))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return E`
|
|
4409
4409
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4410
4410
|
<div part="overlay" id="overlay">
|
|
4411
4411
|
<div part="loader"></div>
|
|
4412
4412
|
<div part="content" id="content"><slot></slot></div>
|
|
4413
4413
|
</div>
|
|
4414
|
-
`}}
|
|
4414
|
+
`}}D(xp);/**
|
|
4415
4415
|
* @license
|
|
4416
4416
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4417
4417
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4418
|
-
*/function
|
|
4418
|
+
*/function ni(i,e){return i.split(".").reduce((t,o)=>t?t[o]:void 0,e)}/**
|
|
4419
4419
|
* @license
|
|
4420
4420
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4421
4421
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4423,23 +4423,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4423
4423
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4424
4424
|
* Code distributed by Google as part of the polymer project is also
|
|
4425
4425
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4426
|
-
*/const Gr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
4426
|
+
*/const Gr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),wp=Gr&&Gr[1]>=8,Kr=3,Cp={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const i=this._virtualCount;return Math.max(0,i-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(i){i=this._clamp(i,0,this._maxVirtualStart),this._virtualStartVal=i},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(i){i%=this._physicalCount,i<0&&(i=this._physicalCount+i),this._physicalStartVal=i},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(i){this._physicalCountVal=i},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let i=this._firstVisibleIndexVal;if(i==null){let e=this._physicalTop+this._scrollOffset;i=this._iterateItems((t,o)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return o})||0,this._firstVisibleIndexVal=i}return i},get lastVisibleIndex(){let i=this._lastVisibleIndexVal;if(i==null){let e=this._physicalTop+this._scrollOffset;this._iterateItems((t,o)=>{e<this._scrollBottom&&(i=o),e+=this._getPhysicalSizeIncrement(t)}),this._lastVisibleIndexVal=i}return i},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const i=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=i-this._scrollPosition;const t=e>=0;if(this._scrollPosition=i,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const o=Math.round(e/this._physicalAverage);this._virtualStart+=o,this._physicalStart+=o,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const o=this._getReusables(t);t?(this._physicalTop=o.physicalTop,this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length):(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length),this._update(o.indexes,t?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),si)}},_getReusables(i){let e,t,o;const s=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const u=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,p=this._scrollBottom;for(i?(e=this._physicalStart,t=c-d):(e=this._physicalEnd,t=u-p);o=this._getPhysicalSizeIncrement(e),t-=o,!(s.length>=l||t<=r);)if(i){if(a+s.length+1>=this._virtualCount||d+o>=c-this._scrollOffset)break;s.push(e),d+=o,e=(e+1)%l}else{if(n-s.length<=0||d+this._physicalSize-o<=p)break;s.push(e),d-=o,e=e===0?l-1:e-1}return{indexes:s,physicalTop:d-this._scrollOffset}},_update(i,e){if(!(i&&i.length===0||this._physicalCount===0)){if(this._assignModels(i),this._updateMetrics(i),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(i){const e=this._clamp(this._physicalCount+i,Kr,this._virtualCount-this._virtualStart)-this._physicalCount;let t=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let s=0;s<e;s++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,t=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||t===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,t)),ta):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,t),si))}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const i=this._getReusables(!0);this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length,this._update(i.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(Kr))},_itemsChanged(i){i.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Et))},_iterateItems(i,e){let t,o,s,r;if(arguments.length===2&&e){for(r=0;r<e.length;r++)if(t=e[r],o=this._computeVidx(t),(s=i.call(this,t,o))!=null)return s}else{for(t=this._physicalStart,o=this._virtualStart;t<this._physicalCount;t++,o++)if((s=i.call(this,t,o))!=null)return s;for(t=0;t<this._physicalStart;t++,o++)if((s=i.call(this,t,o))!=null)return s}},_computeVidx(i){return i>=this._physicalStart?this._virtualStart+(i-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+i},_positionItems(){this._adjustScrollPosition();let i=this._physicalTop;this._iterateItems(e=>{this.translate3d(0,`${i}px`,0,this._physicalItems[e]),i+=this._physicalSizes[e]})},_getPhysicalSizeIncrement(i){return this._physicalSizes[i]},_adjustScrollPosition(){const i=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(i!==0){this._physicalTop-=i;const e=this._scrollPosition;!wp&&e>0&&this._resetScrollPosition(e-i)}},_resetScrollPosition(i){this.scrollTarget&&i>=0&&(this._scrollTop=i,this._scrollPosition=this._scrollTop)},_updateScrollerSize(i){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(i||this._scrollHeight===0||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(i){if(typeof i!="number"||i<0||i>this.items.length-1||(pt(),this._physicalCount===0))return;i=this._clamp(i,0,this._virtualCount-1),(!this._isIndexRendered(i)||i>=this._maxVirtualStart)&&(this._virtualStart=i-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,t=this._virtualStart,o=0;const s=this._hiddenContentSize;for(;t<i&&o<=s;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,t+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Et)},_isIndexRendered(i){return i>=this._virtualStart&&i<=this._virtualEnd},_getPhysicalIndex(i){return(this._physicalStart+(i-this._virtualStart))%this._physicalCount},_clamp(i,e,t){return Math.min(t,Math.max(e,i))},_debounce(i,e,t){this._debouncers||(this._debouncers={}),this._debouncers[i]=G.debounce(this._debouncers[i],t,e.bind(this)),ia(this._debouncers[i])}};/**
|
|
4427
4427
|
* @license
|
|
4428
4428
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4429
4429
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4430
|
-
*/const wp=1e5,ji=1e3;let Ma=class{constructor({createElements:i,updateElement:e,scrollTarget:t,scrollContainer:o,elementsContainer:s,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=i,this.updateElement=e,this.scrollTarget=t,this.scrollContainer=o,this.elementsContainer=s||o,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:n}])=>{const a=n.width===0&&n.height===0;!a&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=a}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",n=>this.__onWheel(n)),this.scrollTarget.addEventListener("virtualizer-element-focused",n=>this.__onElementFocused(n)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(i=>i.__virtualizerPlaceholder)}scrollToIndex(i){if(typeof i!="number"||isNaN(i)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),i=this._clamp(i,0,this.size-1);const e=this.__getVisibleElements().length;let t=Math.floor(i/this.size*this._virtualCount);this._virtualCount-t<e?(t=this._virtualCount-(this.size-i),this._vidxOffset=this._maxVirtualIndexOffset):t<e?i<ji?(t=i,this._vidxOffset=0):(t=ji,this._vidxOffset=i-t):this._vidxOffset=i-t,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(t),this.adjustedFirstVisibleIndex!==i&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(i)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=i)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),ut(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(i=0,e=this.size-1){const t=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=i&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),t.push(o))}),this.__afterElementsUpdated(t)}_updateMetrics(i){ut();let e=0,t=0;const o=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((r,n)=>{t+=this._physicalSizes[r],this._physicalSizes[r]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[r])),e+=this._physicalSizes[r],this._physicalAverageCount+=this._physicalSizes[r]?1:0},i),this._physicalSize=this._physicalSize+e-t,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((s*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(i){const e=getComputedStyle(i),t=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return t;const o=parseFloat(e.paddingBottom)||0,s=parseFloat(e.paddingTop)||0,r=parseFloat(e.borderBottomWidth)||0,n=parseFloat(e.borderTopWidth)||0;return t+o+s+r+n}__updateElement(i,e,t){i.__virtualizerPlaceholder&&(i.style.paddingTop="",i.style.opacity="",i.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(i.__lastUpdatedIndex!==e||t)&&(this.updateElement(i,e),i.__lastUpdatedIndex=e)}__afterElementsUpdated(i){i.forEach(e=>{const t=e.offsetHeight;if(t===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=G.debounce(this.__placeholderClearDebouncer,At,()=>this._resizeHandler());else{this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(s=>s!==void 0);this.__placeholderHeight=Math.round(o.reduce((s,r)=>s+r,0)/o.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(i){const e=this.__getVisibleElements().find(t=>t.__virtualIndex===i);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(i){if(i===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,t;if(i>0&&(e=this.adjustedFirstVisibleIndex,t=this.__getIndexScrollOffset(e)),this.__size=i,this._itemsChanged({path:"items"}),ut(),i>0){e=Math.min(e,i-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);t!==void 0&&o!==void 0&&(this._scrollTop+=t-o)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),ut(),this._debounce("_update",this._update,oi)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(i){this.scrollTarget.scrollTop=i}get items(){return{length:Math.min(this.size,wp)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const i=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(i["padding-top"],10),this._isRTL=i.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(i){const e=this.createElements(i),t=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",t.appendChild(o),this.__resizeObserver.observe(o)}),this.elementsContainer.appendChild(t),e}_assignModels(i){const e=[];this._iterateItems((t,o)=>{const s=this._physicalItems[t];s.hidden=o>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))},i),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(i,e,t,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(i=this.__getVisibleElements()){return i.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(i,e){return e.indexOf(i)===e.length-1&&this.size>i.__virtualIndex+1}__previousFocusableSiblingMissing(i,e){return e.indexOf(i)===0&&i.__virtualIndex>0}__onElementFocused(i){if(!this.reorderElements)return;const e=i.detail.element;if(!e)return;const t=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,t)||this.__nextFocusableSiblingMissing(e,t))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const i=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=i>=0,t=this._getReusables(!e);t.indexes.length&&(this._physicalTop=t.physicalTop,e?(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length):(this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length),this._resizeHandler())}i&&(this.__fixInvalidItemPositioningDebouncer=G.debounce(this.__fixInvalidItemPositioningDebouncer,be.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=G.debounce(this.__scrollReorderDebouncer,be.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(i)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const i=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,t=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(i&&!t||e&&!o){const s=e,r=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(s?-1:1),this._scrollHandler(),this._ratio=r}}__onWheel(i){if(i.ctrlKey||this._hasScrolledAncestor(i.target,i.deltaX,i.deltaY))return;let e=i.deltaY;if(i.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:i.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,i.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=G.debounce(this.__debouncerWheelAnimationFrame,At,()=>{this._wheelAnimationFrame=!1});const t=Math.abs(i.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,i.deltaX,e)?(i.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=i.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=G.debounce(this._debouncerIgnoreNewWheel,be.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&t<=this._previousMomentum||this._ignoreNewWheel?i.preventDefault():t>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=t}_hasScrolledAncestor(i,e,t){if(i===this.scrollTarget||i===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(i,e,t)&&["auto","scroll"].indexOf(getComputedStyle(i).overflow)!==-1)return!0;if(i!==this&&i.parentElement)return this._hasScrolledAncestor(i.parentElement,e,t)}_canScroll(i,e,t){return t>0&&i.scrollTop<i.scrollHeight-i.offsetHeight||t<0&&i.scrollTop>0||e>0&&i.scrollLeft<i.scrollWidth-i.offsetWidth||e<0&&i.scrollLeft>0}_increasePoolIfNeeded(i){if(this._physicalCount>2&&i){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(i,Math.min(100,e)))}else super._increasePoolIfNeeded(i)}get _optPhysicalSize(){const i=super._optPhysicalSize;return i<=0||this.__hasPlaceholders()?i:i+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const i=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-i):0}_getScrollLineHeight(){const i=document.createElement("div");i.style.fontSize="initial",i.style.display="none",document.body.appendChild(i);const e=window.getComputedStyle(i).fontSize;return document.body.removeChild(i),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(i=>!i.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const i=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),t=this.__getFocusedElement(e)||e[0];if(!t)return;const o=t.__virtualIndex-i,s=e.indexOf(t)-o;if(s>0)for(let r=0;r<s;r++)this.elementsContainer.appendChild(e[r]);else if(s<0)for(let r=e.length+s;r<e.length;r++)this.elementsContainer.insertBefore(e[r],e[0]);if(iu){const{transform:r}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=r})}}_adjustVirtualIndexOffset(i){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(i)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(t*e)}else{const t=this._vidxOffset,o=ji,s=100;this._scrollTop===0?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}};Object.setPrototypeOf(Ma.prototype,xp);let Cp=class{constructor(i){this.__adapter=new Ma(i)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(i){this.__adapter.size=i}scrollToIndex(i){this.__adapter.scrollToIndex(i)}update(i=0,e=this.size-1){this.__adapter.update(i,e)}flush(){this.__adapter.flush()}};/**
|
|
4430
|
+
*/const Ip=1e5,Yi=1e3;let Ba=class{constructor({createElements:i,updateElement:e,scrollTarget:t,scrollContainer:o,elementsContainer:s,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=i,this.updateElement=e,this.scrollTarget=t,this.scrollContainer=o,this.elementsContainer=s||o,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:n}])=>{const a=n.width===0&&n.height===0;!a&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=a}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",n=>this.__onWheel(n)),this.scrollTarget.addEventListener("virtualizer-element-focused",n=>this.__onElementFocused(n)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(i=>i.__virtualizerPlaceholder)}scrollToIndex(i){if(typeof i!="number"||isNaN(i)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),i=this._clamp(i,0,this.size-1);const e=this.__getVisibleElements().length;let t=Math.floor(i/this.size*this._virtualCount);this._virtualCount-t<e?(t=this._virtualCount-(this.size-i),this._vidxOffset=this._maxVirtualIndexOffset):t<e?i<Yi?(t=i,this._vidxOffset=0):(t=Yi,this._vidxOffset=i-t):this._vidxOffset=i-t,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(t),this.adjustedFirstVisibleIndex!==i&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(i)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=i)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),pt(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(i=0,e=this.size-1){const t=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=i&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),t.push(o))}),this.__afterElementsUpdated(t)}_updateMetrics(i){pt();let e=0,t=0;const o=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((r,n)=>{t+=this._physicalSizes[r],this._physicalSizes[r]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[r])),e+=this._physicalSizes[r],this._physicalAverageCount+=this._physicalSizes[r]?1:0},i),this._physicalSize=this._physicalSize+e-t,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((s*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(i){const e=getComputedStyle(i),t=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return t;const o=parseFloat(e.paddingBottom)||0,s=parseFloat(e.paddingTop)||0,r=parseFloat(e.borderBottomWidth)||0,n=parseFloat(e.borderTopWidth)||0;return t+o+s+r+n}__updateElement(i,e,t){i.__virtualizerPlaceholder&&(i.style.paddingTop="",i.style.opacity="",i.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(i.__lastUpdatedIndex!==e||t)&&(this.updateElement(i,e),i.__lastUpdatedIndex=e)}__afterElementsUpdated(i){i.forEach(e=>{const t=e.offsetHeight;if(t===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=G.debounce(this.__placeholderClearDebouncer,Et,()=>this._resizeHandler());else{this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(s=>s!==void 0);this.__placeholderHeight=Math.round(o.reduce((s,r)=>s+r,0)/o.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(i){const e=this.__getVisibleElements().find(t=>t.__virtualIndex===i);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(i){if(i===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,t;if(i>0&&(e=this.adjustedFirstVisibleIndex,t=this.__getIndexScrollOffset(e)),this.__size=i,this._itemsChanged({path:"items"}),pt(),i>0){e=Math.min(e,i-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);t!==void 0&&o!==void 0&&(this._scrollTop+=t-o)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),pt(),this._debounce("_update",this._update,si)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(i){this.scrollTarget.scrollTop=i}get items(){return{length:Math.min(this.size,Ip)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const i=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(i["padding-top"],10),this._isRTL=i.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(i){const e=this.createElements(i),t=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",t.appendChild(o),this.__resizeObserver.observe(o)}),this.elementsContainer.appendChild(t),e}_assignModels(i){const e=[];this._iterateItems((t,o)=>{const s=this._physicalItems[t];s.hidden=o>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))},i),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(i,e,t,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(i=this.__getVisibleElements()){return i.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(i,e){return e.indexOf(i)===e.length-1&&this.size>i.__virtualIndex+1}__previousFocusableSiblingMissing(i,e){return e.indexOf(i)===0&&i.__virtualIndex>0}__onElementFocused(i){if(!this.reorderElements)return;const e=i.detail.element;if(!e)return;const t=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,t)||this.__nextFocusableSiblingMissing(e,t))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const i=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=i>=0,t=this._getReusables(!e);t.indexes.length&&(this._physicalTop=t.physicalTop,e?(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length):(this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length),this._resizeHandler())}i&&(this.__fixInvalidItemPositioningDebouncer=G.debounce(this.__fixInvalidItemPositioningDebouncer,ye.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=G.debounce(this.__scrollReorderDebouncer,ye.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(i)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const i=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,t=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(i&&!t||e&&!o){const s=e,r=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(s?-1:1),this._scrollHandler(),this._ratio=r}}__onWheel(i){if(i.ctrlKey||this._hasScrolledAncestor(i.target,i.deltaX,i.deltaY))return;let e=i.deltaY;if(i.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:i.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,i.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=G.debounce(this.__debouncerWheelAnimationFrame,Et,()=>{this._wheelAnimationFrame=!1});const t=Math.abs(i.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,i.deltaX,e)?(i.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=i.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=G.debounce(this._debouncerIgnoreNewWheel,ye.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&t<=this._previousMomentum||this._ignoreNewWheel?i.preventDefault():t>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=t}_hasScrolledAncestor(i,e,t){if(i===this.scrollTarget||i===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(i,e,t)&&["auto","scroll"].indexOf(getComputedStyle(i).overflow)!==-1)return!0;if(i!==this&&i.parentElement)return this._hasScrolledAncestor(i.parentElement,e,t)}_canScroll(i,e,t){return t>0&&i.scrollTop<i.scrollHeight-i.offsetHeight||t<0&&i.scrollTop>0||e>0&&i.scrollLeft<i.scrollWidth-i.offsetWidth||e<0&&i.scrollLeft>0}_increasePoolIfNeeded(i){if(this._physicalCount>2&&i){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(i,Math.min(100,e)))}else super._increasePoolIfNeeded(i)}get _optPhysicalSize(){const i=super._optPhysicalSize;return i<=0||this.__hasPlaceholders()?i:i+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const i=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-i):0}_getScrollLineHeight(){const i=document.createElement("div");i.style.fontSize="initial",i.style.display="none",document.body.appendChild(i);const e=window.getComputedStyle(i).fontSize;return document.body.removeChild(i),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(i=>!i.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const i=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),t=this.__getFocusedElement(e)||e[0];if(!t)return;const o=t.__virtualIndex-i,s=e.indexOf(t)-o;if(s>0)for(let r=0;r<s;r++)this.elementsContainer.appendChild(e[r]);else if(s<0)for(let r=e.length+s;r<e.length;r++)this.elementsContainer.insertBefore(e[r],e[0]);if(su){const{transform:r}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=r})}}_adjustVirtualIndexOffset(i){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(i)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(t*e)}else{const t=this._vidxOffset,o=Yi,s=100;this._scrollTop===0?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}};Object.setPrototypeOf(Ba.prototype,Cp);let Ap=class{constructor(i){this.__adapter=new Ba(i)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(i){this.__adapter.size=i}scrollToIndex(i){this.__adapter.scrollToIndex(i)}update(i=0,e=this.size-1){this.__adapter.update(i,e)}flush(){this.__adapter.flush()}};/**
|
|
4431
4431
|
* @license
|
|
4432
4432
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4433
4433
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4434
|
-
*/const
|
|
4434
|
+
*/const Qe=class{toString(){return""}};/**
|
|
4435
4435
|
* @license
|
|
4436
4436
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4437
4437
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4438
|
-
*/const
|
|
4438
|
+
*/const Ep=i=>class extends i{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(t=>parseInt(t,10)).reduce((t,o)=>t+o)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${fi()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const t=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const s=[...this.children].find(l=>!l.hidden&&l.index===this.__virtualizer.lastVisibleIndex);if(!s||e!==s.index)return;const r=s.getBoundingClientRect(),n=this.getBoundingClientRect(),a=r.bottom-n.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(e,t,o){return e instanceof Qe?!1:o&&e!==void 0&&t!==void 0?ni(o,e)===ni(o,t):e===t}__initVirtualizer(){this.__virtualizer=new Ap({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map(()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t})}_updateElement(e,t){const o=this.items[t],s=this.focusedIndex,r=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:t,label:this.getItemLabel(o),selected:r,renderer:this.renderer,focused:!this.loading&&s===t}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",t!==void 0?"option":!1),e.setAttribute("aria-selected",r.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof Qe&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const t=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(t&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault()})}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))})}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
4439
4439
|
* @license
|
|
4440
4440
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4441
4441
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4442
|
-
*/class
|
|
4442
|
+
*/class kp extends Ep(k){static get is(){return"vaadin-combo-box-scroller"}static get template(){return E`
|
|
4443
4443
|
<style>
|
|
4444
4444
|
:host {
|
|
4445
4445
|
display: block;
|
|
@@ -4466,27 +4466,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4466
4466
|
<div id="selector">
|
|
4467
4467
|
<slot></slot>
|
|
4468
4468
|
</div>
|
|
4469
|
-
`}}
|
|
4469
|
+
`}}D(kp);/**
|
|
4470
4470
|
* @license
|
|
4471
4471
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4472
4472
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4473
|
-
*/const
|
|
4473
|
+
*/const Sp=i=>class extends As(i){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};/**
|
|
4474
4474
|
* @license
|
|
4475
4475
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4476
4476
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4477
|
-
*/function
|
|
4477
|
+
*/function ai(i,e,t=0){let o=e;for(const s of i.subCaches){const r=s.parentCacheIndex;if(o<=r)break;if(o<=r+s.flatSize)return ai(s,o-r-1,t+1);o-=s.flatSize}return{cache:i,item:i.items[o],index:o,page:Math.floor(o/i.pageSize),level:t}}function Fa({getItemId:i},e,t,o=0,s=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&i(n)===i(t))return{cache:e,level:o,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:s+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=s+e.getFlatIndex(r.parentCacheIndex),a=Fa({getItemId:i},r,t,o+1,n+1);if(a)return a}}function Ra(i,[e,...t],o=0){e===1/0&&(e=i.size-1);const s=i.getFlatIndex(e),r=i.getSubCache(e);return r&&r.flatSize>0&&t.length?Ra(r,t,o+s+1):o+s}/**
|
|
4478
4478
|
* @license
|
|
4479
4479
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4480
4480
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4481
|
-
*/let
|
|
4481
|
+
*/let Pp=class Ha{constructor(e,t,o,s,r){A(this,"context"),A(this,"pageSize"),A(this,"items",[]),A(this,"pendingRequests",{}),A(this,"__subCacheByIndex",{}),A(this,"__size",0),A(this,"__flatSize",0),this.context=e,this.pageSize=t,this.size=o,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=o||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(e){var t;if(this.__size!==e){if(this.__size=e,this.context.placeholder!==void 0){this.items.length=e||0;for(let o=0;o<e;o++)(t=this.items)[o]||(t[o]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o]})}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((e,t)=>(t.recalculateFlatSize(),e+t.flatSize),0):0}setPage(e,t){const o=e*this.pageSize;t.forEach((s,r)=>{const n=o+r;(this.size===void 0||n<this.size)&&(this.items[n]=s)})}getSubCache(e){return this.__subCacheByIndex[e]}removeSubCache(e){delete this.__subCacheByIndex[e]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(e){const t=new Ha(this.context,this.pageSize,0,this,e);return this.__subCacheByIndex[e]=t,t}getFlatIndex(e){const t=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((o,s)=>{const r=s.parentCacheIndex;return t>r?o+s.flatSize:o},t)}getItemForIndex(e){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:t}=ai(this,e);return t}getCacheAndIndex(e){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:t,index:o}=ai(this,e);return{cache:t,scaledIndex:o}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(e){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(e)){const t=this.createSubCache(e);this.context.__controller.__loadCachePage(t,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}};/**
|
|
4482
4482
|
* @license
|
|
4483
4483
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4484
4484
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4485
|
-
*/let
|
|
4485
|
+
*/let Tp=class extends EventTarget{constructor(i,{size:e,pageSize:t,isExpanded:o,getItemId:s,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),A(this,"host"),A(this,"dataProvider"),A(this,"dataProviderParams"),A(this,"pageSize"),A(this,"isExpanded"),A(this,"getItemId"),A(this,"rootCache"),A(this,"placeholder"),A(this,"isPlaceholder"),this.host=i,this.pageSize=t,this.getItemId=s,this.isExpanded=o,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(i){this.pageSize=i,this.clearCache()}setDataProvider(i){this.dataProvider=i,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(i){return ai(this.rootCache,i)}getItemContext(i){return Fa({getItemId:this.getItemId},this.rootCache,i)}getFlatIndexByPath(i){return Ra(this.rootCache,i)}ensureFlatIndexLoaded(i){const{cache:e,page:t,item:o}=this.getFlatIndexContext(i);this.__isItemLoaded(o)||this.__loadCachePage(e,t)}ensureFlatIndexHierarchy(i){const{cache:e,item:t,index:o}=this.getFlatIndexContext(i);if(this.__isItemLoaded(t)&&this.isExpanded(t)&&!e.getSubCache(o)){const s=e.createSubCache(o);this.__loadCachePage(s,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(i){return new Pp(this.__cacheContext,this.pageSize,i)}__loadCachePage(i,e){if(!this.dataProvider||i.pendingRequests[e])return;let t={page:e,pageSize:this.pageSize,parentItem:i.parentItem};this.dataProviderParams&&(t=we(we({},t),this.dataProviderParams()));const o=(s,r)=>{i.pendingRequests[e]===o&&(r!==void 0?i.size=r:t.parentItem&&(i.size=s.length),i.setPage(e,s),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete i.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};i.pendingRequests[e]=o,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(t,o)}__isItemLoaded(i){return this.isPlaceholder?!this.isPlaceholder(i):this.placeholder?i!==this.placeholder:!!i}};/**
|
|
4486
4486
|
* @license
|
|
4487
4487
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4488
4488
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4489
|
-
*/const
|
|
4489
|
+
*/const Dp=i=>class extends i{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Tp(this,{placeholder:new Qe,isPlaceholder:e=>e instanceof Qe,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const t=e.detail.index;t!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(t)}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1)}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){const{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.dataProvider=t}),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,t){if(e&&t!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,t);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}};/**
|
|
4490
4490
|
* @license
|
|
4491
4491
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4492
4492
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4494,11 +4494,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4494
4494
|
* @license
|
|
4495
4495
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4496
4496
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4497
|
-
*/function Xr(i){return i!=null}function Jr(i,e){return i.findIndex(t=>t instanceof Je?!1:e(t))}const Tp=i=>class extends wi(Ce(ds(Me(Ve(Dt(Ze(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),Ps(this),this.addController(new La(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,o){super._propertiesChanged(e,t,o),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=s=>{s.innerHTML||s.appendChild(t)},o.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,o,s,r,n,a,l,d,u){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?t:[],opened:o,loading:s,selectedItem:r,itemIdPath:n,focusedIndex:a,renderer:l,theme:d,itemClassNameGenerator:u}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate()}catch(c){}}_openedOrItemsChanged(e,t,o,s){this._overlayOpened=e&&(s||o||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&rs(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const o=this._getItemElements().find(s=>s.index===e);o?t.setAttribute("aria-activedescendant",o.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!Co&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?ri(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?ri(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{Co&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const o=this._inputElementValue;this._lastCustomValue=o;const s=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(s),s.defaultPrevented||(this.value=o)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,o={};this.filter===t?this._filterChanged(this.filter):o.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(Xr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(o=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(o).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const o=t?t[this._focusedIndex]:null,s=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&s>=0&&(this.selectedItem=e[s]);const r=this.__getItemIndexByValue(e,this._getItemValue(o));r>-1?this._focusedIndex=r:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!Xr(t)?-1:Jr(e,o=>this._getItemValue(o)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:Jr(e,o=>this._getItemLabel(o).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Je)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(fi()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
4497
|
+
*/function Xr(i){return i!=null}function Jr(i,e){return i.findIndex(t=>t instanceof Qe?!1:e(t))}const Op=i=>class extends Ci(Ie(hs(Be(Me(Ot(et(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),Ps(this),this.addController(new Va(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,o){super._propertiesChanged(e,t,o),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=s=>{s.innerHTML||s.appendChild(t)},o.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,o,s,r,n,a,l,d,u){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?t:[],opened:o,loading:s,selectedItem:r,itemIdPath:n,focusedIndex:a,renderer:l,theme:d,itemClassNameGenerator:u}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate()}catch(c){}}_openedOrItemsChanged(e,t,o,s){this._overlayOpened=e&&(s||o||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&ns(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const o=this._getItemElements().find(s=>s.index===e);o?t.setAttribute("aria-activedescendant",o.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!Io&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?ni(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?ni(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{Io&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const o=this._inputElementValue;this._lastCustomValue=o;const s=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(s),s.defaultPrevented||(this.value=o)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,o={};this.filter===t?this._filterChanged(this.filter):o.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(Xr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(o=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(o).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const o=t?t[this._focusedIndex]:null,s=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&s>=0&&(this.selectedItem=e[s]);const r=this.__getItemIndexByValue(e,this._getItemValue(o));r>-1?this._focusedIndex=r:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!Xr(t)?-1:Jr(e,o=>this._getItemValue(o)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:Jr(e,o=>this._getItemLabel(o).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Qe)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(vi()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
4498
4498
|
* @license
|
|
4499
4499
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4500
4500
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4501
|
-
*/b("vaadin-combo-box",ks,{moduleId:"vaadin-combo-box-styles"});class
|
|
4501
|
+
*/b("vaadin-combo-box",ks,{moduleId:"vaadin-combo-box-styles"});class zp extends Dp(Op(Sp(Es(N(pe(k)))))){static get is(){return"vaadin-combo-box"}static get template(){return E`
|
|
4502
4502
|
<style>
|
|
4503
4503
|
:host([opened]) {
|
|
4504
4504
|
pointer-events: auto;
|
|
@@ -4543,33 +4543,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4543
4543
|
></vaadin-combo-box-overlay>
|
|
4544
4544
|
|
|
4545
4545
|
<slot name="tooltip"></slot>
|
|
4546
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new
|
|
4546
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new yi(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new xi(this.inputElement,this._labelController)),this._tooltipController=new Ve(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e)}_onHostClick(e){const t=e.composedPath();(t.includes(this._labelNode)||t.includes(this._positionTarget))&&super._onHostClick(e)}}D(zp);/**
|
|
4547
4547
|
* @license
|
|
4548
4548
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4549
4549
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4550
|
-
*/window.Vaadin||(window.Vaadin={});var Qr;(Qr=window.Vaadin).featureFlags||(Qr.featureFlags={});function
|
|
4550
|
+
*/window.Vaadin||(window.Vaadin={});var Qr;(Qr=window.Vaadin).featureFlags||(Qr.featureFlags={});function Np(i){return i.replace(/-[a-z]/gu,e=>e[1].toUpperCase())}const re={};function _e(i,e="24.8.0"){if(Object.defineProperty(i,"version",{get(){return e}}),i.experimental){const o=typeof i.experimental=="string"?i.experimental:`${Np(i.is.split("-").slice(1).join("-"))}Component`;if(!window.Vaadin.featureFlags[o]&&!re[o]){re[o]=new Set,re[o].add(i),Object.defineProperty(window.Vaadin.featureFlags,o,{get(){return re[o].size===0},set(s){s&&re[o].size>0&&(re[o].forEach(r=>{customElements.define(r.is,r)}),re[o].clear())}});return}else if(re[o]){re[o].add(i);return}}const t=customElements.get(i.is);if(!t)customElements.define(i.is,i);else{const o=t.version;o&&i.version&&o===i.version?console.warn(`The component ${i.is} has been loaded twice`):console.error(`Tried to define ${i.is} version ${i.version} when version ${t.version} is already in use. Something will probably break.`)}}/**
|
|
4551
4551
|
* @license
|
|
4552
4552
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4553
4553
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4554
|
-
*/class
|
|
4554
|
+
*/class Lp extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}_e(Lp);/**
|
|
4555
|
+
* @license
|
|
4556
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4557
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4558
|
+
*/function Vp(i){const e=i.constructor,t=i.__cssInjectorStyleSheet;return t?[...e.baseStyles,t,...e.themeStyles]:e.elementStyles}function Mp(i){[...i.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),Wo(i.shadowRoot,Vp(i))}/**
|
|
4555
4559
|
* @license
|
|
4556
4560
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4557
4561
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4558
|
-
*/const
|
|
4562
|
+
*/const Bp=i=>class extends i{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,o){super.attributeChangedCallback(e,t,o),e==="theme"&&this._set_theme(o)}};/**
|
|
4559
4563
|
* @license
|
|
4560
4564
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4561
4565
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4562
|
-
*/const
|
|
4563
|
-
`)}const
|
|
4566
|
+
*/const qa=[],Do=new Set,Ts=new Set;function $a(i){return i&&Object.prototype.hasOwnProperty.call(i,"__themes")}function Fp(i){return $a(customElements.get(i))}function Rp(i=[]){return[i].flat(1/0).filter(e=>e instanceof ui?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Wa(i,e){return(i||"").split(" ").some(t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e))}function Ua(i){return i.map(e=>e.cssText).join(`
|
|
4567
|
+
`)}const li="vaadin-themable-mixin-style";function Hp(i,e){const t=document.createElement("style");t.id=li,t.textContent=Ua(i),e.content.appendChild(t)}function qp(i){if(!i.shadowRoot)return;const e=i.constructor;if(i instanceof be)Mp(i);else{const t=i.shadowRoot.getElementById(li),o=e.prototype._template;t.textContent=o.content.getElementById(li).textContent}}function $p(i){Do.forEach(e=>{const t=e.deref();t instanceof i?qp(t):t||Do.delete(e)})}function ja(i){if(i.prototype instanceof be)i.elementStyles=i.finalizeStyles(i.styles);else{const e=i.prototype._template;e.content.getElementById(li).textContent=Ua(i.getStylesForThis())}Ts.forEach(e=>{const t=customElements.get(e);t!==i&&t.prototype instanceof i&&ja(t)})}function Wp(i,e){const t=i.__themes;return!t||!e?!1:t.some(o=>o.styles.some(s=>e.some(r=>r.cssText===s.cssText)))}function z(i,e,t={}){e=Rp(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(i,e,t):qa.push({themeFor:i,styles:e,include:t.include,moduleId:t.moduleId}),i&&Ts.forEach(o=>{if(Wa(i,o)&&Fp(o)){const s=customElements.get(o);Wp(s,e)?console.warn(`Registering styles that already exist for ${o}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${o}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),ja(s),$p(s)}})}function Oo(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():qa}function Up(i=""){let e=0;return i.startsWith("lumo-")||i.startsWith("material-")?e=1:i.startsWith("vaadin-")&&(e=2),e}function Ya(i){const e=[];return i.include&&[].concat(i.include).forEach(t=>{const o=Oo().find(s=>s.moduleId===t);o?e.push(...Ya(o),...o.styles):console.warn(`Included moduleId ${t} not found in style registry`)},i.styles),e}function jp(i){const e=`${i}-default-theme`,t=Oo().filter(o=>o.moduleId!==e&&Wa(o.themeFor,i)).map(o=>ci(we({},o),{styles:[...Ya(o),...o.styles],includePriority:Up(o.moduleId)})).sort((o,s)=>s.includePriority-o.includePriority);return t.length>0?t:Oo().filter(o=>o.moduleId===e)}const it=i=>class extends Bp(i){constructor(){super(),Do.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&Ts.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||$a(this)||Hp(this.getStylesForThis(),e)}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){const e=i.__themes||[],t=Object.getPrototypeOf(this.prototype),o=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...o,...jp(this.is)];const s=this.__themes.flatMap(r=>r.styles);return s.filter((r,n)=>n===s.lastIndexOf(r))}};/**
|
|
4564
4568
|
* @license
|
|
4565
4569
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4566
4570
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4567
|
-
*/const
|
|
4568
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},
|
|
4571
|
+
*/const Yp=(i,...e)=>{const t=document.createElement("style");t.id=i,t.textContent=e.map(o=>o.toString()).join(`
|
|
4572
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},ot=(i,...e)=>{Yp(`lumo-${i}`,e)};/**
|
|
4569
4573
|
* @license
|
|
4570
4574
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4571
4575
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4572
|
-
*/const
|
|
4576
|
+
*/const Gp=m`
|
|
4573
4577
|
:host {
|
|
4574
4578
|
/* Base (background) */
|
|
4575
4579
|
--lumo-base-color: #fff;
|
|
@@ -4654,7 +4658,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4654
4658
|
--lumo-disabled-text-color: GrayText;
|
|
4655
4659
|
}
|
|
4656
4660
|
}
|
|
4657
|
-
`;
|
|
4661
|
+
`;ot("color-props",Gp);const Kp=m`
|
|
4658
4662
|
[theme~='dark'] {
|
|
4659
4663
|
/* Base (background) */
|
|
4660
4664
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -4772,11 +4776,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4772
4776
|
pre code {
|
|
4773
4777
|
background: transparent;
|
|
4774
4778
|
}
|
|
4775
|
-
`;
|
|
4779
|
+
`;z("",Kp,{moduleId:"lumo-color"});/**
|
|
4776
4780
|
* @license
|
|
4777
4781
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4778
4782
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4779
|
-
*/const
|
|
4783
|
+
*/const Xp=m`
|
|
4780
4784
|
@font-face {
|
|
4781
4785
|
font-family: 'lumo-icons';
|
|
4782
4786
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
@@ -4831,11 +4835,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4831
4835
|
--lumo-icons-upload: '\\ea2b';
|
|
4832
4836
|
--lumo-icons-user: '\\ea2c';
|
|
4833
4837
|
}
|
|
4834
|
-
`;
|
|
4838
|
+
`;ot("font-icons",Xp);/**
|
|
4835
4839
|
* @license
|
|
4836
4840
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4837
4841
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4838
|
-
*/const
|
|
4842
|
+
*/const Jp=m`
|
|
4839
4843
|
:host {
|
|
4840
4844
|
/* Square */
|
|
4841
4845
|
--lumo-space-xs: 0.25rem;
|
|
@@ -4858,11 +4862,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4858
4862
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
4859
4863
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
4860
4864
|
}
|
|
4861
|
-
`;
|
|
4865
|
+
`;ot("spacing-props",Jp);/**
|
|
4862
4866
|
* @license
|
|
4863
4867
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4864
4868
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4865
|
-
*/const
|
|
4869
|
+
*/const Qp=m`
|
|
4866
4870
|
:host {
|
|
4867
4871
|
/* Border radius */
|
|
4868
4872
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -4962,11 +4966,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4962
4966
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
4963
4967
|
--vaadin-input-field-value-font-weight: 500;
|
|
4964
4968
|
}
|
|
4965
|
-
`;
|
|
4969
|
+
`;ot("style-props",Qp);/**
|
|
4966
4970
|
* @license
|
|
4967
4971
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4968
4972
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4969
|
-
*/const
|
|
4973
|
+
*/const Zp=m`
|
|
4970
4974
|
:host {
|
|
4971
4975
|
/* prettier-ignore */
|
|
4972
4976
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -4986,7 +4990,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4986
4990
|
--lumo-line-height-s: 1.375;
|
|
4987
4991
|
--lumo-line-height-m: 1.625;
|
|
4988
4992
|
}
|
|
4989
|
-
`,
|
|
4993
|
+
`,e_=m`
|
|
4990
4994
|
body,
|
|
4991
4995
|
:host {
|
|
4992
4996
|
font-family: var(--lumo-font-family);
|
|
@@ -5078,11 +5082,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5078
5082
|
border-left: none;
|
|
5079
5083
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
5080
5084
|
}
|
|
5081
|
-
`;
|
|
5085
|
+
`;z("",e_,{moduleId:"lumo-typography"});ot("typography-props",Zp);/**
|
|
5082
5086
|
* @license
|
|
5083
5087
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5084
5088
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5085
|
-
*/const
|
|
5089
|
+
*/const t_=m`
|
|
5086
5090
|
:host {
|
|
5087
5091
|
--lumo-size-xs: 1.625rem;
|
|
5088
5092
|
--lumo-size-s: 1.875rem;
|
|
@@ -5097,7 +5101,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5097
5101
|
/* For backwards compatibility */
|
|
5098
5102
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
5099
5103
|
}
|
|
5100
|
-
`;
|
|
5104
|
+
`;ot("sizing-props",t_);/**
|
|
5101
5105
|
* @license
|
|
5102
5106
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5103
5107
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -5128,11 +5132,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5128
5132
|
font-family: 'lumo-icons';
|
|
5129
5133
|
display: block;
|
|
5130
5134
|
}
|
|
5131
|
-
`;
|
|
5135
|
+
`;z("",Ds,{moduleId:"lumo-field-button"});/**
|
|
5132
5136
|
* @license
|
|
5133
5137
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
5134
5138
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5135
|
-
*/const
|
|
5139
|
+
*/const i_=m`
|
|
5136
5140
|
:host {
|
|
5137
5141
|
font-size: var(--lumo-font-size-xxs);
|
|
5138
5142
|
line-height: 1;
|
|
@@ -5221,7 +5225,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5221
5225
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
5222
5226
|
pointer-events: none;
|
|
5223
5227
|
}
|
|
5224
|
-
`;
|
|
5228
|
+
`;z("vaadin-multi-select-combo-box-chip",[Ds,i_],{moduleId:"lumo-multi-select-combo-box-chip"});z("vaadin-input-container",m`
|
|
5225
5229
|
:host {
|
|
5226
5230
|
background: var(--_background);
|
|
5227
5231
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -5483,7 +5487,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5483
5487
|
width: var(--lumo-icon-size-m);
|
|
5484
5488
|
height: var(--lumo-icon-size-m);
|
|
5485
5489
|
}
|
|
5486
|
-
`;
|
|
5490
|
+
`;z("vaadin-item",Os,{moduleId:"lumo-item"});const Ga=m`
|
|
5487
5491
|
:host {
|
|
5488
5492
|
transition: background-color 100ms;
|
|
5489
5493
|
overflow: hidden;
|
|
@@ -5495,11 +5499,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5495
5499
|
:host([focused]:not([disabled])) {
|
|
5496
5500
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
5497
5501
|
}
|
|
5498
|
-
`;
|
|
5502
|
+
`;z("vaadin-combo-box-item",[Os,Ga],{moduleId:"lumo-combo-box-item"});/**
|
|
5499
5503
|
* @license
|
|
5500
5504
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
5501
5505
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5502
|
-
*/const
|
|
5506
|
+
*/const Ka=m`
|
|
5503
5507
|
[part~='loader'] {
|
|
5504
5508
|
box-sizing: border-box;
|
|
5505
5509
|
width: var(--lumo-icon-size-s);
|
|
@@ -5545,7 +5549,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5545
5549
|
* @license
|
|
5546
5550
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5547
5551
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5548
|
-
*/const
|
|
5552
|
+
*/const Ii=m`
|
|
5549
5553
|
:host {
|
|
5550
5554
|
top: var(--lumo-space-m);
|
|
5551
5555
|
right: var(--lumo-space-m);
|
|
@@ -5610,11 +5614,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5610
5614
|
opacity: 1;
|
|
5611
5615
|
}
|
|
5612
5616
|
}
|
|
5613
|
-
`;
|
|
5617
|
+
`;z("",Ii,{moduleId:"lumo-overlay"});/**
|
|
5614
5618
|
* @license
|
|
5615
5619
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5616
5620
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5617
|
-
*/const
|
|
5621
|
+
*/const Ai=m`
|
|
5618
5622
|
:host([opening]),
|
|
5619
5623
|
:host([closing]) {
|
|
5620
5624
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -5644,7 +5648,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5644
5648
|
opacity: 0;
|
|
5645
5649
|
}
|
|
5646
5650
|
}
|
|
5647
|
-
`;
|
|
5651
|
+
`;z("",Ai,{moduleId:"lumo-menu-overlay-core"});const o_=m`
|
|
5648
5652
|
/* Small viewport (bottom sheet) styles */
|
|
5649
5653
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
5650
5654
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -5706,7 +5710,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5706
5710
|
transform: translateY(150%);
|
|
5707
5711
|
}
|
|
5708
5712
|
}
|
|
5709
|
-
`,
|
|
5713
|
+
`,s_=[Ii,Ai,o_];z("",s_,{moduleId:"lumo-menu-overlay"});const Xa=m`
|
|
5710
5714
|
[part='content'] {
|
|
5711
5715
|
padding: 0;
|
|
5712
5716
|
}
|
|
@@ -5727,7 +5731,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5727
5731
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
5728
5732
|
margin-bottom: var(--lumo-space-xs);
|
|
5729
5733
|
}
|
|
5730
|
-
`,
|
|
5734
|
+
`,Ja=m`
|
|
5731
5735
|
[part~='loader'] {
|
|
5732
5736
|
position: absolute;
|
|
5733
5737
|
z-index: 1;
|
|
@@ -5735,7 +5739,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5735
5739
|
top: var(--lumo-space-s);
|
|
5736
5740
|
margin-inline: auto 0;
|
|
5737
5741
|
}
|
|
5738
|
-
`;
|
|
5742
|
+
`;z("vaadin-combo-box-overlay",[Ii,Ai,Xa,Ka,Ja,m`
|
|
5739
5743
|
:host {
|
|
5740
5744
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
5741
5745
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -5744,7 +5748,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5744
5748
|
* @license
|
|
5745
5749
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5746
5750
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5747
|
-
*/const
|
|
5751
|
+
*/const r_=m`
|
|
5748
5752
|
:host {
|
|
5749
5753
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
5750
5754
|
}
|
|
@@ -5804,16 +5808,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5804
5808
|
* @license
|
|
5805
5809
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5806
5810
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5807
|
-
*/const
|
|
5811
|
+
*/const Qa=m`
|
|
5808
5812
|
[part='label'] {
|
|
5809
5813
|
align-self: flex-start;
|
|
5810
5814
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
5811
5815
|
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
5812
5816
|
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
5813
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
5814
5817
|
transition: color 0.2s;
|
|
5815
5818
|
line-height: 1;
|
|
5816
|
-
padding-
|
|
5819
|
+
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
|
|
5820
|
+
padding-inline-end: 1em;
|
|
5817
5821
|
padding-bottom: 0.5em;
|
|
5818
5822
|
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
5819
5823
|
negative margin to compensate */
|
|
@@ -5897,16 +5901,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5897
5901
|
|
|
5898
5902
|
/* RTL specific styles */
|
|
5899
5903
|
|
|
5900
|
-
:host([dir='rtl']) [part='label'] {
|
|
5901
|
-
margin-left: 0;
|
|
5902
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
5903
|
-
}
|
|
5904
|
-
|
|
5905
|
-
:host([dir='rtl']) [part='label'] {
|
|
5906
|
-
padding-left: 1em;
|
|
5907
|
-
padding-right: 0;
|
|
5908
|
-
}
|
|
5909
|
-
|
|
5910
5904
|
:host([dir='rtl']) [part='required-indicator']::after {
|
|
5911
5905
|
right: auto;
|
|
5912
5906
|
left: 0;
|
|
@@ -5916,11 +5910,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5916
5910
|
margin-left: 0;
|
|
5917
5911
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
5918
5912
|
}
|
|
5919
|
-
`;
|
|
5913
|
+
`;z("",Qa,{moduleId:"lumo-required-field"});/**
|
|
5920
5914
|
* @license
|
|
5921
5915
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5922
5916
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5923
|
-
*/const
|
|
5917
|
+
*/const n_=m`
|
|
5924
5918
|
:host {
|
|
5925
5919
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
5926
5920
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -6068,27 +6062,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6068
6062
|
[part='clear-button']::before {
|
|
6069
6063
|
content: var(--lumo-icons-cross);
|
|
6070
6064
|
}
|
|
6071
|
-
`,
|
|
6065
|
+
`,Za=[Qa,Ds,r_,n_];z("",Za,{moduleId:"lumo-input-field-shared-styles"});/**
|
|
6072
6066
|
* @license
|
|
6073
6067
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6074
6068
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6075
|
-
*/const
|
|
6069
|
+
*/const a_=m`
|
|
6076
6070
|
@media (any-hover: hover) {
|
|
6077
6071
|
:host(:hover[readonly]) {
|
|
6078
6072
|
background-color: transparent;
|
|
6079
6073
|
cursor: default;
|
|
6080
6074
|
}
|
|
6081
6075
|
}
|
|
6082
|
-
`;
|
|
6076
|
+
`;z("vaadin-multi-select-combo-box-item",[Os,Ga,a_],{moduleId:"lumo-multi-select-combo-box-item"});z("vaadin-multi-select-combo-box-overlay",[Ii,Ai,Xa,Ka,Ja,m`
|
|
6083
6077
|
:host {
|
|
6084
6078
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
6085
6079
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
6086
6080
|
}
|
|
6087
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"});
|
|
6081
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"});z("vaadin-multi-select-combo-box-container",m`
|
|
6088
6082
|
:host([auto-expand-vertically]) {
|
|
6089
6083
|
padding-block: var(--lumo-space-xs);
|
|
6090
6084
|
}
|
|
6091
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
6085
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const l_=m`
|
|
6092
6086
|
:host([has-value]) {
|
|
6093
6087
|
padding-inline-start: 0;
|
|
6094
6088
|
}
|
|
@@ -6141,11 +6135,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6141
6135
|
color: var(--lumo-contrast-60pct);
|
|
6142
6136
|
cursor: var(--lumo-clickable-cursor);
|
|
6143
6137
|
}
|
|
6144
|
-
`;
|
|
6138
|
+
`;z("vaadin-multi-select-combo-box",[Za,l_],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
6145
6139
|
* @license
|
|
6146
6140
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6147
6141
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6148
|
-
*/const
|
|
6142
|
+
*/const d_=m`
|
|
6149
6143
|
:host {
|
|
6150
6144
|
max-width: 100%;
|
|
6151
6145
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
@@ -6184,7 +6178,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6184
6178
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
6185
6179
|
width: auto;
|
|
6186
6180
|
}
|
|
6187
|
-
`,
|
|
6181
|
+
`,h_=m`
|
|
6188
6182
|
:host {
|
|
6189
6183
|
display: inline-flex;
|
|
6190
6184
|
align-items: center;
|
|
@@ -6213,22 +6207,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6213
6207
|
* @license
|
|
6214
6208
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6215
6209
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6216
|
-
*/
|
|
6210
|
+
*/z("vaadin-multi-select-combo-box-chip",h_,{moduleId:"vaadin-multi-select-combo-box-chip"});class c_ extends it(k){static get is(){return"vaadin-multi-select-combo-box-chip"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return E`
|
|
6217
6211
|
<div part="label">[[label]]</div>
|
|
6218
6212
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
6219
|
-
`}_onRemoveClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}
|
|
6213
|
+
`}_onRemoveClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}_e(c_);/**
|
|
6220
6214
|
* @license
|
|
6221
6215
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6222
6216
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6223
|
-
*/const
|
|
6217
|
+
*/const le=[];function zo(i,e,t=i.getAttribute("dir")){e?i.setAttribute("dir",e):t!=null&&i.removeAttribute("dir")}function No(){return document.documentElement.getAttribute("dir")}function u_(){const i=No();le.forEach(e=>{zo(e,i)})}const p_=new MutationObserver(u_);p_.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Ei=i=>class extends i{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),zo(this,No(),null))}attributeChangedCallback(e,t,o){if(super.attributeChangedCallback(e,t,o),e!=="dir")return;const s=No(),r=o===s&&le.indexOf(this)===-1,n=!o&&t&&le.indexOf(this)===-1;r||n?(this.__subscribe(),zo(this,s,o)):o!==s&&t===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=le.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,o){o==="dir"&&t===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,t,o)}_attributeToProperty(e,t,o){e==="dir"&&!t?this.dir="":super._attributeToProperty(e,t,o)}__subscribe(){le.includes(this)||le.push(this)}__unsubscribe(){le.includes(this)&&le.splice(le.indexOf(this),1)}};/**
|
|
6224
6218
|
* @license
|
|
6225
6219
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6226
6220
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6227
|
-
*/const
|
|
6228
|
-
* @license
|
|
6229
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6230
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6231
|
-
*/const c_=m`
|
|
6221
|
+
*/const __=m`
|
|
6232
6222
|
:host {
|
|
6233
6223
|
display: flex;
|
|
6234
6224
|
align-items: center;
|
|
@@ -6298,15 +6288,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6298
6288
|
* @license
|
|
6299
6289
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6300
6290
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6301
|
-
*/
|
|
6291
|
+
*/const m_=i=>class extends i{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())})}};/**
|
|
6292
|
+
* @license
|
|
6293
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6294
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6295
|
+
*/z("vaadin-input-container",__,{moduleId:"vaadin-input-container-styles"});class el extends m_(it(Ei(k))){static get is(){return"vaadin-input-container"}static get template(){return E`
|
|
6302
6296
|
<slot name="prefix"></slot>
|
|
6303
6297
|
<slot></slot>
|
|
6304
6298
|
<slot name="suffix"></slot>
|
|
6305
|
-
`}}
|
|
6299
|
+
`}}_e(el);/**
|
|
6306
6300
|
* @license
|
|
6307
6301
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6308
6302
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6309
|
-
*/
|
|
6303
|
+
*/z("vaadin-multi-select-combo-box-container",m`
|
|
6310
6304
|
#wrapper {
|
|
6311
6305
|
display: flex;
|
|
6312
6306
|
width: 100%;
|
|
@@ -6316,15 +6310,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6316
6310
|
:host([auto-expand-vertically]) #wrapper {
|
|
6317
6311
|
flex-wrap: wrap;
|
|
6318
6312
|
}
|
|
6319
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let
|
|
6313
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let Ht;class f_ extends el{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!Ht){Ht=super.template.cloneNode(!0);const e=Ht.content,t=e.querySelectorAll("slot"),o=document.createElement("div");o.setAttribute("id","wrapper"),e.insertBefore(o,t[2]),o.appendChild(t[0]),o.appendChild(t[1])}return Ht}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}_e(f_);/**
|
|
6320
6314
|
* @license
|
|
6321
6315
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6322
6316
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6323
|
-
*/const
|
|
6317
|
+
*/const v_=i=>class extends i{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(e,t,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,t,o)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e)}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e)}__rendererOrItemChanged(e,t,o){o===void 0||t===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()))}__updateLabel(e,t){t||(this.textContent=e)}};/**
|
|
6324
6318
|
* @license
|
|
6325
6319
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6326
6320
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6327
|
-
*/class
|
|
6321
|
+
*/class g_ extends v_(it(Ei(k))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return E`
|
|
6328
6322
|
<style>
|
|
6329
6323
|
:host {
|
|
6330
6324
|
display: block;
|
|
@@ -6338,67 +6332,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6338
6332
|
<div part="content">
|
|
6339
6333
|
<slot></slot>
|
|
6340
6334
|
</div>
|
|
6341
|
-
`}}
|
|
6335
|
+
`}}_e(g_);/**
|
|
6342
6336
|
* @license
|
|
6343
6337
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6344
6338
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6345
|
-
*/let zs=!1;window.addEventListener("keydown",()=>{zs=!0},{capture:!0});window.addEventListener("mousedown",()=>{zs=!1},{capture:!0});function
|
|
6339
|
+
*/let zs=!1;window.addEventListener("keydown",()=>{zs=!0},{capture:!0});window.addEventListener("mousedown",()=>{zs=!1},{capture:!0});function Lo(){let i=document.activeElement||document.body;for(;i.shadowRoot&&i.shadowRoot.activeElement;)i=i.shadowRoot.activeElement;return i}function Ns(){return zs}function b_(i){const e=i.style;if(e.visibility==="hidden"||e.display==="none")return!0;const t=window.getComputedStyle(i);return t.visibility==="hidden"||t.display==="none"}function y_(i,e){const t=Math.max(i.tabIndex,0),o=Math.max(e.tabIndex,0);return t===0||o===0?o>t:t>o}function x_(i,e){const t=[];for(;i.length>0&&e.length>0;)y_(i[0],e[0])?t.push(e.shift()):t.push(i.shift());return t.concat(i,e)}function Vo(i){const e=i.length;if(e<2)return i;const t=Math.ceil(e/2),o=Vo(i.slice(0,t)),s=Vo(i.slice(t));return x_(o,s)}function tl(i){return i.matches('[tabindex="-1"]')?!1:i.matches("input, select, textarea, button, object")?i.matches(":not([disabled])"):i.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function il(i){return i.getRootNode().activeElement===i}function w_(i){if(!tl(i))return-1;const e=i.getAttribute("tabindex")||0;return Number(e)}function ol(i,e){if(i.nodeType!==Node.ELEMENT_NODE||b_(i))return!1;const t=i,o=w_(t);let s=o>0;o>=0&&e.push(t);let r=[];return t.localName==="slot"?r=t.assignedNodes({flatten:!0}):r=(t.shadowRoot||t).children,[...r].forEach(n=>{s=ol(n,e)||s}),s}function C_(i){const e=[];return ol(i,e)?Vo(e):e}/**
|
|
6346
6340
|
* @license
|
|
6347
6341
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6348
6342
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6349
|
-
*/function
|
|
6343
|
+
*/function I_(i){const e=[];for(;i;){if(i.nodeType===Node.DOCUMENT_NODE){e.push(i);break}if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(i),i=i.host;continue}if(i.assignedSlot){i=i.assignedSlot;continue}i=i.parentNode}return e}function Ls(i){return i?new Set(i.split(" ")):new Set}function ki(i){return i?[...i].join(" "):""}function sl(i,e,t){const o=Ls(i.getAttribute(e));o.add(t),i.setAttribute(e,ki(o))}function A_(i,e,t){const o=Ls(i.getAttribute(e));if(o.delete(t),o.size===0){i.removeAttribute(e);return}i.setAttribute(e,ki(o))}function E_(i){return i.nodeType===Node.TEXT_NODE&&i.textContent.trim()===""}/**
|
|
6350
6344
|
* @license
|
|
6351
6345
|
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
6352
6346
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6353
|
-
*/function
|
|
6347
|
+
*/function k_(i,e){let t=null;const o=document.documentElement;function s(){t&&t.disconnect(),t=null}function r(n=!1,a=1){s();const{left:l,top:d,width:u,height:c}=i.getBoundingClientRect();if(n||e(),!u||!c)return;const p=Math.floor(d),_=Math.floor(o.clientWidth-(l+u)),v=Math.floor(o.clientHeight-(d+c)),x=Math.floor(l),g={rootMargin:`${-p}px ${-_}px ${-v}px ${-x}px`,threshold:Math.max(0,Math.min(1,a))||1};let y=!0;function S(L){let C=L[0].intersectionRatio;if(C!==a){if(!y)return r();C===0&&(C=1e-7),r(!1,C)}y=!1}t=new IntersectionObserver(S,g),t.observe(i)}return r(!0),s}/**
|
|
6354
6348
|
* @license
|
|
6355
6349
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6356
6350
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6357
|
-
*/const
|
|
6351
|
+
*/const Gi={start:"top",end:"bottom"},Ki={start:"left",end:"right"},Zr=new ResizeObserver(i=>{setTimeout(()=>{i.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),S_=i=>class extends i{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=I_(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=k_(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,Zr.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,Zr.observe(t))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(s=>{this.__margins[s]=parseInt(o[s],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";const o=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,o),r=!o&&s||o&&!s;this.style.alignItems=r?"flex-start":"flex-end";const n=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,Gi,this,t),l=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,Ki,this,s);Object.assign(this.style,a,l),this.toggleAttribute("bottom-aligned",!t),this.toggleAttribute("top-aligned",t),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,t){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!t&&this.horizontalAlign==="start"||t&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,s,this.__margins,r,this.noHorizontalOverlap,Ki)}__shouldAlignStartVertically(e){const t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),s=this.verticalAlign==="top";return this.__shouldAlignStart(e,t,o,this.__margins,s,this.noVerticalOverlap,Gi)}__shouldAlignStart(e,t,o,s,r,n,a){const l=o-e[n?a.end:a.start]-s[a.end],d=e[n?a.start:a.end]-s[a.start],u=r?l:d,c=u>(r?d:l)||u>t;return r===c}__adjustBottomProperty(e,t,o){let s;if(e===t.end){if(t.end===Gi.end){const r=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>r&&this.__oldViewportHeight){const n=this.__oldViewportHeight-r;s=o-n}this.__oldViewportHeight=r}if(t.end===Ki.end){const r=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>r&&this.__oldViewportWidth){const n=this.__oldViewportWidth-r;s=o-n}this.__oldViewportWidth=r}}return s}__calculatePositionInOneDimension(e,t,o,s,r,n){const a=n?s.start:s.end,l=n?s.end:s.start,d=parseFloat(r.style[a]||getComputedStyle(r)[a]),u=this.__adjustBottomProperty(a,s,d),c=t[n?s.start:s.end]-e[o===n?s.end:s.start],p=u?`${u}px`:`${d+c*(n?-1:1)}px`;return{[a]:p,[l]:""}}};/**
|
|
6358
6352
|
* @license
|
|
6359
6353
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6360
6354
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6361
|
-
*/const
|
|
6355
|
+
*/const P_=i=>class extends S_(i){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const e=this._comboBox,t=e&&e.getAttribute("dir");t&&this.setAttribute("dir",t)}_shouldCloseOnOutsideClick(e){const t=e.composedPath();return!t.includes(this.positionTarget)&&!t.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!tl(e.composedPath()[0])&&e.preventDefault()}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.offsetWidth}px`);const t=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);t===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,t)}_setOverlayWidth(e,t){e&&t&&(this._updateOverlayWidth(),this._updatePosition())}};/**
|
|
6362
6356
|
* @license
|
|
6363
6357
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6364
6358
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6365
|
-
*/const
|
|
6359
|
+
*/const Si=i=>i.test(navigator.userAgent),Mo=i=>i.test(navigator.platform),T_=i=>i.test(navigator.vendor);Si(/Android/u);Si(/Chrome/u)&&T_(/Google Inc/u);Si(/Firefox/u);const D_=Mo(/^iPad/u)||Mo(/^Mac/u)&&navigator.maxTouchPoints>1,O_=Mo(/^iPhone/u),z_=O_||D_,N_=Si(/^((?!chrome|android).)*safari/iu),Bo=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(i){return!1}})();/**
|
|
6366
6360
|
* @license
|
|
6367
6361
|
* Copyright (c) 2017 Anton Korzunov
|
|
6368
6362
|
* SPDX-License-Identifier: MIT
|
|
6369
|
-
*/let
|
|
6363
|
+
*/let qe=new WeakMap,qt=new WeakMap,$t={},Xi=0;const en=i=>i&&i.nodeType===Node.ELEMENT_NODE,Ji=(...i)=>{console.error(`Error: ${i.join(" ")}. Skip setting aria-hidden.`)},L_=(i,e)=>en(i)?e.map(t=>{if(!en(t))return Ji(t,"is not a valid element"),null;let o=t;for(;o&&o!==i;){if(i.contains(o))return t;o=o.getRootNode().host}return Ji(t,"is not contained inside",i),null}).filter(t=>!!t):(Ji(i,"is not a valid element"),[]),V_=(i,e,t,o)=>{const s=L_(e,Array.isArray(i)?i:[i]);$t[t]||($t[t]=new WeakMap);const r=$t[t],n=[],a=new Set,l=new Set(s),d=c=>{if(!c||a.has(c))return;a.add(c);const p=c.assignedSlot;p&&d(p),d(c.parentNode||c.host)};s.forEach(d);const u=c=>{if(!c||l.has(c))return;const p=c.shadowRoot;(p?[...c.children,...p.children]:[...c.children]).forEach(_=>{if(!["template","script","style"].includes(_.localName))if(a.has(_))u(_);else{const v=_.getAttribute(o),x=v!==null&&v!=="false",g=(qe.get(_)||0)+1,y=(r.get(_)||0)+1;qe.set(_,g),r.set(_,y),n.push(_),g===1&&x&&qt.set(_,!0),y===1&&_.setAttribute(t,"true"),x||_.setAttribute(o,"true")}})};return u(e),a.clear(),Xi+=1,()=>{n.forEach(c=>{const p=qe.get(c)-1,_=r.get(c)-1;qe.set(c,p),r.set(c,_),p||(qt.has(c)?qt.delete(c):c.removeAttribute(o)),_||c.removeAttribute(t)}),Xi-=1,Xi||(qe=new WeakMap,qe=new WeakMap,qt=new WeakMap,$t={})}},M_=(i,e=document.body,t="data-aria-hidden")=>{const o=Array.from(Array.isArray(i)?i:[i]);return e&&o.push(...Array.from(e.querySelectorAll("[aria-live]"))),V_(o,e,t,"aria-hidden")};/**
|
|
6370
6364
|
* @license
|
|
6371
6365
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6372
6366
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6373
|
-
*/class
|
|
6367
|
+
*/class B_{constructor(e,t){this.host=e,this.callback=typeof t=="function"?t:()=>e}showModal(){const e=this.callback();this.__showOthers=M_(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}/**
|
|
6374
6368
|
* @license
|
|
6375
6369
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6376
6370
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6377
|
-
*/class
|
|
6371
|
+
*/class F_{saveFocus(e){this.focusNode=e||Lo()}restoreFocus(e){const t=this.focusNode;if(!t)return;const o=e?e.preventScroll:!1;Lo()===document.body?setTimeout(()=>t.focus({preventScroll:o})):t.focus({preventScroll:o}),this.focusNode=null}}/**
|
|
6378
6372
|
* @license
|
|
6379
6373
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6380
6374
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6381
|
-
*/const
|
|
6375
|
+
*/const Qi=[];class R_{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return C_(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(il).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.");Qi.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Qi.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(Qi).pop()&&e.key==="Tab"){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,o=e?-1:1,s=this.__focusedElementIndex,r=(t.length+s+o)%t.length,n=t[r];n.focus(),n.localName==="input"&&n.select()}}const rl=new WeakMap;function H_(i,e){let t=e;for(;t;){if(rl.get(t)===i)return!0;t=Object.getPrototypeOf(t)}return!1}function J(i){return e=>{if(H_(i,e))return e;const t=i(e);return rl.set(t,i),t}}/**
|
|
6382
6376
|
* @license
|
|
6383
6377
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6384
6378
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6385
|
-
*/const
|
|
6379
|
+
*/const Pi=J(i=>typeof i.prototype.addController=="function"?i:class extends i{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected()})}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected()}removeController(e){this.__controllers.delete(e)}});/**
|
|
6386
6380
|
* @license
|
|
6387
6381
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6388
6382
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6389
|
-
*/const
|
|
6383
|
+
*/const q_=i=>class extends Pi(i){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new B_(this),this.__focusTrapController=new R_(this),this.__focusRestorationController=new F_}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!Ns();this.__focusRestorationController.restoreFocus({preventScroll:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=Lo();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const o=e.ownerDocument;for(;t&&t!==o&&t!==this;)t=t.parentNode||t.host;return t===this}};/**
|
|
6390
6384
|
* @license
|
|
6391
6385
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6392
6386
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6393
|
-
*/const
|
|
6387
|
+
*/const nl=()=>Array.from(document.body.children).filter(i=>i instanceof HTMLElement&&i._hasOverlayStackMixin&&!i.hasAttribute("closing")).sort((i,e)=>i.__zIndex-e.__zIndex||0),Fo=()=>nl().filter(i=>i.$.overlay),$_=(i,e=t=>!0)=>{const t=Fo().filter(e);return i===t.pop()},tn=new WeakMap,W_=i=>class extends i{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return $_(this)}bringToFront(){let e="";const t=nl().filter(o=>o!==this).pop();t&&(e=t.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex),tn.has(this)&&tn.get(this).bringToFront()}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Fo().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=Fo();let t;for(;(t=e.pop())&&!(t!==this&&(t.$.overlay.style.removeProperty("pointer-events"),!t.modeless)););}};/**
|
|
6394
6388
|
* @license
|
|
6395
6389
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6396
6390
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6397
|
-
*/const
|
|
6391
|
+
*/const U_=i=>class extends q_(W_(i)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),z_&&(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(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${o-e}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(e,t,o,s){const r=this._oldOwner!==t||this._oldModel!==o;this._oldModel=o,this._oldOwner=t;const n=this._oldRenderer!==e,a=this._oldRenderer!==void 0;this._oldRenderer=e;const l=this._oldOpened!==s;this._oldOpened=s,n&&a&&(this.innerHTML="",delete this._$litPart$),s&&e&&(n||l||r)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus(),this.dispatchEvent(new CustomEvent("vaadin-overlay-open",{bubbles:!0}))})}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return e.getPropertyValue("display")!=="none"&&t&&t!=="none"}_enqueueAnimation(e,t){const o=`__${e}Handler`,s=r=>{r&&r.target!==this||(t(),this.removeEventListener("animationend",s),delete this[o])};this[o]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;typeof this[t]=="function"&&this[t]()}_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(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}};/**
|
|
6398
6392
|
* @license
|
|
6399
6393
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6400
6394
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6401
|
-
*/const
|
|
6395
|
+
*/const j_=m`
|
|
6402
6396
|
:host {
|
|
6403
6397
|
z-index: 200;
|
|
6404
6398
|
position: fixed;
|
|
@@ -6461,7 +6455,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6461
6455
|
* @license
|
|
6462
6456
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6463
6457
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6464
|
-
*/const
|
|
6458
|
+
*/const Y_=m`
|
|
6465
6459
|
#overlay {
|
|
6466
6460
|
width: var(
|
|
6467
6461
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -6474,25 +6468,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6474
6468
|
flex-direction: column;
|
|
6475
6469
|
height: 100%;
|
|
6476
6470
|
}
|
|
6477
|
-
`;
|
|
6471
|
+
`;z("vaadin-multi-select-combo-box-overlay",[j_,Y_],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class G_ extends P_(U_(Ei(it(k)))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return E`
|
|
6478
6472
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
6479
6473
|
<div part="overlay" id="overlay">
|
|
6480
6474
|
<div part="loader"></div>
|
|
6481
6475
|
<div part="content" id="content"><slot></slot></div>
|
|
6482
6476
|
</div>
|
|
6483
|
-
`}}
|
|
6477
|
+
`}}_e(G_);/**
|
|
6484
6478
|
* @license
|
|
6485
6479
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6486
6480
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6487
|
-
*/const
|
|
6481
|
+
*/const Ce=class{toString(){return""}};/**
|
|
6488
6482
|
* @license
|
|
6489
6483
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6490
6484
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6491
|
-
*/function
|
|
6485
|
+
*/function di(i,e){return i.split(".").reduce((t,o)=>t?t[o]:void 0,e)}/**
|
|
6492
6486
|
* @license
|
|
6493
6487
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6494
6488
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6495
|
-
*/let
|
|
6489
|
+
*/let K_=0;function al(){return K_++}/**
|
|
6496
6490
|
* @license
|
|
6497
6491
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6498
6492
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6500,7 +6494,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6500
6494
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6501
6495
|
* Code distributed by Google as part of the polymer project is also
|
|
6502
6496
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6503
|
-
*/let on=0,
|
|
6497
|
+
*/let on=0,ll=0;const Ye=[];let Ro=!1;function X_(){Ro=!1;const i=Ye.length;for(let e=0;e<i;e++){const t=Ye[e];if(t)try{t()}catch(o){setTimeout(()=>{throw o})}}Ye.splice(0,i),ll+=i}const Kt={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},Pt={run(i){return window.requestAnimationFrame(i)},cancel(i){window.cancelAnimationFrame(i)}},dl={run(i){return window.requestIdleCallback?window.requestIdleCallback(i):window.setTimeout(i,16)},cancel(i){window.cancelIdleCallback?window.cancelIdleCallback(i):window.clearTimeout(i)}},Ho={run(i){Ro||(Ro=!0,queueMicrotask(()=>X_())),Ye.push(i);const e=on;return on+=1,e},cancel(i){const e=i-ll;if(e>=0){if(!Ye[e])throw new Error(`invalid async handle: ${i}`);Ye[e]=null}}};/**
|
|
6504
6498
|
@license
|
|
6505
6499
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6506
6500
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6508,7 +6502,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
6508
6502
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6509
6503
|
Code distributed by Google as part of the polymer project is also
|
|
6510
6504
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6511
|
-
*/const
|
|
6505
|
+
*/const Tt=new Set;class X{static debounce(e,t,o){return e instanceof X?e._cancelAsync():e=new X,e.setConfig(t,o),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,Tt.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),Tt.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 hl(i){Tt.add(i)}function J_(){const i=!!Tt.size;return Tt.forEach(e=>{try{e.flush()}catch(t){setTimeout(()=>{throw t})}}),i}const _t=()=>{let i;do i=J_();while(i)};/**
|
|
6512
6506
|
* @license
|
|
6513
6507
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
6514
6508
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6516,19 +6510,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6516
6510
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6517
6511
|
* Code distributed by Google as part of the polymer project is also
|
|
6518
6512
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6519
|
-
*/const sn=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
6513
|
+
*/const sn=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Q_=sn&&sn[1]>=8,rn=3,Z_={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const i=this._virtualCount;return Math.max(0,i-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(i){i=this._clamp(i,0,this._maxVirtualStart),this._virtualStartVal=i},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(i){i%=this._physicalCount,i<0&&(i=this._physicalCount+i),this._physicalStartVal=i},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(i){this._physicalCountVal=i},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let i=this._firstVisibleIndexVal;if(i==null){let e=this._physicalTop+this._scrollOffset;i=this._iterateItems((t,o)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return o})||0,this._firstVisibleIndexVal=i}return i},get lastVisibleIndex(){let i=this._lastVisibleIndexVal;if(i==null){let e=this._physicalTop+this._scrollOffset;this._iterateItems((t,o)=>{e<this._scrollBottom&&(i=o),e+=this._getPhysicalSizeIncrement(t)}),this._lastVisibleIndexVal=i}return i},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const i=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=i-this._scrollPosition;const t=e>=0;if(this._scrollPosition=i,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const o=Math.round(e/this._physicalAverage);this._virtualStart+=o,this._physicalStart+=o,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const o=this._getReusables(t);t?(this._physicalTop=o.physicalTop,this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length):(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length),this._update(o.indexes,t?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Ho)}},_getReusables(i){let e,t,o;const s=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const u=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,p=this._scrollBottom;for(i?(e=this._physicalStart,t=c-d):(e=this._physicalEnd,t=u-p);o=this._getPhysicalSizeIncrement(e),t-=o,!(s.length>=l||t<=r);)if(i){if(a+s.length+1>=this._virtualCount||d+o>=c-this._scrollOffset)break;s.push(e),d+=o,e=(e+1)%l}else{if(n-s.length<=0||d+this._physicalSize-o<=p)break;s.push(e),d-=o,e=e===0?l-1:e-1}return{indexes:s,physicalTop:d-this._scrollOffset}},_update(i,e){if(!(i&&i.length===0||this._physicalCount===0)){if(this._assignModels(i),this._updateMetrics(i),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(i){const e=this._clamp(this._physicalCount+i,rn,this._virtualCount-this._virtualStart)-this._physicalCount;let t=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let s=0;s<e;s++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,t=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||t===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,t)),dl):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,t),Ho))}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const i=this._getReusables(!0);this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length,this._update(i.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(rn))},_itemsChanged(i){i.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Pt))},_iterateItems(i,e){let t,o,s,r;if(arguments.length===2&&e){for(r=0;r<e.length;r++)if(t=e[r],o=this._computeVidx(t),(s=i.call(this,t,o))!=null)return s}else{for(t=this._physicalStart,o=this._virtualStart;t<this._physicalCount;t++,o++)if((s=i.call(this,t,o))!=null)return s;for(t=0;t<this._physicalStart;t++,o++)if((s=i.call(this,t,o))!=null)return s}},_computeVidx(i){return i>=this._physicalStart?this._virtualStart+(i-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+i},_positionItems(){this._adjustScrollPosition();let i=this._physicalTop;this._iterateItems(e=>{this.translate3d(0,`${i}px`,0,this._physicalItems[e]),i+=this._physicalSizes[e]})},_getPhysicalSizeIncrement(i){return this._physicalSizes[i]},_adjustScrollPosition(){const i=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(i!==0){this._physicalTop-=i;const e=this._scrollPosition;!Q_&&e>0&&this._resetScrollPosition(e-i)}},_resetScrollPosition(i){this.scrollTarget&&i>=0&&(this._scrollTop=i,this._scrollPosition=this._scrollTop)},_updateScrollerSize(i){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(i||this._scrollHeight===0||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(i){if(typeof i!="number"||i<0||i>this.items.length-1||(_t(),this._physicalCount===0))return;i=this._clamp(i,0,this._virtualCount-1),(!this._isIndexRendered(i)||i>=this._maxVirtualStart)&&(this._virtualStart=i-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,t=this._virtualStart,o=0;const s=this._hiddenContentSize;for(;t<i&&o<=s;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,t+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Pt)},_isIndexRendered(i){return i>=this._virtualStart&&i<=this._virtualEnd},_getPhysicalIndex(i){return(this._physicalStart+(i-this._virtualStart))%this._physicalCount},_clamp(i,e,t){return Math.min(t,Math.max(e,i))},_debounce(i,e,t){this._debouncers||(this._debouncers={}),this._debouncers[i]=X.debounce(this._debouncers[i],t,e.bind(this)),hl(this._debouncers[i])}};/**
|
|
6520
6514
|
* @license
|
|
6521
6515
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6522
6516
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6523
|
-
*/const K_=1e5,Qi=1e3;class dl{constructor({createElements:e,updateElement:t,scrollTarget:o,scrollContainer:s,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=o,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:a}])=>{const l=a.width===0&&a.height===0;!l&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=l}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",a=>this.__onWheel(a)),this.scrollTarget.addEventListener("virtualizer-element-focused",a=>this.__onElementFocused(a)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if(typeof e!="number"||isNaN(e)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);const t=this.__getVisibleElements().length;let o=Math.floor(e/this.size*this._virtualCount);this._virtualCount-o<t?(o=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):o<t?e<Qi?(o=e,this._vidxOffset=0):(o=Qi,this._vidxOffset=e-o):this._vidxOffset=e-o,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(o),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),pt(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition)}update(e=0,t=this.size-1){const o=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=e&&s.__virtualIndex<=t&&(this.__updateElement(s,s.__virtualIndex,!0),o.push(s))}),this.__afterElementsUpdated(o)}_updateMetrics(e){pt();let t=0,o=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{o+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),t+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0},e),this._physicalSize=this._physicalSize+t-o,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){const t=getComputedStyle(e),o=parseFloat(t.height)||0;if(t.boxSizing==="border-box")return o;const s=parseFloat(t.paddingBottom)||0,r=parseFloat(t.paddingTop)||0,n=parseFloat(t.borderBottomWidth)||0,a=parseFloat(t.borderTopWidth)||0;return o+s+r+n+a}__updateElement(e,t,o){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||o)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach(t=>{const o=t.offsetHeight;if(o===0)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=X.debounce(this.__placeholderClearDebouncer,St,()=>this._resizeHandler());else{this.__elementHeightQueue.push(o),this.__elementHeightQueue.shift();const s=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(s.reduce((r,n)=>r+n,0)/s.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){const t=this.__getVisibleElements().find(o=>o.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(e){if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let t,o;if(e>0&&(t=this.adjustedFirstVisibleIndex,o=this.__getIndexScrollOffset(t)),this.__size=e,this._itemsChanged({path:"items"}),pt(),e>0){t=Math.min(t,e-1),this.scrollToIndex(t);const s=this.__getIndexScrollOffset(t);o!==void 0&&s!==void 0&&(this._scrollTop+=o-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),pt(),this._debounce("_update",this._update,Ro)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,K_)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=e.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){const t=this.createElements(e),o=document.createDocumentFragment();return t.forEach(s=>{s.style.position="absolute",o.appendChild(s),this.__resizeObserver.observe(s)}),this.elementsContainer.appendChild(o),t}_assignModels(e){const t=[];this._iterateItems((o,s)=>{const r=this._physicalItems[o];r.hidden=s>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=s+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),t.push(r))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,o,s){s.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){return e.find(t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return t.indexOf(e)===0&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;const t=e.detail.element;if(!t)return;const o=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,o)||this.__nextFocusableSiblingMissing(t,o))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,s)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const e=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const t=e>=0,o=this._getReusables(!t);o.indexes.length&&(this._physicalTop=o.physicalTop,t?(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length):(this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=X.debounce(this.__fixInvalidItemPositioningDebouncer,Gt.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=X.debounce(this.__scrollReorderDebouncer,Gt.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(e)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,o=this.adjustedFirstVisibleIndex===0,s=this.adjustedLastVisibleIndex===this.size-1;if(e&&!o||t&&!s){const r=t,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n}}__onWheel(e){if(e.ctrlKey||this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY))return;let t=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=t,e.preventDefault();return}t+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=X.debounce(this.__debouncerWheelAnimationFrame,St,()=>{this._wheelAnimationFrame=!1});const o=Math.abs(e.deltaX)+Math.abs(t);this._canScroll(this.scrollTarget,e.deltaX,t)?(e.preventDefault(),this.scrollTarget.scrollTop+=t,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=X.debounce(this._debouncerIgnoreNewWheel,Gt.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&o<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():o>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=o}_hasScrolledAncestor(e,t,o){if(e===this.scrollTarget||e===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(e,t,o)&&["auto","scroll"].indexOf(getComputedStyle(e).overflow)!==-1)return!0;if(e!==this&&e.parentElement)return this._hasScrolledAncestor(e.parentElement,t,o)}_canScroll(e,t,o){return o>0&&e.scrollTop<e.scrollHeight-e.offsetHeight||o<0&&e.scrollTop>0||t>0&&e.scrollLeft<e.scrollWidth-e.offsetWidth||t<0&&e.scrollLeft>0}_increasePoolIfNeeded(e){if(this._physicalCount>2&&e){const t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){const e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){const e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);const t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),o=this.__getFocusedElement(t)||t[0];if(!o)return;const s=o.__virtualIndex-e,r=t.indexOf(o)-s;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(t[n]);else if(r<0)for(let n=t.length+r;n<t.length;n++)this.elementsContainer.insertBefore(t[n],t[0]);if(T_){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n})}}_adjustVirtualIndexOffset(e){const t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){const o=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(o*t)}else{const o=this._vidxOffset,s=Qi,r=100;this._scrollTop===0?(this._vidxOffset=0,o!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<s&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(o-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=t,o!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-s&&this._vidxOffset<t&&(this._vidxOffset+=Math.min(t-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-o)))}}}Object.setPrototypeOf(dl.prototype,G_);class X_{constructor(e){this.__adapter=new dl(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}hostConnected(){this.__adapter.hostConnected()}}/**
|
|
6517
|
+
*/const em=1e5,Zi=1e3;class cl{constructor({createElements:e,updateElement:t,scrollTarget:o,scrollContainer:s,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=o,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:a}])=>{const l=a.width===0&&a.height===0;!l&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=l}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",a=>this.__onWheel(a)),this.scrollTarget.addEventListener("virtualizer-element-focused",a=>this.__onElementFocused(a)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if(typeof e!="number"||isNaN(e)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);const t=this.__getVisibleElements().length;let o=Math.floor(e/this.size*this._virtualCount);this._virtualCount-o<t?(o=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):o<t?e<Zi?(o=e,this._vidxOffset=0):(o=Zi,this._vidxOffset=e-o):this._vidxOffset=e-o,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(o),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),_t(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition)}update(e=0,t=this.size-1){const o=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=e&&s.__virtualIndex<=t&&(this.__updateElement(s,s.__virtualIndex,!0),o.push(s))}),this.__afterElementsUpdated(o)}_updateMetrics(e){_t();let t=0,o=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{o+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),t+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0},e),this._physicalSize=this._physicalSize+t-o,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){const t=getComputedStyle(e),o=parseFloat(t.height)||0;if(t.boxSizing==="border-box")return o;const s=parseFloat(t.paddingBottom)||0,r=parseFloat(t.paddingTop)||0,n=parseFloat(t.borderBottomWidth)||0,a=parseFloat(t.borderTopWidth)||0;return o+s+r+n+a}__updateElement(e,t,o){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||o)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach(t=>{const o=t.offsetHeight;if(o===0)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=X.debounce(this.__placeholderClearDebouncer,Pt,()=>this._resizeHandler());else{this.__elementHeightQueue.push(o),this.__elementHeightQueue.shift();const s=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(s.reduce((r,n)=>r+n,0)/s.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){const t=this.__getVisibleElements().find(o=>o.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(e){if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let t,o;if(e>0&&(t=this.adjustedFirstVisibleIndex,o=this.__getIndexScrollOffset(t)),this.__size=e,this._itemsChanged({path:"items"}),_t(),e>0){t=Math.min(t,e-1),this.scrollToIndex(t);const s=this.__getIndexScrollOffset(t);o!==void 0&&s!==void 0&&(this._scrollTop+=o-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),_t(),this._debounce("_update",this._update,Ho)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,em)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=e.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){const t=this.createElements(e),o=document.createDocumentFragment();return t.forEach(s=>{s.style.position="absolute",o.appendChild(s),this.__resizeObserver.observe(s)}),this.elementsContainer.appendChild(o),t}_assignModels(e){const t=[];this._iterateItems((o,s)=>{const r=this._physicalItems[o];r.hidden=s>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=s+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),t.push(r))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,o,s){s.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){return e.find(t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return t.indexOf(e)===0&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;const t=e.detail.element;if(!t)return;const o=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,o)||this.__nextFocusableSiblingMissing(t,o))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,s)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const e=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const t=e>=0,o=this._getReusables(!t);o.indexes.length&&(this._physicalTop=o.physicalTop,t?(this._virtualStart-=o.indexes.length,this._physicalStart-=o.indexes.length):(this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=X.debounce(this.__fixInvalidItemPositioningDebouncer,Kt.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=X.debounce(this.__scrollReorderDebouncer,Kt.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(e)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,o=this.adjustedFirstVisibleIndex===0,s=this.adjustedLastVisibleIndex===this.size-1;if(e&&!o||t&&!s){const r=t,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n}}__onWheel(e){if(e.ctrlKey||this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY))return;let t=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=t,e.preventDefault();return}t+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=X.debounce(this.__debouncerWheelAnimationFrame,Pt,()=>{this._wheelAnimationFrame=!1});const o=Math.abs(e.deltaX)+Math.abs(t);this._canScroll(this.scrollTarget,e.deltaX,t)?(e.preventDefault(),this.scrollTarget.scrollTop+=t,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=X.debounce(this._debouncerIgnoreNewWheel,Kt.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&o<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():o>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=o}_hasScrolledAncestor(e,t,o){if(e===this.scrollTarget||e===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(e,t,o)&&["auto","scroll"].indexOf(getComputedStyle(e).overflow)!==-1)return!0;if(e!==this&&e.parentElement)return this._hasScrolledAncestor(e.parentElement,t,o)}_canScroll(e,t,o){return o>0&&e.scrollTop<e.scrollHeight-e.offsetHeight||o<0&&e.scrollTop>0||t>0&&e.scrollLeft<e.scrollWidth-e.offsetWidth||t<0&&e.scrollLeft>0}_increasePoolIfNeeded(e){if(this._physicalCount>2&&e){const t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){const e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){const e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);const t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),o=this.__getFocusedElement(t)||t[0];if(!o)return;const s=o.__virtualIndex-e,r=t.indexOf(o)-s;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(t[n]);else if(r<0)for(let n=t.length+r;n<t.length;n++)this.elementsContainer.insertBefore(t[n],t[0]);if(N_){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n})}}_adjustVirtualIndexOffset(e){const t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){const o=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(o*t)}else{const o=this._vidxOffset,s=Zi,r=100;this._scrollTop===0?(this._vidxOffset=0,o!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<s&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(o-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=t,o!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-s&&this._vidxOffset<t&&(this._vidxOffset+=Math.min(t-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-o)))}}}Object.setPrototypeOf(cl.prototype,Z_);class tm{constructor(e){this.__adapter=new cl(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}hostConnected(){this.__adapter.hostConnected()}}/**
|
|
6524
6518
|
* @license
|
|
6525
6519
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6526
6520
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6527
|
-
*/const
|
|
6521
|
+
*/const im=i=>class extends i{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(t=>parseInt(t,10)).reduce((t,o)=>t+o)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${al()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const t=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const s=[...this.children].find(l=>!l.hidden&&l.index===this.__virtualizer.lastVisibleIndex);if(!s||e!==s.index)return;const r=s.getBoundingClientRect(),n=this.getBoundingClientRect(),a=r.bottom-n.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(e,t,o){return e instanceof Ce?!1:o&&e!==void 0&&t!==void 0?di(o,e)===di(o,t):e===t}__initVirtualizer(){this.__virtualizer=new tm({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map(()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t})}_updateElement(e,t){const o=this.items[t],s=this.focusedIndex,r=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:t,label:this.getItemLabel(o),selected:r,renderer:this.renderer,focused:!this.loading&&s===t}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",t!==void 0?"option":!1),e.setAttribute("aria-selected",r.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof Ce&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const t=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(t&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault()})}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))})}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
6528
6522
|
* @license
|
|
6529
6523
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6530
6524
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6531
|
-
*/class
|
|
6525
|
+
*/class om extends im(k){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return E`
|
|
6532
6526
|
<style>
|
|
6533
6527
|
:host {
|
|
6534
6528
|
display: block;
|
|
@@ -6555,67 +6549,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6555
6549
|
<div id="selector">
|
|
6556
6550
|
<slot></slot>
|
|
6557
6551
|
</div>
|
|
6558
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return e instanceof
|
|
6552
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return e instanceof Ce||this.owner.readonly?!1:this.owner._findIndex(e,this.owner.selectedItems,o)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}_e(om);/**
|
|
6559
6553
|
* @license
|
|
6560
6554
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6561
6555
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6562
|
-
*/function
|
|
6556
|
+
*/function hi(i,e,t=0){let o=e;for(const s of i.subCaches){const r=s.parentCacheIndex;if(o<=r)break;if(o<=r+s.flatSize)return hi(s,o-r-1,t+1);o-=s.flatSize}return{cache:i,item:i.items[o],index:o,page:Math.floor(o/i.pageSize),level:t}}function ul({getItemId:i},e,t,o=0,s=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&i(n)===i(t))return{cache:e,level:o,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:s+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=s+e.getFlatIndex(r.parentCacheIndex),a=ul({getItemId:i},r,t,o+1,n+1);if(a)return a}}function pl(i,[e,...t],o=0){e===1/0&&(e=i.size-1);const s=i.getFlatIndex(e),r=i.getSubCache(e);return r&&r.flatSize>0&&t.length?pl(r,t,o+s+1):o+s}/**
|
|
6563
6557
|
* @license
|
|
6564
6558
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6565
6559
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6566
|
-
*/class Vs{constructor(e,t,o,s,r){A(this,"context"),A(this,"pageSize"),A(this,"items",[]),A(this,"pendingRequests",{}),A(this,"__subCacheByIndex",{}),A(this,"__size",0),A(this,"__flatSize",0),this.context=e,this.pageSize=t,this.size=o,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=o||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(e){var t;if(this.__size!==e){if(this.__size=e,this.context.placeholder!==void 0){this.items.length=e||0;for(let o=0;o<e;o++)(t=this.items)[o]||(t[o]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o]})}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((e,t)=>(t.recalculateFlatSize(),e+t.flatSize),0):0}setPage(e,t){const o=e*this.pageSize;t.forEach((s,r)=>{const n=o+r;(this.size===void 0||n<this.size)&&(this.items[n]=s)})}getSubCache(e){return this.__subCacheByIndex[e]}removeSubCache(e){delete this.__subCacheByIndex[e]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(e){const t=new Vs(this.context,this.pageSize,0,this,e);return this.__subCacheByIndex[e]=t,t}getFlatIndex(e){const t=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((o,s)=>{const r=s.parentCacheIndex;return t>r?o+s.flatSize:o},t)}getItemForIndex(e){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:t}=
|
|
6560
|
+
*/class Vs{constructor(e,t,o,s,r){A(this,"context"),A(this,"pageSize"),A(this,"items",[]),A(this,"pendingRequests",{}),A(this,"__subCacheByIndex",{}),A(this,"__size",0),A(this,"__flatSize",0),this.context=e,this.pageSize=t,this.size=o,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=o||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(e){var t;if(this.__size!==e){if(this.__size=e,this.context.placeholder!==void 0){this.items.length=e||0;for(let o=0;o<e;o++)(t=this.items)[o]||(t[o]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o]})}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((e,t)=>(t.recalculateFlatSize(),e+t.flatSize),0):0}setPage(e,t){const o=e*this.pageSize;t.forEach((s,r)=>{const n=o+r;(this.size===void 0||n<this.size)&&(this.items[n]=s)})}getSubCache(e){return this.__subCacheByIndex[e]}removeSubCache(e){delete this.__subCacheByIndex[e]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(e){const t=new Vs(this.context,this.pageSize,0,this,e);return this.__subCacheByIndex[e]=t,t}getFlatIndex(e){const t=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((o,s)=>{const r=s.parentCacheIndex;return t>r?o+s.flatSize:o},t)}getItemForIndex(e){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:t}=hi(this,e);return t}getCacheAndIndex(e){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:t,index:o}=hi(this,e);return{cache:t,scaledIndex:o}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(e){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(e)){const t=this.createSubCache(e);this.context.__controller.__loadCachePage(t,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}/**
|
|
6567
6561
|
* @license
|
|
6568
6562
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6569
6563
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6570
|
-
*/class
|
|
6564
|
+
*/class sm extends EventTarget{constructor(e,{size:t,pageSize:o,isExpanded:s,getItemId:r,isPlaceholder:n,placeholder:a,dataProvider:l,dataProviderParams:d}){super(),A(this,"host"),A(this,"dataProvider"),A(this,"dataProviderParams"),A(this,"pageSize"),A(this,"isExpanded"),A(this,"getItemId"),A(this,"rootCache"),A(this,"placeholder"),A(this,"isPlaceholder"),this.host=e,this.pageSize=o,this.getItemId=r,this.isExpanded=s,this.placeholder=a,this.isPlaceholder=n,this.dataProvider=l,this.dataProviderParams=d,this.rootCache=this.__createRootCache(t)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache()}setDataProvider(e){this.dataProvider=e,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(e){return hi(this.rootCache,e)}getItemContext(e){return ul({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return pl(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:t,page:o,item:s}=this.getFlatIndexContext(e);this.__isItemLoaded(s)||this.__loadCachePage(t,o)}ensureFlatIndexHierarchy(e){const{cache:t,item:o,index:s}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!t.getSubCache(s)){const r=t.createSubCache(s);this.__loadCachePage(r,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(e){return new Vs(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,t){if(!this.dataProvider||e.pendingRequests[t])return;let o={page:t,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=we(we({},o),this.dataProviderParams()));const s=(r,n)=>{e.pendingRequests[t]===s&&(n!==void 0?e.size=n:o.parentItem&&(e.size=r.length),e.setPage(t,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[t],this.dispatchEvent(new CustomEvent("page-loaded")))};e.pendingRequests[t]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,s)}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
|
|
6571
6565
|
* @license
|
|
6572
6566
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6573
6567
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6574
|
-
*/const
|
|
6568
|
+
*/const rm=i=>class extends i{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new sm(this,{placeholder:new Ce,isPlaceholder:e=>e instanceof Ce,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const t=e.detail.index;t!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(t)}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1)}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){const{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.dataProvider=t}),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,t){if(e&&t!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,t);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}};/**
|
|
6575
6569
|
* @license
|
|
6576
6570
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6577
6571
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6578
|
-
*/const
|
|
6572
|
+
*/const _l=J(i=>class extends i{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}});/**
|
|
6579
6573
|
* @license
|
|
6580
6574
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6581
6575
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6582
|
-
*/const
|
|
6576
|
+
*/const ml=J(i=>class extends i{get _keyboardActive(){return Ns()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}});/**
|
|
6583
6577
|
* @license
|
|
6584
6578
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6585
6579
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6586
|
-
*/const Ms=
|
|
6580
|
+
*/const Ms=J(i=>class extends i{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
6587
6581
|
* @license
|
|
6588
6582
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6589
6583
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6590
|
-
*/const
|
|
6584
|
+
*/const nm=i=>class extends i{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t||e===void 0)return;const{classList:o}=t;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const r=this.__previousClasses.filter(n=>!this.__initialClasses.has(n));r.length>0&&o.remove(...r)}const s=typeof e=="string"?e.split(" ").filter(Boolean):[];s.length>0&&o.add(...s),this.__previousClasses=s}};/**
|
|
6591
6585
|
* @license
|
|
6592
6586
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6593
6587
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6594
|
-
*/function
|
|
6588
|
+
*/function fl(i){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(i);return}i.querySelector("template")&&console.warn(`WARNING: <template> inside <${i.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}/**
|
|
6595
6589
|
* @license
|
|
6596
6590
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6597
6591
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6598
|
-
*/const Bs=
|
|
6592
|
+
*/const Bs=J(i=>class extends i{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged",sync:!0},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0}}}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(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),!(e===""&&t===void 0)&&(this.__userInput||this._forwardInputValue(e))}});/**
|
|
6599
6593
|
* @license
|
|
6600
6594
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6601
6595
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6602
|
-
*/const Fs=
|
|
6596
|
+
*/const Fs=J(i=>class extends i{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,sync:!0},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0,sync:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}_requestValidation(){this.manualValidation||this.validate()}});/**
|
|
6603
6597
|
* @license
|
|
6604
6598
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6605
6599
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6606
|
-
*/class
|
|
6600
|
+
*/class am{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")}}/**
|
|
6607
6601
|
* @license
|
|
6608
6602
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6609
6603
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6610
|
-
*/function nn(i){return i!=null}function an(i,e){return i.findIndex(t=>t instanceof we?!1:e(t))}const om=i=>class extends tm(Si(Fs(pl(Ms(Bs(ul(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),_l(this),this.addController(new im(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,o){super._propertiesChanged(e,t,o),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=s=>{s.innerHTML||s.appendChild(t)},o.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,o,s,r,n,a,l,d,u){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?t:[],opened:o,loading:s,selectedItem:r,itemIdPath:n,focusedIndex:a,renderer:l,theme:d,itemClassNameGenerator:u}))}_openedOrItemsChanged(e,t,o,s){this._overlayOpened=e&&(s||o||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&tl(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const o=this._getItemElements().find(s=>s.index===e);o?t.setAttribute("aria-activedescendant",o.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!Mo&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?li(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?li(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{Mo&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const o=this._inputElementValue;this._lastCustomValue=o;const s=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(s),s.defaultPrevented||(this.value=o)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,o={};this.filter===t?this._filterChanged(this.filter):o.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(nn(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(o=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(o).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const o=t?t[this._focusedIndex]:null,s=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&s>=0&&(this.selectedItem=e[s]);const r=this.__getItemIndexByValue(e,this._getItemValue(o));r>-1?this._focusedIndex=r:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!nn(t)?-1:an(e,o=>this._getItemValue(o)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:an(e,o=>this._getItemLabel(o).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof we)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(Ns()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
6604
|
+
*/function nn(i){return i!=null}function an(i,e){return i.findIndex(t=>t instanceof Ce?!1:e(t))}const lm=i=>class extends nm(Pi(Fs(ml(Ms(Bs(_l(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),fl(this),this.addController(new am(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,o){super._propertiesChanged(e,t,o),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=s=>{s.innerHTML||s.appendChild(t)},o.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,o,s,r,n,a,l,d,u){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?t:[],opened:o,loading:s,selectedItem:r,itemIdPath:n,focusedIndex:a,renderer:l,theme:d,itemClassNameGenerator:u}))}_openedOrItemsChanged(e,t,o,s){this._overlayOpened=e&&(s||o||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&il(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const o=this._getItemElements().find(s=>s.index===e);o?t.setAttribute("aria-activedescendant",o.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!Bo&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?di(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?di(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{Bo&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const o=this._inputElementValue;this._lastCustomValue=o;const s=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(s),s.defaultPrevented||(this.value=o)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,o={};this.filter===t?this._filterChanged(this.filter):o.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(nn(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(o=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(o).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const o=t?t[this._focusedIndex]:null,s=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&s>=0&&(this.selectedItem=e[s]);const r=this.__getItemIndexByValue(e,this._getItemValue(o));r>-1?this._focusedIndex=r:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!nn(t)?-1:an(e,o=>this._getItemValue(o)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:an(e,o=>this._getItemLabel(o).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Ce)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(Ns()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
6611
6605
|
* @license
|
|
6612
6606
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6613
6607
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6614
|
-
*/const
|
|
6608
|
+
*/const dm=i=>class extends rm(lm(i)){static get properties(){return{filteredItems:{type:Array,notify:!0,sync:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0,sync:!0},size:{type:Number,notify:!0,observer:"_sizeChanged",sync:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},lastFilter:{type:String,notify:!0,sync:!0},topGroup:{type:Array,observer:"_topGroupChanged",sync:!0},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&!(this.readonly&&this.selectedItems.length===0)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_updateOverlayWidth(){this.$.overlay._updateOverlayWidth()}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(e){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(e);return}if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter(o=>this._comboBox._findIndex(o,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(t));return}super._setDropdownItems(e)}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}return}super._onEnter(e)}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}super._onEscape(e)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue){this._ignoreCommitValue=!1,this.clear(),this._inputElementValue="";return}super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),!this.readonly&&(e.detail.item instanceof Ce||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))))}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(e){this._ignoreCommitValue&&e.stopImmediatePropagation()}};/**
|
|
6615
6609
|
* @license
|
|
6616
6610
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6617
6611
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6618
|
-
*/class
|
|
6612
|
+
*/class hm extends dm(it(k)){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return E`
|
|
6619
6613
|
<style>
|
|
6620
6614
|
:host([opened]) {
|
|
6621
6615
|
pointer-events: auto;
|
|
@@ -6633,15 +6627,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6633
6627
|
no-vertical-overlap
|
|
6634
6628
|
restore-focus-node="[[inputElement]]"
|
|
6635
6629
|
></vaadin-multi-select-combo-box-overlay>
|
|
6636
|
-
`}}
|
|
6630
|
+
`}}_e(hm);/**
|
|
6637
6631
|
* @license
|
|
6638
6632
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6639
6633
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6640
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zn()};let
|
|
6634
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Zn()};let eo;const ln=new Set,cm=i=>class extends Ei(i){static finalize(){super.finalize();const{is:e}=this;e&&!ln.has(e)&&(window.Vaadin.registrations.push(this),ln.add(e),window.Vaadin.developmentModeCallback&&(eo=X.debounce(eo,dl,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),hl(eo)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};/**
|
|
6641
6635
|
* @license
|
|
6642
6636
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6643
6637
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6644
|
-
*/const
|
|
6638
|
+
*/const um=m`
|
|
6645
6639
|
[part='clear-button'] {
|
|
6646
6640
|
display: none;
|
|
6647
6641
|
cursor: default;
|
|
@@ -6658,7 +6652,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6658
6652
|
* @license
|
|
6659
6653
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6660
6654
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6661
|
-
*/const
|
|
6655
|
+
*/const pm=m`
|
|
6656
|
+
[class$='container'] {
|
|
6657
|
+
display: flex;
|
|
6658
|
+
flex-direction: column;
|
|
6659
|
+
min-width: 100%;
|
|
6660
|
+
max-width: 100%;
|
|
6661
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
6662
|
+
}
|
|
6663
|
+
`;/**
|
|
6664
|
+
* @license
|
|
6665
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6666
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6667
|
+
*/const _m=m`
|
|
6662
6668
|
:host {
|
|
6663
6669
|
display: inline-flex;
|
|
6664
6670
|
outline: none;
|
|
@@ -6696,125 +6702,113 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6696
6702
|
* @license
|
|
6697
6703
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6698
6704
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6699
|
-
*/const
|
|
6700
|
-
[class$='container'] {
|
|
6701
|
-
display: flex;
|
|
6702
|
-
flex-direction: column;
|
|
6703
|
-
min-width: 100%;
|
|
6704
|
-
max-width: 100%;
|
|
6705
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
6706
|
-
}
|
|
6707
|
-
`;/**
|
|
6708
|
-
* @license
|
|
6709
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6710
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6711
|
-
*/const hm=[lm,dm,am];/**
|
|
6705
|
+
*/const mm=[_m,pm,um];/**
|
|
6712
6706
|
* @license
|
|
6713
6707
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6714
6708
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6715
|
-
*/const
|
|
6709
|
+
*/const ee=document.createElement("div");ee.style.position="fixed";ee.style.clip="rect(0px, 0px, 0px, 0px)";ee.setAttribute("aria-live","polite");document.body.appendChild(ee);let Wt;function Xt(i,e={}){const t=e.mode||"polite",o=e.timeout===void 0?150:e.timeout;t==="alert"?(ee.removeAttribute("aria-live"),ee.removeAttribute("role"),Wt=X.debounce(Wt,Pt,()=>{ee.setAttribute("role","alert")})):(Wt&&Wt.cancel(),ee.removeAttribute("role"),ee.setAttribute("aria-live",t)),ee.textContent="",setTimeout(()=>{ee.textContent=i},o)}/**
|
|
6716
6710
|
* @license
|
|
6717
6711
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6718
6712
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6719
|
-
*/const
|
|
6713
|
+
*/const Ut=new ResizeObserver(i=>{setTimeout(()=>{i.forEach(e=>{e.target.isConnected&&(e.target.resizables?e.target.resizables.forEach(t=>{t._onResize(e.contentRect)}):e.target._onResize(e.contentRect))})})}),fm=J(i=>class extends i{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Ut.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,Ut.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),Ut.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const t=e.resizables;t&&(t.delete(this),t.size===0&&Ut.unobserve(e)),this.__parent=null}}_onResize(e){}});/**
|
|
6720
6714
|
* @license
|
|
6721
6715
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6722
6716
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6723
|
-
*/class
|
|
6717
|
+
*/class vm{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 o=[],s=[];e.length&&(t=e.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=e.indexOf(r);a===-1?o.push(r):a!==n&&s.push(r)}),(t.length||o.length||s.length)&&this.callback({addedNodes:t,currentNodes:e,movedNodes:s,removedNodes:o}),this._storedNodes=e}}/**
|
|
6724
6718
|
* @license
|
|
6725
6719
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6726
6720
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6727
|
-
*/class
|
|
6721
|
+
*/class Ti extends EventTarget{static generateId(e,t="default"){return`${t}-${e.localName}-${al()}`}constructor(e,t,o,s={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=s;this.host=e,this.slotName=t,this.tagName=o,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(e,d||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:o}=this;let s=this.defaultNode;return!s&&o&&(s=document.createElement(o),s instanceof Element&&(t!==""&&s.setAttribute("slot",t),this.defaultNode=s)),s&&(this.node=s,e.appendChild(s)),s}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}]`,o=this.host.shadowRoot.querySelector(t);this.__slotObserver=new vm(o,({addedNodes:s,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=s.filter(l=>!E_(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l)})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...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)))})}}/**
|
|
6728
6722
|
* @license
|
|
6729
6723
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6730
6724
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6731
|
-
*/class
|
|
6725
|
+
*/class gm extends Ti{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}}))}}/**
|
|
6732
6726
|
* @license
|
|
6733
6727
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6734
6728
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6735
|
-
*/const
|
|
6729
|
+
*/const bm=i=>class extends _l(i){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),!this.__shouldAllowFocusWhenDisabled()&&(e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):t&&(this._lastTabIndex!==void 0?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0))}_tabindexChanged(e){this.__shouldAllowFocusWhenDisabled()||this.disabled&&e!==-1&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"))}focus(){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus()}__shouldAllowFocusWhenDisabled(){return!1}};/**
|
|
6736
6730
|
* @license
|
|
6737
6731
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6738
6732
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6739
|
-
*/const
|
|
6733
|
+
*/const ym=J(i=>class extends ml(bm(i)){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged",sync:!0},_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(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0),e===void 0&&this.hasAttribute("tabindex")&&this.removeAttribute("tabindex")}});/**
|
|
6740
6734
|
* @license
|
|
6741
6735
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6742
6736
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6743
|
-
*/const
|
|
6737
|
+
*/const to=new WeakMap;function xm(i){return to.has(i)||to.set(i,new Set),to.get(i)}function wm(i,e){const t=document.createElement("style");t.textContent=i,e===document?document.head.appendChild(t):e.insertBefore(t,e.firstChild)}const Cm=J(i=>class extends i{get slotStyles(){return[]}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const e=this.getRootNode(),t=xm(e);this.slotStyles.forEach(o=>{t.has(o)||(wm(o,e),t.add(o))})}});/**
|
|
6744
6738
|
* @license
|
|
6745
6739
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6746
6740
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6747
|
-
*/const
|
|
6741
|
+
*/const Im=i=>class extends Bs(Ms(i)){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",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){e.preventDefault(),Bo||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};/**
|
|
6748
6742
|
* @license
|
|
6749
6743
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6750
6744
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6751
|
-
*/const
|
|
6745
|
+
*/const io=new Map;function Rs(i){return io.has(i)||io.set(i,new WeakMap),io.get(i)}function vl(i,e){i&&i.removeAttribute(e)}function gl(i,e){if(!i||!e)return;const t=Rs(e);if(t.has(i))return;const o=Ls(i.getAttribute(e));t.set(i,new Set(o))}function Am(i,e){if(!i||!e)return;const t=Rs(e),o=t.get(i);!o||o.size===0?i.removeAttribute(e):sl(i,e,ki(o)),t.delete(i)}function oo(i,e,t={newId:null,oldId:null,fromUser:!1}){if(!i||!e)return;const{newId:o,oldId:s,fromUser:r}=t,n=Rs(e),a=n.get(i);if(!r&&a){s&&a.delete(s),o&&a.add(o);return}r&&(a?o||n.delete(i):gl(i,e),vl(i,e)),A_(i,e,s);const l=o||ki(a);l&&sl(i,e,l)}function Em(i,e){gl(i,e),vl(i,e)}/**
|
|
6752
6746
|
* @license
|
|
6753
6747
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6754
6748
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6755
|
-
*/class
|
|
6749
|
+
*/class km{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 o=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,o,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?(Em(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(Am(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,o){oo(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:o})}__setErrorIdToAriaAttribute(e,t){oo(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){oo(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")))}}/**
|
|
6756
6750
|
* @license
|
|
6757
6751
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
6758
6752
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6759
|
-
*/class Hs extends
|
|
6753
|
+
*/class Hs extends Ti{constructor(e,t,o,s={}){super(e,t,o,ci(we({},s),{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(o=>{const s=o.target,r=s===this.node;o.type==="attributes"?r&&this.__updateNodeId(s):(r||s.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)}}/**
|
|
6760
6754
|
* @license
|
|
6761
6755
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6762
6756
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6763
|
-
*/class
|
|
6757
|
+
*/class Sm extends Hs{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:o}=this,s=!!(o&&t&&t.trim()!=="");e&&(e.textContent=s?t:"",e.hidden=!s,s&&Xt(t,{mode:"assertive"})),super.updateDefaultNode(e)}}/**
|
|
6764
6758
|
* @license
|
|
6765
6759
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6766
6760
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6767
|
-
*/class
|
|
6761
|
+
*/class Pm extends Hs{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)}}/**
|
|
6768
6762
|
* @license
|
|
6769
6763
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6770
6764
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6771
|
-
*/class
|
|
6765
|
+
*/class Tm extends Hs{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)}}/**
|
|
6772
6766
|
* @license
|
|
6773
6767
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6774
6768
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6775
|
-
*/const
|
|
6769
|
+
*/const Dm=J(i=>class extends Pi(i){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Tm(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}});/**
|
|
6776
6770
|
* @license
|
|
6777
6771
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6778
6772
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6779
|
-
*/const
|
|
6773
|
+
*/const Om=i=>class extends Fs(Dm(Pi(i))){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 km(this),this._helperController=new Pm(this),this._errorController=new Sm(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:o}=e.detail;this.__labelChanged(t,o)}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:o}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,o)})}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(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)})}};/**
|
|
6780
6774
|
* @license
|
|
6781
6775
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6782
6776
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6783
|
-
*/const
|
|
6777
|
+
*/const zm=J(i=>class extends i{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(e){e&&(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(e=>{this._delegateAttribute(e,this[e])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e])})}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((t,o)=>{this._delegateAttribute(t,e[o])})}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((t,o)=>{this._delegateProperty(t,e[o])})}_delegateAttribute(e,t){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",t?"true":!1),typeof t=="boolean"?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}});/**
|
|
6784
6778
|
* @license
|
|
6785
6779
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6786
6780
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6787
|
-
*/const
|
|
6781
|
+
*/const Nm=J(i=>class extends zm(Fs(Bs(i))){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(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(t=>this.__isValidConstraint(t))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;const o=this._hasValidConstraints(t),s=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this._requestValidation():s&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=o}_onChange(e){e.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return!!e||e===0}});/**
|
|
6788
6782
|
* @license
|
|
6789
6783
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6790
6784
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6791
|
-
*/const
|
|
6785
|
+
*/const Lm=i=>class extends Cm(ym(Nm(Om(Im(Ms(i)))))){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[`
|
|
6792
6786
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
6793
6787
|
font: inherit;
|
|
6794
6788
|
color: inherit;
|
|
6795
6789
|
}
|
|
6796
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=X.debounce(this._preventInputDebouncer,
|
|
6790
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=X.debounce(this._preventInputDebouncer,Kt.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){const t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u")}catch(t){console.error(t)}}};/**
|
|
6797
6791
|
* @license
|
|
6798
6792
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6799
6793
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6800
|
-
*/class
|
|
6794
|
+
*/class Vm extends Ti{constructor(e,t,o={}){const{uniqueIdPrefix:s}=o;super(e,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof t=="function"&&t(r)},useUniqueId:!0,uniqueIdPrefix:s})}}/**
|
|
6801
6795
|
* @license
|
|
6802
6796
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6803
6797
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6804
|
-
*/class
|
|
6798
|
+
*/class Mm{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",o=>{this.__initLabel(o.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)}}/**
|
|
6805
6799
|
* @license
|
|
6806
6800
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6807
6801
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6808
|
-
*/const
|
|
6802
|
+
*/const Bm=i=>class extends Lm(fm(i)){static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged",sync:!0},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged",sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1,sync:!0},items:{type:Array,sync:!0},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged",sync:!0},itemLabelPath:{type:String,value:"label",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},overlayClass:{type:String,sync:!0},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0,sync:!0},selectedItems:{type:Array,value:()=>[],notify:!0,sync:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0},size:{type:Number,sync:!0},pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},dataProvider:{type:Object,sync:!0},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged",sync:!0},renderer:{type:Function,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},filteredItems:{type:Array,sync:!0},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},value:{type:String},_overflowItems:{type:Array,value:()=>[],sync:!0},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String,sync:!0},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return[...super.slotStyles,`
|
|
6809
6803
|
${e}[has-value] input::placeholder {
|
|
6810
6804
|
color: transparent !important;
|
|
6811
6805
|
forced-color-adjust: none;
|
|
6812
6806
|
}
|
|
6813
|
-
`]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new
|
|
6807
|
+
`]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new Vm(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new Mm(this.inputElement,this._labelController)),this._tooltipController=new gm(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new Ti(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",t=>this._preventBlur(t)),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),fl(this)}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),Xt(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this._requestValidation())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){if(this.stateTarget){if(e==="required"){this._delegateAttribute("aria-required",t?"true":!1);return}super._delegateAttribute(e,t)}}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||t==null)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.__updateChips()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=t,this.placeholder=t}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map(t=>this._getItemLabel(t)).join(", ")}_findIndex(e,t,o){if(o&&e){for(let s=0;s<t.length;s++)if(t[s]&&t[s][o]===e[o])return s;return-1}return t.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(e,t,o){const s=t?"selected":"deselected",r=this.i18n.total.replace("{count}",o||0);Xt(`${e} ${this.i18n[s]} ${r}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const o=this._getItemLabel(e);this.__announceItem(o,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],o=this._findIndex(e,t,this.itemIdPath),s=this._getItemLabel(e);let r=!1;if(o!==-1){const n=this._lastFilter;if(n&&n.toLowerCase()===s.toLowerCase()){this.__clearInternalValue();return}t.splice(o,1)}else t.push(e),r=!0;this.__updateSelection(t),this.__clearInternalValue(),this.__announceItem(s,r,t.length)}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,o){e?(!o||this.__needToSyncTopGroup())&&(this._topGroup=[...t]):this._topGroup=[]}__needToSyncTopGroup(){return this.itemIdPath?this._topGroup&&this._topGroup.some(e=>{const t=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return t&&e!==t}):!1}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const o=this._getItemLabel(e);return t.label=o,t.setAttribute("title",o),typeof this.itemClassNameGenerator=="function"&&(t.className=this.itemClassNameGenerator(e)),t.addEventListener("item-removed",s=>this._onItemRemoved(s)),t.addEventListener("mousedown",s=>this._preventBlur(s)),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),s=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(n=>{n.remove()});const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=t-o;e.length>1&&(s-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const n=[];for(let d=e.length-1,u=null;d>=0;d--){const c=this.__createChip(e[d]);this.insertBefore(c,u),u=c,n.unshift(c)}const a=[],l=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&l<o){for(;n.length>1;){n.pop().remove(),a.unshift(e.pop());const d=a.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=d)break}n.length===1&&(n[0].style.maxWidth=`${Math.max(r,s)}px`)}this._overflowItems=a;return}for(let n=e.length-1,a=null;n>=0;n--){const l=this.__createChip(e[n]);if(this.insertBefore(l,a),!this.autoExpandVertically){if(this.$.chips.clientWidth>s&&(s<r||a!==null)){l.remove();break}l.style.maxWidth=`${s}px`}e.pop(),a=l}this._overflowItems=e}__updateOverflowChip(e,t,o,s){if(e){const r=t.length;e.label=`${r}`,e.setAttribute("count",`${r}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",r===0),e.disabled=o,e.readonly=s}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(e,t){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&t.preventDefault();let s;this.__isRTL?o===e.length-1?s=-1:o>-1&&(s=o+1):o===-1?s=e.length-1:o>0&&(s=o-1),s!==void 0&&(this._focusedChipIndex=s)}_onArrowRight(e,t){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&t.preventDefault();let s;this.__isRTL?o===-1?s=e.length-1:o>0&&(s=o-1):o===e.length-1?s=-1:o>-1&&(s=o+1),s!==void 0&&(this._focusedChipIndex=s)}_onBackSpace(e){if(this.inputElement.selectionStart!==0)return;const t=this._focusedChipIndex;t===-1?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const o=this._chips;if(o.forEach((s,r)=>{s.toggleAttribute("focused",r===e)}),e>-1){const s=o[e].item,r=this._getItemLabel(s);Xt(`${r} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}};/**
|
|
6814
6808
|
* @license
|
|
6815
6809
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6816
6810
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6817
|
-
*/
|
|
6811
|
+
*/z("vaadin-multi-select-combo-box",[mm,d_],{moduleId:"vaadin-multi-select-combo-box-styles"});class Fm extends Bm(it(cm(k))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return E`
|
|
6818
6812
|
<div class="vaadin-multi-select-combo-box-container">
|
|
6819
6813
|
<div part="label">
|
|
6820
6814
|
<slot name="label"></slot>
|
|
@@ -6885,7 +6879,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6885
6879
|
</div>
|
|
6886
6880
|
|
|
6887
6881
|
<slot name="tooltip"></slot>
|
|
6888
|
-
`}}
|
|
6882
|
+
`}}_e(Fm);b("vaadin-notification-card",m`
|
|
6889
6883
|
:host {
|
|
6890
6884
|
position: relative;
|
|
6891
6885
|
margin: var(--lumo-space-s);
|
|
@@ -7103,11 +7097,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7103
7097
|
* @license
|
|
7104
7098
|
* Copyright 2020 Google LLC
|
|
7105
7099
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7106
|
-
*/const
|
|
7100
|
+
*/const Rm=(i,e)=>(i==null?void 0:i._$litType$)!==void 0;/**
|
|
7107
7101
|
* @license
|
|
7108
7102
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7109
7103
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7110
|
-
*/class
|
|
7104
|
+
*/class Hm extends Ia(N(pe(k))){static get template(){return E`
|
|
7111
7105
|
<style>
|
|
7112
7106
|
:host {
|
|
7113
7107
|
position: fixed;
|
|
@@ -7174,7 +7168,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7174
7168
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
7175
7169
|
</div>
|
|
7176
7170
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
7177
|
-
`}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),fs&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_openedChanged(e){e?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}_detectIosNavbar(){const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.bottom=`${o-e}px`:this.style.bottom="0"}_onVaadinOverlayClose(e){const t=e.detail.sourceEvent;t&&t.composedPath().indexOf(this)>=0&&e.preventDefault()}}class
|
|
7171
|
+
`}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),fs&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_openedChanged(e){e?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}_detectIosNavbar(){const e=window.innerHeight,t=window.innerWidth>e,o=document.documentElement.clientHeight;t&&o>e?this.style.bottom=`${o-e}px`:this.style.bottom="0"}_onVaadinOverlayClose(e){const t=e.detail.sourceEvent;t&&t.composedPath().indexOf(this)>=0&&e.preventDefault()}}class qm extends N(k){static get template(){return E`
|
|
7178
7172
|
<style>
|
|
7179
7173
|
:host {
|
|
7180
7174
|
display: block;
|
|
@@ -7196,14 +7190,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7196
7190
|
<slot></slot>
|
|
7197
7191
|
</div>
|
|
7198
7192
|
</div>
|
|
7199
|
-
`}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class
|
|
7193
|
+
`}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class he extends Ci(yn(pe(k))){static get template(){return E`
|
|
7200
7194
|
<style>
|
|
7201
7195
|
:host {
|
|
7202
7196
|
display: none !important;
|
|
7203
7197
|
}
|
|
7204
7198
|
</style>
|
|
7205
7199
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
7206
|
-
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(e,t){return
|
|
7200
|
+
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(e,t){return Rm(e)?he._createAndShowNotification(o=>{bn(e,o)},t):he._createAndShowNotification(o=>{o.innerText=e},t)}static _createAndShowNotification(e,t){const o=document.createElement(he.is);return t&&Number.isFinite(t.duration)&&(o.duration=t.duration),t&&t.position&&(o.position=t.position),t&&t.theme&&o.setAttribute("theme",t.theme),o.renderer=e,document.body.appendChild(o),o.opened=!0,o.addEventListener("opened-changed",s=>{s.detail.value||o.remove()}),o}get _container(){return he._container||(he._container=document.createElement("vaadin-notification-container"),document.body.appendChild(he._container)),he._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Ps(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1)})}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(e,t,o){if(!o)return;const s=this._oldRenderer!==e;this._oldRenderer=e,s&&(o.innerHTML="",delete o._$litPart$),t&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(e){e?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const e=getComputedStyle(this._card).getPropertyValue("animation-name");e&&e!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(e,t){t&&(clearTimeout(this._durationTimeoutId),e>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),e)))}}D(Hm);D(qm);D(he);const bl=m`
|
|
7207
7201
|
:host {
|
|
7208
7202
|
-webkit-tap-highlight-color: transparent;
|
|
7209
7203
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -7217,11 +7211,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7217
7211
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
7218
7212
|
background-color: var(--lumo-contrast-10pct);
|
|
7219
7213
|
}
|
|
7220
|
-
`;b("vaadin-list-box",
|
|
7214
|
+
`;b("vaadin-list-box",bl,{moduleId:"lumo-list-box"});/**
|
|
7221
7215
|
* @license
|
|
7222
7216
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7223
7217
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7224
|
-
*/b("vaadin-select-item",Ss,{moduleId:"lumo-select-item"});b("vaadin-select-list-box",
|
|
7218
|
+
*/b("vaadin-select-item",Ss,{moduleId:"lumo-select-item"});b("vaadin-select-list-box",bl,{moduleId:"lumo-select-list-box"});const $m=m`
|
|
7225
7219
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
7226
7220
|
text-align: start;
|
|
7227
7221
|
}
|
|
@@ -7264,7 +7258,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7264
7258
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
7265
7259
|
--_lumo-selected-item-padding: 0;
|
|
7266
7260
|
}
|
|
7267
|
-
`;b("vaadin-select",[
|
|
7261
|
+
`;b("vaadin-select",[tt,$m],{moduleId:"lumo-select"});b("vaadin-select-value-button",m`
|
|
7268
7262
|
:host {
|
|
7269
7263
|
font-family: var(--lumo-font-family);
|
|
7270
7264
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -7283,7 +7277,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7283
7277
|
::slotted(*:hover) {
|
|
7284
7278
|
background-color: transparent;
|
|
7285
7279
|
}
|
|
7286
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
7280
|
+
`,{moduleId:"lumo-select-value-button"});const Wm=m`
|
|
7287
7281
|
:host {
|
|
7288
7282
|
--_lumo-item-selected-icon-display: block;
|
|
7289
7283
|
}
|
|
@@ -7319,15 +7313,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7319
7313
|
:host([theme~='align-center']) {
|
|
7320
7314
|
text-align: center;
|
|
7321
7315
|
}
|
|
7322
|
-
`;b("vaadin-select-overlay",[
|
|
7316
|
+
`;b("vaadin-select-overlay",[_s,Wm],{moduleId:"lumo-select-overlay"});/**
|
|
7323
7317
|
* @license
|
|
7324
7318
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7325
7319
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7326
|
-
*/const
|
|
7320
|
+
*/const Um=i=>class extends os(Be(i)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(e){return!this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}};/**
|
|
7327
7321
|
* @license
|
|
7328
7322
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7329
7323
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7330
|
-
*/class
|
|
7324
|
+
*/class jm extends Um(N(oe(k))){static get is(){return"vaadin-select-item"}static get template(){return E`
|
|
7331
7325
|
<style>
|
|
7332
7326
|
:host {
|
|
7333
7327
|
display: inline-block;
|
|
@@ -7341,23 +7335,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7341
7335
|
<div part="content">
|
|
7342
7336
|
<slot></slot>
|
|
7343
7337
|
</div>
|
|
7344
|
-
`}ready(){super.ready(),this.setAttribute("role","option")}}
|
|
7338
|
+
`}ready(){super.ready(),this.setAttribute("role","option")}}D(jm);/**
|
|
7345
7339
|
* @license
|
|
7346
7340
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7347
7341
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7348
|
-
*/function
|
|
7342
|
+
*/function Ym(i,e){const{scrollLeft:t}=i;return e!=="rtl"?t:i.scrollWidth-i.clientWidth+t}function Gm(i,e,t){e!=="rtl"?i.scrollLeft=t:i.scrollLeft=i.clientWidth-i.scrollWidth+t}/**
|
|
7349
7343
|
* @license
|
|
7350
7344
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7351
7345
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7352
|
-
*/const
|
|
7346
|
+
*/const Km=i=>class extends Me(i){get focused(){return(this._getItems()||[]).find(ns)}get _vertical(){return!0}focus(){const e=this._getItems();if(Array.isArray(e)){const t=this._getAvailableIndex(e,0,null,o=>!xo(o));t>=0&&this._focus(t)}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:t}=e,o=this._getItems()||[],s=o.indexOf(this.focused);let r,n;const a=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(t)?(n=-a,r=s-a):this.__isNextKey(t)?(n=a,r=s+a):t==="Home"?(n=1,r=0):t==="End"&&(n=-1,r=o.length-1),r=this._getAvailableIndex(o,r,n,l=>!xo(l)),r>=0&&(e.preventDefault(),this._focus(r,!0))}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,t=!1){const o=this._getItems();this._focusItem(o[e],t)}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""))}_getAvailableIndex(e,t,o,s){const r=e.length;let n=t;for(let a=0;typeof n=="number"&&a<r;a+=1,n+=o||1){n<0?n=r-1:n>=r&&(n=0);const l=e[n];if(!l.hasAttribute("disabled")&&this.__isMatchingItem(l,s))return n}return-1}__isMatchingItem(e,t){return typeof t=="function"?t(e):!0}};/**
|
|
7353
7347
|
* @license
|
|
7354
7348
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7355
7349
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7356
|
-
*/const
|
|
7350
|
+
*/const Xm=i=>class extends Km(i){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],t=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!xo(o));t>=0?this._focus(t):super.focus()}ready(){super.ready(),this.addEventListener("click",t=>this._onClick(t));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Zo(e,()=>{this._setItems(this._filterItems(oa(this)))})}_getItems(){return this.items}_enhanceItems(e,t,o,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),e.forEach(n=>{t?n.setAttribute("orientation",t):n.removeAttribute("orientation")}),this._setFocusable(o<0||!o?0:o);const r=e[o];e.forEach(n=>{n.selected=n===r}),r&&!r.disabled&&this._scrollToItem(o)}}_filterItems(e){return e.filter(t=>t._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let o;t&&!t.disabled&&(o=this.items.indexOf(t))>=0&&(this.selected=o)}_searchKey(e,t){this._searchReset=G.debounce(this._searchReset,ye.after(500),()=>{this._searchBuf=""}),this._searchBuf+=t.toLowerCase(),this.items.some(s=>this.__isMatchingKey(s))||(this._searchBuf=t.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,s=>this.__isMatchingKey(s)&&getComputedStyle(s).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(t)&&t.length===1){const s=this._searchKey(o,t);s>=0&&this._focus(s);return}super._onKeyDown(e)}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const t=this.items[e];this.items.forEach(o=>{o.tabIndex=o===t?0:-1})}_focus(e){this.items.forEach((t,o)=>{t.focused=o===e}),this._setFocusable(e),this._scrollToItem(e),super._focus(e)}_scrollToItem(e){const t=this.items[e];if(!t)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),r=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect();let a=0;!this._isRTL&&r[o[1]]>=s[o[1]]||this._isRTL&&r[o[1]]<=s[o[1]]?a=r[o[1]]-s[o[1]]:(!this._isRTL&&n[o[0]]<=s[o[0]]||this._isRTL&&n[o[0]]>=s[o[0]])&&(a=n[o[0]]-s[o[0]]),this._scroll(a)}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else{const t=this.getAttribute("dir")||"ltr",o=Ym(this._scrollerElement,t)+e;Gm(this._scrollerElement,t,o)}}};/**
|
|
7357
7351
|
* @license
|
|
7358
7352
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7359
7353
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7360
|
-
*/class
|
|
7354
|
+
*/class Jm extends Xm(N(oe(Ie(k)))){static get is(){return"vaadin-select-list-box"}static get template(){return E`
|
|
7361
7355
|
<style>
|
|
7362
7356
|
:host {
|
|
7363
7357
|
display: flex;
|
|
@@ -7377,15 +7371,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7377
7371
|
<div part="items">
|
|
7378
7372
|
<slot></slot>
|
|
7379
7373
|
</div>
|
|
7380
|
-
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}
|
|
7374
|
+
`}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}D(Jm);/**
|
|
7381
7375
|
* @license
|
|
7382
7376
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7383
7377
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7384
|
-
*/const
|
|
7378
|
+
*/const Qm=i=>class extends gs(vs(oe(i))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,t){if(e&&t){const o="--vaadin-select-overlay-width",s=getComputedStyle(t).getPropertyValue(o);s===""?this.style.removeProperty(o):this.style.setProperty(o,s)}}};/**
|
|
7385
7379
|
* @license
|
|
7386
7380
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7387
7381
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7388
|
-
*/const
|
|
7382
|
+
*/const Zm=m`
|
|
7389
7383
|
:host {
|
|
7390
7384
|
align-items: flex-start;
|
|
7391
7385
|
justify-content: flex-start;
|
|
@@ -7400,18 +7394,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7400
7394
|
outline: 3px solid;
|
|
7401
7395
|
}
|
|
7402
7396
|
}
|
|
7403
|
-
`;b("vaadin-select-overlay",[
|
|
7397
|
+
`;b("vaadin-select-overlay",[ms,Zm],{moduleId:"vaadin-select-overlay-styles"});class ef extends Qm(N(k)){static get is(){return"vaadin-select-overlay"}static get template(){return E`
|
|
7404
7398
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
7405
7399
|
<div part="overlay" id="overlay" tabindex="0">
|
|
7406
7400
|
<div part="content" id="content">
|
|
7407
7401
|
<slot></slot>
|
|
7408
7402
|
</div>
|
|
7409
7403
|
</div>
|
|
7410
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const e=this._getMenuElement();this.owner._assignMenuElement(e)}}}
|
|
7404
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const e=this._getMenuElement();this.owner._assignMenuElement(e)}}}D(ef);/**
|
|
7411
7405
|
* @license
|
|
7412
7406
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7413
7407
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7414
|
-
*/const
|
|
7408
|
+
*/const tf=m`
|
|
7415
7409
|
:host {
|
|
7416
7410
|
display: inline-block;
|
|
7417
7411
|
position: relative;
|
|
@@ -7457,17 +7451,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7457
7451
|
* @license
|
|
7458
7452
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7459
7453
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7460
|
-
*/b("vaadin-select-value-button",
|
|
7454
|
+
*/b("vaadin-select-value-button",tf,{moduleId:"vaadin-select-value-button-styles"});class of extends bs(N(k)){static get is(){return"vaadin-select-value-button"}static get template(){return E`
|
|
7461
7455
|
<div class="vaadin-button-container">
|
|
7462
7456
|
<span part="label">
|
|
7463
7457
|
<slot></slot>
|
|
7464
7458
|
</span>
|
|
7465
7459
|
</div>
|
|
7466
|
-
`}}
|
|
7460
|
+
`}}D(of);/**
|
|
7467
7461
|
* @license
|
|
7468
7462
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
7469
7463
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7470
|
-
*/const
|
|
7464
|
+
*/const sf=m`
|
|
7471
7465
|
.sr-only {
|
|
7472
7466
|
border: 0 !important;
|
|
7473
7467
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -7485,15 +7479,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7485
7479
|
* @license
|
|
7486
7480
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7487
7481
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7488
|
-
*/class
|
|
7482
|
+
*/class rf extends ce{constructor(e){super(e,"value","vaadin-select-value-button",{initializer:(t,o)=>{o._setFocusElement(t),o.ariaTarget=t,o.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}/**
|
|
7489
7483
|
* @license
|
|
7490
7484
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7491
7485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7492
|
-
*/const
|
|
7486
|
+
*/const nf=i=>class extends Ci(gi(as(Me(bi(i))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${fi()}`,this._srLabelController=new ma(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new rf(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Is(this._phoneMediaQuery,e=>{this._phone=e})),this._tooltipController=new Ve(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate()}__itemsChanged(e,t){(e||t)&&this.requestContentUpdate()}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e)}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),e.addEventListener("click",t=>{const o=t.composedPath().find(s=>s._hasVaadinItemMixin);this.__dispatchChangePending=!!(o&&o.value!==void 0&&o.value!==this.value),this.opened=!1},!0),this.__lastMenuElement=e)}__initMenuItems(e){e.items&&(this._items=e.items)}_valueChanged(e,t){this.toggleAttribute("has-value",!!e),t!==void 0&&!this.__dispatchChangePending&&this.validate()}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(e){e.preventDefault()}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const t=this._menuElement.selected,o=t!==void 0?t:-1,s=this._menuElement._searchKey(o,e.key);s>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=s)}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1)}_openedChanged(e,t,o){if(!(!t||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),t.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const s=this.hasAttribute("focus-ring");this._openedWithFocusRing=s,s&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e}}_updateAriaExpanded(e,t){t&&t.setAttribute("aria-expanded",e?"true":"false")}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(e){let t;const o=e.getAttribute("label");o?t=this.__createItemElement({label:o}):t=e.cloneNode(!0),t._sourceItem=e,this.__appendValueItemElement(t,this.focusElement),t.selected=!0}__createItemElement(e){const t=document.createElement(e.component||"vaadin-select-item");return e.label&&(t.textContent=e.label),e.value&&(t.value=e.value),e.disabled&&(t.disabled=e.disabled),e.className&&(t.className=e.className),t}__appendValueItemElement(e,t){t.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId)}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e)}_setCustomAriaLabelledBy(e){const t=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(t,!0)}_getLabelIdWithItemId(e){const t=this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:"";return e?`${e} ${t}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const t=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(t))this.__attachSelectedItem(t);else if(this.placeholder){const s=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(s,e),e.setAttribute("placeholder","")}!this._valueChanging&&t&&(this._selectedChanging=!0,this.value=t.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=t||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};Gt(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(e){if(!e)return!1;const t=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return t||o}_updateSelectedItem(e,t){if(t){const o=e==null?e:e.toString();this._menuElement.selected=t.reduce((s,r,n)=>s===void 0&&r.value===o?n:s,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(e,t){if(!this.items||this.items.length===0){e.textContent="";return}let o=e.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),e.appendChild(o)),o.textContent="",this.items.forEach(s=>{o.appendChild(this.__createItemElement(s))})}__dispatchChange(){return Jt(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1})}};/**
|
|
7493
7487
|
* @license
|
|
7494
7488
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7495
7489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7496
|
-
*/b("vaadin-select",[
|
|
7490
|
+
*/b("vaadin-select",[Na,La,sf],{moduleId:"vaadin-select-styles"});class af extends nf(pe(N(k))){static get is(){return"vaadin-select"}static get template(){return E`
|
|
7497
7491
|
<style>
|
|
7498
7492
|
:host {
|
|
7499
7493
|
position: relative;
|
|
@@ -7546,4 +7540,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7546
7540
|
<div class="sr-only">
|
|
7547
7541
|
<slot name="sr-label"></slot>
|
|
7548
7542
|
</div>
|
|
7549
|
-
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Ps(this)}_rendererChanged(e,t){t&&(t.renderer=e||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}O(tf);function of(i){h.append_styles(i,"svelte-1lo5ai1",".BonusesWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 10px);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, 10px)}.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, 10px);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))}.BonusesCalendarFilter:disabled{background-image:none;background-color:var(--emw--button-disabled-text-color, #cccccc);color:var(--emw--button-disabled-text-color, #666);cursor:not-allowed;opacity:0.7;pointer-events:none;border:2px solid var(--emw--button-disabled-border-color, #aaaaaa)}.BonusesGrid{display:grid;grid-template-columns:1fr 1fr;gap:50px;border-radius:var(--emw--border-radius-large, 10px)}.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 dn(i,e,t){const o=i.slice();return o[56]=e[t],o[58]=t,o}function hn(i,e,t){const o=i.slice();return o[59]=e[t],o}function sf(i){let e,t,o,s=i[24]("titleBonusesHistory")+"",r,n,a,l,d,u,c=i[24]("dateFrom")+"",p,_,v,x,g,y,P=i[24]("dateTo")+"",V,C,w,D,B,T=i[24]("dateFilter")+"",K,_e,Be,oe,Fe,Ae,ot,J=i[25]&&rf(i);function st(z,F){return z[20].length===0?af:nf}let Ee=st(i),U=Ee(i),$=i[20].length!==0&&un(i);return{c(){e=h.element("div"),J&&J.c(),t=h.space(),o=h.element("h2"),r=h.text(s),n=h.space(),a=h.element("div"),l=h.element("div"),d=h.element("div"),u=h.element("label"),p=h.text(c),_=h.space(),v=h.element("vaadin-date-picker"),x=h.space(),g=h.element("div"),y=h.element("label"),V=h.text(P),C=h.space(),w=h.element("vaadin-date-picker"),D=h.space(),B=h.element("button"),K=h.text(T),Be=h.space(),oe=h.element("div"),U.c(),Fe=h.space(),$&&$.c(),h.attr(o,"class","BonusesTitle "+(i[25]?"BonusesTitleNone":"")),h.attr(o,"part","BonusesTitle "+(i[25]?"BonusesTitleNone":"")),h.attr(u,"for","BonusCalendarStartDate"),h.set_custom_element_data(v,"max",i[26]),h.set_custom_element_data(v,"value",i[12]),h.set_custom_element_data(v,"placeholder",i[12]),h.set_custom_element_data(v,"class","VaadinDatePicker"),h.attr(d,"class","BonusesCalendarStartDate "+(i[25]?"BonusesCalendarMobile":"")),h.attr(y,"for","BonusesCalendarEndDate"),h.set_custom_element_data(w,"max",i[26]),h.set_custom_element_data(w,"min",i[27]),h.set_custom_element_data(w,"value",i[13]),h.set_custom_element_data(w,"placeholder",i[13]),h.set_custom_element_data(w,"class","VaadinDatePicker"),h.attr(g,"class","BonusesCalendarEndDate "+(i[25]?"BonusesCalendarMobile":"")),h.attr(l,"class","BonusesCalendarContainer "+(i[25]?"BonusesCalendarContainerMobile":"")),h.attr(B,"class","BonusesCalendarFilter "+(i[25]?"BonusesCalendarFilterMobile":"")),B.disabled=_e=!i[14],h.attr(a,"class","BonusCalendarWrapper "+(i[25]?"BonusCalendarWrapperMobile":"")),h.attr(oe,"class","BonusesGrid "+(i[25]?"BonusesGridMobile":"")),h.attr(e,"class","BonusesWrapper "+(i[25]?"BonusesWrapperMobile":""))},m(z,F){h.insert(z,e,F),J&&J.m(e,null),h.append(e,t),h.append(e,o),h.append(o,r),h.append(e,n),h.append(e,a),h.append(a,l),h.append(l,d),h.append(d,u),h.append(u,p),h.append(d,_),h.append(d,v),i[35](v),h.append(l,x),h.append(l,g),h.append(g,y),h.append(y,V),h.append(g,C),h.append(g,w),i[36](w),h.append(a,D),h.append(a,B),h.append(B,K),h.append(e,Be),h.append(e,oe),U.m(oe,null),h.append(e,Fe),$&&$.m(e,null),Ae||(ot=h.listen(B,"click",i[37]),Ae=!0)},p(z,F){z[25]&&J.p(z,F),F[0]&16777216&&s!==(s=z[24]("titleBonusesHistory")+"")&&h.set_data(r,s),F[0]&16777216&&c!==(c=z[24]("dateFrom")+"")&&h.set_data(p,c),F[0]&4096&&h.set_custom_element_data(v,"value",z[12]),F[0]&4096&&h.set_custom_element_data(v,"placeholder",z[12]),F[0]&16777216&&P!==(P=z[24]("dateTo")+"")&&h.set_data(V,P),F[0]&8192&&h.set_custom_element_data(w,"value",z[13]),F[0]&8192&&h.set_custom_element_data(w,"placeholder",z[13]),F[0]&16777216&&T!==(T=z[24]("dateFilter")+"")&&h.set_data(K,T),F[0]&16384&&_e!==(_e=!z[14])&&(B.disabled=_e),Ee===(Ee=st(z))&&U?U.p(z,F):(U.d(1),U=Ee(z),U&&(U.c(),U.m(oe,null))),z[20].length!==0?$?$.p(z,F):($=un(z),$.c(),$.m(e,null)):$&&($.d(1),$=null)},d(z){z&&h.detach(e),J&&J.d(),i[35](null),i[36](null),U.d(),$&&$.d(),Ae=!1,ot()}}}function rf(i){let e,t,o,s,r,n,a,l,d,u,c=i[24]("titleBonusesHistory")+"",p,_,v;return{c(){e=h.element("div"),t=h.svg_element("svg"),o=h.svg_element("defs"),s=h.svg_element("style"),r=h.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),n=h.svg_element("g"),a=h.svg_element("g"),l=h.svg_element("path"),d=h.space(),u=h.element("h2"),p=h.text(c),h.attr(l,"class","aaa"),h.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"),h.attr(l,"transform","translate(15 15) rotate(180)"),h.attr(a,"transform","translate(20 158)"),h.attr(n,"transform","translate(-20 -158)"),h.attr(t,"xmlns","http://www.w3.org/2000/svg"),h.attr(t,"width","15"),h.attr(t,"height","15"),h.attr(t,"viewBox","0 0 15 15"),h.attr(u,"class","BonusesTitleMobile"),h.attr(e,"class","MenuReturnButton")},m(x,g){h.insert(x,e,g),h.append(e,t),h.append(t,o),h.append(o,s),h.append(s,r),h.append(t,n),h.append(n,a),h.append(a,l),h.append(e,d),h.append(e,u),h.append(u,p),_||(v=h.listen(e,"click",i[34]),_=!0)},p(x,g){g[0]&16777216&&c!==(c=x[24]("titleBonusesHistory")+"")&&h.set_data(p,c)},d(x){x&&h.detach(e),_=!1,v()}}}function nf(i){let e,t=h.ensure_array_like(i[20]),o=[];for(let s=0;s<t.length;s+=1)o[s]=cn(hn(i,t,s));return{c(){for(let s=0;s<o.length;s+=1)o[s].c();e=h.empty()},m(s,r){for(let n=0;n<o.length;n+=1)o[n]&&o[n].m(s,r);h.insert(s,e,r)},p(s,r){if(r[0]&15729055){t=h.ensure_array_like(s[20]);let n;for(n=0;n<t.length;n+=1){const a=hn(s,t,n);o[n]?o[n].p(a,r):(o[n]=cn(a),o[n].c(),o[n].m(e.parentNode,e))}for(;n<o.length;n+=1)o[n].d(1);o.length=t.length}},d(s){s&&h.detach(e),h.destroy_each(o,s)}}}function af(i){let e,t=i[24]("noBonusHistory")+"",o;return{c(){e=h.element("p"),o=h.text(t)},m(s,r){h.insert(s,e,r),h.append(e,o)},p(s,r){r[0]&16777216&&t!==(t=s[24]("noBonusHistory")+"")&&h.set_data(o,t)},d(s){s&&h.detach(e)}}}function lf(i){let e,t,o,s,r,n,a,l,d,u;return{c(){e=h.element("player-bonus-card"),h.set_custom_element_data(e,"termsandconditionsdescription",i[23]),h.set_custom_element_data(e,"termsandconditionsurl",i[21]),h.set_custom_element_data(e,"termsandconditionsasset",i[22]),h.set_custom_element_data(e,"bonuswalletid",t=i[59].walletId),h.set_custom_element_data(e,"bonusdate",o=i[59].granted),h.set_custom_element_data(e,"bonusstatus",s=i[59].status),h.set_custom_element_data(e,"bonusname",r=i[59].name),h.set_custom_element_data(e,"bonustype",n=i[59].type),h.set_custom_element_data(e,"bonusamount",a=i[59].extension.grantedPlayerCurrencyAmount),h.set_custom_element_data(e,"bonuswageringamount",l=`${i[59].fulfilledWR} / ${i[59].originalWageringRequirement}`),h.set_custom_element_data(e,"bonusremainingamount",d=i[59].currentAmount),h.set_custom_element_data(e,"bonuscurrency",u=i[59].currency),h.set_custom_element_data(e,"lang",i[0]),h.set_custom_element_data(e,"clientstyling",i[1]),h.set_custom_element_data(e,"clientstylingurl",i[2]),h.set_custom_element_data(e,"mbsource",i[3]),h.set_custom_element_data(e,"translationurl",i[4]),h.set_custom_element_data(e,"currencylocale",i[7]),h.set_custom_element_data(e,"dateformat",i[8])},m(c,p){h.insert(c,e,p)},p(c,p){p[0]&8388608&&h.set_custom_element_data(e,"termsandconditionsdescription",c[23]),p[0]&2097152&&h.set_custom_element_data(e,"termsandconditionsurl",c[21]),p[0]&4194304&&h.set_custom_element_data(e,"termsandconditionsasset",c[22]),p[0]&1048576&&t!==(t=c[59].walletId)&&h.set_custom_element_data(e,"bonuswalletid",t),p[0]&1048576&&o!==(o=c[59].granted)&&h.set_custom_element_data(e,"bonusdate",o),p[0]&1048576&&s!==(s=c[59].status)&&h.set_custom_element_data(e,"bonusstatus",s),p[0]&1048576&&r!==(r=c[59].name)&&h.set_custom_element_data(e,"bonusname",r),p[0]&1048576&&n!==(n=c[59].type)&&h.set_custom_element_data(e,"bonustype",n),p[0]&1048576&&a!==(a=c[59].extension.grantedPlayerCurrencyAmount)&&h.set_custom_element_data(e,"bonusamount",a),p[0]&1048576&&l!==(l=`${c[59].fulfilledWR} / ${c[59].originalWageringRequirement}`)&&h.set_custom_element_data(e,"bonuswageringamount",l),p[0]&1048576&&d!==(d=c[59].currentAmount)&&h.set_custom_element_data(e,"bonusremainingamount",d),p[0]&1048576&&u!==(u=c[59].currency)&&h.set_custom_element_data(e,"bonuscurrency",u),p[0]&1&&h.set_custom_element_data(e,"lang",c[0]),p[0]&2&&h.set_custom_element_data(e,"clientstyling",c[1]),p[0]&4&&h.set_custom_element_data(e,"clientstylingurl",c[2]),p[0]&8&&h.set_custom_element_data(e,"mbsource",c[3]),p[0]&16&&h.set_custom_element_data(e,"translationurl",c[4]),p[0]&128&&h.set_custom_element_data(e,"currencylocale",c[7]),p[0]&256&&h.set_custom_element_data(e,"dateformat",c[8])},d(c){c&&h.detach(e)}}}function df(i){let e,t,o,s,r,n,a;return{c(){e=h.element("player-bonus-card"),h.set_custom_element_data(e,"termsandconditionsdescription",i[23]),h.set_custom_element_data(e,"termsandconditionsurl",i[21]),h.set_custom_element_data(e,"termsandconditionsasset",i[22]),h.set_custom_element_data(e,"bonuswalletid",t=i[59].walletId),h.set_custom_element_data(e,"bonusdate",o=i[59].granted),h.set_custom_element_data(e,"bonusstatus",s=i[59].status),h.set_custom_element_data(e,"bonusname",r=i[59].name),h.set_custom_element_data(e,"bonustype",n=i[59].type),h.set_custom_element_data(e,"bonuscurrency",a=i[59].currency),h.set_custom_element_data(e,"lang",i[0]),h.set_custom_element_data(e,"clientstyling",i[1]),h.set_custom_element_data(e,"clientstylingurl",i[2]),h.set_custom_element_data(e,"mbsource",i[3]),h.set_custom_element_data(e,"translationurl",i[4]),h.set_custom_element_data(e,"currencylocale",i[7]),h.set_custom_element_data(e,"dateformat",i[8])},m(l,d){h.insert(l,e,d)},p(l,d){d[0]&8388608&&h.set_custom_element_data(e,"termsandconditionsdescription",l[23]),d[0]&2097152&&h.set_custom_element_data(e,"termsandconditionsurl",l[21]),d[0]&4194304&&h.set_custom_element_data(e,"termsandconditionsasset",l[22]),d[0]&1048576&&t!==(t=l[59].walletId)&&h.set_custom_element_data(e,"bonuswalletid",t),d[0]&1048576&&o!==(o=l[59].granted)&&h.set_custom_element_data(e,"bonusdate",o),d[0]&1048576&&s!==(s=l[59].status)&&h.set_custom_element_data(e,"bonusstatus",s),d[0]&1048576&&r!==(r=l[59].name)&&h.set_custom_element_data(e,"bonusname",r),d[0]&1048576&&n!==(n=l[59].type)&&h.set_custom_element_data(e,"bonustype",n),d[0]&1048576&&a!==(a=l[59].currency)&&h.set_custom_element_data(e,"bonuscurrency",a),d[0]&1&&h.set_custom_element_data(e,"lang",l[0]),d[0]&2&&h.set_custom_element_data(e,"clientstyling",l[1]),d[0]&4&&h.set_custom_element_data(e,"clientstylingurl",l[2]),d[0]&8&&h.set_custom_element_data(e,"mbsource",l[3]),d[0]&16&&h.set_custom_element_data(e,"translationurl",l[4]),d[0]&128&&h.set_custom_element_data(e,"currencylocale",l[7]),d[0]&256&&h.set_custom_element_data(e,"dateformat",l[8])},d(l){l&&h.detach(e)}}}function cn(i){let e;function t(r,n){return r[59].type==="freeRound"?df:lf}let o=t(i),s=o(i);return{c(){s.c(),e=h.empty()},m(r,n){s.m(r,n),h.insert(r,e,n)},p(r,n){o===(o=t(r))&&s?s.p(r,n):(s.d(1),s=o(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&h.detach(e),s.d(r)}}}function un(i){let e,t,o,s,r,n,a,l,d,u,c,p,_,v,x,g,y,P,V,C=h.ensure_array_like(Array(i[18])),w=[];for(let D=0;D<C.length;D+=1)w[D]=pn(dn(i,C,D));return{c(){e=h.element("div"),t=h.element("span"),o=h.text("|<"),r=h.space(),n=h.element("span"),a=h.text("<"),d=h.space();for(let D=0;D<w.length;D+=1)w[D].c();u=h.space(),c=h.element("span"),p=h.text(">"),v=h.space(),x=h.element("span"),g=h.text(">|"),h.attr(t,"class",s="BonusesFirst "+(i[19]===0?"Inactive":"")),h.attr(n,"class",l="BonusesPrev "+(i[19]===0?"Inactive":"")),h.attr(c,"class",_="BonusesNext "+(i[19]===i[18]-1?"Inactive":"")),h.attr(x,"class",y="BonusesLast "+(i[19]===i[18]-1?"Inactive":"")),h.attr(e,"class","BonusesPaginationWrapper "+(i[25]?"BonusesPaginationWrapperMobile":""))},m(D,B){h.insert(D,e,B),h.append(e,t),h.append(t,o),h.append(e,r),h.append(e,n),h.append(n,a),h.append(e,d);for(let T=0;T<w.length;T+=1)w[T]&&w[T].m(e,null);h.append(e,u),h.append(e,c),h.append(c,p),h.append(e,v),h.append(e,x),h.append(x,g),P||(V=[h.listen(t,"click",i[38]),h.listen(n,"click",i[39]),h.listen(c,"click",i[41]),h.listen(x,"click",i[42])],P=!0)},p(D,B){if(B[0]&524288&&s!==(s="BonusesFirst "+(D[19]===0?"Inactive":""))&&h.attr(t,"class",s),B[0]&524288&&l!==(l="BonusesPrev "+(D[19]===0?"Inactive":""))&&h.attr(n,"class",l),B[0]&537657440){C=h.ensure_array_like(Array(D[18]));let T;for(T=0;T<C.length;T+=1){const K=dn(D,C,T);w[T]?w[T].p(K,B):(w[T]=pn(K),w[T].c(),w[T].m(e,u))}for(;T<w.length;T+=1)w[T].d(1);w.length=C.length}B[0]&786432&&_!==(_="BonusesNext "+(D[19]===D[18]-1?"Inactive":""))&&h.attr(c,"class",_),B[0]&786432&&y!==(y="BonusesLast "+(D[19]===D[18]-1?"Inactive":""))&&h.attr(x,"class",y)},d(D){D&&h.detach(e),h.destroy_each(w,D),P=!1,h.run_all(V)}}}function pn(i){let e,t=i[58]+1+"",o,s,r,n;function a(){return i[40](i[58])}return{c(){e=h.element("span"),o=h.text(t),h.attr(e,"class",s="BonusesPage "+(i[58]===i[19]?"BonusPageActive":""))},m(l,d){h.insert(l,e,d),h.append(e,o),r||(n=h.listen(e,"click",a),r=!0)},p(l,d){i=l,d[0]&524288&&s!==(s="BonusesPage "+(i[58]===i[19]?"BonusPageActive":""))&&h.attr(e,"class",s)},d(l){l&&h.detach(e),r=!1,n()}}}function hf(i){let e;function t(r,n){return sf}let s=t()(i);return{c(){e=h.element("div"),s.c()},m(r,n){h.insert(r,e,n),s.m(e,null),i[43](e)},p(r,n){s.p(r,n)},i:h.noop,o:h.noop,d(r){r&&h.detach(e),s.d(),i[43](null)}}}let re=6;function cf(i,e,t){let o;h.component_subscribe(i,h.$format,f=>t(24,o=f));let{endpoint:s=""}=e,{session:r=""}=e,{playerid:n=""}=e,{lang:a="en"}=e,{clientstyling:l=""}=e,{clientstylingurl:d=""}=e,{mbsource:u}=e,{translationurl:c=""}=e,{bonushistorystatus:p=""}=e,{bonushistorytype:_=""}=e,{currencylocale:v=""}=e,{currency:x=""}=e,{dateformat:g="dd-MM-yyyy"}=e,y,P=window.navigator.userAgent,V=h.getDevice(P)!=="PC",C,w;const D=h.format(new Date,"yyyy-MM-dd"),B=h.format(h.subMonths(new Date,3),"yyyy-MM-dd");let T=h.format(h.subMonths(new Date,3),`${g||"yyyy-MM-dd"}`),K=h.format(new Date,`${g||"yyyy-MM-dd"}`),_e=!0,Be=0,oe=0,Fe=0,Ae=0,ot=0,J=[],st="",Ee="",U="";const $=()=>{fetch(c).then(M=>M.json()).then(M=>{Object.keys(M).forEach(ee=>{Qs(ee,M[ee])})}).catch(M=>{console.log(M)})};Object.keys(Zs).forEach(f=>{Qs(f,Zs[f])});const z=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:V},window.location.href)},F=(f,M)=>{const ee=h.parse(f,`${g||"yyyy-MM-dd"}`,new Date),ke=M?h.endOfDay(ee):h.startOfDay(ee);return h.format(ke,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")},me=(f,M,ee)=>{let ke=new URL(`${s}/v1/player/${n}/bonusWallet`),zt=F(T,!1),Ol=F(K,!0),Se="",js="",Ys="";M&&(js=M.split(",").map(fe=>`status=${fe}`).join(","),Se=Se+js+","),ee&&(Ys=ee.split(",").map(fe=>`type=${fe}`).join(","),Se=Se+Ys+","),Se=Se+`granted=[${zt}~${Ol}]`,ke.searchParams.append("filter",Se),ke.searchParams.append("pagination",`offset=${f},limit=${re}`);let zl={method:"GET",headers:{"X-SessionId":r}};fetch(ke.href,zl).then(j=>j.json()).then(j=>{Array.isArray(j.items)&&j.items.forEach(q=>{var Gs,Ks;const fe=(Ks=(Gs=q==null?void 0:q.extension)==null?void 0:Gs.bonus)==null?void 0:Ks.presentation;fe&&(t(21,st=fe.url),t(23,U=fe.description),t(22,Ee=fe.assets))}),t(18,Ae=Math.ceil(j.total/re)),f-re>=0&&t(15,Be=f-re),f+re<j.total&&t(16,oe=f+re),t(17,Fe=(Ae-1)*re),t(19,ot=f/re),t(20,J=(j==null?void 0:j.items)||[]),v&&J.forEach(q=>{q.fulfilledWR=Ot(q.fulfilledWR),q.originalWageringRequirement=Ot(q.originalWageringRequirement),q.currentAmount=Ot(q.currentAmount),q.extension.grantedPlayerCurrencyAmount=Ot(q.extension.grantedPlayerCurrencyAmount)})},j=>{console.error(j)}),window.postMessage({type:"ScrollToTop"},window.location.href)},Ot=f=>new Intl.NumberFormat(v,{style:"currency",currency:x}).format(f).replace(/\s/g,""),$s=f=>{t(12,T=h.format(new Date(f.target.value),`${g||"yyyy-MM-dd"}`))},qs=f=>{t(13,K=h.format(new Date(f.target.value),`${g||"yyyy-MM-dd"}`))},bl=()=>{const f=new Date(T),M=new Date(K);f.getTime()>M.getTime()?t(14,_e=!1):t(14,_e=!0)},yl=()=>{C.addEventListener("change",$s,!1),w.addEventListener("change",qs,!1)},Ws=f=>{const{year:M,month:ee,day:ke}=f,zt=new Date(M,ee,ke);return h.format(zt,g||"yyyy-MM-dd")},Us=f=>{const M=h.parse(f,g||"yyyy-MM-dd",new Date);return{year:M.getFullYear(),month:M.getMonth(),day:M.getDate()}};h.onMount(()=>(t(10,C.i18n=Di(Ti({},C.i18n),{formatDate:Ws,parseDate:Us}),C),t(11,w.i18n=Di(Ti({},w.i18n),{formatDate:Ws,parseDate:Us}),w),()=>{C.removeEventListener("change",$s),w.removeEventListener("change",qs)}));const xl=()=>{Fl(a)},wl=()=>z();function Cl(f){h.binding_callbacks[f?"unshift":"push"](()=>{C=f,t(10,C)})}function Il(f){h.binding_callbacks[f?"unshift":"push"](()=>{w=f,t(11,w)})}const Al=()=>me(0,p,_),El=()=>me(0,p,_),kl=()=>me(Be,p,_),Sl=f=>me(f*re,p,_),Pl=()=>me(oe,p,_),Tl=()=>me(Fe,p,_);function Dl(f){h.binding_callbacks[f?"unshift":"push"](()=>{y=f,t(9,y)})}return i.$$set=f=>{"endpoint"in f&&t(30,s=f.endpoint),"session"in f&&t(31,r=f.session),"playerid"in f&&t(32,n=f.playerid),"lang"in f&&t(0,a=f.lang),"clientstyling"in f&&t(1,l=f.clientstyling),"clientstylingurl"in f&&t(2,d=f.clientstylingurl),"mbsource"in f&&t(3,u=f.mbsource),"translationurl"in f&&t(4,c=f.translationurl),"bonushistorystatus"in f&&t(5,p=f.bonushistorystatus),"bonushistorytype"in f&&t(6,_=f.bonushistorytype),"currencylocale"in f&&t(7,v=f.currencylocale),"currency"in f&&t(33,x=f.currency),"dateformat"in f&&t(8,g=f.dateformat)},i.$$.update=()=>{i.$$.dirty[0]&1&&a&&xl(),i.$$.dirty[0]&3072&&C&&w&&yl(),i.$$.dirty[0]&12288&&T&&K&&bl(),i.$$.dirty[0]&1073741920|i.$$.dirty[1]&3&&r&&n&&s&&me(0,p,_),i.$$.dirty[0]&514&&l&&y&&h.setClientStyling(y,l),i.$$.dirty[0]&516&&d&&y&&h.setClientStylingURL(y,d),i.$$.dirty[0]&520&&u&&y&&h.setStreamStyling(y,`${u}.Style`),i.$$.dirty[0]&16&&c&&$()},[a,l,d,u,c,p,_,v,g,y,C,w,T,K,_e,Be,oe,Fe,Ae,ot,J,st,Ee,U,o,V,D,B,z,me,s,r,n,x,wl,Cl,Il,Al,El,kl,Sl,Pl,Tl,Dl]}class gl extends h.SvelteComponent{constructor(e){super(),h.init(this,e,cf,hf,h.safe_not_equal,{endpoint:30,session:31,playerid:32,lang:0,clientstyling:1,clientstylingurl:2,mbsource:3,translationurl:4,bonushistorystatus:5,bonushistorytype:6,currencylocale:7,currency:33,dateformat:8},of,[-1,-1])}get endpoint(){return this.$$.ctx[30]}set endpoint(e){this.$$set({endpoint:e}),h.flush()}get session(){return this.$$.ctx[31]}set session(e){this.$$set({session:e}),h.flush()}get playerid(){return this.$$.ctx[32]}set playerid(e){this.$$set({playerid:e}),h.flush()}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),h.flush()}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),h.flush()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),h.flush()}get mbsource(){return this.$$.ctx[3]}set mbsource(e){this.$$set({mbsource:e}),h.flush()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),h.flush()}get bonushistorystatus(){return this.$$.ctx[5]}set bonushistorystatus(e){this.$$set({bonushistorystatus:e}),h.flush()}get bonushistorytype(){return this.$$.ctx[6]}set bonushistorytype(e){this.$$set({bonushistorytype:e}),h.flush()}get currencylocale(){return this.$$.ctx[7]}set currencylocale(e){this.$$set({currencylocale:e}),h.flush()}get currency(){return this.$$.ctx[33]}set currency(e){this.$$set({currency:e}),h.flush()}get dateformat(){return this.$$.ctx[8]}set dateformat(e){this.$$set({dateformat:e}),h.flush()}}h.create_custom_element(gl,{endpoint:{},session:{},playerid:{},lang:{},clientstyling:{},clientstylingurl:{},mbsource:{},translationurl:{},bonushistorystatus:{},bonushistorytype:{},currencylocale:{},currency:{},dateformat:{}},[],[],!0);exports.default=gl;
|
|
7543
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Ps(this)}_rendererChanged(e,t){t&&(t.renderer=e||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}D(af);function lf(i){h.append_styles(i,"svelte-1lo5ai1",".BonusesWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 10px);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, 10px)}.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, 10px);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))}.BonusesCalendarFilter:disabled{background-image:none;background-color:var(--emw--button-disabled-text-color, #cccccc);color:var(--emw--button-disabled-text-color, #666);cursor:not-allowed;opacity:0.7;pointer-events:none;border:2px solid var(--emw--button-disabled-border-color, #aaaaaa)}.BonusesGrid{display:grid;grid-template-columns:1fr 1fr;gap:50px;border-radius:var(--emw--border-radius-large, 10px)}.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 dn(i,e,t){const o=i.slice();return o[56]=e[t],o[58]=t,o}function hn(i,e,t){const o=i.slice();return o[59]=e[t],o}function df(i){let e,t,o,s=i[24]("titleBonusesHistory")+"",r,n,a,l,d,u,c=i[24]("dateFrom")+"",p,_,v,x,g,y,S=i[24]("dateTo")+"",L,C,w,T,B,P=i[24]("dateFilter")+"",K,me,Fe,se,Re,Ee,st,Q=i[25]&&hf(i);function rt(O,F){return O[20].length===0?uf:cf}let ke=rt(i),U=ke(i),q=i[20].length!==0&&un(i);return{c(){e=h.element("div"),Q&&Q.c(),t=h.space(),o=h.element("h2"),r=h.text(s),n=h.space(),a=h.element("div"),l=h.element("div"),d=h.element("div"),u=h.element("label"),p=h.text(c),_=h.space(),v=h.element("vaadin-date-picker"),x=h.space(),g=h.element("div"),y=h.element("label"),L=h.text(S),C=h.space(),w=h.element("vaadin-date-picker"),T=h.space(),B=h.element("button"),K=h.text(P),Fe=h.space(),se=h.element("div"),U.c(),Re=h.space(),q&&q.c(),h.attr(o,"class","BonusesTitle "+(i[25]?"BonusesTitleNone":"")),h.attr(o,"part","BonusesTitle "+(i[25]?"BonusesTitleNone":"")),h.attr(u,"for","BonusCalendarStartDate"),h.set_custom_element_data(v,"max",i[26]),h.set_custom_element_data(v,"value",i[12]),h.set_custom_element_data(v,"placeholder",i[12]),h.set_custom_element_data(v,"class","VaadinDatePicker"),h.attr(d,"class","BonusesCalendarStartDate "+(i[25]?"BonusesCalendarMobile":"")),h.attr(y,"for","BonusesCalendarEndDate"),h.set_custom_element_data(w,"max",i[26]),h.set_custom_element_data(w,"min",i[27]),h.set_custom_element_data(w,"value",i[13]),h.set_custom_element_data(w,"placeholder",i[13]),h.set_custom_element_data(w,"class","VaadinDatePicker"),h.attr(g,"class","BonusesCalendarEndDate "+(i[25]?"BonusesCalendarMobile":"")),h.attr(l,"class","BonusesCalendarContainer "+(i[25]?"BonusesCalendarContainerMobile":"")),h.attr(B,"class","BonusesCalendarFilter "+(i[25]?"BonusesCalendarFilterMobile":"")),B.disabled=me=!i[14],h.attr(a,"class","BonusCalendarWrapper "+(i[25]?"BonusCalendarWrapperMobile":"")),h.attr(se,"class","BonusesGrid "+(i[25]?"BonusesGridMobile":"")),h.attr(e,"class","BonusesWrapper "+(i[25]?"BonusesWrapperMobile":""))},m(O,F){h.insert(O,e,F),Q&&Q.m(e,null),h.append(e,t),h.append(e,o),h.append(o,r),h.append(e,n),h.append(e,a),h.append(a,l),h.append(l,d),h.append(d,u),h.append(u,p),h.append(d,_),h.append(d,v),i[35](v),h.append(l,x),h.append(l,g),h.append(g,y),h.append(y,L),h.append(g,C),h.append(g,w),i[36](w),h.append(a,T),h.append(a,B),h.append(B,K),h.append(e,Fe),h.append(e,se),U.m(se,null),h.append(e,Re),q&&q.m(e,null),Ee||(st=h.listen(B,"click",i[37]),Ee=!0)},p(O,F){O[25]&&Q.p(O,F),F[0]&16777216&&s!==(s=O[24]("titleBonusesHistory")+"")&&h.set_data(r,s),F[0]&16777216&&c!==(c=O[24]("dateFrom")+"")&&h.set_data(p,c),F[0]&4096&&h.set_custom_element_data(v,"value",O[12]),F[0]&4096&&h.set_custom_element_data(v,"placeholder",O[12]),F[0]&16777216&&S!==(S=O[24]("dateTo")+"")&&h.set_data(L,S),F[0]&8192&&h.set_custom_element_data(w,"value",O[13]),F[0]&8192&&h.set_custom_element_data(w,"placeholder",O[13]),F[0]&16777216&&P!==(P=O[24]("dateFilter")+"")&&h.set_data(K,P),F[0]&16384&&me!==(me=!O[14])&&(B.disabled=me),ke===(ke=rt(O))&&U?U.p(O,F):(U.d(1),U=ke(O),U&&(U.c(),U.m(se,null))),O[20].length!==0?q?q.p(O,F):(q=un(O),q.c(),q.m(e,null)):q&&(q.d(1),q=null)},d(O){O&&h.detach(e),Q&&Q.d(),i[35](null),i[36](null),U.d(),q&&q.d(),Ee=!1,st()}}}function hf(i){let e,t,o,s,r,n,a,l,d,u,c=i[24]("titleBonusesHistory")+"",p,_,v;return{c(){e=h.element("div"),t=h.svg_element("svg"),o=h.svg_element("defs"),s=h.svg_element("style"),r=h.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),n=h.svg_element("g"),a=h.svg_element("g"),l=h.svg_element("path"),d=h.space(),u=h.element("h2"),p=h.text(c),h.attr(l,"class","aaa"),h.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"),h.attr(l,"transform","translate(15 15) rotate(180)"),h.attr(a,"transform","translate(20 158)"),h.attr(n,"transform","translate(-20 -158)"),h.attr(t,"xmlns","http://www.w3.org/2000/svg"),h.attr(t,"width","15"),h.attr(t,"height","15"),h.attr(t,"viewBox","0 0 15 15"),h.attr(u,"class","BonusesTitleMobile"),h.attr(e,"class","MenuReturnButton")},m(x,g){h.insert(x,e,g),h.append(e,t),h.append(t,o),h.append(o,s),h.append(s,r),h.append(t,n),h.append(n,a),h.append(a,l),h.append(e,d),h.append(e,u),h.append(u,p),_||(v=h.listen(e,"click",i[34]),_=!0)},p(x,g){g[0]&16777216&&c!==(c=x[24]("titleBonusesHistory")+"")&&h.set_data(p,c)},d(x){x&&h.detach(e),_=!1,v()}}}function cf(i){let e,t=h.ensure_array_like(i[20]),o=[];for(let s=0;s<t.length;s+=1)o[s]=cn(hn(i,t,s));return{c(){for(let s=0;s<o.length;s+=1)o[s].c();e=h.empty()},m(s,r){for(let n=0;n<o.length;n+=1)o[n]&&o[n].m(s,r);h.insert(s,e,r)},p(s,r){if(r[0]&15729055){t=h.ensure_array_like(s[20]);let n;for(n=0;n<t.length;n+=1){const a=hn(s,t,n);o[n]?o[n].p(a,r):(o[n]=cn(a),o[n].c(),o[n].m(e.parentNode,e))}for(;n<o.length;n+=1)o[n].d(1);o.length=t.length}},d(s){s&&h.detach(e),h.destroy_each(o,s)}}}function uf(i){let e,t=i[24]("noBonusHistory")+"",o;return{c(){e=h.element("p"),o=h.text(t)},m(s,r){h.insert(s,e,r),h.append(e,o)},p(s,r){r[0]&16777216&&t!==(t=s[24]("noBonusHistory")+"")&&h.set_data(o,t)},d(s){s&&h.detach(e)}}}function pf(i){let e,t,o,s,r,n,a,l,d,u;return{c(){e=h.element("player-bonus-card"),h.set_custom_element_data(e,"termsandconditionsdescription",i[23]),h.set_custom_element_data(e,"termsandconditionsurl",i[21]),h.set_custom_element_data(e,"termsandconditionsasset",i[22]),h.set_custom_element_data(e,"bonuswalletid",t=i[59].walletId),h.set_custom_element_data(e,"bonusdate",o=i[59].granted),h.set_custom_element_data(e,"bonusstatus",s=i[59].status),h.set_custom_element_data(e,"bonusname",r=i[59].name),h.set_custom_element_data(e,"bonustype",n=i[59].type),h.set_custom_element_data(e,"bonusamount",a=i[59].extension.grantedPlayerCurrencyAmount),h.set_custom_element_data(e,"bonuswageringamount",l=`${i[59].fulfilledWR} / ${i[59].originalWageringRequirement}`),h.set_custom_element_data(e,"bonusremainingamount",d=i[59].currentAmount),h.set_custom_element_data(e,"bonuscurrency",u=i[59].currency),h.set_custom_element_data(e,"lang",i[0]),h.set_custom_element_data(e,"clientstyling",i[1]),h.set_custom_element_data(e,"clientstylingurl",i[2]),h.set_custom_element_data(e,"mbsource",i[3]),h.set_custom_element_data(e,"translationurl",i[4]),h.set_custom_element_data(e,"currencylocale",i[7]),h.set_custom_element_data(e,"dateformat",i[8])},m(c,p){h.insert(c,e,p)},p(c,p){p[0]&8388608&&h.set_custom_element_data(e,"termsandconditionsdescription",c[23]),p[0]&2097152&&h.set_custom_element_data(e,"termsandconditionsurl",c[21]),p[0]&4194304&&h.set_custom_element_data(e,"termsandconditionsasset",c[22]),p[0]&1048576&&t!==(t=c[59].walletId)&&h.set_custom_element_data(e,"bonuswalletid",t),p[0]&1048576&&o!==(o=c[59].granted)&&h.set_custom_element_data(e,"bonusdate",o),p[0]&1048576&&s!==(s=c[59].status)&&h.set_custom_element_data(e,"bonusstatus",s),p[0]&1048576&&r!==(r=c[59].name)&&h.set_custom_element_data(e,"bonusname",r),p[0]&1048576&&n!==(n=c[59].type)&&h.set_custom_element_data(e,"bonustype",n),p[0]&1048576&&a!==(a=c[59].extension.grantedPlayerCurrencyAmount)&&h.set_custom_element_data(e,"bonusamount",a),p[0]&1048576&&l!==(l=`${c[59].fulfilledWR} / ${c[59].originalWageringRequirement}`)&&h.set_custom_element_data(e,"bonuswageringamount",l),p[0]&1048576&&d!==(d=c[59].currentAmount)&&h.set_custom_element_data(e,"bonusremainingamount",d),p[0]&1048576&&u!==(u=c[59].currency)&&h.set_custom_element_data(e,"bonuscurrency",u),p[0]&1&&h.set_custom_element_data(e,"lang",c[0]),p[0]&2&&h.set_custom_element_data(e,"clientstyling",c[1]),p[0]&4&&h.set_custom_element_data(e,"clientstylingurl",c[2]),p[0]&8&&h.set_custom_element_data(e,"mbsource",c[3]),p[0]&16&&h.set_custom_element_data(e,"translationurl",c[4]),p[0]&128&&h.set_custom_element_data(e,"currencylocale",c[7]),p[0]&256&&h.set_custom_element_data(e,"dateformat",c[8])},d(c){c&&h.detach(e)}}}function _f(i){let e,t,o,s,r,n,a;return{c(){e=h.element("player-bonus-card"),h.set_custom_element_data(e,"termsandconditionsdescription",i[23]),h.set_custom_element_data(e,"termsandconditionsurl",i[21]),h.set_custom_element_data(e,"termsandconditionsasset",i[22]),h.set_custom_element_data(e,"bonuswalletid",t=i[59].walletId),h.set_custom_element_data(e,"bonusdate",o=i[59].granted),h.set_custom_element_data(e,"bonusstatus",s=i[59].status),h.set_custom_element_data(e,"bonusname",r=i[59].name),h.set_custom_element_data(e,"bonustype",n=i[59].type),h.set_custom_element_data(e,"bonuscurrency",a=i[59].currency),h.set_custom_element_data(e,"lang",i[0]),h.set_custom_element_data(e,"clientstyling",i[1]),h.set_custom_element_data(e,"clientstylingurl",i[2]),h.set_custom_element_data(e,"mbsource",i[3]),h.set_custom_element_data(e,"translationurl",i[4]),h.set_custom_element_data(e,"currencylocale",i[7]),h.set_custom_element_data(e,"dateformat",i[8])},m(l,d){h.insert(l,e,d)},p(l,d){d[0]&8388608&&h.set_custom_element_data(e,"termsandconditionsdescription",l[23]),d[0]&2097152&&h.set_custom_element_data(e,"termsandconditionsurl",l[21]),d[0]&4194304&&h.set_custom_element_data(e,"termsandconditionsasset",l[22]),d[0]&1048576&&t!==(t=l[59].walletId)&&h.set_custom_element_data(e,"bonuswalletid",t),d[0]&1048576&&o!==(o=l[59].granted)&&h.set_custom_element_data(e,"bonusdate",o),d[0]&1048576&&s!==(s=l[59].status)&&h.set_custom_element_data(e,"bonusstatus",s),d[0]&1048576&&r!==(r=l[59].name)&&h.set_custom_element_data(e,"bonusname",r),d[0]&1048576&&n!==(n=l[59].type)&&h.set_custom_element_data(e,"bonustype",n),d[0]&1048576&&a!==(a=l[59].currency)&&h.set_custom_element_data(e,"bonuscurrency",a),d[0]&1&&h.set_custom_element_data(e,"lang",l[0]),d[0]&2&&h.set_custom_element_data(e,"clientstyling",l[1]),d[0]&4&&h.set_custom_element_data(e,"clientstylingurl",l[2]),d[0]&8&&h.set_custom_element_data(e,"mbsource",l[3]),d[0]&16&&h.set_custom_element_data(e,"translationurl",l[4]),d[0]&128&&h.set_custom_element_data(e,"currencylocale",l[7]),d[0]&256&&h.set_custom_element_data(e,"dateformat",l[8])},d(l){l&&h.detach(e)}}}function cn(i){let e;function t(r,n){return r[59].type==="freeRound"?_f:pf}let o=t(i),s=o(i);return{c(){s.c(),e=h.empty()},m(r,n){s.m(r,n),h.insert(r,e,n)},p(r,n){o===(o=t(r))&&s?s.p(r,n):(s.d(1),s=o(r),s&&(s.c(),s.m(e.parentNode,e)))},d(r){r&&h.detach(e),s.d(r)}}}function un(i){let e,t,o,s,r,n,a,l,d,u,c,p,_,v,x,g,y,S,L,C=h.ensure_array_like(Array(i[18])),w=[];for(let T=0;T<C.length;T+=1)w[T]=pn(dn(i,C,T));return{c(){e=h.element("div"),t=h.element("span"),o=h.text("|<"),r=h.space(),n=h.element("span"),a=h.text("<"),d=h.space();for(let T=0;T<w.length;T+=1)w[T].c();u=h.space(),c=h.element("span"),p=h.text(">"),v=h.space(),x=h.element("span"),g=h.text(">|"),h.attr(t,"class",s="BonusesFirst "+(i[19]===0?"Inactive":"")),h.attr(n,"class",l="BonusesPrev "+(i[19]===0?"Inactive":"")),h.attr(c,"class",_="BonusesNext "+(i[19]===i[18]-1?"Inactive":"")),h.attr(x,"class",y="BonusesLast "+(i[19]===i[18]-1?"Inactive":"")),h.attr(e,"class","BonusesPaginationWrapper "+(i[25]?"BonusesPaginationWrapperMobile":""))},m(T,B){h.insert(T,e,B),h.append(e,t),h.append(t,o),h.append(e,r),h.append(e,n),h.append(n,a),h.append(e,d);for(let P=0;P<w.length;P+=1)w[P]&&w[P].m(e,null);h.append(e,u),h.append(e,c),h.append(c,p),h.append(e,v),h.append(e,x),h.append(x,g),S||(L=[h.listen(t,"click",i[38]),h.listen(n,"click",i[39]),h.listen(c,"click",i[41]),h.listen(x,"click",i[42])],S=!0)},p(T,B){if(B[0]&524288&&s!==(s="BonusesFirst "+(T[19]===0?"Inactive":""))&&h.attr(t,"class",s),B[0]&524288&&l!==(l="BonusesPrev "+(T[19]===0?"Inactive":""))&&h.attr(n,"class",l),B[0]&537657440){C=h.ensure_array_like(Array(T[18]));let P;for(P=0;P<C.length;P+=1){const K=dn(T,C,P);w[P]?w[P].p(K,B):(w[P]=pn(K),w[P].c(),w[P].m(e,u))}for(;P<w.length;P+=1)w[P].d(1);w.length=C.length}B[0]&786432&&_!==(_="BonusesNext "+(T[19]===T[18]-1?"Inactive":""))&&h.attr(c,"class",_),B[0]&786432&&y!==(y="BonusesLast "+(T[19]===T[18]-1?"Inactive":""))&&h.attr(x,"class",y)},d(T){T&&h.detach(e),h.destroy_each(w,T),S=!1,h.run_all(L)}}}function pn(i){let e,t=i[58]+1+"",o,s,r,n;function a(){return i[40](i[58])}return{c(){e=h.element("span"),o=h.text(t),h.attr(e,"class",s="BonusesPage "+(i[58]===i[19]?"BonusPageActive":""))},m(l,d){h.insert(l,e,d),h.append(e,o),r||(n=h.listen(e,"click",a),r=!0)},p(l,d){i=l,d[0]&524288&&s!==(s="BonusesPage "+(i[58]===i[19]?"BonusPageActive":""))&&h.attr(e,"class",s)},d(l){l&&h.detach(e),r=!1,n()}}}function mf(i){let e;function t(r,n){return df}let s=t()(i);return{c(){e=h.element("div"),s.c()},m(r,n){h.insert(r,e,n),s.m(e,null),i[43](e)},p(r,n){s.p(r,n)},i:h.noop,o:h.noop,d(r){r&&h.detach(e),s.d(),i[43](null)}}}let ne=6;function ff(i,e,t){let o;h.component_subscribe(i,h.$format,f=>t(24,o=f));let{endpoint:s=""}=e,{session:r=""}=e,{playerid:n=""}=e,{lang:a="en"}=e,{clientstyling:l=""}=e,{clientstylingurl:d=""}=e,{mbsource:u}=e,{translationurl:c=""}=e,{bonushistorystatus:p=""}=e,{bonushistorytype:_=""}=e,{currencylocale:v=""}=e,{currency:x=""}=e,{dateformat:g="dd-MM-yyyy"}=e,y,S=window.navigator.userAgent,L=h.getDevice(S)!=="PC",C,w;const T=h.format(new Date,"yyyy-MM-dd"),B=h.format(h.subMonths(new Date,3),"yyyy-MM-dd");let P=h.format(h.subMonths(new Date,3),`${g||"yyyy-MM-dd"}`),K=h.format(new Date,`${g||"yyyy-MM-dd"}`),me=!0,Fe=0,se=0,Re=0,Ee=0,st=0,Q=[],rt="",ke="",U="";const q=()=>{fetch(c).then(V=>V.json()).then(V=>{Object.keys(V).forEach(te=>{Qs(te,V[te])})}).catch(V=>{console.log(V)})};Object.keys(Zs).forEach(f=>{Qs(f,Zs[f])});const O=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:L},window.location.href)},F=(f,V)=>{const te=h.parse(f,`${g||"yyyy-MM-dd"}`,new Date),Se=V?h.endOfDay(te):h.startOfDay(te);return h.format(Se,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")},fe=(f,V,te)=>{let Se=new URL(`${s}/v1/player/${n}/bonusWallet`),Nt=F(P,!1),Nl=F(K,!0),Pe="",js="",Ys="";V&&(js=V.split(",").map(ve=>`status=${ve}`).join(","),Pe=Pe+js+","),te&&(Ys=te.split(",").map(ve=>`type=${ve}`).join(","),Pe=Pe+Ys+","),Pe=Pe+`granted=[${Nt}~${Nl}]`,Se.searchParams.append("filter",Pe),Se.searchParams.append("pagination",`offset=${f},limit=${ne}`);let Ll={method:"GET",headers:{"X-SessionId":r}};fetch(Se.href,Ll).then(j=>j.json()).then(j=>{Array.isArray(j.items)&&j.items.forEach($=>{var Gs,Ks;const ve=(Ks=(Gs=$==null?void 0:$.extension)==null?void 0:Gs.bonus)==null?void 0:Ks.presentation;ve&&(t(21,rt=ve.url),t(23,U=ve.description),t(22,ke=ve.assets))}),t(18,Ee=Math.ceil(j.total/ne)),f-ne>=0&&t(15,Fe=f-ne),f+ne<j.total&&t(16,se=f+ne),t(17,Re=(Ee-1)*ne),t(19,st=f/ne),t(20,Q=(j==null?void 0:j.items)||[]),v&&Q.forEach($=>{$.fulfilledWR=zt($.fulfilledWR),$.originalWageringRequirement=zt($.originalWageringRequirement),$.currentAmount=zt($.currentAmount),$.extension.grantedPlayerCurrencyAmount=zt($.extension.grantedPlayerCurrencyAmount)})},j=>{console.error(j)}),window.postMessage({type:"ScrollToTop"},window.location.href)},zt=f=>new Intl.NumberFormat(v,{style:"currency",currency:x}).format(f).replace(/\s/g,""),qs=f=>{t(12,P=h.format(new Date(f.target.value),`${g||"yyyy-MM-dd"}`))},$s=f=>{t(13,K=h.format(new Date(f.target.value),`${g||"yyyy-MM-dd"}`))},xl=()=>{const f=new Date(P),V=new Date(K);f.getTime()>V.getTime()?t(14,me=!1):t(14,me=!0)},wl=()=>{C.addEventListener("change",qs,!1),w.addEventListener("change",$s,!1)},Ws=f=>{const{year:V,month:te,day:Se}=f,Nt=new Date(V,te,Se);return h.format(Nt,g||"yyyy-MM-dd")},Us=f=>{const V=h.parse(f,g||"yyyy-MM-dd",new Date);return{year:V.getFullYear(),month:V.getMonth(),day:V.getDate()}};h.onMount(()=>(t(10,C.i18n=Oi(Di({},C.i18n),{formatDate:Ws,parseDate:Us}),C),t(11,w.i18n=Oi(Di({},w.i18n),{formatDate:Ws,parseDate:Us}),w),()=>{C.removeEventListener("change",qs),w.removeEventListener("change",$s)}));const Cl=()=>{Hl(a)},Il=()=>O();function Al(f){h.binding_callbacks[f?"unshift":"push"](()=>{C=f,t(10,C)})}function El(f){h.binding_callbacks[f?"unshift":"push"](()=>{w=f,t(11,w)})}const kl=()=>fe(0,p,_),Sl=()=>fe(0,p,_),Pl=()=>fe(Fe,p,_),Tl=f=>fe(f*ne,p,_),Dl=()=>fe(se,p,_),Ol=()=>fe(Re,p,_);function zl(f){h.binding_callbacks[f?"unshift":"push"](()=>{y=f,t(9,y)})}return i.$$set=f=>{"endpoint"in f&&t(30,s=f.endpoint),"session"in f&&t(31,r=f.session),"playerid"in f&&t(32,n=f.playerid),"lang"in f&&t(0,a=f.lang),"clientstyling"in f&&t(1,l=f.clientstyling),"clientstylingurl"in f&&t(2,d=f.clientstylingurl),"mbsource"in f&&t(3,u=f.mbsource),"translationurl"in f&&t(4,c=f.translationurl),"bonushistorystatus"in f&&t(5,p=f.bonushistorystatus),"bonushistorytype"in f&&t(6,_=f.bonushistorytype),"currencylocale"in f&&t(7,v=f.currencylocale),"currency"in f&&t(33,x=f.currency),"dateformat"in f&&t(8,g=f.dateformat)},i.$$.update=()=>{i.$$.dirty[0]&1&&a&&Cl(),i.$$.dirty[0]&3072&&C&&w&&wl(),i.$$.dirty[0]&12288&&P&&K&&xl(),i.$$.dirty[0]&1073741920|i.$$.dirty[1]&3&&r&&n&&s&&fe(0,p,_),i.$$.dirty[0]&514&&l&&y&&h.setClientStyling(y,l),i.$$.dirty[0]&516&&d&&y&&h.setClientStylingURL(y,d),i.$$.dirty[0]&520&&u&&y&&h.setStreamStyling(y,`${u}.Style`),i.$$.dirty[0]&16&&c&&q()},[a,l,d,u,c,p,_,v,g,y,C,w,P,K,me,Fe,se,Re,Ee,st,Q,rt,ke,U,o,L,T,B,O,fe,s,r,n,x,Il,Al,El,kl,Sl,Pl,Tl,Dl,Ol,zl]}class yl extends h.SvelteComponent{constructor(e){super(),h.init(this,e,ff,mf,h.safe_not_equal,{endpoint:30,session:31,playerid:32,lang:0,clientstyling:1,clientstylingurl:2,mbsource:3,translationurl:4,bonushistorystatus:5,bonushistorytype:6,currencylocale:7,currency:33,dateformat:8},lf,[-1,-1])}get endpoint(){return this.$$.ctx[30]}set endpoint(e){this.$$set({endpoint:e}),h.flush()}get session(){return this.$$.ctx[31]}set session(e){this.$$set({session:e}),h.flush()}get playerid(){return this.$$.ctx[32]}set playerid(e){this.$$set({playerid:e}),h.flush()}get lang(){return this.$$.ctx[0]}set lang(e){this.$$set({lang:e}),h.flush()}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),h.flush()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),h.flush()}get mbsource(){return this.$$.ctx[3]}set mbsource(e){this.$$set({mbsource:e}),h.flush()}get translationurl(){return this.$$.ctx[4]}set translationurl(e){this.$$set({translationurl:e}),h.flush()}get bonushistorystatus(){return this.$$.ctx[5]}set bonushistorystatus(e){this.$$set({bonushistorystatus:e}),h.flush()}get bonushistorytype(){return this.$$.ctx[6]}set bonushistorytype(e){this.$$set({bonushistorytype:e}),h.flush()}get currencylocale(){return this.$$.ctx[7]}set currencylocale(e){this.$$set({currencylocale:e}),h.flush()}get currency(){return this.$$.ctx[33]}set currency(e){this.$$set({currency:e}),h.flush()}get dateformat(){return this.$$.ctx[8]}set dateformat(e){this.$$set({dateformat:e}),h.flush()}}h.create_custom_element(yl,{endpoint:{},session:{},playerid:{},lang:{},clientstyling:{},clientstylingurl:{},mbsource:{},translationurl:{},bonushistorystatus:{},bonushistorytype:{},currencylocale:{},currency:{},dateformat:{}},[],[],!0);exports.default=yl;
|