@everymatrix/lottery-ticket-controller 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/dist/cjs/helper-accordion_5.cjs.entry.js +388 -394
- package/dist/esm/helper-accordion_5.entry.js +388 -394
- package/dist/lottery-ticket-controller/helper-accordion_5.entry.js +107 -112
- package/package.json +1 -1
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.stories.js +0 -82
- package/dist/types/components/lottery-ticket-controller/lottery-ticket-controller.stories.d.ts +0 -5
|
@@ -455,33 +455,33 @@ const getTranslations$1 = (data) => {
|
|
|
455
455
|
});
|
|
456
456
|
};
|
|
457
457
|
|
|
458
|
-
var
|
|
458
|
+
var Sa=Object.defineProperty,ka=Object.defineProperties;var Ta=Object.getOwnPropertyDescriptors;var _o=Object.getOwnPropertySymbols;var Pa=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable;var ti=(s,t,e)=>t in s?Sa(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,H=(s,t)=>{for(var e in t||(t={}))Pa.call(t,e)&&ti(s,e,t[e]);if(_o)for(var e of _o(t))Oa.call(t,e)&&ti(s,e,t[e]);return s},ze=(s,t)=>ka(s,Ta(t));var v=(s,t,e)=>(ti(s,typeof t!="symbol"?t+"":t,e),e);var Me=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
|
|
459
459
|
* @license
|
|
460
460
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
461
461
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
462
|
-
*/function
|
|
462
|
+
*/function x(s,t="24.5.12"){Object.defineProperty(s,"version",{get(){return t}});const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
463
463
|
* @license
|
|
464
464
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
465
465
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
466
|
-
*/let
|
|
466
|
+
*/let Da=class extends HTMLElement{static get is(){return "vaadin-lumo-styles"}};x(Da);/**
|
|
467
467
|
* @license
|
|
468
468
|
* Copyright 2019 Google LLC
|
|
469
469
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
470
|
-
*/const
|
|
470
|
+
*/const bt=globalThis,us=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ps=Symbol(),mo=new WeakMap;let Lt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ps)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const e=this.t;if(us&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mo.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mo.set(e,t));}return t}toString(){return this.cssText}};const za=s=>new Lt(typeof s=="string"?s:s+"",void 0,ps),p=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(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.")})(o)+s[r+1],s[0]);return new Lt(e,s,ps)},_s=(s,t)=>{if(us)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=bt.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i);}},fo=us?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return za(e)})(s):s;/**
|
|
471
471
|
* @license
|
|
472
472
|
* Copyright 2017 Google LLC
|
|
473
473
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
474
|
-
*/const{is:
|
|
474
|
+
*/const{is:Ma,defineProperty:Na,getOwnPropertyDescriptor:La,getOwnPropertyNames:Va,getOwnPropertySymbols:Fa,getPrototypeOf:Ba}=Object,Z=globalThis,vo=Z.trustedTypes,Ra=vo?vo.emptyScript:"",ii=Z.reactiveElementPolyfillSupport,Ue=(s,t)=>s,Pi={toAttribute(s,t){switch(t){case Boolean:s=s?Ra:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s);}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s);}catch(i){e=null;}}return e}},xr=(s,t)=>!Ma(s,t),go={attribute:!0,type:String,converter:Pi,reflect:!1,useDefault:!1,hasChanged:xr};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Z.litPropertyMetadata)!=null||(Z.litPropertyMetadata=new WeakMap);class be extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=go){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Na(this.prototype,t,o);}}static getPropertyDescriptor(t,e,i){var n;const{get:o,set:r}=(n=La(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get:o,set(a){const l=o==null?void 0:o.call(this);r==null||r.call(this,a),this.requestUpdate(t,l,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return (e=this.elementProperties.get(t))!=null?e:go}static _$Ei(){if(this.hasOwnProperty(Ue("elementProperties")))return;const t=Ba(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(Ue("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ue("properties"))){const e=this.properties,i=[...Va(e),...Fa(e)];for(const o of i)this.createProperty(o,e[o]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(fo(o));}else t!==void 0&&e.push(fo(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this));}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t));}removeController(t){var e;(e=this._$EO)==null||e.delete(t);}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){var e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return _s(t,this.constructor.elementStyles),t}connectedCallback(){var e;(this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostConnected)==null?void 0:o.call(i)});}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return (i=e.hostDisconnected)==null?void 0:i.call(e)});}attributeChangedCallback(t,e,i){this._$AK(t,i);}_$ET(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Pi).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null;}}_$AK(t,e){var r,n,a,l;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const d=i.getPropertyOptions(o),h=typeof d.converter=="function"?{fromAttribute:d.converter}:((r=d.converter)==null?void 0:r.fromAttribute)!==void 0?d.converter:Pi;this._$Em=o,this[o]=(l=(a=h.fromAttribute(e,d.type))!=null?a:(n=this._$Ej)==null?void 0:n.get(o))!=null?l:null,this._$Em=null;}}requestUpdate(t,e,i){var o,r;if(t!==void 0){const n=this.constructor,a=this[t];if(i!=null||(i=n.getPropertyOptions(t)),!(((o=i.hasChanged)!=null?o:xr)(a,e)||i.useDefault&&i.reflect&&a===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$EP());}C(t,e,{useDefault:i,reflect:o,wrapped:r},n){var a,l,d;i&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(l=n!=null?n:e)!=null?l:this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&((d=this._$Eq)!=null?d:this._$Eq=new Set).add(t));}_$EP(){return Me(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES;}catch(e){Promise.reject(e);}const t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0;}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r){const{wrapped:l}=a,d=this[n];l!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,a,d);}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EM();}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM();}updated(t){}firstUpdated(t){}}var fr;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[Ue("elementProperties")]=new Map,be[Ue("finalized")]=new Map,ii==null||ii({ReactiveElement:be}),((fr=Z.reactiveElementVersions)!=null?fr:Z.reactiveElementVersions=[]).push("2.1.0");/**
|
|
475
475
|
* @license
|
|
476
476
|
* Copyright 2017 Google LLC
|
|
477
477
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
478
|
-
*/const
|
|
479
|
-
\f\r]`,
|
|
480
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,
|
|
478
|
+
*/const We=globalThis,It=We.trustedTypes,bo=It?It.createPolicy("lit-html",{createHTML:s=>s}):void 0,Cr="$lit$",Q=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Q,$a=`<${wr}>`,ue=document,Ye=()=>ue.createComment(""),Ge=s=>s===null||typeof s!="object"&&typeof s!="function",ms=Array.isArray,Ha=s=>ms(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",si=`[
|
|
479
|
+
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yo=/-->/g,xo=/>/g,ae=RegExp(`>|${si}(?:([^\\s"'>=/]+)(${si}*=${si}*(?:[^
|
|
480
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,Ie=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),Io=new WeakMap,le=ue.createTreeWalker(ue,129);function Ar(s,t){if(!ms(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const qa=(s,t)=>{const e=s.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",n=Ne;for(let a=0;a<e;a++){const l=s[a];let d,h,c=-1,u=0;for(;u<l.length&&(n.lastIndex=u,h=n.exec(l),h!==null);)u=n.lastIndex,n===Ne?h[1]==="!--"?n=yo:h[1]!==void 0?n=xo:h[2]!==void 0?(Ir.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=ae):h[3]!==void 0&&(n=ae):n===ae?h[0]===">"?(n=o!=null?o:Ne,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?ae:h[3]==='"'?wo:Co):n===wo||n===Co?n=ae:n===yo||n===xo?n=Ne:(n=ae,o=void 0);const _=n===ae&&s[a+1].startsWith("/>")?" ":"";r+=n===Ne?l+$a:c>=0?(i.push(d),l.slice(0,c)+Cr+l.slice(c)+Q+_):l+Q+(c===-2?a:_);}return [Ar(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ke{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=qa(t,e);if(this.el=Ke.createElement(d,i),le.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(o=le.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(Cr)){const u=h[n++],_=o.getAttribute(c).split(Q),m=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:m[2],strings:_,ctor:m[1]==="."?Wa:m[1]==="?"?ja:m[1]==="@"?Ya:Vt}),o.removeAttribute(c);}else c.startsWith(Q)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(Ir.test(o.tagName)){const c=o.textContent.split(Q),u=c.length-1;if(u>0){o.textContent=It?It.emptyScript:"";for(let _=0;_<u;_++)o.append(c[_],Ye()),le.nextNode(),l.push({type:2,index:++r});o.append(c[u],Ye());}}}else if(o.nodeType===8)if(o.data===wr)l.push({type:2,index:r});else {let c=-1;for(;(c=o.data.indexOf(Q,c+1))!==-1;)l.push({type:7,index:r}),c+=Q.length-1;}r++;}}static createElement(t,e){const i=ue.createElement("template");return i.innerHTML=t,i}}function Ae(s,t,e=s,i){var n,a,l;if(t===Ie)return t;let o=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Ge(t)?void 0:t._$litDirective$;return (o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(s),o._$AT(s,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=o:e._$Cl=o),o!==void 0&&(t=Ae(s,o._$AS(s,t.values),o,i)),t}class Ua{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var d;const{el:{content:e},parts:i}=this._$AD,o=((d=t==null?void 0:t.creationScope)!=null?d:ue).importNode(e,!0);le.currentNode=o;let r=le.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new nt(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Ga(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=le.nextNode(),n++);}return le.currentNode=ue,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++;}}class nt{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,o){var r;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(r=o==null?void 0:o.isConnected)!=null?r:!0;}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ae(this,t,e),Ge(t)?t===T||t==null||t===""?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==Ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ha(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==T&&Ge(this._$AH)?this._$AA.nextSibling.data=t:this.T(ue.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ke.createElement(Ar(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else {const n=new Ua(o,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=Io.get(t.strings);return e===void 0&&Io.set(t.strings,e=new Ke(t)),e}k(t){ms(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new nt(this.O(Ye()),this.O(Ye()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o);}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class Vt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T;}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(r===void 0)t=Ae(this,t,e,0),n=!Ge(t)||t!==this._$AH&&t!==Ie,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Ae(this,a[i+l],e,l),d===Ie&&(d=this._$AH[l]),n||(n=!Ge(d)||d!==this._$AH[l]),d===T?t=T:t!==T&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!o&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class Wa extends Vt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class ja extends Vt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class Ya extends Vt{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=Ae(this,t,e,0))!=null?n:T)===Ie)return;const i=this._$AH,o=t===T&&i!==T||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==T&&(i===T||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)==null?void 0:e.host)!=null?i:this.element,t):this._$AH.handleEvent(t);}}class Ga{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i;}get _$AU(){return this._$AM._$AU}_$AI(t){Ae(this,t);}}const oi=We.litHtmlPolyfillSupport;var vr;oi==null||oi(Ke,nt),((vr=We.litHtmlVersions)!=null?vr:We.litHtmlVersions=[]).push("3.3.0");const Er=(s,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let o=i._$litPart$;if(o===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=o=new nt(t.insertBefore(Ye(),a),a,void 0,e!=null?e:{});}return o._$AI(s),o};/**
|
|
481
481
|
* @license
|
|
482
482
|
* Copyright 2017 Google LLC
|
|
483
483
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
484
|
-
*/const
|
|
484
|
+
*/const he=globalThis;class ee extends be{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(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Er(e,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1);}render(){return Ie}}var gr;ee._$litElement$=!0,ee.finalized=!0,(gr=he.litElementHydrateSupport)==null||gr.call(he,{LitElement:ee});const ri=he.litElementPolyfillSupport;ri==null||ri({LitElement:ee});var br;((br=he.litElementVersions)!=null?br:he.litElementVersions=[]).push("4.2.0");/**
|
|
485
485
|
* @license
|
|
486
486
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
487
487
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -489,17 +489,17 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
489
489
|
* @license
|
|
490
490
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
491
491
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
492
|
-
*/const kr=[],
|
|
493
|
-
`)}const
|
|
492
|
+
*/const kr=[],Oi=new Set,fs=new Set;function Tr(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Ka(s){return Tr(customElements.get(s))}function Xa(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Pr(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Or(s){return s.map(t=>t.cssText).join(`
|
|
493
|
+
`)}const At="vaadin-themable-mixin-style";function Ja(s,t){const e=document.createElement("style");e.id=At,e.textContent=Or(s),t.content.appendChild(e);}function Qa(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)[...s.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),_s(s.shadowRoot,t.elementStyles);else {const e=s.shadowRoot.getElementById(At),i=t.prototype._template;e.textContent=i.content.getElementById(At).textContent;}}function Za(s){Oi.forEach(t=>{const e=t.deref();e instanceof s?Qa(e):e||Oi.delete(t);});}function Dr(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(At).textContent=Or(s.getStylesForThis());}fs.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Dr(e);});}function el(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function f(s,t,e={}){t=Xa(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):kr.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&fs.forEach(i=>{if(Pr(s,i)&&Ka(i)){const o=customElements.get(i);el(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Dr(o),Za(o);}});}function Di(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():kr}function tl(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function zr(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=Di().find(o=>o.moduleId===e);i?t.push(...zr(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function il(s){const t=`${s}-default-theme`,e=Di().filter(i=>i.moduleId!==t&&Pr(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...zr(i),...i.styles],includePriority:tl(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:Di().filter(i=>i.moduleId===t)}const E=s=>class extends Sr(s){constructor(){super(),Oi.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&fs.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Tr(this)||Ja(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...il(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
494
494
|
* @license
|
|
495
495
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
496
496
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
497
|
-
*/const
|
|
498
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
497
|
+
*/const sl=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
498
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ke=(s,...t)=>{sl(`lumo-${s}`,t);};/**
|
|
499
499
|
* @license
|
|
500
500
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
501
501
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
502
|
-
*/const
|
|
502
|
+
*/const ol=p`
|
|
503
503
|
:host {
|
|
504
504
|
/* Base (background) */
|
|
505
505
|
--lumo-base-color: #fff;
|
|
@@ -584,7 +584,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
584
584
|
--lumo-disabled-text-color: GrayText;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
`;
|
|
587
|
+
`;ke("color-props",ol);const rl=p`
|
|
588
588
|
[theme~='dark'] {
|
|
589
589
|
/* Base (background) */
|
|
590
590
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -702,11 +702,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
702
702
|
pre code {
|
|
703
703
|
background: transparent;
|
|
704
704
|
}
|
|
705
|
-
`;f("",
|
|
705
|
+
`;f("",rl,{moduleId:"lumo-color"});/**
|
|
706
706
|
* @license
|
|
707
707
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
708
708
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
709
|
-
*/const
|
|
709
|
+
*/const nl=p`
|
|
710
710
|
@font-face {
|
|
711
711
|
font-family: 'lumo-icons';
|
|
712
712
|
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==)
|
|
@@ -759,11 +759,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
759
759
|
--lumo-icons-upload: '\\ea29';
|
|
760
760
|
--lumo-icons-user: '\\ea2a';
|
|
761
761
|
}
|
|
762
|
-
`;
|
|
762
|
+
`;ke("font-icons",nl);/**
|
|
763
763
|
* @license
|
|
764
764
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
765
765
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
766
|
-
*/const
|
|
766
|
+
*/const al=p`
|
|
767
767
|
:host {
|
|
768
768
|
--lumo-size-xs: 1.625rem;
|
|
769
769
|
--lumo-size-s: 1.875rem;
|
|
@@ -778,11 +778,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
778
778
|
/* For backwards compatibility */
|
|
779
779
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
780
780
|
}
|
|
781
|
-
`;
|
|
781
|
+
`;ke("sizing-props",al);/**
|
|
782
782
|
* @license
|
|
783
783
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
784
784
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
785
|
-
*/const
|
|
785
|
+
*/const ll=p`
|
|
786
786
|
:host {
|
|
787
787
|
/* Square */
|
|
788
788
|
--lumo-space-xs: 0.25rem;
|
|
@@ -805,11 +805,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
805
805
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
806
806
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
807
807
|
}
|
|
808
|
-
`;
|
|
808
|
+
`;ke("spacing-props",ll);/**
|
|
809
809
|
* @license
|
|
810
810
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
811
811
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
812
|
-
*/const
|
|
812
|
+
*/const dl=p`
|
|
813
813
|
:host {
|
|
814
814
|
/* Border radius */
|
|
815
815
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -909,11 +909,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
909
909
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
910
910
|
--vaadin-input-field-value-font-weight: 500;
|
|
911
911
|
}
|
|
912
|
-
`;
|
|
912
|
+
`;ke("style-props",dl);/**
|
|
913
913
|
* @license
|
|
914
914
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
915
915
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
916
|
-
*/const
|
|
916
|
+
*/const hl=p`
|
|
917
917
|
:host {
|
|
918
918
|
/* prettier-ignore */
|
|
919
919
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -933,7 +933,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
933
933
|
--lumo-line-height-s: 1.375;
|
|
934
934
|
--lumo-line-height-m: 1.625;
|
|
935
935
|
}
|
|
936
|
-
`,
|
|
936
|
+
`,cl=p`
|
|
937
937
|
body,
|
|
938
938
|
:host {
|
|
939
939
|
font-family: var(--lumo-font-family);
|
|
@@ -1025,7 +1025,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
1025
1025
|
border-left: none;
|
|
1026
1026
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
1027
1027
|
}
|
|
1028
|
-
`;f("",
|
|
1028
|
+
`;f("",cl,{moduleId:"lumo-typography"});ke("typography-props",hl);f("vaadin-checkbox",p`
|
|
1029
1029
|
:host {
|
|
1030
1030
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
1031
1031
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -1345,7 +1345,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1345
1345
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1346
1346
|
Code distributed by Google as part of the polymer project is also
|
|
1347
1347
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1348
|
-
*/let
|
|
1348
|
+
*/let ul=/(url\()([^)]*)(\))/g,pl=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,lt,D;function je(s,t){if(s&&pl.test(s)||s==="//")return s;if(lt===void 0){lt=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",lt=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),lt)try{return new URL(s,t).href}catch(e){return s}return D||(D=document.implementation.createHTMLDocument("temp"),D.base=D.createElement("base"),D.head.appendChild(D.base),D.anchor=D.createElement("a"),D.body.appendChild(D.anchor)),D.base.href=t,D.anchor.href=s,D.anchor.href||s}function vs(s,t){return s.replace(ul,function(e,i,o,r){return i+"'"+je(o.replace(/["']/g,""),t)+"'"+r})}function gs(s){return s.substring(0,s.lastIndexOf("/")+1)}/**
|
|
1349
1349
|
@license
|
|
1350
1350
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1351
1351
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1353,7 +1353,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1353
1353
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1354
1354
|
Code distributed by Google as part of the polymer project is also
|
|
1355
1355
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1356
|
-
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const
|
|
1356
|
+
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const _l=Mr&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const s=new CSSStyleSheet;s.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[s],t.shadowRoot.adoptedStyleSheets[0]===s}catch(s){return !1}})();let ml=window.Polymer&&window.Polymer.rootPath||gs(document.baseURI||window.location.href),Et=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let St=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,fl=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Nr=window.Polymer&&window.Polymer.legacyOptimizations||!1,Lr=window.Polymer&&window.Polymer.legacyWarnings||!1,vl=window.Polymer&&window.Polymer.syncInitialRender||!1,zi=window.Polymer&&window.Polymer.legacyUndefined||!1,gl=window.Polymer&&window.Polymer.orderedComputed||!1,Ao=window.Polymer&&window.Polymer.removeNestedTemplates||!1,bl=window.Polymer&&window.Polymer.fastDomIf||!1,Eo=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let yl=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
1357
1357
|
@license
|
|
1358
1358
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1359
1359
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1361,7 +1361,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1361
1361
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1362
1362
|
Code distributed by Google as part of the polymer project is also
|
|
1363
1363
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1364
|
-
*/let
|
|
1364
|
+
*/let xl=0;const S=function(s){let t=s.__mixinApplications;t||(t=new WeakMap,s.__mixinApplications=t);let e=xl++;function i(o){let r=o.__mixinSet;if(r&&r[e])return o;let n=t,a=n.get(o);if(!a){a=s(o),n.set(o,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
|
|
1365
1365
|
@license
|
|
1366
1366
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1367
1367
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1369,7 +1369,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1369
1369
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1370
1370
|
Code distributed by Google as part of the polymer project is also
|
|
1371
1371
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1372
|
-
*/let
|
|
1372
|
+
*/let bs={},Vr={};function So(s,t){bs[s]=Vr[s.toLowerCase()]=t;}function ko(s){return bs[s]||Vr[s.toLowerCase()]}function Cl(s){s.querySelector("style")&&console.warn("dom-module %s has style outside template",s.id);}class Xe extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=ko(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=je(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=gs(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(St&&ko(t)!==void 0)throw So(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,So(t,this),Cl(this);}}}Xe.prototype.modules=bs;customElements.define("dom-module",Xe);/**
|
|
1373
1373
|
@license
|
|
1374
1374
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1375
1375
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1377,7 +1377,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1377
1377
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1378
1378
|
Code distributed by Google as part of the polymer project is also
|
|
1379
1379
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1380
|
-
*/const
|
|
1380
|
+
*/const wl="link[rel=import][type~=css]",Il="include",To="shady-unscoped";function Fr(s){return Xe.import(s)}function Po(s){let t=s.body?s.body:s;const e=vs(t.textContent,s.baseURI),i=document.createElement("style");return i.textContent=e,i}function Al(s){const t=s.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...El(t[i]));return e}function El(s){const t=Fr(s);if(!t)return console.warn("Could not find style data in module named",s),[];if(t._styles===void 0){const e=[];e.push(...Rr(t));const i=t.querySelector("template");i&&e.push(...Br(i,t.assetpath)),t._styles=e;}return t._styles}function Br(s,t){if(!s._styles){const e=[],i=s.content.querySelectorAll("style");for(let o=0;o<i.length;o++){let r=i[o],n=r.getAttribute(Il);n&&e.push(...Al(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=vs(r.textContent,t)),e.push(r);}s._styles=e;}return s._styles}function Sl(s){let t=Fr(s);return t?Rr(t):[]}function Rr(s){const t=[],e=s.querySelectorAll(wl);for(let i=0;i<e.length;i++){let o=e[i];if(o.import){const r=o.import,n=o.hasAttribute(To);if(n&&!r._unscopedStyle){const a=Po(r);a.setAttribute(To,""),r._unscopedStyle=a;}else r._style||(r._style=Po(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
|
|
1381
1381
|
@license
|
|
1382
1382
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1383
1383
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1393,7 +1393,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1393
1393
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1394
1394
|
Code distributed by Google as part of the polymer project is also
|
|
1395
1395
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1396
|
-
*/function
|
|
1396
|
+
*/function Mi(s){return s.indexOf(".")>=0}function pe(s){let t=s.indexOf(".");return t===-1?s:s.slice(0,t)}function $r(s,t){return s.indexOf(t+".")===0}function Je(s,t){return t.indexOf(s+".")===0}function Qe(s,t,e){return t+e.slice(s.length)}function kl(s,t){return s===t||$r(s,t)||Je(s,t)}function Re(s){if(Array.isArray(s)){let t=[];for(let e=0;e<s.length;e++){let i=s[e].toString().split(".");for(let o=0;o<i.length;o++)t.push(i[o]);}return t.join(".")}else return s}function Hr(s){return Array.isArray(s)?Re(s).split("."):s.toString().split(".")}function O(s,t,e){let i=s,o=Hr(t);for(let r=0;r<o.length;r++){if(!i)return;let n=o[r];i=i[n];}return e&&(e.path=o.join(".")),i}function Oo(s,t,e){let i=s,o=Hr(t),r=o[o.length-1];if(o.length>1){for(let n=0;n<o.length-1;n++){let a=o[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return o.join(".")}/**
|
|
1397
1397
|
@license
|
|
1398
1398
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1399
1399
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1401,7 +1401,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1401
1401
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1402
1402
|
Code distributed by Google as part of the polymer project is also
|
|
1403
1403
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1404
|
-
*/const
|
|
1404
|
+
*/const kt={},Tl=/-[a-z]/g,Pl=/([A-Z])/g;function qr(s){return kt[s]||(kt[s]=s.indexOf("-")<0?s:s.replace(Tl,t=>t[1].toUpperCase()))}function Ft(s){return kt[s]||(kt[s]=s.replace(Pl,"-$1").toLowerCase())}/**
|
|
1405
1405
|
@license
|
|
1406
1406
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1407
1407
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1409,7 +1409,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1409
1409
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1410
1410
|
Code distributed by Google as part of the polymer project is also
|
|
1411
1411
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1412
|
-
*/let
|
|
1412
|
+
*/let Ol=0,Ur=0,ye=[],Dl=0,Ni=!1,Wr=document.createTextNode("");new window.MutationObserver(zl).observe(Wr,{characterData:!0});function zl(){Ni=!1;const s=ye.length;for(let t=0;t<s;t++){let e=ye[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}ye.splice(0,s),Ur+=s;}const Ml={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},jr={run(s){return Ni||(Ni=!0,Wr.textContent=Dl++),ye.push(s),Ol++},cancel(s){const t=s-Ur;if(t>=0){if(!ye[t])throw new Error("invalid async handle: "+s);ye[t]=null;}}};/**
|
|
1413
1413
|
@license
|
|
1414
1414
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1415
1415
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1417,7 +1417,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1417
1417
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1418
1418
|
Code distributed by Google as part of the polymer project is also
|
|
1419
1419
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1420
|
-
*/const
|
|
1420
|
+
*/const Nl=jr,Yr=S(s=>{class t extends s{static createProperties(i){const o=this.prototype;for(let r in i)r in o||o._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,o){this._addPropertyToAttributeMap(i),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[i]||(this.__dataHasAccessor[i]=!0,this._definePropertyAccessor(i,o));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let o=this.__dataAttributes[i];return o||(o=this.constructor.attributeNameForProperty(i),this.__dataAttributes[o]=i),o}_definePropertyAccessor(i,o){Object.defineProperty(this,i,{get(){return this.__data[i]},set:o?function(){}:function(r){this._setPendingProperty(i,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 i in this.__dataHasAccessor)this.hasOwnProperty(i)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[i]=this[i],delete this[i]);}_initializeInstanceProperties(i){Object.assign(this,i);}_setProperty(i,o){this._setPendingProperty(i,o)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,o,r){let n=this.__data[i],a=this._shouldPropertyChange(i,o,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=o,this.__dataPending[i]=o),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Nl.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 i=this.__data,o=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,o,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,o,r)),this.__dataCounter--;}_shouldPropertiesChange(i,o,r){return !!o}_propertiesChanged(i,o,r){}_shouldPropertyChange(i,o,r){return r!==o&&(r===r||o===o)}attributeChangedCallback(i,o,r,n){o!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,o,r,n);}_attributeToProperty(i,o,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(o,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,o,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,o||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,o,r){const n=this._serializeValue(o);(r==="class"||r==="name"||r==="slot")&&(i=P(i)),n===void 0?i.removeAttribute(r):i.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n);}_serializeValue(i){switch(typeof i){case"boolean":return i?"":void 0;default:return i!=null?i.toString():void 0}}_deserializeValue(i,o){switch(o){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
|
|
1421
1421
|
@license
|
|
1422
1422
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1423
1423
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1425,7 +1425,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1425
1425
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1426
1426
|
Code distributed by Google as part of the polymer project is also
|
|
1427
1427
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1428
|
-
*/const Gr={};let
|
|
1428
|
+
*/const Gr={};let dt=HTMLElement.prototype;for(;dt;){let s=Object.getOwnPropertyNames(dt);for(let t=0;t<s.length;t++)Gr[s[t]]=!0;dt=Object.getPrototypeOf(dt);}const Ll=window.trustedTypes?s=>trustedTypes.isHTML(s)||trustedTypes.isScript(s)||trustedTypes.isScriptURL(s):()=>!1;function Vl(s,t){if(!Gr[t]){let e=s[t];e!==void 0&&(s.__data?s._setPendingProperty(t,e):(s.__dataProto?s.hasOwnProperty(JSCompiler_renameProperty("__dataProto",s))||(s.__dataProto=Object.create(s.__dataProto)):s.__dataProto={},s.__dataProto[t]=e));}}const Fl=S(s=>{const t=Yr(s);class e extends t{static createPropertiesForAttributes(){let o=this.observedAttributes;for(let r=0;r<o.length;r++)this.prototype._createPropertyAccessor(qr(o[r]));}static attributeNameForProperty(o){return Ft(o)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(o){for(let r in o)this._setProperty(r,o[r]);}_ensureAttribute(o,r){const n=this;n.hasAttribute(o)||this._valueToNodeAttribute(n,r,o);}_serializeValue(o){switch(typeof o){case"object":if(o instanceof Date)return o.toString();if(o){if(Ll(o))return o;try{return JSON.stringify(o)}catch(r){return ""}}default:return super._serializeValue(o)}}_deserializeValue(o,r){let n;switch(r){case Object:try{n=JSON.parse(o);}catch(a){n=o;}break;case Array:try{n=JSON.parse(o);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${o}`);}break;case Date:n=isNaN(o)?String(o):Number(o),n=new Date(n);break;default:n=super._deserializeValue(o,r);break}return n}_definePropertyAccessor(o,r){Vl(this,o),super._definePropertyAccessor(o,r);}_hasAccessor(o){return this.__dataHasAccessor&&this.__dataHasAccessor[o]}_isPropertyPending(o){return !!(this.__dataPending&&o in this.__dataPending)}}return e});/**
|
|
1429
1429
|
@license
|
|
1430
1430
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1431
1431
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1433,7 +1433,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1433
1433
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1434
1434
|
Code distributed by Google as part of the polymer project is also
|
|
1435
1435
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1436
|
-
*/const
|
|
1436
|
+
*/const Bl={"dom-if":!0,"dom-repeat":!0};let Do=!1,zo=!1;function Rl(){if(!Do){Do=!0;const s=document.createElement("textarea");s.placeholder="a",zo=s.placeholder===s.textContent;}return zo}function $l(s){Rl()&&s.localName==="textarea"&&s.placeholder&&s.placeholder===s.textContent&&(s.textContent=null);}const Hl=(()=>{const s=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const o=e.getAttribute(i);if(s&&i.startsWith("on-")){t.setAttribute(i,s.createScript(o,i));return}t.setAttribute(i,o);}})();function ql(s){let t=s.getAttribute("is");if(t&&Bl[t]){let e=s;for(e.removeAttribute("is"),s=e.ownerDocument.createElement(t),e.parentNode.replaceChild(s,e),s.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];Hl(s,e,i),e.removeAttribute(i);}}return s}function Kr(s,t){let e=t.parentInfo&&Kr(s,t.parentInfo);if(e){for(let i=e.firstChild,o=0;i;i=i.nextSibling)if(t.parentIndex===o++)return i}else return s}function Ul(s,t,e,i){i.id&&(t[i.id]=e);}function Wl(s,t,e){if(e.events&&e.events.length)for(let i=0,o=e.events,r;i<o.length&&(r=o[i]);i++)s._addMethodEventListenerToNode(t,r.name,r.value,s);}function jl(s,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function Yl(s,t,e){return s=s._methodHost||s,function(o){s[e]?s[e](o,o.detail):console.warn("listener method `"+e+"` not defined");}}const Gl=S(s=>{class t extends s{static _parseTemplate(i,o){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!o,r.stripWhiteSpace=o&&o.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,o,r){return this._parseTemplateNode(i.content,o,r)}static _parseTemplateNode(i,o,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,o,r)||n:a.localName==="slot"&&(o.hasInsertionPoint=!0),$l(a),a.firstChild&&this._parseTemplateChildNodes(a,o,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,o,r)||n),n||r.noted}static _parseTemplateChildNodes(i,o,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=ql(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let h=l;for(;h&&h.nodeType===Node.TEXT_NODE;)n.textContent+=h.textContent,l=h.nextSibling,i.removeChild(h),h=l;if(o.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,o,d)&&(d.infoIndex=o.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,o,r){let n=i,a=this._parseTemplate(n,o);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,o,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,o,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,o,r,n,a){return n.slice(0,3)==="on-"?(i.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(i){let o=i._templateInfo;return o&&o.content||i.content}_stampTemplate(i,o){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),o=o||this.constructor._parseTemplate(i);let r=o.nodeInfoList,n=o.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!o.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,h=r.length,c;d<h&&(c=r[d]);d++){let u=l[d]=Kr(a,c);Ul(this,a.$,u,c),jl(this,u,c,o),Wl(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,o,r,n){n=n||i;let a=Yl(n,o,r);return this._addEventListenerToNode(i,o,a),a}_addEventListenerToNode(i,o,r){i.addEventListener(o,r);}_removeEventListenerFromNode(i,o,r){i.removeEventListener(o,r);}}return t});/**
|
|
1437
1437
|
* @fileoverview
|
|
1438
1438
|
* @suppress {checkPrototypalTypes}
|
|
1439
1439
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1443,7 +1443,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1443
1443
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1444
1444
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1445
1445
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1446
|
-
*/let Qe=0;const Ze=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Yl=/[A-Z]/;function ri(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Re(s,t,e,i,o,r){if(t){let n=!1;const a=Qe++;for(let l in e){let d=o?ue(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||bs(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Gl(s,t,e,i,o,r,n,a){let l=!1,d=n?ue(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||bs(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function bs(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Xe(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Kl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Qe++;for(let d in t)t[d]&&(r&&Gl(s,r,a,d,e,i,o)||o&&Xl(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Xl(s,t,e){let i=ue(t);if(i!==t){let o=Vt(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Jl(s,t,e,i,o,r){let a=(r?ue(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function Ql(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Je(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function Zl(s,t,e,i,o){let r=s.__data[t];At&&(r=At(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function ed(s,t,e,i){let o=s[g.COMPUTE];if(o)if(fl){Qe++;const r=id(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;Re(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const td=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?ue(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Qe&&(!o||bs(s,l.trigger))&&(l.info.lastRun=Qe,td(l.info,e,i));}};function id(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=sd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function sd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Ni(s,t,e,i,o);if(r===Ze)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function od(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Xe(r,t)?(o=Je(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Xe(n,t)&&(o=Je(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ni(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),dd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Vt(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,rd(s,t,a,h,l);}}function rd(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:nd,info:n,trigger:l});}}}function nd(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Je(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==Ze&&ad(s,a,l,d,h);}}function ad(s,t,e,i,o){if(o=ld(t,o,e,i),At&&(o=At(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function ld(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function dd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function hd(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];cd(n,d),ud(n,s,d);}n.__dataHost=s;}}function cd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function ud(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){Ql(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Ni(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===Ze?Ze:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const pd=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",_d="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",md="(?:'(?:[^'\\\\]|\\\\.)*')",fd='(?:"(?:[^"\\\\]|\\\\.)*")',vd="(?:"+md+"|"+fd+")",Vo="(?:("+Zr+"|"+_d+"|"+vd+")\\s*)",gd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",bd="(?:\\(\\s*(?:"+gd+"?)\\)\\s*)",yd="("+Zr+"\\s*"+bd+"?)",xd="(\\[\\[|{{)\\s*",Cd="(?:]]|}})",wd="(?:(!)\\s*)?",Id=xd+wd+yd+Cd,Fo=new RegExp(Id,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function ai(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:pd};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Ad(o,i)}else return i}return null}function Ad(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=ue(t),e.structured=zi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};Di&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),Di&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Ne(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function Ed(s){return s[0].toUpperCase()+s.substring(1)}const ys=b(s=>{const t=jl(Ll(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_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(Le.length){let o=Le[Le.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ri(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ri(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||ue(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return od(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&zi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;ed(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Re(this,this[g.REFLECT],r,n,a),Re(this,this[g.OBSERVE],r,n,a),l&&Kl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&Re(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{Re(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Be(o),r=Be(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Be(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Ne(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Ne(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Ne(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Ne(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Ne(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Be(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+Ed(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=ai(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Ni,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Jl,info:{eventName:Vt(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" 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(o,g.REFLECT,{fn:Zl,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=ai(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ri(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:E}=o[d];if(!E)if(_){const k=Xe(c,r),I=Ro(a,n,k?r:c);m={path:k?r:c,value:I,base:k?O(a,c):I};}else m=u?Ro(a,n,c):a[c];if(Di&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return Ze;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),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=o._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(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Le.push(this);let n=super._stampTemplate(o,r);if(Le.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,hd(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.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 h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ni(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Yl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=Ur(a)),ni(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(vl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let E=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ni(this,r,n,"property","_host_"+m,E);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let E=ai(c),k=[];if(E){let{args:I,methodName:w}=E;for(let re=0;re<I.length;re++){let M=I[re];M.literal||k.push(M);}let F=r.dynamicFns;(F&&F[w]||E.static)&&(k.push(w),E.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:E,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Ni(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&zi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Le=[];/**
|
|
1446
|
+
*/let Ze=0;const et=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Kl=/[A-Z]/;function ni(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function $e(s,t,e,i,o,r){if(t){let n=!1;const a=Ze++;for(let l in e){let d=o?pe(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||ys(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Xl(s,t,e,i,o,r,n,a){let l=!1,d=n?pe(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||ys(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function ys(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Je(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Jl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Ze++;for(let d in t)t[d]&&(r&&Xl(s,r,a,d,e,i,o)||o&&Ql(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Ql(s,t,e){let i=pe(t);if(i!==t){let o=Ft(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Zl(s,t,e,i,o,r){let a=(r?pe(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function ed(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Qe(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function td(s,t,e,i,o){let r=s.__data[t];Et&&(r=Et(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function id(s,t,e,i){let o=s[g.COMPUTE];if(o)if(gl){Ze++;const r=od(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;$e(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const sd=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?pe(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Ze&&(!o||ys(s,l.trigger))&&(l.info.lastRun=Ze,sd(l.info,e,i));}};function od(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=rd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function rd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Li(s,t,e,i,o);if(r===et)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function nd(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Je(r,t)?(o=Qe(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Je(n,t)&&(o=Qe(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ai(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),cd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Ft(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,ad(s,t,a,h,l);}}function ad(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:ld,info:n,trigger:l});}}}function ld(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Qe(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==et&&dd(s,a,l,d,h);}}function dd(s,t,e,i,o){if(o=hd(t,o,e,i),Et&&(o=Et(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function hd(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function cd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function ud(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];pd(n,d),_d(n,s,d);}n.__dataHost=s;}}function pd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function _d(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){ed(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Li(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===et?et:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const md=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",fd="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",vd="(?:'(?:[^'\\\\]|\\\\.)*')",gd='(?:"(?:[^"\\\\]|\\\\.)*")',bd="(?:"+vd+"|"+gd+")",Vo="(?:("+Zr+"|"+fd+"|"+bd+")\\s*)",yd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",xd="(?:\\(\\s*(?:"+yd+"?)\\)\\s*)",Cd="("+Zr+"\\s*"+xd+"?)",wd="(\\[\\[|{{)\\s*",Id="(?:]]|}})",Ad="(?:(!)\\s*)?",Ed=wd+Ad+Cd+Id,Fo=new RegExp(Ed,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function li(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:md};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Sd(o,i)}else return i}return null}function Sd(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=pe(t),e.structured=Mi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};zi&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),zi&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Le(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function kd(s){return s[0].toUpperCase()+s.substring(1)}const xs=S(s=>{const t=Gl(Fl(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_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(Ve.length){let o=Ve[Ve.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ni(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ni(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||pe(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return nd(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&Mi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;id(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),$e(this,this[g.REFLECT],r,n,a),$e(this,this[g.OBSERVE],r,n,a),l&&Jl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&$e(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{$e(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Re(o),r=Re(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Re(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Le(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Le(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Le(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Le(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Le(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Re(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+kd(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=li(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Li,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Zl,info:{eventName:Ft(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" 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(o,g.REFLECT,{fn:td,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=li(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ni(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:A}=o[d];if(!A)if(_){const k=Je(c,r),w=Ro(a,n,k?r:c);m={path:k?r:c,value:w,base:k?O(a,c):w};}else m=u?Ro(a,n,c):a[c];if(zi&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return et;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),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=o._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(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Ve.push(this);let n=super._stampTemplate(o,r);if(Ve.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,ud(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.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 h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ai(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Kl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=qr(a)),ai(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(bl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let A=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ai(this,r,n,"property","_host_"+m,A);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let A=li(c),k=[];if(A){let{args:w,methodName:C}=A;for(let ne=0;ne<w.length;ne++){let M=w[ne];M.literal||k.push(M);}let B=r.dynamicFns;(B&&B[C]||A.static)&&(k.push(C),A.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:A,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Li(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&Mi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Ve=[];/**
|
|
1447
1447
|
@license
|
|
1448
1448
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1449
1449
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1459,7 +1459,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1459
1459
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1460
1460
|
Code distributed by Google as part of the polymer project is also
|
|
1461
1461
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1462
|
-
*/function
|
|
1462
|
+
*/function Td(s){const t={};for(let e in s){const i=s[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const Pd=S(s=>{const t=Yr(s);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof o?n:null}function i(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=Td(a));}r.__ownProperties=n;}return r.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){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=e(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass();}}static _finalizeClass(){const n=i(this);n&&this.createProperties(n);}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=e(this);this.__properties=Object.assign({},n&&n._properties,i(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 o});/**
|
|
1463
1463
|
* @fileoverview
|
|
1464
1464
|
* @suppress {checkPrototypalTypes}
|
|
1465
1465
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1469,7 +1469,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1469
1469
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1470
1470
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1471
1471
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1472
|
-
*/const
|
|
1472
|
+
*/const Od="3.5.2",$o=window.ShadyCSS&&window.ShadyCSS.cssBuild,Dd=S(s=>{const t=Pd(xs(s));function e(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let h in d){let c=d[h];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[h]=c);}}return l.__propertyDefaults}function i(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function o(l,d,h,c){h.computed&&(h.readOnly=!0),h.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,h.computed,c)),h.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!h.computed):h.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),h.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):h.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),h.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):h.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),h.observer&&l._createPropertyObserver(d,h.observer,c[h.observer]),l._addPropertyToAttributeMap(d);}function r(l,d,h,c){if(!$o){const u=d.content.querySelectorAll("style"),_=Br(d),m=Sl(h),A=d.content.firstElementChild;for(let w=0;w<m.length;w++){let C=m[w];C.textContent=l._processStyleText(C.textContent,c),d.content.insertBefore(C,A);}let k=0;for(let w=0;w<_.length;w++){let C=_[w],B=u[k];B!==C?(C=C.cloneNode(!0),B.parentNode.insertBefore(C,B)):k++,C.textContent=l._processStyleText(C.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),yl&&$o&&_l){const u=d.content.querySelectorAll("style");if(u){let _="";Array.from(u).forEach(m=>{_+=m.textContent,m.parentNode.removeChild(m);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(_);}}}function n(l){let d=null;if(l&&(!St||fl)&&(d=Xe.import(l,"template"),St&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return Od}static _finalizeClass(){t._finalizeClass.call(this);const d=i(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):Nr||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)o(this.prototype,h,d[h],d);}static createObservers(d,h){const c=this.prototype;for(let u=0;u<d.length;u++)c._createMethodObserver(d[u],h);}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=gs(d.url);else {const h=Xe.import(this.is);this._importPath=h&&h.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath;}}return this._importPath}constructor(){super();}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=ml,this.importPath=this.constructor.importPath;let d=e(this.constructor);if(d)for(let h in d){let c=d[h];if(this._canApplyPropertyDefault(h)){let u=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(h)?this._setPendingProperty(h,u,!0):this[h]=u;}}}_canApplyPropertyDefault(d){return !this.hasOwnProperty(d)}static _processStyleText(d,h){return vs(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?je(c):"";r(this,h,d,u),this.prototype._bindTemplate(h);}}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 h=P(this);if(h.attachShadow)return d?(h.shadowRoot||(h.attachShadow({mode:"open",shadyUpgradeFragment:d}),h.shadowRoot.appendChild(d),this.constructor._styleSheet&&(h.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),vl&&window.ShadyDOM&&window.ShadyDOM.flushInitial(h.shadowRoot),h.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,h){return !h&&this.importPath&&(h=je(this.importPath)),je(d,h)}static _parseTemplateContent(d,h,c){return h.dynamicFns=h.dynamicFns||this._properties,t._parseTemplateContent.call(this,d,h,c)}static _addTemplatePropertyEffect(d,h,c){return Lr&&!(h in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${h}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,d,h,c)}}return a});/**
|
|
1473
1473
|
@license
|
|
1474
1474
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1475
1475
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1477,7 +1477,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1477
1477
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1478
1478
|
Code distributed by Google as part of the polymer project is also
|
|
1479
1479
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1480
|
-
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function
|
|
1480
|
+
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function zd(s){if(s instanceof HTMLTemplateElement)return s.innerHTML;if(s instanceof sn)return on(s);throw new Error(`non-template value passed to Polymer's html function: ${s}`)}const b=function(t,...e){rn(t,e);const i=document.createElement("template");let o=e.reduce((r,n,a)=>r+zd(n)+t[a+1],t[0]);return Ho&&(o=Ho.createHTML(o)),i.innerHTML=o,i},rn=(s,t)=>{if(!Array.isArray(s)||!Array.isArray(s.raw)||t.length!==s.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
1481
1481
|
@license
|
|
1482
1482
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1483
1483
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1485,7 +1485,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1485
1485
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1486
1486
|
Code distributed by Google as part of the polymer project is also
|
|
1487
1487
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1488
|
-
*/const
|
|
1488
|
+
*/const y=Dd(HTMLElement),Md=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,yt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Nd(){function s(){return !0}return nn(s)}function Ld(){try{return Vd()?!0:Fd()?yt?!Bd():!Nd():!1}catch(s){return !1}}function Vd(){return localStorage.getItem("vaadin.developmentmode.force")}function Fd(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Bd(){return !!(yt&&Object.keys(yt).map(t=>yt[t]).filter(t=>t.productionMode).length>0)}function nn(s,t){if(typeof s!="function")return;const e=Md.exec(s.toString());if(e)try{s=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return s(t)}window.Vaadin=window.Vaadin||{};const qo=function(s,t){if(window.Vaadin.developmentMode)return nn(s,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Ld());function Rd(){/*! vaadin-dev-mode:start
|
|
1489
1489
|
(function () {
|
|
1490
1490
|
'use strict';
|
|
1491
1491
|
|
|
@@ -1963,7 +1963,7 @@ try {
|
|
|
1963
1963
|
|
|
1964
1964
|
}());
|
|
1965
1965
|
|
|
1966
|
-
vaadin-dev-mode:end **/}const an=function(){if(typeof
|
|
1966
|
+
vaadin-dev-mode:end **/}const an=function(){if(typeof qo=="function")return qo(Rd)};/**
|
|
1967
1967
|
* @license
|
|
1968
1968
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1969
1969
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1971,7 +1971,7 @@ try {
|
|
|
1971
1971
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1972
1972
|
* Code distributed by Google as part of the polymer project is also
|
|
1973
1973
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1974
|
-
*/let
|
|
1974
|
+
*/let Uo=0,ln=0;const xe=[];let Vi=!1;function $d(){Vi=!1;const s=xe.length;for(let t=0;t<s;t++){const e=xe[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}xe.splice(0,s),ln+=s;}const te={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},tt={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},dn={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},Tt={run(s){Vi||(Vi=!0,queueMicrotask(()=>$d())),xe.push(s);const t=Uo;return Uo+=1,t},cancel(s){const t=s-ln;if(t>=0){if(!xe[t])throw new Error(`invalid async handle: ${s}`);xe[t]=null;}}};/**
|
|
1975
1975
|
@license
|
|
1976
1976
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1977
1977
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1979,35 +1979,35 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1979
1979
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1980
1980
|
Code distributed by Google as part of the polymer project is also
|
|
1981
1981
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1982
|
-
*/const
|
|
1982
|
+
*/const it=new Set;let z=class Fi{static debounce(t,e,i){return t instanceof Fi?t._cancelAsync():t=new Fi,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,it.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),it.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 hn(s){it.add(s);}function Hd(){const s=!!it.size;return it.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const He=()=>{let s;do s=Hd();while(s)};/**
|
|
1983
1983
|
* @license
|
|
1984
1984
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1985
1985
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1986
|
-
*/const U=[];function
|
|
1986
|
+
*/const U=[];function Bi(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function Ri(){return document.documentElement.getAttribute("dir")}function qd(){const s=Ri();U.forEach(t=>{Bi(t,s);});}const Ud=new MutationObserver(qd);Ud.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const $=s=>class extends s{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(),Bi(this,Ri(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=Ri(),n=o===r&&U.indexOf(this)===-1,a=!o&&i&&U.indexOf(this)===-1;n||a?(this.__subscribe(),Bi(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=U.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){U.includes(this)||U.push(this);}__unsubscribe(){U.includes(this)&&U.splice(U.indexOf(this),1);}};/**
|
|
1987
1987
|
* @license
|
|
1988
1988
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1989
1989
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1990
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
1990
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let di;const Wo=new Set,X=s=>class extends $(s){static finalize(){super.finalize();const{is:e}=this;e&&!Wo.has(e)&&(window.Vaadin.registrations.push(this),Wo.add(e),window.Vaadin.developmentModeCallback&&(di=z.debounce(di,dn,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),hn(di)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
1991
1991
|
* @license
|
|
1992
1992
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1993
1993
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1994
|
-
*/function
|
|
1994
|
+
*/function Wd(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function cn(s){const t=[];let e;return s.localName==="slot"?e=s.assignedElements():(t.push(s),e=[...s.children]),e.forEach(i=>t.push(...cn(i))),t}function Cs(s){return s?new Set(s.split(" ")):new Set}function Bt(s){return s?[...s].join(" "):""}function un(s,t,e){const i=Cs(s.getAttribute(t));i.add(e),s.setAttribute(t,Bt(i));}function jd(s,t,e){const i=Cs(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Bt(i));}function Yd(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
1995
1995
|
* @license
|
|
1996
1996
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1997
1997
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1998
|
-
*/let
|
|
1998
|
+
*/let ws=class{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}};/**
|
|
1999
1999
|
* @license
|
|
2000
2000
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2001
2001
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2002
|
-
*/let
|
|
2002
|
+
*/let Gd=0;function Rt(){return Gd++}/**
|
|
2003
2003
|
* @license
|
|
2004
2004
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2005
2005
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2006
|
-
*/let
|
|
2006
|
+
*/let G=class extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${Rt()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,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(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new ws(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!Yd(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)));});}};/**
|
|
2007
2007
|
* @license
|
|
2008
2008
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2009
2009
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2010
|
-
*/let
|
|
2010
|
+
*/let _e=class extends G{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(t.shouldShow=this.shouldShow),this.__notifyChange();}teardownNode(){this.__notifyChange();}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t);}setContext(t){this.context=t;const e=this.node;e&&(e.context=t);}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t);}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t);}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t);}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t);}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t);}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}));}};/**
|
|
2011
2011
|
@license
|
|
2012
2012
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2013
2013
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -2015,107 +2015,107 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
2015
2015
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2016
2016
|
Code distributed by Google as part of the polymer project is also
|
|
2017
2017
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2018
|
-
*/const
|
|
2018
|
+
*/const Kd=s=>s,pn=typeof document.head.style.touchAction=="string",$i="__polymerGestures",hi="__polymerGesturesHandled",Hi="__polymerGesturesTouchAction",jo=25,Yo=5,Xd=2,Jd=["mousedown","mousemove","mouseup","click"],Qd=[0,1,4,2],Zd=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(s){return !1}}();function Is(s){return Jd.indexOf(s)>-1}(function(){try{const s=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s);}catch(s){}})();function th(s){}const ih=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),sh={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ce(s){const t=s.type;if(!Is(t))return !1;if(t==="mousemove"){let i=s.buttons===void 0?1:s.buttons;return s instanceof window.MouseEvent&&!Zd&&(i=Qd[s.which]||0),!!(i&1)}return (s.button===void 0?0:s.button)===0}function oh(s){if(s.type==="click"){if(s.detail===0)return !0;const t=ie(s);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=s.pageX,o=s.pageY;return !(i>=e.left&&i<=e.right&&o>=e.top&&o<=e.bottom)}return !1}const j={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function rh(s){let t="auto";const e=mn(s);for(let i=0,o;i<e.length;i++)if(o=e[i],o[Hi]){t=o[Hi];break}return t}function _n(s,t,e){s.movefn=t,s.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function Ce(s){document.removeEventListener("mousemove",s.movefn),document.removeEventListener("mouseup",s.upfn),s.movefn=null,s.upfn=null;}const mn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:s=>s.composedPath&&s.composedPath()||[],As={},de=[];function nh(s,t){let e=document.elementFromPoint(s,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const o=i;if(i=i.shadowRoot.elementFromPoint(s,t),o===i)break;i&&(e=i);}return e}function ie(s){const t=mn(s);return t.length>0?t[0]:s.target}function ah(s){const t=s.type,i=s.currentTarget[$i];if(!i)return;const o=i[t];if(!o)return;if(!s[hi]&&(s[hi]={},t.startsWith("touch"))){const n=s.changedTouches[0];if(t==="touchstart"&&s.touches.length===1&&(j.touch.id=n.identifier),j.touch.id!==n.identifier)return;pn||(t==="touchstart"||t==="touchmove")&&lh(s);}const r=s[hi];if(!r.skip){for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(s.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](s));}}function lh(s){const t=s.changedTouches[0],e=s.type;if(e==="touchstart")j.touch.x=t.clientX,j.touch.y=t.clientY,j.touch.scrollDecided=!1;else if(e==="touchmove"){if(j.touch.scrollDecided)return;j.touch.scrollDecided=!0;const i=rh(s);let o=!1;const r=Math.abs(j.touch.x-t.clientX),n=Math.abs(j.touch.y-t.clientY);s.cancelable&&(i==="none"?o=!0:i==="pan-x"?o=n>r:i==="pan-y"&&(o=r>n)),o?s.preventDefault():Pt("track");}}function R(s,t,e){return As[t]?(dh(s,t,e),!0):!1}function dh(s,t,e){const i=As[t],o=i.deps,r=i.name;let n=s[$i];n||(s[$i]=n={});for(let a=0,l,d;a<o.length;a++)l=o[a],!(ih&&Is(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&s.addEventListener(l,ah,th()),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);s.addEventListener(t,e),i.touchAction&&fn(s,i.touchAction);}function Es(s){de.push(s),s.emits.forEach(t=>{As[t]=s;});}function hh(s){for(let t=0,e;t<de.length;t++){e=de[t];for(let i=0,o;i<e.emits.length;i++)if(o=e.emits[i],o===s)return e}return null}function fn(s,t){pn&&s instanceof HTMLElement&&Tt.run(()=>{s.style.touchAction=t;}),s[Hi]=t;}function Ss(s,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,Kd(s).dispatchEvent(i),i.defaultPrevented){const o=e.preventer||e.sourceEvent;o&&o.preventDefault&&o.preventDefault();}}function Pt(s){const t=hh(s);t.info&&(t.info.prevent=!0);}Es({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{ce(r)||(Fe("up",t,r),Ce(e.info));},o=r=>{ce(r)&&Fe("up",t,r),Ce(e.info);};_n(this.info,i,o),Fe("down",t,s);},touchstart(s){Fe("down",ie(s),s.changedTouches[0],s);},touchend(s){Fe("up",ie(s),s.changedTouches[0],s);}});function Fe(s,t,e,i){t&&Ss(t,s,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(o){return Pt(o)}});}Es({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(s){this.moves.length>Xd&&this.moves.shift(),this.moves.push(s);},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,Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{const n=r.clientX,a=r.clientY;Go(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&Pt("tap"),e.info.addMove({x:n,y:a}),ce(r)||(e.info.state="end",Ce(e.info)),t&&ci(e.info,t,r),e.info.started=!0);},o=r=>{e.info.started&&i(r),Ce(e.info);};_n(this.info,i,o),this.info.x=s.clientX,this.info.y=s.clientY;},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(s){const t=ie(s),e=s.changedTouches[0],i=e.clientX,o=e.clientY;Go(this.info,i,o)&&(this.info.state==="start"&&Pt("tap"),this.info.addMove({x:i,y:o}),ci(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(s){const t=ie(s),e=s.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),ci(this.info,t,e));}});function Go(s,t,e){if(s.prevent)return !1;if(s.started)return !0;const i=Math.abs(s.x-t),o=Math.abs(s.y-e);return i>=Yo||o>=Yo}function ci(s,t,e){if(!t)return;const i=s.moves[s.moves.length-2],o=s.moves[s.moves.length-1],r=o.x-s.x,n=o.y-s.y;let a,l=0;i&&(a=o.x-i.x,l=o.y-i.y),Ss(t,"track",{state:s.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return nh(e.clientX,e.clientY)}});}Es({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(s){ce(s)&&(this.info.x=s.clientX,this.info.y=s.clientY);},click(s){ce(s)&&Ko(this.info,s);},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(s){Ko(this.info,s.changedTouches[0],s);}});function Ko(s,t,e){const i=Math.abs(t.clientX-s.x),o=Math.abs(t.clientY-s.y),r=ie(e||t);!r||sh[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(o)||i<=jo&&o<=jo||oh(t))&&(s.prevent||Ss(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
|
|
2019
2019
|
* @license
|
|
2020
2020
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2021
2021
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2022
|
-
*/const
|
|
2022
|
+
*/const Te=S(s=>class extends s{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();}});/**
|
|
2023
2023
|
* @license
|
|
2024
2024
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2025
2025
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2026
|
-
*/const
|
|
2026
|
+
*/const me=S(s=>class extends s{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){}});/**
|
|
2027
2027
|
* @license
|
|
2028
2028
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2029
2029
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2030
|
-
*/const
|
|
2030
|
+
*/const ks=s=>class extends Te(me(s)){get _activeKeys(){return [" "]}ready(){super.ready(),R(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),R(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",i=>{this._activeKeys.includes(i.key)&&this._setActive(!1);},{once:!0}));}_setActive(e){this.toggleAttribute("active",e);}};/**
|
|
2031
2031
|
* @license
|
|
2032
2032
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2033
2033
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2034
|
-
*/let
|
|
2034
|
+
*/let Ts=!1;window.addEventListener("keydown",()=>{Ts=!0;},{capture:!0});window.addEventListener("mousedown",()=>{Ts=!1;},{capture:!0});function qi(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function $t(){return Ts}function vn(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function ch(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function uh(s,t){const e=[];for(;s.length>0&&t.length>0;)ch(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function Ui(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=Ui(s.slice(0,e)),o=Ui(s.slice(e));return uh(i,o)}function Wi(s){return s.offsetParent===null&&s.clientWidth===0&&s.clientHeight===0?!0:vn(s)}function Ps(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Os(s){return s.getRootNode().activeElement===s}function ph(s){if(!Ps(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function gn(s,t){if(s.nodeType!==Node.ELEMENT_NODE||vn(s))return !1;const e=s,i=ph(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=gn(n,t)||o;}),o}function _h(s){const t=[];return gn(s,t)?Ui(t):t}/**
|
|
2035
2035
|
* @license
|
|
2036
2036
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2037
2037
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2038
|
-
*/const
|
|
2038
|
+
*/const fe=S(s=>class extends s{get _keyboardActive(){return $t()}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}});/**
|
|
2039
2039
|
* @license
|
|
2040
2040
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2041
2041
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2042
|
-
*/const bn=s=>class extends
|
|
2042
|
+
*/const bn=s=>class extends Te(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):i&&(this.tabindex=this._lastTabIndex);}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1);}};/**
|
|
2043
2043
|
* @license
|
|
2044
2044
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2045
2045
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2046
|
-
*/const
|
|
2046
|
+
*/const Ht=S(s=>class extends fe(bn(s)){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,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_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,i){super._disabledChanged(e,i),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);}});/**
|
|
2047
2047
|
* @license
|
|
2048
2048
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2049
2049
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2050
|
-
*/const
|
|
2050
|
+
*/const Ds=S(s=>class extends s{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((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
2051
2051
|
* @license
|
|
2052
2052
|
* Copyright (c) 2021 - 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 at=S(s=>class extends s{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,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_hasInputValueChanged(e,i){(e||i)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"));}__onInput(e){this._setHasInputValue(e),this._onInput(e);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}_setHasInputValue(e){const i=e.composedPath()[0];this._hasInputValue=i.value.length>0;}});/**
|
|
2055
2055
|
* @license
|
|
2056
2056
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2057
2057
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2058
|
-
*/const
|
|
2058
|
+
*/const mh=S(s=>class extends Ds(Te(at(s))){static get properties(){return {checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return [...super.delegateProps,"checked"]}_onChange(e){const i=e.target;this._toggleChecked(i.checked);}_toggleChecked(e){this.checked=e;}});/**
|
|
2059
2059
|
* @license
|
|
2060
2060
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2061
2061
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2062
|
-
*/const
|
|
2062
|
+
*/const ui=new Map;function zs(s){return ui.has(s)||ui.set(s,new WeakMap),ui.get(s)}function yn(s,t){s&&s.removeAttribute(t);}function xn(s,t){if(!s||!t)return;const e=zs(t);if(e.has(s))return;const i=Cs(s.getAttribute(t));e.set(s,new Set(i));}function fh(s,t){if(!s||!t)return;const e=zs(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):un(s,t,Bt(i)),e.delete(s);}function xt(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=zs(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):xn(s,t),yn(s,t)),jd(s,t,o);const l=i||Bt(a);l&&un(s,t,l);}function vh(s,t){xn(s,t),yn(s,t);}/**
|
|
2063
2063
|
* @license
|
|
2064
2064
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2065
2065
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2066
|
-
*/let
|
|
2066
|
+
*/let gh=class{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,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(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(vh(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(fh(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){xt(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){xt(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){xt(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")));}};/**
|
|
2067
2067
|
* @license
|
|
2068
2068
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2069
2069
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2070
|
-
*/const
|
|
2070
|
+
*/const oe=S(s=>typeof s.prototype.addController=="function"?s:class extends s{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);}});/**
|
|
2071
2071
|
* @license
|
|
2072
2072
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2073
2073
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2074
|
-
*/const
|
|
2074
|
+
*/const V=document.createElement("div");V.style.position="fixed";V.style.clip="rect(0px, 0px, 0px, 0px)";V.setAttribute("aria-live","polite");document.body.appendChild(V);let ht;function bh(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(V.removeAttribute("aria-live"),V.removeAttribute("role"),ht=z.debounce(ht,tt,()=>{V.setAttribute("role","alert");})):(ht&&ht.cancel(),V.removeAttribute("role"),V.setAttribute("aria-live",e)),V.textContent="",setTimeout(()=>{V.textContent=s;},i);}/**
|
|
2075
2075
|
* @license
|
|
2076
2076
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2077
2077
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2078
|
-
*/let
|
|
2078
|
+
*/let Ms=class extends G{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}};/**
|
|
2079
2079
|
* @license
|
|
2080
2080
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2081
2081
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2082
|
-
*/let
|
|
2082
|
+
*/let yh=class extends Ms{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&bh(e,{mode:"assertive"})),super.updateDefaultNode(t);}};/**
|
|
2083
2083
|
* @license
|
|
2084
2084
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2085
2085
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2086
|
-
*/let
|
|
2086
|
+
*/let xh=class extends Ms{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
2087
2087
|
* @license
|
|
2088
2088
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2089
2089
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2090
|
-
*/let Cn=class extends
|
|
2090
|
+
*/let Cn=class extends Ms{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
2091
2091
|
* @license
|
|
2092
2092
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2093
2093
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2094
|
-
*/const
|
|
2094
|
+
*/const Ch=S(s=>class extends oe(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Cn(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);}});/**
|
|
2095
2095
|
* @license
|
|
2096
2096
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2097
2097
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2098
|
-
*/const
|
|
2098
|
+
*/const Ns=S(s=>class extends s{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}});/**
|
|
2099
2099
|
* @license
|
|
2100
2100
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2101
2101
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2102
|
-
*/const
|
|
2102
|
+
*/const qt=s=>class extends Ns(Ch(oe(s))){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 gh(this),this._helperController=new xh(this),this._errorController=new yh(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:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,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,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.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 i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
2103
2103
|
* @license
|
|
2104
2104
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2105
2105
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2106
|
-
*/let Ut=class extends
|
|
2106
|
+
*/let Ut=class extends G{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}};/**
|
|
2107
2107
|
* @license
|
|
2108
2108
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2109
2109
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2110
|
-
*/let
|
|
2110
|
+
*/let Wt=class{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.detail.node);}),this.__initLabel(e.node);}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id));}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t);};this.input.addEventListener("click",t);}};/**
|
|
2111
2111
|
* @license
|
|
2112
2112
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2113
2113
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2114
|
-
*/const
|
|
2114
|
+
*/const wh=s=>class extends qt(mh(Ht(ks(s)))){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 Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(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,i){i&&(e?i.setAttribute("aria-readonly","true"):i.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();}};/**
|
|
2115
2115
|
* @license
|
|
2116
2116
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2117
2117
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2118
|
-
*/const
|
|
2118
|
+
*/const Ih=p`
|
|
2119
2119
|
:host {
|
|
2120
2120
|
display: inline-block;
|
|
2121
2121
|
}
|
|
@@ -2207,7 +2207,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2207
2207
|
* @license
|
|
2208
2208
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2209
2209
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2210
|
-
*/f("vaadin-checkbox",
|
|
2210
|
+
*/f("vaadin-checkbox",Ih,{moduleId:"vaadin-checkbox-styles"});class Ah extends wh(X(E(y))){static get is(){return "vaadin-checkbox"}static get template(){return b`
|
|
2211
2211
|
<div class="vaadin-checkbox-container">
|
|
2212
2212
|
<div part="checkbox" aria-hidden="true"></div>
|
|
2213
2213
|
<slot name="input"></slot>
|
|
@@ -2223,7 +2223,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2223
2223
|
</div>
|
|
2224
2224
|
</div>
|
|
2225
2225
|
<slot name="tooltip"></slot>
|
|
2226
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
2226
|
+
`}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Ah);/**
|
|
2227
2227
|
* @license
|
|
2228
2228
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2229
2229
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2287,7 +2287,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2287
2287
|
* @license
|
|
2288
2288
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2289
2289
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2290
|
-
*/const
|
|
2290
|
+
*/const Ls=p`
|
|
2291
2291
|
[part='label'] {
|
|
2292
2292
|
align-self: flex-start;
|
|
2293
2293
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -2399,7 +2399,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2399
2399
|
margin-left: 0;
|
|
2400
2400
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2401
2401
|
}
|
|
2402
|
-
`;f("",
|
|
2402
|
+
`;f("",Ls,{moduleId:"lumo-required-field"});const Eh=p`
|
|
2403
2403
|
:host {
|
|
2404
2404
|
color: var(--lumo-body-text-color);
|
|
2405
2405
|
font-size: var(--lumo-font-size-m);
|
|
@@ -2442,15 +2442,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2442
2442
|
color: var(--lumo-secondary-text-color);
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
|
-
`;f("vaadin-checkbox-group",[
|
|
2445
|
+
`;f("vaadin-checkbox-group",[Ls,wn,Eh],{moduleId:"lumo-checkbox-group"});/**
|
|
2446
2446
|
* @license
|
|
2447
2447
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2448
2448
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2449
|
-
*/const
|
|
2449
|
+
*/const Sh=s=>class extends qt(fe(Te(s))){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 _e(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const o=this.__checkboxes.map(r=>r.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 ws(e,({addedNodes:i,removedNodes:o})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(o);r.forEach(this.__registerCheckbox),n.forEach(this.__unregisterCheckbox);const a=this.__checkboxes.map(l=>l.inputElement);this._tooltipController.setAriaTarget(a),this.__warnOfCheckboxesWithoutValue(r);}),this.addController(this._tooltipController);}checkValidity(){return !this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(i=>i.nodeType===Node.ELEMENT_NODE&&i.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(o=>{const{value:r}=o;return !o.hasAttribute("value")&&(!r||r==="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,i){super._disabledChanged(e,i),!(!e&&i===void 0)&&i!==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(i=>i!==e));}__onCheckboxCheckedChanged(e){const i=e.target;i.checked?this.__addCheckboxToValue(i.value):this.__removeCheckboxFromValue(i.value);}__valueChanged(e,i){e&&e.length===0&&i===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(o=>{o.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
|
|
2450
2450
|
* @license
|
|
2451
2451
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2452
2452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2453
|
-
*/const
|
|
2453
|
+
*/const kh=p`
|
|
2454
2454
|
:host {
|
|
2455
2455
|
display: inline-flex;
|
|
2456
2456
|
}
|
|
@@ -2483,7 +2483,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2483
2483
|
* @license
|
|
2484
2484
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2485
2485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2486
|
-
*/f("vaadin-checkbox-group",
|
|
2486
|
+
*/f("vaadin-checkbox-group",kh,{moduleId:"vaadin-checkbox-group-styles"});class Th extends Sh(X(E(y))){static get is(){return "vaadin-checkbox-group"}static get template(){return b`
|
|
2487
2487
|
<div class="vaadin-group-field-container">
|
|
2488
2488
|
<div part="label">
|
|
2489
2489
|
<slot name="label"></slot>
|
|
@@ -2504,11 +2504,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2504
2504
|
</div>
|
|
2505
2505
|
|
|
2506
2506
|
<slot name="tooltip"></slot>
|
|
2507
|
-
`}}
|
|
2507
|
+
`}}x(Th);/**
|
|
2508
2508
|
* @license
|
|
2509
2509
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2510
2510
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2511
|
-
*/const
|
|
2511
|
+
*/const Vs=p`
|
|
2512
2512
|
:host {
|
|
2513
2513
|
top: var(--lumo-space-m);
|
|
2514
2514
|
right: var(--lumo-space-m);
|
|
@@ -2573,11 +2573,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2573
2573
|
opacity: 1;
|
|
2574
2574
|
}
|
|
2575
2575
|
}
|
|
2576
|
-
`;f("",
|
|
2576
|
+
`;f("",Vs,{moduleId:"lumo-overlay"});/**
|
|
2577
2577
|
* @license
|
|
2578
2578
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2579
2579
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2580
|
-
*/const
|
|
2580
|
+
*/const Fs=p`
|
|
2581
2581
|
:host([opening]),
|
|
2582
2582
|
:host([closing]) {
|
|
2583
2583
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2607,7 +2607,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2607
2607
|
opacity: 0;
|
|
2608
2608
|
}
|
|
2609
2609
|
}
|
|
2610
|
-
`;f("",
|
|
2610
|
+
`;f("",Fs,{moduleId:"lumo-menu-overlay-core"});const Ph=p`
|
|
2611
2611
|
/* Small viewport (bottom sheet) styles */
|
|
2612
2612
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2613
2613
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2669,7 +2669,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2669
2669
|
transform: translateY(150%);
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
|
-
`,
|
|
2672
|
+
`,Bs=[Vs,Fs,Ph];f("",Bs,{moduleId:"lumo-menu-overlay"});const Oh=p`
|
|
2673
2673
|
[part='overlay'] {
|
|
2674
2674
|
/*
|
|
2675
2675
|
Width:
|
|
@@ -2714,7 +2714,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2714
2714
|
max-height: 70vh;
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
|
-
`;f("vaadin-date-picker-overlay",[
|
|
2717
|
+
`;f("vaadin-date-picker-overlay",[Bs,Oh],{moduleId:"lumo-date-picker-overlay"});const In=p`
|
|
2718
2718
|
:host {
|
|
2719
2719
|
/* Sizing */
|
|
2720
2720
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -3524,7 +3524,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3524
3524
|
* @license
|
|
3525
3525
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3526
3526
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3527
|
-
*/const
|
|
3527
|
+
*/const Dh=p`
|
|
3528
3528
|
:host {
|
|
3529
3529
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3530
3530
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3655,7 +3655,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3655
3655
|
[part='clear-button']::before {
|
|
3656
3656
|
content: var(--lumo-icons-cross);
|
|
3657
3657
|
}
|
|
3658
|
-
`,
|
|
3658
|
+
`,Pe=[Ls,An,wn,Dh];f("",Pe,{moduleId:"lumo-input-field-shared-styles"});const zh=p`
|
|
3659
3659
|
[part='toggle-button']::before {
|
|
3660
3660
|
content: var(--lumo-icons-calendar);
|
|
3661
3661
|
}
|
|
@@ -3677,15 +3677,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3677
3677
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
3678
3678
|
--_lumo-text-field-overflow-mask-image: none;
|
|
3679
3679
|
}
|
|
3680
|
-
`;f("vaadin-date-picker",[
|
|
3680
|
+
`;f("vaadin-date-picker",[Pe,zh],{moduleId:"lumo-date-picker"});/**
|
|
3681
3681
|
* @license
|
|
3682
3682
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3683
3683
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3684
|
-
*/const
|
|
3684
|
+
*/const Mh=s=>class extends s{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(i=>i.focus&&i.focus());});}};/**
|
|
3685
3685
|
* @license
|
|
3686
3686
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3687
3687
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3688
|
-
*/const
|
|
3688
|
+
*/const Nh=p`
|
|
3689
3689
|
:host {
|
|
3690
3690
|
display: flex;
|
|
3691
3691
|
align-items: center;
|
|
@@ -3754,15 +3754,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3754
3754
|
* @license
|
|
3755
3755
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3756
3756
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3757
|
-
*/f("vaadin-input-container",
|
|
3757
|
+
*/f("vaadin-input-container",Nh,{moduleId:"vaadin-input-container-styles"});let Lh=class extends Mh(E($(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
3758
3758
|
<slot name="prefix"></slot>
|
|
3759
3759
|
<slot></slot>
|
|
3760
3760
|
<slot name="suffix"></slot>
|
|
3761
|
-
`}};
|
|
3761
|
+
`}};x(Lh);/**
|
|
3762
3762
|
* @license
|
|
3763
3763
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3764
3764
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3765
|
-
*/const
|
|
3765
|
+
*/const Rs=p`
|
|
3766
3766
|
:host {
|
|
3767
3767
|
z-index: 200;
|
|
3768
3768
|
position: fixed;
|
|
@@ -3829,55 +3829,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3829
3829
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3830
3830
|
Code distributed by Google as part of the polymer project is also
|
|
3831
3831
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3832
|
-
*/let
|
|
3832
|
+
*/let ji=!1,Vh=[],En=[];function Fh(){ji=!0,requestAnimationFrame(function(){ji=!1,Bh(Vh),setTimeout(function(){Rh(En);});});}function Bh(s){for(;s.length;)Sn(s.shift());}function Rh(s){for(let t=0,e=s.length;t<e;t++)Sn(s.shift());}function Sn(s){const t=s[0],e=s[1],i=s[2];try{e.apply(t,i);}catch(o){setTimeout(()=>{throw o});}}function kn(s,t,e){ji||Fh(),En.push([s,t,e]);}/**
|
|
3833
3833
|
* @license
|
|
3834
3834
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3835
3835
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3836
|
-
*/const
|
|
3836
|
+
*/const jt=s=>s.test(navigator.userAgent),Yi=s=>s.test(navigator.platform),$h=s=>s.test(navigator.vendor);jt(/Android/u);jt(/Chrome/u)&&$h(/Google Inc/u);jt(/Firefox/u);const Hh=Yi(/^iPad/u)||Yi(/^Mac/u)&&navigator.maxTouchPoints>1,qh=Yi(/^iPhone/u),$s=qh||Hh,Uh=jt(/^((?!chrome|android).)*safari/iu),Gi=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
3837
3837
|
* @license
|
|
3838
3838
|
* Copyright (c) 2017 Anton Korzunov
|
|
3839
3839
|
* SPDX-License-Identifier: MIT
|
|
3840
|
-
*/let
|
|
3840
|
+
*/let ve=new WeakMap,ct=new WeakMap,ut={},pi=0;const Xo=s=>s&&s.nodeType===Node.ELEMENT_NODE,_i=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},Wh=(s,t)=>Xo(s)?t.map(e=>{if(!Xo(e))return _i(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return _i(e,"is not contained inside",s),null}).filter(e=>!!e):(_i(s,"is not a valid element"),[]),jh=(s,t,e,i)=>{const o=Wh(t,Array.isArray(s)?s:[s]);ut[e]||(ut[e]=new WeakMap);const r=ut[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ve.get(m)||0)+1,C=(r.get(m)||0)+1;ve.set(m,w),r.set(m,C),n.push(m),w===1&&k&&ct.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),pi+=1,()=>{n.forEach(c=>{const u=ve.get(c)-1,_=r.get(c)-1;ve.set(c,u),r.set(c,_),u||(ct.has(c)?ct.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),pi-=1,pi||(ve=new WeakMap,ve=new WeakMap,ct=new WeakMap,ut={});}},Tn=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),jh(i,t,e,"aria-hidden")};/**
|
|
3841
3841
|
* @license
|
|
3842
3842
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3843
3843
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3844
|
-
*/let
|
|
3844
|
+
*/let Yh=class{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=Tn(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}};/**
|
|
3845
3845
|
* @license
|
|
3846
3846
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3847
3847
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3848
|
-
*/let
|
|
3848
|
+
*/let Gh=class{saveFocus(t){this.focusNode=t||qi();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;qi()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}};/**
|
|
3849
3849
|
* @license
|
|
3850
3850
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3851
3851
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3852
|
-
*/const
|
|
3852
|
+
*/const mi=[];let Kh=class{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return _h(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Os).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");mi.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,mi.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(mi).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}};/**
|
|
3853
3853
|
* @license
|
|
3854
3854
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3855
3855
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3856
|
-
*/const
|
|
3856
|
+
*/const Xh=s=>class extends oe(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Yh(this),this.__focusTrapController=new Kh(this),this.__focusRestorationController=new Gh;}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=!$t();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=qi();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
3857
3857
|
* @license
|
|
3858
3858
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3859
3859
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3860
|
-
*/const
|
|
3860
|
+
*/const Pn=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),Ki=()=>Pn().filter(s=>s.$.overlay),Jh=s=>s===Ki().pop(),On=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Jh(this)}bringToFront(){let e="";const i=Pn().filter(o=>o!==this).pop();i&&(e=i.__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"),Ki().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=Ki();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
3861
3861
|
* @license
|
|
3862
3862
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3863
3863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3864
|
-
*/const Hs=s=>class extends
|
|
3864
|
+
*/const Hs=s=>class extends Xh(On(s)){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),$s&&(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 i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-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,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),kn(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o);}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(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),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_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 i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
3865
3865
|
* @license
|
|
3866
3866
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
3867
3867
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3868
|
-
*/function
|
|
3868
|
+
*/function Qh(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
3869
3869
|
* @license
|
|
3870
3870
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3871
3871
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3872
|
-
*/const
|
|
3872
|
+
*/const fi={start:"top",end:"bottom"},vi={start:"left",end:"right"},Jo=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),qs=s=>class extends s{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=Wd(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=Qh(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,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,Jo.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,Jo.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],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 i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,fi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,vi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,vi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,fi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===fi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===vi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
3873
3873
|
* @license
|
|
3874
3874
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3875
3875
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3876
|
-
*/const
|
|
3876
|
+
*/const Zh=s=>class extends qs(Hs(s)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}};/**
|
|
3877
3877
|
* @license
|
|
3878
3878
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3879
3879
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3880
|
-
*/const
|
|
3880
|
+
*/const ec=p`
|
|
3881
3881
|
[part='overlay'] {
|
|
3882
3882
|
display: flex;
|
|
3883
3883
|
flex: auto;
|
|
@@ -3896,18 +3896,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3896
3896
|
* @license
|
|
3897
3897
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3898
3898
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3899
|
-
*/f("vaadin-date-picker-overlay",[
|
|
3899
|
+
*/f("vaadin-date-picker-overlay",[Rs,ec],{moduleId:"vaadin-date-picker-overlay-styles"});class tc extends Zh($(E(y))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return b`
|
|
3900
3900
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3901
3901
|
<div part="overlay" id="overlay">
|
|
3902
3902
|
<div part="content" id="content">
|
|
3903
3903
|
<slot></slot>
|
|
3904
3904
|
</div>
|
|
3905
3905
|
</div>
|
|
3906
|
-
`}}
|
|
3906
|
+
`}}x(tc);/**
|
|
3907
3907
|
* @license
|
|
3908
3908
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3909
3909
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3910
|
-
*/const
|
|
3910
|
+
*/const Dn=p`
|
|
3911
3911
|
:host {
|
|
3912
3912
|
display: inline-block;
|
|
3913
3913
|
position: relative;
|
|
@@ -3967,7 +3967,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3967
3967
|
outline-color: GrayText;
|
|
3968
3968
|
}
|
|
3969
3969
|
}
|
|
3970
|
-
`,
|
|
3970
|
+
`,ic=s=>s`
|
|
3971
3971
|
<div class="vaadin-button-container">
|
|
3972
3972
|
<span part="prefix" aria-hidden="true">
|
|
3973
3973
|
<slot name="prefix"></slot>
|
|
@@ -3984,15 +3984,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3984
3984
|
* @license
|
|
3985
3985
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3986
3986
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3987
|
-
*/const
|
|
3987
|
+
*/const Us=s=>class extends ks(bn(fe(s))){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());}};/**
|
|
3988
3988
|
* @license
|
|
3989
3989
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3990
3990
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3991
|
-
*/f("vaadin-button",
|
|
3991
|
+
*/f("vaadin-button",Dn,{moduleId:"vaadin-button-styles"});class sc extends Us(X(E(oe(y)))){static get is(){return "vaadin-button"}static get template(){return ic(b)}ready(){super.ready(),this._tooltipController=new _e(this),this.addController(this._tooltipController);}}x(sc);/**
|
|
3992
3992
|
* @license
|
|
3993
3993
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3994
3994
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3995
|
-
*/function
|
|
3995
|
+
*/function oc(s){let t=s.getDay();t===0&&(t=7);const e=4-t,i=new Date(s.getTime()+e*24*3600*1e3),o=new Date(0,0);o.setFullYear(i.getFullYear());const r=i.getTime()-o.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function Xi(s){const t=new Date(s);return t.setHours(0,0,0,0),t}function K(s,t,e=Xi){return s instanceof Date&&t instanceof Date&&e(s).getTime()===e(t).getTime()}function Ws(s){return {day:s.getDate(),month:s.getMonth(),year:s.getFullYear()}}function Ee(s,t,e,i){let o=!1;if(typeof i=="function"&&s){const r=Ws(s);o=i(r);}return (!t||s>=t)&&(!e||s<=e)&&!o}function zn(s,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const o=Math.abs(s.getTime()-i.getTime()),r=Math.abs(e.getTime()-s.getTime());return o<r?i:e})}function Mn(s){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(s)+t.getMonth()),e}function rc(s,t,e=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let o=t+Math.floor(s.getFullYear()/100)*100;return s<new Date(o-50,e,i)?o-=100:s>new Date(o+50,e,i)&&(o+=100),o}function Be(s){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(s);if(!t)return;const e=new Date(0,0);return e.setFullYear(parseInt(t[1],10)),e.setMonth(parseInt(t[2],10)-1),e.setDate(parseInt(t[3],10)),e}function nc(s){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",o=s.year;o<0?(o=-o,e="-",i="000000"):s.year>=1e4&&(e="+",i="000000");const r=e+t(o,i),n=t(s.month+1),a=t(s.day);return [r,n,a].join("-")}function ac(s){return s instanceof Date?nc({year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}):""}/**
|
|
3996
3996
|
@license
|
|
3997
3997
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3998
3998
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4000,7 +4000,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4000
4000
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4001
4001
|
Code distributed by Google as part of the polymer project is also
|
|
4002
4002
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4003
|
-
*/let
|
|
4003
|
+
*/let lc=class Ji{constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,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(t,e,i){return t instanceof Ji?t._cancelAsync():t=new Ji,t.setConfig(e,i),t}},st=new Set;const dc=function(s){st.add(s);},hc=function(){const s=!!st.size;return st.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s};/**
|
|
4004
4004
|
@license
|
|
4005
4005
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4006
4006
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4008,11 +4008,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4008
4008
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4009
4009
|
Code distributed by Google as part of the polymer project is also
|
|
4010
4010
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4011
|
-
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=
|
|
4011
|
+
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=hc();while(s||t)};/**
|
|
4012
4012
|
* @license
|
|
4013
4013
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4014
4014
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4015
|
-
*/const
|
|
4015
|
+
*/const Nn=document.createElement("template");Nn.innerHTML=`
|
|
4016
4016
|
<style>
|
|
4017
4017
|
:host {
|
|
4018
4018
|
display: block;
|
|
@@ -4062,11 +4062,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4062
4062
|
<div class="buffer"></div>
|
|
4063
4063
|
<div id="fullHeight"></div>
|
|
4064
4064
|
</div>
|
|
4065
|
-
`;class
|
|
4065
|
+
`;class Ln extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Nn.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1;}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0);}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i);}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(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%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(t=>{this.$[t.id]=t;}),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()),js();}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach(t=>{[...t.children].forEach(e=>{this._ensureStampedInstance(e._itemWrapper);});}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")));}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse();}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t>this._buffers[1].translateY+e,o=t<this._buffers[0].translateY+e;(i||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=z.debounce(this._debouncerScrollFinish,te.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(t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`;}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=z.debounce(this._debouncerUpdateClones,te.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones();}),this._scrollDisabled=!1;}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach(e=>{for(let i=0;i<this.bufferSize;i++){const o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const r=`vaadin-infinite-scroller-item-content-${Rt()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=o,e.appendChild(n),o.setAttribute("slot",r),this.appendChild(o),this._isVisible(o,t)&&this._ensureStampedInstance(o);}}),requestAnimationFrame(()=>{this._finishInit();});}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach(i=>{t.instance[i]=e[i];});}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((i,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach((n,a)=>{const l=n._itemWrapper;(!t||this._isVisible(l,e))&&this._updateElement(l.instance,r+a);}),i.updated=!0;}});}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}/**
|
|
4066
4066
|
* @license
|
|
4067
4067
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4068
4068
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4069
|
-
*/const
|
|
4069
|
+
*/const Vn=document.createElement("template");Vn.innerHTML=`
|
|
4070
4070
|
<style>
|
|
4071
4071
|
:host {
|
|
4072
4072
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -4078,11 +4078,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4078
4078
|
height: 100%;
|
|
4079
4079
|
}
|
|
4080
4080
|
</style>
|
|
4081
|
-
`;class
|
|
4081
|
+
`;class cc extends Ln{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Vn.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Mn(e);}}x(cc);/**
|
|
4082
4082
|
* @license
|
|
4083
4083
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4084
4084
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4085
|
-
*/const
|
|
4085
|
+
*/const Fn=document.createElement("template");Fn.innerHTML=`
|
|
4086
4086
|
<style>
|
|
4087
4087
|
:host {
|
|
4088
4088
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -4116,15 +4116,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4116
4116
|
border-left-color: #000;
|
|
4117
4117
|
}
|
|
4118
4118
|
</style>
|
|
4119
|
-
`;class
|
|
4119
|
+
`;class uc extends Ln{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Fn.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e);}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}}x(uc);/**
|
|
4120
4120
|
* @license
|
|
4121
4121
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4122
4122
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4123
|
-
*/const
|
|
4123
|
+
*/const pc=s=>class extends s{static get properties(){return {year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return ["__updateSelected(year, selectedDate)"]}__updateSelected(e,i){this.toggleAttribute("selected",i&&i.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear());}};/**
|
|
4124
4124
|
* @license
|
|
4125
4125
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4126
4126
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4127
|
-
*/class
|
|
4127
|
+
*/class _c extends E(pc(y)){static get is(){return "vaadin-date-picker-year"}static get template(){return b`
|
|
4128
4128
|
<style>
|
|
4129
4129
|
:host {
|
|
4130
4130
|
display: block;
|
|
@@ -4133,7 +4133,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4133
4133
|
</style>
|
|
4134
4134
|
<div part="year-number">[[year]]</div>
|
|
4135
4135
|
<div part="year-separator" aria-hidden="true"></div>
|
|
4136
|
-
`}}
|
|
4136
|
+
`}}x(_c);/**
|
|
4137
4137
|
@license
|
|
4138
4138
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4139
4139
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4141,7 +4141,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4141
4141
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4142
4142
|
Code distributed by Google as part of the polymer project is also
|
|
4143
4143
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4144
|
-
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=
|
|
4144
|
+
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=S(s=>{class t extends s{_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,!0)}}return t}),mc=S(s=>{class t extends s{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,this.mutableData)}}return t});Gs._mutablePropertyChange=Ys;/**
|
|
4145
4145
|
@license
|
|
4146
4146
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4147
4147
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4149,7 +4149,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4149
4149
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4150
4150
|
Code distributed by Google as part of the polymer project is also
|
|
4151
4151
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4152
|
-
*/let
|
|
4152
|
+
*/let Qi=null;function Zi(){return Qi}Zi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Zi,writable:!0}});const Bn=xs(Zi),fc=Gs(Bn);function vc(s,t){Qi=s,Object.setPrototypeOf(s,t.prototype),new t,Qi=null;}const gc=xs(class{});function bc(s,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!s!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)s?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(s)i.__polymerReplaced__=document.createComment("hidden-slot"),P(P(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const o=i.__polymerReplaced__;o&&P(P(o).parentNode).replaceChild(i,o);}else i.style&&(s?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=s,i._showHideChildren&&i._showHideChildren(s);}}class re extends gc{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let o=this.root.firstChild;o;o=o.nextSibling)e.push(o),o.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties();}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let i in this.__hostProps)this._setPendingProperty(i,this.__dataHost["_host_"+i]);for(let i in t)this._setPendingProperty(i,t[i]);}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this);}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,o=>{o.model=this,i(o);});else {let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i);}}_showHideChildren(t){bc(t,this.children);}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i);}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do t=t.__dataHost.__dataHost;while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t;}return t}dispatchEvent(t){return !0}}const yc=Gs(re);function Qo(s){let t=s.__dataHost;return t&&t._methodHost||t}function xc(s,t,e){let i=e.mutableData?yc:re;es.mixin&&(i=es.mixin(i));let o=class extends i{};return o.prototype.__templatizeOptions=e,o.prototype._bindTemplate(s),Ic(o,s,t,e),o}function Cc(s,t,e,i){let o=e.forwardHostProp;if(o&&t.hasHostProps){const r=s.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?fc:Bn;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=s.constructor;class d extends l{}n=t.templatizeTemplateClass=d;}let a=t.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:wc(l,o)}),n.prototype._createNotifyingProperty("_host_"+l);Lr&&i&&Sc(t,e,i);}if(s.__dataProto&&Object.assign(s.__data,s.__dataProto),r)vc(s,n),s.__dataTemp={},s.__dataPending=null,s.__dataOld=null,s._enableProperties();else {Object.setPrototypeOf(s,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in s){const d=s[l];delete s[l],s.__data[l]=d;}}}}function wc(s,t){return function(i,o,r){t.call(i.__templatizeOwner,o.substring(6),r[o]);}}function Ic(s,t,e,i){let o=e.hostProps||{};for(let r in i.instanceProps){delete o[r];let n=i.notifyInstanceProp;n&&s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ac(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in o)e.hasHostProps||(e.hasHostProps=!0),s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ec()});}function Ac(s,t){return function(i,o,r){t.call(i.__templatizeOwner,i,o,r[o]);}}function Ec(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function es(s,t,e){if(St&&!Qo(s))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},s.__templatizeOwner)throw new Error("A <template> can only be templatized once");s.__templatizeOwner=t;let o=(t?t.constructor:re)._parseTemplate(s),r=o.templatizeInstanceClass;r||(r=xc(s,o,e),o.templatizeInstanceClass=r);const n=Qo(s);Cc(s,o,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=s,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=o.hostProps,a=a,a}function Sc(s,t,e){const i=e.constructor._properties,{propertyEffects:o}=s,{instanceProps:r}=t;for(let n in o)if(!i[n]&&!(r&&r[n])){const a=o[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 kc(s,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=s)t=e.__dataHost;else return e;else t=P(t).parentNode;return null}/**
|
|
4153
4153
|
@license
|
|
4154
4154
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4155
4155
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4157,7 +4157,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4157
4157
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4158
4158
|
Code distributed by Google as part of the polymer project is also
|
|
4159
4159
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4160
|
-
*/let Zo=!1;function
|
|
4160
|
+
*/let Zo=!1;function Tc(){if(Nr&&!Mr){if(!Zo){Zo=!0;const s=document.createElement("style");s.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(s);}return !0}return !1}/**
|
|
4161
4161
|
@license
|
|
4162
4162
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4163
4163
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4165,15 +4165,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4165
4165
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4166
4166
|
Code distributed by Google as part of the polymer project is also
|
|
4167
4167
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4168
|
-
*/const
|
|
4168
|
+
*/const Pc=mc(y);class er extends Pc{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:!Eo,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;}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId);}connectedCallback(){if(super.connectedCallback(),Tc()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=P(P(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render();}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let o=new MutationObserver(()=>{if(this.querySelector("template"))o.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return o.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=es(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(o,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(o,r);},notifyInstanceProp:function(o,r,n){if(kl(this.as,r)){let a=o[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Qe(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n);}}});}return !0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ");}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)t.indexOf(e[i])===0&&this.__debounceRender(this.__render,this.delay);}}}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render));}__debounceRender(t,e=0){this.__renderDebouncer=lc.debounce(this.__renderDebouncer,e>0?Ml.after(e):jr,t.bind(this)),dc(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),js();}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking();})),this._setRenderedItemCount(this.__instances.length),(!Eo||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}));}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter((i,o,r)=>this.__filterFn(t[i],o,r))),this.__sortFn&&e.sort((i,o)=>this.__sortFn(t[i],t[o])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now();}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1;}this.__shouldContinueChunking&&this.__debounceRender(this.__render);}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];o[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(t){let e=this.__instances[t];const i=P(e.root);for(let o=0;o<e.children.length;o++){let r=e.children[o];i.appendChild(r);}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this);}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1);}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return P(P(this).parentNode).insertBefore(o.root,n),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let n=o<0?"":i.substring(o+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,e,!1,!0),l._flushProperties();}return !0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return kc(this.template,t)}}customElements.define(er.is,er);/**
|
|
4169
4169
|
* @license
|
|
4170
4170
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4171
4171
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4172
|
-
*/const
|
|
4172
|
+
*/const Oc=s=>class extends fe(s){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=>K(e.date,this.focusedDate))}ready(){super.ready(),R(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,o){const r=new Date(0,0);r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);const n=new Date(0,0);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()+1),n.setDate(0),i&&o&&i.getMonth()===o.getMonth()&&i.getMonth()===e.getMonth()&&o.getDate()-i.getDate()>=0?!1:!Ee(r,i,o)&&!Ee(n,i,o)}_getTitle(e,i){if(!(e===void 0||i===void 0))return i.formatTitle(i.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300);}_dateAdd(e,i){e.setDate(e.getDate()+i);}_applyFirstDayOfWeek(e,i){if(!(e===void 0||i===void 0))return e.slice(i).concat(e.slice(0,i))}_getWeekDayNames(e,i){if(e===void 0||i===void 0)return [];const{weekdays:o,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(o,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(o=>K(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,i){return e&&i&&i.firstDayOfWeek===1}_isToday(e){return K(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==i.firstDayOfWeek;)this._dateAdd(o,-1);const r=[],n=o.getMonth(),a=e.getMonth();for(;o.getMonth()===a||o.getMonth()===n;)r.push(o.getMonth()===a?new Date(o.getTime()):null),this._dateAdd(o,1);return r}_getWeeks(e){return e.reduce((i,o,r)=>(r%7===0&&i.push([]),i[i.length-1].push(o),i),[])}_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 i=e.reduce((o,r)=>!o&&r?r:o);return oc(i)}__getDayAriaLabel(e){if(!e)return "";let i=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(i+=`, ${this.i18n.today}`),i}};/**
|
|
4173
4173
|
* @license
|
|
4174
4174
|
* Copyright (c) 2016 - 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 Dc=p`
|
|
4177
4177
|
:host {
|
|
4178
4178
|
display: block;
|
|
4179
4179
|
}
|
|
@@ -4233,7 +4233,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4233
4233
|
* @license
|
|
4234
4234
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4235
4235
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4236
|
-
*/f("vaadin-month-calendar",
|
|
4236
|
+
*/f("vaadin-month-calendar",Dc,{moduleId:"vaadin-month-calendar-styles"});class zc extends Oc(E(y)){static get template(){return b`
|
|
4237
4237
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
4238
4238
|
<table
|
|
4239
4239
|
id="monthGrid"
|
|
@@ -4275,7 +4275,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4275
4275
|
</template>
|
|
4276
4276
|
</tbody>
|
|
4277
4277
|
</table>
|
|
4278
|
-
`}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(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>
|
|
4278
|
+
`}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(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>Xi(new Date),d=t<Xi(new Date);return this.__isDayDisabled(t,o,r,n)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return K(t,e)}__isDaySelected(t,e){return K(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,o){return !Ee(t,e,i,o)}__getDayAriaDisabled(t,e,i,o){if(!(t===void 0||e===void 0&&i===void 0&&o===void 0)&&this.__isDayDisabled(t,e,i,o))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}x(zc);/**
|
|
4279
4279
|
* @license
|
|
4280
4280
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4281
4281
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4283,11 +4283,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4283
4283
|
* @license
|
|
4284
4284
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4285
4285
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4286
|
-
*/const Dc=s=>class extends s{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(){fn(this.$.scrollers,"pan-y"),B(this.$.scrollers,"track",this._track.bind(this)),B(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),B(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),B(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new Y(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),B(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new Y(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),B(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,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new Y(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",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new Y(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),B(e,"tap",i=>{this._onYearTap(i);}),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,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.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,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.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=z.debounce(this._debouncer,ee.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(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 o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){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(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.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 i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{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 zn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.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){G(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){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 i=this.focusableDateElement;i&&G(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return ze(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return ze(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{Rs(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(Dn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="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[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ae(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4286
|
+
*/const Mc=s=>class extends s{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(){fn(this.$.scrollers,"pan-y"),R(this.$.scrollers,"track",this._track.bind(this)),R(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),R(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),R(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new G(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),R(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new G(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),R(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,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new G(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",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new G(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),R(e,"tap",i=>{this._onYearTap(i);}),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,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.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,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.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=z.debounce(this._debouncer,te.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(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 o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){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(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.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 i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{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 Mn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.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){K(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){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 i=this.focusableDateElement;i&&K(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Me(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Me(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{kn(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(zn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="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[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ee(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4287
4287
|
* @license
|
|
4288
4288
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4289
4289
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4290
|
-
*/const
|
|
4290
|
+
*/const Nc=p`
|
|
4291
4291
|
:host {
|
|
4292
4292
|
display: flex;
|
|
4293
4293
|
flex-direction: column;
|
|
@@ -4351,7 +4351,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4351
4351
|
* @license
|
|
4352
4352
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4353
4353
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4354
|
-
*/f("vaadin-date-picker-overlay-content",
|
|
4354
|
+
*/f("vaadin-date-picker-overlay-content",Nc,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Lc extends Mc(oe(E($(y)))){static get template(){return b`
|
|
4355
4355
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
4356
4356
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
4357
4357
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -4371,32 +4371,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4371
4371
|
<slot name="today-button"></slot>
|
|
4372
4372
|
<slot name="cancel-button"></slot>
|
|
4373
4373
|
</div>
|
|
4374
|
-
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}
|
|
4374
|
+
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}x(Lc);/**
|
|
4375
4375
|
* @license
|
|
4376
4376
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4377
4377
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4378
|
-
*/const
|
|
4378
|
+
*/const gi=new WeakMap;function Vc(s){return gi.has(s)||gi.set(s,new Set),gi.get(s)}function Fc(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const Rn=S(s=>class extends s{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Vc(e);this.slotStyles.forEach(o=>{i.has(o)||(Fc(o,e),i.add(o));});}});/**
|
|
4379
4379
|
* @license
|
|
4380
4380
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4381
4381
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4382
|
-
*/const
|
|
4382
|
+
*/const Bc=s=>class extends at(me(s)){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(),Gi||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}));}};/**
|
|
4383
4383
|
* @license
|
|
4384
4384
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4385
4385
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4386
|
-
*/const Xs=
|
|
4386
|
+
*/const Xs=S(s=>class extends Ds(Ns(at(s))){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(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():r&&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}});/**
|
|
4387
4387
|
* @license
|
|
4388
4388
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4389
4389
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4390
|
-
*/const Js=s=>class extends
|
|
4390
|
+
*/const Js=s=>class extends Rn(Ht(Xs(qt(Bc(me(s)))))){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 [`
|
|
4391
4391
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
4392
4392
|
font: inherit;
|
|
4393
4393
|
color: inherit;
|
|
4394
4394
|
}
|
|
4395
|
-
`]}_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=z.debounce(this._preventInputDebouncer,
|
|
4395
|
+
`]}_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=z.debounce(this._preventInputDebouncer,te.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 i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(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(i){console.error(i);}}};/**
|
|
4396
4396
|
* @license
|
|
4397
4397
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4398
4398
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4399
|
-
*/const
|
|
4399
|
+
*/const Rc=p`
|
|
4400
4400
|
[part='clear-button'] {
|
|
4401
4401
|
display: none;
|
|
4402
4402
|
cursor: default;
|
|
@@ -4413,7 +4413,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4413
4413
|
* @license
|
|
4414
4414
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4415
4415
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4416
|
-
*/const
|
|
4416
|
+
*/const $n=p`
|
|
4417
4417
|
:host {
|
|
4418
4418
|
display: inline-flex;
|
|
4419
4419
|
outline: none;
|
|
@@ -4451,7 +4451,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4451
4451
|
* @license
|
|
4452
4452
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4453
4453
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4454
|
-
*/const
|
|
4454
|
+
*/const Hn=p`
|
|
4455
4455
|
[class$='container'] {
|
|
4456
4456
|
display: flex;
|
|
4457
4457
|
flex-direction: column;
|
|
@@ -4463,23 +4463,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4463
4463
|
* @license
|
|
4464
4464
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4465
4465
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4466
|
-
*/const Qs=[
|
|
4466
|
+
*/const Qs=[$n,Hn,Rc];/**
|
|
4467
4467
|
* @license
|
|
4468
4468
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4469
4469
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4470
|
-
*/const
|
|
4470
|
+
*/const Yt=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
4471
4471
|
* @license
|
|
4472
4472
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4473
4473
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4474
|
-
*/let
|
|
4474
|
+
*/let qn=class{constructor(t){this.host=t,t.addEventListener("opened-changed",()=>{t.opened||this.__setVirtualKeyboardEnabled(!1);}),t.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),t.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0));}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none");}};/**
|
|
4475
4475
|
* @license
|
|
4476
4476
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4477
4477
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4478
|
-
*/const Bc=s=>class extends jt(se($t(Xs(_e(s))))){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 i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Fe(this.referenceDate):new Date;a=sc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},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:$s},_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&&!Rt()&&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 Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new Hn(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 i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Fe(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ae(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!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,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return rc(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,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Fe(e);if(e&&!o){this.value=i;return}e?G(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;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 r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=kn(n);}_getInitialPosition(){const e=Fe(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ae(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?Dn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(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,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_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,G(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Fe(e)}};/**
|
|
4478
|
+
*/const $c=s=>class extends Yt(oe(Ht(Xs(me(s))))){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 i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Be(this.referenceDate):new Date;a=rc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},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:$s},_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&&!$t()&&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 Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new qn(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 i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Be(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ee(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!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,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return ac(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,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Be(e);if(e&&!o){this.value=i;return}e?K(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;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 r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=Tn(n);}_getInitialPosition(){const e=Be(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ee(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?zn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(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,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_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,K(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Be(e)}};/**
|
|
4479
4479
|
* @license
|
|
4480
4480
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4481
4481
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4482
|
-
*/const
|
|
4482
|
+
*/const Hc=p`
|
|
4483
4483
|
:host([opened]) {
|
|
4484
4484
|
pointer-events: auto;
|
|
4485
4485
|
}
|
|
@@ -4496,7 +4496,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4496
4496
|
* @license
|
|
4497
4497
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4498
4498
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4499
|
-
*/f("vaadin-date-picker",[Qs,
|
|
4499
|
+
*/f("vaadin-date-picker",[Qs,Hc],{moduleId:"vaadin-date-picker-styles"});class qc extends $c(Js(E(X(y)))){static get is(){return "vaadin-date-picker"}static get template(){return b`
|
|
4500
4500
|
<div class="vaadin-date-picker-container">
|
|
4501
4501
|
<div part="label">
|
|
4502
4502
|
<slot name="label"></slot>
|
|
@@ -4538,23 +4538,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4538
4538
|
></vaadin-date-picker-overlay>
|
|
4539
4539
|
|
|
4540
4540
|
<slot name="tooltip"></slot>
|
|
4541
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new
|
|
4541
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(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(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault();}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open();}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0;}}x(qc);/**
|
|
4542
4542
|
* @license
|
|
4543
4543
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4544
4544
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4545
|
-
*/f("vaadin-text-field",
|
|
4545
|
+
*/f("vaadin-text-field",Pe,{moduleId:"lumo-text-field-styles"});/**
|
|
4546
4546
|
* @license
|
|
4547
4547
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4548
4548
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4549
|
-
*/const
|
|
4549
|
+
*/const Uc=s=>class extends Js(s){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,i){super._valueChanged(e,i),i!==void 0&&this.invalid&&this.validate();}};/**
|
|
4550
4550
|
* @license
|
|
4551
4551
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4552
4552
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4553
|
-
*/const
|
|
4553
|
+
*/const Wc=s=>class extends Uc(s){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 Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(this.inputElement,this._labelController));}};/**
|
|
4554
4554
|
* @license
|
|
4555
4555
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4556
4556
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4557
|
-
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends
|
|
4557
|
+
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends Wc(E(X(y))){static get is(){return "vaadin-text-field"}static get template(){return b`
|
|
4558
4558
|
<div class="vaadin-field-container">
|
|
4559
4559
|
<div part="label">
|
|
4560
4560
|
<slot name="label"></slot>
|
|
@@ -4583,11 +4583,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4583
4583
|
</div>
|
|
4584
4584
|
</div>
|
|
4585
4585
|
<slot name="tooltip"></slot>
|
|
4586
|
-
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
4586
|
+
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Un);/**
|
|
4587
4587
|
* @license
|
|
4588
4588
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4589
4589
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4590
|
-
*/const
|
|
4590
|
+
*/const jc=p`
|
|
4591
4591
|
:host {
|
|
4592
4592
|
position: absolute;
|
|
4593
4593
|
right: 0;
|
|
@@ -4600,11 +4600,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4600
4600
|
background: transparent;
|
|
4601
4601
|
outline: none;
|
|
4602
4602
|
}
|
|
4603
|
-
`;f("vaadin-password-field-button",[In,
|
|
4603
|
+
`;f("vaadin-password-field-button",[In,jc],{moduleId:"lumo-password-field-button"});/**
|
|
4604
4604
|
* @license
|
|
4605
4605
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4606
4606
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4607
|
-
*/const
|
|
4607
|
+
*/const Yc=p`
|
|
4608
4608
|
[part='reveal-button']::before {
|
|
4609
4609
|
content: var(--lumo-icons-eye);
|
|
4610
4610
|
}
|
|
@@ -4622,27 +4622,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4622
4622
|
[part='reveal-button'][hidden] {
|
|
4623
4623
|
display: none !important;
|
|
4624
4624
|
}
|
|
4625
|
-
`;f("vaadin-password-field",[
|
|
4625
|
+
`;f("vaadin-password-field",[Pe,Yc],{moduleId:"lumo-password-field"});/**
|
|
4626
4626
|
* @license
|
|
4627
4627
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4628
4628
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4629
|
-
*/f("vaadin-password-field-button",
|
|
4629
|
+
*/f("vaadin-password-field-button",Dn,{moduleId:"vaadin-password-field-button-styles"});class Gc extends Us($(E(y))){static get is(){return "vaadin-password-field-button"}static get template(){return b``}}x(Gc);/**
|
|
4630
4630
|
* @license
|
|
4631
4631
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4632
4632
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4633
|
-
*/const
|
|
4633
|
+
*/const Kc=s=>class extends Rn(Te(fe(at(s)))){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,`
|
|
4634
4634
|
${e} [slot="input"]::-ms-reveal {
|
|
4635
4635
|
display: none;
|
|
4636
4636
|
}
|
|
4637
|
-
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new
|
|
4637
|
+
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new G(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 i=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!i);}}__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,i){super._disabledChanged(e,i),this._revealNode&&(this._revealNode.disabled=e);}};/**
|
|
4638
4638
|
* @license
|
|
4639
4639
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4640
4640
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4641
|
-
*/const
|
|
4641
|
+
*/const Xc=b`
|
|
4642
4642
|
<div part="reveal-button" slot="suffix">
|
|
4643
4643
|
<slot name="reveal"></slot>
|
|
4644
4644
|
</div>
|
|
4645
|
-
`;let
|
|
4645
|
+
`;let pt;class Jc extends Kc(Un){static get is(){return "vaadin-password-field"}static get template(){if(!pt){pt=super.template.cloneNode(!0);const t=Xc.content.querySelector('[part="reveal-button"]');pt.content.querySelector('[part="input-field"]').appendChild(t);}return pt}}x(Jc);const Zs=p`
|
|
4646
4646
|
:host {
|
|
4647
4647
|
display: flex;
|
|
4648
4648
|
align-items: center;
|
|
@@ -4726,7 +4726,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4726
4726
|
width: var(--lumo-icon-size-m);
|
|
4727
4727
|
height: var(--lumo-icon-size-m);
|
|
4728
4728
|
}
|
|
4729
|
-
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const
|
|
4729
|
+
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const Qc=p`
|
|
4730
4730
|
:host {
|
|
4731
4731
|
transition: background-color 100ms;
|
|
4732
4732
|
overflow: hidden;
|
|
@@ -4738,11 +4738,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4738
4738
|
:host([focused]:not([disabled])) {
|
|
4739
4739
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
4740
4740
|
}
|
|
4741
|
-
`;f("vaadin-combo-box-item",[Zs,
|
|
4741
|
+
`;f("vaadin-combo-box-item",[Zs,Qc],{moduleId:"lumo-combo-box-item"});/**
|
|
4742
4742
|
* @license
|
|
4743
4743
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
4744
4744
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4745
|
-
*/const
|
|
4745
|
+
*/const Zc=p`
|
|
4746
4746
|
[part~='loader'] {
|
|
4747
4747
|
box-sizing: border-box;
|
|
4748
4748
|
width: var(--lumo-icon-size-s);
|
|
@@ -4784,7 +4784,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4784
4784
|
transform: rotate(360deg);
|
|
4785
4785
|
}
|
|
4786
4786
|
}
|
|
4787
|
-
`,
|
|
4787
|
+
`,eu=p`
|
|
4788
4788
|
[part='content'] {
|
|
4789
4789
|
padding: 0;
|
|
4790
4790
|
}
|
|
@@ -4805,7 +4805,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4805
4805
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4806
4806
|
margin-bottom: var(--lumo-space-xs);
|
|
4807
4807
|
}
|
|
4808
|
-
`,
|
|
4808
|
+
`,tu=p`
|
|
4809
4809
|
[part~='loader'] {
|
|
4810
4810
|
position: absolute;
|
|
4811
4811
|
z-index: 1;
|
|
@@ -4813,24 +4813,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4813
4813
|
top: var(--lumo-space-s);
|
|
4814
4814
|
margin-inline: auto 0;
|
|
4815
4815
|
}
|
|
4816
|
-
`;f("vaadin-combo-box-overlay",[
|
|
4816
|
+
`;f("vaadin-combo-box-overlay",[Vs,Fs,eu,Zc,tu,p`
|
|
4817
4817
|
:host {
|
|
4818
4818
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4819
4819
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4820
4820
|
}
|
|
4821
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
4821
|
+
`],{moduleId:"lumo-combo-box-overlay"});const iu=p`
|
|
4822
4822
|
[part='toggle-button']::before {
|
|
4823
4823
|
content: var(--lumo-icons-dropdown);
|
|
4824
4824
|
}
|
|
4825
|
-
`;f("vaadin-combo-box",[
|
|
4825
|
+
`;f("vaadin-combo-box",[Pe,iu],{moduleId:"lumo-combo-box"});/**
|
|
4826
4826
|
* @license
|
|
4827
4827
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4828
4828
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4829
|
-
*/const
|
|
4829
|
+
*/const su=s=>class extends s{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,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,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,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
4830
4830
|
* @license
|
|
4831
4831
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4832
4832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4833
|
-
*/class
|
|
4833
|
+
*/class ou extends su(E($(y))){static get template(){return b`
|
|
4834
4834
|
<style>
|
|
4835
4835
|
:host {
|
|
4836
4836
|
display: block;
|
|
@@ -4844,15 +4844,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4844
4844
|
<div part="content">
|
|
4845
4845
|
<slot></slot>
|
|
4846
4846
|
</div>
|
|
4847
|
-
`}static get is(){return "vaadin-combo-box-item"}}
|
|
4847
|
+
`}static get is(){return "vaadin-combo-box-item"}}x(ou);/**
|
|
4848
4848
|
* @license
|
|
4849
4849
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4850
4850
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4851
|
-
*/const
|
|
4851
|
+
*/const ru=s=>class extends qs(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
4852
4852
|
* @license
|
|
4853
4853
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4854
4854
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4855
|
-
*/const
|
|
4855
|
+
*/const nu=p`
|
|
4856
4856
|
#overlay {
|
|
4857
4857
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4858
4858
|
}
|
|
@@ -4862,17 +4862,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4862
4862
|
flex-direction: column;
|
|
4863
4863
|
height: 100%;
|
|
4864
4864
|
}
|
|
4865
|
-
`;f("vaadin-combo-box-overlay",[
|
|
4865
|
+
`;f("vaadin-combo-box-overlay",[Rs,nu],{moduleId:"vaadin-combo-box-overlay-styles"});class au extends ru(Hs($(E(y)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return b`
|
|
4866
4866
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4867
4867
|
<div part="overlay" id="overlay">
|
|
4868
4868
|
<div part="loader"></div>
|
|
4869
4869
|
<div part="content" id="content"><slot></slot></div>
|
|
4870
4870
|
</div>
|
|
4871
|
-
`}}
|
|
4871
|
+
`}}x(au);/**
|
|
4872
4872
|
* @license
|
|
4873
4873
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4874
4874
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4875
|
-
*/function
|
|
4875
|
+
*/function Ot(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
4876
4876
|
* @license
|
|
4877
4877
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
4878
4878
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4880,23 +4880,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4880
4880
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4881
4881
|
* Code distributed by Google as part of the polymer project is also
|
|
4882
4882
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4883
|
-
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
4883
|
+
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),lu=tr&&tr[1]>=8,ir=3,du={_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 s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Tt);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,ir,this._virtualCount-this._virtualStart)-this._physicalCount;let i=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 r=0;r<e;r++)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,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),dn):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Tt));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(ir));},_itemsChanged(s){s.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,tt));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!lu&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(He(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),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);},tt);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=z.debounce(this._debouncers[s],e,t.bind(this)),hn(this._debouncers[s]);}};/**
|
|
4884
4884
|
* @license
|
|
4885
4885
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4886
4886
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4887
|
-
*/const lu=1e5,gi=1e3;let qn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,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:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<gi?(i=t,this._vidxOffset=0):(i=gi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),$e(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){$e();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,et,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),$e(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),$e(),this._debounce("_update",this._update,kt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,lu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const 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 t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,ee.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,ee.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,et,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,ee.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Hh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=gi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(qn.prototype,au);let du=class{constructor(t){this.__adapter=new qn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
4887
|
+
*/const hu=1e5,bi=1e3;let Wn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,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:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<bi?(i=t,this._vidxOffset=0):(i=bi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,tt,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,Tt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,hu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const 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 t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,te.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,te.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,tt,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,te.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Uh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=bi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(Wn.prototype,du);let cu=class{constructor(t){this.__adapter=new Wn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
4888
4888
|
* @license
|
|
4889
4889
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4890
4890
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4891
|
-
*/const
|
|
4891
|
+
*/const Se=class{toString(){return ""}};/**
|
|
4892
4892
|
* @license
|
|
4893
4893
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4894
4894
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4895
|
-
*/const
|
|
4895
|
+
*/const uu=s=>class extends s{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(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Rt()}`,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 i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof Se?!1:o&&e!==void 0&&i!==void 0?Ot(o,e)===Ot(o,i):e===i}__initVirtualizer(){this.__virtualizer=new cu({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,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof Se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&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}};/**
|
|
4896
4896
|
* @license
|
|
4897
4897
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4898
4898
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4899
|
-
*/class
|
|
4899
|
+
*/class pu extends uu(y){static get is(){return "vaadin-combo-box-scroller"}static get template(){return b`
|
|
4900
4900
|
<style>
|
|
4901
4901
|
:host {
|
|
4902
4902
|
display: block;
|
|
@@ -4923,27 +4923,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4923
4923
|
<div id="selector">
|
|
4924
4924
|
<slot></slot>
|
|
4925
4925
|
</div>
|
|
4926
|
-
`}}
|
|
4926
|
+
`}}x(pu);/**
|
|
4927
4927
|
* @license
|
|
4928
4928
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4929
4929
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4930
|
-
*/const
|
|
4930
|
+
*/const _u=s=>class extends Xs(s){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
|
|
4931
4931
|
* @license
|
|
4932
4932
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4933
4933
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4934
|
-
*/function
|
|
4934
|
+
*/function Dt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Dt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function jn({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=jn({getItemId:s},r,e,i+1,n+1);if(a)return a}}function Yn(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?Yn(r,e,i+o+1):i+o}/**
|
|
4935
4935
|
* @license
|
|
4936
4936
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4937
4937
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4938
|
-
*/let
|
|
4938
|
+
*/let mu=class Gn{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[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((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new Gn(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Dt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Dt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}};/**
|
|
4939
4939
|
* @license
|
|
4940
4940
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4941
4941
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4942
|
-
*/let
|
|
4942
|
+
*/let fu=class extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}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 Dt(this.rootCache,e)}getItemContext(e){return jn({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return Yn(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new mu(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}};/**
|
|
4943
4943
|
* @license
|
|
4944
4944
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4945
4945
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4946
|
-
*/const
|
|
4946
|
+
*/const vu=s=>class extends s{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 fu(this,{placeholder:new Se,isPlaceholder:e=>e instanceof Se,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 i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),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:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.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,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),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,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(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`");}}};/**
|
|
4947
4947
|
* @license
|
|
4948
4948
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4949
4949
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4951,11 +4951,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4951
4951
|
* @license
|
|
4952
4952
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4953
4953
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4954
|
-
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Ee?!1:t(e))}const fu=s=>class extends jt(se(Ms(me(_e(nt(ke(s))))))){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 i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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),eo(this),this.addController(new Hn(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,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.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",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Ps(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Yi&&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 i=e&&this.itemLabelPath?Pt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Pt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_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,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_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",i=>i.preventDefault()),e.addEventListener("click",()=>{Yi&&!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||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!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 i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(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,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]: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 i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n: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,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Ee)&&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(Rt()){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());}};/**
|
|
4954
|
+
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Se?!1:t(e))}const gu=s=>class extends Yt(oe(Ns(fe(me(at(Te(s))))))){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 i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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),eo(this),this.addController(new qn(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,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.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",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Os(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Gi&&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 i=e&&this.itemLabelPath?Ot(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Ot(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_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,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_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",i=>i.preventDefault()),e.addEventListener("click",()=>{Gi&&!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||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!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 i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(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,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]: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 i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n: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,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Se)&&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($t()){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());}};/**
|
|
4955
4955
|
* @license
|
|
4956
4956
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4957
4957
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4958
|
-
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class
|
|
4958
|
+
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class bu extends vu(gu(_u(Js(E(X(y)))))){static get is(){return "vaadin-combo-box"}static get template(){return b`
|
|
4959
4959
|
<style>
|
|
4960
4960
|
:host([opened]) {
|
|
4961
4961
|
pointer-events: auto;
|
|
@@ -5000,33 +5000,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5000
5000
|
></vaadin-combo-box-overlay>
|
|
5001
5001
|
|
|
5002
5002
|
<slot name="tooltip"></slot>
|
|
5003
|
-
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new
|
|
5003
|
+
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton;}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t);}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t);}}x(bu);/**
|
|
5004
5004
|
* @license
|
|
5005
5005
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
5006
5006
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5007
|
-
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function
|
|
5007
|
+
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function yu(s){return s.replace(/-[a-z]/gu,t=>t[1].toUpperCase())}const q={};function J(s,t="24.8.0"){if(Object.defineProperty(s,"version",{get(){return t}}),s.experimental){const i=typeof s.experimental=="string"?s.experimental:`${yu(s.is.split("-").slice(1).join("-"))}Component`;if(!window.Vaadin.featureFlags[i]&&!q[i]){q[i]=new Set,q[i].add(s),Object.defineProperty(window.Vaadin.featureFlags,i,{get(){return q[i].size===0},set(o){o&&q[i].size>0&&(q[i].forEach(r=>{customElements.define(r.is,r);}),q[i].clear());}});return}else if(q[i]){q[i].add(s);return}}const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
5008
5008
|
* @license
|
|
5009
5009
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5010
5010
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5011
|
-
*/class
|
|
5011
|
+
*/class xu extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}J(xu);/**
|
|
5012
|
+
* @license
|
|
5013
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
5014
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5015
|
+
*/function Cu(s){const t=s.constructor,e=s.__cssInjectorStyleSheet;return e?[...t.baseStyles,e,...t.themeStyles]:t.elementStyles}function wu(s){[...s.shadowRoot.querySelectorAll("style")].forEach(t=>t.remove()),_s(s.shadowRoot,Cu(s));}/**
|
|
5012
5016
|
* @license
|
|
5013
5017
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5014
5018
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5015
|
-
*/const
|
|
5019
|
+
*/const Iu=s=>class extends s{static get properties(){return {_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return [...super.observedAttributes,"theme"]}attributeChangedCallback(e,i,o){super.attributeChangedCallback(e,i,o),e==="theme"&&this._set_theme(o);}};/**
|
|
5016
5020
|
* @license
|
|
5017
5021
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5018
5022
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5019
|
-
*/const
|
|
5020
|
-
`)}const
|
|
5023
|
+
*/const Kn=[],ts=new Set,to=new Set;function Xn(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Au(s){return Xn(customElements.get(s))}function Eu(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Jn(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Qn(s){return s.map(t=>t.cssText).join(`
|
|
5024
|
+
`)}const zt="vaadin-themable-mixin-style";function Su(s,t){const e=document.createElement("style");e.id=zt,e.textContent=Qn(s),t.content.appendChild(e);}function ku(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)wu(s);else {const e=s.shadowRoot.getElementById(zt),i=t.prototype._template;e.textContent=i.content.getElementById(zt).textContent;}}function Tu(s){ts.forEach(t=>{const e=t.deref();e instanceof s?ku(e):e||ts.delete(t);});}function Zn(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(zt).textContent=Qn(s.getStylesForThis());}to.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Zn(e);});}function Pu(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function I(s,t,e={}){t=Eu(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):Kn.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&to.forEach(i=>{if(Jn(s,i)&&Au(i)){const o=customElements.get(i);Pu(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Zn(o),Tu(o);}});}function is(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Kn}function Ou(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function ea(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=is().find(o=>o.moduleId===e);i?t.push(...ea(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function Du(s){const t=`${s}-default-theme`,e=is().filter(i=>i.moduleId!==t&&Jn(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...ea(i),...i.styles],includePriority:Ou(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:is().filter(i=>i.moduleId===t)}const Oe=s=>class extends Iu(s){constructor(){super(),ts.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&to.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Xn(this)||Su(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=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...Du(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
5021
5025
|
* @license
|
|
5022
5026
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5023
5027
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5024
|
-
*/const
|
|
5025
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
5028
|
+
*/const zu=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
5029
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},De=(s,...t)=>{zu(`lumo-${s}`,t);};/**
|
|
5026
5030
|
* @license
|
|
5027
5031
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5028
5032
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5029
|
-
*/const
|
|
5033
|
+
*/const Mu=p`
|
|
5030
5034
|
:host {
|
|
5031
5035
|
/* Base (background) */
|
|
5032
5036
|
--lumo-base-color: #fff;
|
|
@@ -5111,7 +5115,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5111
5115
|
--lumo-disabled-text-color: GrayText;
|
|
5112
5116
|
}
|
|
5113
5117
|
}
|
|
5114
|
-
`;
|
|
5118
|
+
`;De("color-props",Mu);const Nu=p`
|
|
5115
5119
|
[theme~='dark'] {
|
|
5116
5120
|
/* Base (background) */
|
|
5117
5121
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -5229,11 +5233,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5229
5233
|
pre code {
|
|
5230
5234
|
background: transparent;
|
|
5231
5235
|
}
|
|
5232
|
-
`;
|
|
5236
|
+
`;I("",Nu,{moduleId:"lumo-color"});/**
|
|
5233
5237
|
* @license
|
|
5234
5238
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5235
5239
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5236
|
-
*/const
|
|
5240
|
+
*/const Lu=p`
|
|
5237
5241
|
@font-face {
|
|
5238
5242
|
font-family: 'lumo-icons';
|
|
5239
5243
|
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=)
|
|
@@ -5288,11 +5292,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5288
5292
|
--lumo-icons-upload: '\\ea2b';
|
|
5289
5293
|
--lumo-icons-user: '\\ea2c';
|
|
5290
5294
|
}
|
|
5291
|
-
`;
|
|
5295
|
+
`;De("font-icons",Lu);/**
|
|
5292
5296
|
* @license
|
|
5293
5297
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5294
5298
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5295
|
-
*/const
|
|
5299
|
+
*/const Vu=p`
|
|
5296
5300
|
:host {
|
|
5297
5301
|
/* Square */
|
|
5298
5302
|
--lumo-space-xs: 0.25rem;
|
|
@@ -5315,11 +5319,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5315
5319
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
5316
5320
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
5317
5321
|
}
|
|
5318
|
-
`;
|
|
5322
|
+
`;De("spacing-props",Vu);/**
|
|
5319
5323
|
* @license
|
|
5320
5324
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5321
5325
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5322
|
-
*/const
|
|
5326
|
+
*/const Fu=p`
|
|
5323
5327
|
:host {
|
|
5324
5328
|
/* Border radius */
|
|
5325
5329
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -5419,11 +5423,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5419
5423
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
5420
5424
|
--vaadin-input-field-value-font-weight: 500;
|
|
5421
5425
|
}
|
|
5422
|
-
`;
|
|
5426
|
+
`;De("style-props",Fu);/**
|
|
5423
5427
|
* @license
|
|
5424
5428
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5425
5429
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5426
|
-
*/const
|
|
5430
|
+
*/const Bu=p`
|
|
5427
5431
|
:host {
|
|
5428
5432
|
/* prettier-ignore */
|
|
5429
5433
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -5443,7 +5447,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5443
5447
|
--lumo-line-height-s: 1.375;
|
|
5444
5448
|
--lumo-line-height-m: 1.625;
|
|
5445
5449
|
}
|
|
5446
|
-
`,
|
|
5450
|
+
`,Ru=p`
|
|
5447
5451
|
body,
|
|
5448
5452
|
:host {
|
|
5449
5453
|
font-family: var(--lumo-font-family);
|
|
@@ -5535,11 +5539,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5535
5539
|
border-left: none;
|
|
5536
5540
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
5537
5541
|
}
|
|
5538
|
-
`;
|
|
5542
|
+
`;I("",Ru,{moduleId:"lumo-typography"});De("typography-props",Bu);/**
|
|
5539
5543
|
* @license
|
|
5540
5544
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5541
5545
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5542
|
-
*/const
|
|
5546
|
+
*/const $u=p`
|
|
5543
5547
|
:host {
|
|
5544
5548
|
--lumo-size-xs: 1.625rem;
|
|
5545
5549
|
--lumo-size-s: 1.875rem;
|
|
@@ -5554,7 +5558,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5554
5558
|
/* For backwards compatibility */
|
|
5555
5559
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
5556
5560
|
}
|
|
5557
|
-
`;
|
|
5561
|
+
`;De("sizing-props",$u);/**
|
|
5558
5562
|
* @license
|
|
5559
5563
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
5560
5564
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -5585,11 +5589,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5585
5589
|
font-family: 'lumo-icons';
|
|
5586
5590
|
display: block;
|
|
5587
5591
|
}
|
|
5588
|
-
`;
|
|
5592
|
+
`;I("",io,{moduleId:"lumo-field-button"});/**
|
|
5589
5593
|
* @license
|
|
5590
5594
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
5591
5595
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5592
|
-
*/const
|
|
5596
|
+
*/const Hu=p`
|
|
5593
5597
|
:host {
|
|
5594
5598
|
font-size: var(--lumo-font-size-xxs);
|
|
5595
5599
|
line-height: 1;
|
|
@@ -5678,7 +5682,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5678
5682
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
5679
5683
|
pointer-events: none;
|
|
5680
5684
|
}
|
|
5681
|
-
`;
|
|
5685
|
+
`;I("vaadin-multi-select-combo-box-chip",[io,Hu],{moduleId:"lumo-multi-select-combo-box-chip"});I("vaadin-input-container",p`
|
|
5682
5686
|
:host {
|
|
5683
5687
|
background: var(--_background);
|
|
5684
5688
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -5940,7 +5944,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5940
5944
|
width: var(--lumo-icon-size-m);
|
|
5941
5945
|
height: var(--lumo-icon-size-m);
|
|
5942
5946
|
}
|
|
5943
|
-
`;
|
|
5947
|
+
`;I("vaadin-item",so,{moduleId:"lumo-item"});const ta=p`
|
|
5944
5948
|
:host {
|
|
5945
5949
|
transition: background-color 100ms;
|
|
5946
5950
|
overflow: hidden;
|
|
@@ -5952,11 +5956,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5952
5956
|
:host([focused]:not([disabled])) {
|
|
5953
5957
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
5954
5958
|
}
|
|
5955
|
-
`;
|
|
5959
|
+
`;I("vaadin-combo-box-item",[so,ta],{moduleId:"lumo-combo-box-item"});/**
|
|
5956
5960
|
* @license
|
|
5957
5961
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
5958
5962
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5959
|
-
*/const
|
|
5963
|
+
*/const ia=p`
|
|
5960
5964
|
[part~='loader'] {
|
|
5961
5965
|
box-sizing: border-box;
|
|
5962
5966
|
width: var(--lumo-icon-size-s);
|
|
@@ -6002,7 +6006,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6002
6006
|
* @license
|
|
6003
6007
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6004
6008
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6005
|
-
*/const
|
|
6009
|
+
*/const Gt=p`
|
|
6006
6010
|
:host {
|
|
6007
6011
|
top: var(--lumo-space-m);
|
|
6008
6012
|
right: var(--lumo-space-m);
|
|
@@ -6067,11 +6071,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6067
6071
|
opacity: 1;
|
|
6068
6072
|
}
|
|
6069
6073
|
}
|
|
6070
|
-
`;
|
|
6074
|
+
`;I("",Gt,{moduleId:"lumo-overlay"});/**
|
|
6071
6075
|
* @license
|
|
6072
6076
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6073
6077
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6074
|
-
*/const
|
|
6078
|
+
*/const Kt=p`
|
|
6075
6079
|
:host([opening]),
|
|
6076
6080
|
:host([closing]) {
|
|
6077
6081
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -6101,7 +6105,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6101
6105
|
opacity: 0;
|
|
6102
6106
|
}
|
|
6103
6107
|
}
|
|
6104
|
-
`;
|
|
6108
|
+
`;I("",Kt,{moduleId:"lumo-menu-overlay-core"});const qu=p`
|
|
6105
6109
|
/* Small viewport (bottom sheet) styles */
|
|
6106
6110
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
6107
6111
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -6163,7 +6167,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6163
6167
|
transform: translateY(150%);
|
|
6164
6168
|
}
|
|
6165
6169
|
}
|
|
6166
|
-
`,
|
|
6170
|
+
`,Uu=[Gt,Kt,qu];I("",Uu,{moduleId:"lumo-menu-overlay"});const sa=p`
|
|
6167
6171
|
[part='content'] {
|
|
6168
6172
|
padding: 0;
|
|
6169
6173
|
}
|
|
@@ -6184,7 +6188,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6184
6188
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
6185
6189
|
margin-bottom: var(--lumo-space-xs);
|
|
6186
6190
|
}
|
|
6187
|
-
`,
|
|
6191
|
+
`,oa=p`
|
|
6188
6192
|
[part~='loader'] {
|
|
6189
6193
|
position: absolute;
|
|
6190
6194
|
z-index: 1;
|
|
@@ -6192,7 +6196,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6192
6196
|
top: var(--lumo-space-s);
|
|
6193
6197
|
margin-inline: auto 0;
|
|
6194
6198
|
}
|
|
6195
|
-
`;
|
|
6199
|
+
`;I("vaadin-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
6196
6200
|
:host {
|
|
6197
6201
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
6198
6202
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -6201,7 +6205,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6201
6205
|
* @license
|
|
6202
6206
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6203
6207
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6204
|
-
*/const
|
|
6208
|
+
*/const Wu=p`
|
|
6205
6209
|
:host {
|
|
6206
6210
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
6207
6211
|
}
|
|
@@ -6261,16 +6265,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6261
6265
|
* @license
|
|
6262
6266
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6263
6267
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6264
|
-
*/const
|
|
6268
|
+
*/const ra=p`
|
|
6265
6269
|
[part='label'] {
|
|
6266
6270
|
align-self: flex-start;
|
|
6267
6271
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
6268
6272
|
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
6269
6273
|
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
6270
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
6271
6274
|
transition: color 0.2s;
|
|
6272
6275
|
line-height: 1;
|
|
6273
|
-
padding-
|
|
6276
|
+
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
|
|
6277
|
+
padding-inline-end: 1em;
|
|
6274
6278
|
padding-bottom: 0.5em;
|
|
6275
6279
|
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
6276
6280
|
negative margin to compensate */
|
|
@@ -6354,16 +6358,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6354
6358
|
|
|
6355
6359
|
/* RTL specific styles */
|
|
6356
6360
|
|
|
6357
|
-
:host([dir='rtl']) [part='label'] {
|
|
6358
|
-
margin-left: 0;
|
|
6359
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
6360
|
-
}
|
|
6361
|
-
|
|
6362
|
-
:host([dir='rtl']) [part='label'] {
|
|
6363
|
-
padding-left: 1em;
|
|
6364
|
-
padding-right: 0;
|
|
6365
|
-
}
|
|
6366
|
-
|
|
6367
6361
|
:host([dir='rtl']) [part='required-indicator']::after {
|
|
6368
6362
|
right: auto;
|
|
6369
6363
|
left: 0;
|
|
@@ -6373,11 +6367,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6373
6367
|
margin-left: 0;
|
|
6374
6368
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
6375
6369
|
}
|
|
6376
|
-
`;
|
|
6370
|
+
`;I("",ra,{moduleId:"lumo-required-field"});/**
|
|
6377
6371
|
* @license
|
|
6378
6372
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6379
6373
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6380
|
-
*/const
|
|
6374
|
+
*/const ju=p`
|
|
6381
6375
|
:host {
|
|
6382
6376
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
6383
6377
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -6525,27 +6519,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6525
6519
|
[part='clear-button']::before {
|
|
6526
6520
|
content: var(--lumo-icons-cross);
|
|
6527
6521
|
}
|
|
6528
|
-
`,
|
|
6522
|
+
`,na=[ra,io,Wu,ju];I("",na,{moduleId:"lumo-input-field-shared-styles"});/**
|
|
6529
6523
|
* @license
|
|
6530
6524
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6531
6525
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6532
|
-
*/const
|
|
6526
|
+
*/const Yu=p`
|
|
6533
6527
|
@media (any-hover: hover) {
|
|
6534
6528
|
:host(:hover[readonly]) {
|
|
6535
6529
|
background-color: transparent;
|
|
6536
6530
|
cursor: default;
|
|
6537
6531
|
}
|
|
6538
6532
|
}
|
|
6539
|
-
`;
|
|
6533
|
+
`;I("vaadin-multi-select-combo-box-item",[so,ta,Yu],{moduleId:"lumo-multi-select-combo-box-item"});I("vaadin-multi-select-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
6540
6534
|
:host {
|
|
6541
6535
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
6542
6536
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
6543
6537
|
}
|
|
6544
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"});
|
|
6538
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"});I("vaadin-multi-select-combo-box-container",p`
|
|
6545
6539
|
:host([auto-expand-vertically]) {
|
|
6546
6540
|
padding-block: var(--lumo-space-xs);
|
|
6547
6541
|
}
|
|
6548
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
6542
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const Gu=p`
|
|
6549
6543
|
:host([has-value]) {
|
|
6550
6544
|
padding-inline-start: 0;
|
|
6551
6545
|
}
|
|
@@ -6598,11 +6592,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6598
6592
|
color: var(--lumo-contrast-60pct);
|
|
6599
6593
|
cursor: var(--lumo-clickable-cursor);
|
|
6600
6594
|
}
|
|
6601
|
-
`;
|
|
6595
|
+
`;I("vaadin-multi-select-combo-box",[na,Gu],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
6602
6596
|
* @license
|
|
6603
6597
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6604
6598
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6605
|
-
*/const
|
|
6599
|
+
*/const Ku=p`
|
|
6606
6600
|
:host {
|
|
6607
6601
|
max-width: 100%;
|
|
6608
6602
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
@@ -6641,7 +6635,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6641
6635
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
6642
6636
|
width: auto;
|
|
6643
6637
|
}
|
|
6644
|
-
`,
|
|
6638
|
+
`,Xu=p`
|
|
6645
6639
|
:host {
|
|
6646
6640
|
display: inline-flex;
|
|
6647
6641
|
align-items: center;
|
|
@@ -6670,22 +6664,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6670
6664
|
* @license
|
|
6671
6665
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6672
6666
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6673
|
-
*/
|
|
6667
|
+
*/I("vaadin-multi-select-combo-box-chip",Xu,{moduleId:"vaadin-multi-select-combo-box-chip"});class Ju extends Oe(y){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 b`
|
|
6674
6668
|
<div part="label">[[label]]</div>
|
|
6675
6669
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
6676
|
-
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}
|
|
6670
|
+
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}J(Ju);/**
|
|
6677
6671
|
* @license
|
|
6678
6672
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6679
6673
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6680
|
-
*/const
|
|
6674
|
+
*/const W=[];function ss(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function os(){return document.documentElement.getAttribute("dir")}function Qu(){const s=os();W.forEach(t=>{ss(t,s);});}const Zu=new MutationObserver(Qu);Zu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Xt=s=>class extends s{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(),ss(this,os(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=os(),n=o===r&&W.indexOf(this)===-1,a=!o&&i&&W.indexOf(this)===-1;n||a?(this.__subscribe(),ss(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=W.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){W.includes(this)||W.push(this);}__unsubscribe(){W.includes(this)&&W.splice(W.indexOf(this),1);}};/**
|
|
6681
6675
|
* @license
|
|
6682
6676
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6683
6677
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6684
|
-
*/const
|
|
6685
|
-
* @license
|
|
6686
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6687
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6688
|
-
*/const Ju=p`
|
|
6678
|
+
*/const ep=p`
|
|
6689
6679
|
:host {
|
|
6690
6680
|
display: flex;
|
|
6691
6681
|
align-items: center;
|
|
@@ -6755,15 +6745,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6755
6745
|
* @license
|
|
6756
6746
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6757
6747
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6758
|
-
*/
|
|
6748
|
+
*/const tp=s=>class extends s{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(i=>i.focus&&i.focus());});}};/**
|
|
6749
|
+
* @license
|
|
6750
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6751
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6752
|
+
*/I("vaadin-input-container",ep,{moduleId:"vaadin-input-container-styles"});class aa extends tp(Oe(Xt(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
6759
6753
|
<slot name="prefix"></slot>
|
|
6760
6754
|
<slot></slot>
|
|
6761
6755
|
<slot name="suffix"></slot>
|
|
6762
|
-
`}}
|
|
6756
|
+
`}}J(aa);/**
|
|
6763
6757
|
* @license
|
|
6764
6758
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6765
6759
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6766
|
-
*/
|
|
6760
|
+
*/I("vaadin-multi-select-combo-box-container",p`
|
|
6767
6761
|
#wrapper {
|
|
6768
6762
|
display: flex;
|
|
6769
6763
|
width: 100%;
|
|
@@ -6773,15 +6767,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6773
6767
|
:host([auto-expand-vertically]) #wrapper {
|
|
6774
6768
|
flex-wrap: wrap;
|
|
6775
6769
|
}
|
|
6776
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let
|
|
6770
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let _t;class ip extends aa{static get is(){return "vaadin-multi-select-combo-box-container"}static get template(){if(!_t){_t=super.template.cloneNode(!0);const t=_t.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1]);}return _t}static get properties(){return {autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}J(ip);/**
|
|
6777
6771
|
* @license
|
|
6778
6772
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6779
6773
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6780
|
-
*/const
|
|
6774
|
+
*/const sp=s=>class extends s{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,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,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,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
6781
6775
|
* @license
|
|
6782
6776
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6783
6777
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6784
|
-
*/class
|
|
6778
|
+
*/class op extends sp(Oe(Xt(y))){static get is(){return "vaadin-multi-select-combo-box-item"}static get template(){return b`
|
|
6785
6779
|
<style>
|
|
6786
6780
|
:host {
|
|
6787
6781
|
display: block;
|
|
@@ -6795,67 +6789,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6795
6789
|
<div part="content">
|
|
6796
6790
|
<slot></slot>
|
|
6797
6791
|
</div>
|
|
6798
|
-
`}}
|
|
6792
|
+
`}}J(op);/**
|
|
6799
6793
|
* @license
|
|
6800
6794
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6801
6795
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6802
|
-
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function
|
|
6796
|
+
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function rs(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function ro(){return oo}function rp(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function np(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function ap(s,t){const e=[];for(;s.length>0&&t.length>0;)np(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function ns(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=ns(s.slice(0,e)),o=ns(s.slice(e));return ap(i,o)}function la(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function da(s){return s.getRootNode().activeElement===s}function lp(s){if(!la(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function ha(s,t){if(s.nodeType!==Node.ELEMENT_NODE||rp(s))return !1;const e=s,i=lp(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=ha(n,t)||o;}),o}function dp(s){const t=[];return ha(s,t)?ns(t):t}/**
|
|
6803
6797
|
* @license
|
|
6804
6798
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6805
6799
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6806
|
-
*/function
|
|
6800
|
+
*/function hp(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function no(s){return s?new Set(s.split(" ")):new Set}function Jt(s){return s?[...s].join(" "):""}function ca(s,t,e){const i=no(s.getAttribute(t));i.add(e),s.setAttribute(t,Jt(i));}function cp(s,t,e){const i=no(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Jt(i));}function up(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
6807
6801
|
* @license
|
|
6808
6802
|
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
6809
6803
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6810
|
-
*/function
|
|
6804
|
+
*/function pp(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
6811
6805
|
* @license
|
|
6812
6806
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6813
6807
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6814
|
-
*/const
|
|
6808
|
+
*/const yi={start:"top",end:"bottom"},xi={start:"left",end:"right"},rr=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),_p=s=>class extends s{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=hp(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=pp(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,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,rr.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,rr.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],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 i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,yi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,xi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,xi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,yi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===yi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===xi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
6815
6809
|
* @license
|
|
6816
6810
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6817
6811
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6818
|
-
*/const
|
|
6812
|
+
*/const mp=s=>class extends _p(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!la(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.offsetWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
6819
6813
|
* @license
|
|
6820
6814
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6821
6815
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6822
|
-
*/const
|
|
6816
|
+
*/const Qt=s=>s.test(navigator.userAgent),as=s=>s.test(navigator.platform),fp=s=>s.test(navigator.vendor);Qt(/Android/u);Qt(/Chrome/u)&&fp(/Google Inc/u);Qt(/Firefox/u);const vp=as(/^iPad/u)||as(/^Mac/u)&&navigator.maxTouchPoints>1,gp=as(/^iPhone/u),bp=gp||vp,yp=Qt(/^((?!chrome|android).)*safari/iu),ls=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
6823
6817
|
* @license
|
|
6824
6818
|
* Copyright (c) 2017 Anton Korzunov
|
|
6825
6819
|
* SPDX-License-Identifier: MIT
|
|
6826
|
-
*/let
|
|
6820
|
+
*/let ge=new WeakMap,mt=new WeakMap,ft={},Ci=0;const nr=s=>s&&s.nodeType===Node.ELEMENT_NODE,wi=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},xp=(s,t)=>nr(s)?t.map(e=>{if(!nr(e))return wi(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return wi(e,"is not contained inside",s),null}).filter(e=>!!e):(wi(s,"is not a valid element"),[]),Cp=(s,t,e,i)=>{const o=xp(t,Array.isArray(s)?s:[s]);ft[e]||(ft[e]=new WeakMap);const r=ft[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ge.get(m)||0)+1,C=(r.get(m)||0)+1;ge.set(m,w),r.set(m,C),n.push(m),w===1&&k&&mt.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),Ci+=1,()=>{n.forEach(c=>{const u=ge.get(c)-1,_=r.get(c)-1;ge.set(c,u),r.set(c,_),u||(mt.has(c)?mt.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),Ci-=1,Ci||(ge=new WeakMap,ge=new WeakMap,mt=new WeakMap,ft={});}},wp=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),Cp(i,t,e,"aria-hidden")};/**
|
|
6827
6821
|
* @license
|
|
6828
6822
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6829
6823
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6830
|
-
*/class
|
|
6824
|
+
*/class Ip{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=wp(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
|
|
6831
6825
|
* @license
|
|
6832
6826
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6833
6827
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6834
|
-
*/class
|
|
6828
|
+
*/class Ap{saveFocus(t){this.focusNode=t||rs();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;rs()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
|
|
6835
6829
|
* @license
|
|
6836
6830
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6837
6831
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6838
|
-
*/const
|
|
6832
|
+
*/const Ii=[];class Ep{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return dp(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(da).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ii.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Ii.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Ii).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}const ua=new WeakMap;function Sp(s,t){let e=t;for(;e;){if(ua.get(e)===s)return !0;e=Object.getPrototypeOf(e);}return !1}function L(s){return t=>{if(Sp(s,t))return t;const e=s(t);return ua.set(e,s),e}}/**
|
|
6839
6833
|
* @license
|
|
6840
6834
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6841
6835
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6842
|
-
*/const
|
|
6836
|
+
*/const Zt=L(s=>typeof s.prototype.addController=="function"?s:class extends s{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);}});/**
|
|
6843
6837
|
* @license
|
|
6844
6838
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6845
6839
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6846
|
-
*/const
|
|
6840
|
+
*/const kp=s=>class extends Zt(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ip(this),this.__focusTrapController=new Ep(this),this.__focusRestorationController=new Ap;}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=!ro();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=rs();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
6847
6841
|
* @license
|
|
6848
6842
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6849
6843
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6850
|
-
*/const
|
|
6844
|
+
*/const pa=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),ds=()=>pa().filter(s=>s.$.overlay),Tp=(s,t=e=>!0)=>{const e=ds().filter(t);return s===e.pop()},ar=new WeakMap,Pp=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Tp(this)}bringToFront(){let e="";const i=pa().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex),ar.has(this)&&ar.get(this).bringToFront();}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ds().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=ds();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
6851
6845
|
* @license
|
|
6852
6846
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6853
6847
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6854
|
-
*/const
|
|
6848
|
+
*/const Op=s=>class extends kp(Pp(s)){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),bp&&(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 i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-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,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){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()):i&&(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),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_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 i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
6855
6849
|
* @license
|
|
6856
6850
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6857
6851
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6858
|
-
*/const
|
|
6852
|
+
*/const Dp=p`
|
|
6859
6853
|
:host {
|
|
6860
6854
|
z-index: 200;
|
|
6861
6855
|
position: fixed;
|
|
@@ -6918,7 +6912,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6918
6912
|
* @license
|
|
6919
6913
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6920
6914
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6921
|
-
*/const
|
|
6915
|
+
*/const zp=p`
|
|
6922
6916
|
#overlay {
|
|
6923
6917
|
width: var(
|
|
6924
6918
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -6931,25 +6925,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6931
6925
|
flex-direction: column;
|
|
6932
6926
|
height: 100%;
|
|
6933
6927
|
}
|
|
6934
|
-
`;
|
|
6928
|
+
`;I("vaadin-multi-select-combo-box-overlay",[Dp,zp],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Mp extends mp(Op(Xt(Oe(y)))){static get is(){return "vaadin-multi-select-combo-box-overlay"}static get template(){return b`
|
|
6935
6929
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
6936
6930
|
<div part="overlay" id="overlay">
|
|
6937
6931
|
<div part="loader"></div>
|
|
6938
6932
|
<div part="content" id="content"><slot></slot></div>
|
|
6939
6933
|
</div>
|
|
6940
|
-
`}}
|
|
6934
|
+
`}}J(Mp);/**
|
|
6941
6935
|
* @license
|
|
6942
6936
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6943
6937
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6944
|
-
*/const
|
|
6938
|
+
*/const se=class{toString(){return ""}};/**
|
|
6945
6939
|
* @license
|
|
6946
6940
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
6947
6941
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6948
|
-
*/function
|
|
6942
|
+
*/function Mt(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
6949
6943
|
* @license
|
|
6950
6944
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6951
6945
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6952
|
-
*/let
|
|
6946
|
+
*/let Np=0;function _a(){return Np++}/**
|
|
6953
6947
|
* @license
|
|
6954
6948
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6955
6949
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6957,7 +6951,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6957
6951
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6958
6952
|
* Code distributed by Google as part of the polymer project is also
|
|
6959
6953
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6960
|
-
*/let lr=0,
|
|
6954
|
+
*/let lr=0,ma=0;const we=[];let hs=!1;function Lp(){hs=!1;const s=we.length;for(let t=0;t<s;t++){const e=we[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}we.splice(0,s),ma+=s;}const Ct={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},ot={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},fa={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},cs={run(s){hs||(hs=!0,queueMicrotask(()=>Lp())),we.push(s);const t=lr;return lr+=1,t},cancel(s){const t=s-ma;if(t>=0){if(!we[t])throw new Error(`invalid async handle: ${s}`);we[t]=null;}}};/**
|
|
6961
6955
|
@license
|
|
6962
6956
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
6963
6957
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6965,7 +6959,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
6965
6959
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6966
6960
|
Code distributed by Google as part of the polymer project is also
|
|
6967
6961
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6968
|
-
*/const
|
|
6962
|
+
*/const rt=new Set;class N{static debounce(t,e,i){return t instanceof N?t._cancelAsync():t=new N,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,rt.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),rt.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 va(s){rt.add(s);}function Vp(){const s=!!rt.size;return rt.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const qe=()=>{let s;do s=Vp();while(s)};/**
|
|
6969
6963
|
* @license
|
|
6970
6964
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
6971
6965
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -6973,19 +6967,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6973
6967
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
6974
6968
|
* Code distributed by Google as part of the polymer project is also
|
|
6975
6969
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
6976
|
-
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
6970
|
+
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Fp=dr&&dr[1]>=8,hr=3,Bp={_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 s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),cs);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,hr,this._virtualCount-this._virtualStart)-this._physicalCount;let i=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 r=0;r<e;r++)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,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),fa):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),cs));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(hr));},_itemsChanged(s){s.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,ot));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!Fp&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(qe(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),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);},ot);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=N.debounce(this._debouncers[s],e,t.bind(this)),va(this._debouncers[s]);}};/**
|
|
6977
6971
|
* @license
|
|
6978
6972
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6979
6973
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6980
|
-
*/const Np=1e5,Ii=1e3;class fa{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,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:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ii?(i=t,this._vidxOffset=0):(i=Ii,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),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(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,st,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,hs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Np)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const 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 t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,xt.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,xt.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,st,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,xt.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(fp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ii,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(fa.prototype,Mp);class Lp{constructor(t){this.__adapter=new fa(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
6974
|
+
*/const Rp=1e5,Ai=1e3;class ga{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,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:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ai?(i=t,this._vidxOffset=0):(i=Ai,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),qe(),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(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){qe();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,ot,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),qe(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),qe(),this._debounce("_update",this._update,cs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Rp)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const 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 t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,Ct.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,Ct.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,ot,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,Ct.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(yp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ai,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(ga.prototype,Bp);class $p{constructor(t){this.__adapter=new ga(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
6981
6975
|
* @license
|
|
6982
6976
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
6983
6977
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6984
|
-
*/const
|
|
6978
|
+
*/const Hp=s=>class extends s{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(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${_a()}`,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 i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof se?!1:o&&e!==void 0&&i!==void 0?Mt(o,e)===Mt(o,i):e===i}__initVirtualizer(){this.__virtualizer=new $p({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,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&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}};/**
|
|
6985
6979
|
* @license
|
|
6986
6980
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6987
6981
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6988
|
-
*/class
|
|
6982
|
+
*/class qp extends Hp(y){static get is(){return "vaadin-multi-select-combo-box-scroller"}static get template(){return b`
|
|
6989
6983
|
<style>
|
|
6990
6984
|
:host {
|
|
6991
6985
|
display: block;
|
|
@@ -7012,67 +7006,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7012
7006
|
<div id="selector">
|
|
7013
7007
|
<slot></slot>
|
|
7014
7008
|
</div>
|
|
7015
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof
|
|
7009
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof se||this.owner.readonly?!1:this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly);}}J(qp);/**
|
|
7016
7010
|
* @license
|
|
7017
7011
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7018
7012
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7019
|
-
*/function
|
|
7013
|
+
*/function Nt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Nt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function ba({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=ba({getItemId:s},r,e,i+1,n+1);if(a)return a}}function ya(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?ya(r,e,i+o+1):i+o}/**
|
|
7020
7014
|
* @license
|
|
7021
7015
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7022
7016
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7023
|
-
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[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((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=
|
|
7017
|
+
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[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((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Nt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Nt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}/**
|
|
7024
7018
|
* @license
|
|
7025
7019
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7026
7020
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7027
|
-
*/class
|
|
7021
|
+
*/class Up extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}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 Nt(this.rootCache,e)}getItemContext(e){return ba({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return ya(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new ao(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
|
|
7028
7022
|
* @license
|
|
7029
7023
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
7030
7024
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7031
|
-
*/const
|
|
7025
|
+
*/const Wp=s=>class extends s{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 Up(this,{placeholder:new se,isPlaceholder:e=>e instanceof se,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 i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),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:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.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,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),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,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(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`");}}};/**
|
|
7032
7026
|
* @license
|
|
7033
7027
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7034
7028
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7035
|
-
*/const
|
|
7029
|
+
*/const xa=L(s=>class extends s{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();}});/**
|
|
7036
7030
|
* @license
|
|
7037
7031
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7038
7032
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7039
|
-
*/const
|
|
7033
|
+
*/const Ca=L(s=>class extends s{get _keyboardActive(){return ro()}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}});/**
|
|
7040
7034
|
* @license
|
|
7041
7035
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7042
7036
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7043
|
-
*/const lo=
|
|
7037
|
+
*/const lo=L(s=>class extends s{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){}});/**
|
|
7044
7038
|
* @license
|
|
7045
7039
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
7046
7040
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7047
|
-
*/const
|
|
7041
|
+
*/const jp=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
7048
7042
|
* @license
|
|
7049
7043
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7050
7044
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7051
|
-
*/function
|
|
7045
|
+
*/function wa(s){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(s);return}s.querySelector("template")&&console.warn(`WARNING: <template> inside <${s.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`);}/**
|
|
7052
7046
|
* @license
|
|
7053
7047
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7054
7048
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7055
|
-
*/const ho=
|
|
7049
|
+
*/const ho=L(s=>class extends s{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,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}});/**
|
|
7056
7050
|
* @license
|
|
7057
7051
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7058
7052
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7059
|
-
*/const co=
|
|
7053
|
+
*/const co=L(s=>class extends s{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();}});/**
|
|
7060
7054
|
* @license
|
|
7061
7055
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7062
7056
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7063
|
-
*/class
|
|
7057
|
+
*/class Yp{constructor(t){this.host=t,t.addEventListener("opened-changed",()=>{t.opened||this.__setVirtualKeyboardEnabled(!1);}),t.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),t.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0));}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none");}}/**
|
|
7064
7058
|
* @license
|
|
7065
7059
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
7066
7060
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7067
|
-
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof ie?!1:t(e))}const Up=s=>class extends $p(Qt(co(ya(lo(ho(ba(s))))))){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 i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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),xa(this),this.addController(new Hp(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,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.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",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&la(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!as&&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 i=e&&this.itemLabelPath?zt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?zt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_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,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_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",i=>i.preventDefault()),e.addEventListener("click",()=>{as&&!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||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!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 i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(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,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]: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 i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n: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,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof ie)&&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(ro()){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());}};/**
|
|
7061
|
+
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof se?!1:t(e))}const Gp=s=>class extends jp(Zt(co(Ca(lo(ho(xa(s))))))){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 i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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),wa(this),this.addController(new Yp(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,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.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",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&da(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!ls&&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 i=e&&this.itemLabelPath?Mt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Mt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_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,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_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",i=>i.preventDefault()),e.addEventListener("click",()=>{ls&&!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||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!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 i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(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,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]: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 i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n: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,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof se)&&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(ro()){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());}};/**
|
|
7068
7062
|
* @license
|
|
7069
7063
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7070
7064
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7071
|
-
*/const
|
|
7065
|
+
*/const Kp=s=>class extends Wp(Gp(s)){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 i=e.filter(o=>this._comboBox._findIndex(o,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(i));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 i=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(i);}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 se||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();}};/**
|
|
7072
7066
|
* @license
|
|
7073
7067
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7074
7068
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7075
|
-
*/class
|
|
7069
|
+
*/class Xp extends Kp(Oe(y)){static get is(){return "vaadin-multi-select-combo-box-internal"}static get template(){return b`
|
|
7076
7070
|
<style>
|
|
7077
7071
|
:host([opened]) {
|
|
7078
7072
|
pointer-events: auto;
|
|
@@ -7090,15 +7084,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7090
7084
|
no-vertical-overlap
|
|
7091
7085
|
restore-focus-node="[[inputElement]]"
|
|
7092
7086
|
></vaadin-multi-select-combo-box-overlay>
|
|
7093
|
-
`}}
|
|
7087
|
+
`}}J(Xp);/**
|
|
7094
7088
|
* @license
|
|
7095
7089
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7096
7090
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7097
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
7091
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let Ei;const pr=new Set,Jp=s=>class extends Xt(s){static finalize(){super.finalize();const{is:e}=this;e&&!pr.has(e)&&(window.Vaadin.registrations.push(this),pr.add(e),window.Vaadin.developmentModeCallback&&(Ei=N.debounce(Ei,fa,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),va(Ei)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
7098
7092
|
* @license
|
|
7099
7093
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7100
7094
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7101
|
-
*/const
|
|
7095
|
+
*/const Qp=p`
|
|
7102
7096
|
[part='clear-button'] {
|
|
7103
7097
|
display: none;
|
|
7104
7098
|
cursor: default;
|
|
@@ -7115,7 +7109,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7115
7109
|
* @license
|
|
7116
7110
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7117
7111
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7118
|
-
*/const
|
|
7112
|
+
*/const Zp=p`
|
|
7113
|
+
[class$='container'] {
|
|
7114
|
+
display: flex;
|
|
7115
|
+
flex-direction: column;
|
|
7116
|
+
min-width: 100%;
|
|
7117
|
+
max-width: 100%;
|
|
7118
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
7119
|
+
}
|
|
7120
|
+
`;/**
|
|
7121
|
+
* @license
|
|
7122
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7123
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7124
|
+
*/const e_=p`
|
|
7119
7125
|
:host {
|
|
7120
7126
|
display: inline-flex;
|
|
7121
7127
|
outline: none;
|
|
@@ -7153,125 +7159,113 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7153
7159
|
* @license
|
|
7154
7160
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7155
7161
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7156
|
-
*/const
|
|
7157
|
-
[class$='container'] {
|
|
7158
|
-
display: flex;
|
|
7159
|
-
flex-direction: column;
|
|
7160
|
-
min-width: 100%;
|
|
7161
|
-
max-width: 100%;
|
|
7162
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
7163
|
-
}
|
|
7164
|
-
`;/**
|
|
7165
|
-
* @license
|
|
7166
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7167
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7168
|
-
*/const Xp=[Gp,Kp,Yp];/**
|
|
7162
|
+
*/const t_=[e_,Zp,Qp];/**
|
|
7169
7163
|
* @license
|
|
7170
7164
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
7171
7165
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7172
|
-
*/const
|
|
7166
|
+
*/const F=document.createElement("div");F.style.position="fixed";F.style.clip="rect(0px, 0px, 0px, 0px)";F.setAttribute("aria-live","polite");document.body.appendChild(F);let vt;function wt(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(F.removeAttribute("aria-live"),F.removeAttribute("role"),vt=N.debounce(vt,ot,()=>{F.setAttribute("role","alert");})):(vt&&vt.cancel(),F.removeAttribute("role"),F.setAttribute("aria-live",e)),F.textContent="",setTimeout(()=>{F.textContent=s;},i);}/**
|
|
7173
7167
|
* @license
|
|
7174
7168
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7175
7169
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7176
|
-
*/const
|
|
7170
|
+
*/const gt=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.isConnected&&(t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect);}):t.target._onResize(t.contentRect));});});}),i_=L(s=>class extends s{get _observeParent(){return !1}connectedCallback(){if(super.connectedCallback(),gt.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,gt.observe(e)),e.resizables.add(this),this.__parent=e;}}disconnectedCallback(){super.disconnectedCallback(),gt.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const i=e.resizables;i&&(i.delete(this),i.size===0&>.unobserve(e)),this.__parent=null;}}_onResize(e){}});/**
|
|
7177
7171
|
* @license
|
|
7178
7172
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
7179
7173
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7180
|
-
*/class
|
|
7174
|
+
*/class s_{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}}/**
|
|
7181
7175
|
* @license
|
|
7182
7176
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7183
7177
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7184
|
-
*/class
|
|
7178
|
+
*/class ei extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${_a()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,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(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new s_(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!up(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)));});}}/**
|
|
7185
7179
|
* @license
|
|
7186
7180
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
7187
7181
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7188
|
-
*/class
|
|
7182
|
+
*/class o_ extends ei{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(t.shouldShow=this.shouldShow),this.__notifyChange();}teardownNode(){this.__notifyChange();}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t);}setContext(t){this.context=t;const e=this.node;e&&(e.context=t);}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t);}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t);}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t);}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t);}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t);}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}));}}/**
|
|
7189
7183
|
* @license
|
|
7190
7184
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7191
7185
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7192
|
-
*/const
|
|
7186
|
+
*/const r_=s=>class extends xa(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),!this.__shouldAllowFocusWhenDisabled()&&(e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):i&&(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}};/**
|
|
7193
7187
|
* @license
|
|
7194
7188
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7195
7189
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7196
|
-
*/const
|
|
7190
|
+
*/const n_=L(s=>class extends Ca(r_(s)){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,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_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,i){super._disabledChanged(e,i),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");}});/**
|
|
7197
7191
|
* @license
|
|
7198
7192
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7199
7193
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7200
|
-
*/const
|
|
7194
|
+
*/const Si=new WeakMap;function a_(s){return Si.has(s)||Si.set(s,new Set),Si.get(s)}function l_(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const d_=L(s=>class extends s{get slotStyles(){return []}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=a_(e);this.slotStyles.forEach(o=>{i.has(o)||(l_(o,e),i.add(o));});}});/**
|
|
7201
7195
|
* @license
|
|
7202
7196
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7203
7197
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7204
|
-
*/const
|
|
7198
|
+
*/const h_=s=>class extends ho(lo(s)){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(),ls||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}));}};/**
|
|
7205
7199
|
* @license
|
|
7206
7200
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
7207
7201
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7208
|
-
*/const
|
|
7202
|
+
*/const ki=new Map;function uo(s){return ki.has(s)||ki.set(s,new WeakMap),ki.get(s)}function Ia(s,t){s&&s.removeAttribute(t);}function Aa(s,t){if(!s||!t)return;const e=uo(t);if(e.has(s))return;const i=no(s.getAttribute(t));e.set(s,new Set(i));}function c_(s,t){if(!s||!t)return;const e=uo(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):ca(s,t,Jt(i)),e.delete(s);}function Ti(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=uo(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):Aa(s,t),Ia(s,t)),cp(s,t,o);const l=i||Jt(a);l&&ca(s,t,l);}function u_(s,t){Aa(s,t),Ia(s,t);}/**
|
|
7209
7203
|
* @license
|
|
7210
7204
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7211
7205
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7212
|
-
*/class
|
|
7206
|
+
*/class p_{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,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(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(u_(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(c_(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){Ti(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){Ti(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){Ti(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")));}}/**
|
|
7213
7207
|
* @license
|
|
7214
7208
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
7215
7209
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7216
|
-
*/class po extends
|
|
7210
|
+
*/class po extends ei{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}}/**
|
|
7217
7211
|
* @license
|
|
7218
7212
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7219
7213
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7220
|
-
*/class
|
|
7214
|
+
*/class __ extends po{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&wt(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
|
|
7221
7215
|
* @license
|
|
7222
7216
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7223
7217
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7224
|
-
*/class
|
|
7218
|
+
*/class m_ extends po{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
7225
7219
|
* @license
|
|
7226
7220
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7227
7221
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7228
|
-
*/class
|
|
7222
|
+
*/class f_ extends po{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
7229
7223
|
* @license
|
|
7230
7224
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7231
7225
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7232
|
-
*/const
|
|
7226
|
+
*/const v_=L(s=>class extends Zt(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new f_(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);}});/**
|
|
7233
7227
|
* @license
|
|
7234
7228
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7235
7229
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7236
|
-
*/const
|
|
7230
|
+
*/const g_=s=>class extends co(v_(Zt(s))){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 p_(this),this._helperController=new m_(this),this._errorController=new __(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:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,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,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.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 i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
7237
7231
|
* @license
|
|
7238
7232
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7239
7233
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7240
|
-
*/const
|
|
7234
|
+
*/const b_=L(s=>class extends s{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((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
7241
7235
|
* @license
|
|
7242
7236
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7243
7237
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7244
|
-
*/const
|
|
7238
|
+
*/const y_=L(s=>class extends b_(co(ho(s))){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(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this._requestValidation():r&&!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}});/**
|
|
7245
7239
|
* @license
|
|
7246
7240
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7247
7241
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7248
|
-
*/const
|
|
7242
|
+
*/const x_=s=>class extends d_(n_(y_(g_(h_(lo(s)))))){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 [`
|
|
7249
7243
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
7250
7244
|
font: inherit;
|
|
7251
7245
|
color: inherit;
|
|
7252
7246
|
}
|
|
7253
|
-
`]}_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=N.debounce(this._preventInputDebouncer,
|
|
7247
|
+
`]}_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=N.debounce(this._preventInputDebouncer,Ct.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 i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(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(i){console.error(i);}}};/**
|
|
7254
7248
|
* @license
|
|
7255
7249
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7256
7250
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7257
|
-
*/class
|
|
7251
|
+
*/class C_ extends ei{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}}/**
|
|
7258
7252
|
* @license
|
|
7259
7253
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7260
7254
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7261
|
-
*/class
|
|
7255
|
+
*/class w_{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.detail.node);}),this.__initLabel(e.node);}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id));}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t);};this.input.addEventListener("click",t);}}/**
|
|
7262
7256
|
* @license
|
|
7263
7257
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7264
7258
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7265
|
-
*/const
|
|
7259
|
+
*/const I_=s=>class extends x_(i_(s)){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,`
|
|
7266
7260
|
${e}[has-value] input::placeholder {
|
|
7267
7261
|
color: transparent !important;
|
|
7268
7262
|
forced-color-adjust: none;
|
|
7269
7263
|
}
|
|
7270
|
-
`]}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
|
|
7264
|
+
`]}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 C_(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new w_(this.inputElement,this._labelController)),this._tooltipController=new o_(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 ei(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",i=>this._preventBlur(i)),this._overflow=e;}}),this.addController(this._overflowController),this.__updateChips(),wa(this);}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),wt(this.i18n.cleared);}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache();}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate();}_disabledChanged(e,i){super._disabledChanged(e,i),(e||i)&&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,i){if(this.stateTarget){if(e==="required"){this._delegateAttribute("aria-required",i?"true":!1);return}super._delegateAttribute(e,i);}}_autoExpandHorizontallyChanged(e,i){(e||i)&&this.__updateChips();}_autoExpandVerticallyChanged(e,i){(e||i)&&this.__updateChips();}_clearButtonVisibleChanged(e,i){(e||i)&&this.__updateChips();}_onFilteredItemsChanged(e){const{value:i}=e.detail;(Array.isArray(i)||i==null)&&(this.filteredItems=i);}_readonlyChanged(e,i){(e||i)&&this.__updateChips(),this.dataProvider&&this.clearCache();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.__updateChips();}_pageSizeChanged(e,i){(Math.floor(e)!==e||e<=0)&&(this.pageSize=i,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize;}_placeholderChanged(e){const i=this.__tmpA11yPlaceholder;i!==e&&(this.__savedPlaceholder=e,i&&(this.placeholder=i));}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const i=this._mergeItemLabels(e);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=i,this.placeholder=i;}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(i=>this._getItemLabel(i)).join(", ")}_findIndex(e,i,o){if(o&&e){for(let r=0;r<i.length;r++)if(i[r]&&i[r][o]===e[o])return r;return -1}return i.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter);}__announceItem(e,i,o){const r=i?"selected":"deselected",n=this.i18n.total.replace("{count}",o||0);wt(`${e} ${this.i18n[r]} ${n}`);}__removeItem(e){const i=[...this.selectedItems];i.splice(i.indexOf(e),1),this.__updateSelection(i);const o=this._getItemLabel(e);this.__announceItem(o,!1,i.length);}__selectItem(e){const i=[...this.selectedItems],o=this._findIndex(e,i,this.itemIdPath),r=this._getItemLabel(e);let n=!1;if(o!==-1){const a=this._lastFilter;if(a&&a.toLowerCase()===r.toLowerCase()){this.__clearInternalValue();return}i.splice(o,1);}else i.push(e),n=!0;this.__updateSelection(i),this.__clearInternalValue(),this.__announceItem(r,n,i.length);}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}));}__updateTopGroup(e,i,o){e?(!o||this.__needToSyncTopGroup())&&(this._topGroup=[...i]):this._topGroup=[];}__needToSyncTopGroup(){return this.itemIdPath?this._topGroup&&this._topGroup.some(e=>{const i=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return i&&e!==i}):!1}__createChip(e){const i=document.createElement("vaadin-multi-select-combo-box-chip");i.setAttribute("slot","chip"),i.item=e,i.disabled=this.disabled,i.readonly=this.readonly;const o=this._getItemLabel(e);return i.label=o,i.setAttribute("title",o),typeof this.itemClassNameGenerator=="function"&&(i.className=this.itemClassNameGenerator(e)),i.addEventListener("item-removed",r=>this._onItemRemoved(r)),i.addEventListener("mousedown",r=>this._preventBlur(r)),i}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const i=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),r=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",i),e.setAttribute("hidden",""),e.style.visibility="",r}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(a=>{a.remove();});const e=[...this.selectedItems],i=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let r=i-o;e.length>1&&(r-=this.__getOverflowWidth());const n=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const a=[];for(let h=e.length-1,c=null;h>=0;h--){const u=this.__createChip(e[h]);this.insertBefore(u,c),c=u,a.unshift(u);}const l=[],d=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&d<o){for(;a.length>1;){a.pop().remove(),l.unshift(e.pop());const c=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=c)break}a.length===1&&(a[0].style.maxWidth=`${Math.max(n,r)}px`);}this._overflowItems=l;return}for(let a=e.length-1,l=null;a>=0;a--){const d=this.__createChip(e[a]);if(this.insertBefore(d,l),!this.autoExpandVertically){if(this.$.chips.clientWidth>r&&(r<n||l!==null)){d.remove();break}d.style.maxWidth=`${r}px`;}e.pop(),l=d;}this._overflowItems=e;}__updateOverflowChip(e,i,o,r){if(e){const n=i.length;e.label=`${n}`,e.setAttribute("count",`${n}`),e.setAttribute("title",this._mergeItemLabels(i)),e.toggleAttribute("hidden",n===0),e.disabled=o,e.readonly=r;}}_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 i=this._chips;if(!this.readonly&&i.length>0)switch(e.key){case"Backspace":this._onBackSpace(i);break;case"ArrowLeft":this._onArrowLeft(i,e);break;case"ArrowRight":this._onArrowRight(i,e);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===e.length-1?r=-1:o>-1&&(r=o+1):o===-1?r=e.length-1:o>0&&(r=o-1),r!==void 0&&(this._focusedChipIndex=r);}_onArrowRight(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===-1?r=e.length-1:o>0&&(r=o-1):o===e.length-1?r=-1:o>-1&&(r=o+1),r!==void 0&&(this._focusedChipIndex=r);}_onBackSpace(e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i===-1?this._focusedChipIndex=e.length-1:(this.__removeItem(e[i].item),this._focusedChipIndex=-1);}_focusedChipIndexChanged(e,i){if(e>-1||i>-1){const o=this._chips;if(o.forEach((r,n)=>{r.toggleAttribute("focused",n===e);}),e>-1){const r=o[e].item,n=this._getItemLabel(r);wt(`${n} ${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();}};/**
|
|
7271
7265
|
* @license
|
|
7272
7266
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
7273
7267
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7274
|
-
*/
|
|
7268
|
+
*/I("vaadin-multi-select-combo-box",[t_,Ku],{moduleId:"vaadin-multi-select-combo-box-styles"});class A_ extends I_(Oe(Jp(y))){static get is(){return "vaadin-multi-select-combo-box"}static get template(){return b`
|
|
7275
7269
|
<div class="vaadin-multi-select-combo-box-container">
|
|
7276
7270
|
<div part="label">
|
|
7277
7271
|
<slot name="label"></slot>
|
|
@@ -7342,7 +7336,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7342
7336
|
</div>
|
|
7343
7337
|
|
|
7344
7338
|
<slot name="tooltip"></slot>
|
|
7345
|
-
`}}
|
|
7339
|
+
`}}J(A_);f("vaadin-notification-card",p`
|
|
7346
7340
|
:host {
|
|
7347
7341
|
position: relative;
|
|
7348
7342
|
margin: var(--lumo-space-s);
|
|
@@ -7560,11 +7554,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7560
7554
|
* @license
|
|
7561
7555
|
* Copyright 2020 Google LLC
|
|
7562
7556
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7563
|
-
*/const
|
|
7557
|
+
*/const E_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
7564
7558
|
* @license
|
|
7565
7559
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7566
7560
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7567
|
-
*/class
|
|
7561
|
+
*/class S_ extends On(E(X(y))){static get template(){return b`
|
|
7568
7562
|
<style>
|
|
7569
7563
|
:host {
|
|
7570
7564
|
position: fixed;
|
|
@@ -7631,7 +7625,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7631
7625
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
7632
7626
|
</div>
|
|
7633
7627
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
7634
|
-
`}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),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(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 t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class
|
|
7628
|
+
`}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),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(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 t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class k_ extends E(y){static get template(){return b`
|
|
7635
7629
|
<style>
|
|
7636
7630
|
:host {
|
|
7637
7631
|
display: block;
|
|
@@ -7653,14 +7647,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7653
7647
|
<slot></slot>
|
|
7654
7648
|
</div>
|
|
7655
7649
|
</div>
|
|
7656
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class
|
|
7650
|
+
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class Y extends Yt(Sr(X(y))){static get template(){return b`
|
|
7657
7651
|
<style>
|
|
7658
7652
|
:host {
|
|
7659
7653
|
display: none !important;
|
|
7660
7654
|
}
|
|
7661
7655
|
</style>
|
|
7662
7656
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
7663
|
-
`}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(t,e){return
|
|
7657
|
+
`}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(t,e){return E_(t)?Y._createAndShowNotification(i=>{Er(t,i);},e):Y._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(Y.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return Y._container||(Y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Y._container)),Y._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),eo(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(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 t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(S_);x(k_);x(Y);const Ea=p`
|
|
7664
7658
|
:host {
|
|
7665
7659
|
-webkit-tap-highlight-color: transparent;
|
|
7666
7660
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -7674,11 +7668,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7674
7668
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
7675
7669
|
background-color: var(--lumo-contrast-10pct);
|
|
7676
7670
|
}
|
|
7677
|
-
`;f("vaadin-list-box",
|
|
7671
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
7678
7672
|
* @license
|
|
7679
7673
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7680
7674
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7681
|
-
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",
|
|
7675
|
+
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const T_=p`
|
|
7682
7676
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
7683
7677
|
text-align: start;
|
|
7684
7678
|
}
|
|
@@ -7721,7 +7715,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7721
7715
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
7722
7716
|
--_lumo-selected-item-padding: 0;
|
|
7723
7717
|
}
|
|
7724
|
-
`;f("vaadin-select",[
|
|
7718
|
+
`;f("vaadin-select",[Pe,T_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
7725
7719
|
:host {
|
|
7726
7720
|
font-family: var(--lumo-font-family);
|
|
7727
7721
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -7740,7 +7734,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7740
7734
|
::slotted(*:hover) {
|
|
7741
7735
|
background-color: transparent;
|
|
7742
7736
|
}
|
|
7743
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
7737
|
+
`,{moduleId:"lumo-select-value-button"});const P_=p`
|
|
7744
7738
|
:host {
|
|
7745
7739
|
--_lumo-item-selected-icon-display: block;
|
|
7746
7740
|
}
|
|
@@ -7776,15 +7770,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7776
7770
|
:host([theme~='align-center']) {
|
|
7777
7771
|
text-align: center;
|
|
7778
7772
|
}
|
|
7779
|
-
`;f("vaadin-select-overlay",[
|
|
7773
|
+
`;f("vaadin-select-overlay",[Bs,P_],{moduleId:"lumo-select-overlay"});/**
|
|
7780
7774
|
* @license
|
|
7781
7775
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7782
7776
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7783
|
-
*/const
|
|
7777
|
+
*/const O_=s=>class extends ks(fe(s)){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());}};/**
|
|
7784
7778
|
* @license
|
|
7785
7779
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7786
7780
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7787
|
-
*/class
|
|
7781
|
+
*/class D_ extends O_(E($(y))){static get is(){return "vaadin-select-item"}static get template(){return b`
|
|
7788
7782
|
<style>
|
|
7789
7783
|
:host {
|
|
7790
7784
|
display: inline-block;
|
|
@@ -7798,23 +7792,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7798
7792
|
<div part="content">
|
|
7799
7793
|
<slot></slot>
|
|
7800
7794
|
</div>
|
|
7801
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}
|
|
7795
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(D_);/**
|
|
7802
7796
|
* @license
|
|
7803
7797
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7804
7798
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7805
|
-
*/function
|
|
7799
|
+
*/function z_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function M_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
7806
7800
|
* @license
|
|
7807
7801
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7808
7802
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7809
|
-
*/const
|
|
7803
|
+
*/const N_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Os)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Wi(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Wi(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
7810
7804
|
* @license
|
|
7811
7805
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7812
7806
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7813
|
-
*/const
|
|
7807
|
+
*/const L_=s=>class extends N_(s){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:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Wi(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new ws(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=z.debounce(this._searchReset,te.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).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 i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=z_(this._scrollerElement,i)+e;M_(this._scrollerElement,i,o);}}};/**
|
|
7814
7808
|
* @license
|
|
7815
7809
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7816
7810
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7817
|
-
*/class
|
|
7811
|
+
*/class V_ extends L_(E($(oe(y)))){static get is(){return "vaadin-select-list-box"}static get template(){return b`
|
|
7818
7812
|
<style>
|
|
7819
7813
|
:host {
|
|
7820
7814
|
display: flex;
|
|
@@ -7834,15 +7828,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7834
7828
|
<div part="items">
|
|
7835
7829
|
<slot></slot>
|
|
7836
7830
|
</div>
|
|
7837
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}
|
|
7831
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(V_);/**
|
|
7838
7832
|
* @license
|
|
7839
7833
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7840
7834
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7841
|
-
*/const
|
|
7835
|
+
*/const F_=s=>class extends qs(Hs($(s))){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,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
7842
7836
|
* @license
|
|
7843
7837
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7844
7838
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7845
|
-
*/const
|
|
7839
|
+
*/const B_=p`
|
|
7846
7840
|
:host {
|
|
7847
7841
|
align-items: flex-start;
|
|
7848
7842
|
justify-content: flex-start;
|
|
@@ -7857,18 +7851,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7857
7851
|
outline: 3px solid;
|
|
7858
7852
|
}
|
|
7859
7853
|
}
|
|
7860
|
-
`;f("vaadin-select-overlay",[
|
|
7854
|
+
`;f("vaadin-select-overlay",[Rs,B_],{moduleId:"vaadin-select-overlay-styles"});class R_ extends F_(E(y)){static get is(){return "vaadin-select-overlay"}static get template(){return b`
|
|
7861
7855
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
7862
7856
|
<div part="overlay" id="overlay" tabindex="0">
|
|
7863
7857
|
<div part="content" id="content">
|
|
7864
7858
|
<slot></slot>
|
|
7865
7859
|
</div>
|
|
7866
7860
|
</div>
|
|
7867
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}
|
|
7861
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x(R_);/**
|
|
7868
7862
|
* @license
|
|
7869
7863
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7870
7864
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7871
|
-
*/const
|
|
7865
|
+
*/const $_=p`
|
|
7872
7866
|
:host {
|
|
7873
7867
|
display: inline-block;
|
|
7874
7868
|
position: relative;
|
|
@@ -7914,17 +7908,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7914
7908
|
* @license
|
|
7915
7909
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7916
7910
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7917
|
-
*/f("vaadin-select-value-button",
|
|
7911
|
+
*/f("vaadin-select-value-button",$_,{moduleId:"vaadin-select-value-button-styles"});class H_ extends Us(E(y)){static get is(){return "vaadin-select-value-button"}static get template(){return b`
|
|
7918
7912
|
<div class="vaadin-button-container">
|
|
7919
7913
|
<span part="label">
|
|
7920
7914
|
<slot></slot>
|
|
7921
7915
|
</span>
|
|
7922
7916
|
</div>
|
|
7923
|
-
`}}
|
|
7917
|
+
`}}x(H_);/**
|
|
7924
7918
|
* @license
|
|
7925
7919
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
7926
7920
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7927
|
-
*/const
|
|
7921
|
+
*/const q_=p`
|
|
7928
7922
|
.sr-only {
|
|
7929
7923
|
border: 0 !important;
|
|
7930
7924
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -7942,15 +7936,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7942
7936
|
* @license
|
|
7943
7937
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7944
7938
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7945
|
-
*/class
|
|
7939
|
+
*/class U_ extends G{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(e,i)=>{i._setFocusElement(e),i.ariaTarget=e,i.stateTarget=e,e.setAttribute("aria-haspopup","listbox");}});}}/**
|
|
7946
7940
|
* @license
|
|
7947
7941
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7948
7942
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7949
|
-
*/const
|
|
7943
|
+
*/const W_=s=>class extends Yt(Ht(Ds(me(qt(s))))){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}-${Rt()}`,this._srLabelController=new Cn(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 U_(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Ks(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new _e(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,i){(e||i)&&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",i=>this._onKeyDownInside(i),!0),e.addEventListener("click",i=>{const o=i.composedPath().find(r=>r._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,i){this.toggleAttribute("has-value",!!e),i!==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 i=this._menuElement.selected,o=i!==void 0?i:-1,r=this._menuElement._searchKey(o,e.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r);}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1);}_openedChanged(e,i,o){if(!(!i||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const r=this.hasAttribute("focus-ring");this._openedWithFocusRing=r,r&&this.removeAttribute("focus-ring");}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e;}}_updateAriaExpanded(e,i){i&&i.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 i;const o=e.getAttribute("label");o?i=this.__createItemElement({label:o}):i=e.cloneNode(!0),i._sourceItem=e,this.__appendValueItemElement(i,this.focusElement),i.selected=!0;}__createItemElement(e){const i=document.createElement(e.component||"vaadin-select-item");return e.label&&(i.textContent=e.label),e.value&&(i.value=e.value),e.disabled&&(i.disabled=e.disabled),e.className&&(i.className=e.className),i}__appendValueItemElement(e,i){i.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 i=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(i,!0);}_getLabelIdWithItemId(e){const o=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${o}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const i=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){const r=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(r,e),e.setAttribute("placeholder","");}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};xt(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId);}_hasContent(e){if(!e)return !1;const i=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return i||o}_updateSelectedItem(e,i){if(i){const o=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===o?a:r,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,i){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(r=>{o.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Me(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
7950
7944
|
* @license
|
|
7951
7945
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7952
7946
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7953
|
-
*/f("vaadin-select",[
|
|
7947
|
+
*/f("vaadin-select",[$n,Hn,q_],{moduleId:"vaadin-select-styles"});class j_ extends W_(X(E(y))){static get is(){return "vaadin-select"}static get template(){return b`
|
|
7954
7948
|
<style>
|
|
7955
7949
|
:host {
|
|
7956
7950
|
position: relative;
|
|
@@ -8003,7 +7997,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8003
7997
|
<div class="sr-only">
|
|
8004
7998
|
<slot name="sr-label"></slot>
|
|
8005
7999
|
</div>
|
|
8006
|
-
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}
|
|
8000
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}x(j_);
|
|
8007
8001
|
|
|
8008
8002
|
const lotteryTicketCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}";
|
|
8009
8003
|
const LotteryTicketStyle0 = lotteryTicketCss;
|